Initialize the prompt evolver. Args: args: Command-line arguments logger: Logger instance config: Configuration dictionary idea_graph: Optional IdeaGraph instance for exploratory prompt selection
(self, args, logger, config=None, idea_graph=None)
| 392 | """ |
| 393 | |
| 394 | def __init__(self, args, logger, config=None, idea_graph=None): |
| 395 | """ |
| 396 | Initialize the prompt evolver. |
| 397 | |
| 398 | Args: |
| 399 | args: Command-line arguments |
| 400 | logger: Logger instance |
| 401 | config: Configuration dictionary |
| 402 | idea_graph: Optional IdeaGraph instance for exploratory prompt selection |
| 403 | """ |
| 404 | self.args = args |
| 405 | self.logger = logger |
| 406 | self.config = config or {} |
| 407 | self.prompt_agent = None |
| 408 | self.model_factory = ModelFactory() |
| 409 | self.agent_factory = AgentFactory() |
| 410 | self.idea_graph = idea_graph |
| 411 | |
| 412 | # Number of parallel prompts to generate for exploration |
| 413 | self.num_candidates = config.get("agents", {}).get("prompt_evolver", {}).get("num_candidates", 3) |
| 414 | |
| 415 | def _initialize_agent(self): |
| 416 | """Initialize the PromptGeneratorAgent using AgentFactory.""" |
nothing calls this directly
no test coverage detected