File size: 2,680 Bytes
6086e71
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# ─────────────────────────────────────────────────────────
# PlainSQL Enterprise β€” Environment Configuration
# Copy this file to .env and fill in your values
# ─────────────────────────────────────────────────────────

# ── App Settings ─────────────────────────────────────────
APP_NAME=PlainSQL
ENV=development
DEBUG=true
LOG_LEVEL=INFO

# ── Database ─────────────────────────────────────────────
DB_URI=mysql+pymysql://root:YOUR_PASSWORD@localhost:3306/chatbot
DB_POOL_SIZE=10
DB_QUERY_TIMEOUT=30

# ── Redis (optional β€” falls back to in-memory) ──────────
REDIS_URL=redis://localhost:6379/0
CACHE_TTL_SECONDS=300

# ── Authentication ───────────────────────────────────────
# Generate with: openssl rand -hex 32
JWT_SECRET_KEY=change-me-in-production-use-openssl-rand-hex-32
JWT_EXPIRY_HOURS=8

# ── LLM Providers (at least one required) ───────────────
HUGGINGFACEHUB_API_TOKEN=your_hf_token_here
DEFAULT_LLM_PROVIDER=huggingface
DEFAULT_MODEL=Qwen/Qwen2.5-Coder-32B-Instruct

# OpenAI (optional)
# OPENAI_API_KEY=sk-your-key-here

# Anthropic (optional)
# ANTHROPIC_API_KEY=sk-ant-your-key-here

# Ollama local (optional)
# OLLAMA_BASE_URL=http://localhost:11434

# ── RAG Settings ─────────────────────────────────────────
CHROMA_PERSIST_DIR=./chroma_db
RAG_TOP_K=5

# ── Safety Limits ────────────────────────────────────────
MAX_QUERY_ROWS=1000
QUERY_TIMEOUT_SECONDS=30

# ── Rate Limiting ────────────────────────────────────────
RATE_LIMIT_RPM=60

# ── Observability (optional) ────────────────────────────
# LANGSMITH_API_KEY=your_langsmith_key
# LANGSMITH_PROJECT=plainsql

# ── CORS ─────────────────────────────────────────────────
CORS_ORIGINS=["http://localhost:3000","http://127.0.0.1:5500"]