mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-09 22:31:41 +00:00
fix(huggingface_restapi.py): catch streaming errors
This commit is contained in:
parent
eb45df16f1
commit
0bf35b4a91
1 changed files with 6 additions and 2 deletions
|
|
@ -630,8 +630,12 @@ class Huggingface(BaseLLM):
|
|||
custom_llm_provider="huggingface",
|
||||
logging_obj=logging_obj,
|
||||
)
|
||||
async for transformed_chunk in streamwrapper:
|
||||
yield transformed_chunk
|
||||
|
||||
async def generator():
|
||||
async for transformed_chunk in streamwrapper:
|
||||
yield transformed_chunk
|
||||
|
||||
return generator()
|
||||
|
||||
def embedding(
|
||||
self,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue