| 203 | return natural_language_solution, python_implementation |
| 204 | |
| 205 | def solve_multiple(self, problem: str, n: int, num_initial_observations: int = 3, num_derived_observations: int = 2) -> List[str]: |
| 206 | solutions = [] |
| 207 | for _ in range(n): |
| 208 | _, python_implementation = self.solve(problem, num_initial_observations, num_derived_observations) |
| 209 | solutions.append(python_implementation) |
| 210 | return solutions |
| 211 | |
| 212 | def plansearch(system_prompt: str, initial_query: str, client, model: str, n: int = 1, request_config: dict = None, request_id: str = None) -> List[str]: |
| 213 | planner = PlanSearch(system_prompt, client, model, request_config=request_config, request_id=request_id) |