chatbox ui

This commit is contained in:
archer
2023-07-11 23:22:01 +08:00
parent eb768d9c04
commit b2e2f60e0d
46 changed files with 1123 additions and 2817 deletions

View File

@@ -8,21 +8,11 @@ const ChatSchema = new Schema({
ref: 'user',
required: true
},
modelId: {
appId: {
type: Schema.Types.ObjectId,
ref: 'model',
required: true
},
expiredTime: {
// 过期时间
type: Number,
default: () => new Date()
},
loadAmount: {
// 剩余加载次数
type: Number,
default: -1
},
updateTime: {
type: Date,
default: () => new Date()
@@ -35,13 +25,13 @@ const ChatSchema = new Schema({
type: String,
default: ''
},
latestChat: {
type: String,
default: ''
},
top: {
type: Boolean
},
variables: {
type: Object,
default: {}
},
content: {
type: [
{

View File

@@ -7,7 +7,7 @@ const CollectionSchema = new Schema({
ref: 'user',
required: true
},
modelId: {
appId: {
type: Schema.Types.ObjectId,
ref: 'model',
required: true

View File

@@ -1,18 +0,0 @@
import { Schema, model, models, Model } from 'mongoose';
import { ChatSchema as ChatType } from '@/types/mongoSchema';
import { ChatRoleMap } from '@/constants/chat';
const InstallAppSchema = new Schema({
userId: {
type: Schema.Types.ObjectId,
ref: 'user',
required: true
},
modelId: {
type: Schema.Types.ObjectId,
ref: 'model',
required: true
}
});
export const InstallApp: Model<ChatType> = models['installApp'] || model('chat', InstallAppSchema);