Skip to content

Commit a376b20

Browse files
committed
remove pydantic ai
1 parent 2d28160 commit a376b20

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

patchwork/common/tools/tool.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
from abc import ABC, abstractmethod
22

3-
from pydantic_ai.tools import RunContext
4-
from pydantic_ai.tools import Tool as PydanticTool
5-
from pydantic_ai.tools import ToolDefinition
63
from typing_extensions import Type
74

85

@@ -46,12 +43,3 @@ def get_description(tooling: "Tool") -> str:
4643
@staticmethod
4744
def get_parameters(tooling: "Tool") -> str:
4845
return ", ".join(tooling.json_schema.get("required", []))
49-
50-
def to_pydantic_ai_function_tool(self) -> PydanticTool[None]:
51-
async def _prep(ctx: RunContext[None], tool_def: ToolDefinition) -> ToolDefinition:
52-
tool_def.parameters_json_schema = self.json_schema.get("input_schema", {})
53-
return tool_def
54-
55-
return PydanticTool(
56-
self.execute, prepare=_prep, name=self.name, description=self.json_schema.get("description", "")
57-
)

0 commit comments

Comments
 (0)