mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-11-04 22:10:12 +01:00
UI updates and linting
This commit is contained in:
parent
98d7266291
commit
032c9d27b6
@ -150,13 +150,11 @@ export default function WorkspaceSettings({ workspace }) {
|
||||
Chat History
|
||||
</label>
|
||||
<p className="text-xs text-gray-600 dark:text-stone-400">
|
||||
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.
|
||||
<br />
|
||||
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.
|
||||
<br />
|
||||
Recommended: 20
|
||||
</p>
|
||||
</div>
|
||||
<input
|
||||
|
@ -113,7 +113,7 @@ const Workspace = {
|
||||
const values = Object.values(data);
|
||||
if (validKeys.length === 0 || validKeys.length !== values.length)
|
||||
return { workspace: { id }, message: "No valid fields to update!" };
|
||||
|
||||
|
||||
const template = `UPDATE ${this.tablename} SET ${validKeys.map((key) => {
|
||||
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 };
|
||||
}
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user