Files
crewAI/src/crewai/tools/tool_calling.py
2024-02-12 16:48:14 -08:00

22 lines
679 B
Python

from typing import Any, Dict
from pydantic import BaseModel as PydanticBaseModel
from pydantic import Field as PydanticField
from pydantic.v1 import BaseModel, Field
class ToolCalling(BaseModel):
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 tool."
)
class InstructorToolCalling(PydanticBaseModel):
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 tool."
)