(self, system_prompt: str, client, model: str, request_config: dict = None, request_id: str = None)
| 7 | |
| 8 | class PlanSearch: |
| 9 | def __init__(self, system_prompt: str, client, model: str, request_config: dict = None, request_id: str = None): |
| 10 | self.system_prompt = system_prompt |
| 11 | self.client = client |
| 12 | self.model = model |
| 13 | self.request_id = request_id |
| 14 | self.plansearch_completion_tokens = 0 |
| 15 | |
| 16 | # Extract max_tokens from request_config with default |
| 17 | self.max_tokens = 4096 |
| 18 | if request_config: |
| 19 | self.max_tokens = request_config.get('max_tokens', self.max_tokens) |
| 20 | |
| 21 | def generate_observations(self, problem: str, num_observations: int = 3) -> List[str]: |
| 22 | prompt = f"""You are an expert Python programmer. You will be given a competitive programming question |
nothing calls this directly
no outgoing calls
no test coverage detected