Adds __aiter__ and __anext__ methods to LiteLLMStreamingAIResponse so that the response can properly be iterated over without using the inner stream_wrapper.
Before:
response = await chat_backend.achat(messages=messages, stream=True)
async for chunk in response.stream_wrapper:
print(chunk)
After:
response = await chat_backend.achat(messages=messages, stream=True)
async for chunk in response:
print(chunk)
Adds
__aiter__
and__anext__
methods toLiteLLMStreamingAIResponse
so that the response can properly be iterated over without using the innerstream_wrapper
.Before:
After: