Skip to content

markdown_format_llm_bot

django_spire.knowledge.entry.version.intelligence.bots.markdown_format_llm_bot

MarkdownFormatLlmBot

Bases: BaseLlmBot

process classmethod

Source code in django_spire/knowledge/entry/version/intelligence/bots/markdown_format_llm_bot.py
@classmethod
def process(
        cls,
        markdown_content: str
) -> str:
    markdown_prompt = Prompt()
    markdown_prompt.text(
        'Can you improve the markdown formatting? Do NOT add or change any of the '
        'content.'
    )
    markdown_prompt.line_break()
    markdown_prompt.text(markdown_content)

    return cls.process_prompt_to_intel(prompt=markdown_prompt).text