This repository demonstrates the sample for Deepseek AI Integration with Syncfusion Blazor Smartcomponents.
This project demonstrates the integration of DeepSeek local AI model with Syncfusion Blazor SmartComponents brings AI-powered automation to text-based applications, enhancing sentence completion, content pasting, and real-time suggestions.
Before you begin, ensure you have the following:
- Visual Studio 2022 with the ASP.NET and web development workload installed.
- .NET 8.0 SDK or later.
- DeepSeek Model: Installed in your system.
To integrate DeepSeek with Syncfusion SmartComponents, you must first install and run the model locally on your system. Follow these steps to get started:
Download and install Ollama from Ollama's official website based on your operating system.
After installing Ollama, open a command prompt or terminal and run the following command to install and start the DeepSeek model:
ollama run <model-name>
Replace <model-name>
with the specific DeepSeek model you want to use. For example:
ollama run deepseek:7b
Once the model is running, it will be hosted locally and can be used within Syncfusion SmartComponents for AI-powered text assistance.
Clone the repository to your local machine:
git clone <repository-url>
cd <repository-folder>
Make sure all required NuGet packages are installed. Use the following commands if necessary:
dotnet restore
To configure the AI service, add the following settings to the ~/Program.cs
file in your Blazor application:
builder.Services.AddSyncfusionSmartComponents()
.ConfigureCredentials(new AIServiceCredentials
{
SelfHosted = true,
Endpoint = new Uri("Your local endpoint"),
DeploymentName = "your model name"
})
.InjectOpenAIInference();
- Set
SelfHosted
totrue
. - Provide the
Endpoint
URL where the model is hosted (e.g.,http://localhost:11434
).
Before proceeding, ensure the DeepSeek model is installed and running locally.
Once the model is running, set the DeploymentName
to match the installed model, such as:
deepseek-r1:1.5b
deepseek-r1:7b
mistral:7b
Run the following command to build and start the application:
dotnet run
Once the application starts, open your browser and navigate to the provided URL.