ResponsesAPIStreamingResponse

This commit is contained in:
Ishaan Jaff 2025-03-11 17:48:15 -07:00
parent f32968409e
commit 8da714104b
2 changed files with 18 additions and 0 deletions

View file

@ -16,3 +16,16 @@ async def test_basic_openai_responses_api():
print("litellm response=", json.dumps(response, indent=4, default=str))
# validate_responses_api_response()
@pytest.mark.asyncio
async def test_basic_openai_responses_api_streaming():
litellm._turn_on_debug()
response = await litellm.aresponses(
model="gpt-4o",
input="Tell me a three sentence bedtime story about a unicorn.",
stream=True,
)
for event in response:
print("litellm response=", json.dumps(event, indent=4, default=str))