Skip to content

Microsoft Azure OpenAI

Version badge

To start using a Microsoft Azure OpenAI model with Cognigy.AI features, follow these steps:

  1. Add a Model
  2. Apply the Model

Add a Model

You can add a model using one of the following interfaces:

Add a Model via GUI

You can add a model provided by Azure OpenAI to Cognigy.AI in Build > LLM. To add the model, you will need the following parameters:

Parameter Description
API Key Enter the Azure API Key. This value can be found in the Keys & Endpoint section when examining your resource from the Azure portal. You can use either KEY1 or KEY2.
Resource Name Enter the resource name. To find this value, go to the Microsoft Azure home page. Under Azure services, click Azure OpenAI. In the left-side menu, under the Azure AI Services section, select Azure Open AI. Copy the desired resource name from the Name column.
Deployment Name Enter the deployment name. To find this value, go to the Microsoft Azure home page. Under Azure services, click Azure OpenAI. In the left-side menu, under Azure AI Services, select Azure Open AI. Select a resource from the Name column. On the resource page, go to Resource Management > Model deployments. On the Model deployments page, click Manage Deployments. On the Deployments page, copy the desired deployment name from the Deployment name column.
API Version Enter the API version. The API version to use for this operation in the YYYY-MM-DD format. Note that the version may have an extended format, for example, YYYY-MM-DD-preview.
Custom URL This parameter is optional. To control the connection between your clusters and the Azure OpenAI provider, you can route connections through dedicated proxy servers, creating an additional layer of security. To do this, specify the URL in the following pattern: https://<resource-name>.openai.azure.com/openai/deployments/<deployment-name>/<model-type>?api-version=<api-version>. When a Custom URL is added, the Resource Name, Deployment Name, and API Version fields will be ignored.
Parameter Description
Model Type Select Chat for models that support the Chat Completions API, Completion for the Completions API, or Embedding for the Embedding API. For more information, refer to the Azure OpenAI documentation.
Model Name Enter the ID of the model that you want to use as a custom model. To find model IDs, refer to the Azure OpenAI documentation.
API Key Enter the Azure API Key. This value can be found in the Keys & Endpoint section when examining your resource from the Azure portal. You can use either KEY1 or KEY2.
Resource Name Enter the resource name. To find this value, go to the Microsoft Azure home page. Under Azure services, click Azure OpenAI. In the left-side menu, under the Azure AI Services section, select Azure Open AI. Copy the desired resource name from the Name column.
Deployment Name Enter the deployment name. To find this value, go to the Microsoft Azure home page. Under Azure services, click Azure OpenAI. In the left-side menu, under Azure AI Services, select Azure Open AI. Select a resource from the Name column. On the resource page, go to Resource Management > Model deployments. On the Model deployments page, click Manage Deployments. On the Deployments page, copy the desired deployment name from the Deployment name column.
API Version Enter the API version. The API version to use for this operation in the YYYY-MM-DD format. Note that the version may have an extended format, for example, YYYY-MM-DD-preview.
Custom URL This parameter is optional. To control the connection between your clusters and the Azure OpenAI provider, you can route connections through dedicated proxy servers, creating an additional layer of security. To do this, specify the URL in the following pattern: https://<resource-name>.openai.azure.com/openai/deployments/<deployment-name>/<model-type>?api-version=<api-version>. When a Custom URL is added, the Resource Name, Deployment Name, and API Version fields will be ignored.

Apply changes. Check if the connection was set up by clicking Test.

Add a Model via the API

You can add either a standard or custom model using the Cognigy.AI API POST /v2.0/largelanguagemodels request. Then, test your connection for the created model via the Cognigy.AI API POST /v2.0/largelanguagemodels/{largeLanguageModelId}/test.

Deprecation of Old Connections for Microsoft Azure OpenAI

In recent releases, we have updated the connection settings to Microsoft Azure OpenAI models.

If you have old connections (for example, created in the 4.53 release) to Azure OpenAI, these connections have an AzureOpenAIProvider type and are marked with a Deprecated label. Although these connections can still be active, we strongly recommend creating a model with the new AzureOpenAIProviderV2 type, as old connection types will no longer be available in the future.

Note that for some Microsoft Azure OpenAI models, such as text-embedding-ada-002 for knowledge search features, you might encounter the following error when an LLM is triggered: Error while performing knowledge search. Remote returned error: Search failed: Could not fetch embeddings due to missing API resource name for Azure OpenAI. To resolve the issue, recreate the model and the connection so that both are updated to the latest format.

Apply the Model

To apply a model, follow these steps:

  1. In the left-side menu of the Project, go to Manage > Settings.
  2. Go to the section based on your use case for using a model:
    • Generative AI Settings. In the Generative AI Settings section, activate Enable Generative AI Features. This setting is toggled on by default if you have previously set up the Generative AI credentials.
    • Knowledge AI Settings. Use this section if you need to add a model for Knowledge AI. Select a model for the Knowledge Search and Answer Extraction features. Refer to the list of standard models and find the models that support these features.
  3. Navigate to the desired feature and select a model from the list. If there are no models available for the selected feature, the system will automatically select None. Save changes.

More Information