discourse-ai/app/controllers/discourse_ai/admin
Sam bc0657f478
FEATURE: AI Usage page (#964)
- Added a new admin interface to track AI usage metrics, including tokens, features, and models.
- Introduced a new route `/admin/plugins/discourse-ai/ai-usage` and supporting API endpoint in `AiUsageController`.
- Implemented `AiUsageSerializer` for structuring AI usage data.
- Integrated CSS stylings for charts and tables under `stylesheets/modules/llms/common/usage.scss`.
- Enhanced backend with `AiApiAuditLog` model changes: added `cached_tokens` column  (implemented with OpenAI for now) with relevant DB migration and indexing.
- Created `Report` module for efficient aggregation and filtering of AI usage metrics.
- Updated AI Bot title generation logic to log correctly to user vs bot
- Extended test coverage for the new tracking features, ensuring data consistency and access controls.
2024-11-29 06:26:48 +11:00
..
ai_llms_controller.rb FEATURE: improve visibility of AI usage in LLM page (#845) 2024-10-22 11:16:02 +11:00
ai_personas_controller.rb FEATURE: support custom instructions for persona streaming (#890) 2024-11-05 07:43:26 +11:00
ai_tools_controller.rb FIX: testing tool was not showing rag results (#867) 2024-10-25 16:01:25 +11:00
ai_usage_controller.rb FEATURE: AI Usage page (#964) 2024-11-29 06:26:48 +11:00
dashboard_controller.rb FEATURE: Expose sentiment classifications via the admin dashboard. (#284) 2023-11-08 10:50:37 -03:00
rag_document_fragments_controller.rb FEATURE: RAG search within tools (#802) 2024-09-30 17:27:50 +10:00