Skip to content

processor_kwargs_bot

dandy.processor.agent.intelligence.bots.processor_kwargs_bot

ProcessorKwargsBot

Bases: Bot

Source code in dandy/processor/processor.py
def __init__(self, **kwargs):
    super().__init__()

    self._recorder_event_id = ''

    for key, value in kwargs.items():
        setattr(self, key, value)

    self.__post_init__()

llm_role = 'You are a bot that is given a task and a processor, provide a response that best uses the processor 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,
    )