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);