imp part 4
This commit is contained in:
@@ -186,8 +186,146 @@ def seed_ai_models(apps, schema_editor):
|
||||
},
|
||||
]
|
||||
|
||||
# Bria AI Image Models
|
||||
bria_models = [
|
||||
{
|
||||
'model_name': 'bria-2.3',
|
||||
'display_name': 'Bria 2.3 High Quality',
|
||||
'model_type': 'image',
|
||||
'provider': 'bria',
|
||||
'cost_per_image': Decimal('0.015'),
|
||||
'valid_sizes': ['512x512', '768x768', '1024x1024', '1024x1792', '1792x1024'],
|
||||
'supports_json_mode': False,
|
||||
'supports_vision': False,
|
||||
'supports_function_calling': False,
|
||||
'is_active': True,
|
||||
'is_default': False,
|
||||
'sort_order': 11,
|
||||
'description': 'Bria 2.3 - High quality image generation',
|
||||
},
|
||||
{
|
||||
'model_name': 'bria-2.3-fast',
|
||||
'display_name': 'Bria 2.3 Fast',
|
||||
'model_type': 'image',
|
||||
'provider': 'bria',
|
||||
'cost_per_image': Decimal('0.010'),
|
||||
'valid_sizes': ['512x512', '768x768', '1024x1024'],
|
||||
'supports_json_mode': False,
|
||||
'supports_vision': False,
|
||||
'supports_function_calling': False,
|
||||
'is_active': True,
|
||||
'is_default': False,
|
||||
'sort_order': 12,
|
||||
'description': 'Bria 2.3 Fast - Quick generation, lower cost',
|
||||
},
|
||||
{
|
||||
'model_name': 'bria-2.2',
|
||||
'display_name': 'Bria 2.2 Standard',
|
||||
'model_type': 'image',
|
||||
'provider': 'bria',
|
||||
'cost_per_image': Decimal('0.012'),
|
||||
'valid_sizes': ['512x512', '768x768', '1024x1024'],
|
||||
'supports_json_mode': False,
|
||||
'supports_vision': False,
|
||||
'supports_function_calling': False,
|
||||
'is_active': True,
|
||||
'is_default': False,
|
||||
'sort_order': 13,
|
||||
'description': 'Bria 2.2 - Standard image generation',
|
||||
},
|
||||
]
|
||||
|
||||
# Anthropic Claude Text Models
|
||||
anthropic_models = [
|
||||
{
|
||||
'model_name': 'claude-3-5-sonnet-20241022',
|
||||
'display_name': 'Claude 3.5 Sonnet (Latest)',
|
||||
'model_type': 'text',
|
||||
'provider': 'anthropic',
|
||||
'input_cost_per_1m': Decimal('3.00'),
|
||||
'output_cost_per_1m': Decimal('15.00'),
|
||||
'context_window': 200000,
|
||||
'max_output_tokens': 8192,
|
||||
'supports_json_mode': True,
|
||||
'supports_vision': True,
|
||||
'supports_function_calling': True,
|
||||
'is_active': True,
|
||||
'is_default': False,
|
||||
'sort_order': 20,
|
||||
'description': 'Claude 3.5 Sonnet - Best for most tasks, excellent reasoning',
|
||||
},
|
||||
{
|
||||
'model_name': 'claude-3-5-haiku-20241022',
|
||||
'display_name': 'Claude 3.5 Haiku (Fast)',
|
||||
'model_type': 'text',
|
||||
'provider': 'anthropic',
|
||||
'input_cost_per_1m': Decimal('1.00'),
|
||||
'output_cost_per_1m': Decimal('5.00'),
|
||||
'context_window': 200000,
|
||||
'max_output_tokens': 8192,
|
||||
'supports_json_mode': True,
|
||||
'supports_vision': True,
|
||||
'supports_function_calling': True,
|
||||
'is_active': True,
|
||||
'is_default': False,
|
||||
'sort_order': 21,
|
||||
'description': 'Claude 3.5 Haiku - Fast and affordable',
|
||||
},
|
||||
{
|
||||
'model_name': 'claude-3-opus-20240229',
|
||||
'display_name': 'Claude 3 Opus',
|
||||
'model_type': 'text',
|
||||
'provider': 'anthropic',
|
||||
'input_cost_per_1m': Decimal('15.00'),
|
||||
'output_cost_per_1m': Decimal('75.00'),
|
||||
'context_window': 200000,
|
||||
'max_output_tokens': 4096,
|
||||
'supports_json_mode': True,
|
||||
'supports_vision': True,
|
||||
'supports_function_calling': True,
|
||||
'is_active': True,
|
||||
'is_default': False,
|
||||
'sort_order': 22,
|
||||
'description': 'Claude 3 Opus - Most capable Claude model',
|
||||
},
|
||||
{
|
||||
'model_name': 'claude-3-sonnet-20240229',
|
||||
'display_name': 'Claude 3 Sonnet',
|
||||
'model_type': 'text',
|
||||
'provider': 'anthropic',
|
||||
'input_cost_per_1m': Decimal('3.00'),
|
||||
'output_cost_per_1m': Decimal('15.00'),
|
||||
'context_window': 200000,
|
||||
'max_output_tokens': 4096,
|
||||
'supports_json_mode': True,
|
||||
'supports_vision': True,
|
||||
'supports_function_calling': True,
|
||||
'is_active': True,
|
||||
'is_default': False,
|
||||
'sort_order': 23,
|
||||
'description': 'Claude 3 Sonnet - Balanced performance and cost',
|
||||
},
|
||||
{
|
||||
'model_name': 'claude-3-haiku-20240307',
|
||||
'display_name': 'Claude 3 Haiku',
|
||||
'model_type': 'text',
|
||||
'provider': 'anthropic',
|
||||
'input_cost_per_1m': Decimal('0.25'),
|
||||
'output_cost_per_1m': Decimal('1.25'),
|
||||
'context_window': 200000,
|
||||
'max_output_tokens': 4096,
|
||||
'supports_json_mode': True,
|
||||
'supports_vision': True,
|
||||
'supports_function_calling': True,
|
||||
'is_active': True,
|
||||
'is_default': False,
|
||||
'sort_order': 24,
|
||||
'description': 'Claude 3 Haiku - Most affordable Claude model',
|
||||
},
|
||||
]
|
||||
|
||||
# Create all models
|
||||
all_models = text_models + image_models + runware_models
|
||||
all_models = text_models + image_models + runware_models + bria_models + anthropic_models
|
||||
|
||||
for model_data in all_models:
|
||||
AIModelConfig.objects.update_or_create(
|
||||
@@ -202,7 +340,10 @@ def reverse_migration(apps, schema_editor):
|
||||
seeded_models = [
|
||||
'gpt-4.1', 'gpt-4o-mini', 'gpt-4o', 'gpt-5.1', 'gpt-5.2',
|
||||
'dall-e-3', 'dall-e-2', 'gpt-image-1', 'gpt-image-1-mini',
|
||||
'runware:100@1'
|
||||
'runware:100@1',
|
||||
'bria-2.3', 'bria-2.3-fast', 'bria-2.2',
|
||||
'claude-3-5-sonnet-20241022', 'claude-3-5-haiku-20241022',
|
||||
'claude-3-opus-20240229', 'claude-3-sonnet-20240229', 'claude-3-haiku-20240307'
|
||||
]
|
||||
AIModelConfig.objects.filter(model_name__in=seeded_models).delete()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user