title | titleSuffix | description | services | ms.service | ms.subservice | ms.custom | ms.topic | author | ms.author | ms.date | ms.reviewer | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
CLI (v2) Azure OpenAI connection YAML schema |
Azure Machine Learning |
Reference documentation for the CLI (v2) Azure OpenAI connections YAML schema. |
machine-learning |
machine-learning |
core |
|
reference |
Blackmist |
larryfr |
05/09/2024 |
ambadal |
[!INCLUDE cli v2]
[!INCLUDE schema note]
Key | Type | Description | Allowed values | Default value |
---|---|---|---|---|
$schema |
string | The YAML schema. If you use the Azure Machine Learning Visual Studio Code extension to author the YAML file, include $schema at the top of your file to invoke schema and resource completions. |
||
name |
string | Required. The connection name. | ||
description |
string | The connection description. | ||
tags |
object | The connection tag dictionary. | ||
type |
string | Required. The connection type. | azure_open_ai |
azure_open_ai |
is_shared |
boolean | true if the connection is shared across other projects in the hub; otherwise, false . |
true |
|
endpoint |
string | Required. The URL of the endpoint. | ||
api_key |
string | Required. The API key used to authenticate the connection. If not provided, a Microsoft Entra ID (credential-less authentication) connection is created. | ||
open_ai_resource_id |
string | Required. The fully qualified Azure resource ID of the Azure OpenAI resource. |
The schema described in this article is used to create a connection to Azure OpenAI only. If you would rather create a single connection for Azure AI Services, see the Azure AI Services connection schema. If you need to create a connection to the non-Microsoft OpenAI service, see the OpenAI connection schema.
While the az ml connection
commands can be used to manage both Azure Machine Learning and Azure AI Studio connections, the Azure AI Services connection is specific to Azure AI Studio.
Visit this GitHub resource for examples. Several are shown here. These examples would be in the form of YAML files and used from the CLI. For example, az ml connection create -f <file-name>.yaml
.
#AzureOpenAIConnection.yml
name: myazopenai_apk
type: azure_open_ai
azure_endpoint: https://contoso.openai.azure.com/
api_key: XXXXXXXXXXXXXXX
#AzureOpenAIConnection.yml
name: myazopenai_apk
type: azure_open_ai
azure_endpoint: https://contoso.openai.azure.com/