discourse-ai/app
Sam 7f16d3ad43
FEATURE: Cohere Command R support (#558)
- Added Cohere Command models (Command, Command Light, Command R, Command R Plus) to the available model list
- Added a new site setting `ai_cohere_api_key` for configuring the Cohere API key
- Implemented a new `DiscourseAi::Completions::Endpoints::Cohere` class to handle interactions with the Cohere API, including:
   - Translating request parameters to the Cohere API format
   - Parsing Cohere API responses 
   - Supporting streaming and non-streaming completions
   - Supporting "tools" which allow the model to call back to discourse to lookup additional information
- Implemented a new `DiscourseAi::Completions::Dialects::Command` class to translate between the generic Discourse AI prompt format and the Cohere Command format
- Added specs covering the new Cohere endpoint and dialect classes
- Updated `DiscourseAi::AiBot::Bot.guess_model` to map the new Cohere model to the appropriate bot user

In summary, this PR adds support for using the Cohere Command family of models with the Discourse AI plugin. It handles configuring API keys, making requests to the Cohere API, and translating between Discourse's generic prompt format and Cohere's specific format. Thorough test coverage was added for the new functionality.
2024-04-11 07:24:17 +10:00
..
controllers/discourse_ai UX: Display the indexing progress for RAG uploads (#557) 2024-04-09 11:03:07 -03:00
helpers/discourse_ai/ai_bot FIX: expire assets when CSS changes FIX: missing translation on share page (#528) 2024-03-13 20:52:33 +11:00
jobs UX: Display the indexing progress for RAG uploads (#557) 2024-04-09 11:03:07 -03:00
mailers FEATURE: support sending AI report to an email address (#368) 2023-12-19 17:51:49 +11:00
models FEATURE: Cohere Command R support (#558) 2024-04-11 07:24:17 +10:00
serializers FEATURE: AI Bot RAG support. (#537) 2024-04-01 13:43:34 -03:00
views UX: Add title suffix to shared AI pages (#531) 2024-03-15 10:31:58 +00:00