Summary
The /summary endpoint defined in the insights router calls service.generate_quick_summary(current_user, db), but this method is completely missing from the InsightsService class, causing requests to return HTTP 500 errors.
Steps to Reproduce
- Run the backend server.
- Authenticate and query the
/insights/summary endpoint.
- Observe that the server returns an HTTP 500 error due to an
AttributeError.
Expected vs Actual
- Expected: The endpoint returns a short, one-liner AI-generated summary of the user's recent activity.
- Actual: The request fails with an
AttributeError: 'InsightsService' object has no attribute 'generate_quick_summary'.
Screenshot
No screenshot available (Backend API route bug).
Suggested Fix
Implement the generate_quick_summary method inside InsightsService in backend/app/services/insights_service.py to query recent database records and invoke Groq/Llama for a quick activity summary.
Summary
The
/summaryendpoint defined in the insights router callsservice.generate_quick_summary(current_user, db), but this method is completely missing from theInsightsServiceclass, causing requests to return HTTP 500 errors.Steps to Reproduce
/insights/summaryendpoint.AttributeError.Expected vs Actual
AttributeError: 'InsightsService' object has no attribute 'generate_quick_summary'.Screenshot
No screenshot available (Backend API route bug).
Suggested Fix
Implement the
generate_quick_summarymethod insideInsightsServiceinbackend/app/services/insights_service.pyto query recent database records and invoke Groq/Llama for a quick activity summary.