add-provider-doc

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Adding New AI Provider Documentation

添加新AI提供商文档

Complete workflow for adding documentation for a new AI provider.
为新AI提供商添加文档的完整工作流。

Overview

概述

  1. Create usage documentation (EN + CN)
  2. Add environment variable documentation (EN + CN)
  3. Update Docker configuration files
  4. Update .env.example
  5. Prepare image resources
  1. 创建使用文档(英文 + 中文)
  2. 添加环境变量文档(英文 + 中文)
  3. 更新Docker配置文件
  4. 更新.env.example
  5. 准备图片资源

Step 1: Create Provider Usage Documentation

步骤1:创建提供商使用文档

Required Files

所需文件

  • docs/usage/providers/{provider-name}.mdx
    (English)
  • docs/usage/providers/{provider-name}.zh-CN.mdx
    (Chinese)
  • docs/usage/providers/{provider-name}.mdx
    (英文)
  • docs/usage/providers/{provider-name}.zh-CN.mdx
    (中文)

Key Requirements

关键要求

  • 5-6 screenshots showing the process
  • Cover image for the provider
  • Real registration and dashboard URLs
  • Pricing information callout
  • Never include real API keys - use placeholders
Reference:
docs/usage/providers/fal.mdx
  • 5-6张展示流程的截图
  • 提供商封面图
  • 真实的注册和仪表盘URL
  • 定价信息提示框
  • 绝对不要包含真实API密钥 - 使用占位符
参考示例:
docs/usage/providers/fal.mdx

Step 2: Update Environment Variables Documentation

步骤2:更新环境变量文档

Files to Update

需要更新的文件

  • docs/self-hosting/environment-variables/model-provider.mdx
    (EN)
  • docs/self-hosting/environment-variables/model-provider.zh-CN.mdx
    (CN)
  • docs/self-hosting/environment-variables/model-provider.mdx
    (英文)
  • docs/self-hosting/environment-variables/model-provider.zh-CN.mdx
    (中文)

Content Format

内容格式

markdown
undefined
markdown
undefined

{PROVIDER}_API_KEY

{PROVIDER}_API_KEY

  • Type: Required
  • Description: API key from {Provider Name}
  • Example:
    {api-key-format}
  • 类型:必填
  • 描述:来自{提供商名称}的API密钥
  • 示例:
    {api-key-format}

{PROVIDER}_MODEL_LIST

{PROVIDER}_MODEL_LIST

  • Type: Optional
  • Description: Control model list. Use
    +
    to add,
    -
    to hide
  • Example:
    -all,+model-1,+model-2=Display Name
undefined
  • 类型:可选
  • 描述:控制模型列表。使用
    +
    添加,
    -
    隐藏
  • 示例:
    -all,+model-1,+model-2=Display Name
undefined

Step 3: Update Docker Files

步骤3:更新Docker文件

Update all Dockerfiles at the end of ENV section:
  • Dockerfile
  • Dockerfile.database
  • Dockerfile.pglite
dockerfile
undefined
在所有Dockerfile的ENV部分末尾进行更新:
  • Dockerfile
  • Dockerfile.database
  • Dockerfile.pglite
dockerfile
undefined

{New Provider}

{新提供商}

{PROVIDER}_API_KEY="" {PROVIDER}_MODEL_LIST=""
undefined
{PROVIDER}_API_KEY="" {PROVIDER}_MODEL_LIST=""
undefined

Step 4: Update .env.example

步骤4:更新.env.example

bash
undefined
bash
undefined

{Provider Name}

{提供商名称}

{PROVIDER}_API_KEY={prefix}-xxxxxxxx

{PROVIDER}_API_KEY={prefix}-xxxxxxxx

undefined
undefined

Step 5: Image Resources

步骤5:图片资源

  • Cover image
  • 3-4 API dashboard screenshots
  • 2-3 LobeChat configuration screenshots
  • Host on LobeHub CDN:
    hub-apac-1.lobeobjects.space
  • 封面图
  • 3-4张API仪表盘截图
  • 2-3张LobeChat配置截图
  • 托管在LobeHub CDN:
    hub-apac-1.lobeobjects.space

Checklist

检查清单

  • EN + CN usage docs
  • EN + CN env var docs
  • All 3 Dockerfiles updated
  • .env.example updated
  • All images prepared
  • No real API keys in docs
  • 英文 + 中文使用文档
  • 英文 + 中文环境变量文档
  • 全部3个Dockerfile已更新
  • .env.example已更新
  • 所有图片已准备完成
  • 文档中无真实API密钥