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

@@ -1,5 +1,5 @@
import { Schema, model, models, Model } from 'mongoose';
import { ChatModelMap } from '@/constants/model';
import { ChatModelMap, embeddingModel } from '@/constants/model';
import { BillSchema as BillType } from '@/types/mongoSchema';
import { BillTypeMap } from '@/constants/user';
@@ -16,7 +16,7 @@ const BillSchema = new Schema({
},
modelName: {
type: String,
enum: [...Object.keys(ChatModelMap), 'text-embedding-ada-002'],
enum: [...Object.keys(ChatModelMap), embeddingModel],
required: true
},
chatId: {