feat: add sample multi-user support

feat: update README
This commit is contained in:
Wentao Lyu 2023-03-14 01:24:43 +08:00
parent 41f351786f
commit 62d88380e0
19 changed files with 314 additions and 49 deletions

View file

@ -129,7 +129,8 @@ const ask = async ({
response.text = await handleText(response, true);
await saveMessage(response);
await saveConvo({ ...response, model, chatGptLabel: null, promptPrefix: null, ...convo });
await saveConvo(req?.session?.user?.username, { ...response, model, chatGptLabel: null, promptPrefix: null, ...convo });
sendMessage(res, {
title: await getConvoTitle(conversationId),
final: true,