From 141f3971d0822e167968c00bd5a48eeaebbec34b Mon Sep 17 00:00:00 2001 From: Tomas Pilar Date: Thu, 16 Jan 2025 14:02:15 +0100 Subject: [PATCH] fixup! Signed-off-by: Tomas Pilar --- src/embeddings/embeddings.service.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/embeddings/embeddings.service.ts b/src/embeddings/embeddings.service.ts index d252f3d..d174e29 100644 --- a/src/embeddings/embeddings.service.ts +++ b/src/embeddings/embeddings.service.ts @@ -31,7 +31,10 @@ export async function embeddings({ input }: EmbeddingsCreateBody): Promise { const llm = defaultAIProvider.createEmbeddingBackend({ model }); - const embeddings = new Embeddings({ model, inputs: typeof input === 'string' ? [input] : input }); + const embeddings = new Embeddings({ + model: llm.modelId, + inputs: typeof input === 'string' ? [input] : input + }); await ORM.em.persistAndFlush(embeddings); try { const output = await llm.embed(embeddings.inputs);