forked from phoenix/litellm-mirror
fix(main.py): fix async stream handling during bedrock error
This commit is contained in:
parent
21f2ba6f1f
commit
0258351c61
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