-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
103 lines (91 loc) · 4.31 KB
/
.env.example
File metadata and controls
103 lines (91 loc) · 4.31 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
# =============================================================================
# ctx by GottZ — Environment Configuration
# The memory your LLM pretends to have.
# https://github.com/GottZ/ctx | hire@gottz.de
#
# Copy to .env and fill in real values:
# cp .env.example .env
#
# Generate secrets:
# openssl rand -hex 32 # 64-char hex string (API keys, passwords)
# openssl rand -base64 32 # 44-char base64 string (encryption keys)
# openssl rand -hex 16 # 32-char hex string (shorter secrets)
# =============================================================================
# --- PostgreSQL (admin) ---
POSTGRES_DB=n8n
POSTGRES_USER=admin
POSTGRES_PASSWORD=CHANGE_ME # openssl rand -hex 32
# --- PostgreSQL (application user) ---
POSTGRES_NON_ROOT_USER=n8n
POSTGRES_NON_ROOT_PASSWORD=CHANGE_ME # openssl rand -hex 32
# --- Context Store Database ---
CONTEXT_DB=context_store
CONTEXT_DB_USER=context_user
CONTEXT_DB_PASSWORD=CHANGE_ME # openssl rand -hex 32
# CONTEXT_DB_HOST=localhost # default: localhost (docker service name)
# CONTEXT_DB_PORT=5432 # default: 5432
# CONTEXT_DB_SSLMODE=disable # default: disable
# --- Context Store API Keys ---
# Used for X-Context-Key header authentication. SHA-256 hashed in DB.
CONTEXT_API_KEY_PRIVATE=CHANGE_ME # openssl rand -hex 32
CONTEXT_API_KEY_WORK=CHANGE_ME # openssl rand -hex 32
# --- Base URL ---
# Used by test.sh, eval.sh, ctx CLI, and scripts.
WEBHOOK_BASE_URL=https://ctx.example.com
# =============================================================================
# INFERENCE PIPELINES
#
# Three independent pipelines, each configurable with its own provider:
# Embed — embedding generation (query + document)
# Chat — LLM synthesis, translation, reranking
# Dream — background cross-reference evaluation
#
# Each pipeline: HOST + API_KEY + MODEL (+ pipeline-specific options).
# API keys: empty = no auth header (local inference). Non-empty = Bearer token.
# =============================================================================
# --- Embedding Pipeline ---
CTX_EMBED_HOST=http://localhost:11434
CTX_EMBED_MODEL=qwen3-embedding:8b
CTX_EMBED_DIMS=4096 # native dims before Matryoshka truncation to 1024
CTX_EMBED_NUM_CTX=2048 # 0 = model default (reduces VRAM)
# CTX_EMBED_API_KEY= # empty = no auth (local inference)
# --- Synthesis (Chat) Pipeline ---
CTX_CHAT_HOST=http://localhost:11434
CTX_CHAT_MODEL=qwen3.5:9b
CTX_CHAT_THINK=false # "true"/"false"/"" (omit). Required false for qwen3.5
# CTX_CHAT_API_KEY= # empty = no auth
# CTX_CHAT_NUM_CTX=0 # 0 = model default
# --- Dream Pipeline (background cross-referencing) ---
# CTX_DREAM_ENABLED=true # default: false
# CTX_DREAM_HOST=http://localhost:11434 # default: CTX_CHAT_HOST
# CTX_DREAM_MODEL=qwen3.5:27b # empty = use CTX_CHAT_MODEL
# CTX_DREAM_THINK=false # empty = use CTX_CHAT_THINK
# CTX_DREAM_API_KEY= # empty = no auth
# CTX_DREAM_NUM_CTX=16384 # 0 = model default
# --- Reranker (optional) ---
# CTX_RERANK_ENABLED=false # default: false
# --- Timezone ---
# CTX_TIMEZONE=Europe/Berlin # default: UTC. For correct "heute"/"gestern" resolution.
# =============================================================================
# CLOUD PROVIDER EXAMPLES
#
# Embeddings always stay local (vector space incompatibility on model switch).
# Synthesis and Dream can be routed to cloud providers independently.
#
# Claude Haiku for synthesis:
# CTX_CHAT_HOST=https://api.anthropic.com
# CTX_CHAT_API_KEY=sk-ant-...
# CTX_CHAT_MODEL=claude-haiku-4-5
# CTX_CHAT_THINK=
#
# Groq for dream (50% batch discount, no VRAM needed):
# CTX_DREAM_HOST=https://api.groq.com/openai/v1
# CTX_DREAM_API_KEY=gsk_...
# CTX_DREAM_MODEL=llama-3.3-70b-versatile
# CTX_DREAM_THINK=
#
# Gemini for synthesis (free tier: 250 queries/day):
# CTX_CHAT_HOST=https://generativelanguage.googleapis.com/v1beta/openai
# CTX_CHAT_API_KEY=AIza...
# CTX_CHAT_MODEL=gemini-2.5-flash
# =============================================================================