Skip to content

Commit 187745c

Browse files
committed
Add overload to find calls in a chat response by tool name
1 parent 4ada511 commit 187745c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/AI/ToolExtensions.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ public static class ToolExtensions
2626
public static IEnumerable<ToolCall> FindCalls(this ChatResponse response, AIFunction tool)
2727
=> FindCalls(response.Messages, tool.Name);
2828

29+
/// <summary>
30+
/// Looks for calls to a tool and their outcome.
31+
/// </summary>
32+
public static IEnumerable<ToolCall> FindCalls(this ChatResponse response, string tool)
33+
=> FindCalls(response.Messages, tool);
34+
2935
/// <summary>
3036
/// Looks for calls to a tool and their outcome.
3137
/// </summary>

0 commit comments

Comments
 (0)