From 4e3ed7f043ce0f7ee14cd96c8fd7b820a61979d3 Mon Sep 17 00:00:00 2001 From: Bassem Yacoube <125713079+AI-Bassem@users.noreply.github.com> Date: Wed, 7 Feb 2024 19:25:52 -0800 Subject: [PATCH] community[patch]: octoai embeddings bug fix (#17216) fixes a bug in octoa_embeddings provider --- .../langchain_community/embeddings/octoai_embeddings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/community/langchain_community/embeddings/octoai_embeddings.py b/libs/community/langchain_community/embeddings/octoai_embeddings.py index a93fa4e03ad..f006a437a4e 100644 --- a/libs/community/langchain_community/embeddings/octoai_embeddings.py +++ b/libs/community/langchain_community/embeddings/octoai_embeddings.py @@ -80,7 +80,7 @@ class OctoAIEmbeddings(BaseModel, Embeddings): json_data = resp_json["data"] for item in json_data: if "embedding" in item: - embedding.append(item["embedding"]) + embedding = item["embedding"] except Exception as e: raise ValueError(f"Error raised by the inference endpoint: {e}") from e