This example implements a multi-LLM (Large Language Model) chat application. Key considerations include:
- The application uses two models: GPT-4o from Azure OpenAI and Phi4 from Ollama running locally.
- The
IChatClientinterface implementation manages chat clients and conversation histories. - The interface is built with DevExpress Blazor components: DxAIChat, DxComboBox, and DxButton.
Note
We use the following versions of Microsoft AI packages in our v25.2.2+ source code:
Microsoft.Extensions.AI| 9.7.1Microsoft.Extensions.AI.OpenAI| 9.7.1-preview.1.25365.4Azure.AI.OpenAI| 2.2.0-beta.5
We do not guarantee compatibility or correct operation with higher versions. Refer to the following announcement for additional information: DevExpress.AIIntegration moves to a stables version.
This example is based on the following blog post: DevExpress Blazor AI Chat — Build a Multi-LLM Chat Application.
Note
Before launch, add your credentials in the appsettings.Development.json file.
- Blazor AI Chat - How to add the DevExpress Blazor AI Chat component to your next Blazor, MAUI, WPF, and WinForms application
- Blazor AI Chat — Implement Function/Tool Calling
- Rich Text Editor and HTML Editor for Blazor - How to integrate AI-powered extensions
(you will be redirected to DevExpress.com to submit your response)
