FEATURE: smarter persona tethering (#832)

Splits persona permissions so you can allow a persona on:

- chat dms
- personal messages
- topic mentions
- chat channels

(any combination is allowed)

Previously we did not have this flexibility.

Additionally, adds the ability to "tether" a language model to a persona so it will always be used by the persona. This allows people to use a cheaper language model for one group of people and more expensive one for other people
This commit is contained in:
Sam
2024-10-16 07:20:31 +11:00
committed by GitHub
parent c7acb4a6a0
commit bdf3b6268b
20 changed files with 422 additions and 122 deletions
@@ -37,8 +37,8 @@ module("Discourse AI | Unit | Model | ai-persona", function () {
description: "Description",
top_p: 0.8,
temperature: 0.7,
mentionable: false,
default_llm: "Default LLM",
force_default_llm: false,
user: null,
user_id: null,
max_context_posts: 5,
@@ -52,6 +52,10 @@ module("Discourse AI | Unit | Model | ai-persona", function () {
allow_chat: false,
tool_details: true,
forced_tool_count: -1,
allow_personal_messages: true,
allow_topic_mentions: true,
allow_chat_channel_mentions: true,
allow_chat_direct_messages: true,
};
const aiPersona = AiPersona.create({ ...properties });
@@ -82,7 +86,6 @@ module("Discourse AI | Unit | Model | ai-persona", function () {
user: null,
user_id: null,
default_llm: "Default LLM",
mentionable: false,
max_context_posts: 5,
vision_enabled: true,
vision_max_pixels: 100,
@@ -94,6 +97,11 @@ module("Discourse AI | Unit | Model | ai-persona", function () {
allow_chat: false,
tool_details: true,
forced_tool_count: -1,
allow_personal_messages: true,
allow_topic_mentions: true,
allow_chat_channel_mentions: true,
allow_chat_direct_messages: true,
force_default_llm: false,
};
const aiPersona = AiPersona.create({ ...properties });