fix: aembed_query type error (#2441)

This commit is contained in:
utopia2077 2025-03-12 10:54:39 +08:00 committed by GitHub
parent 150f33bd26
commit dc5b1f79aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -26,7 +26,8 @@ class RemoteEmbeddings(Embeddings):
async def aembed_query(self, text: str) -> List[float]:
"""Asynchronous Embed query text."""
return await self.aembed_documents([text])[0]
result = await self.aembed_documents([text])
return result[0]
class RemoteRerankEmbeddings(RerankEmbeddings):