Skip to content

intel

django_spire.ai.prompt.system.intel

SystemPromptResultIntel

Bases: BaseIntel

result instance-attribute

SystemPromptIntel

Bases: BaseIntel

role instance-attribute

task instance-attribute

guidelines instance-attribute

output_format instance-attribute

to_markdown

Source code in django_spire/ai/prompt/system/intel.py
def to_markdown(self):
    return TextToMarkdownPromptBot.process(self.to_string())

to_python

Source code in django_spire/ai/prompt/system/intel.py
def to_python(self):
    return DandyPythonPromptBot.process(self.to_string())

to_string

Source code in django_spire/ai/prompt/system/intel.py
def to_string(self):
    prompt = (
        f"Role: {self.role}\n"
        f"Task: {self.task}\n"
        f"Guidelines: {self.guidelines}\n"
    )

    if self.output_format:
        prompt += f"Output Format: {self.output_format}"

    return prompt