Skip to content

bots

django_spire.ai.prompt.bots

DandyPythonPromptBot

Bases: BaseLlmBot

instructions_prompt = prompts.dandy_prompt_python_file_instruction_bot_prompt() class-attribute instance-attribute

intel_class = intel.DandyPromptPythonFileIntel class-attribute instance-attribute

process classmethod

Takes in an enhanced prompt and turn it into a python file that uses the dandy library.

Source code in django_spire/ai/prompt/bots.py
@classmethod
def process(
        cls,
        prompt: str,

) -> intel.DandyPromptPythonFileIntel:
    """
        Takes in an enhanced prompt and turn it into a python file that uses the dandy library.
    """
    return cls.process_prompt_to_intel(
        prompt=prompts.dandy_prompt_python_file_input_prompt(prompt)
    )

TextToMarkdownPromptBot

Bases: BaseLlmBot

instructions_prompt = prompts.text_to_markdown_instruction_bot_prompt() class-attribute instance-attribute

intel_class = intel.TextToMarkdownIntel class-attribute instance-attribute

process classmethod

Takes in user text and converts it to properly formatted Markdown.

Source code in django_spire/ai/prompt/bots.py
@classmethod
def process(
        cls,
        text: str,

) -> intel.TextToMarkdownIntel:
    """
        Takes in user text and converts it to properly formatted Markdown.
    """
    return cls.process_prompt_to_intel(
        prompt=prompts.text_to_markdown_input_prompt(text)
    )