mirror of
https://github.com/BerriAI/litellm.git
synced 2026-08-28 05:25:59 +00:00
[LLM Translation] - Bug fix Anthropic Tool calling (#12959)
* fix _map_tool_helper * fix linting
This commit is contained in:
parent
939f44f398
commit
6174609685
1 changed files with 6 additions and 2 deletions
|
|
@ -198,10 +198,14 @@ class AnthropicConfig(AnthropicModelInfo, BaseConfig):
|
|||
"properties": {},
|
||||
},
|
||||
)
|
||||
input_schema: AnthropicInputSchema = AnthropicInputSchema(**_input_schema)
|
||||
|
||||
_allowed_properties = set(AnthropicInputSchema.__annotations__.keys())
|
||||
input_schema_filtered = {k: v for k, v in _input_schema.items() if k in _allowed_properties}
|
||||
input_anthropic_schema: AnthropicInputSchema = AnthropicInputSchema(**input_schema_filtered)
|
||||
|
||||
_tool = AnthropicMessagesTool(
|
||||
name=tool["function"]["name"],
|
||||
input_schema=input_schema,
|
||||
input_schema=input_anthropic_schema,
|
||||
)
|
||||
|
||||
_description = tool["function"].get("description")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue