Skip to content

markdown_format_llm_bot

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

MarkdownIntel

Bases: BaseIntel

markdown_content instance-attribute

MarkdownFormatLlmBot

Bases: Bot

llm_role = 'Markdown Formater' class-attribute instance-attribute

llm_task = 'Improve the markdown formatting of the content provided to make more logical sense.' class-attribute instance-attribute

llm_guidelines = Prompt().list(['Make sure the relevant heading text is from a heading with mark down formatting.Do not change any of the content only change the formatting as needed.']) class-attribute instance-attribute

llm_intel_class = MarkdownIntel class-attribute instance-attribute

process

Source code in django_spire/knowledge/entry/version/intelligence/bots/markdown_format_llm_bot.py
@recorder_to_html_file('knowledge_markdown_improvement')
def process(self, markdown_content: str) -> str:
    markdown_intel = self.llm.prompt_to_intel(prompt=markdown_content)

    return markdown_intel.markdown_content