renaming function for tools

This commit is contained in:
João Moura
2024-02-12 16:48:14 -08:00
parent e97d1a0cf8
commit 76b17a8d04
3 changed files with 32 additions and 22 deletions

View File

@@ -6,18 +6,16 @@ from pydantic.v1 import BaseModel, Field
class ToolCalling(BaseModel):
function_name: str = Field(
..., description="The name of the function to be called."
)
tool_name: str = Field(..., description="The name of the tool to be called.")
arguments: Dict[str, Any] = Field(
..., description="A dictinary of arguments to be passed to the function."
..., description="A dictinary of arguments to be passed to the tool."
)
class InstructorToolCalling(PydanticBaseModel):
function_name: str = PydanticField(
..., description="The name of the function to be called."
tool_name: str = PydanticField(
..., description="The name of the tool to be called."
)
arguments: Dict = PydanticField(
..., description="A dictinary of arguments to be passed to the function."
..., description="A dictinary of arguments to be passed to the tool."
)