bug fixing

This commit is contained in:
João Moura
2024-02-20 10:40:16 -03:00
parent e24f4867df
commit 8f5d735b2f
6 changed files with 38 additions and 36 deletions

View File

@@ -1,4 +1,4 @@
from typing import Any, Dict
from typing import Any, Dict, Optional
from pydantic import BaseModel as PydanticBaseModel
from pydantic import Field as PydanticField
@@ -7,7 +7,7 @@ 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(
arguments: Optional[Dict[str, Any]] = Field(
..., description="A dictinary of arguments to be passed to the tool."
)
@@ -16,6 +16,6 @@ class InstructorToolCalling(PydanticBaseModel):
tool_name: str = PydanticField(
..., description="The name of the tool to be called."
)
arguments: Dict = PydanticField(
arguments: Optional[Dict[str, Any]] = PydanticField(
..., description="A dictinary of arguments to be passed to the tool."
)