Config YAML File

The config.yml file is the main configuration file for ServerAssistantAI, containing various settings that control the AI's behavior, appearance, and performance.

Minecraft Configuration:

  • minecraft.messages_channel: The Discord channel ID where player interactions with the AI will be logged.

  • minecraft.webhook_url: The Discord webhook URL for sending interaction messages instead of using the Discord bot. Leave empty to disable this feature.

  • minecraft.reply_format: The format of the AI's responses in Minecraft chat (supports MiniMessage formatting).

  • minecraft.send_replies_only_to_sender: Whether the AI's responses should be visible only to the player who asked the question.

  • minecraft.bot_name: The name of the AI bot, used to trigger responses even if the message is not a question.

  • minecraft.limits: Daily question limits for Minecraft players. You can define multiple user groups with different limits. Players can be assigned to a group using the permission serverassistantai.group.<group>.

  • minecraft.max_history: The maximum number of messages history sent to the AI model. Does not include the message AI model is responding to.

  • minecraft.chat_max_history: The maximum number of messages history sent to the AI model when using the "/saai chat" command for continuous conversation. Does not include the message AI model is responding to.

  • minecraft.max_history_characters: The maximum number of characters in the history sent to the AI model. Does not include the message AI model is responding to.

  • minecraft.ignore_question: The instruction for the AI to ignore questions not related to the server.

  • minecraft.ignore_keyword: The keyword that, if present in the AI's response, will cause the response to be ignored.

  • minecraft.minimum_words: The minimum number of words required for a Minecraft chat message to be considered a question.

  • minecraft.response_sound: The sound to play when a player receives a response from the AI. Leave empty to disable. Sound names can be found here.

  • minecraft.default_toggle_value: The default value of the /saai toggle command, which allows players to enable or disable automatic AI responses to their public chat messages. This setting applies to players who haven't yet used the toggle command.

  • minecraft.json_mode: Whether the AI should respond in JSON format. Set to true for structured responses, which can be useful for reducing unnecessary additional text.

  • minecraft.chat_listener.use_paper_event: Whether to use the Paper modern AsyncChatEvent if available. Has no effect on Spigot servers.

  • minecraft.chat_listener.priority: The priority level for the chat event listener. Options: LOWEST, LOW, NORMAL, HIGH, HIGHEST, MONITOR (default).

  • minecraft.chat_listener.ignore_cancelled: Whether to ignore the chat event if it is canceled by another plugin.

  • minecraft.question_detection.provider: The provider of the question detection system. Can be 'simple' for keyword/regex-based checks, 'advanced' for improved detection using a custom-trained model (requires the Advanced Question Detection addon), or 'none' to disable question detection. Custom question detection providers can be made using addons.

  • minecraft.question_detection.regex: This field is not shown by default and can be added manually when using the 'simple' or 'advanced' provider. You can include a regex pattern to match messages that are questions based on the specified pattern.

  • minecraft.question_detection.interpersonal_regex: A regex pattern to detect messages directed at other players, which will be ignored by the AI. This field will be ignored if the 'advanced' provider is selected.

Discord Configuration:

  • discord.enabled: Enable or disable Discord functionality.

  • discord.channel_id: The Discord channel ID where the AI will listen for questions. This channel should be dedicated solely to asking questions to the AI and not used as a regular chat channel.

  • discord.reply_format: The format of the AI's responses on Discord. Supports embeds. Use our embed creator for custom embed formats.

  • discord.admin_roles: A list of Discord role IDs that can check the usage of other users and reset daily limits.

  • discord.bypass_roles: A list of Discord role IDs that can bypass question limits.

  • discord.skip_keyword_roles: A list of Discord role IDs that can use the skip keyword.

  • discord.skip_keyword: The keyword that will prevent the AI from responding to a message.

  • discord.blocked_roles: A list of Discord role IDs that are blocked from using the AI.

  • discord.minimum_words: The minimum number of words required for the AI to respond to a message.

  • discord.max_history: The maximum number of previous messages to include in the AI's context.

  • discord.max_history_characters: The maximum number of characters in the AI's message history context.

  • discord.json_mode: Whether the AI should respond in JSON format. Set to true for structured responses, which can be useful for reducing unnecessary additional text.

  • discord.respond_to_pings: Whether the AI should respond to users who mention it in a message.

  • discord.limits: Daily question limits for Discord users. You can define multiple user groups with different limits using role IDs or role names.

  • discord.bot_token: (Optional) A separate Discord bot token for the AI. If empty and DiscordSRV is installed, the plugin will work alongside DiscordSRV.

  • discord.bot_status: The activity status of the bot on Discord. For example, "Playing Minecraft". Leave empty for none.

  • discord.question_detection.provider: The provider of the question detection system. Can be 'simple' for keyword/regex-based checks, 'advanced' for improved detection using a custom-trained model (requires the Advanced Question Detection addon), or 'none' to disable question detection. Custom question detection providers can be made using addons.

  • discord.question_detection.regex: This field is not shown by default and can be added manually when using the 'simple' or 'advanced' provider. You can include a regex pattern to match messages that are questions based on the specified pattern.

  • discord.question_detection.interpersonal_regex: This field is not shown by default and can be added manually. A regex pattern to detect messages directed at other players, which will be ignored by the AI. This field will be ignored if the 'advanced' provider is selected.

  • discord.ignore_question: The instruction for the AI to ignore questions not related to the server.

  • discord.ignore_keyword: The keyword that, if present in the AI's response, will cause the response to be ignored.

  • discord.question_detection_channels: A list of Discord channel, forum, or category IDs where AI bot will detect and respond to questions. Threads within the specified channels, forums, or categories will also be included.

  • discord.default_toggle_value: Default value for "/ai toggle", which enables/disables AI responses in question detection channels. This applies to users who haven't yet used the toggle command.

Prompt Configuration:

  • prompt.discord.max_results: The maximum number of relevant embedding chunks to include in the {information} context of Discord questions.

  • prompt.discord.min_score: The minimum relevance score for an embedding chunk to be considered related to Discord questions. Recommended to not go above 0.65.

  • prompt.minecraft.max_results: The maximum number of relevant embedding chunks to include in the {information} context of Minecraft questions.

  • prompt.minecraft.min_score: The minimum relevance score for an embedding chunk to be considered related to Minecraft questions. Recommended to not go above 0.65.

Embedding Provider Configuration:

  • embedding_model.provider: The provider of the embedding model to use for both Minecraft and Discord responses ('openai', 'cohere', etc). These can be built-in or registered by an addon.

  • embedding_model.model: The name of the embedding model to use for Discord and Minecraft responses (e.g., 'text-embedding-3-large', 'embed-multilingual-v3.0', etc).

  • embedding_model.timeout: The timeout duration for the embedding API requests. This field is optional and may not be available for all providers. If not specified, the default timeout value set by the provider will be used.

The available models depend on the selected provider. It's important to note that although most providers have a model field, it's not a standard field across all providers. Each provider may have its own unique set of options, please verify the provider's available options for the correct configuration. To learn more about providers and how they work, please refer to the What are providers? section.

ServerAssistantAI only sends information to the embedding API when changes are made to the files in the documents/ directory. If no changes are detected, the plugin will use the previously cached embeddings to reduce API calls.

Chat Provider Configuration:

  • chat_model.discord.provider: The provider of the chat model to use for Discord responses ( 'openai', 'cohere', etc).

  • chat_model.discord.model: The name of the chat model to use for Discord responses (e.g., 'gpt-4o-mini', 'command-r-plus', etc).

  • chat_model.discord.base_url: This field is not shown by default and can be added manually when using a custom baseURL-supported provider. Set this to the provider's endpoint URL (e.g., 'https://api.groq.com/openai/v1').

  • chat_model.minecraft.provider: The provider of the chat model to use for Minecraft responses ('openai' or 'cohere', etc).

  • chat_model.minecraft.model: The name of the chat model to use for Minecraft responses (e.g., 'gpt-4o-mini', 'command-r-plus', etc).

  • chat_model.minecraft.base_url: This field is not shown by default and can be added manually when using a custom baseURL-supported provider. Set this to the provider's endpoint URL (e.g., 'https://api.groq.com/openai/v1').

  • embedding_model.timeout: The timeout duration for the chat (LLM) API requests. This field is optional and may not be available for all providers. If not specified, the default timeout value set by the provider will be used.

The available models depend on the selected provider. It's important to note that although most providers have a model field, it's not a standard field across all providers. Each provider may have its own unique set of options, please verify the provider's available options for the correct configuration. To learn more about providers and how they work, please refer to the What are providers? section.

Response Filtering:

  • response_filtering.exclude: A list of elements that should be removed from the AI's responses (case-insensitive). This is in addition to the built-in list of elements that are always removed. You can also exclude elements from the conversation history by prefixing the entry with history:.

  • response_filtering.stop: A list of words that will cause the AI to stop a response immediately after encountering them.

Splitter Configuration:

  • splitter.max_segment: The maximum number of characters per chunk when splitting the server information documents. Increase this value if your documents are large.

  • splitter.max_overlap: The maximum number of overlapping characters between chunks (0 for no overlap).

Helpful Information:

  • helpful_information.minecraft.enabled: Whether to show helpful messages within the bot's in-game responses. Requires serverassistantai.helpful-information permission to view in-game helpful messages within a response.

  • helpful_information.minecraft.detailed: Whether to include the full prompt in the helpful information for Minecraft.

  • helpful_information.discord.enabled: Whether to show helpful messages within the bot's Discord responses.

  • helpful_information.discord.detailed: Whether to include the full prompt in the helpful information for Discord.

config.yml:
#  ____                            _            _     _              _      _    ___ 
# / ___|  ___ _ ____   _____ _ __ / \   ___ ___(_)___| |_ __ _ _ __ | |_   / \  |_ _|
# \___ \ / _ \ '__\ \ / / _ \ '__/ _ \ / __/ __| / __| __/ _` | '_ \| __| / _ \  | | 
#  ___) |  __/ |   \ V /  __/ | / ___ \\__ \__ \ \__ \ || (_| | | | | |_ / ___ \ | | 
# |____/ \___|_|    \_/ \___|_|/_/   \_\___/___/_|___/\__\__,_|_| |_|\__/_/   \_\___|
#
# Wiki: https://wiki.code-solutions.dev/serverassistantai
# Discord Server: https://code-solutions.dev/discord

# Minecraft Configuration.
minecraft:
  # Discord channel ID where player interactions with the chatbot will be logged.
  messages_channel: 0
  # Webhook URL for sending interaction messages instead of using the discord bot. Leave empty to disable.
  webhook_url: ''
  # Format for the bot's chat responses. <message> is the message placeholder for the response. Supports MiniMessage formatting. Use the MiniMessage formatter at https://webui.advntr.dev for custom formats.
  reply_format: <dark_gray>[</dark_gray><bold><gradient:#0073FF:#00C6FF>Assistant</gradient></bold><dark_gray>] <yellow><message></yellow>
  # Whether bot responses should be visible only to the player who asked the question.
  send_replies_only_to_sender: false
  # The bot name which will force the bot to respond when mentioned in a message. Leave empty to disable this feature.
  bot_name: Assistant
  # Daily question limits for Minecraft players. You can define multiple user groups with different limits. Players can be assigned to a group using the permission serverassistantai.group.<group>.
  limits:
    default: 20
  # The maximum number of messages history sent to the AI model. Does not include the message AI model is responding to.
  max_history: 10
  # The maximum number of messages history sent to the AI model when using the "/saai chat" command for continuous conversation. Does not include the message AI model is responding to.
  chat_max_history: 25
  # The maximum number of characters in the history sent to the AI model. Does not include the message AI model is responding to.
  max_history_characters: 1000
  # This will be added if the bot is not being forced to answer.
  ignore_question: If the question is not directly related to the Minecraft server, its features, mechanics, or any information provided in the context, or if you do not have enough confidence in your ability to provide an accurate and helpful answer based on the available information, then please respond with only "[IGNORE]". However, if the question is relevant to the server and you believe you can provide a useful response based on the context and your knowledge, then please proceed to answer the question to the best of your ability.
  # If the response includes this keyword, it will be ignored. Leave empty to disable. This will also disregard the above option.
  ignore_keyword: '[IGNORE]'
  # Minimum words for a message to be considered a question.
  minimum_words: 3
  # Sound to play when the player receives a response. Leave empty to disable. You can get sound names from https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Sound.html .
  response_sound: ENTITY_EXPERIENCE_ORB_PICKUP
  # Default value for "/saai toggle", which enables/disables AI responses to public player messages. Applies to players who haven't yet toggled.
  default_toggle_value: true
  # Whether to prompt the bot to respond in JSON format. Helpful for reducing unnecessary additional text. Look at the wiki for more info.
  json_mode: false
  # Chat event listener configuration.
  chat_listener:
    # Use the Paper modern AsyncChatEvent if available. Has no effect on Spigot servers.
    use_paper_event: true
    # Choose the priority level for the chat event listener. Options: LOWEST, LOW, NORMAL, HIGH, HIGHEST, MONITOR (default).
    priority: MONITOR
    # Ignore the chat event if it is cancelled by another plugin.
    ignore_cancelled: true
  # Uses a "provider" system. Use a built-in provider or one provided by an addon. Can be 'simple' for keyword/regex-based checks, 'advanced' for improved detection (requires the Advanced Question Detection addon), or 'none' to disable question detection. Look at the wiki for more info.
  question_detection:
    provider: simple
    interpersonal_regex: \b(how are you|did you|you got|you have|your|did we|anyone got|who needs|how was|how is|have you|did i|have i|who wants|what should|where should|are you|what's up|would you|should you|will you|have we|shall we|may I|could I|should I|would I|are we going|are we|what are you doing|what do you think|where are you|who is|who has|who was|why did|why do|how did|what did|is it okay|is that your|do you want|do you have|can you give|would you like|what happened|how come|who's going to|who's got|got any|can I help|what's your|how much|what time|where did|who will|who can)\b
# Discord Configuration.
discord:
  # Enable or disable Discord functionality.
  enabled: false
  # Discord channel ID to listen for questions.
  channel_id: 0
  # Format for the bot's chat responses. [message] is the message placeholder for the response. Supports embeds. Use our embed creator at https://embed-creator.code-solutions.dev for custom embed formats.
  reply_format:
  - '[message]'
  - '-# ⚠ This is an AI generated response. Some information may be inaccurate.'
  # Roles that can check the usage of other users and reset daily limits.
  admin_roles: []
  # The roles that can bypass all limits.
  bypass_roles: []
  # The roles required for the skip keyword to work.
  skip_keyword_roles: []
  # The bot will not respond to messages containing this keyword.
  skip_keyword: '[skip]'
  # The roles that are blocked from using the bot.
  blocked_roles: []
  # The minimum number of words for the bot to respond to a message.
  minimum_words: 3
  # Daily question limits for Discord users. You can define multiple user groups with different limits using role IDs or role names.
  limits:
    default: 20
  # The maximum number of messages history sent to the AI model. Does not include the message AI model is responding to.
  max_history: 10
  # The maximum number of characters in the history sent to the AI model. Does not include the message AI model is responding to.
  max_history_characters: 1000
  # Whether to prompt the bot to respond in JSON format. Helpful for reducing unnecessary additional text. Look at the wiki for more info.
  json_mode: false
  # Whether the bot should respond to users on discord who ping it in a message.
  respond_to_pings: true
  # Bot token to connect to Discord. If empty and DiscordSRV is installed, the plugin will work alongside DiscordSRV.
  bot_token: ''
  # The status (activity) of the bot. Leave empty for none. Example: "Playing Minecraft".
  bot_status: ''
  # Uses a "provider" system. Use a built-in provider or one provided by an addon. Can be 'simple' for keyword/regex-based checks, 'advanced' for improved detection (requires the Advanced Question Detection addon), or 'none' to disable question detection. Look at the wiki for more info.
  question_detection:
    provider: none
  # This will be added if the bot is not being forced to answer.
  ignore_question: If the question is not directly related to the Minecraft server, its features, mechanics, or any information provided in the context, or if you do not have enough confidence in your ability to provide an accurate and helpful answer based on the available information, then please respond with only "[IGNORE]". However, if the question is relevant to the server and you believe you can provide a useful response based on the context and your knowledge, then please proceed to answer the question to the best of your ability.
  # If the response includes this keyword, it will be ignored. Leave empty to disable. This will also disregard the above option.
  ignore_keyword: '[IGNORE]'
  # Discord channels, forums, or categories where the bot will detect and respond to questions. Threads within these will also work.
  question_detection_channels: []
  # Default value for "/ai toggle", which enables/disables AI responses in question detection channels. Applies to users who haven't yet toggled.
  default_toggle_value: true
prompt:
  # Discord Prompt Configuration.
  discord:
    # Maximum number of relevant embedding results (chunks) to include in the {information} context.
    max_results: 5
    # Minimum relevance score required for an embedding result (chunk) to be considered related. Set to 0 for no minimum score. Above 0.65 is not recommended.
    min_score: 0.0
  # Minecraft Prompt Configuration.
  minecraft:
    # Maximum number of relevant embedding results (chunks) to include in the {information} context.
    max_results: 5
    # Minimum relevance score required for an embedding result (chunk) to be considered related. Set to 0 for no minimum score. Above 0.65 is not recommended.
    min_score: 0.0
# Uses a "provider" system. Use a built-in provider or one provided by an addon. Look at the wiki for more info.
embedding_model:
  provider: cohere
  model: embed-multilingual-v3.0
chat_model:
  # Chat model Configuration for Discord.
  # Uses a "provider" system. Use a built-in provider or one provided by an addon. Look at the wiki for more info.
  discord:
    provider: cohere
    model: command-r-plus
  # Chat model Configuration for Minecraft.
  # Uses a "provider" system. Use a built-in provider or one provided by an addon. Look at the wiki for more info.
  minecraft:
    provider: cohere
    model: command-r-plus
# Response Filtering Configuration.
response_filtering:
  # Every element in this list will be removed from the bot's responses. It is case-insensitive. Prefix entries with "history:" to exclude from history instead.
  exclude:
  - history:-# ⚠ This is an AI generated response. Some information may be inaccurate.
  # The AI's response will stop at any of the words (text elements) in this list.
  stop: []
# Splitter Configuration.
splitter:
  # The maximum number of characters per chunk. If your documents are longer than 336K characters, increase this value to continue using the default free Cohere embedding model, use the paid Cohere Production API key, or use another embedding model.
  max_segment: 700
  # The maximum number of overlapping characters between chunks (0 for no overlap). Only full sentences are considered for the overlap.
  max_overlap: 0
# Whether to display helpful messages within the bot's response either in-game or on Discord.
helpful_information:
  minecraft:
    enabled: false
    # Whether to include more detailed information, which includes the full prompt.
    detailed: false
  discord:
    enabled: false
    # Whether to include more detailed information, which includes the full prompt.
    detailed: false

Remember to reload ServerAssistantAI after making changes to the config.yml file for the changes to take effect.

Last updated