From 19fc5294439a9223d5ac7ca37baf618acbca15dd Mon Sep 17 00:00:00 2001 From: David Cantu Date: Tue, 6 May 2025 17:24:04 -0500 Subject: [PATCH] Update to M.E.AI 9.4.3-preview.1.25230.7 --- .../Cnblogs.DashScope.Sample.csproj | 2 +- src/Cnblogs.DashScope.AI/Cnblogs.DashScope.AI.csproj | 2 +- src/Cnblogs.DashScope.AI/DashScopeChatClient.cs | 5 +++-- src/Cnblogs.DashScope.Core/ITextGenerationParameters.cs | 7 ++++++- src/Cnblogs.DashScope.Core/TextGenerationParameters.cs | 5 ++++- 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/sample/Cnblogs.DashScope.Sample/Cnblogs.DashScope.Sample.csproj b/sample/Cnblogs.DashScope.Sample/Cnblogs.DashScope.Sample.csproj index 6fcdad9..d8cdc9f 100644 --- a/sample/Cnblogs.DashScope.Sample/Cnblogs.DashScope.Sample.csproj +++ b/sample/Cnblogs.DashScope.Sample/Cnblogs.DashScope.Sample.csproj @@ -20,7 +20,7 @@ - + diff --git a/src/Cnblogs.DashScope.AI/Cnblogs.DashScope.AI.csproj b/src/Cnblogs.DashScope.AI/Cnblogs.DashScope.AI.csproj index a92e8fc..a06683f 100644 --- a/src/Cnblogs.DashScope.AI/Cnblogs.DashScope.AI.csproj +++ b/src/Cnblogs.DashScope.AI/Cnblogs.DashScope.AI.csproj @@ -10,7 +10,7 @@ - + diff --git a/src/Cnblogs.DashScope.AI/DashScopeChatClient.cs b/src/Cnblogs.DashScope.AI/DashScopeChatClient.cs index 11b86af..d85031b 100644 --- a/src/Cnblogs.DashScope.AI/DashScopeChatClient.cs +++ b/src/Cnblogs.DashScope.AI/DashScopeChatClient.cs @@ -1,4 +1,4 @@ -using System.Runtime.CompilerServices; +using System.Runtime.CompilerServices; using System.Text.Json; using Cnblogs.DashScope.Core; using Cnblogs.DashScope.Sdk; @@ -503,7 +503,8 @@ private IEnumerable ToTextChatMessages( RequiredChatToolMode required when string.IsNullOrEmpty(required.RequiredFunctionName) == false => ToolChoice.FunctionChoice(required.RequiredFunctionName), _ => ToolChoice.AutoChoice - } + }, + ParallelToolCalls = options.AllowMultipleToolCalls, }; } diff --git a/src/Cnblogs.DashScope.Core/ITextGenerationParameters.cs b/src/Cnblogs.DashScope.Core/ITextGenerationParameters.cs index c32bb72..d7774f2 100644 --- a/src/Cnblogs.DashScope.Core/ITextGenerationParameters.cs +++ b/src/Cnblogs.DashScope.Core/ITextGenerationParameters.cs @@ -1,4 +1,4 @@ -namespace Cnblogs.DashScope.Core; +namespace Cnblogs.DashScope.Core; /// /// The text generation options. @@ -49,4 +49,9 @@ public interface ITextGenerationParameters /// Behavior when choosing tools. /// public ToolChoice? ToolChoice { get; } + + /// + /// Whether to enable parallel tool calling + /// + public bool? ParallelToolCalls { get; } } diff --git a/src/Cnblogs.DashScope.Core/TextGenerationParameters.cs b/src/Cnblogs.DashScope.Core/TextGenerationParameters.cs index c5151f3..b6a6fe9 100644 --- a/src/Cnblogs.DashScope.Core/TextGenerationParameters.cs +++ b/src/Cnblogs.DashScope.Core/TextGenerationParameters.cs @@ -1,4 +1,4 @@ -namespace Cnblogs.DashScope.Core; +namespace Cnblogs.DashScope.Core; /// /// The text generation options. @@ -44,6 +44,9 @@ public class TextGenerationParameters : ITextGenerationParameters /// public ToolChoice? ToolChoice { get; set; } + /// + public bool? ParallelToolCalls { get; set; } + /// public bool? IncrementalOutput { get; set; } }