mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-15 10:24:33 +00:00
fix(huggingface_restapi.py): catch streaming errors
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user