quantum-ai-v3/social_ads_generator
Claude bfbb7d3515 Fix social ads generator network errors and content extraction
## Issues Fixed
- Added missing status endpoint for polling mechanism
- Fixed content extraction priority to handle ad_copy field and raw_response.output
- Corrected include_emoji field handling (form sends 'yes' not 'on')
- Updated URL patterns to include proper status and result endpoints

## Technical Changes
- Added social_ads_generator_status() view for polling
- Updated content extraction priority: ad_copy_content > content > ad_copy > raw_response.output
- Fixed boolean field handling for include_emoji checkbox
- Consistent with other agents' polling patterns

## URL Updates
- Added /status/<uuid:request_id>/ for polling
- Added /result/<uuid:request_id>/ for results
- Consistent API structure across all agents

## Content Field Priority
Based on actual JSON response showing "output" field:
1. ad_copy_content (primary field)
2. content (fallback)
3. ad_copy (model field)
4. raw_response.output (actual webhook response)
5. formatted_ad (processed content)
6. output_text (legacy field)

## Result
- Social ads generator now properly handles form submission
- Correct content extraction from webhook response
- Consistent polling mechanism with other agents
- No more network errors during ad generation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-14 00:16:01 +05:30
..
migrations Add Job Posting Generator and Social Ads Generator agents 2025-07-10 18:26:41 +05:30
templates/social_ads_generator Fix social ads generator network errors and content extraction 2025-07-14 00:16:01 +05:30
__init__.py Add Job Posting Generator and Social Ads Generator agents 2025-07-10 18:26:41 +05:30
admin.py Add Job Posting Generator and Social Ads Generator agents 2025-07-10 18:26:41 +05:30
apps.py Add Job Posting Generator and Social Ads Generator agents 2025-07-10 18:26:41 +05:30
models.py Add Job Posting Generator and Social Ads Generator agents 2025-07-10 18:26:41 +05:30
processor.py Add Job Posting Generator and Social Ads Generator agents 2025-07-10 18:26:41 +05:30
urls.py Fix social ads generator network errors and content extraction 2025-07-14 00:16:01 +05:30
views.py Fix social ads generator network errors and content extraction 2025-07-14 00:16:01 +05:30