diff --git a/llama-index-integrations/embeddings/llama-index-embeddings-sagemaker-endpoint/llama_index/embeddings/sagemaker_endpoint/utils.py b/llama-index-integrations/embeddings/llama-index-embeddings-sagemaker-endpoint/llama_index/embeddings/sagemaker_endpoint/utils.py index 07533ac83716e..4f7602ebde74e 100644 --- a/llama-index-integrations/embeddings/llama-index-embeddings-sagemaker-endpoint/llama_index/embeddings/sagemaker_endpoint/utils.py +++ b/llama-index-integrations/embeddings/llama-index-embeddings-sagemaker-endpoint/llama_index/embeddings/sagemaker_endpoint/utils.py @@ -46,5 +46,4 @@ def serialize_input(self, request: List[str], model_kwargs: dict) -> bytes: return request_str.encode("utf-8") def deserialize_output(self, response: "StreamingBody") -> List[List[float]]: - response_json = json.loads(response.read().decode("utf-8")) - return response_json["vectors"] + return json.loads(response.read().decode("utf-8"))