env.example 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. # 修改为 .env.local 来使用捏
  2. # AI 提供商配置(JSON 格式)
  3. # 按顺序配置多个提供商,每个配置一个模型
  4. AI_PROVIDERS_CONFIG='[
  5. {
  6. "name": "primary_openai",
  7. "apiKey": "your_openai_api_key_here",
  8. "baseUrl": "https://api.openai.com/v1",
  9. "model": "gpt-4",
  10. "type": "openai",
  11. "retryCount": 2,
  12. "skipProbability": 0,
  13. "mode": "json" // 用于适配一些无法正常识别工具的模型
  14. },
  15. {
  16. "name": "gemini_provider",
  17. "apiKey": "your_gemini_api_key_here",
  18. "baseUrl": "https://generativelanguage.googleapis.com/v1beta",
  19. "model": "gemini-2.0-flash",
  20. "type": "google",
  21. "retryCount": 1,
  22. "skipProbability": 0.1
  23. },
  24. {
  25. "name": "backup_provider",
  26. "apiKey": "your_backup_api_key",
  27. "baseUrl": "https://api.backup-provider.com/v1",
  28. "model": "gpt-3.5-turbo",
  29. "type": "openai",
  30. "retryCount": 1,
  31. "skipProbability": 0.3
  32. }
  33. ]'
  34. # ===== 向后兼容配置(不推荐,建议使用上面的 JSON 配置) =====
  35. # AI_API_KEY=your_openai_api_key_here
  36. # AI_BASE_URL=https://api.openai.com/v1
  37. # AI_MODEL=gemini-2.0-flash
  38. NEXT_PUBLIC_GA_ID=G-XXXXXXXXXX