diff --git a/libs/community/langchain_community/embeddings/sambanova.py b/libs/community/langchain_community/embeddings/sambanova.py index 0687295c8d..0daab18ef6 100644 --- a/libs/community/langchain_community/embeddings/sambanova.py +++ b/libs/community/langchain_community/embeddings/sambanova.py @@ -213,7 +213,7 @@ class SambaStudioEmbeddings(BaseModel, Embeddings): ) try: if params.get("select_expert"): - embedding = response.json()["predictions"][0] + embedding = response.json()["predictions"] else: embedding = response.json()["predictions"] embeddings.extend(embedding) @@ -299,7 +299,7 @@ class SambaStudioEmbeddings(BaseModel, Embeddings): ) try: if params.get("select_expert"): - embedding = response.json()["predictions"][0][0] + embedding = response.json()["predictions"][0] else: embedding = response.json()["predictions"][0] except KeyError: