Skip to content

processor_kwargs_bot

dandy.processor.agent.intelligence.bots.processor_kwargs_bot

ProcessorKwargsBot

Bases: Bot

Source code in dandy/processor/bot/bot.py
def __init__(
        self,
        llm_randomize_seed: bool | None = None,
        llm_seed: int | None = None,
        llm_temperature: float | None = None,
        **kwargs
):
    super().__init__(
        **kwargs
    )

    self.llm_config_options.update_values(
        randomize_seed=llm_randomize_seed,
        seed=llm_seed,
        temperature=llm_temperature,
    )

llm_role = 'Useful Response Generator' class-attribute instance-attribute

llm_task = 'Take the given a task and a resource, provide a response that could be best used the resource to complete the task.' class-attribute instance-attribute

process

Source code in dandy/processor/agent/intelligence/bots/processor_kwargs_bot.py
def process(
    self,
    prompt: PromptOrStr,
    processor_kwargs_intel_class: Type[BaseIntel],
    processor_description: str,
) -> BaseIntel:
    return self.llm.prompt_to_intel(
        prompt=(
            Prompt()
            .sub_heading('Task:')
            .prompt(prompt)
            .sub_heading('Resource:')
            .text(processor_description)
        ),
        intel_class=processor_kwargs_intel_class,
    )