Fixing the tool choice extra type to be a dict instead of string.

This commit is contained in:
Filipi Fuchter
2025-03-26 08:17:50 -03:00
parent c45d852f6b
commit ce9f75a851
2 changed files with 2 additions and 2 deletions

View File

@@ -367,7 +367,7 @@ class LLMSetToolsFrame(DataFrame):
class LLMSetToolChoiceFrame(DataFrame):
"""A frame containing a tool choice for an LLM to use for function calling."""
tool_choice: Literal["none", "auto", "required"] | str
tool_choice: Literal["none", "auto", "required"] | dict
@dataclass

View File

@@ -210,7 +210,7 @@ class LLMContextResponseAggregator(BaseLLMResponseAggregator):
def set_tools(self, tools: List):
self._context.set_tools(tools)
def set_tool_choice(self, tool_choice: Literal["none", "auto", "required"] | str):
def set_tool_choice(self, tool_choice: Literal["none", "auto", "required"] | dict):
self._context.set_tool_choice(tool_choice)
def reset(self):