-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
119 lines (119 loc) · 7.52 KB
/
Copy path.env.example
File metadata and controls
119 lines (119 loc) · 7.52 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
BOT_TOKEN=
OPENROUTER_API_KEY=
TAVILY_API_KEY=
# --- LLM (any OpenAI-compatible endpoint) ---
# OPENAI_BASE_URL defaults to https://openrouter.ai/api/v1 ; set to http://localhost:11434/v1 for Ollama, etc.
# OPENAI_API_KEY can be used instead of OPENROUTER_API_KEY; both are aliases.
# OPENAI_BASE_URL=http://localhost:11434/v1
# OPENAI_API_KEY=sk-...
# LLM_BASE_URL / LLM_API_KEY / OPENROUTER_BASE_URL are also accepted as aliases.
# CHAT_MODEL and SPARK_MODEL must match the provider's model IDs.
# LLM_MAX_TOKENS=8192 # max completion tokens; reasoning models count hidden thinking tokens against this
# LLM_REASONING_EFFORT=medium # reasoning effort sent on every completion: minimal|low|medium|high; empty omits the parameter
# CHAT_MODEL=qwen/qwen3.6-plus
# SPARK_MODEL=google/gemini-2.5-pro
# --- Merge Gateway vendor priority ---
# When OPENAI_BASE_URL points at the Merge Gateway (merge.dev), chat completions
# carry an inline priority_order so the gateway tries these vendors in order,
# failing over on throttles, outages and timeouts
# (docs.merge.dev/merge-gateway/routing/using-policies).
# Comma-separated vendor slugs, highest priority first; empty disables.
# MERGE_PRIORITY_ORDER=particle,wafer,fireworks,modal,zai
# --- Embeddings / rerank ---
# EMBEDDING_PROVIDER: openai (default, remote) or local (sentence-transformers)
# For local: sentence-transformers model loaded on CPU by default.
# EMBEDDING_PROVIDER=local
# LOCAL_EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2
# LOCAL_EMBEDDING_DEVICE=cpu # or cuda, mps
# RERANK_ENABLED=true # master switch (remote rerank only works when OPENAI_BASE_URL is openrouter.ai)
# RERANK_PROVIDER=auto # auto | local | remote — local = cross-encoder, remote = OpenRouter /rerank, auto = remote on OpenRouter else local
# LOCAL_RERANK_MODEL=cross-encoder/ms-marco-MiniLM-L-6-v2
# LOCAL_RERANK_DEVICE=cpu # defaults to LOCAL_EMBEDDING_DEVICE
# Optional overrides (defaults shown):
# EMBEDDING_MODEL=qwen/qwen3-embedding-8b
# RERANK_MODEL=cohere/rerank-4-fast
# VECTOR_STORE_PATH=data/vectors.json
# REINDEX_INTERVAL_HOURS=6
# WEB_SEARCH_ENABLED=true
# Set to false to disable web search entirely.
# COOLDOWN_RATE=1
# COOLDOWN_PER=30
# LOG_LEVEL=INFO
# --- API request logging (data/api_requests.log, JSON lines) ---
# API_REQUEST_LOG_ENABLED=true # logs every outbound HTTP request + inbound Discord interaction
# API_REQUEST_LOG_PATH=data/api_requests.log
# API_REQUEST_LOG_MAX_BYTES=10485760 # rotate after 10 MB
# API_REQUEST_LOG_BACKUPS=5
# API_REQUEST_LOG_DISCORD=true # false omits outbound Discord REST traffic (inbound interactions still logged)
# API_REQUEST_LOG_CONSOLE=false # also mirror to stdout / docker logs
# API_REQUEST_LOG_BODY=openai,tavily # services with logged request/response bodies ('all'/'none')
# API_REQUEST_LOG_BODY_MAX_CHARS=20000 # per-body truncation limit
# --- Conversations (multi-turn chat memory) ---
# CONVERSATIONS_DB_PATH=data/conversations.db
# CONVERSATIONS_TTL_SECONDS=1800 # conversation expires after this much inactivity
# CONVERSATIONS_MAX_STORED=200 # max conversations kept per flow (chat/ask)
# CONVERSATIONS_MAX_TURNS=24 # max turns stored per conversation
# CONVERSATIONS_HISTORY_TURNS=16 # turns replayed to the LLM per request
# CONVERSATIONS_GAP_MESSAGES=20 # max channel msgs captured between turns as text + images (0 disables)
# CHAT_MENTION_ENABLED=true # allow @bot mention to trigger chat mode (same as /chat)
# CHAT_MENTION_CONTINUE_ENABLED=true # a mention continues the bot's conversation if its message is within CHANNEL_CONTEXT_MESSAGES
# CHANNEL_CONTEXT_MESSAGES=10 # recent channel msgs + images auto-injected into /ask, /chat and @mention (0 disables)
# CHANNEL_CONTEXT_IMAGES_ENABLED=true # also send images from those msgs (and follow-up gaps); false for text-only CHAT_MODELs
# CHANNEL_CONTEXT_IMAGE_MAX_AGE_MINUTES=60 # only channel images newer than this are sent (0 = no age limit)
# CHANNEL_CONTEXT_REACTIONS_ENABLED=true # show reactions on channel-context lines
# REACTION_USERS_LIMIT=5 # reactor names per reaction (one API call each, cached); 0 = counts only
# REACTION_TOOL_ENABLED=true # let the model add reactions (current channel only, 3 per answer)
# --- Trajectory replay (verbatim replay of the LLM's internal tool-calling steps) ---
# CONVERSATIONS_TRAJECTORY_ENABLED=true # capture + replay internal steps (tool calls/results)
# CONVERSATIONS_TRAJECTORY_TURNS=6 # most recent N turns replayed verbatim (older -> compact Q/A)
# CONVERSATIONS_TRAJECTORY_STEP=3 # window advances in steps of N turns (prefix-cache hysteresis)
# CONVERSATIONS_TRAJECTORY_MAX_CHARS=120000 # hard budget on replayed trajectory payload
# --- Vision images (download once, re-encode, inline as base64 data URIs) ---
# IMAGE_MAX_SIDE=640 # max dimension (px) of re-encoded JPEGs
# IMAGE_JPEG_QUALITY=80
# IMAGES_DIR=data/images
# IMAGE_RETENTION_SECONDS=86400 # stored images swept after this
# CONVERSATIONS_IMAGE_TURNS=3 # inline images only for the most recent N history turns
# --- Memory (persistent bot memory) ---
# MEMORY_ENABLED=true
# MEMORY_DB_PATH=data/memory.db
# MEMORY_LOG_CHANNEL_ID= # Discord channel for mutation-log embeds (Revert button); empty = console only
# MEMORY_BOT_WRITE_LIMIT=20 # max memory_write calls per hour per guild
# MEMORY_INJECT_LIMIT=5 # semantically selected memories injected per turn
# MEMORY_PIN_LIMIT=12 # max pinned memories per guild (bot is capped; admins bypass)
# MEMORY_MAX_PER_SUBJECT=200
# MEMORY_SEMANTIC_MIN_SCORE=0.35 # min cosine for semantic search/injection hits
# MEMORY_DEDUPE_THRESHOLD=0.85 # cosine above which a create is refused as duplicate
# LORE_DB_PATH=data/lore.db # legacy lore DB — one-time migration source for memory.db
# --- Channel summaries (/resumo + summarize_channel tool) ---
# SUMMARY_ENABLED=true
# SUMMARY_MODEL= # defaults to CHAT_MODEL; a cheaper model is usually fine
# SUMMARY_MAX_MESSAGES=1000 # max messages read per summary (newest kept)
# SUMMARY_MAX_DAYS=7 # max lookback
# SUMMARY_SEGMENT_CHARS=24000 # chars per LLM call; longer ranges are summarized map-reduce style
# --- History RAG (entire server) ---
# HISTORY_ENABLED=true
# HISTORY_VECTOR_STORE_DIR=data/history
# HISTORY_DB_PATH=data/history/history.db # defaults to <HISTORY_VECTOR_STORE_DIR>/history.db
# HISTORY_WINDOW_SIZE=5 # local context window (prev msgs per chunk)
# HISTORY_WINDOW_OVERLAP=1 # overlap between consecutive chunks
# HISTORY_BACKFILL_LIMIT= # empty = no limit, or e.g. 2000 per channel per run (restarts resume after the newest indexed msg)
# HISTORY_MAX_MSG_LENGTH=800
# HISTORY_EXCLUDE_BOTS=true
# HISTORY_INGEST_BATCH_SIZE=10 # messages per embedding batch during live ingestion
# HISTORY_INGEST_FLUSH_SECONDS=2.0 # max delay before a partial batch is flushed
# HISTORY_SNAPSHOT_INTERVAL=300 # seconds between vector-store snapshots to disk
# HISTORY_QUERY_CACHE_SIZE=200 # LRU query result cache
# HISTORY_DEDUPE_WINDOW_MINUTES=10 # adjacent results in the same channel merged; 0 disables
# --- History search quality ---
# HISTORY_RERANK_ENABLED=true
# HISTORY_RERANK_PROVIDER=auto # defaults to RERANK_PROVIDER
# HISTORY_RERANK_MODEL= # defaults to LOCAL_RERANK_MODEL
# HISTORY_TIME_DECAY_LAMBDA=0.0 # exp decay on recency for 'recent' sorting; 0 disables
# HISTORY_HYBRID_WEIGHT_SEMANTIC=0.65 # semantic vs keyword blend for hybrid search
# HISTORY_HYBRID_WEIGHT_KEYWORD=0.35
# HISTORY_RRF_K=60 # reciprocal-rank-fusion constant
# --- History SQL tool (read-only LLM analytics over the history DB) ---
# HISTORY_SQL_TOOL_ENABLED=true
# HISTORY_SQL_TIMEOUT_SECONDS=30
# HISTORY_SQL_MAX_ROWS=200