From 032c9d27b65e81edfe5931a21fedd1838ace9b9a Mon Sep 17 00:00:00 2001 From: timothycarambat Date: Wed, 28 Jun 2023 12:54:18 -0700 Subject: [PATCH] UI updates and linting --- .../components/Modals/MangeWorkspace/Settings/index.jsx | 8 +++----- server/models/workspace.js | 4 ++-- server/utils/chats/index.js | 7 +++++-- 3 files changed, 10 insertions(+), 9 deletions(-) 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,