Skip to content

Commit

Permalink
feat: log more tools info back to client (#101)
Browse files Browse the repository at this point in the history
* feat: log more tools info back to client

* fix lint
  • Loading branch information
wuyiqunLu authored May 30, 2024
1 parent 93c365d commit a4b6539
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vision_agent/agent/vision_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,15 +264,19 @@ def retrieve_tools(
)
tool_info = []
tool_desc = []
tool_list: List[Dict[str, str]] = []
for task in plan:
tools = tool_recommender.top_k(task["instructions"], k=2, thresh=0.3)
tool_info.extend([e["doc"] for e in tools])
tool_desc.extend([e["desc"] for e in tools])
tool_list.extend(
{"description": e["desc"], "documentation": e["doc"]} for e in tools
)
log_progress(
{
"type": "tools",
"status": "completed",
"payload": tools,
"payload": tool_list,
}
)
if verbosity == 2:
Expand Down

0 comments on commit a4b6539

Please sign in to comment.