Replace toxicity model with multi-label classifier

This commit is contained in:
Jordan Wages 2026-08-26 17:00:49 -05:00
commit 1568c787f8
24 changed files with 2581129 additions and 119717 deletions

View file

@ -24,4 +24,9 @@ describe("legacy settings", () => {
expect(mergeSettings({ cpuThreads: 99 })).not.toHaveProperty("cpuThreads");
expect(mergeSettings({ inferenceDevice: "webgpu" } as never)).not.toHaveProperty("inferenceDevice");
});
it("defaults missing categories and removes invalid stored labels", () => {
expect(mergeSettings({}).enabledLabels).toEqual(DEFAULT_SETTINGS.enabledLabels);
expect(mergeSettings({ enabledLabels: ["threat", "threat", "unknown"] as never }).enabledLabels).toEqual(["threat"]);
});
});