mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
undo test_anthropic_websearch change
This commit is contained in:
parent
290e608818
commit
b18cef300a
1 changed files with 2 additions and 9 deletions
|
|
@ -1266,18 +1266,11 @@ def test_anthropic_websearch(optional_params: dict):
|
|||
response = litellm.completion(**params)
|
||||
except litellm.InternalServerError as e:
|
||||
print(e)
|
||||
pytest.skip(f"API error: {e}")
|
||||
|
||||
assert response is not None
|
||||
|
||||
print(f"response: {response}\n")
|
||||
|
||||
# Check if web search was used
|
||||
if hasattr(response.usage, "server_tool_use") and response.usage.server_tool_use is not None:
|
||||
assert response.usage.server_tool_use.web_search_requests >= 1
|
||||
else:
|
||||
# Web search may not always be triggered depending on the query
|
||||
# Just verify the response was successful
|
||||
assert response.choices[0].message.content is not None
|
||||
assert response.usage.server_tool_use.web_search_requests == 1
|
||||
|
||||
|
||||
def test_anthropic_text_editor():
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue