67 references to ToolApprovalResponseContent
Microsoft.Extensions.AI.Abstractions (2)
Contents\ToolApprovalRequestContent.cs (1)
74
new
ToolApprovalResponseContent
(RequestId, approved, ToolCall) { Reason = reason };
Generated\361d1da7f942c932\JsonContext.ToolApprovalResponseContent.g.cs (1)
34
ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.
ToolApprovalResponseContent
((string)args[0], (bool)args[1], (global::Microsoft.Extensions.AI.ToolCallContent)args[2]),
Microsoft.Extensions.AI.Abstractions.Tests (13)
Contents\AIContentTests.cs (2)
78
new
ToolApprovalResponseContent
("request123", approved: true, new FunctionCallContent("call123", "functionName", new Dictionary<string, object?> { { "param1", 123 } })),
82
new
ToolApprovalResponseContent
("request123", approved: true, new McpServerToolCallContent("call456", "myTool2", "myServer2")),
Contents\InputResponseContentTests.cs (2)
39
new
ToolApprovalResponseContent
("request123", true, new FunctionCallContent("call123", "functionName")),
40
new
ToolApprovalResponseContent
("request456", true, new McpServerToolCallContent("call456", "myTool", "myServer")),
Contents\ToolApprovalResponseContentTests.cs (8)
16
Assert.Throws<ArgumentNullException>("requestId", () => new
ToolApprovalResponseContent
(null!, true, new FunctionCallContent("FCC1", "TestFunction")));
17
Assert.Throws<ArgumentException>("requestId", () => new
ToolApprovalResponseContent
("", true, new FunctionCallContent("FCC1", "TestFunction")));
18
Assert.Throws<ArgumentException>("requestId", () => new
ToolApprovalResponseContent
("\r\t\n ", true, new FunctionCallContent("FCC1", "TestFunction")));
19
Assert.Throws<ArgumentNullException>("toolCall", () => new
ToolApprovalResponseContent
("id", true, null!));
34
ToolApprovalResponseContent content =
new
("req-1", true, toolCall);
40
content =
new
("req-2", false, toolCall);
51
var content = new
ToolApprovalResponseContent
("request123", true, toolCall)
82
var content = new
ToolApprovalResponseContent
("request123", true, new FunctionCallContent("call123", "functionName"))
Generated\361d1da7f942c932\TestJsonSerializerContext.ToolApprovalResponseContent.g.cs (1)
32
ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.
ToolApprovalResponseContent
((string)args[0], (bool)args[1], (global::Microsoft.Extensions.AI.ToolCallContent)args[2]),
Microsoft.Extensions.AI.Evaluation.Reporting (1)
Generated\361d1da7f942c932\JsonContext.ToolApprovalResponseContent.g.cs (1)
34
ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.
ToolApprovalResponseContent
((string)args[0], (bool)args[1], (global::Microsoft.Extensions.AI.ToolCallContent)args[2]),
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (1)
Generated\361d1da7f942c932\JsonContext.ToolApprovalResponseContent.g.cs (1)
34
ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.
ToolApprovalResponseContent
((string)args[0], (bool)args[1], (global::Microsoft.Extensions.AI.ToolCallContent)args[2]),
Microsoft.Extensions.AI.OpenAI (2)
OpenAIResponsesChatClient.cs (2)
246
message.Contents.Add(new
ToolApprovalResponseContent
(
549
yield return CreateUpdate(new
ToolApprovalResponseContent
(
Microsoft.Extensions.AI.OpenAI.Tests (2)
OpenAIResponseClientTests.cs (2)
1756
var codeInterpreterApproval = new
ToolApprovalResponseContent
("req-ci-1", true, new CodeInterpreterToolCallContent("ci-call-1"));
1757
var imageGenApproval = new
ToolApprovalResponseContent
("req-ig-1", false, new ImageGenerationToolCallContent("ig-call-1"));
Microsoft.Extensions.AI.Stabilization.Tests (1)
Generated\361d1da7f942c932\AIContentSerializationRegressionContext.ToolApprovalResponseContent.g.cs (1)
32
ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.
ToolApprovalResponseContent
((string)args[0], (bool)args[1], (global::Microsoft.Extensions.AI.ToolCallContent)args[2]),
Microsoft.Extensions.AI.Tests (45)
ChatCompletion\FunctionInvokingChatClientApprovalsTests.cs (41)
264
new
ToolApprovalResponseContent
("ficc_callId1", true, new FunctionCallContent("callId1", "Func1")),
265
new
ToolApprovalResponseContent
("ficc_callId2", true, new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
316
new
ToolApprovalResponseContent
("ficc_callId1", true, new FunctionCallContent("callId1", "Func1")),
317
new
ToolApprovalResponseContent
("ficc_callId2", true, new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
371
new
ToolApprovalResponseContent
("ficc_callId1", true, new FunctionCallContent("callId1", "Func1")),
375
new
ToolApprovalResponseContent
("ficc_callId2", true, new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
427
new
ToolApprovalResponseContent
("ficc_callId1", false, new FunctionCallContent("callId1", "Func1")),
428
new
ToolApprovalResponseContent
("ficc_callId2", false, new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
486
new
ToolApprovalResponseContent
("ficc_callId1", false, new FunctionCallContent("callId1", "Func1")),
487
new
ToolApprovalResponseContent
("ficc_callId2", true, new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
550
new
ToolApprovalResponseContent
("ficc_callId1", false, new FunctionCallContent("callId1", "Func1"))
554
new
ToolApprovalResponseContent
("ficc_callId2", false, new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
617
new
ToolApprovalResponseContent
("ficc_callId1", false, new FunctionCallContent("callId1", "Func1")) { Reason = "Custom rejection for Func1" },
618
new
ToolApprovalResponseContent
("ficc_callId2", false, new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })),
619
new
ToolApprovalResponseContent
("ficc_callId3", true, new FunctionCallContent("callId3", "Func3", arguments: new Dictionary<string, object?> { { "s", "test" } }))
707
new
ToolApprovalResponseContent
("ficc_callId1", false, new FunctionCallContent("callId1", "Func1"))
766
new
ToolApprovalResponseContent
("ficc_callId1", true, new FunctionCallContent("callId1", "Func1")),
767
new
ToolApprovalResponseContent
("ficc_callId2", true, new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
820
new
ToolApprovalResponseContent
("ficc_callId1", true, new FunctionCallContent("callId1", "Func1")),
821
new
ToolApprovalResponseContent
("ficc_callId2", true, new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
831
new
ToolApprovalResponseContent
("ficc_callId3", true, new FunctionCallContent("callId3", "Func1")),
898
new
ToolApprovalResponseContent
("ficc_callId1", false, responseFcc),
970
new
ToolApprovalResponseContent
("ficc_callId1", false, response1Fcc),
978
new
ToolApprovalResponseContent
("ficc_callId2", false, request2Fcc),
1116
new
ToolApprovalResponseContent
("ficc_callId1", true, new FunctionCallContent("callId1", "Func1")),
1117
new
ToolApprovalResponseContent
("ficc_callId2", true, new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
1162
new
ToolApprovalResponseContent
("ficc_callId1", true, new FunctionCallContent("callId1", "Func1")),
1163
new
ToolApprovalResponseContent
("ficc_callId2", true, new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
1206
new
ToolApprovalResponseContent
("ficc_callId1", true, new FunctionCallContent("callId1", "Func1")),
1256
new
ToolApprovalResponseContent
("ficc_callId1", true, new FunctionCallContent("callId1", "Func1")),
1306
new
ToolApprovalResponseContent
("ficc_callId1", true, new FunctionCallContent("callId1", "Func1")),
1361
new
ToolApprovalResponseContent
("ficc_callId1", true, new FunctionCallContent("callId1", "Func1")),
1419
new
ToolApprovalResponseContent
("ficc_callId1", true, new FunctionCallContent("callId1", "Func1")),
1692
new
ToolApprovalResponseContent
("approval-request-id", true, new FunctionCallContent("function-call-id", "Func1"))
1787
new
ToolApprovalResponseContent
("ficc_callId1", true, new FunctionCallContent("callId1", "Func")),
1788
new
ToolApprovalResponseContent
("callId2", true, new McpServerToolCallContent("callId2", "McpCall", "myServer"))
1809
new
ToolApprovalResponseContent
("callId2", true, new McpServerToolCallContent("callId2", "McpCall", "myServer"))
1871
new
ToolApprovalResponseContent
("ficc_callId1", approveFuncCall, new FunctionCallContent("callId1", "Func")),
1872
new
ToolApprovalResponseContent
("callId2", approveMcpCall, new McpServerToolCallContent("callId2", "McpCall", "myServer"))
1894
new
ToolApprovalResponseContent
("callId2", approveMcpCall, new McpServerToolCallContent("callId2", "McpCall", "myServer"))
2108
new
ToolApprovalResponseContent
(tarc.RequestId, tarc.Approved, (ToolCallContent)CloneFcc(tarc.ToolCall))
ChatCompletion\FunctionInvokingChatClientTests.cs (2)
3402
new
ToolApprovalResponseContent
("ficc_callId1", true, new FunctionCallContent("callId1", "Func1"))
3439
new
ToolApprovalResponseContent
("ficc_callId1", false, new FunctionCallContent("callId1", "Func1")) { Reason = "User denied" }
ChatCompletion\OpenTelemetryChatClientTests.cs (1)
849
new
ToolApprovalResponseContent
("approval-1", true, toolCall),
Generated\361d1da7f942c932\TestJsonSerializerContext.ToolApprovalResponseContent.g.cs (1)
32
ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.
ToolApprovalResponseContent
((string)args[0], (bool)args[1], (global::Microsoft.Extensions.AI.ToolCallContent)args[2]),