Cnblogs.SemanticKernel.Connectors.DashScope 0.2.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Cnblogs.SemanticKernel.Connectors.DashScope --version 0.2.0
                    
NuGet\Install-Package Cnblogs.SemanticKernel.Connectors.DashScope -Version 0.2.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Cnblogs.SemanticKernel.Connectors.DashScope" Version="0.2.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Cnblogs.SemanticKernel.Connectors.DashScope" Version="0.2.0" />
                    
Directory.Packages.props
<PackageReference Include="Cnblogs.SemanticKernel.Connectors.DashScope" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Cnblogs.SemanticKernel.Connectors.DashScope --version 0.2.0
                    
#r "nuget: Cnblogs.SemanticKernel.Connectors.DashScope, 0.2.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Cnblogs.SemanticKernel.Connectors.DashScope&version=0.2.0
                    
Install Cnblogs.SemanticKernel.Connectors.DashScope as a Cake Addin
#tool nuget:?package=Cnblogs.SemanticKernel.Connectors.DashScope&version=0.2.0
                    
Install Cnblogs.SemanticKernel.Connectors.DashScope as a Cake Tool

SemanticKernel.Connectors.DashScope

Semantic Kernel Connector to DashScope

Get started

Add the NuGet package to your project.

dotnet add package Cnblogs.SemanticKernel.Connectors.DashScope
using Microsoft.SemanticKernel;

var builder = Kernel.CreateBuilder();
builder.Services.AddDashScopeChatCompletion("your-api-key", "qwen-max");
var kernel = builder.Build();

var prompt = "<message role=\"user\">Tell me about the Cnblogs</message>";
var response = await kernel.InvokePromptAsync(prompt);
Console.WriteLine(response);

ASP.NET Core

appsettings.json

{
    "dashScope": {
        "apiKey": "your-key",
        "chatCompletionModelId": "qwen-max",
        "textEmbeddingModelId": "text-embedding-v2"
    }
}

Program.cs

builder.Services.AddDashScopeChatCompletion(builder.Configuration);
builder.Services.AddScoped<Kernel>(sp => new Kernel(sp));

Services

public class YourService(Kernel kernel)
{
    public async Task<string> GetCompletionAsync(string prompt)
    {
        var chatResult = await kernel.InvokePromptAsync(prompt);
        return chatResult.ToString();
    }
}
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Cnblogs.SemanticKernel.Connectors.DashScope:

Package Downloads
Cnblogs.KernelMemory.AI.DashScope

Provide access to DashScope LLM models in Kernel Memory to generate embeddings and text

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.6.1 231 12/23/2024
0.6.0 136 12/19/2024
0.5.1 267 10/22/2024
0.5.0 191 10/3/2024
0.4.0 737 8/4/2024
0.3.3 224 7/8/2024
0.3.2 2,663 3/23/2024
0.3.1 132 3/20/2024
0.3.0 659 3/18/2024
0.2.0 339 3/7/2024
0.1.5 156 2/21/2024
0.1.4 154 2/15/2024
0.1.3 125 2/15/2024
0.1.2 128 2/13/2024
0.1.1 106 2/13/2024
0.1.0 245 2/13/2024