diff --git a/litellm/llms/huggingface_restapi.py b/litellm/llms/huggingface_restapi.py index d898ed8c7f..123b8ecbc4 100644 --- a/litellm/llms/huggingface_restapi.py +++ b/litellm/llms/huggingface_restapi.py @@ -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, diff --git a/litellm/tests/test_streaming.py b/litellm/tests/test_streaming.py index 30d777d799..4df4f20e92 100644 --- a/litellm/tests/test_streaming.py +++ b/litellm/tests/test_streaming.py @@ -899,7 +899,7 @@ async def test_sagemaker_streaming_async(): pytest.fail(f"An exception occurred - {str(e)}") -asyncio.run(test_sagemaker_streaming_async()) +# asyncio.run(test_sagemaker_streaming_async()) def test_completion_sagemaker_stream():