(self, intermediate_steps)
| 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 | |
| 99 | class ReactExtraTool(ReactBase): |