From e1a233b537341222709c03987b49f8789a4a93f7 Mon Sep 17 00:00:00 2001 From: Philipp Temminghoff Date: Sat, 23 Nov 2024 01:06:06 +0100 Subject: [PATCH] chore: schema fix --- src/llmling/tools/base.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/llmling/tools/base.py b/src/llmling/tools/base.py index f5d12df..0776992 100644 --- a/src/llmling/tools/base.py +++ b/src/llmling/tools/base.py @@ -21,12 +21,13 @@ class BaseTool(ABC): # Class-level schema definition name: ClassVar[str] description: ClassVar[str] - parameters_schema: ClassVar[dict[str, Any]] @classmethod def get_schema(cls) -> py2openai.OpenAIFunctionTool: """Get the tool's schema for LLM function calling.""" - return py2openai.create_schema(cls.execute).model_dump_openai() + schema = py2openai.create_schema(cls.execute).model_dump_openai() + schema["function"]["name"] = cls.name + return schema @abstractmethod async def execute(self, **params: Any) -> Any | Awaitable[Any]: