ai-chatbot/.env.example
Your Name d58b706799
Some checks failed
Lint / build (20) (push) Has been cancelled
security: implement Phase 1 & partial Phase 2 improvements
- Remove hardcoded admin password, use env var or auto-generate
- Fix trustHost to be conditional (Vercel-only by default)
- Add HTTP security headers (CSP, X-Frame-Options, HSTS)
- Create middleware.ts to activate existing rate limiting
- Implement structured logging system
- Rewrite error handling in ai-cad service
- Update security documentation
2026-05-05 22:49:57 +08:00

74 lines
2.7 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Generate a random secret: https://generate-secret.vercel.app/32 or `openssl rand -base64 32`
AUTH_SECRET=****
# Auth URL (optional in Vercel, required for self-hosted)
# Set to your application's public URL, e.g. https://your-domain.com
# Also accepted as NEXTAUTH_URL (deprecated, prefer AUTH_URL)
AUTH_URL=
# 仅在受信反向代理(如 Vercel、Nginx with validated Host header)后部署时设为 true
# 开启后禁用 next-auth 的 Host 头校验,非受信环境不要开启
AUTH_TRUST_HOST=false
# Google OAuth (optional)
# https://console.cloud.google.com/apis/credentials
GOOGLE_CLIENT_ID=
GOOGLE_CLIENT_SECRET=
# Admin user credentials (used by create-admin.ts one-time setup script)
# Set both to provision the initial admin account; if omitted, auto-generated
ADMIN_EMAIL=
ADMIN_PASSWORD=
# The following keys below are automatically created and
# added to your environment when you deploy on Vercel
# Instructions to create an AI Gateway API key here: https://vercel.com/ai-gateway
# API key required for non-Vercel deployments
# For Vercel deployments, OIDC tokens are used automatically
# https://vercel.com/ai-gateway
AI_GATEWAY_API_KEY=****
# Instructions to create a Vercel Blob Store here: https://vercel.com/docs/vercel-blob
BLOB_READ_WRITE_TOKEN=****
# Instructions to create a PostgreSQL database here: https://vercel.com/docs/postgres
POSTGRES_URL=****
# Instructions to create a Redis store here:
# https://vercel.com/docs/redis
REDIS_URL=****
# DashScope / 通义千问配置
# 请求地址(阿里云 DashScope OpenAI 兼容接口)
DASHSCOPE_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1
# API Key(请在本地 .env.local 和 服务器环境中填写真实值,不要把真实 Key 提交到代码仓库)
DASHSCOPE_API_KEY=your-dashscope-api-key
# 第三方 GPT5 提供方配置(OpenAI 兼容接口)
# API 基础地址(例如:https://api.huandutech.com)
GTP5_API_URL=https://api.huandutech.com
# API Key(请在本地 .env.local 和 服务器环境中填写真实值,不要把真实 Key 提交到代码仓库)
GTP5_API_KEY=your-gtp5-api-key
# 模型名称(例如:gpt-5-nano)
GTP5_MODEL=gpt-5-nano
# Tripo3D(可选)
# 优先使用系统设置-本地AI里的 `tripo-3d` 提供商;若未配置则回退到环境变量
TRIPO_API_KEY=your-tripo-api-key
TRIPO_BASE_URL=https://api.tripo3d.ai/v2/openapi
# KittyCAD / Zoo Text-to-CAD(可选)
# 优先使用系统设置-本地AI里的 `kittycad-cad` 提供商;若未配置则回退到环境变量
KITTYCAD_API_TOKEN=your-kittycad-api-token
KITTYCAD_BASE_URL=https://api.zoo.dev
# FAL.ai(可选)
# 用于图片生成和编辑;若未配置则回退到系统设置中的 AI 提供商
FAL_KEY=your-fal-ai-key