mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-05-12 07:37:24 +08:00
fix: port LLM provider config and tool schemas
This commit is contained in:
committed by
Affaan Mustafa
parent
f442bac8c9
commit
7fa1e5b6db
@@ -63,6 +63,37 @@ class TestToolDefinition:
|
||||
assert result["name"] == "search"
|
||||
assert result["strict"] is True
|
||||
|
||||
def test_tool_to_openai_tool(self):
|
||||
tool = ToolDefinition(
|
||||
name="search",
|
||||
description="Search",
|
||||
parameters={"type": "object"},
|
||||
strict=False,
|
||||
)
|
||||
|
||||
assert tool.to_openai_tool() == {
|
||||
"type": "function",
|
||||
"function": {
|
||||
"name": "search",
|
||||
"description": "Search",
|
||||
"parameters": {"type": "object"},
|
||||
"strict": False,
|
||||
},
|
||||
}
|
||||
|
||||
def test_tool_to_anthropic_tool(self):
|
||||
tool = ToolDefinition(
|
||||
name="search",
|
||||
description="Search",
|
||||
parameters={"type": "object"},
|
||||
)
|
||||
|
||||
assert tool.to_anthropic_tool() == {
|
||||
"name": "search",
|
||||
"description": "Search",
|
||||
"input_schema": {"type": "object"},
|
||||
}
|
||||
|
||||
|
||||
class TestToolCall:
|
||||
def test_create_tool_call(self):
|
||||
|
||||
Reference in New Issue
Block a user