mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-06 18:23:07 +00:00
fix(anthropic.py): bump default anthropic api version for tool use
This commit is contained in:
@@ -232,7 +232,6 @@ response = completion(
|
||||
model="anthropic/claude-3-opus-20240229",
|
||||
messages=messages,
|
||||
tools=tools,
|
||||
extra_headers={"anthropic-beta": "tools-2024-05-16"},
|
||||
)
|
||||
```
|
||||
|
||||
@@ -247,7 +246,6 @@ response = completion(
|
||||
messages=messages,
|
||||
tools=tools,
|
||||
tool_choice={"type": "tool", "name": "get_weather"},
|
||||
extra_headers={"anthropic-beta": "tools-2024-05-16"},
|
||||
)
|
||||
```
|
||||
|
||||
|
||||
@@ -507,7 +507,7 @@ class AnthropicChatCompletion(BaseLLM):
|
||||
_is_function_call = True
|
||||
if "anthropic-beta" not in headers:
|
||||
# default to v1 of "anthropic-beta"
|
||||
headers["anthropic-beta"] = "tools-2024-04-04"
|
||||
headers["anthropic-beta"] = "tools-2024-05-16"
|
||||
|
||||
anthropic_tools = []
|
||||
for tool in optional_params["tools"]:
|
||||
|
||||
Reference in New Issue
Block a user