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
4 changes: 2 additions & 2 deletions blazor/accordion/getting-started-with-web-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ The following code explains how to initialize Blazor Accordion using header and

## See also

1. [Getting Started with Syncfusion Blazor Web Assembly App in Visual Studio or .NET CLI](https://blazor.syncfusion.com/documentation/getting-started/blazor-webassembly-app)
2. [Getting Started with Syncfusion Blazor Web App in Visual Studio or .NET CLI](https://blazor.syncfusion.com/documentation/getting-started/blazor-web-app)
1. [Getting Started with Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Web Assembly App in Visual Studio or .NET CLI](https://blazor.syncfusion.com/documentation/getting-started/blazor-webassembly-app)
2. [Getting Started with Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Web App in Visual Studio or .NET CLI](https://blazor.syncfusion.com/documentation/getting-started/blazor-web-app)

N> You can also explore our [Blazor Accordion example](https://blazor.syncfusion.com/demos/accordion/default-functionalities?theme=bootstrap5) that shows you how to render and configure the Accordion.
4 changes: 2 additions & 2 deletions blazor/accordion/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ The following code explains how to initialize Blazor Accordion using header and

## See also

1. [Getting Started with Syncfusion Blazor Web Assembly App in Visual Studio or .NET CLI](https://blazor.syncfusion.com/documentation/getting-started/blazor-webassembly-app)
2. [Getting Started with Syncfusion Blazor Web App in Visual Studio or .NET CLI](https://blazor.syncfusion.com/documentation/getting-started/blazor-web-app)
1. [Getting Started with Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Web Assembly App in Visual Studio or .NET CLI](https://blazor.syncfusion.com/documentation/getting-started/blazor-webassembly-app)
2. [Getting Started with Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Web App in Visual Studio or .NET CLI](https://blazor.syncfusion.com/documentation/getting-started/blazor-web-app)

N> You can also explore our [Blazor Accordion example](https://blazor.syncfusion.com/demos/accordion/default-functionalities?theme=bootstrap5) that shows you how to render and configure the Accordion.
2 changes: 1 addition & 1 deletion blazor/accumulation-chart/adaptive-layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ documentation: ug

# Adaptive Layout in Blazor Accumulation Chart Component

When viewing the accumulation chart on a mobile device, some elements may not be displayed properly due to limited screen space. This is where the **Syncfusion Accumulation Chart Adaptive Layout** feature proves invaluable. Adaptive rendering dynamically adjusts chart elements to optimize their display based on the available screen size and orientation. By enabling the `EnableAdaptiveRendering` property, the chart automatically adapts to container size changes, ensuring clear alignment and proper visibility of elements such as the legend, data labels, chart title, and more.
When viewing the accumulation chart on a mobile device, some elements may not be displayed properly due to limited screen space. This is where the **Syncfusion<sup style="font-size:70%">&reg;</sup> Accumulation Chart Adaptive Layout** feature proves invaluable. Adaptive rendering dynamically adjusts chart elements to optimize their display based on the available screen size and orientation. By enabling the `EnableAdaptiveRendering` property, the chart automatically adapts to container size changes, ensuring clear alignment and proper visibility of elements such as the legend, data labels, chart title, and more.

```cshtml

Expand Down
4 changes: 2 additions & 2 deletions blazor/accumulation-chart/getting-started-with-web-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -357,5 +357,5 @@ Legend is used for the accumulation chart by setting the [Visible](https://help.
## See also


1. [Getting Started with Syncfusion Blazor Web Assembly App in Visual Studio or .NET CLI](https://blazor.syncfusion.com/documentation/getting-started/blazor-webassembly-app)
2. [Getting Started with Syncfusion Blazor Web App in Visual Studio or .NET CLI](https://blazor.syncfusion.com/documentation/getting-started/blazor-web-app)
1. [Getting Started with Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Web Assembly App in Visual Studio or .NET CLI](https://blazor.syncfusion.com/documentation/getting-started/blazor-webassembly-app)
2. [Getting Started with Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Web App in Visual Studio or .NET CLI](https://blazor.syncfusion.com/documentation/getting-started/blazor-web-app)
4 changes: 2 additions & 2 deletions blazor/accumulation-chart/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,5 +287,5 @@ N> [View Sample in GitHub](https://github.com/SyncfusionExamples/Blazor-Getting-

## See also

* [Getting Started with Syncfusion Blazor Web Assembly App in Visual Studio or .NET CLI](https://blazor.syncfusion.com/documentation/getting-started/blazor-webassembly-app)
* [Getting Started with Syncfusion Blazor Web App in Visual Studio or .NET CLI](https://blazor.syncfusion.com/documentation/getting-started/blazor-web-app)
* [Getting Started with Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Web Assembly App in Visual Studio or .NET CLI](https://blazor.syncfusion.com/documentation/getting-started/blazor-webassembly-app)
* [Getting Started with Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Web App in Visual Studio or .NET CLI](https://blazor.syncfusion.com/documentation/getting-started/blazor-web-app)
10 changes: 5 additions & 5 deletions blazor/ai-assistview/how-to/integration-with-ai.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
---
layout: post
title: Integration of Microsoft.Extensions.AI with the Blazor AI AssistView component | Syncfusion
title: Integration | Blazor AI AssistView component | Syncfusion
description: Checkout and learn about Integration with Microsoft.Extensions.AI and Keyboard interaction with Blazor AI AssistView component and more details.
platform: Blazor
control: AI AssistView
documentation: ug
---

# Integration of Microsoft.Extensions.AI with the Blazor AI AssistView component
# Integration of Microsoft.Extensions.AI with AI AssistView component

The Syncfusion 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.
The Syncfusion<sup style="font-size:70%">&reg;</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.

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

Expand Down Expand Up @@ -48,7 +48,7 @@ dotnet add package Markdig

### Configure services in Program.cs

Register the `Azure OpenAI` client and Syncfusion AI Assistview component within the Blazor application.
Register the `Azure OpenAI` client and Syncfusion<sup style="font-size:70%">&reg;</sup> AI AssistView component within the Blazor application.

{% tabs %}
{% highlight c# tabtitle="~/_Program.cs" hl_lines="2 9" %}
Expand Down Expand Up @@ -88,7 +88,7 @@ var app = builder.Build();

### AI AssistView with IChatClient

The Syncfusion `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.
The Syncfusion<sup style="font-size:70%">&reg;</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.

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.

Expand Down
19 changes: 11 additions & 8 deletions blazor/ai/azure-openai.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ control: AI Integration
documentation: ug
---

# Azure OpenAI Integration with Syncfusion Blazor AI
# Azure OpenAI Integration with Syncfusion® Blazor AI

This section explains how to configure and use the [Syncfusion.Blazor.AI](https://www.nuget.org/packages/Syncfusion.Blazor.AI) package with [Azure OpenAI](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/create-resource) to enable AI functionalities in your Blazor applications. The package provides seamless integration with Azure OpenAI's API, allowing you to enhance any Syncfusion Blazor component with intelligent features.
## Introduction

This section demonstrates configuring and using the [Syncfusion.Blazor.AI](https://www.nuget.org/packages/Syncfusion.Blazor.AI) package with [Azure OpenAI](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/create-resource) to enable AI functionalities in Blazor applications. The package provides seamless integration with Azure OpenAI's API, empowering Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor components with intelligent features such as natural language querying, data analysis, and content processing.

## Prerequisites

Expand All @@ -28,7 +30,8 @@ Install-Package Azure.AI.OpenAI
{% endtabs %}
* To use Azure OpenAI, please install the [Azure.AI.OpenAI](https://www.nuget.org/packages/Azure.AI.OpenAI/2.2.0-beta.5) package separately in your Blazor application.
* [Deployed an Azure OpenAI Service resource and model](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/create-resource) to obtain values for `apiKey`, `deploymentName` and `endpoint`
* Met the [System Requirements](https://blazor.syncfusion.com/documentation/system-requirements) for Syncfusion Blazor components
* Met the [System Requirements](https://blazor.syncfusion.com/documentation/system-requirements) for Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor components
* Configured secure credential storage using Azure Key Vault or environment variables

## Configuration Steps

Expand Down Expand Up @@ -62,7 +65,7 @@ builder.Services.AddSingleton<IChatInferenceService, SyncfusionAIService>();

## Natural Language Querying with Azure OpenAI

This example demonstrates using the **Syncfusion.Blazor.AI** package with **Azure OpenAI** to enable natural language querying in a Blazor application. The application features a Syncfusion Tab component with a textarea for entering natural language queries, a QueryBuilder component to visualize the generated query rules, and a Grid component to display filtered results based on the query processed by Azure OpenAI.
This example demonstrates using the **Syncfusion.Blazor.AI** package with Azure OpenAI to enable natural language querying in a Blazor application. The application features a Syncfusion<sup style="font-size:70%">&reg;</sup> Tab component with a textarea for entering natural language queries, a QueryBuilder component to visualize the generated query rules, and a Grid component to display filtered results based on the query processed by Azure OpenAI.

### Prerequisites
- Install the following NuGet packages:
Expand All @@ -80,7 +83,7 @@ Install-Package Azure.AI.OpenAI
{% endhighlight %}
{% endtabs %}
- Ensure your Blazor application meets the [System Requirements](https://blazor.syncfusion.com/documentation/system-requirements).
- Add the following to `App.razor` for Syncfusion themes and scripts:
- Add the following to `App.razor` for Syncfusion<sup style="font-size:70%">&reg;</sup> themes and scripts:

```html
<head>
Expand All @@ -94,7 +97,7 @@ Install-Package Azure.AI.OpenAI
</body>
```

### Register Syncfusion Blazor Service
### Register Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Service

Register the Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor Service in the **~/Program.cs** file of your Blazor Web App.

Expand Down Expand Up @@ -354,7 +357,7 @@ namespace AzureOpenAIExample.Components.Pages

## How It Works

The example above demonstrates how to use Azure OpenAI with Syncfusion Blazor components for natural language query processing:
The example above demonstrates how to use Azure OpenAI with Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor components for natural language query processing:

1. **Setup**: Configuring the Azure OpenAI service in `Program.cs` with appropriate credentials.
2. **Component Integration**: Using the `IChatInferenceService` to process natural language queries.
Expand All @@ -366,4 +369,4 @@ The example above demonstrates how to use Azure OpenAI with Syncfusion Blazor co
- **IChatInferenceService**: Injected to interact with the Azure OpenAI models.
- **ChatParameters**: Configures the AI request, including system prompt and user messages.
- **GenerateResponseAsync**: Sends the request to Azure OpenAI and retrieves the response asynchronously.
- **UI Components**: Syncfusion Tab, QueryBuilder, and Grid components work together with the AI service.
- **UI Components**: Syncfusion<sup style="font-size:70%">&reg;</sup> Tab, QueryBuilder, and Grid components work together with the AI service.
30 changes: 24 additions & 6 deletions blazor/ai/custom-ai-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,11 @@ control: AI Integration
documentation: ug
---

# Custom AI Service Integration with Syncfusion Blazor AI
# Custom AI Service Integration with Syncfusion® Blazor AI

This section explains how to configure and use the [Syncfusion.Blazor.AI](https://www.nuget.org/packages/Syncfusion.Blazor.AI) package with a **custom AI service** by implementing the `IChatInferenceService` interface, using DeepSeek as an example. This extensibility allows you to integrate DeepSeek or any custom AI provider into your Blazor applications, enhancing Syncfusion Blazor components with tailored AI functionalities.
## Introduction

This section demonstrates configuring and using the [Syncfusion.Blazor.AI](https://www.nuget.org/packages/Syncfusion.Blazor.AI) package with a **custom AI service** by implementing the `IChatInferenceService` interface, using DeepSeek as an example. This extensibility feature empowers developers to integrate any AI provider into Blazor applications, enabling Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor components to work with specialized or proprietary AI services beyond the standard providers.

## Prerequisites

Expand All @@ -23,11 +25,14 @@ Install-Package Syncfusion.Blazor.AI -Version {{ site.releaseversion }}

{% endhighlight %}
{% endtabs %}
* Obtained a DeepSeek API key from the [DeepSeek platform](https://platform.deepseek.com) (or your preferred AI provider)
* Met the [System Requirements](https://blazor.syncfusion.com/documentation/system-requirements) for Syncfusion Blazor components

* Obtained an API key from your chosen AI provider (DeepSeek in this example) from the [DeepSeek platform](https://platform.deepseek.com)
* Met the [System Requirements](https://blazor.syncfusion.com/documentation/system-requirements) for Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor components
* Understanding of HTTP client usage and JSON serialization in .NET applications

## Configuration Steps
To use DeepSeek as a custom AI service, implement the `IChatInferenceService` interface and configure it in your `Program.cs` file using `AIServiceCredentials` to provide the API key, deployment name, and endpoint.

Follow these steps to integrate a custom AI service with Syncfusion<sup style="font-size:70%">&reg;</sup> Blazor AI:

### Implement the Custom AI Service
Create a class that implements the `IChatInferenceService` interface for DeepSeek. The implementation below uses the provided DeepSeek code, modified to utilize `AIServiceCredentials` from `Program.cs`.
Expand Down Expand Up @@ -94,5 +99,18 @@ builder.Services.AddSingleton(new AIServiceCredentials
builder.Services.AddSingleton<IChatInferenceService, DeepSeekAIService>();
```

## Custom AI Integration with Syncfusion<sup style="font-size:70%">&reg;</sup> Components
The `GenerateResponseAsync` method in the DeepSeekAIService class serves as the core interface for AI communication. This method:

1. **Formats Requests:** Converts Syncfusion<sup style="font-size:70%">&reg;</sup> AI parameters into the custom provider's expected format
2. **Handles Authentication:** Manages API key authentication securely
3. **Processes Responses:** Parses the provider's response format into standard AI responses

## See Also

The `GenerateResponseAsync` method in the DeepSeekAIService class is the core method that makes an AI call to the DeepSeek API endpoint.
- [Overview](https://blazor.syncfusion.com/documentation/smart-ai-solutions/ai/overview)
- [OpenAI Integration](https://blazor.syncfusion.com/documentation/smart-ai-solutions/ai/openai)
- [Azure OpenAI Integration](https://blazor.syncfusion.com/documentation/smart-ai-solutions/ai/azure-openai)
- [Ollama Integration](https://blazor.syncfusion.com/documentation/smart-ai-solutions/ai/ollama)
- [Smart TextArea](https://blazor.syncfusion.com/documentation/smart-textarea/getting-started)
- [Smart Paste Button](https://blazor.syncfusion.com/documentation/smart-paste/getting-started)
Loading