quantum-ai-v2/weather_reporter/models.py
Claude 1aac14f44b Implement individual agent architecture with simplified template structure
- Replace legacy agents system with modular individual agent apps
- Add agent_base framework for BaseAgent, processors, and management commands
- Create weather_reporter as example individual agent with API integration
- Implement simplified template structure: agent_name/templates/detail.html
- Fix marketplace to display actual agents instead of placeholder
- Add proper authentication flow with login redirect for agent access
- Organize project structure: move tests to tests/, docs to docs/
- Update all documentation to reflect new simplified architecture
- Fix URL namespace issues throughout templates and views

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-10 09:01:11 +05:30

27 lines
1.2 KiB
Python

from django.db import models
from agent_base.models import BaseAgentRequest, BaseAgentResponse
class WeatherReporterRequest(BaseAgentRequest):
"""Request model for Weather Reporter agent"""
location = models.CharField(max_length=200)
report_type = models.CharField(max_length=50, choices=[('current', 'Current Weather'), ('detailed', 'Detailed Report')], default='current')
def __str__(self):
return f"Weather Reporter Request - {self.user.email} - {self.created_at}"
class WeatherReporterResponse(BaseAgentResponse):
"""Response model for Weather Reporter agent"""
request = models.OneToOneField(WeatherReporterRequest, on_delete=models.CASCADE, related_name='response')
weather_data = models.JSONField(default=dict, blank=True)
temperature = models.DecimalField(max_digits=5, decimal_places=2, null=True, blank=True)
description = models.CharField(max_length=200, blank=True)
humidity = models.IntegerField(null=True, blank=True)
wind_speed = models.DecimalField(max_digits=5, decimal_places=2, null=True, blank=True)
formatted_report = models.TextField(blank=True)
def __str__(self):
return f"Weather Reporter Response - {self.request.user.email} - {self.created_at}"