Discord Config Folder
This section provides an in-depth explanation of each file's purpose, format, and available options in the Discord folder directory of the plugin.
AI Persona (prompt-header.txt)
The prompt-header.txt
file in the Discord directory defines the AI's persona and behavior when responding to questions on Discord. This file contains a set of instructions that the AI will follow when generating responses, ensuring that it maintains a consistent and appropriate tone.
In addition to defining the AI's persona, the prompt-header.txt
file also includes guidelines for the AI's behavior when interacting with players on Discord. These guidelines can cover topics such as:
How the AI should handle sensitive or inappropriate questions
The level of formality or casualness in the AI's language
Any specific rules or limitations the AI should adhere to when responding
The maximum length of the AI's responses
Information Format (information-message.txt)
The information-message.txt
file in the Discord directory allows you to provide context and channel history to the AI when generating a response. This file uses internal placeholders to insert relevant content based on the player's question and conversation history.
Internal Placeholders
{information}
: Automatically filled with relevant content from the files in thedocuments/
directory, based on the player's question and the number of chunks specified in theconfig.yml
file for Discord, helping the AI generate more accurate and context-aware responses to player inquiries within the Discord server.{history}
: Replaced with the conversation history from the Discord channel, providing the AI with context for generating more relevant responses. The number of messages included in the history is determined by thediscord.max_history
setting in theconfig.yml
file, with a default value of 10.
Question Format (question-message.txt)
The question-message.txt
file in the Discord directory defines the format used by the AI to receive the question from the user when generating a response. This file uses internal placeholders to insert relevant information, such as the message content and author. Additionally, it supports server information placeholders using PlaceholderAPI, as long as the placeholder does not require a specific player and is a placeholder about the server.
Internal Placeholders
{asker}
: The username of the message author.{question}
: The question being asked.{channel}
: The Discord channel where the question is being asked.{ignore-question}
: The ignore question set in theconfig.yml
, only applied if the response was not forced.
Server Information Placeholders
In addition to the internal placeholders, the question-message.txt
file also supports server information placeholders provided by PlaceholderAPI. These placeholders allow you to include dynamic server-specific information in the AI's responses, such as:
%server_time%
: The current server time.%server_uptime%
: The server's uptime.%server_online%
: The number of players currently online.
To use these placeholders, make sure you have PlaceholderAPI installed and configured on your server.
Customizing Prompt Formats
Each AI model may require a different prompt format to generate coherent and accurate responses. The default prompt format included with ServerAssistantAI is optimized for Cohere's Command R Plus model. If you are using a different provider or model, you will need to adjust the prompt files (prompt-header.txt
, information-message.txt
, and question-message.txt
) in the discord/
directory to match the recommended format for your chosen model.
You can find prompt format templates for various models in the #saai-resources
and #saai-addons
channels on our Discord server, which are accessible to verified users. If no template is available for your model, consult the documentation provided by the model's creators for guidance on prompt engineering and configuration.
Experimentation and fine-tuning may be necessary to achieve the best results with your selected model. Make sure to test the AI's responses after adjusting the prompt format to ensure coherence and relevance.
Remember to reload ServerAssistantAI after making changes to the Discord directory for the changes to take effect.
Last updated