mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-29 14:37:21 +00:00
community: Fix error handling bug in ChatDeepInfra (#28918)
In the async ClientResponse, `response.text` is not a string property, but an asynchronous function returning a string.
This commit is contained in:
parent
d46fddface
commit
5940ed3952
@ -290,7 +290,7 @@ class ChatDeepInfra(BaseChatModel):
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user