Skip to content

Commit 83dba6f

Browse files
committed
feat: wip support tool choice
1 parent fc07638 commit 83dba6f

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

src/Cnblogs.DashScope.Core/ITextGenerationParameters.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,10 @@ public interface ITextGenerationParameters : IIncrementalOutputParameter, ISeedP
4646
/// <summary>
4747
/// Available tools for model to call.
4848
/// </summary>
49-
public List<ToolDefinition>? Tools { get; }
49+
public IEnumerable<ToolDefinition>? Tools { get; }
50+
51+
/// <summary>
52+
///
53+
/// </summary>
54+
public ToolChoice? ToolChoice { get; }
5055
}

src/Cnblogs.DashScope.Core/TextGenerationParameters.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ public class TextGenerationParameters : ITextGenerationParameters
3333
public bool? EnableSearch { get; set; }
3434

3535
/// <inheritdoc />
36-
public List<ToolDefinition>? Tools { get; set; }
36+
public IEnumerable<ToolDefinition>? Tools { get; set; }
37+
38+
/// <inheritdoc />
39+
public ToolChoice? ToolChoice { get; set; }
3740

3841
/// <inheritdoc />
3942
public bool? IncrementalOutput { get; set; }
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace Cnblogs.DashScope.Core;
2+
3+
/// <summary>
4+
/// Specify behavior when model
5+
/// </summary>
6+
public record ToolChoice();

0 commit comments

Comments
 (0)