fix(anthropic.py): bump default anthropic api version for tool use

This commit is contained in:
Krrish Dholakia
2024-05-17 00:41:11 -07:00
parent d9ce94ae23
commit 32a04c59cf
2 changed files with 1 additions and 3 deletions
@@ -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"},
)
```
+1 -1
View File
@@ -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"]: