mirror of
https://github.com/Jeuners/ECC.git
synced 2026-09-15 01:26:11 +02:00
fix: port LLM provider config and tool schemas
This commit is contained in:
parent
f442bac8c9
commit
7fa1e5b6db
7 changed files with 211 additions and 4 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue