diff --git a/frontend/src/components/Modals/MangeWorkspace/Settings/index.jsx b/frontend/src/components/Modals/MangeWorkspace/Settings/index.jsx index 77d13162..1ff13e77 100644 --- a/frontend/src/components/Modals/MangeWorkspace/Settings/index.jsx +++ b/frontend/src/components/Modals/MangeWorkspace/Settings/index.jsx @@ -150,13 +150,11 @@ export default function WorkspaceSettings({ workspace }) { Chat History

- Chat history: The number of previous chats that - will be included in the response's short-term memory. + The number of previous chats that will be included in the + response's short-term memory.
- Recommend 20. Anything more than 45 is likely to lead to + Recommend 20. Anything more than 45 is likely to lead to continuous chat failures depending on message size. -
- Recommended: 20

{ return `${key}=?`; })} WHERE id = ?`; @@ -127,7 +127,7 @@ const Workspace = { return { success: false, message: error.message }; }); - db.close(); + db.close(); if (!success) { return { workspace: null, message }; } diff --git a/server/utils/chats/index.js b/server/utils/chats/index.js index 58381cb5..cd4c2942 100644 --- a/server/utils/chats/index.js +++ b/server/utils/chats/index.js @@ -105,8 +105,11 @@ async function chatWithWorkspace(workspace, message, chatMode = "chat") { }; } else { var messageLimit = workspace?.openAiHistory; - - const rawHistory = await WorkspaceChats.forWorkspace(workspace.id, messageLimit); + + const rawHistory = await WorkspaceChats.forWorkspace( + workspace.id, + messageLimit + ); const chatHistory = convertToPromptHistory(rawHistory); const { response,