We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1e4a456 commit 6e0b0eaCopy full SHA for 6e0b0ea
src/lib/server/embeddingModels.ts
@@ -9,6 +9,8 @@ import {
9
} from "$lib/server/embeddingEndpoints/embeddingEndpoints";
10
import { embeddingEndpointTransformersJS } from "$lib/server/embeddingEndpoints/transformersjs/embeddingEndpoints";
11
12
+import JSON5 from "json5";
13
+
14
const modelConfig = z.object({
15
/** Used as an identifier in DB */
16
id: z.string().optional(),
@@ -37,7 +39,7 @@ const rawEmbeddingModelJSON =
37
39
}
38
40
]`;
41
-const embeddingModelsRaw = z.array(modelConfig).parse(JSON.parse(rawEmbeddingModelJSON));
42
+const embeddingModelsRaw = z.array(modelConfig).parse(JSON5.parse(rawEmbeddingModelJSON));
43
44
const processEmbeddingModel = async (m: z.infer<typeof modelConfig>) => ({
45
...m,
0 commit comments