DashScope.SDK.Net6 1.0.13

dotnet add package DashScope.SDK.Net6 --version 1.0.13                
NuGet\Install-Package DashScope.SDK.Net6 -Version 1.0.13                
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.13" />                
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.13                
#r "nuget: DashScope.SDK.Net6, 1.0.13"                
#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.13

// Install DashScope.SDK.Net6 as a Cake Tool
#tool nuget:?package=DashScope.SDK.Net6&version=1.0.13                

#新增模型:qwen-turbo,qwen-plus

#调用方式

#单轮对话

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

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 393 9/20/2023
1.0.12 226 9/19/2023
1.0.11 233 9/19/2023
1.0.10 232 9/19/2023
1.0.9 217 9/18/2023
1.0.8 230 9/18/2023
1.0.7 230 9/18/2023
1.0.6 218 9/18/2023
1.0.5 211 9/18/2023
1.0.4 228 9/18/2023
1.0.3 229 9/18/2023
1.0.2 232 9/14/2023
1.0.1 222 9/14/2023
1.0.0 232 9/14/2023