Add example.config.ini
This commit is contained in:
206
example.config.ini
Normal file
206
example.config.ini
Normal file
@@ -0,0 +1,206 @@
|
|||||||
|
[XMPP]
|
||||||
|
# The JID (Jabber ID) the bot will use to login.
|
||||||
|
jid = botuser@example.com
|
||||||
|
|
||||||
|
# The password for the bot's account.
|
||||||
|
password = your_secure_password
|
||||||
|
|
||||||
|
# Comma-separated list of Multi-User Chat (MUC) rooms to join.
|
||||||
|
rooms = room1@conference.example.com, room2@conference.example.com
|
||||||
|
|
||||||
|
[Bot]
|
||||||
|
# ==============================================================================
|
||||||
|
# API & MODEL CONFIGURATION
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
# The base URL for the LLM API.
|
||||||
|
# For OpenAI: https://api.openai.com/v1/chat/completions
|
||||||
|
# For Local (Ollama/LM Studio): http://localhost:11434/v1/chat/completions
|
||||||
|
# For Google Gemini: Leave as default or empty if using 'use_openai_api = False'
|
||||||
|
api_url = https://api.openai.com/v1/chat/completions
|
||||||
|
|
||||||
|
# Set to True to use the OpenAI client library (works for OpenAI, Groq, DeepSeek).
|
||||||
|
# Set to False to use Google GenAI (Gemini) or raw HTTP requests.
|
||||||
|
use_openai_api = True
|
||||||
|
|
||||||
|
# Your API Key (OpenAI, Google Gemini, Groq, etc.).
|
||||||
|
api_token = sk-proj-your-api-key-here
|
||||||
|
|
||||||
|
# The specific model name to use (e.g., gpt-4o, gemini-2.0-flash, llama3).
|
||||||
|
openai_model = gpt-4o
|
||||||
|
|
||||||
|
# Maximum number of retries if the API fails or is rate-limited.
|
||||||
|
max_retries = 3
|
||||||
|
|
||||||
|
# Timeout in seconds for API requests.
|
||||||
|
request_timeout = 60
|
||||||
|
|
||||||
|
# If True, the bot attempts to detect and remove "<thinking>" blocks often present
|
||||||
|
# in reasoning models like DeepSeek-R1 to keep chat clean.
|
||||||
|
skip_thinking_models = False
|
||||||
|
|
||||||
|
# (Google Gemini Only) Enable Google Search grounding for the bot.
|
||||||
|
enable_url_context = False
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# BOT BEHAVIOR & IDENTITY
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
# The nickname the bot attempts to use in rooms.
|
||||||
|
nickname = AI_Bot
|
||||||
|
|
||||||
|
# You can set specific nicknames for specific rooms using 'nickname.<room_jid>'
|
||||||
|
nickname.room1@conference.example.com = HelperBot
|
||||||
|
|
||||||
|
# The command prefix to trigger the bot (e.g., !aibot Hello).
|
||||||
|
trigger = !aibot
|
||||||
|
|
||||||
|
# If True, the bot replies when its name is mentioned (e.g., "AI_Bot what is...").
|
||||||
|
mentions = True
|
||||||
|
|
||||||
|
# If True, quotes the user's message in the reply (XEP-0393 style).
|
||||||
|
quote_reply = True
|
||||||
|
|
||||||
|
# If True, prefixes the reply with the sender's nickname.
|
||||||
|
mention_reply = True
|
||||||
|
|
||||||
|
# Comma-separated list of users (JIDs) who have administrative privileges.
|
||||||
|
# (Currently used to bypass some checks or force replies).
|
||||||
|
privileged_users = admin@example.com, owner@example.com
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# SYSTEM PROMPTS
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
# The global system prompt that defines the bot's personality.
|
||||||
|
system_prompt = You are a helpful XMPP assistant. Be concise.
|
||||||
|
|
||||||
|
# You can set specific system prompts for specific rooms using 'system_prompt.<room_jid>'
|
||||||
|
system_prompt.room1@conference.example.com = You are a sarcastic robot in this room.
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# CONVERSATION HISTORY & MEMORY
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
# If True, the bot keeps context of the conversation in RAM.
|
||||||
|
remember_conversations = True
|
||||||
|
|
||||||
|
# How many message pairs (User + Bot) to keep in history per room.
|
||||||
|
history_per_room = 10
|
||||||
|
|
||||||
|
# If True, saves conversation history to a JSON file so it survives restarts.
|
||||||
|
persistent_memory = True
|
||||||
|
memory_file_path = memory.json
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# RATE LIMITING & SAFETY
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
# Number of calls allowed per period.
|
||||||
|
rate_limit_calls = 10
|
||||||
|
|
||||||
|
# The period in seconds for the rate limit (e.g., 10 calls per 60 seconds).
|
||||||
|
rate_limit_period = 60
|
||||||
|
|
||||||
|
# Maximum character length of a reply to prevent flooding.
|
||||||
|
max_length = 4000
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# DIRECT MESSAGES (DM) CONTROL
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
# Allow users to private message the bot.
|
||||||
|
allow_dm = True
|
||||||
|
|
||||||
|
# DM filtering mode:
|
||||||
|
# 'none' = Allow everyone (unless allow_dm is False)
|
||||||
|
# 'whitelist' = Only allow JIDs in dm_list
|
||||||
|
# 'blacklist' = Block JIDs in dm_list
|
||||||
|
dm_mode = whitelist
|
||||||
|
|
||||||
|
# Comma-separated list of JIDs for the whitelist or blacklist.
|
||||||
|
dm_list = admin@example.com, friend@example.com
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# ENCRYPTION (OMEMO)
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
# Enable OMEMO encryption (requires python-omemo plugin).
|
||||||
|
enable_omemo = True
|
||||||
|
|
||||||
|
# File path to store OMEMO keys and trust data.
|
||||||
|
omemo_store_path = omemo_store.json
|
||||||
|
|
||||||
|
# If True, the bot will IGNORE unencrypted messages in DMs.
|
||||||
|
omemo_only = False
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# MEDIA HANDLING (Images, Audio, Links)
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
# If True, the bot will read URL contents provided in messages to answer questions about them.
|
||||||
|
fetch_link_content = True
|
||||||
|
|
||||||
|
# If True, the bot will try to answer based on links found in chat automatically.
|
||||||
|
answer_to_links = False
|
||||||
|
|
||||||
|
# Enable vision capabilities (sending images to the LLM for analysis).
|
||||||
|
support_images = True
|
||||||
|
|
||||||
|
# Enable audio processing (sending voice notes/audio files to the LLM).
|
||||||
|
support_audio = True
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# FILE UPLOAD CONFIGURATION
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
# Service to host generated images or TTS audio files.
|
||||||
|
# Options: catbox, litterbox, 0x0, imgur, imgbb, envs, uguu, xmpp
|
||||||
|
# Note: 'xmpp' uses XEP-0363 HTTP File Upload if your server supports it.
|
||||||
|
file_host = catbox
|
||||||
|
|
||||||
|
# API Key for the file host (required for imgur, imgbb, optional for catbox).
|
||||||
|
file_host_api_key =
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# IMAGE GENERATION
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
# Trigger command to generate images (e.g., !imagen a cat).
|
||||||
|
imagen_trigger = !imagen
|
||||||
|
|
||||||
|
# Cloudflare Account ID (Required for Flux-2-dev image generation).
|
||||||
|
cloudflare_account_id = your_cf_account_id
|
||||||
|
|
||||||
|
# Cloudflare API Token.
|
||||||
|
cloudflare_api_token = your_cf_api_token
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# TEXT-TO-SPEECH (TTS)
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
# Trigger command for TTS (e.g., !tts Hello world).
|
||||||
|
tts_trigger = !tts
|
||||||
|
|
||||||
|
# Enable TTS functionality (Requires Google GenAI / Gemini).
|
||||||
|
tts_enabled = True
|
||||||
|
|
||||||
|
# Gemini Voice Name (e.g., Kore, Fenrir, Puck, Aoede, Charon).
|
||||||
|
tts_voice_name = Kore
|
||||||
|
|
||||||
|
# Model to use for TTS generation.
|
||||||
|
tts_model = gemini-2.5-flash-preview-tts
|
||||||
|
|
||||||
|
# If True, the bot will speak EVERY reply it generates (sends audio alongside text).
|
||||||
|
tts_auto_reply = False
|
||||||
|
|
||||||
|
# ==============================================================================
|
||||||
|
# CONNECTION STABILITY
|
||||||
|
# ==============================================================================
|
||||||
|
|
||||||
|
# Number of times to retry joining a room if it fails.
|
||||||
|
join_retry_attempts = 5
|
||||||
|
|
||||||
|
# Delay in seconds between join attempts.
|
||||||
|
join_retry_delay = 10
|
||||||
|
|
||||||
Reference in New Issue
Block a user