feat: 模型介绍和温度调整。完善聊天页提示
This commit is contained in:
@@ -25,19 +25,22 @@ const ChatSchema = new Schema({
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
content: [
|
||||
{
|
||||
obj: {
|
||||
type: String,
|
||||
required: true,
|
||||
enum: ['Human', 'AI', 'SYSTEM']
|
||||
},
|
||||
value: {
|
||||
type: String,
|
||||
required: true
|
||||
content: {
|
||||
type: [
|
||||
{
|
||||
obj: {
|
||||
type: String,
|
||||
required: true,
|
||||
enum: ['Human', 'AI', 'SYSTEM']
|
||||
},
|
||||
value: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
default: []
|
||||
}
|
||||
});
|
||||
|
||||
export const Chat = models['chat'] || model('chat', ChatSchema);
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
import { Schema, model, models } from 'mongoose';
|
||||
|
||||
const ModelSchema = new Schema({
|
||||
userId: {
|
||||
type: Schema.Types.ObjectId,
|
||||
ref: 'user',
|
||||
required: true
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
required: true
|
||||
@@ -10,13 +15,14 @@ const ModelSchema = new Schema({
|
||||
default: '/imgs/modelAvatar.png'
|
||||
},
|
||||
systemPrompt: {
|
||||
// 系统提示词
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
userId: {
|
||||
type: Schema.Types.ObjectId,
|
||||
ref: 'user',
|
||||
required: true
|
||||
intro: {
|
||||
// 模型介绍
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
status: {
|
||||
type: String,
|
||||
@@ -31,6 +37,12 @@ const ModelSchema = new Schema({
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
temperature: {
|
||||
type: Number,
|
||||
min: 1,
|
||||
max: 10,
|
||||
default: 5
|
||||
},
|
||||
service: {
|
||||
company: {
|
||||
type: String,
|
||||
|
||||
Reference in New Issue
Block a user