-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
79 lines (69 loc) · 3.27 KB
/
Copy path.env.example
File metadata and controls
79 lines (69 loc) · 3.27 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
# Required: default API key. Used by any tier (large/small/embedder) that
# doesn't have its own LARGE_LLM_API_KEY / SMALL_LLM_API_KEY / EMBEDDER_API_KEY set.
OPENAI_API_KEY=sk-replace-with-your-key
# Optional: default base URL fallback for all tiers
# OPENAI_BASE_URL=https://api.openai.com/v1
# ---------------------------------------------------------------------------
# Multi-model configuration (v0.2+)
#
# Cogram has three LLM tiers — pick the model + endpoint for each independently
# so you can route the heavy extraction call to OpenAI/Anthropic and the cheap
# pipeline calls to DeepSeek/Qwen/Ollama for cost.
#
# LARGE — graphiti's entity/edge extraction (multi-shot, the heaviest call)
# SMALL — intent annotation, narration, profile distill, contradiction class
# (one-shot structured-output, fired ~5x per episode)
# EMBED — embeddings (entities, edges, episodes, narratives)
#
# Each tier has THREE optional env vars; if unset, falls back to OPENAI_API_KEY +
# OPENAI_BASE_URL. Defaults are gpt-4o-mini everywhere — adequate for first run.
#
# Backward-compat (v0.1 names still work as fallback):
# GRAPHITI_LLM_MODEL → LARGE_LLM_MODEL
# ANNOTATOR_LLM_MODEL → SMALL_LLM_MODEL
# EMBEDDING_MODEL → EMBEDDER_MODEL
# ---------------------------------------------------------------------------
# LARGE tier — graphiti extraction (default: gpt-4o-mini, but gpt-4o or claude
# sonnet here will measurably improve entity/edge quality).
LARGE_LLM_MODEL=gpt-4o-mini
# LARGE_LLM_API_KEY=sk-...
# LARGE_LLM_BASE_URL=https://api.openai.com/v1
# SMALL tier — annotation/narration/profile/contradiction. Cheap providers like
# DeepSeek or local Ollama are great here.
SMALL_LLM_MODEL=gpt-4o-mini
# SMALL_LLM_API_KEY=sk-...
# SMALL_LLM_BASE_URL=https://api.deepseek.com/v1
# Example local Qwen via Ollama:
# SMALL_LLM_MODEL=qwen2.5:7b
# SMALL_LLM_API_KEY=ollama
# SMALL_LLM_BASE_URL=http://host.docker.internal:11434/v1
# EMBEDDER tier — text-embedding-3-small is plenty; bump to -large for higher
# recall (and 3072 dims; remember to set EMBEDDING_DIM to match).
EMBEDDER_MODEL=text-embedding-3-small
EMBEDDING_DIM=1536
# EMBEDDER_API_KEY=sk-...
# EMBEDDER_BASE_URL=https://api.openai.com/v1
# Local Gemma for knot synthesis (optional — falls back to gpt-4o-mini)
# Run `ollama pull gemma3:4b && ollama serve` on the host
GEMMA_BASE_URL=http://host.docker.internal:11434/v1
GEMMA_MODEL=gemma3n:e4b
# Rate limit + cost guards
#
# Two gates apply to every LLM/embedder call. RATE_LIMIT_PER_MIN is the
# global cap (protects upstream provider quotas). RATE_LIMIT_PER_GROUP_PER_MIN
# is the per-group_id cap (prevents one noisy group from starving others —
# default 50 is roughly 1/3 of the global cap so 3+ active groups can run in
# parallel without contention). Set RATE_LIMIT_PER_GROUP_PER_MIN=0 to disable
# per-group fairness and rely on the global cap only.
RATE_LIMIT_PER_MIN=150
RATE_LIMIT_PER_GROUP_PER_MIN=50
MAX_DAILY_INGEST_CALLS=300
# Memory caps for Neo4j (lower for dev machines)
NEO4J_HEAP=512m
NEO4J_PAGECACHE=256m
# Trainer knobs (deferred until you decide to train)
BASE_MODEL=google/gemma-3-4b-it
TRAINER_MIN_SAMPLES=20
# Cogram pipeline mode: "async" (default, fire-and-forget) or "sync" (blocks MCP response)
COGRAM_PIPELINE_MODE=async
COGRAM_FULL_PIPELINE=true