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
+13-12Lines changed: 13 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,18 +9,19 @@ 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
17
+
* Syncfusion AI AssistView for Blazor package (Syncfusion.Blazor.InteractiveChat) installed in the project
18
+
* 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)
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/apikey) 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
@@ -128,4 +129,4 @@ const string GeminiApiKey = 'Place your API key here';
128
129
{% endhighlight %}
129
130
{% endtabs %}
130
131
131
-

132
+

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