Skip to content

Commit

Permalink
Update haystack_experimental/components/tools/openai/function_caller.py
Browse files Browse the repository at this point in the history
Co-authored-by: Massimiliano Pippi <[email protected]>
  • Loading branch information
TuanaCelik and masci authored Jun 18, 2024
1 parent 2b5fd75 commit 1f703e9
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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]):
Expand Down

0 comments on commit 1f703e9

Please sign in to comment.