Files
chat/.env.example
T

75 lines
2.5 KiB
Bash

# --- server ---
# development locally; the NixOS module sets production (gates DRIVER_DEBUG).
NODE_ENV=development
PORT=3000
HOST=127.0.0.1
# ADMIN access key (plain). This is the admin account's key — it manages all
# other No-KYC accounts from the web UI (Accounts panel).
# Generate: openssl rand -base64 24
APP_PASSWORD=change-me
# Session TTL in hours (Bearer token stored in localStorage, no cookies)
SESSION_TTL_HOURS=720
# Data dir: holds kisassistant.db (SQLite: users, sessions, chats, shares)
DATA_DIR=./data
# Local file CDN (avatars). NixOS module points it under the state dir.
CDN_DIR=./cdn
# Local file CDN (avatars today, more namespaces tomorrow).
# Dev default is a folder next to the codebase; NixOS points it under state dir.
CDN_DIR=./cdn
# --- platform tools: OCR (tesseract binary) ---
# TESSERACT_BIN=/nix/store/…-tesseract-5.5.3/bin/tesseract
OCR_LANG=eng
OCR_MAX_CHARS=100000
# Per-driver debug logging to stdout ([driver:name] lines).
DRIVER_DEBUG=true
# Public docs wiki (Gitea wiki pages of this repo). GET /wiki redirects here.
WIKI_URL=https://git.kisakay.com/k/chat/wiki
# --- key recovery via email (optional — empty SMTP_HOST disables it) ---
SMTP_HOST=
SMTP_PORT=587
SMTP_SECURE=false
SMTP_USER=
SMTP_PASS=
SMTP_FROM=KisAssistant <[email protected]>
APP_URL=http://localhost:3000
RESET_TTL_MIN=60
# --- rate limit on /api/auth/login (per IP, sliding window) ---
RATE_LIMIT_MAX=5
RATE_LIMIT_WINDOW_MIN=10
# --- drivers ---
# Priority (global): ollama -> mistral -> glm -> arcaic -> deepseek -> anthropic -> openai
OLLAMA_HOST=http://10.66.66.4:11434
OLLAMA_ENABLED=true
# Stubs below: leave empty to keep disabled. Implemented last per spec.
MISTRAL_API_KEY=
MISTRAL_ENABLED=false
# GLM (Zhipu AI, OpenAI-compatible). Key from https://z.ai ; mainland China
# users point GLM_BASE_URL at https://open.bigmodel.cn/api/paas/v4 instead.
GLM_API_KEY=
GLM_ENABLED=false
# GLM_BASE_URL=https://api.z.ai/api/paas/v4
DEEPSEEK_API_KEY=
DEEPSEEK_ENABLED=false
ANTHROPIC_API_KEY=
ANTHROPIC_ENABLED=false
OPENAI_API_KEY=
OPENAI_ENABLED=false
# Gemini (Google AI, OpenAI-compatible endpoint). Key from https://aistudio.google.com/apikey
GEMINI_API_KEY=
GEMINI_ENABLED=false
# Arcaic backend (headless browser, throwaway profile per process).
# Every process launch creates a throwaway Firefox profile (deleted on exit).
ARCAIC_ENABLED=false
ARCAIC_EXECUTABLE=firefox
# Headless by default; set to false to watch the window (debugging, or if a
# manual login is ever required).
ARCAIC_HEADLESS=true
ARCAIC_LOGIN_TIMEOUT_S=300
ARCAIC_RESPONSE_TIMEOUT_S=300