From 48b6850df43d8bf6f74f72845f85188a0e2e153a Mon Sep 17 00:00:00 2001 From: balalo Date: Tue, 18 Mar 2025 20:45:31 +0100 Subject: [PATCH] allow other function names --- src/pipecat/frames/frames.py | 2 +- src/pipecat/processors/aggregators/llm_response.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pipecat/frames/frames.py b/src/pipecat/frames/frames.py index 7b07a331e..734f0ea6a 100644 --- a/src/pipecat/frames/frames.py +++ b/src/pipecat/frames/frames.py @@ -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"] + tool_choice: Literal["none", "auto", "required"] | str @dataclass diff --git a/src/pipecat/processors/aggregators/llm_response.py b/src/pipecat/processors/aggregators/llm_response.py index 9c18e67ca..44d41f535 100644 --- a/src/pipecat/processors/aggregators/llm_response.py +++ b/src/pipecat/processors/aggregators/llm_response.py @@ -253,7 +253,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"]): + def set_tool_choice(self, tool_choice: Literal["none", "auto", "required"] | str): self._context.set_tool_choice(tool_choice) def reset(self):