mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
test open ai web search
This commit is contained in:
parent
dc5bf10009
commit
3764aa1729
1 changed files with 14 additions and 0 deletions
|
@ -391,3 +391,17 @@ def test_openai_chat_completion_streaming_handler_reasoning_content():
|
||||||
)
|
)
|
||||||
|
|
||||||
assert response.choices[0].delta.reasoning_content == "."
|
assert response.choices[0].delta.reasoning_content == "."
|
||||||
|
|
||||||
|
|
||||||
|
def test_openai_web_search():
|
||||||
|
# litellm._turn_on_debug()
|
||||||
|
response = litellm.completion(
|
||||||
|
model="openai/gpt-4o-search-preview",
|
||||||
|
messages=[
|
||||||
|
{
|
||||||
|
"role": "user",
|
||||||
|
"content": "What was a positive news story from today?",
|
||||||
|
}
|
||||||
|
],
|
||||||
|
)
|
||||||
|
print("litellm response: ", response.model_dump_json(indent=4))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue