From 014c5cb2458e0395d148e90c9856461ad8da664a Mon Sep 17 00:00:00 2001 From: HamadaSalhab Date: Tue, 22 Oct 2024 18:15:32 +0300 Subject: [PATCH] Fix embed instruction in embed endpoint --- agents-api/agents_api/routers/docs/embed.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agents-api/agents_api/routers/docs/embed.py b/agents-api/agents_api/routers/docs/embed.py index 131592b24..60d2a85dc 100644 --- a/agents-api/agents_api/routers/docs/embed.py +++ b/agents-api/agents_api/routers/docs/embed.py @@ -22,6 +22,6 @@ async def embed( [text_to_embed] if isinstance(text_to_embed, str) else text_to_embed ) - vectors = await litellm.aembedding(inputs=data.embed_instruction + text_to_embed) + vectors = await litellm.aembedding(inputs=[data.embed_instruction] + text_to_embed) return EmbedQueryResponse(vectors=vectors)