You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: blazor/ai-assistview/ai-integrations/gemini-integration.md
+20-14Lines changed: 20 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,52 +9,53 @@ documentation: ug
9
9
10
10
# Integration of Gemini AI With Blazor AI AssistView component
11
11
12
-
The Syncfusion AI AssistView supports integration with [Gemini](https://ai.google.dev/gemini-api/docs/quickstart), enabling advanced conversational AI features in your applications.
12
+
The Syncfusion AI AssistView supports integration with [Gemini](https://ai.google.dev/gemini-api/docs/quickstart), enabling advanced conversational AI features in applications.
13
13
14
14
## Prerequisites
15
15
16
-
* Google account to generate API key on accessing `Gemini AI`
17
-
* Syncfusion AI AssistView for Blazor `Syncfusion.Blazor.InteractiveChat` installed in your project.
16
+
* Google account to generate an API key for accessing [Gemini AI](https://ai.google.dev/gemini-api/docs/quickstart)
17
+
* Syncfusion AI AssistView for Blazor package [Syncfusion.Blazor.InteractiveChat](https://www.nuget.org/packages/Syncfusion.Blazor.InteractiveChat) installed in the project.
18
+
*[Markdig](https://www.nuget.org/packages/Markdig) package available in the project for Markdown-to-HTML conversion (required by the sample code).
18
19
19
20
## Getting Started with the AI AssistView Component
20
21
21
-
Before integrating Gemini AI, ensure that the Syncfusion AI AssistView is correctly rendered in your application:
22
+
Before integrating Gemini AI, ensure that the Syncfusion AI AssistView renders correctly in the application and that prerequisites are met:
22
23
23
-
[Blazor Getting Started Guide](../getting-started)
24
+
[Blazor Getting Started Guide](../getting-started)
24
25
25
26
## Install Dependencies
26
27
27
28
Install the Syncfusion Blazor package in the application.
1. Go to [Google AI Studio](https://aistudio.google.com/app/apikey) and sign in with your Google account. If you don’t have one, create a new account.
46
+
1. Go to [Google AI Studio](https://aistudio.google.com/app/api-keys) and sign in with a google account. Create a new account if needed.
46
47
47
-
2.Once logged in, click on `Get API Key` from the left-hand menu or the top-right corner of the dashboard.
48
+
2.Select `Get API key` from the left menu or the top-right of the dashboard.
48
49
49
-
3.Click the `Create API Key` button. You’ll be prompted to either select an existing Google Cloud project or create a new one. Choose the appropriate option and proceed.
50
+
3.Choose `Create API key`. Select an existing google cloud project or create a new one, then proceed.
50
51
51
-
4. After selecting or creating a project, your API key will be generated and displayed. Copy the key and store it securely, as it will only be shown once.
52
+
4. After creating or selecting a project, an API key is generated and displayed. Copy the key and store it securely, as it may be shown only once.
52
53
53
-
> `Security Note`: Never commit the API key to version control. Use environment variables or a secret manager for production.
54
+
> Security note: Do not commit API keys to version control. Use environment variables, a secret manager, or a server-side proxy in production.
54
55
55
56
## Integration Gemini AI with AI AssistView
56
57
57
-
* Add your generated `API Key` at the line
58
+
* Add the generated API key in the following line.
58
59
59
60
```bash
60
61
@@ -65,6 +66,11 @@ const string GeminiApiKey = 'Place your API key here';
Copy file name to clipboardExpand all lines: blazor/ai-assistview/ai-integrations/openai-integration.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,8 +13,8 @@ The Syncfusion AI AssistView supports integration with [Azure Open AI](https://m
13
13
14
14
## Prerequisites
15
15
16
-
- An Azure account with access to `Azure Open AI` services and a generated API key.
17
-
- Syncfusion AI AssistView for Blazor `Syncfusion.Blazor.InteractiveChat` installed in the project
16
+
- An Azure account with access to [Azure Open AI](https://microsoft.github.io/PartnerResources/skilling/ai-ml-academy/resources/openai) services and a generated API key.
17
+
- Syncfusion AI AssistView for Blazor [Syncfusion.Blazor.InteractiveChat](https://www.nuget.org/packages/Syncfusion.Blazor.InteractiveChat) installed in the project
18
18
19
19
## Getting Started with the AI AssistView Component
Install the Markdown rendering package used to convert model responses to HTML.
35
+
Install the `Open AI` and `Markdig` nuget packages in the application.
36
36
37
37
```bash
38
38
@@ -49,17 +49,17 @@ Note: The sample below uses HttpClient directly and does not require the Azure/O
49
49
50
50
1. Log in to the [Azure Portal](https://portal.azure.com/#home) and navigate to your Azure Open AI resource.
51
51
52
-
2. Under Resource Management, select Keys and Endpoint to retrieve your API key and endpoint URL.
52
+
2. Under Resource Management, select keys and endpoint to retrieve your API key and endpoint URL.
53
53
54
-
3. Copy the API key, endpoint, and deployment name (e.g., gpt-4o-mini). Ensure the API version (e.g., 2024-07-01-preview) matches your resource configuration.
54
+
3. Copy the API key, endpoint, and deployment name (e.g., gpt-4o-mini). Ensure the API version matches your resource configuration.
55
55
56
56
4. Store these values securely, as they will be used in your application.
57
57
58
58
> `Security Note`: expose your API key in client-side code for production applications. Use a server-side proxy or environment variables to manage sensitive information securely.
59
59
60
60
## Integration Azure OpenAI with AI AssistView
61
61
62
-
- Configure your Azure OpenAI endpoint, API key, and deployment name in your Program.cs (or using your preferred configuration mechanism).
62
+
- Configure your Azure OpenAI endpoint, API key, and deployment name in your **Program.cs** (or using your preferred configuration mechanism).
63
63
64
64
- Register the service for dependency injection.
65
65
@@ -240,4 +240,4 @@ var deploymentName = "gpt-4o-mini";
240
240
{% endhighlight %}
241
241
{% endtabs %}
242
242
243
-

243
+

Copy file name to clipboardExpand all lines: blazor/ai-assistview/how-to/integration-with-ai.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,20 +11,20 @@ documentation: ug
11
11
12
12
The Syncfusion<supstyle="font-size:70%">®</sup> AI AssistView component supports integration with the `Microsoft.Extensions.AI` framework, enabling seamless communication with various large language models (LLMs) such as `Azure OpenAI`, `OpenAI`, and more.
13
13
14
-
`The Microsoft.Extensions.AI` simplifies integration with different models, requiring minimal configuration changes depending on the provider. The following example demonstrates integration using `Azure OpenAI`.
14
+
`Microsoft.Extensions.AI` simplifies integration with different providers and typically requires only minimal configuration changes based on the selected model. The following example demonstrates integration using `Azure OpenAI`.
15
15
16
-
N> The Microsoft AI extension libraries are currently in preview, and breaking changes may occur. Ensure that you use compatible versions to avoid integration issues.
16
+
N> The Microsoft AI extension libraries are currently in preview and may include breaking changes. Use compatible versions of all referenced packages to prevent integration issues.
17
17
18
18
### Getting started with AI AssistView
19
19
20
-
Before integrating `AI AssistView` with `Microsoft.Extensions.AI`, ensure the SfAIAssistView component is rendered by following the appropriate project guideline:
20
+
Before integrating `AI AssistView` with `Microsoft.Extensions.AI`, ensure the `SfAIAssistView` component is rendered by following the appropriate project guidelines:
21
21
22
22
*[Blazor Web App](../getting-started-webapp)
23
23
*[Blazor WASM App](../getting-started)
24
24
25
25
### Prerequisites for Microsoft.Extensions.AI integration
26
26
27
-
To add the required NuGet packages, use the NuGet package manager in Visual Studio (*Tools → NuGet Package Manager → Manage NuGet Packages for Solution*) search and install the following:
27
+
To add the required NuGet packages, use the NuGet Package Manager in Visual Studio (Tools → NuGet Package Manager → Manage NuGet Packages for Solution), then search for and install the following packages:
28
28
29
29
*`Azure.AI.OpenAI`
30
30
*`Azure.Identity`
@@ -48,7 +48,7 @@ dotnet add package Markdig
48
48
49
49
### Configure services in Program.cs
50
50
51
-
Register the `Azure OpenAI` client and Syncfusion<supstyle="font-size:70%">®</sup> AI AssistView component within the Blazor application.
51
+
Register the `Azure OpenAI` client and the Syncfusion<supstyle="font-size:70%">®</sup> AI AssistView component within the Blazor application.
The Syncfusion<supstyle="font-size:70%">®</sup> `AI AssistView` component is built to seamlessly integrate with external AI services. When the`IChatClient` is registered via `Microsoft.Extensions.AI`, the component automatically uses it to handle user prompts without any additional configuration.
91
+
The Syncfusion<supstyle="font-size:70%">®</sup> AI AssistView component is designed to integrate seamlessly with external AI services. When an`IChatClient` is registered via Microsoft.Extensions.AI, the component automatically uses it to process user prompts without additional component configuration.
92
92
93
-
In the following example, the user input is processed using the injected `IChatClient`. The AI model's response is returned in Markdown format which is converted to HTML using the `Markdig` library before rendering in the AI AssistView component.
93
+
In the following example, user input is sent to the injected `IChatClient`. The AI model’s response is returned in Markdown, converted to HTML using the `Markdig` library, and rendered in the AI AssistView component.
0 commit comments