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

アシスタント

ASSISTANTS_API_KEY=your-key
  • ASSISTANTS_MODELS を使用して、利用可能にしたいモデルを決定できます。それ以外の場合は、OpenAI から取得されたモデルリストが使用されます(Assistants API と互換性のあるモデルのみが表示されます)。
ASSISTANTS_MODELS=gpt-3.5-turbo-0125,gpt-3.5-turbo-16k-0613,gpt-3.5-turbo-16k,gpt-3.5-turbo,gpt-4,gpt-4-0314,gpt-4-32k-0314,gpt-4-0613,gpt-3.5-turbo-0613,gpt-3.5-turbo-1106,gpt-4-0125-preview,gpt-4-turbo-preview,gpt-4-1106-preview
  • 必要に応じて、OPENAI_REVERSE_PROXY と同様の ASSISTANTS_BASE_URL を使用して、公式のベースURLの代わりに代替のベースURLを設定することもできます。
ASSISTANTS_BASE_URL=http://your-alt-baseURL:3080/
  • ニーズに応じて、アシスタントビルダーUIの無効化など、追加のオプション設定が可能です。これらは librechat.yaml カスタム設定ファイル を通じて利用できます。
    • アシスタントのビルダーインターフェースの表示と使用を制御します。詳細はこちら
    • アシスタントの実行状態の更新や変更を確認するためのポーリング間隔をミリ秒単位で指定します。詳細情報
    • アシスタント実行のタイムアウト時間をミリ秒単位で設定します。実行操作の合計時間を制限することで、システム負荷の管理に役立ちます。詳細情報
    • サポートまたは除外するアシスタントIDを指定します。詳細情報

厳密な関数呼び出し (Strict function calling)

With librechat you can add add the 'x-strict': true flag at operation-level in the openapi spec for actions. This will automatically generate function calls with 'strict' mode enabled. Note that strict mode supports only a partial subset of json. Read https://platform.openai.com/docs/guides/structured-outputs for details.

例えば:

{
  "openapi": "3.1.0",
  "info": {
    "title": "Math.js API",
    "description": "API for performing mathematical operations, such as addition, subtraction, etc.",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.mathjs.org/v4"
    }
  ],
  "paths": {
    "/": {
      "post": {
        "summary": "Evaluate a mathematical expression",
        "description": "Sends a mathematical expression in the request body to evaluate.",
"operationId": "math",
"x-strict": true,
"parameters": [
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "expr": {
                    "type": "string",
                    "description": "The mathematical expression to evaluate (e.g., `2+3`)."
                  }
                },
                "required": ["expr"]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The result of the evaluated expression.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "result": {
                      "type": "number",
                      "description": "The evaluated result of the expression."
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid expression provided.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "error": {
                      "type": "string",
                      "description": "Error message describing the invalid expression."
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

注意点

注記:

  • 執筆時点では、以下のモデルのみが Retrieval 機能をサポートしています:
    • gpt-3.5-turbo-0125
    • gpt-4-0125-preview
    • gpt-4-turbo-preview
    • gpt-4-1106-preview
    • gpt-3.5-turbo-1106
  • Vision機能はまだサポートされていません。
  • 以前に .env ファイル内の ENDPOINTS を設定している場合は、値に assistants を追加する必要があります。

このガイドはいかがでしたか?