diff --git a/agents-api/agents_api/routers/docs/embed.py b/agents-api/agents_api/routers/docs/embed.py index 60d2a85dc..ba35b2dbb 100644 --- a/agents-api/agents_api/routers/docs/embed.py +++ b/agents-api/agents_api/routers/docs/embed.py @@ -21,7 +21,8 @@ async def embed( text_to_embed: list[str] = ( [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 for text in text_to_embed] + ) return EmbedQueryResponse(vectors=vectors)