mirror of
https://github.com/Jeuners/ECC.git
synced 2026-09-16 10:06: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
|
|
@ -57,6 +57,24 @@ class ToolDefinition:
|
|||
"strict": self.strict,
|
||||
}
|
||||
|
||||
def to_openai_tool(self) -> dict[str, Any]:
|
||||
return {
|
||||
"type": "function",
|
||||
"function": {
|
||||
"name": self.name,
|
||||
"description": self.description,
|
||||
"parameters": self.parameters,
|
||||
"strict": self.strict,
|
||||
},
|
||||
}
|
||||
|
||||
def to_anthropic_tool(self) -> dict[str, Any]:
|
||||
return {
|
||||
"name": self.name,
|
||||
"description": self.description,
|
||||
"input_schema": self.parameters,
|
||||
}
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
class ToolCall:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue