Integrate OpenWebUI bot with AI service

This commit is contained in:
Iyeoluwa Akinrinola
2025-05-20 02:18:46 +01:00
parent 730009ae87
commit 0a27103875
46 changed files with 1749 additions and 3012 deletions
+8 -4
View File
@@ -34,9 +34,13 @@ class Config:
CHUNK_SIZE = int(os.environ.get('CHUNK_SIZE', 1000))
CHUNK_OVERLAP = int(os.environ.get('CHUNK_OVERLAP', 200))
# AI bot configuration
AI_TRIGGERS = os.environ.get('AI_TRIGGERS', '@ai,@bot,@assistant,@chatbot').split(',')
AI_RESPOND_TO_ALL = os.environ.get('AI_RESPOND_TO_ALL', 'false').lower() == 'true'
# Bot configuration
BOT_ENABLED = os.environ.get('BOT_ENABLED', 'true').lower() == 'true'
BOT_SYSTEM_PROMPT = os.environ.get('BOT_SYSTEM_PROMPT', 'You are a helpful AI assistant.')
BOT_TEMPERATURE = float(os.environ.get('BOT_TEMPERATURE', '0.7'))
BOT_MAX_TOKENS = int(os.environ.get('BOT_MAX_TOKENS', '2048'))
BOT_TOP_P = float(os.environ.get('BOT_TOP_P', '0.9'))
BOT_TRIGGERS = os.environ.get('BOT_TRIGGERS', '@ai,@bot,@assistant,@chatbot').split(',')
BOT_RESPOND_TO_ALL = os.environ.get('BOT_RESPOND_TO_ALL', 'false').lower() == 'true'
config = Config()