diff --git a/libs/community/langchain_community/chat_models/deepinfra.py b/libs/community/langchain_community/chat_models/deepinfra.py index a0875aa8fe86b..b23402cdc06f0 100644 --- a/libs/community/langchain_community/chat_models/deepinfra.py +++ b/libs/community/langchain_community/chat_models/deepinfra.py @@ -290,7 +290,7 @@ async def _completion_with_retry(**kwargs: Any) -> Any: async with request.apost( url=self._url(), data=self._body(kwargs), timeout=request_timeout ) as response: - self._handle_status(response.status, response.text) + self._handle_status(response.status, await response.text()) return await response.json() except Exception as e: print("EX", e) # noqa: T201