Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
---
layout: post
title: Gemini AI in ##Platform_Name## AI AssistView Control | Syncfusion
description: Checkout and learn about Integration of Gemini AI in Syncfusion ##Platform_Name## AI AssistView control of Syncfusion Essential JS 2 and more.
platform: ej2-asp-core-mvc
control: Gemini AI
publishingplatform: ##Platform_Name##
documentation: ug
---

# Integration of Gemini AI With AI AssistView control

The Syncfusion AI AssistView supports integration with [Gemini](https://ai.google.dev/gemini-api/docs), enabling advanced conversational AI features in your MVC applications.

## Getting Started With the AI AssistView control

Before integrating Gemini AI, ensure that the Syncfusion AI AssistView control is correctly rendered in your MVC application:

[ MVC Getting Started Guide](../getting-started)

## Prerequisites

* Google account to generate API key on accessing `Gemini AI`.
* [System requirements for ASP.NET MVC controls](https://ej2.syncfusion.com/aspnetmvc/documentation/system-requirements) to create MVC application

## Install Packages

Install the Syncfusion ASP.NET MVC package in the application using Package Manager Console.

```bash

NuGet\Install-Package Syncfusion.EJ2.MVC5

```

Install the Gemini AI package in the application using Package Manager Console.

```bash

NuGet\Install-Package Mscc.GenerativeAI

```

## Generate API Key

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.

2. Once logged in, click on `Get API Key` from the left-hand menu or the top-right corner of the dashboard.

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.

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.

> `Security Note`: Never commit the API key to version control. Use environment variables or a secret manager for production.

## Integration Gemini AI with AI AssistView

You can add the below respective files in your application:

* Add your generated `API Key` at the line

```bash

string apiKey = 'Place your API key here';

```

{% tabs %}
{% highlight razor tabtitle="CSHTML" %}
{% include code-snippet/ai-assistview/ai-integrations/gemini-ai/razor %}
{% endhighlight %}
{% highlight c# tabtitle="Gemini.cs" %}
{% include code-snippet/ai-assistview/ai-integrations/gemini-ai/geminimvc.cs %}
{% endhighlight %}
{% endtabs %}

![Gemini AI](../../images/gemini-ai.png)

## Run and Test

Run the application in the browser using the following command.

Build and run the app (Ctrl + F5).

Open `https://localhost:44321` to interact with your Gemini AI for dynamic response.
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
layout: post
title: Azure Open AI in ##Platform_Name## AI AssistView Control | Syncfusion
description: Checkout and learn about Integration of Azure Open AI in Syncfusion ##Platform_Name## AI AssistView control of Syncfusion Essential JS 2 and more.
platform: ej2-asp-core-mvc
control: Azure Open AI
publishingplatform: ##Platform_Name##
documentation: ug
---

# Integration of Azure Open AI With AI AssistView control

The Syncfusion AI AssistView supports integration with [Azure Open AI](https://microsoft.github.io/PartnerResources/skilling/ai-ml-academy/resources/openai), enabling advanced conversational AI features in your Angular applications.

## Getting Started With the AI AssistView control

Before integrating Azure Open AI, ensure that the Syncfusion AI AssistView control is correctly rendered in your MVC application:

[ MVC Getting Started Guide](../getting-started)

## Prerequisites

* An Azure account with access to `Azure Open AI` services and a generated API key.
* [System requirements for ASP.NET MVC controls](https://ej2.syncfusion.com/aspnetmvc/documentation/system-requirements) to create MVC application

## Install Packages

Install the Syncfusion ASP.NET MVC package in the application using Package Manager Console.

```bash

NuGet\Install-Package Syncfusion.EJ2.MVC5

```

Install the Open AI and Azure Open AI package in the application using Package Manager Console.

```bash

NuGet\Install-Package OpenAI
NuGet\Install-Package Azure.AI.OpenAI
NuGet\Install-Package Azure.Core

```

## Configure Azure Open AI

1. Log in to the [Azure Portal](https://portal.azure.com/#home) and navigate to your Azure Open AI resource.

2. Under Resource Management, select Keys and Endpoint to retrieve your API key and endpoint URL.

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.

4. Store these values securely, as they will be used in your application.

> `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.

## Integration Azure Open AI with AI AssistView

You can add the below respective files in your application:

* Update the following configuration values with your Azure Open AI details:

```bash

string endpoint = "Your_Azure_OpenAI_Endpoint";
string apiKey = "Your_Azure_OpenAI_API_Key";
string deploymentName = "Your_Deployment_Name";

```

{% tabs %}
{% highlight razor tabtitle="CSHTML" %}
{% include code-snippet/ai-assistview/ai-integrations/open-ai/razor %}
{% endhighlight %}
{% highlight c# tabtitle="Gemini.cs" %}
{% include code-snippet/ai-assistview/ai-integrations/open-ai/openaimvc.cs %}
{% endhighlight %}
{% endtabs %}

![Azure Open AI](../../images/open-ai.png)

## Run and Test

Run the application in the browser using the following command.

Build and run the app (Ctrl + F5).

Open `https://localhost:44321` to interact with your Azure Open AI for dynamic response.
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
---
layout: post
title: Gemini AI in ##Platform_Name## AI AssistView Control | Syncfusion
description: Checkout and learn about Integration of Gemini AI in Syncfusion ##Platform_Name## AI AssistView control of Syncfusion Essential JS 2 and more.
platform: ej2-asp-core-mvc
control: Gemini AI
publishingplatform: ##Platform_Name##
documentation: ug
---

# Integration of Gemini AI With AI AssistView control

The Syncfusion AI AssistView supports integration with [Gemini](https://ai.google.dev/gemini-api/docs), enabling advanced conversational AI features in your Core applications.

## Getting Started With the AI AssistView control

Before integrating Gemini AI, ensure that the Syncfusion AI AssistView control is correctly rendered in your Core application:

[ ASP.NET CORE Getting Started Guide](../getting-started)

## Prerequisites

* Google account to generate API key on accessing `Gemini AI`.
* [System requirements for ASP.NET Core controls](https://ej2.syncfusion.com/aspnetmvc/documentation/system-requirements) to create Core application

## Install Packages

Install the Syncfusion ASP.NET Core package in the application using Package Manager Console.

```bash

NuGet\Install-Package Syncfusion.EJ2.AspNet.Core

```

Install the Gemini AI package in the application using Package Manager Console.

```bash

NuGet\Install-Package Mscc.GenerativeAI

```

## Generate API Key

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.

2. Once logged in, click on `Get API Key` from the left-hand menu or the top-right corner of the dashboard.

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.

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.

> `Security Note`: Never commit the API key to version control. Use environment variables or a secret manager for production.

## Integration Gemini AI with AI AssistView

You can add the below respective files in your application:

* Add your generated `API Key` at the line

```bash

string apiKey = 'Place your API key here';

```

{% tabs %}
{% highlight razor tabtitle="CSHTML" %}
{% include code-snippet/ai-assistview/ai-integrations/gemini-ai/tagHelper %}
{% endhighlight %}
{% highlight c# tabtitle="Gemini.cs" %}
{% include code-snippet/ai-assistview/ai-integrations/gemini-ai/geminicore.cs %}
{% endhighlight %}
{% endtabs %}

![Gemini AI](../../images/gemini-ai.png)

## Run and Test

Run the application in the browser using the following command.

Build and run the app (Ctrl + F5).

Open `https://localhost:44321` to interact with your Gemini AI for dynamic response.
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
layout: post
title: Azure Open AI in ##Platform_Name## AI AssistView Control | Syncfusion
description: Checkout and learn about Integration of Azure Open AI in Syncfusion ##Platform_Name## AI AssistView control of Syncfusion Essential JS 2 and more.
platform: ej2-asp-core-mvc
control: Azure Open AI
publishingplatform: ##Platform_Name##
documentation: ug
---

# Integration of Azure Open AI With AI AssistView control

The Syncfusion AI AssistView supports integration with [Azure Open AI](https://microsoft.github.io/PartnerResources/skilling/ai-ml-academy/resources/openai), enabling advanced conversational AI features in your Angular applications.

## Getting Started With the AI AssistView control

Before integrating Azure Open AI, ensure that the Syncfusion AI AssistView control is correctly rendered in your Core app:

[ CORE Getting Started Guide](../getting-started)

## Prerequisites

* An Azure account with access to `Azure Open AI` services and a generated API key.
* [System requirements for ASP.NET MVC controls](https://ej2.syncfusion.com/aspnetmvc/documentation/system-requirements) to create Core application

## Install Packages

Install the Syncfusion ASP.NET Core package in the application using Package Manager Console.

```bash

NuGet\Install-Package Syncfusion.EJ2.AspNet.Core

```

Install the Open AI and Azure Open AI package in the application using Package Manager Console.

```bash

NuGet\Install-Package OpenAI
NuGet\Install-Package Azure.AI.OpenAI
NuGet\Install-Package Azure.Core

```

## Configure Azure Open AI

1. Log in to the [Azure Portal](https://portal.azure.com/#home) and navigate to your Azure Open AI resource.

2. Under Resource Management, select Keys and Endpoint to retrieve your API key and endpoint URL.

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.

4. Store these values securely, as they will be used in your application.

> `Security Note`: Never expose your API key in client-side code for production applications. Use a server-side proxy or environment variables to manage sensitive information securely.

## Integration Azure Open AI with AI AssistView

You can add the below respective files in your application:

* Update the following configuration values with your Azure Open AI details:

```bash

string endpoint = "Your_Azure_OpenAI_Endpoint";
string apiKey = "Your_Azure_OpenAI_API_Key";
string deploymentName = "Your_Deployment_Name";

```

{% tabs %}
{% highlight razor tabtitle="CSHTML" %}
{% include code-snippet/ai-assistview/ai-integrations/open-ai/tagHelper %}
{% endhighlight %}
{% highlight c# tabtitle="Gemini.cs" %}
{% include code-snippet/ai-assistview/ai-integrations/open-ai/openaicore.cs %}
{% endhighlight %}
{% endtabs %}

![Azure Open AI](../../images/open-ai.png)

## Run and Test

Run the application in the browser using the following command.

Build and run the app (Ctrl + F5).

Open `https://localhost:44321` to interact with your Azure Open AI for dynamic response.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added ej2-asp-core-mvc/ai-assistview/images/open-ai.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading