Azure OpenAI オブジェクト構造
Azure OpenAI Serviceをアプリケーションに統合することで、Azure OpenAIでホストされている複数のデプロイメントやリージョンモデルをシームレスに利用できるようになります。このセクションでは、ニーズに合わせてAzure OpenAI endpointを設定する方法を詳しく説明します。
Azure OpenAI設定のセットアップに関する詳細ガイドは、こちらをクリックしてください
設定例
注: Azure OpenAI endpoint は、
streamRate、titleModel、titleMethod、titlePrompt、titlePromptTemplate、titleEndpointを含む、すべての Shared Endpoint Settings をサポートしています。
assistants
キー:
| Key | Type | Description | Example |
|---|---|---|---|
| assistants | Boolean | Azure OpenAI endpointのassistantsを有効または無効にします。`true`に設定すると、このendpointに関連付けられたassistantsが有効になります。 | Choose one, either the official OpenAI API or Azure OpenAI API for assistants, not both. |
デフォルト: 指定なし
例:
groups
キー:
| Key | Type | Description | Example |
|---|---|---|---|
| groups | Array | 地理的場所や目的別のモデルグループの設定。`groups`配列内の各項目は、特定のグループ化(多くの場合、地理的リージョンや個別の設定によるもの)の下でモデルのセットを構成します。 |
デフォルト: 指定なし
Group オブジェクト構造
groups 配下の各項目はレコードのリストの一部であり、それぞれ以下のフィールドを持ちます:
group
キー:
| Key | Type | Description | Example |
|---|---|---|---|
| group | String | モデルグループの識別子。 |
必須: はい
例:
apiKey
キー:
| Key | Type | Description | Example |
|---|---|---|---|
| apiKey | String | Azure OpenAI ServiceにアクセスするためのAPIキー。 | It's highly recommended to use a custom env. variable reference for this field, i.e. `${YOUR_VARIABLE}` |
必須: はい
例:
instanceName
キー:
| Key | Type | Description | Example |
|---|---|---|---|
| instanceName | String | Azureインスタンスの名前。**2つのドメイン形式をサポートしています**:`.openai.azure.com`(レガシー)および `.cognitiveservices.azure.com`(新規)。完全なドメイン(例:`my-instance.cognitiveservices.azure.com`)を指定することも、レガシーな `.openai.azure.com` 形式との後方互換性のためにインスタンス名のみ(例:`my-instance`)を指定することも可能です。 | It's recommended to use a custom env. variable reference for this field, i.e. `${YOUR_VARIABLE}` |
必須: はい
例:
version
キー:
| Key | Type | Description | Example |
|---|---|---|---|
| version | String | APIバージョン | It's recommended to use a custom env. variable reference for this field, i.e. `${YOUR_VARIABLE}` |
デフォルト: 指定なし
例:
baseURL
キー:
| Key | Type | Description | Example |
|---|---|---|---|
| baseURL | String | Azure OpenAI ServiceのベースURL。 | It's recommended to use a custom env. variable reference for this field, i.e. `${YOUR_VARIABLE}` |
デフォルト: 指定なし
例:
additionalHeaders
キー:
| Key | Type | Description | Example |
|---|---|---|---|
| additionalHeaders | Dictionary | APIリクエスト用の追加ヘッダー。すべてのヘッダー値は文字列である必要があります。 | It's recommended to use a custom env. variable reference for the values of field, as shown in the example. `api-key` header value is sent on every request. |
デフォルト: 指定なし
例:
serverless
キー:
| Key | Type | Description | Example |
|---|---|---|---|
| serverless | Boolean | Azure OpenAIチャット補完にサーバーレス推論エンドポイントを使用することを示します。`true`に設定すると、そのグループがAzureの「Models as a Service」モデルとしてサーバーレス推論エンドポイントを使用するように構成されていることを指定します。 | More info [here](./azure_openai.md#serverless-inference-endpoints) |
デフォルト: 指定なし
例:
addParams
キー:
| Key | Type | Description | Example |
|---|---|---|---|
| addParams | Object/Dictionary | リクエストに追加のパラメータを追加します。API固有のオプションを指定する際に便利です。 |
デフォルト: 指定なし
例:
dropParams
キー:
| Key | Type | Description | Example |
|---|---|---|---|
| dropParams | Array/List of Strings | リクエストから[default parameters](#default-parameters)を削除します。指定された[default parameters](#default-parameters)を除外します。 | For a list of default parameters sent with every request, see the ["Default Parameters"](#default-parameters) Section below. |
デフォルト: 指定なし
例:
models
キー:
| Key | Type | Description | Example |
|---|---|---|---|
| models | グループ内の個々のモデルに対する設定。デプロイ名やバージョンを含む、各モデルの設定を行います。 | Model configurations can adopt the group's deployment name and/or version when configured as a boolean (set to `true`) or an object for detailed settings of either of those fields. |
デフォルト: 指定なし
例:
このガイドはいかがでしたか?