Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.AI" Version="9.4.0-preview.1.25207.5" />
<PackageReference Include="Microsoft.Extensions.AI" Version="9.4.3-preview.1.25230.7" />
</ItemGroup>

</Project>
2 changes: 1 addition & 1 deletion src/Cnblogs.DashScope.AI/Cnblogs.DashScope.AI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.AI.Abstractions" Version="9.4.0-preview.1.25207.5" />
<PackageReference Include="Microsoft.Extensions.AI.Abstractions" Version="9.4.3-preview.1.25230.7" />
</ItemGroup>

</Project>
5 changes: 3 additions & 2 deletions src/Cnblogs.DashScope.AI/DashScopeChatClient.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Runtime.CompilerServices;
using System.Runtime.CompilerServices;
using System.Text.Json;
using Cnblogs.DashScope.Core;
using Cnblogs.DashScope.Sdk;
Expand Down Expand Up @@ -503,7 +503,8 @@ private IEnumerable<TextChatMessage> ToTextChatMessages(
RequiredChatToolMode required when string.IsNullOrEmpty(required.RequiredFunctionName) == false =>
ToolChoice.FunctionChoice(required.RequiredFunctionName),
_ => ToolChoice.AutoChoice
}
},
ParallelToolCalls = options.AllowMultipleToolCalls,
};
}

Expand Down
7 changes: 6 additions & 1 deletion src/Cnblogs.DashScope.Core/ITextGenerationParameters.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Cnblogs.DashScope.Core;
namespace Cnblogs.DashScope.Core;

/// <summary>
/// The text generation options.
Expand Down Expand Up @@ -49,4 +49,9 @@ public interface ITextGenerationParameters
/// Behavior when choosing tools.
/// </summary>
public ToolChoice? ToolChoice { get; }

/// <summary>
/// Whether to enable parallel tool calling
/// </summary>
public bool? ParallelToolCalls { get; }
}
5 changes: 4 additions & 1 deletion src/Cnblogs.DashScope.Core/TextGenerationParameters.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
namespace Cnblogs.DashScope.Core;
namespace Cnblogs.DashScope.Core;

/// <summary>
/// The text generation options.
Expand Down Expand Up @@ -44,6 +44,9 @@ public class TextGenerationParameters : ITextGenerationParameters
/// <inheritdoc />
public ToolChoice? ToolChoice { get; set; }

/// <inheritdoc />
public bool? ParallelToolCalls { get; set; }

/// <inheritdoc />
public bool? IncrementalOutput { get; set; }
}