From 4d0d05c3c2e5ba59eac92dd195cc6ba4e827759d Mon Sep 17 00:00:00 2001 From: your-username Date: Thu, 11 Jul 2024 15:27:39 +0800 Subject: [PATCH] Fix Issue #20453: Change _call_eas to return bytes instead of str --- .../langchain_community/chat_models/pai_eas_endpoint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/community/langchain_community/chat_models/pai_eas_endpoint.py b/libs/community/langchain_community/chat_models/pai_eas_endpoint.py index e438ad25ee044..d62545543cbe2 100644 --- a/libs/community/langchain_community/chat_models/pai_eas_endpoint.py +++ b/libs/community/langchain_community/chat_models/pai_eas_endpoint.py @@ -227,7 +227,7 @@ def _call_eas(self, query_body: dict) -> Any: f" and message {response.text}" ) - return response.text + return response.content def _call_eas_stream(self, query_body: dict) -> Any: """Generate text from the eas service."""