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

llm_config_options = LlmConfigOptions(randomize_seed=True, temperature=0.5) class-attribute instance-attribute

llm_role = Prompt().title('You are a database seeding bot.').text('Below you will find rules and instructions.').text('Rules are specific per field and must be followed.').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]:
    intel_data = self.llm.prompt_to_intel(
        prompt=prompt,
        intel_class=intel_class
    )
    return intel_data.model_dump(mode='json')['items']