Replace toxicity model with multi-label classifier
This commit is contained in:
parent
803df7feee
commit
1568c787f8
24 changed files with 2581129 additions and 119717 deletions
|
|
@ -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"]);
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue