working test_basic_openai_responses_api

This commit is contained in:
Ishaan Jaff 2025-03-11 17:35:43 -07:00
parent b3999b4c75
commit 52b43f672b

View file

@ -1,13 +1,18 @@
import os import os
import sys import sys
import pytest
sys.path.insert(0, os.path.abspath("../..")) sys.path.insert(0, os.path.abspath("../.."))
import litellm import litellm
import json
def test_basic_openai_responses_api(): @pytest.mark.asyncio
response = litellm.responses( async def test_basic_openai_responses_api():
litellm._turn_on_debug()
response = await litellm.aresponses(
model="gpt-4o", input="Tell me a three sentence bedtime story about a unicorn." model="gpt-4o", input="Tell me a three sentence bedtime story about a unicorn."
) )
print("litellm response=", json.dumps(response, indent=4, default=str))
# validate_responses_api_response() # validate_responses_api_response()