Files
AI-VideoAssistant/docs/content/getting-started/configuration.md

1.3 KiB
Raw Blame History

配置说明

环境变量

在项目根目录或 web 目录下创建 .env 文件:

# API 服务地址
VITE_API_URL=http://localhost:8080

# Gemini API Key可选
VITE_GEMINI_API_KEY=your_api_key_here

变量说明

变量 必填 说明 默认值
VITE_API_URL 后端 API 服务地址 http://localhost:8080
VITE_GEMINI_API_KEY Google Gemini API 密钥 -

后端服务配置

后端服务使用独立的配置文件,位于 api/config/ 目录:

数据库配置

database:
  host: localhost
  port: 5432
  name: ai_assistant
  user: postgres
  password: your_password

Redis 配置

redis:
  host: localhost
  port: 6379
  db: 0

Engine 服务配置

Engine 服务配置位于 engine/config/ 目录:

助手默认配置

参考 engine/config/agents/default.yaml

agent:
  name: "默认助手"
  language: "zh-CN"
  temperature: 0.7
  max_tokens: 2048

多环境配置

开发环境

# .env.development
VITE_API_URL=http://localhost:8080

生产环境

# .env.production
VITE_API_URL=https://api.your-domain.com

配置优先级

  1. 命令行参数
  2. 环境变量
  3. .env 文件
  4. 默认值