fix(anthropic/chat/transformation.py): fix anthropic header (#6365)

This commit is contained in:
Krish Dholakia 2024-10-22 09:50:47 -07:00 • committed by GitHub
parent fb523b79e9
commit c8d248c824
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -274,9 +274,6 @@ class AnthropicConfig:
## Handle Tool Calling
if "tools" in optional_params:
_is_function_call = True
if "anthropic-beta" not in headers:
# default to v1 of "anthropic-beta"
headers["anthropic-beta"] = "tools-2024-05-16"
anthropic_tools = []
for tool in optional_params["tools"]:
if "input_schema" in tool: # assume in anthropic format