Skip to content

Class peagen.plugins.mutators.default_mutator.DefaultMutator

peagen.plugins.mutators.default_mutator.DefaultMutator

DefaultMutator(agent_env=None)

Minimal mutator that forwards prompts to an external agent.

Source code in peagen/plugins/mutators/default_mutator.py
11
12
def __init__(self, agent_env: Dict[str, str] | None = None) -> None:
    self.agent_env = agent_env or {}

agent_env instance-attribute

agent_env = agent_env or {}

mutate

mutate(prompt)
Source code in peagen/plugins/mutators/default_mutator.py
14
15
def mutate(self, prompt: str) -> str:
    return call_external_agent(prompt, self.agent_env)