Integration with Microsoft.Extensions.AI
The AIPrompt component incorporates the Microsoft.Extensions.AI package to simplify your AI model integration, provide flexibility and let you easily use and test various AI providers.
Other components will support similar integration in future versions of UI for Blazor.
Integration
To integrate the Microsoft.Extensions.AI library with your AIPrompt component, register an IChatClient
service and configure it according to the model you are using. The AIPrompt is designed to automatically use the registered IChatClient
.
When using the Telerik AIPrompt component with the Microsoft AI library, do not subscribe to the
OnPromptRequest
event.
Microsoft.Extensions.AI provides a simple integration with various models where the configuration slightly differs depending on the model. Explore examples with different models in this sample application.