imp part 4
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
# Generated migration for Bria AI integration
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('system', '0011_disable_phase2_modules'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
# Add Bria API key field
|
||||
migrations.AddField(
|
||||
model_name='globalintegrationsettings',
|
||||
name='bria_api_key',
|
||||
field=models.CharField(
|
||||
blank=True,
|
||||
help_text='Platform Bria API key - used by ALL accounts',
|
||||
max_length=500
|
||||
),
|
||||
),
|
||||
# Add Bria model selection field
|
||||
migrations.AddField(
|
||||
model_name='globalintegrationsettings',
|
||||
name='bria_model',
|
||||
field=models.CharField(
|
||||
choices=[
|
||||
('bria-2.3', 'Bria 2.3 - High Quality ($0.015/image)'),
|
||||
('bria-2.3-fast', 'Bria 2.3 Fast - Quick Generation ($0.010/image)'),
|
||||
('bria-2.2', 'Bria 2.2 - Standard ($0.012/image)'),
|
||||
],
|
||||
default='bria-2.3',
|
||||
help_text='Default Bria model (accounts can override if plan allows)',
|
||||
max_length=100
|
||||
),
|
||||
),
|
||||
# Update default_image_service choices to include bria
|
||||
migrations.AlterField(
|
||||
model_name='globalintegrationsettings',
|
||||
name='default_image_service',
|
||||
field=models.CharField(
|
||||
choices=[
|
||||
('openai', 'OpenAI DALL-E'),
|
||||
('runware', 'Runware'),
|
||||
('bria', 'Bria AI'),
|
||||
],
|
||||
default='openai',
|
||||
help_text='Default image generation service for all accounts (openai=DALL-E, runware=Runware, bria=Bria)',
|
||||
max_length=20
|
||||
),
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,64 @@
|
||||
# Generated migration for Anthropic (Claude) integration
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('system', '0012_add_bria_integration'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='globalintegrationsettings',
|
||||
name='anthropic_api_key',
|
||||
field=models.CharField(
|
||||
blank=True,
|
||||
help_text='Platform Anthropic API key - used by ALL accounts',
|
||||
max_length=500
|
||||
),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='globalintegrationsettings',
|
||||
name='anthropic_model',
|
||||
field=models.CharField(
|
||||
choices=[
|
||||
('claude-3-5-sonnet-20241022', 'Claude 3.5 Sonnet (Latest)'),
|
||||
('claude-3-5-haiku-20241022', 'Claude 3.5 Haiku (Fast)'),
|
||||
('claude-3-opus-20240229', 'Claude 3 Opus'),
|
||||
('claude-3-sonnet-20240229', 'Claude 3 Sonnet'),
|
||||
('claude-3-haiku-20240307', 'Claude 3 Haiku'),
|
||||
],
|
||||
default='claude-3-5-sonnet-20241022',
|
||||
help_text='Default Claude model (accounts can override if plan allows)',
|
||||
max_length=100
|
||||
),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='globalintegrationsettings',
|
||||
name='anthropic_temperature',
|
||||
field=models.FloatField(
|
||||
default=0.7,
|
||||
help_text='Default temperature for Claude 0.0-1.0 (accounts can override if plan allows)'
|
||||
),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='globalintegrationsettings',
|
||||
name='anthropic_max_tokens',
|
||||
field=models.IntegerField(
|
||||
default=8192,
|
||||
help_text='Default max tokens for Claude responses (accounts can override if plan allows)'
|
||||
),
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='globalintegrationsettings',
|
||||
name='default_text_provider',
|
||||
field=models.CharField(
|
||||
choices=[('openai', 'OpenAI (GPT)'), ('anthropic', 'Anthropic (Claude)')],
|
||||
default='openai',
|
||||
help_text='Default text generation provider for all accounts (openai=GPT, anthropic=Claude)',
|
||||
max_length=20
|
||||
),
|
||||
),
|
||||
]
|
||||
Reference in New Issue
Block a user