Skip to content

Commit

Permalink
fixup!
Browse files Browse the repository at this point in the history
Signed-off-by: Tomas Pilar <[email protected]>
  • Loading branch information
pilartomas committed Jan 16, 2025
1 parent ecc294c commit 141f397
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/embeddings/embeddings.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ export async function embeddings({
input
}: EmbeddingsCreateBody): Promise<EmbeddingsCreateResponse> {
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);
Expand Down

0 comments on commit 141f397

Please sign in to comment.