fix(huggingface_restapi.py): return streamed response correctly

This commit is contained in:
Krrish Dholakia 2024-02-16 13:25:13 -08:00
parent 86886de9d8
commit 5f9e141d1e
2 changed files with 3 additions and 6 deletions

View file

@ -631,11 +631,8 @@ class Huggingface(BaseLLM):
logging_obj=logging_obj,
)
async def generator():
async for transformed_chunk in streamwrapper:
yield transformed_chunk
return generator()
async for transformed_chunk in streamwrapper:
yield transformed_chunk
def embedding(
self,