feat: 模型介绍和温度调整。完善聊天页提示

This commit is contained in:
Archer
2023-03-18 12:32:55 +08:00
parent 1c364eca35
commit 00b90f071d
32 changed files with 628 additions and 327 deletions

View File

@@ -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,