Coverage for apps / ai / migrations / 0001_initial.py: 100%

5 statements  

« prev     ^ index     » next       coverage.py v7.13.1, created at 2026-01-11 00:40 +0000

1# Generated by Django 5.2.10 on 2026-01-08 16:54 

2 

3from django.db import migrations, models 

4 

5 

6class Migration(migrations.Migration): 

7 

8 initial = True 

9 

10 dependencies = [ 

11 ] 

12 

13 operations = [ 

14 migrations.CreateModel( 

15 name='AIPrompt', 

16 fields=[ 

17 ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 

18 ('prompt_type', models.CharField(choices=[('recipe_remix', 'Recipe Remix'), ('serving_adjustment', 'Serving Adjustment'), ('tips_generation', 'Tips Generation'), ('discover_favorites', 'Discover from Favorites'), ('discover_seasonal', 'Discover Seasonal/Holiday'), ('discover_new', 'Discover Try Something New'), ('search_ranking', 'Search Result Ranking'), ('timer_naming', 'Timer Naming'), ('remix_suggestions', 'Remix Suggestions'), ('selector_repair', 'CSS Selector Repair')], help_text='Unique identifier for this prompt type', max_length=50, unique=True)), 

19 ('name', models.CharField(help_text='Human-readable name for this prompt', max_length=100)), 

20 ('description', models.TextField(blank=True, help_text='Description of what this prompt does')), 

21 ('system_prompt', models.TextField(help_text='System message sent to the AI model')), 

22 ('user_prompt_template', models.TextField(help_text='User message template with {placeholders} for variable substitution')), 

23 ('model', models.CharField(choices=[('anthropic/claude-3.5-haiku', 'Claude 3.5 Haiku (Fast)'), ('anthropic/claude-sonnet-4', 'Claude Sonnet 4'), ('anthropic/claude-opus-4', 'Claude Opus 4'), ('anthropic/claude-opus-4.5', 'Claude Opus 4.5'), ('openai/gpt-4o', 'GPT-4o'), ('openai/gpt-4o-mini', 'GPT-4o Mini (Fast)'), ('openai/gpt-5-mini', 'GPT-5 Mini'), ('openai/o3-mini', 'o3 Mini (Reasoning)'), ('google/gemini-2.5-pro-preview', 'Gemini 2.5 Pro'), ('google/gemini-2.5-flash-preview', 'Gemini 2.5 Flash (Fast)')], default='anthropic/claude-3.5-haiku', help_text='AI model to use for this prompt', max_length=100)), 

24 ('is_active', models.BooleanField(default=True, help_text='Whether this prompt is enabled')), 

25 ('created_at', models.DateTimeField(auto_now_add=True)), 

26 ('updated_at', models.DateTimeField(auto_now=True)), 

27 ], 

28 options={ 

29 'verbose_name': 'AI Prompt', 

30 'verbose_name_plural': 'AI Prompts', 

31 'ordering': ['prompt_type'], 

32 }, 

33 ), 

34 ] 

← Back to Dashboard