Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
138 lines (112 loc) · 7.09 KB
/
Copy path.env.example
File metadata and controls
138 lines (112 loc) · 7.09 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
# Copy to .env in the repo root and fill in. Never commit .env.
# Services look for .env in their folder and the folders above it, up to the repo root.
# Set KAYA_ENV_FILE to use a different file. Real environment variables always win over the file.
# Compose files for this machine. compose.victus.yml replaces compose.mac.yml on the Victus.
COMPOSE_FILE=compose.yml:compose.mac.yml
# trace | debug | info | warn | error | fatal
LOG_LEVEL=info
# Where Kaya keeps its files (generated documents, browser profile, models). /srv/kaya on the Victus.
# A relative path is resolved from the folder this file is in.
DATA_DIR=./data
# Time zone Kaya reads and writes times in (an IANA name such as Asia/Kolkata). Default UTC.
TIMEZONE=UTC
# Ports for each service's HTTP server (health checks; the gateway also serves the QR page)
CORE_PORT=3000
GATEWAY_PORT=3001
# Address the HTTP servers bind to when run from source. Compose sets 0.0.0.0 inside containers
# and publishes the ports on 127.0.0.1 only.
LISTEN_HOST=127.0.0.1
# Postgres container. Use letters and digits in the password, or URL-encode it in DATABASE_URL.
# Inside Compose, services reach the db at db:5432 with these values.
POSTGRES_USER=kaya
POSTGRES_PASSWORD=kaya
POSTGRES_DB=kaya
# Host port for the db. Change it (and DATABASE_URL) if another Postgres already uses 5432.
POSTGRES_PORT=5432
# Required. Passwords for the two logins the services use (kaya_gateway and kaya_core). Each can
# only touch its own tables; POSTGRES_PASSWORD above is the admin login, used for migrations only.
# Letters and digits. Change all three from these development values before real chats go in.
GATEWAY_DB_PASSWORD=gatewaydev
CORE_DB_PASSWORD=coredev
# Required when running a service from source (Compose builds its own). Each service reads its own
# URL and falls back to DATABASE_URL, which the database tests and tools use.
GATEWAY_DATABASE_URL=postgres://kaya_gateway:gatewaydev@localhost:5432/kaya
CORE_DATABASE_URL=postgres://kaya_core:coredev@localhost:5432/kaya
DATABASE_URL=postgres://kaya:kaya@localhost:5432/kaya
# Media (photos, voice notes, documents) is downloaded only when asked for (make media id=...).
# Largest file the gateway will download, in bytes, and how many files it will download in an hour.
MEDIA_MAX_BYTES=104857600
MEDIA_MAX_PER_HOUR=60
# groq | compatible | stub. compatible is any OpenAI-compatible service (see LLM_BASE_URL below);
# stub answers locally without any API, for development and tests.
LLM_PROVIDER=groq
# Required when LLM_PROVIDER=groq. From https://console.groq.com/keys
GROQ_API_KEY=
# Model for multi-step and tool work, and for routine work
GROQ_MODEL_HEAVY=openai/gpt-oss-120b
GROQ_MODEL_ROUTINE=openai/gpt-oss-20b
# Most tokens of context (system prompt, conversation, the question) one request may carry. Groq's
# models take 131k, but the free tier allows 8,000 tokens a minute for the question and the answer
# together, and an answer may use up to 3,072 with its reasoning, so 2,000 keeps one question with
# room to spare. Raise it on a paid tier.
GROQ_CONTEXT_TOKENS=2000
# Any other model, with no code change: set LLM_PROVIDER=compatible and point these at any service
# with an OpenAI-compatible API (OpenAI, Gemini, OpenRouter, Anthropic's compatible endpoint, or
# Ollama on this machine). The GROQ_* settings are then ignored, except the key for voice notes.
# LLM_BASE_URL=https://generativelanguage.googleapis.com/v1beta/openai
# LLM_API_KEY=
# LLM_MODEL_HEAVY= the model that writes your answers
# LLM_MODEL_ROUTINE= background work (tagging, facts, planning); defaults to the heavy one
# LLM_CONTEXT_TOKENS=4000 how much each request may carry
# LLM_REASONING_EFFORT=false true only if the API takes reasoning_effort (OpenAI's reasoning models, Gemini)
# LLM_TOKEN_FACTOR=1.25 Kaya counts tokens exactly only for gpt-oss and OpenAI models; this leaves room for others
# LLM_LOCALITY=cloud local only for a model on this machine or network (Ollama): nothing is masked for it
#
# The background work can use a provider of its own, for example a second account or a local
# model, so it never eats the allowance your answers need. Same settings with ROUTINE_LLM_ in front,
# and one model:
# ROUTINE_LLM_PROVIDER= groq or compatible; empty uses LLM_PROVIDER for everything
# ROUTINE_LLM_API_KEY=
# ROUTINE_LLM_MODEL= for groq, openai/gpt-oss-20b by default
# ROUTINE_LLM_BASE_URL= for groq, Groq's own by default
# Most routine-model tokens tagging new messages may spend a day (in TIMEZONE), so it never uses up
# the allowance questions need; when spent, tagging goes on the next day. 0 turns tagging off.
TAGGING_TOKENS_PER_DAY=100000
# Most alert messages Kaya sends you in an hour about messages that need you and reminders coming
# up; past it, alerts wait and go out together. There are no quiet hours. 0 turns alerts off;
# /alerts off and /alerts on switch them while Kaya runs.
ALERTS_PER_HOUR=10
# Most messages Kaya sends to your contacts and groups for you in an hour. Each one is drafted,
# shown to you, and sent only after you reply yes within 10 minutes. 0 turns this off.
SENDS_PER_HOUR=20
# Voice notes are transcribed by this Groq speech model: yours to Kaya become commands, everyone
# else's become searchable. The audio goes to Groq as it is (audio cannot be masked).
GROQ_MODEL_TRANSCRIBE=whisper-large-v3-turbo
# Voice notes go to Groq with GROQ_API_KEY unless these name another service with an
# OpenAI-compatible /audio/transcriptions endpoint. With no key at all, voice notes are not transcribed.
# TRANSCRIBE_BASE_URL=https://api.groq.com/openai/v1
# TRANSCRIBE_API_KEY=
# Web search goes through SearXNG, a search engine that runs in the stack and asks Google,
# DuckDuckGo and Yahoo for you, so no search account is needed. A query that holds a private
# detail (a phone number, email, address or code) is refused before it leaves.
# SEARXNG_SECRET signs SearXNG's own cookies: any long random string (openssl rand -hex 32).
SEARXNG_SECRET=change-me-to-a-long-random-string
# Where core reaches SearXNG. Compose sets http://searxng:8080 (on a Mac, the SearXNG that
# make searxng-mac runs); set it empty to turn web search off. From source on a Mac:
# WEB_SEARCH_URL=http://127.0.0.1:8888
# Where the gateway keeps downloaded files; core reads voice notes from here, read-only. Compose
# mounts the gateway's media folder at /media; when both run from source it is DATA_DIR/media.
# MEDIA_DIR=./data/media
# Who turns chat text into vectors for search. voyage: Voyage AI (cloud; every chunk is masked
# first, names go as they are). stub: local word hashing, for development and tests.
EMBEDDINGS_PROVIDER=voyage
# Voyage API key (https://dash.voyageai.com). Turn off "use API data for training" before use.
VOYAGE_API_KEY=
# Voyage model. Vectors from different models cannot be compared, so changing it makes the whole
# index again. Vectors always have 1024 dimensions.
VOYAGE_MODEL=voyage-4
# Where DJ talks to Kaya. gateway: his own WhatsApp chat, through the gateway. stub: in memory,
# for development and tests.
CHAT_CHANNEL=gateway
# Who places phone calls. Only stub (no real calls) until stage 13.
TELEPHONY_PROVIDER=stub