Skip to main content
All docs
V25.2
  • AIExtensionsContainerDesktop.Default Field

    The default container for AI services.

    Namespace: DevExpress.AIIntegration

    Assembly: DevExpress.AIIntegration.Desktop.v25.2.dll

    NuGet Package: DevExpress.AIIntegration.Desktop

    Declaration

    public static readonly AIExtensionsContainerDefault Default

    Field Value

    Type Description
    AIExtensionsContainerDefault

    The default container.

    Remarks

    The following code snippet registers an Azure OpenAI client in a WinForms application:

    using Microsoft.Extensions.AI;
    using DevExpress.AIIntegration;
    
    internal static class Program {
        [STAThread]
        static void Main() {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
    
            IChatClient azureChatClient = new Azure.AI.OpenAI.AzureOpenAIClient(new Uri(AzureOpenAIEndpoint),
            new System.ClientModel.ApiKeyCredential(AzureOpenAIKey))
            .GetChatClient("gpt-4o-mini").AsIChatClient();
    
            AIExtensionsContainerDesktop.Default.RegisterChatClient(azureChatClient);
    
            Application.Run(new Form1());
        }
        static string AzureOpenAIEndpoint { get { return Environment.GetEnvironmentVariable("AZURE_OPENAI_ENDPOINT"); } }
        static string AzureOpenAIKey { get { return Environment.GetEnvironmentVariable("AZURE_OPENAI_APIKEY"); } }
    }
    

    The following code snippets (auto-collected from DevExpress Examples) contain references to the Default field.

    Note

    The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

    See Also