> For the complete documentation index, see [llms.txt](https://docs.console.zenlayer.com/welcome/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.console.zenlayer.com/welcome/cn/ai-gateway/ai-gateway-integration/lobehub-chat.md).

# LobeHub Chat

## 常见配置参数 <a href="#chang-jian-pei-zhi-can-shu" id="chang-jian-pei-zhi-can-shu"></a>

要将应用连接到 AI 网关，请复制以下 URL，将其中的 `{APPLICATION_URL}` 和 `sk-xxxxxxxxxxxxxx` 替换为实际值，然后**在浏览器中打开**该链接。

```perl
https://{APPLICATION_URL}/?settings={
  "keyVaults": {
    "openai": {
      "apiKey": "sk-xxxxxxxxxxxxxx",
      "baseURL": "https://gateway.theturbo.ai"
    }
  },
  "languageModel": {
    "openai": {
      "autoFetchModelLists": true,
      "enabled": true,
      "enabledModels": [
        "gpt-4o",
        "gpt-4o-mini",
        "o1-preview",
        "o1-mini",
        "gpt-4o-2024-08-06",
        "gpt-4-turbo",
        "chatgpt-4o-latest",
        "claude-3-5-sonnet-20240620",
        "claude-3-haiku-20240307",
        "claude-3-opus-20240229",
        "claude-3-sonnet-20240229",
        "gemini-1.5-flash-latest",
        "gemini-1.5-pro-latest"
      ]
    },
    "ollama": {
      "enabled": false
    }
  },
  "check_updates": false
}

```

<table><thead><tr><th width="194.70703125">参数</th><th>说明</th></tr></thead><tbody><tr><td><code>{APPLICATION_URL}</code></td><td>你已部署的 AI 应用访问地址（例如聊天 UI 或桌面 Web 应用）</td></tr><tr><td><code>key</code></td><td>创建 AI 网关实例后生成的 API 密钥，用于对所有请求进行身份认证</td></tr><tr><td><code>url</code></td><td>AI 网关服务的基础访问地址，即 <code>https://gateway.theturbo.ai</code></td></tr></tbody></table>

{% hint style="info" %} <mark style="color:blue;">**注意**</mark>

<mark style="color:blue;">你可以访问</mark> [<mark style="color:blue;">**Github**</mark>](http://github.com/lobehub/lobehub) <mark style="color:blue;">查看更详细的配置说明。</mark>
{% endhint %}

## 应用配置 – 语言模型（OpenAI）

如需在应用中手动配置 AI 网关，请按以下步骤操作：

1. 进入 **Application Settings > Language Models > OpenAI**。
2. 在 **API Key** 字段中，输入你的 AI 网关 API Key。
3. 在 **Base URL** 字段中，输入：

   ```
   https://gateway.theturbo.ai
   ```
4. 点击 **Fetch Model List**，从 AI 网关获取可用模型列表。
5. 在模型列表中，选择并启用你需要使用的模型。
6. 配置完成后，应用将通过 AI 网关路由所有模型请求。
