Skip to content

Commit

Permalink
wip - chat stream
Browse files Browse the repository at this point in the history
  • Loading branch information
ion2088 committed Feb 27, 2024
1 parent ef54fa4 commit 4cbaf32
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/firedust/_utils/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ def post_stream(
self, url: str, data: Dict[str, Any] | None = None
) -> Iterator[bytes]:
url = self.base_url + url
with httpx.stream("post", url, json=data, headers=self.headers) as response:
with httpx.stream(
"post", url, json=data, headers=self.headers, timeout=300
) as response:
for chunk in response.iter_bytes():
yield chunk

Expand Down

0 comments on commit 4cbaf32

Please sign in to comment.