mirror of
https://github.com/Yidadaa/ChatGPT-Next-Web.git
synced 2025-08-08 00:29:09 +08:00
refactor: remove NEXT_PUBLIC_ prefix from VISION_MODELS env var
This commit is contained in:
@@ -48,19 +48,19 @@ describe("isVisionModel", () => {
|
||||
});
|
||||
});
|
||||
|
||||
test("should identify models from NEXT_PUBLIC_VISION_MODELS env var", () => {
|
||||
process.env.NEXT_PUBLIC_VISION_MODELS = "custom-vision-model,another-vision-model";
|
||||
test("should identify models from VISION_MODELS env var", () => {
|
||||
process.env.VISION_MODELS = "custom-vision-model,another-vision-model";
|
||||
|
||||
expect(isVisionModel("custom-vision-model")).toBe(true);
|
||||
expect(isVisionModel("another-vision-model")).toBe(true);
|
||||
expect(isVisionModel("unrelated-model")).toBe(false);
|
||||
});
|
||||
|
||||
test("should handle empty or missing NEXT_PUBLIC_VISION_MODELS", () => {
|
||||
process.env.NEXT_PUBLIC_VISION_MODELS = "";
|
||||
test("should handle empty or missing VISION_MODELS", () => {
|
||||
process.env.VISION_MODELS = "";
|
||||
expect(isVisionModel("unrelated-model")).toBe(false);
|
||||
|
||||
delete process.env.NEXT_PUBLIC_VISION_MODELS;
|
||||
delete process.env.VISION_MODELS;
|
||||
expect(isVisionModel("unrelated-model")).toBe(false);
|
||||
expect(isVisionModel("gpt-4-vision")).toBe(true);
|
||||
});
|
||||
|
Reference in New Issue
Block a user