feat: app module

This commit is contained in:
archer
2023-06-27 20:41:36 +08:00
parent 7e6272ca1b
commit 4c54e1821b
17 changed files with 2059 additions and 121 deletions

View File

@@ -47,7 +47,7 @@ export async function saveChat({
modelId,
prompts,
userId
}: Props & { newChatId?: Types.ObjectId; userId: string }) {
}: Props & { newChatId?: Types.ObjectId; userId: string }): Promise<{ newChatId: string }> {
await connectToDatabase();
const { model } = await authModel({ modelId, userId, authOwner: false });
@@ -104,6 +104,7 @@ export async function saveChat({
]);
return {
...response
// @ts-ignore
newChatId: response?.newChatId || ''
};
}