Skip to content

Commit

Permalink
None
Browse files Browse the repository at this point in the history
  • Loading branch information
MingruiZhang committed Aug 27, 2024
1 parent ae841ca commit 3877316
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions vision_agent/agent/vision_agent_coder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 3 additions & 1 deletion vision_agent/tools/tool_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit 3877316

Please sign in to comment.