mirror of
https://github.com/Litlyx/litlyx
synced 2025-12-10 07:48:37 +01:00
Add streaming to AI
This commit is contained in:
@@ -4,6 +4,8 @@ export type TAiChatSchema = {
|
||||
_id: Schema.Types.ObjectId,
|
||||
project_id: Schema.Types.ObjectId,
|
||||
messages: any[],
|
||||
status: string,
|
||||
completed: boolean,
|
||||
title: string,
|
||||
created_at: Date,
|
||||
updated_at: Date
|
||||
@@ -11,6 +13,8 @@ export type TAiChatSchema = {
|
||||
|
||||
const AiChatSchema = new Schema<TAiChatSchema>({
|
||||
project_id: { type: Schema.Types.ObjectId, index: 1 },
|
||||
status: { type: String },
|
||||
completed: { type: Boolean },
|
||||
messages: [{ _id: false, type: Schema.Types.Mixed }],
|
||||
title: { type: String, required: true },
|
||||
created_at: { type: Date, default: () => Date.now() },
|
||||
|
||||
Reference in New Issue
Block a user