diff --git a/haystack_experimental/components/tools/openai/function_caller.py b/haystack_experimental/components/tools/openai/function_caller.py index 339b8a97..c4d00b72 100644 --- a/haystack_experimental/components/tools/openai/function_caller.py +++ b/haystack_experimental/components/tools/openai/function_caller.py @@ -61,7 +61,8 @@ def from_dict(cls, data: Dict[str, Any]) -> "OpenAIFunctionCaller": available_functions = {} for name, path in available_function_paths.items(): available_functions[name] = deserialize_callable(path) - return cls(available_functions) + data["init_parameters"]["available_functions"] = available_functions + return default_to_dict(cls, data) @component.output_types(function_replies=List[ChatMessage], assistant_replies=List[ChatMessage]) def run(self, messages: List[ChatMessage]):