anything-llm/server/utils/chats/commands/reset.js

18 lines
394 B
JavaScript
Raw Normal View History

2023-06-04 04:28:07 +02:00
const { WorkspaceChats } = require("../../../models/workspaceChats");
async function resetMemory(workspace, _message, msgUUID) {
await WorkspaceChats.markHistoryInvalid(workspace.id);
return {
uuid: msgUUID,
2023-06-08 06:31:35 +02:00
type: "textResponse",
textResponse: "Workspace chat memory was reset!",
2023-06-04 04:28:07 +02:00
sources: [],
close: true,
error: false,
};
}
module.exports = {
2023-06-08 06:31:35 +02:00
resetMemory,
};