discourse-ai/lib/completions
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
..
dialects FEATURE: Add support for Mistral models (#919) 2024-11-19 17:28:09 +11:00
endpoints FEATURE: AI Usage page (#964) 2024-11-29 06:26:48 +11:00
anthropic_message_processor.rb FEATURE: AI artifacts (#898) 2024-11-19 09:22:39 +11:00
json_stream_decoder.rb FEATURE: improve tool support (#904) 2024-11-12 08:14:30 +11:00
json_streaming_parser.rb FEATURE: partial tool call support for OpenAI and Anthropic (#908) 2024-11-14 06:58:24 +11:00
llm.rb FEATURE: Add support for Mistral models (#919) 2024-11-19 17:28:09 +11:00
open_ai_message_processor.rb FEATURE: AI Usage page (#964) 2024-11-29 06:26:48 +11:00
prompt.rb FEATURE: allows forced LLM tool use (#818) 2024-10-05 09:46:57 +10:00
prompt_messages_builder.rb FEATURE: Add support for contextualizing a DM to a bot (#627) 2024-05-21 17:17:02 +10:00
report.rb FEATURE: AI Usage page (#964) 2024-11-29 06:26:48 +11:00
tool_call.rb FEATURE: AI artifacts (#898) 2024-11-19 09:22:39 +11:00
tool_call_progress_tracker.rb FEATURE: AI artifacts (#898) 2024-11-19 09:22:39 +11:00
upload_encoder.rb FEATURE: Add vision support to AI personas (Claude 3) (#546) 2024-03-27 14:30:11 +11:00
xml_tag_stripper.rb FIX: display search correctly, bug when stripping XML (#668) 2024-06-14 15:28:40 +10:00
xml_tool_processor.rb FEATURE: AI artifacts (#898) 2024-11-19 09:22:39 +11:00