Skip to content

Commit

Permalink
Fix return type of _call_eas to bytes as per issue langchain-ai#20453
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangfuqiang01 committed Aug 20, 2024
1 parent 4fab899 commit 3ea4db3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def _call(

return generated_text

def _call_eas(self, query_body: dict) -> Any:
def _call_eas(self, query_body: dict) -> bytes:
"""Generate text from the eas service."""
headers = {
"Content-Type": "application/json",
Expand All @@ -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."""
Expand Down

0 comments on commit 3ea4db3

Please sign in to comment.