AI MODELS & final updates - feat: Implement AI Model Configuration with dynamic pricing and REST API
- Added AIModelConfig model to manage AI model configurations in the database. - Created serializers and views for AI model configurations, enabling read-only access via REST API. - Implemented filtering capabilities for model type, provider, and default status in the API. - Seeded initial data for text and image models, including pricing and capabilities. - Updated Django Admin interface for managing AI models with enhanced features and bulk actions. - Added validation methods for model and image size checks. - Comprehensive migration created to establish the AIModelConfig model and seed initial data. - Documented implementation and validation results in summary and report files.
This commit is contained in:
@@ -13,6 +13,7 @@ from igny8_core.modules.billing.views import (
|
||||
CreditBalanceViewSet,
|
||||
CreditUsageViewSet,
|
||||
CreditTransactionViewSet,
|
||||
AIModelConfigViewSet,
|
||||
)
|
||||
|
||||
router = DefaultRouter()
|
||||
@@ -21,6 +22,8 @@ router.register(r'admin', BillingViewSet, basename='billing-admin')
|
||||
router.register(r'credits/balance', CreditBalanceViewSet, basename='credit-balance')
|
||||
router.register(r'credits/usage', CreditUsageViewSet, basename='credit-usage')
|
||||
router.register(r'credits/transactions', CreditTransactionViewSet, basename='credit-transactions')
|
||||
# AI Models endpoint
|
||||
router.register(r'ai/models', AIModelConfigViewSet, basename='ai-models')
|
||||
# User-facing billing endpoints
|
||||
router.register(r'invoices', InvoiceViewSet, basename='invoices')
|
||||
router.register(r'payments', PaymentViewSet, basename='payments')
|
||||
|
||||
Reference in New Issue
Block a user