---
title: LibreChat | RunAPI
description: 為 RunAPI 設定 LibreChat 自訂端點，在 Docker 中掛載其 YAML 設定檔，重新啟動後驗證對話。
url: https://runapi.ai/zh-TW/docs/resources/application-practices/librechat.md
canonical: https://runapi.ai/zh-TW/docs/resources/application-practices/librechat
locale: zh-TW
---

> HTML 版本: https://runapi.ai/zh-TW/docs/resources/application-practices/librechat
> 代理程式網站索引: https://runapi.ai/llms.txt

# LibreChat

LibreChat 自訂端點屬於部署設定，而非每位使用者的連線表單。您需要存取 LibreChat 的部署檔案，以及從[身分驗證指南](https://runapi.ai/zh-TW/docs/guides/authentication.md)取得的標準 RunAPI API 金鑰。

## 安裝 LibreChat

使用[官方本機設定][1]安裝 LibreChat，或使用您現有的部署。請在新增自訂端點前完成安裝。



[1]: https://www.librechat.ai/docs/local

## 新增 RunAPI 端點

在 LibreChat 部署目錄中建立或更新 `librechat.yaml`。
將 `YOUR_RUNAPI_MODEL_ID` 替換為來自[模型
目錄](https://runapi.ai/zh-TW/models)的最新識別碼。

```yaml
version: 1.3.13
endpoints:
  custom:
    - name: "RunAPI"
      apiKey: "${RUNAPI_API_KEY}"
      baseURL: "https://runapi.ai/v1"
      models:
        default: ["YOUR_RUNAPI_MODEL_ID"]
        fetch: true
      titleConvo: true
      titleModel: "current_model"
      modelDisplayLabel: "RunAPI"
```

將金鑰存放於 `.env` 中，而非直接寫入 YAML 檔案：

```shell
RUNAPI_API_KEY=YOUR_RUNAPI_API_TOKEN
```

對於 Docker Compose，請確保 `docker-compose.override.yml` 掛載了
設定檔：

```yaml
services:
  api:
    volumes:
      - ./librechat.yaml:/app/librechat.yaml
```

變更上述任何檔案後，請重新啟動 LibreChat 部署。

## 選取模型

`models.default` 保證至少有一個已知的模型。啟用 `models.fetch: true` 時，LibreChat 也會請求目前的模型清單。即使啟用了探索功能，也請保留有效的預設識別碼，以便在探索功能暫時無法使用時，端點仍可正常運作。

## 驗證連線

重新啟動後，從端點選擇器中選取 **RunAPI**，選擇已設定的模型，並傳送 `Reply with the word connected.`。收到正常回應即確認部署設定與模型請求均正確無誤。

## 疑難排解

* **RunAPI 未出現在端點選擇器中：** 請驗證 YAML 縮排是否正確，確認 `docker-compose.override.yml` 已掛載該檔案，然後重新啟動 API 容器。
* **端點已載入但身分驗證失敗：** 請確認 `.env` 已為 API 容器定義 `RUNAPI_API_KEY`，若其環境已過時，請重新建立容器。
* **沒有顯示任何已擷取的模型：** 請在 `models.default` 中保留至少一個目前的識別碼，確認 `baseURL` 以 `/v1` 結尾，並檢查 API 容器日誌。
* **LibreChat 忽略已編輯的 YAML：** 請確認磁碟區掛載點中的主機路徑與容器路徑均指向您所修改的檔案。

如需共用協定行為，請參閱 [LLM API 快速入門](https://runapi.ai/zh-TW/docs/guides/llm-api/quickstart.md)。如需請求與回應欄位，請參閱 [Chat Completions API 參考](https://runapi.ai/zh-TW/docs/api/openai/chat-completions.md)。

---

## RunAPI 的更多內容

- [首頁](https://runapi.ai/zh-TW/.md)
- [模型目錄](https://runapi.ai/zh-TW/models.md)
- [價格](https://runapi.ai/zh-TW/pricing.md)
- [提供商](https://runapi.ai/zh-TW/models)
- [文件](https://runapi.ai/zh-TW/docs/guides)
- [SDK](https://runapi.ai/zh-TW/sdk.md)
- [CLI](https://runapi.ai/zh-TW/cli.md)
- [MCP Server](https://runapi.ai/zh-TW/mcp.md)
- [Claude Code 與 Cursor](https://runapi.ai/zh-TW/claude-code-vs-cursor.md)
- [Cursor API 設定](https://runapi.ai/zh-TW/cursor-api-setup.md)
- [RunAPI 與 OpenRouter](https://runapi.ai/zh-TW/openrouter-alternative.md)
- [企業版](https://runapi.ai/zh-TW/contact.md)
- [聯絡我們](https://runapi.ai/zh-TW/contact.md)
- [服務條款](https://runapi.ai/zh-TW/terms.md)
- [隱私權](https://runapi.ai/zh-TW/privacy.md)
- [代理程式網站索引](https://runapi.ai/llms.txt)

聯絡我們: contact@runapi.ai

## 結構化資料

```json
[
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-TW",
    "@type": "WebSite",
    "name": "RunAPI",
    "url": "https://runapi.ai/zh-TW",
    "potentialAction": {
      "@type": "SearchAction",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://runapi.ai/zh-TW/models?q={search_term_string}"
      },
      "query-input": "required name=search_term_string"
    }
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-TW",
    "@type": "Organization",
    "name": "RunAPI",
    "url": "https://runapi.ai/zh-TW",
    "logo": {
      "@type": "ImageObject",
      "url": "https://runapi.ai/zh-TWicon.svg"
    },
    "sameAs": [
      "https://github.com/runapi-ai"
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "zh-TW",
    "@type": "TechArticle",
    "headline": "LibreChat",
    "description": "為 RunAPI 設定 LibreChat 自訂端點，在 Docker 中掛載其 YAML 設定檔，重新啟動後驗證對話。",
    "url": "https://runapi.ai/zh-TW/docs/resources/application-practices/librechat",
    "mainEntityOfPage": "https://runapi.ai/zh-TW/docs/resources/application-practices/librechat"
  }
]
```
