Spaces:
Configuration error
Configuration error
Download frontend/__tests__/utils/is-custom-model.test.ts from flyingdarkdev/README: direct link, hf CLI and curl.
- Browser
- Download file 720 Bytes
-
https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/frontend/__tests__/utils/is-custom-model.test.ts
- Command line
-
hf download hf://spaces/flyingdarkdev/README/frontend/__tests__/utils/is-custom-model.test.ts
-
curl -L -o is-custom-model.test.ts https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/frontend/__tests__/utils/is-custom-model.test.ts
720 Bytes
| import { describe, expect, it } from "vitest"; | |
| import { isCustomModel } from "#/utils/is-custom-model"; | |
| describe("isCustomModel", () => { | |
| const models = ["anthropic/claude-3.5", "openai/gpt-3.5-turbo", "gpt-4o"]; | |
| it("should return false by default", () => { | |
| expect(isCustomModel(models, "")).toBe(false); | |
| }); | |
| it("should be true if it is a custom model", () => { | |
| expect(isCustomModel(models, "some/model")).toBe(true); | |
| }); | |
| it("should be false if it is not a custom model", () => { | |
| expect(isCustomModel(models, "anthropic/claude-3.5")).toBe(false); | |
| expect(isCustomModel(models, "openai/gpt-3.5-turbo")).toBe(false); | |
| expect(isCustomModel(models, "openai/gpt-4o")).toBe(false); | |
| }); | |
| }); | |