DashScope.SDK.Net6
1.0.12
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package DashScope.SDK.Net6 --version 1.0.12
NuGet\Install-Package DashScope.SDK.Net6 -Version 1.0.12
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="DashScope.SDK.Net6" Version="1.0.12" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DashScope.SDK.Net6 --version 1.0.12
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DashScope.SDK.Net6, 1.0.12"
#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.
// Install DashScope.SDK.Net6 as a Cake Addin #addin nuget:?package=DashScope.SDK.Net6&version=1.0.12 // Install DashScope.SDK.Net6 as a Cake Tool #tool nuget:?package=DashScope.SDK.Net6&version=1.0.12
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#调用方式
#单轮对话
string CallQwen(string msg)
{
QwenClient qwenClient = new QwenClient("apikey");
var param = new DashScope.SDK.Net6.QwenModels.QwenParam()
{
Model = ModelNames.QWEN_V1,
Prompt = msg,
TopP = 0.8
};
var result = qwenClient.QwenCallAsync(param,new QwenEndpoint()).Result;
return JsonConvert.SerializeObject(result);
}
#多伦对话
var allqwenParam = new DashScope.SDK.Net6.QwenModels.QwenParam()
{
Model = ModelNames.QWEN_V1,
TopP = 0.8
};
var allqwenClient = new QwenClient("apikey");
string CallMulti(string msg)
{
allqwenParam.Prompt = msg; //Message格式 多轮对话 第一种方式 兼容Prompt
//allqwenParam.Message = new DashScope.SDK.Net6.Models.Message() { Role =Role.User, Content = msg }; //Message格式 多轮对话 第二种方式
var result = allqwenClient.QwenCallAsync(allqwenParam, new QwenEndpoint(),true).Result;
return JsonConvert.SerializeObject(result);
}
var mulns = CallMulti("今天广州天气如何?");
Console.WriteLine(mulns);
mulns = CallMulti("我上一个问题是什么?");
Console.WriteLine(mulns);
Console.ReadLine();
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- Newtonsoft.Json (>= 13.0.3)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.13 | 390 | 9/20/2023 |
1.0.12 | 224 | 9/19/2023 |
1.0.11 | 231 | 9/19/2023 |
1.0.10 | 230 | 9/19/2023 |
1.0.9 | 215 | 9/18/2023 |
1.0.8 | 228 | 9/18/2023 |
1.0.7 | 228 | 9/18/2023 |
1.0.6 | 216 | 9/18/2023 |
1.0.5 | 209 | 9/18/2023 |
1.0.4 | 226 | 9/18/2023 |
1.0.3 | 227 | 9/18/2023 |
1.0.2 | 230 | 9/14/2023 |
1.0.1 | 220 | 9/14/2023 |
1.0.0 | 230 | 9/14/2023 |