Skip to content

Merge update-extensions-ai-integration-docs-2918 into production #2920

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: production
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions common-features/microsoft-extensions-ai-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,7 @@ To integrate the **Microsoft.Extensions.AI** library with your AIPrompt componen
>
> 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. The example below shows usage of [Azure OpenAI](https://www.nuget.org/packages/Azure.AI.OpenAI) and you may [explore some other examples with different models in this sample application](https://github.com/telerik/blazor-ui/tree/master/common/microsoft-extensions-ai-integration/AIPromptIntegration).

>caption Startup.cs:

<div class="skip-repl"></div>
````C#
services.AddSingleton(new AzureOpenAIClient(
new Uri("YOUR_AZURE_OPENAI_ENDPOINT"),
new AzureKeyCredential("YOUR_AZURE_OPENAI_CREDENTIAL")));

services.AddChatClient(services => services.GetRequiredService<AzureOpenAIClient>().AsChatClient("gpt-4o-mini"));
````
**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](https://github.com/telerik/blazor-ui/tree/master/common/microsoft-extensions-ai-integration/AIPromptIntegration).

## See Also

Expand Down