Skip to main content
LibreChat is joining ClickHouse to power the open-source Agentic Data Stack 🎉 Learn more
LibreChat

NEAR AI 云端

在 LibreChat 中将 NEAR AI Cloud 配置为自定义 endpoint。

NEAR AI Cloud 提供了一个兼容 OpenAI 的 endpoint,你可以通过 endpoints.custom 将其添加到 LibreChat 中。

获取 API key

NEAR AI Cloud 创建一个 API key。将其添加到你的 .env 文件中:

NEARAI_API_KEY=your-api-key

配置

在你的 librechat.yaml 中,将 endpoint 添加到 endpoints.custom 下:

    - name: "nearai"
      apiKey: "${NEARAI_API_KEY}"
      baseURL: "https://cloud-api.near.ai/v1"
      models:
        default:
          - "z-ai/glm-5.2"
          - "deepseek-ai/DeepSeek-V4-Flash"
        fetch: true
      titleConvo: true
      titleModel: "z-ai/glm-5.2"
      modelDisplayLabel: "NEAR AI Cloud"

若要允许每个用户通过 LibreChat UI 提供他们自己的密钥,而不是从 .env 中读取,请设置 apiKey: "user_provided"

注意事项

  • 当设置 fetch: true 时,LibreChat 会从 NEAR AI Cloud 兼容 OpenAI 的 /v1/models endpoint 加载模型列表。default 数组仅作为初始选择。
  • 请完全按照 NEAR AI Cloud model catalog 中显示的格式使用 model ID。
  • 模型可用性可能会随时间而变化。如果所选模型不可用,请从目录中选择另一个支持聊天的模型。

这篇指南怎么样?