chat-ui-energy / src /lib /migrations /routines /08-reset-tools-in-settings-2.ts
nsarrazin's picture
nsarrazin HF Staff
Community tools (#1250)
0c3e3b2 unverified
raw
history blame
441 Bytes
import type { Migration } from ".";
import { collections } from "$lib/server/database";
import { ObjectId } from "mongodb";
const resetTools2: Migration = {
_id: new ObjectId("000000000008"),
name: "Reset tools to empty",
up: async () => {
const { settings } = collections;
await settings.updateMany({}, { $set: { tools: [] } });
return true;
},
runEveryTime: false,
runForHuggingChat: "only",
};
export default resetTools2;