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

18 lines
413 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, user = null) {
await WorkspaceChats.markHistoryInvalid(workspace.id, user);
2023-06-04 04:28:07 +02:00
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,
};