Skip to content

answer_transfer_bot

dandy.processor.agent.intelligence.bots.answer_transfer_bot

AnswerTransferBot

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 = 'Answer Transfer Bot' class-attribute instance-attribute

llm_task = 'Fill out the actual result to this task using the answer provided.' class-attribute instance-attribute

llm_guidelines = Prompt().list(['This answer does not need to be validated.']) class-attribute instance-attribute

process

Source code in dandy/processor/agent/intelligence/bots/answer_transfer_bot.py
def process(
    self,
    answer_intel: BaseIntel,
    task_prompt: Prompt,
    task_intel: BaseIntel,
    include_fields: IncEx,
    exclude_fields: IncEx,
) -> BaseIntel:
    return self.llm.prompt_to_intel(
        prompt=(
            Prompt()
            .sub_heading('Task:')
            .prompt(task_prompt)
            .line_break()
            .sub_heading('Answer:')
            .intel(answer_intel)
        ),
        intel_object=task_intel,
        include_fields=include_fields,
        exclude_fields=exclude_fields,
    )