MCPcopy Create free account
hub / github.com/THUDM/AgentTuning / _parse_tool

Method _parse_tool

eval_heldout/rewoo/algos/react.py:89–96  ·  view source on GitHub ↗
(self, intermediate_steps)

Source from the content-addressed store, hash-verified

87 self.agent.agent.llm_chain.prompt.template = self.fewshot
88
89 def _parse_tool(self, intermediate_steps):
90 tool_usage = {"search": 0, "lookup": 0}
91 for step in intermediate_steps:
92 if step[0].tool == "Search":
93 tool_usage["search"] += 1
94 if step[0].tool == "Lookup":
95 tool_usage["lookup"] += 1
96 return tool_usage
97
98
99class ReactExtraTool(ReactBase):

Callers 1

runMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected