From c0773ab329953e57f33000a741e3f4a2a907fdf1 Mon Sep 17 00:00:00 2001 From: Raunak Date: Tue, 16 Jan 2024 00:04:10 +0530 Subject: [PATCH] community[patch]: Fixed 'coroutine' object is not subscriptable error (#15986) - **Description:** Added parenthesis in return statement of aembed_query() funtion to fix 'coroutine' object is not subscriptable error. - **Dependencies:** NA Co-authored-by: H161961 --- .../community/langchain_community/embeddings/huggingface_hub.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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