MCPcopy Create free account
hub / github.com/algorithmicsuperintelligence/optillm / __init__

Method __init__

optillm/plansearch.py:9–19  ·  view source on GitHub ↗
(self, system_prompt: str, client, model: str, request_config: dict = None, request_id: str = None)

Source from the content-addressed store, hash-verified

7
8class 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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected