perf: bill framwork

This commit is contained in:
archer
2023-05-21 13:07:40 +08:00
parent e45c1eb1e0
commit 98444fd04b
19 changed files with 68 additions and 78 deletions

View File

@@ -3,9 +3,11 @@ import {
ModelStatusEnum,
ModelNameEnum,
ModelVectorSearchModeEnum,
ChatModelType
ChatModelType,
EmbeddingModelType
} from '@/constants/model';
import type { DataType } from './data';
import { BillTypeEnum } from '@/constants/user';
export interface UserModelSchema {
_id: string;
@@ -89,7 +91,8 @@ export interface ChatPopulate extends ChatSchema {
export interface BillSchema {
_id: string;
userId: string;
type: 'chat' | 'splitData' | 'return';
type: `${BillTypeEnum}`;
modelName: ChatModelType | EmbeddingModelType;
chatId: string;
time: Date;
textLen: number;