Skip to content

field_seeding_bots

django_spire.contrib.seeding.intelligence.bots.field_seeding_bots

LlmFieldSeedingBot

Bases: Bot

llm_config = 'SEEDING_LLM_BOT' class-attribute instance-attribute

role = 'An expert at generating data and following specifications.' class-attribute instance-attribute

task = 'Create seed data for a software application.' class-attribute instance-attribute

guidelines = Prompt().text('ALL FIELDS ARE REQUIRED TO HAVE DATA.').text('Instructions have context behind the meaning of the data and how it should be created.').text(f'Today's date is {localdate().strftime('%Y-%m-%d')} use this in context for generating dates and datetimes') class-attribute instance-attribute

process

Source code in django_spire/contrib/seeding/intelligence/bots/field_seeding_bots.py
def process(self, prompt: Prompt, intel_class) -> list[dict]:
    self.llm.options.temperature = 0.5

    intel_data = self.llm.prompt_to_intel(
        prompt=prompt,
        intel_class=intel_class
    )
    return intel_data.model_dump(mode='json')['items']