feat(feedback): Add content improvement feedback system

Frontend (frontend/app.js):

- Add textarea for improvement feedback

- Add submit button with loading state

- Handle API response and display improved content

Backend (backend/copywriter.py):

- Add improve_copy() method using Cohere API

- Integrate retry mechanism for API calls

Backend (backend/main.py):

- Add /improve-content POST endpoint

- Implement error handling and return improved content with metadata

Testing:

- Verified feedback submission flow

- Confirmed improved content generation

- Tested error scenarios and loading states
This commit is contained in:
Michael Ikehi
2025-04-18 04:42:26 +01:00
parent af8f99dea3
commit cc2b230f62
12 changed files with 178 additions and 2 deletions
@@ -0,0 +1,16 @@
{
"content": "For Immediate Release\n\nBusiness Evolution Program Launches New Cohort, Helping Entrepreneurs Scale Their Impact\n\n[City, State] - The Business Evolution Program, a leading business transformation initiative, announces the launch of its Q1 2024 cohort, continuing its mission to help established entrepreneurs scale their impact and success.\n\nThe program, known for its comprehensive approach to business transformation, has helped over 250 businesses achieve an average revenue growth of 127% within 90 days while reducing operational complexity.\n\n\"We're seeing a significant shift in how entrepreneurs approach business growth,\" says [Founder Name], creator of the Business Evolution Program. \"Our framework addresses the growing need for sustainable, systematic business success.\"\n\nThe Q1 2024 cohort will feature:\n• Enhanced Strategic Clarity Blueprint\n• Expanded Implementation Support\n• New Growth Tools Suite\n• Exclusive Network Access\n\nLimited to 15 participants, the program maintains its commitment to personalized attention and proven results.\n\nFor more information, visit [website] or contact:\n[Contact Information]\n\n###",
"content_type": "press_release",
"metadata": {
"campaign_name": "Q1 Launch PR",
"performance_metrics": {
"media_pickups": 12,
"reach": 50000,
"engagement_rate": 0.08
},
"added_at": "2024-01-01T00:00:00Z",
"training_data": true
},
"document_id": 11,
"timestamp": "2024-01-01T00:00:00Z"
}