(self)
| 149 | self.candidate_nodes.extend(current_node.children) |
| 150 | |
| 151 | def get_steps(self): |
| 152 | final_answer_states = [] |
| 153 | for cur_node in self.final_answer_nodes: |
| 154 | states = { |
| 155 | "question": self.question, |
| 156 | "ground_truth": self.ground_truth, |
| 157 | "value": cur_node.value, |
| 158 | "final_answer": cur_node.state["final_answer"], |
| 159 | "solution": self.collect_partial_solution(cur_node), |
| 160 | "tag": cur_node.tag, |
| 161 | } |
| 162 | final_answer_states.append(states) |
| 163 | |
| 164 | solutions = sorted(final_answer_states, key=lambda x: x['value'], reverse=True) |
| 165 | return solutions |
| 166 | |
| 167 | def return_states(self) -> Dict[str, Union[Any, Dict[str, str]]]: |
| 168 | candidates = [self.root] |
no test coverage detected