mirror of
https://github.com/thecyberlearn/quantum-ai-v3.git
synced 2026-08-18 11:52:57 +00:00
- Create complete REST API-based agents system for scalability - Implement Social Ads Generator with dynamic form rendering - Add agents marketplace with search and category filtering - Build real-time wallet balance updates after execution - Fix URL routing conflicts and API endpoint issues - Add comprehensive N8N webhook integration with proper payload format - Create dynamic template system for 100+ agent scalability Features: - Database-driven agent management via Django admin - JSON schema-based dynamic form generation - Real-time wallet balance deduction and display updates - Comprehensive error handling and validation - Mobile-responsive marketplace UI - Complete API endpoints for frontend integration 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
28 lines
932 B
Python
28 lines
932 B
Python
from rest_framework import serializers
|
|
from .models import Agent, AgentCategory, AgentExecution
|
|
|
|
class AgentCategorySerializer(serializers.ModelSerializer):
|
|
class Meta:
|
|
model = AgentCategory
|
|
fields = ['id', 'name', 'slug', 'description', 'icon']
|
|
|
|
class AgentSerializer(serializers.ModelSerializer):
|
|
category = AgentCategorySerializer(read_only=True)
|
|
|
|
class Meta:
|
|
model = Agent
|
|
fields = [
|
|
'id', 'name', 'slug', 'short_description', 'description',
|
|
'category', 'price', 'form_schema', 'created_at'
|
|
]
|
|
|
|
class AgentExecutionSerializer(serializers.ModelSerializer):
|
|
agent = AgentSerializer(read_only=True)
|
|
|
|
class Meta:
|
|
model = AgentExecution
|
|
fields = [
|
|
'id', 'agent', 'input_data', 'output_data', 'status',
|
|
'fee_charged', 'error_message', 'execution_time',
|
|
'created_at', 'completed_at'
|
|
] |