community[patch]: octoai embeddings bug fix (#17216)

fixes a bug in octoa_embeddings provider
This commit is contained in:
Bassem Yacoube
2024-02-07 19:25:52 -08:00
committed by GitHub
parent 780e84ae79
commit 4e3ed7f043

View File

@@ -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