Skip to content

The agent engineering platform.

community[patch]: Fixed 'coroutine' object is not subscriptable error (#15986)

Raunakc0773ab32995
diff --git a/libs/community/langchain_community/embeddings/huggingface_hub.py b/libs/community/langchain_community/embeddings/huggingface_hub.py
index 465f8c6925..70424ac0b2 100644
--- a/libs/community/langchain_community/embeddings/huggingface_hub.py
+++ b/libs/community/langchain_community/embeddings/huggingface_hub.py
@@ -144,5 +144,5 @@ class HuggingFaceHubEmbeddings(BaseModel, Embeddings):
Returns:
Embeddings for the text.
"""
- response = await self.aembed_documents([text])[0]
+ response = (await self.aembed_documents([text]))[0]
return response