Go to file
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
.github/workflows Initial commit 2023-02-17 11:33:47 -03:00
admin/assets/javascripts/discourse FEATURE: AI Bot RAG support. (#537) 2024-04-01 13:43:34 -03:00
app FEATURE: Cohere Command R support (#558) 2024-04-11 07:24:17 +10:00
assets UX: Update suggestion radii to accommodate for new default (#564) 2024-04-09 10:48:18 -07:00
config FEATURE: Cohere Command R support (#558) 2024-04-11 07:24:17 +10:00
db FEATURE: Add BGE-M3 embeddings support (#569) 2024-04-10 17:24:01 -03:00
discourse_automation FIX: Avoid replying to the reply user for llm_triage automation (#544) 2024-03-22 12:34:18 +08:00
lib FEATURE: Cohere Command R support (#558) 2024-04-11 07:24:17 +10:00
public/ai-share UX: adjust AI share styles for images and quotes (#567) 2024-04-09 15:36:45 -04:00
spec FEATURE: Cohere Command R support (#558) 2024-04-11 07:24:17 +10:00
test/javascripts UX: Display the indexing progress for RAG uploads (#557) 2024-04-09 11:03:07 -03:00
tokenizers FEATURE: Add BGE-M3 embeddings support (#569) 2024-04-10 17:24:01 -03:00
.discourse-compatibility DEV: Lower pinned version to fix unsupported API error on stable (#514) 2024-03-07 14:30:05 +00:00
.eslintrc.cjs DEV: Update linting configs (#280) 2023-11-03 11:30:09 +00:00
.gitignore Initial commit 2023-02-17 11:33:47 -03:00
.prettierignore FEATURE: UI to update ai personas on admin page (#290) 2023-11-21 16:56:43 +11:00
.prettierrc.cjs DEV: Update linting configs (#280) 2023-11-03 11:30:09 +00:00
.rubocop.yml DEV: Update linting configs (#280) 2023-11-03 11:30:09 +00:00
.streerc DEV: Update linting configs (#280) 2023-11-03 11:30:09 +00:00
.template-lintrc.cjs DEV: Update linting (#326) 2023-11-29 23:01:48 +01:00
Gemfile DEV: Update linting configs (#280) 2023-11-03 11:30:09 +00:00
Gemfile.lock DEV: Fix new Rubocop offenses 2024-03-06 15:23:29 +01:00
LICENSE Initial commit 2023-02-17 11:33:47 -03:00
README.md CHORE: Update Readme (#185) 2023-09-04 15:46:35 -03:00
package.json DEV: Update linting (#423) 2024-01-13 00:28:06 +01:00
plugin.rb FEATURE: Add metadata support for RAG (#553) 2024-04-04 11:02:16 -03:00
translator.yml UX: Display the indexing progress for RAG uploads (#557) 2024-04-09 11:03:07 -03:00
yarn.lock DEV: Update linting (#423) 2024-01-13 00:28:06 +01:00

README.md

Discourse AI Plugin

Plugin Summary

For more information, please see: https://meta.discourse.org/t/discourse-ai/259214?u=falco