mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 19:24:27 +00:00
fix(main.py): fix async stream handling during bedrock error
This commit is contained in:
parent
be8f2dd909
commit
86ece7d8b5
1 changed files with 2 additions and 0 deletions
|
@ -368,6 +368,8 @@ async def acompletion(
|
|||
async def _async_streaming(response, model, custom_llm_provider, args):
|
||||
try:
|
||||
print_verbose(f"received response in _async_streaming: {response}")
|
||||
if asyncio.iscoroutine(response):
|
||||
response = await response
|
||||
async for line in response:
|
||||
print_verbose(f"line in async streaming: {line}")
|
||||
yield line
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue