diff --git a/vision_agent/agent/vision_agent_coder.py b/vision_agent/agent/vision_agent_coder.py index 97a522a1..05155a2e 100644 --- a/vision_agent/agent/vision_agent_coder.py +++ b/vision_agent/agent/vision_agent_coder.py @@ -678,7 +678,7 @@ def chat_with_workflow( chat: List[Message], test_multi_plan: bool = True, display_visualization: bool = False, - customized_tool_names: List[str] = [], + customized_tool_names: List[str] = None, ) -> Dict[str, Any]: """Chat with VisionAgentCoder and return intermediate information regarding the task. @@ -763,7 +763,6 @@ def chat_with_workflow( _LOGGER.info( f"\n{tabulate(tabular_data=p_fixed, headers='keys', tablefmt='mixed_grid', maxcolwidths=_MAX_TABULATE_COL_WIDTH)}" ) - tool_infos = retrieve_tools( plans, self.tool_recommender, diff --git a/vision_agent/tools/tool_utils.py b/vision_agent/tools/tool_utils.py index 1794147e..5573c5be 100644 --- a/vision_agent/tools/tool_utils.py +++ b/vision_agent/tools/tool_utils.py @@ -143,12 +143,14 @@ def get_tool_descriptions(funcs: List[Callable[..., Any]]) -> str: def get_tool_descriptions_by_names( - tool_name: List[str], + tool_name: List[str] | None, funcs: List[Callable[..., Any]], util_funcs: List[ Callable[..., Any] ], # util_funcs will always be added to the list of functions ) -> str: + if tool_name is None: + return get_tool_descriptions(funcs + util_funcs) invalid_names = [ name for name in tool_name if name not in {func.__name__ for func in funcs}