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