mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
fix: fix streaming with httpx client
prevent overwriting streams in parallel streaming calls
This commit is contained in:
parent
aada7b4bd3
commit
93c3635b64
9 changed files with 182 additions and 82 deletions
|
@ -251,7 +251,7 @@ async def async_handle_prediction_response(
|
|||
logs = ""
|
||||
while True and (status not in ["succeeded", "failed", "canceled"]):
|
||||
print_verbose(f"replicate: polling endpoint: {prediction_url}")
|
||||
await asyncio.sleep(0.5)
|
||||
await asyncio.sleep(0.5) # prevent replicate rate limit errors
|
||||
response = await http_handler.get(prediction_url, headers=headers)
|
||||
if response.status_code == 200:
|
||||
response_data = response.json()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue