Skip to main content

Azure AI Inference Chat Feature

Feature NameAzure AI Inference Chat
Feature IDCrestApps.OrchardCore.AzureAIInference

Provides a way to interact with GitHub Models using the Azure AI Inference provider.

Overview

The Azure AI Inference Chat feature enhances the AI Services functionality by integrating GitHub models using Azure AI Inference provider. It provides a suite of services to interact with these models, enabling advanced AI capabilities.

Configuration

To configure an Azure AI Inference connection, add the following settings to appsettings.json:

{
"OrchardCore": {
"CrestApps": {
"AI": {
"Providers": {
"AzureAIInference": {
"DefaultConnectionName": "default",
"Connections": {
"default": {
"Endpoint": "https://<!-- Your Azure Resource Name -->.services.ai.azure.com/models",
"AuthenticationType": "ApiKey",
"ApiKey": "<!-- Your GitHub Access Token goes here -->",
"Deployments": [
{ "Name": "Phi-3-medium-4k-instruct", "Type": "Chat", "IsDefault": true },
{ "Name": "Phi-3-medium-4k-instruct", "Type": "Utility", "IsDefault": true }
]
}
}
}
}
}
}
}
}

Authentication Type in the connection can be Default, ManagedIdentity or ApiKey. When using ApiKey authentication type, ApiKey is required.

When using ManagedIdentity, you can optionally provide an IdentityId to use a user-assigned managed identity. If IdentityId is omitted or empty, the system-assigned managed identity is used.

{
"Connections": {
"default": {
"Endpoint": "https://my-resource.services.ai.azure.com/models",
"AuthenticationType": "ManagedIdentity",
"IdentityId": "<!-- Optional: client ID of a user-assigned managed identity -->"
}
}
}

For detailed instructions on creating Azure AI Inference and obtaining the Endpoint, refer to the official documentation.

When you import Azure AI Inference connections through the AIProviderConnections recipe step, the schema and import pipeline now recognize the common root-level Endpoint, AuthenticationType, optional IdentityId, and ApiKey fields in addition to the exported Properties.AzureAIInferenceConnectionMetadata shape.