Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
77 lines (66 loc) · 3.79 KB
/
Copy path.env.example
File metadata and controls
77 lines (66 loc) · 3.79 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
# Lang2SQL v4.1 — copy to .env and fill in. Only DISCORD_BOT_TOKEN is required.
# Discord bot token from https://discord.com/developers/applications (Bot tab).
# Required to run `lang2sql-bot`; the bot exits with a clear error if it's unset.
DISCORD_BOT_TOKEN=
# Set to true only when you add/remove slash commands to re-sync with Discord.
# Leave unset (or false) during normal development to avoid rate limits.
LANG2SQL_SYNC_COMMANDS=
# Optional comma-separated parent-channel IDs where non-admin guild members may
# ask DB questions. Empty means admin-only. Threads inherit the parent channel.
# Only positive numeric Discord IDs are accepted; malformed values fail startup.
LANG2SQL_DISCORD_QUERY_CHANNEL_IDS=
# Durable SQLite state for the Discord bot (sessions, audit, semantic reviews,
# encrypted credentials). Keep this file private and back it up with the key.
LANG2SQL_DATA_PATH=lang2sql_data.db
# OpenAI API key. Optional: when set, the agent uses gpt-4.1-mini. When unset,
# it falls back to the offline FakeLLM (deterministic canned tool cycles — fine
# for a smoke run, not for real answers).
OPENAI_API_KEY=
# ── Local LLM (vLLM / Ollama) ────────────────────────────────────────────
# When LANG2SQL_LLM_BASE_URL is set it takes priority over OPENAI_API_KEY.
# Point to the base URL of any OpenAI-compatible server.
# vLLM: http://localhost:8000
# Ollama: http://localhost:11434
LANG2SQL_LLM_BASE_URL=
# Model name as the server expects it (e.g. Qwen/Qwen3-14B-AWQ for vLLM).
LANG2SQL_LLM_MODEL=
# First-connect Enrich mode. "auto" runs one metadata-only LLM pass when a real
# OpenAI-compatible provider is configured; otherwise DB comments and physical
# names are used, plus a same-source Enrich cache when available. No mode
# samples raw rows.
# Use "metadata" to disable the LLM pass, or "llm" to require an attempted pass
# whose failure is reported explicitly while the deterministic catalog remains.
LANG2SQL_AUTO_METADATA_ENRICH=auto
# Fernet key used to encrypt stored secrets (DSNs / API keys) at rest. Optional:
# if unset, a key is auto-generated and persisted in the SQLite kv table. Set it
# in production so secrets decrypt across restarts and machines. Generate one:
# python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"
LANG2SQL_SECRET_KEY=
# ── Database connection ──────────────────────────────────────────────────
# The default explorer is chosen from these (precedence: LANG2SQL_DB_URL, then
# Cloudflare D1, else an offline canned stub). Install the matching driver
# extra, e.g. uv sync --extra postgres (or bigquery/snowflake/mysql/duckdb).
#
# Any SQLAlchemy URL works (one adapter, many engines):
# postgresql+psycopg://user:pass@host:5432/dbname
# bigquery://project/dataset
# snowflake://user:pass@account/db/schema?warehouse=wh
# mysql+pymysql://user:pass@host/dbname
# duckdb:////absolute/path/to/file.duckdb
# oracle+oracledb://readonly_user:pass@localhost:1521/?service_name=FREEPDB1
# Oracle driver: uv sync --extra oracle (Thin mode, no Instant Client needed).
LANG2SQL_DB_URL=
# Optional default schema for the SQLAlchemy explorer.
LANG2SQL_DB_SCHEMA=
# Cloudflare D1 (used when LANG2SQL_DB_URL is unset). D1 is SQLite over an HTTP
# API — no driver needed. Find IDs in the Cloudflare dashboard → D1.
CLOUDFLARE_D1_ACCOUNT_ID=
CLOUDFLARE_D1_DATABASE_ID=
# API token with D1 read access (Account → API Tokens). Required for D1 queries.
CLOUDFLARE_API_TOKEN=
# Optional schema search. Use an OpenAI-compatible embeddings endpoint.
LANG2SQL_QDRANT_URL=
LANG2SQL_QDRANT_API_KEY=
LANG2SQL_EMBEDDING_URL=
LANG2SQL_EMBEDDING_MODEL=
LANG2SQL_EMBEDDING_API_KEY=