2023-02-17 09:33:47 -05:00
en :
2023-08-21 13:46:34 -04:00
admin_js :
admin :
2024-08-29 19:35:20 -04:00
api :
scopes :
descriptions :
discourse_ai :
2024-11-12 11:48:30 -05:00
search : "Allows AI search"
stream_completion : "Allows streaming AI persona completions"
2024-08-29 19:35:20 -04:00
2023-08-21 13:46:34 -04:00
site_settings :
categories :
discourse_ai : "Discourse AI"
2024-11-19 08:01:10 -05:00
dashboard :
emotion : "Emotion"
2023-02-17 09:33:47 -05:00
js :
2023-10-02 17:55:30 -04:00
discourse_automation :
scriptables :
2023-12-18 20:04:15 -05:00
llm_report :
fields :
sender :
label : "Sender"
description : "The user that will send the report"
receivers :
label : "Receivers"
2023-12-21 19:46:23 -05:00
description : "The users that will receive the report (emails will be sent direct emails, usernames will be sent a PM)"
topic_id :
label : "Topic ID"
2024-11-12 11:48:30 -05:00
description : "The topic ID to post the report to"
2023-12-18 20:04:15 -05:00
title :
label : "Title"
description : "The title of the report"
days :
label : "Days"
description : "The timespan of the report"
offset :
label : "Offset"
description : "When testing you may want to run the report historically, use offset to start the report in an earlier date"
instructions :
label : "Instructions"
description : "The instructions provided to the large language model"
sample_size :
label : "Sample Size"
description : "The number of posts to sample for the report"
tokens_per_post :
label : "Tokens per post"
2024-11-12 11:48:30 -05:00
description : "The number of LLM tokens to use per post"
2023-12-18 20:04:15 -05:00
model :
label : "Model"
description : "LLM to use for report generation"
categories :
label : "Categories"
2024-01-18 10:38:29 -05:00
description : "Filter topics only to these categories"
2023-12-18 20:04:15 -05:00
tags :
label : "Tags"
description : "Filter topics only to these tags"
2024-01-29 23:55:05 -05:00
exclude_tags :
label : "Exclude Tags"
description : "Exclude topics with these tags"
exclude_categories :
label : "Exclude Categories"
description : "Exclude topics with these categories"
2023-12-18 20:04:15 -05:00
allow_secure_categories :
label : "Allow secure categories"
description : "Allow the report to be generated for topics in secure categories"
2024-03-15 17:05:03 -04:00
suppress_notifications :
label : "Suppress Notifications"
description : "Suppress notifications the report may generate by transforming to content. This will remap mentions and internal links."
2023-12-18 20:04:15 -05:00
debug_mode :
label : "Debug Mode"
description : "Enable debug mode to see the raw input and output of the LLM"
priority_group :
label : "Priority Group"
2024-01-15 02:51:14 -05:00
description : "Prioritize content from this group in the report"
2024-01-30 17:58:25 -05:00
temperature :
label : "Temperature"
2024-11-12 11:48:30 -05:00
description : "Temperature to use for the LLM. Increase to increase randomness (0 to use model default)"
2024-01-30 17:58:25 -05:00
top_p :
label : "Top P"
description : "Top P to use for the LLM, increase to increase randomness (0 to use model default)"
2023-12-18 20:04:15 -05:00
2023-10-02 17:55:30 -04:00
llm_triage :
fields :
system_prompt :
label : "System Prompt"
description : "The prompt that will be used to triage, be sure for it to reply with a single word you can use to trigger the action"
2024-10-23 01:49:56 -04:00
max_post_tokens :
label : "Max Post Tokens"
description : "The maximum number of tokens to scan using LLM triage"
2023-10-02 17:55:30 -04:00
search_for_text :
label : "Search for text"
2024-11-12 11:48:30 -05:00
description : "If the following text appears in the LLM reply, apply these actions"
2023-10-02 17:55:30 -04:00
category :
label : "Category"
description : "Category to apply to the topic"
tags :
label : "Tags"
description : "Tags to apply to the topic"
canned_reply :
label : "Reply"
2024-11-12 11:48:30 -05:00
description : "Raw text of the canned reply to post on the topic"
2023-10-02 17:55:30 -04:00
canned_reply_user :
label : "Reply User"
description : "Username of the user to post the canned reply"
hide_topic :
label : "Hide topic"
2024-11-12 11:48:30 -05:00
description : "Make topic not visible to the public if triggered"
2024-10-04 02:11:30 -04:00
flag_type :
label : "Flag type"
description : "Type of flag to apply to the post (spam or simply raise for review)"
2024-02-28 20:33:28 -05:00
flag_post :
2024-10-04 02:11:30 -04:00
label : "Flag post"
description : "Flags post (either as spam or for review)"
2023-10-02 17:55:30 -04:00
model :
label : "Model"
2024-05-14 19:55:25 -04:00
description : "Language model used for triage"
2023-10-02 17:55:30 -04:00
2023-03-15 16:02:20 -04:00
discourse_ai :
FEATURE: UI to update ai personas on admin page (#290)
Introduces a UI to manage customizable personas (admin only feature)
Part of the change was some extensive internal refactoring:
- AIBot now has a persona set in the constructor, once set it never changes
- Command now takes in bot as a constructor param, so it has the correct persona and is not generating AIBot objects on the fly
- Added a .prettierignore file, due to the way ALE is configured in nvim it is a pre-req for prettier to work
- Adds a bunch of validations on the AIPersona model, system personas (artist/creative etc...) are all seeded. We now ensure
- name uniqueness, and only allow certain properties to be touched for system personas.
- (JS note) the client side design takes advantage of nested routes, the parent route for personas gets all the personas via this.store.findAll("ai-persona") then child routes simply reach into this model to find a particular persona.
- (JS note) data is sideloaded into the ai-persona model the meta property supplied from the controller, resultSetMeta
- This removes ai_bot_enabled_personas and ai_bot_enabled_chat_commands, both should be controlled from the UI on a per persona basis
- Fixes a long standing bug in token accounting ... we were doing to_json.length instead of to_json.to_s.length
- Amended it so {commands} are always inserted at the end unconditionally, no need to add it to the template of the system message as it just confuses things
- Adds a concept of required_commands to stock personas, these are commands that must be configured for this stock persona to show up.
- Refactored tests so we stop requiring inference_stubs, it was very confusing to need it, added to plugin.rb for now which at least is clearer
- Migrates the persona selector to gjs
---------
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Co-authored-by: Martin Brennan <martin@discourse.org>
2023-11-21 00:56:43 -05:00
title : "AI"
2024-05-27 13:49:24 -04:00
2023-04-04 10:24:09 -04:00
modals :
select_option : "Select an option..."
FEATURE: UI to update ai personas on admin page (#290)
Introduces a UI to manage customizable personas (admin only feature)
Part of the change was some extensive internal refactoring:
- AIBot now has a persona set in the constructor, once set it never changes
- Command now takes in bot as a constructor param, so it has the correct persona and is not generating AIBot objects on the fly
- Added a .prettierignore file, due to the way ALE is configured in nvim it is a pre-req for prettier to work
- Adds a bunch of validations on the AIPersona model, system personas (artist/creative etc...) are all seeded. We now ensure
- name uniqueness, and only allow certain properties to be touched for system personas.
- (JS note) the client side design takes advantage of nested routes, the parent route for personas gets all the personas via this.store.findAll("ai-persona") then child routes simply reach into this model to find a particular persona.
- (JS note) data is sideloaded into the ai-persona model the meta property supplied from the controller, resultSetMeta
- This removes ai_bot_enabled_personas and ai_bot_enabled_chat_commands, both should be controlled from the UI on a per persona basis
- Fixes a long standing bug in token accounting ... we were doing to_json.length instead of to_json.to_s.length
- Amended it so {commands} are always inserted at the end unconditionally, no need to add it to the template of the system message as it just confuses things
- Adds a concept of required_commands to stock personas, these are commands that must be configured for this stock persona to show up.
- Refactored tests so we stop requiring inference_stubs, it was very confusing to need it, added to plugin.rb for now which at least is clearer
- Migrates the persona selector to gjs
---------
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Co-authored-by: Martin Brennan <martin@discourse.org>
2023-11-21 00:56:43 -05:00
ai_persona :
2024-10-10 16:23:42 -04:00
tool_strategies :
all : "Apply to all replies"
replies :
one : "Apply to first reply only"
other : "Apply to first %{count} replies"
2024-11-12 11:48:30 -05:00
back : "Back"
name : "Name"
edit : "Edit"
description : "Description"
2024-02-15 00:37:59 -05:00
no_llm_selected : "No language model selected"
2024-11-12 11:48:30 -05:00
max_context_posts : "Max context posts"
2024-02-15 00:37:59 -05:00
max_context_posts_help : "The maximum number of posts to use as context for the AI when responding to a user. (empty for default)"
2024-11-12 11:48:30 -05:00
vision_enabled : Vision enabled
2024-06-11 04:14:14 -04:00
vision_enabled_help : If enabled, the AI will attempt to understand images users post in the topic, depends on the model being used supporting vision. Supported by latest models from Anthropic, Google, and OpenAI.
FEATURE: Add vision support to AI personas (Claude 3) (#546)
This commit adds the ability to enable vision for AI personas, allowing them to understand images that are posted in the conversation.
For personas with vision enabled, any images the user has posted will be resized to be within the configured max_pixels limit, base64 encoded and included in the prompt sent to the AI provider.
The persona editor allows enabling/disabling vision and has a dropdown to select the max supported image size (low, medium, high). Vision is disabled by default.
This initial vision support has been tested and implemented with Anthropic's claude-3 models which accept images in a special format as part of the prompt.
Other integrations will need to be updated to support images.
Several specs were added to test the new functionality at the persona, prompt building and API layers.
- Gemini is omitted, pending API support for Gemini 1.5. Current Gemini bot is not performing well, adding images is unlikely to make it perform any better.
- Open AI is omitted, vision support on GPT-4 it limited in that the API has no tool support when images are enabled so we would need to full back to a different prompting technique, something that would add lots of complexity
---------
Co-authored-by: Martin Brennan <martin@discourse.org>
2024-03-26 23:30:11 -04:00
vision_max_pixels : Supported image size
vision_max_pixel_sizes :
2024-11-12 11:48:30 -05:00
low : Low quality - cheapest (256x256)
medium : Medium quality (512x512)
high : High quality - slowest (1024x1024)
tool_details : Show tool details
2024-06-11 04:14:14 -04:00
tool_details_help : Will show end users details on which tools the language model has triggered.
2024-11-12 11:48:30 -05:00
mentionable : Allow mentions
2024-05-05 19:49:02 -04:00
mentionable_help : If enabled, users in allowed groups can mention this user in posts, the AI will respond as this persona.
2024-02-15 00:37:59 -05:00
user : User
2024-11-12 11:48:30 -05:00
create_user : Create user
2024-02-15 00:37:59 -05:00
create_user_help : You can optionally attach a user to this persona. If you do, the AI will use this user to respond to requests.
2024-11-12 11:48:30 -05:00
default_llm : Default language model
2024-02-15 00:37:59 -05:00
default_llm_help : The default language model to use for this persona. Required if you wish to mention persona on public posts.
FEATURE: Add Question Consolidator for robust Upload support in Personas (#596)
This commit introduces a new feature for AI Personas called the "Question Consolidator LLM". The purpose of the Question Consolidator is to consolidate a user's latest question into a self-contained, context-rich question before querying the vector database for relevant fragments. This helps improve the quality and relevance of the retrieved fragments.
Previous to this change we used the last 10 interactions, this is not ideal cause the RAG would "lock on" to an answer.
EG:
- User: how many cars are there in europe
- Model: detailed answer about cars in europe including the term car and vehicle many times
- User: Nice, what about trains are there in the US
In the above example "trains" and "US" becomes very low signal given there are pages and pages talking about cars and europe. This mean retrieval is sub optimal.
Instead, we pass the history to the "question consolidator", it would simply consolidate the question to "How many trains are there in the United States", which would make it fare easier for the vector db to find relevant content.
The llm used for question consolidator can often be less powerful than the model you are talking to, we recommend using lighter weight and fast models cause the task is very simple. This is configurable from the persona ui.
This PR also removes support for {uploads} placeholder, this is too complicated to get right and we want freedom to shift RAG implementation.
Key changes:
1. Added a new `question_consolidator_llm` column to the `ai_personas` table to store the LLM model used for question consolidation.
2. Implemented the `QuestionConsolidator` module which handles the logic for consolidating the user's latest question. It extracts the relevant user and model messages from the conversation history, truncates them if needed to fit within the token limit, and generates a consolidated question prompt.
3. Updated the `Persona` class to use the Question Consolidator LLM (if configured) when crafting the RAG fragments prompt. It passes the conversation context to the consolidator to generate a self-contained question.
4. Added UI elements in the AI Persona editor to allow selecting the Question Consolidator LLM. Also made some UI tweaks to conditionally show/hide certain options based on persona configuration.
5. Wrote unit tests for the QuestionConsolidator module and updated existing persona tests to cover the new functionality.
This feature enables AI Personas to better understand the context and intent behind a user's question by consolidating the conversation history into a single, focused question. This can lead to more relevant and accurate responses from the AI assistant.
2024-04-29 23:49:21 -04:00
question_consolidator_llm : Language Model for Question Consolidator
question_consolidator_llm_help : The language model to use for the question consolidator, you may choose a less powerful model to save costs.
2024-11-12 11:48:30 -05:00
system_prompt : System prompt
forced_tool_strategy : Forced tool strategy
allow_chat_direct_messages : "Allow chat direct messages"
2024-10-15 16:20:31 -04:00
allow_chat_direct_messages_help : "If enabled, users in allowed groups can send direct messages to this persona."
2024-11-12 11:48:30 -05:00
allow_chat_channel_mentions : "Allow chat channel mentions"
2024-10-15 16:20:31 -04:00
allow_chat_channel_mentions_help : "If enabled, users in allowed groups can mention this persona in chat channels."
2024-11-12 11:48:30 -05:00
allow_personal_messages : "Allow personal messages"
2024-10-15 16:20:31 -04:00
allow_personal_messages_help : "If enabled, users in allowed groups can send personal messages to this persona."
2024-11-12 11:48:30 -05:00
allow_topic_mentions : "Allow topic mentions"
2024-10-15 16:20:31 -04:00
allow_topic_mentions_help : "If enabled, users in allowed groups can mention this persona in topics."
2024-11-12 11:48:30 -05:00
force_default_llm : "Always use default language model"
save : "Save"
saved : "Persona saved"
2024-03-21 00:29:56 -04:00
enabled : "Enabled?"
2024-11-12 11:48:30 -05:00
tools : "Enabled tools"
2024-11-18 17:22:39 -05:00
forced_tools : "Forced tools"
2024-11-12 11:48:30 -05:00
allowed_groups : "Allowed groups"
confirm_delete : "Are you sure you want to delete this persona?"
new : "New persona"
title : "Personas"
2024-03-21 00:29:56 -04:00
short_title : "Personas"
2024-11-12 11:48:30 -05:00
delete : "Delete"
temperature : "Temperature"
temperature_help : "Temperature to use for the LLM. Increase to increase creativity (leave empty to use model default, generally a value from 0.0 to 2.0)"
top_p : "Top P"
top_p_help : "Top P to use for the LLM, increase to increase randomness (leave empty to use model default, generally a value from 0.0 to 1.0)"
priority : "Priority"
priority_help : "Priority personas are displayed to users at the top of the persona list. If multiple personas have priority, they will be sorted alphabetically."
tool_options : "Tool options"
rag_conversation_chunks : "Search conversation chunks"
2024-04-12 09:32:46 -04:00
rag_conversation_chunks_help : "The number of chunks to use for the RAG model searches. Increase to increase the amount of context the AI can use."
2024-11-12 11:48:30 -05:00
what_are_personas : "What are Personas?"
FEATURE: UI to update ai personas on admin page (#290)
Introduces a UI to manage customizable personas (admin only feature)
Part of the change was some extensive internal refactoring:
- AIBot now has a persona set in the constructor, once set it never changes
- Command now takes in bot as a constructor param, so it has the correct persona and is not generating AIBot objects on the fly
- Added a .prettierignore file, due to the way ALE is configured in nvim it is a pre-req for prettier to work
- Adds a bunch of validations on the AIPersona model, system personas (artist/creative etc...) are all seeded. We now ensure
- name uniqueness, and only allow certain properties to be touched for system personas.
- (JS note) the client side design takes advantage of nested routes, the parent route for personas gets all the personas via this.store.findAll("ai-persona") then child routes simply reach into this model to find a particular persona.
- (JS note) data is sideloaded into the ai-persona model the meta property supplied from the controller, resultSetMeta
- This removes ai_bot_enabled_personas and ai_bot_enabled_chat_commands, both should be controlled from the UI on a per persona basis
- Fixes a long standing bug in token accounting ... we were doing to_json.length instead of to_json.to_s.length
- Amended it so {commands} are always inserted at the end unconditionally, no need to add it to the template of the system message as it just confuses things
- Adds a concept of required_commands to stock personas, these are commands that must be configured for this stock persona to show up.
- Refactored tests so we stop requiring inference_stubs, it was very confusing to need it, added to plugin.rb for now which at least is clearer
- Migrates the persona selector to gjs
---------
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Co-authored-by: Martin Brennan <martin@discourse.org>
2023-11-21 00:56:43 -05:00
no_persona_selected : |
2024-11-12 11:48:30 -05:00
Personas are a powerful feature that allows you to customize the behavior of the AI engine in your Discourse forum. They act as a 'system message' that guides the AI's responses and interactions, helping to create a more personalized and engaging user experience.
FEATURE: UI to update ai personas on admin page (#290)
Introduces a UI to manage customizable personas (admin only feature)
Part of the change was some extensive internal refactoring:
- AIBot now has a persona set in the constructor, once set it never changes
- Command now takes in bot as a constructor param, so it has the correct persona and is not generating AIBot objects on the fly
- Added a .prettierignore file, due to the way ALE is configured in nvim it is a pre-req for prettier to work
- Adds a bunch of validations on the AIPersona model, system personas (artist/creative etc...) are all seeded. We now ensure
- name uniqueness, and only allow certain properties to be touched for system personas.
- (JS note) the client side design takes advantage of nested routes, the parent route for personas gets all the personas via this.store.findAll("ai-persona") then child routes simply reach into this model to find a particular persona.
- (JS note) data is sideloaded into the ai-persona model the meta property supplied from the controller, resultSetMeta
- This removes ai_bot_enabled_personas and ai_bot_enabled_chat_commands, both should be controlled from the UI on a per persona basis
- Fixes a long standing bug in token accounting ... we were doing to_json.length instead of to_json.to_s.length
- Amended it so {commands} are always inserted at the end unconditionally, no need to add it to the template of the system message as it just confuses things
- Adds a concept of required_commands to stock personas, these are commands that must be configured for this stock persona to show up.
- Refactored tests so we stop requiring inference_stubs, it was very confusing to need it, added to plugin.rb for now which at least is clearer
- Migrates the persona selector to gjs
---------
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Co-authored-by: Martin Brennan <martin@discourse.org>
2023-11-21 00:56:43 -05:00
2024-11-12 11:48:30 -05:00
#### Why use personas?
FEATURE: UI to update ai personas on admin page (#290)
Introduces a UI to manage customizable personas (admin only feature)
Part of the change was some extensive internal refactoring:
- AIBot now has a persona set in the constructor, once set it never changes
- Command now takes in bot as a constructor param, so it has the correct persona and is not generating AIBot objects on the fly
- Added a .prettierignore file, due to the way ALE is configured in nvim it is a pre-req for prettier to work
- Adds a bunch of validations on the AIPersona model, system personas (artist/creative etc...) are all seeded. We now ensure
- name uniqueness, and only allow certain properties to be touched for system personas.
- (JS note) the client side design takes advantage of nested routes, the parent route for personas gets all the personas via this.store.findAll("ai-persona") then child routes simply reach into this model to find a particular persona.
- (JS note) data is sideloaded into the ai-persona model the meta property supplied from the controller, resultSetMeta
- This removes ai_bot_enabled_personas and ai_bot_enabled_chat_commands, both should be controlled from the UI on a per persona basis
- Fixes a long standing bug in token accounting ... we were doing to_json.length instead of to_json.to_s.length
- Amended it so {commands} are always inserted at the end unconditionally, no need to add it to the template of the system message as it just confuses things
- Adds a concept of required_commands to stock personas, these are commands that must be configured for this stock persona to show up.
- Refactored tests so we stop requiring inference_stubs, it was very confusing to need it, added to plugin.rb for now which at least is clearer
- Migrates the persona selector to gjs
---------
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Co-authored-by: Martin Brennan <martin@discourse.org>
2023-11-21 00:56:43 -05:00
2024-11-12 11:48:30 -05:00
With personas, you can tailor the AI's behavior to better fit the context and tone of your forum. Whether you want the AI to be more formal for a professional setting, more casual for a community forum, or even embody a specific character for a role-playing game, personas give you the flexibility to do so.
FEATURE: UI to update ai personas on admin page (#290)
Introduces a UI to manage customizable personas (admin only feature)
Part of the change was some extensive internal refactoring:
- AIBot now has a persona set in the constructor, once set it never changes
- Command now takes in bot as a constructor param, so it has the correct persona and is not generating AIBot objects on the fly
- Added a .prettierignore file, due to the way ALE is configured in nvim it is a pre-req for prettier to work
- Adds a bunch of validations on the AIPersona model, system personas (artist/creative etc...) are all seeded. We now ensure
- name uniqueness, and only allow certain properties to be touched for system personas.
- (JS note) the client side design takes advantage of nested routes, the parent route for personas gets all the personas via this.store.findAll("ai-persona") then child routes simply reach into this model to find a particular persona.
- (JS note) data is sideloaded into the ai-persona model the meta property supplied from the controller, resultSetMeta
- This removes ai_bot_enabled_personas and ai_bot_enabled_chat_commands, both should be controlled from the UI on a per persona basis
- Fixes a long standing bug in token accounting ... we were doing to_json.length instead of to_json.to_s.length
- Amended it so {commands} are always inserted at the end unconditionally, no need to add it to the template of the system message as it just confuses things
- Adds a concept of required_commands to stock personas, these are commands that must be configured for this stock persona to show up.
- Refactored tests so we stop requiring inference_stubs, it was very confusing to need it, added to plugin.rb for now which at least is clearer
- Migrates the persona selector to gjs
---------
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Co-authored-by: Martin Brennan <martin@discourse.org>
2023-11-21 00:56:43 -05:00
2024-11-12 11:48:30 -05:00
#### Group-specific access to personas
FEATURE: UI to update ai personas on admin page (#290)
Introduces a UI to manage customizable personas (admin only feature)
Part of the change was some extensive internal refactoring:
- AIBot now has a persona set in the constructor, once set it never changes
- Command now takes in bot as a constructor param, so it has the correct persona and is not generating AIBot objects on the fly
- Added a .prettierignore file, due to the way ALE is configured in nvim it is a pre-req for prettier to work
- Adds a bunch of validations on the AIPersona model, system personas (artist/creative etc...) are all seeded. We now ensure
- name uniqueness, and only allow certain properties to be touched for system personas.
- (JS note) the client side design takes advantage of nested routes, the parent route for personas gets all the personas via this.store.findAll("ai-persona") then child routes simply reach into this model to find a particular persona.
- (JS note) data is sideloaded into the ai-persona model the meta property supplied from the controller, resultSetMeta
- This removes ai_bot_enabled_personas and ai_bot_enabled_chat_commands, both should be controlled from the UI on a per persona basis
- Fixes a long standing bug in token accounting ... we were doing to_json.length instead of to_json.to_s.length
- Amended it so {commands} are always inserted at the end unconditionally, no need to add it to the template of the system message as it just confuses things
- Adds a concept of required_commands to stock personas, these are commands that must be configured for this stock persona to show up.
- Refactored tests so we stop requiring inference_stubs, it was very confusing to need it, added to plugin.rb for now which at least is clearer
- Migrates the persona selector to gjs
---------
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Co-authored-by: Martin Brennan <martin@discourse.org>
2023-11-21 00:56:43 -05:00
Moreover, you can set it up so that certain user groups have access to specific personas. This means you can have different AI behaviors for different sections of your forum, further enhancing the diversity and richness of your community's interactions.
2024-04-03 01:06:27 -04:00
2024-09-30 03:27:50 -04:00
rag :
options :
2024-11-12 11:48:30 -05:00
rag_chunk_tokens : "Upload chunk tokens"
2024-09-30 03:27:50 -04:00
rag_chunk_tokens_help : "The number of tokens to use for each chunk in the RAG model. Increase to increase the amount of context the AI can use. (changing will re-index all uploads)"
2024-11-12 11:48:30 -05:00
rag_chunk_overlap_tokens : "Upload chunk overlap tokens"
2024-09-30 03:27:50 -04:00
rag_chunk_overlap_tokens_help : "The number of tokens to overlap between chunks in the RAG model. (changing will re-index all uploads)"
2024-11-12 11:48:30 -05:00
show_indexing_options : "Show upload options"
hide_indexing_options : "Hide upload options"
FEATURE: AI Bot RAG support. (#537)
This PR lets you associate uploads to an AI persona, which we'll split and generate embeddings from. When building the system prompt to get a bot reply, we'll do a similarity search followed by a re-ranking (if available). This will let us find the most relevant fragments from the body of knowledge you associated with the persona, resulting in better, more informed responses.
For now, we'll only allow plain-text files, but this will change in the future.
Commits:
* FEATURE: RAG embeddings for the AI Bot
This first commit introduces a UI where admins can upload text files, which we'll store, split into fragments,
and generate embeddings of. In a next commit, we'll use those to give the bot additional information during
conversations.
* Basic asymmetric similarity search to provide guidance in system prompt
* Fix tests and lint
* Apply reranker to fragments
* Uploads filter, css adjustments and file validations
* Add placeholder for rag fragments
* Update annotations
2024-04-01 12:43:34 -04:00
uploads :
title : "Uploads"
2024-09-30 03:27:50 -04:00
description : "Uploaded files should be formatted as plaintext (.txt) or markdown (.md)."
2024-11-12 11:48:30 -05:00
button : "Add files"
FEATURE: AI Bot RAG support. (#537)
This PR lets you associate uploads to an AI persona, which we'll split and generate embeddings from. When building the system prompt to get a bot reply, we'll do a similarity search followed by a re-ranking (if available). This will let us find the most relevant fragments from the body of knowledge you associated with the persona, resulting in better, more informed responses.
For now, we'll only allow plain-text files, but this will change in the future.
Commits:
* FEATURE: RAG embeddings for the AI Bot
This first commit introduces a UI where admins can upload text files, which we'll store, split into fragments,
and generate embeddings of. In a next commit, we'll use those to give the bot additional information during
conversations.
* Basic asymmetric similarity search to provide guidance in system prompt
* Fix tests and lint
* Apply reranker to fragments
* Uploads filter, css adjustments and file validations
* Add placeholder for rag fragments
* Update annotations
2024-04-01 12:43:34 -04:00
filter : "Filter uploads"
2024-04-09 10:03:07 -04:00
indexed : "Indexed"
indexing : "Indexing"
uploaded : "Ready to be indexed"
2024-04-15 09:22:06 -04:00
uploading : "Uploading..."
remove : "Remove upload"
FEATURE: UI to update ai personas on admin page (#290)
Introduces a UI to manage customizable personas (admin only feature)
Part of the change was some extensive internal refactoring:
- AIBot now has a persona set in the constructor, once set it never changes
- Command now takes in bot as a constructor param, so it has the correct persona and is not generating AIBot objects on the fly
- Added a .prettierignore file, due to the way ALE is configured in nvim it is a pre-req for prettier to work
- Adds a bunch of validations on the AIPersona model, system personas (artist/creative etc...) are all seeded. We now ensure
- name uniqueness, and only allow certain properties to be touched for system personas.
- (JS note) the client side design takes advantage of nested routes, the parent route for personas gets all the personas via this.store.findAll("ai-persona") then child routes simply reach into this model to find a particular persona.
- (JS note) data is sideloaded into the ai-persona model the meta property supplied from the controller, resultSetMeta
- This removes ai_bot_enabled_personas and ai_bot_enabled_chat_commands, both should be controlled from the UI on a per persona basis
- Fixes a long standing bug in token accounting ... we were doing to_json.length instead of to_json.to_s.length
- Amended it so {commands} are always inserted at the end unconditionally, no need to add it to the template of the system message as it just confuses things
- Adds a concept of required_commands to stock personas, these are commands that must be configured for this stock persona to show up.
- Refactored tests so we stop requiring inference_stubs, it was very confusing to need it, added to plugin.rb for now which at least is clearer
- Migrates the persona selector to gjs
---------
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Co-authored-by: Martin Brennan <martin@discourse.org>
2023-11-21 00:56:43 -05:00
2024-06-27 03:27:40 -04:00
tools :
2024-07-16 13:23:17 -04:00
back : "Back"
2024-06-27 03:27:40 -04:00
short_title : "Tools"
2024-11-12 11:48:30 -05:00
new : "New tool"
2024-06-27 03:27:40 -04:00
name : "Name"
name_help : "The unique name of the tool as used by the language model"
description : "Description"
description_help : "A clear description of the tool's purpose for the language model"
summary : "Summary"
summary_help : "Summary of tools purpose to be displayed to end users"
script : "Script"
parameters : "Parameters"
save : "Save"
add_parameter : "Add Parameter"
parameter_required : "Required"
parameter_enum : "Enum"
2024-11-12 11:48:30 -05:00
parameter_name : "Parameter name"
parameter_description : "Parameter description"
2024-06-27 18:59:51 -04:00
enum_value : "Enum value"
add_enum_value : "Add enum value"
2024-06-27 03:27:40 -04:00
edit : "Edit"
2024-11-12 11:48:30 -05:00
test : "Run test"
2024-06-27 03:27:40 -04:00
delete : "Delete"
saved : "Tool saved"
presets : "Select a preset..."
2024-11-12 11:48:30 -05:00
confirm_delete : "Are you sure you want to delete this tool?"
2024-06-27 03:27:40 -04:00
next :
title : "Next"
test_modal :
2024-11-12 11:48:30 -05:00
title : "Test AI tool"
run : "Run test"
result : "Test result"
2024-06-27 03:27:40 -04:00
2024-05-13 11:46:42 -04:00
llms :
short_title : "LLMs"
no_llms : "No LLMs yet"
2024-11-12 11:48:30 -05:00
new : "New model"
2024-09-30 03:15:11 -04:00
display_name : "Name"
name : "Model id"
provider : "Provider"
2024-05-16 13:28:57 -04:00
tokenizer : "Tokenizer"
max_prompt_tokens : "Number of tokens for the prompt"
url : "URL of the service hosting the model"
api_key : "API Key of the service hosting the model"
2024-11-12 11:48:30 -05:00
enabled_chat_bot : "Allow AI bot selector"
2024-07-24 15:29:47 -04:00
vision_enabled : "Vision enabled"
2024-11-12 11:48:30 -05:00
ai_bot_user : "AI bot User"
2024-05-13 11:46:42 -04:00
save : "Save"
2024-05-16 13:28:57 -04:00
edit : "Edit"
2024-11-12 11:48:30 -05:00
saved : "LLM model saved"
2024-05-16 13:28:57 -04:00
back : "Back"
2024-05-27 15:44:08 -04:00
confirm_delete : Are you sure you want to delete this model?
delete : Delete
2024-08-28 14:57:58 -04:00
seeded_warning : "This model is pre-configured on your site and cannot be edited."
2024-10-21 20:16:02 -04:00
usage :
2024-11-12 11:48:30 -05:00
ai_bot : "AI bot"
ai_helper : "Helper"
2024-10-21 20:16:02 -04:00
ai_persona : "Persona (%{persona})"
2024-11-12 11:48:30 -05:00
ai_summarization : "Summarize"
ai_embeddings_semantic_search : "AI search"
2024-09-11 21:28:08 -04:00
in_use_warning :
2024-10-21 20:16:02 -04:00
one : "This model is currently used by %{settings}. If misconfigured, the feature won't work as expected."
other : "This model is currently used by the following: %{settings}. If misconfigured, features won't work as expected. "
2024-08-06 13:35:35 -04:00
2024-09-30 03:15:11 -04:00
model_description :
none : "General settings that work for most language models"
anthropic-claude-3-5-sonnet : "Anthropic's most intelligent model"
2024-11-18 17:22:39 -05:00
anthropic-claude-3-5-haiku : "Fast and cost-effective"
2024-09-30 03:15:11 -04:00
anthropic-claude-3-opus : "Excels at writing and complex tasks"
google-gemini-1-5-pro : "Mid-sized multimodal model capable of a wide range of tasks"
google-gemini-1-5-flash : "Lightweight, fast, and cost-efficient with multimodal reasoning"
open_ai-gpt-4-turbo : "Previous generation high-intelligence model"
open_ai-gpt-4o : "High intelligence model for complex, multi-step tasks"
open_ai-gpt-4o-mini : "Affordable and fast small model for lightweight tasks"
2024-11-18 17:22:39 -05:00
open_ai-o1-mini : "Cost-efficient reasoning model"
open_ai-o1-preview : "Open AI's most capabale reasoning model"
samba_nova-Meta-Llama-3-1-8B-Instruct : "Efficient lightweight multilingual model"
samba_nova-Meta-Llama-3-1-70B-Instruct": "Powerful multipurpose model"
2024-11-19 01:28:09 -05:00
mistral-mistral-large-latest : "Mistral's most powerful model"
mistral-pixtral-large-latest : "Mistral's most powerful vision capable model"
2024-09-30 03:15:11 -04:00
configured :
title : "Configured LLMs"
2024-06-21 03:32:15 -04:00
preconfigured_llms : "Select your LLM"
preconfigured :
2024-09-30 03:15:11 -04:00
title_no_llms : "Select a template to get started"
title : "Unconfigured LLM templates"
fake : "Manual configuration"
button : "Set up"
2024-06-21 03:32:15 -04:00
next :
title : "Next"
2024-06-18 13:32:14 -04:00
2024-05-29 21:18:22 -04:00
tests :
2024-11-12 11:48:30 -05:00
title : "Run test"
2024-05-21 12:35:50 -04:00
running : "Running test..."
success : "Success!"
failure : "Trying to contact the model returned this error: %{error}"
2024-05-13 11:46:42 -04:00
hints :
max_prompt_tokens : "Max numbers of tokens for the prompt. As a rule of thumb, this should be 50% of the model's context window."
2024-11-12 11:48:30 -05:00
name : "We include this in the API call to specify which model we'll use"
2024-07-24 15:29:47 -04:00
vision_enabled : "If enabled, the AI will attempt to understand images. It depends on the model being used supporting vision. Supported by latest models from Anthropic, Google, and OpenAI."
2024-11-12 11:48:30 -05:00
enabled_chat_bot : "If enabled, users can select this model when creating PMs with the AI bot"
2024-05-13 11:46:42 -04:00
providers :
aws_bedrock : "AWS Bedrock"
anthropic : "Anthropic"
vllm : "vLLM"
hugging_face : "Hugging Face"
cohere : "Cohere"
open_ai : "OpenAI"
google : "Google"
azure : "Azure"
2024-05-13 14:54:42 -04:00
ollama : "Ollama"
2024-08-28 14:57:58 -04:00
CDCK : "CDCK"
2024-09-11 21:28:08 -04:00
samba_nova : "SambaNova"
2024-11-19 01:28:09 -05:00
mistral : "Mistral"
2024-09-30 03:15:11 -04:00
fake : "Custom"
2024-06-27 03:27:40 -04:00
2024-06-24 18:26:30 -04:00
provider_fields :
2024-11-12 11:48:30 -05:00
access_key_id : "AWS Bedrock access key ID"
region : "AWS Bedrock region"
organization : "Optional OpenAI organization ID"
2024-08-21 10:41:55 -04:00
disable_system_prompt : "Disable system message in prompts"
2024-10-10 16:25:53 -04:00
enable_native_tool : "Enable native tool support"
2024-10-24 15:24:53 -04:00
disable_native_tools : "Disable native tool support (use XML based tools)"
2024-05-13 11:46:42 -04:00
2023-03-30 18:07:22 -04:00
related_topics :
2024-11-12 11:48:30 -05:00
title : "Related topics"
2023-07-31 17:33:37 -04:00
pill : "Related"
2023-03-15 16:02:20 -04:00
ai_helper :
title : "Suggest changes using AI"
description : "Choose one of the options below, and the AI will suggest you a new version of the text."
selection_hint : "Hint: You can also select a portion of the text before opening the helper to rewrite only that."
2023-09-01 20:10:58 -04:00
suggest : "Suggest with AI"
2023-08-29 14:58:45 -04:00
missing_content : "Please enter some content to generate suggestions."
2023-08-23 13:35:40 -04:00
context_menu :
2024-09-13 14:59:30 -04:00
trigger : "Ask AI"
2024-09-18 12:53:54 -04:00
loading : "AI is generating"
2023-08-23 13:35:40 -04:00
cancel : "Cancel"
regen : "Try Again"
2023-08-24 20:49:24 -04:00
confirm : "Confirm"
2024-09-13 14:59:30 -04:00
discard : "Discard"
2024-11-12 11:48:30 -05:00
changes : "Suggested edits"
2023-09-25 14:12:54 -04:00
custom_prompt :
2024-11-12 11:48:30 -05:00
title : "Custom prompt"
2023-09-25 14:12:54 -04:00
placeholder : "Enter a custom prompt..."
2024-11-12 11:48:30 -05:00
submit : "Send prompt"
2024-07-04 11:23:37 -04:00
translate_prompt : "Translate to %{language}"
2023-10-23 10:41:36 -04:00
post_options_menu :
trigger : "Ask AI"
2023-12-05 15:33:10 -05:00
title : "Ask AI"
2023-10-23 10:41:36 -04:00
loading : "AI is generating"
close : "Close"
2023-11-17 12:25:41 -05:00
copy : "Copy"
copied : "Copied!"
2023-12-12 12:28:39 -05:00
cancel : "Cancel"
2024-05-03 14:53:17 -04:00
insert_footnote : "Add footnote"
footnote_credits : "Explanation by AI"
2023-12-14 22:30:52 -05:00
fast_edit :
2024-11-12 11:48:30 -05:00
suggest_button : "Suggest edit"
2023-12-19 14:17:34 -05:00
thumbnail_suggestions :
2024-11-12 11:48:30 -05:00
title : "Suggested thumbnails"
2023-12-19 14:17:34 -05:00
select : "Select"
selected : "Selected"
2024-02-19 12:56:28 -05:00
image_caption :
button_label : "Caption with AI"
generating : "Generating caption..."
credits : "Captioned by AI"
save_caption : "Save"
2024-11-12 11:48:30 -05:00
automatic_caption_setting : "Enable auto caption"
2024-05-27 13:49:24 -04:00
automatic_caption_loading : "Captioning images..."
automatic_caption_dialog :
2024-11-12 11:48:30 -05:00
prompt : "This post contains non-captioned images. Would you like to enable automatic auto captions on image uploads? (This can be changed in your preferences later)"
2024-05-27 13:49:24 -04:00
confirm : "Enable"
cancel : "Don't ask again"
2024-09-13 19:19:13 -04:00
no_content_error : "Add content first to perform AI actions on it"
2024-02-19 12:56:28 -05:00
2023-03-07 13:39:28 -05:00
reviewables :
model_used : "Model used:"
accuracy : "Accuracy:"
2023-07-26 21:24:44 -04:00
2023-03-31 14:29:56 -04:00
embeddings :
semantic_search : "Topics (Semantic)"
2023-09-05 10:08:23 -04:00
semantic_search_loading : "Searching for more results using AI"
semantic_search_results :
2023-11-17 15:46:59 -05:00
toggle : "Showing %{count} results found using AI"
toggle_hidden : "Hiding %{count} results found using AI"
2024-11-12 11:48:30 -05:00
none : "Sorry, our AI search found no matching topics"
new : "Press 'search' to begin looking for new results with AI"
2023-11-27 17:25:33 -05:00
ai_generated_result : "Search result found using AI"
2024-03-08 11:02:50 -05:00
quick_search :
suffix : "in all topics and posts with AI"
2023-04-04 10:24:09 -04:00
2024-11-18 17:22:39 -05:00
ai_artifact :
expand_view_label : "Expand view"
collapse_view_label : "Exit Fullscreen (ESC)"
click_to_run_label : "Run Artifact"
2023-05-05 14:28:31 -04:00
ai_bot :
2023-08-16 16:29:58 -04:00
pm_warning : "AI chatbot messages are monitored regularly by moderators."
2023-05-16 15:56:30 -04:00
cancel_streaming : "Stop reply"
2023-05-16 13:38:21 -04:00
default_pm_prefix : "[Untitled AI bot PM]"
2023-05-16 15:56:30 -04:00
shortcut_title : "Start a PM with an AI bot"
2024-10-01 18:38:57 -04:00
share : "Copy AI conversation"
2023-12-29 10:26:03 -05:00
conversation_shared : "Conversation copied"
2024-04-15 09:22:06 -04:00
debug_ai : "View raw AI request and response"
debug_ai_modal :
title : "View AI interaction"
copy_request : "Copy request"
copy_response : "Copy response"
request_tokens : "Request tokens:"
response_tokens : "Response tokens:"
2024-05-08 22:11:50 -04:00
request : "Request"
response : "Response"
2024-11-11 16:14:30 -05:00
next_log : "Next"
previous_log : "Previous"
2023-12-29 03:47:47 -05:00
2024-03-12 01:51:41 -04:00
share_full_topic_modal :
2024-11-12 11:48:30 -05:00
title : "Share conversation publicly"
share : "Share and copy link"
update : "Update and copy link"
delete : "Delete share"
2024-03-12 01:51:41 -04:00
share_ai_conversation :
2024-11-12 11:48:30 -05:00
name : "Share AI conversation"
2024-03-12 01:51:41 -04:00
title : "Share this AI conversation publicly"
2023-12-29 03:47:47 -05:00
ai_label : "AI"
ai_title : "Conversation with AI"
share_modal :
2024-03-12 01:51:41 -04:00
title : "Copy AI conversation"
2023-12-29 03:47:47 -05:00
copy : "Copy"
context : "Interactions to share:"
2024-11-12 11:48:30 -05:00
share_tip : "Alternatively, you can share the entire conversation"
2023-05-05 14:28:31 -04:00
2023-05-17 14:59:48 -04:00
bot_names :
2024-03-05 14:04:37 -05:00
fake : "Fake Test Bot"
claude-3-opus : "Claude 3 Opus"
claude-3-sonnet : "Claude 3 Sonnet"
2024-04-03 01:06:27 -04:00
claude-3-haiku : "Claude 3 Haiku"
2024-04-10 17:24:17 -04:00
cohere-command-r-plus : "Cohere Command R Plus"
2023-05-17 14:59:48 -04:00
gpt-4 : "GPT-4"
2023-12-10 22:59:57 -05:00
gpt-4-turbo : "GPT-4 Turbo"
2024-05-13 23:28:46 -04:00
gpt-4o : "GPT-4 Omni"
2023-05-17 14:59:48 -04:00
gpt-3 :
5-turbo : "GPT-3.5"
2023-07-26 21:24:44 -04:00
claude-2 : "Claude 2"
2024-04-17 01:37:19 -04:00
gemini-1 :
5-pro : "Gemini"
2024-01-04 10:22:43 -05:00
mixtral-8x7B-Instruct-V0 :
"1": "Mixtral-8x7B V0.1"
2023-11-08 08:50:37 -05:00
sentiments :
dashboard :
title : "Sentiment"
2024-07-02 11:51:59 -04:00
summarization :
chat :
title : "Summarize messages"
description : "Select an option below to summarize the conversation sent during the desired timeframe."
summarize : "Summarize"
since :
one : "Last hour"
other : "Last %{count} hours"
2024-08-05 11:39:08 -04:00
topic :
title : "Topic summary"
close : "Close summary panel"
2024-11-19 15:33:34 -05:00
topic_list_layout :
button :
compact : "Compact"
expanded : "Expanded"
expanded_description : "with AI summaries"
2023-03-07 13:39:28 -05:00
review :
types :
2023-03-20 09:09:20 -04:00
reviewable_ai_post :
2023-03-07 13:39:28 -05:00
title : "AI-Flagged post"
2023-03-20 09:09:20 -04:00
reviewable_ai_chat_message :
2023-03-07 13:39:28 -05:00
title : "AI-Flagged chat message"