refactor: Update ToolCallingAgentComponent input_dict type to use Dict[str, str] for values

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-06-24 09:39:38 -03:00
commit 47940c8aa5

View file

@ -87,7 +87,7 @@ class ToolCallingAgentComponent(Component):
verbose=True, verbose=True,
handle_parsing_errors=self.handle_parsing_errors, handle_parsing_errors=self.handle_parsing_errors,
) )
input_dict: dict[str, str | list[BaseMessage]] = {"input": self.input_value} input_dict: dict[str, str | list[Dict[str, str]]] = {"input": self.input_value}
if hasattr(self, "memory") and self.memory: if hasattr(self, "memory") and self.memory:
input_dict["chat_history"] = self.convert_chat_history(self.memory) input_dict["chat_history"] = self.convert_chat_history(self.memory)
result = await runnable.ainvoke(input_dict) result = await runnable.ainvoke(input_dict)