Skip to content

Commit 87359de

Browse files
committed
chore(common): update readme
1 parent 9c032cf commit 87359de

File tree

1 file changed

+5
-12
lines changed
  • common/microsoft-extensions-ai-integration/AIPromptIntegration

1 file changed

+5
-12
lines changed

common/microsoft-extensions-ai-integration/AIPromptIntegration/readme.md

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Overview
44

5-
This project demonstrates the [integration of the `Microsoft.Extensions.AI` package with the `AIPrompt` component](https://www.telerik.com/blazor-ui/documentation/common-features/microsoft-extensions-ai-integration). The integration enables AI-powered interactions leveraging the built-in [`IChatClient` service](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.ai.ichatclient?view=net-9.0-pp). The example uses **Azure OpenAI**, but you can use any service supported by `Microsoft.Extensions.AI`.
5+
This project demonstrates the [integration of the `Microsoft.Extensions.AI` package with the `AIPrompt` component](https://www.telerik.com/blazor-ui/documentation/common-features/microsoft-extensions-ai-integration). The integration enables AI-powered interactions leveraging the built-in [`IChatClient` service](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.ai.ichatclient?view=net-9.0-pp). The example shows how to use the [various models supported by `Microsoft.Extensions.AI`](https://devblogs.microsoft.com/dotnet/introducing-microsoft-extensions-ai-preview/#chat).
66

77
## About `Microsoft.Extensions.AI`
88

@@ -11,25 +11,18 @@ The [`Microsoft.Extensions.AI` package](https://learn.microsoft.com/en-us/dotnet
1111
## Integration with `AIPrompt` Component
1212

1313
- The [`AIPrompt` component](https://www.telerik.com/blazor-ui/documentation/components/aiprompt/overview) is configured to use `Microsoft.Extensions.AI` for AI-driven prompts.
14-
- The project registers an [`IChatClient` service](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.ai.ichatclient?view=net-9.0-pp) in the `Program.cs` file.
14+
- The project registers several [`IChatClient` services](https://learn.microsoft.com/en-us/dotnet/api/microsoft.extensions.ai.ichatclient?view=net-9.0-pp) in the `Program.cs` file - one for each model supported by `Microsoft.Extensions.AI`.
1515
- The [`OnPromptRequest` event](https://www.telerik.com/blazor-ui/documentation/components/aiprompt/events#onpromptrequest) of the `AIPrompt` is not handled, so the component will automatically use the registered `IChatClient` service to generate a response.
16-
- **Azure OpenAI** is used as the AI provider for generating responses.
1716

1817
## Setup & Configuration
1918

20-
To run the project successfully, you need to provide your **Azure OpenAI URI** and **API key**. The steps apply to using **Azure Open AI** and the configuration may be different if you are using a different model. Refer to the official Microsoft documentation to see how to configure other models.
19+
To run the project successfully, you need to provide your endpoint and credentials for the model you want to use.
2120

2221
### Steps:
2322

2423
1. Open the `Program.cs` file.
25-
2. Locate the `IChatClient` service registration.
24+
2. Locate the `IChatClient` service registration that uses your preferred model.
2625
3. Uncomment the service registration.
27-
3. Replace the placeholder values with your actual Azure OpenAI endpoint and API key:
28-
29-
```csharp
30-
new Uri("YOUR_AZURE_OPENAI_ENDPOINT"),
31-
new AzureKeyCredential("YOUR_AZURE_OPENAI_CREDENTIAL"))
32-
```
33-
26+
3. Replace the placeholder values with your actual endpoint and credentials.
3427
4. Run the application and interact with the `AIPrompt` component.
3528

0 commit comments

Comments
 (0)