Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
145 lines (119 loc) · 5.86 KB
/
Copy path.env.example
File metadata and controls
145 lines (119 loc) · 5.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# IRC Bot Configuration
IRC_SERVER=irc.libera.chat
IRC_PORT=6667
IRC_NICKNAME=aircbot
IRC_CHANNEL=#yourchannel
IRC_PASSWORD=
# SSL Settings (for secure connections)
IRC_USE_SSL=false
IRC_SSL_VERIFY=true
# Connection keepalive (prevents timeout disconnects)
IRC_KEEPALIVE_ENABLED=true
IRC_KEEPALIVE_INTERVAL=60
# LLM Mode Configuration
# Options: 'local_only', 'openai_only', 'fallback'
# - local_only: Use only local AI (Ollama)
# - openai_only: Use only OpenAI API
# - fallback: Try local AI first, fall back to OpenAI if local fails or gives poor response
LLM_MODE=local_only
# Local LLM Settings (for Ollama with OpenAI-compatible API)
LLM_ENABLED=true
LLM_BASE_URL=http://localhost:11434/v1
LLM_API_KEY=ollama
LLM_MODEL=deepseek-r1:latest
LLM_MAX_TOKENS=150
LLM_TEMPERATURE=0.7
LLM_RETRY_ATTEMPTS=3
# OpenAI Settings
# IMPORTANT: For security, set OPENAI_API_KEY in your shell environment instead of this file!
# The bot will automatically detect and use your environment OPENAI_API_KEY
# Only set OPENAI_API_KEY_CONFIG here if you can't use environment variables
OPENAI_ENABLED=false
# OPENAI_API_KEY_CONFIG=your_openai_api_key_here # Use environment OPENAI_API_KEY instead!
OPENAI_MODEL=gpt-4.1-nano
OPENAI_MAX_TOKENS=150
OPENAI_TEMPERATURE=0.7
OPENAI_DAILY_LIMIT=100
# Database
DATABASE_PATH=data/links.db
# Rate Limiting
RATE_LIMIT_USER_PER_MINUTE=1
RATE_LIMIT_TOTAL_PER_MINUTE=10
# Private messaging settings
PRIVATE_MSG_ENABLED=true
LINKS_USE_PRIVATE_MSG=true
COMMANDS_USE_PRIVATE_MSG=true
# Message Context Settings
MESSAGE_QUEUE_SIZE=50
CONTEXT_ANALYSIS_ENABLED=true
CONTEXT_RELEVANCE_THRESHOLD=0.3
SAVE_MESSAGES_TO_DB=false
MAX_CONTEXT_MESSAGES=10
# Context Relevance Scoring Weights (fine-tune these for your community)
WEIGHT_KEYWORD_OVERLAP=0.4
WEIGHT_TECHNICAL_KEYWORDS=0.3
WEIGHT_QUESTION_CONTEXT=0.15
WEIGHT_RECENCY_BONUS=0.1
WEIGHT_BOT_INTERACTION=0.1
WEIGHT_URL_BONUS=0.2
PENALTY_SHORT_MESSAGE=0.7
# Optional: IRC server password (if required)
IRC_SERVER_PASSWORD=
# Content Filter Settings
# CONTENT_FILTER_ENABLED=true # Enable content filtering
# CONTENT_FILTER_LLM_ASSIST=true # Use LLM for content analysis
# CONTENT_FILTER_LOG_BLOCKED=true # Log blocked content
# CONTENT_FILTER_MAX_MESSAGE_LENGTH=1000 # Max message length
# CONTENT_FILTER_STRICT_MODE=false # Strict filtering mode
# CONTENT_FILTER_BLOCK_PII=true # Block personal info
# CONTENT_FILTER_BLOCK_EXCESSIVE_CAPS=true # Block excessive caps
# Privacy Filter Settings
# PRIVACY_FILTER_ENABLED=true # Enable privacy filtering
# PRIVACY_LEVEL=medium # Privacy level (none/low/medium/high/paranoid)
# PRIVACY_MAX_CHANNEL_USERS=20 # Skip privacy for large channels
# PRIVACY_USERNAME_ANONYMIZATION=true # Anonymize usernames
# PRIVACY_PII_DETECTION=true # Detect personal info
# PRIVACY_PRESERVE_CONVERSATION_FLOW=true # Preserve conversation context
# Personality Prompt Settings
# PERSONALITY_ENABLED=false # Enable custom personality prompts
# PERSONALITY_PROMPT_FILE=personality_prompt.txt # Path to personality file
# Admin Settings
# ADMIN_USERS=admin1,admin2 # Comma-separated admin usernames
# LLM Fallback Configuration
# Controls when to fallback from local LLM to OpenAI based on response quality
# Only active when LLM_MODE=fallback
# Basic response filtering
# FALLBACK_MIN_RESPONSE_LENGTH=3 # Min chars for valid response
# FALLBACK_DONT_KNOW_CONTEXT_MIN_WORDS=15 # Context check for uncertain responses
# Relevance scoring thresholds
# FALLBACK_RELEVANCE_MIN_RATIO=0.05 # Min keyword overlap ratio
# FALLBACK_RELEVANCE_MIN_QUESTION_WORDS=3 # Min question words for relevance check
# Question type mismatch detection
# FALLBACK_TYPE_MISMATCH_MIN_RATIO=0.1 # Min ratio for type mismatch
# FALLBACK_TYPE_MISMATCH_MIN_QUESTION_WORDS=5 # Min words for type check
# Response quality thresholds
# FALLBACK_GENERIC_RESPONSE_MAX_WORDS=25 # Max words for generic responses
# FALLBACK_EXPLANATION_MIN_WORDS=8 # Min words for explanations
# FALLBACK_REPETITION_MAX_WORD_RATIO=0.3 # Max word repetition ratio
# FALLBACK_REPETITION_MIN_WORD_LENGTH=3 # Min word length for repetition check
# Short answer bypass thresholds
# FALLBACK_PROCEDURAL_SHORT_ANSWER_MAX_WORDS=15 # Max words for procedural short answers
# FALLBACK_CODE_SHORT_ANSWER_MAX_WORDS=10 # Max words for code short answers
# Semantic Similarity Configuration
# Advanced AI-based response relevance scoring using sentence transformers
# Provides more intelligent fallback decisions beyond simple keyword matching
# Requires: pip install sentence-transformers
# Enable semantic similarity scoring (disabled by default for performance)
# SEMANTIC_SIMILARITY_ENABLED=false # Enable semantic similarity scoring
# SEMANTIC_SIMILARITY_MIN_THRESHOLD=0.3 # Min similarity score to pass (0.0-1.0)
# SEMANTIC_SIMILARITY_WEIGHT=0.4 # Weight in combined scoring (0.0-1.0)
# Model configuration
# SEMANTIC_MODEL_NAME=all-MiniLM-L6-v2 # Sentence transformer model (22MB)
# SEMANTIC_MODEL_DEVICE=cpu # Processing device (cpu/cuda)
# SEMANTIC_CACHE_SIZE=100 # Cache size for embeddings
# Context-aware scoring
# SEMANTIC_CONTEXT_ENABLED=true # Enable context-aware scoring
# SEMANTIC_CONTEXT_WEIGHT=0.2 # Weight for context matching (0.0-1.0)
# Technical keyword boosting
# SEMANTIC_ENTITY_BOOST=1.2 # Boost factor for technical terms
# SEMANTIC_TECHNICAL_KEYWORDS=code,function,class,api,database,server,config,install,debug,error,fix,implement,create,build,deploy,test,python,javascript,sql,git,docker,linux,windows,network,security,performance