79 references to ToolApprovalRequestContent
Microsoft.Extensions.AI (2)
ChatCompletion\FunctionInvokingChatClient.cs (2)
1722
updatedContent[i] = new
ToolApprovalRequestContent
(ComposeApprovalRequestId(fcc.CallId), fcc)
1790
message.Contents[contentIndex] = new
ToolApprovalRequestContent
(ComposeApprovalRequestId(functionCall.CallId), functionCall)
Microsoft.Extensions.AI.Abstractions (1)
Generated\361d1da7f942c932\JsonContext.ToolApprovalRequestContent.g.cs (1)
34
ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.
ToolApprovalRequestContent
((string)args[0], (global::Microsoft.Extensions.AI.ToolCallContent)args[1]),
Microsoft.Extensions.AI.Abstractions.Tests (15)
Contents\AIContentTests.cs (2)
77
new
ToolApprovalRequestContent
("request123", new FunctionCallContent("call123", "functionName", new Dictionary<string, object?> { { "param1", 123 } })),
81
new
ToolApprovalRequestContent
("request123", new McpServerToolCallContent("call123", "myTool", "myServer")),
Contents\InputRequestContentTests.cs (2)
40
new
ToolApprovalRequestContent
("request123", new FunctionCallContent("call123", "functionName", new Dictionary<string, object?> { { "param1", 123 } })),
41
new
ToolApprovalRequestContent
("request456", new McpServerToolCallContent("call456", "myTool", "myServer")),
Contents\ToolApprovalRequestContentTests.cs (10)
16
Assert.Throws<ArgumentNullException>("requestId", () => new
ToolApprovalRequestContent
(null!, new FunctionCallContent("FCC1", "TestFunction")));
17
Assert.Throws<ArgumentException>("requestId", () => new
ToolApprovalRequestContent
("", new FunctionCallContent("FCC1", "TestFunction")));
18
Assert.Throws<ArgumentException>("requestId", () => new
ToolApprovalRequestContent
("\r\t\n ", new FunctionCallContent("FCC1", "TestFunction")));
19
Assert.Throws<ArgumentNullException>("toolCall", () => new
ToolApprovalRequestContent
("id", null!));
35
ToolApprovalRequestContent content =
new
(id, toolCall);
46
ToolApprovalRequestContent content =
new
(id, toolCall);
67
ToolApprovalRequestContent content =
new
(id, functionCall);
82
var content = new
ToolApprovalRequestContent
("request123", toolCall);
137
var content = new
ToolApprovalRequestContent
("req-1", new FunctionCallContent("call1", "Func"));
146
var content = new
ToolApprovalRequestContent
("req-1", new FunctionCallContent("call1", "Func"))
Generated\361d1da7f942c932\TestJsonSerializerContext.ToolApprovalRequestContent.g.cs (1)
32
ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.
ToolApprovalRequestContent
((string)args[0], (global::Microsoft.Extensions.AI.ToolCallContent)args[1]),
Microsoft.Extensions.AI.Evaluation.Reporting (1)
Generated\361d1da7f942c932\JsonContext.ToolApprovalRequestContent.g.cs (1)
34
ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.
ToolApprovalRequestContent
((string)args[0], (global::Microsoft.Extensions.AI.ToolCallContent)args[1]),
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (1)
Generated\361d1da7f942c932\JsonContext.ToolApprovalRequestContent.g.cs (1)
34
ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.
ToolApprovalRequestContent
((string)args[0], (global::Microsoft.Extensions.AI.ToolCallContent)args[1]),
Microsoft.Extensions.AI.OpenAI (3)
OpenAIRealtimeClientSession.cs (1)
1230
[new
ToolApprovalRequestContent
(approvalId, toolCall) { RawRepresentation = approvalItem }],
OpenAIResponsesChatClient.cs (2)
226
var approvalRequest = new
ToolApprovalRequestContent
(mtcari.Id, new McpServerToolCallContent(mtcari.Id, mtcari.ToolName, mtcari.ServerLabel)
529
var streamApprovalRequest = new
ToolApprovalRequestContent
(mtcari.Id, new McpServerToolCallContent(mtcari.Id, mtcari.ToolName, mtcari.ServerLabel)
Microsoft.Extensions.AI.Stabilization.Tests (1)
Generated\361d1da7f942c932\AIContentSerializationRegressionContext.ToolApprovalRequestContent.g.cs (1)
32
ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.
ToolApprovalRequestContent
((string)args[0], (global::Microsoft.Extensions.AI.ToolCallContent)args[1]),
Microsoft.Extensions.AI.Tests (55)
ChatCompletion\FunctionInvokingChatClientApprovalsTests.cs (50)
48
new
ToolApprovalRequestContent
("ficc_callId1", new FunctionCallContent("callId1", "Func1")),
49
new
ToolApprovalRequestContent
("ficc_callId2", new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
84
new
ToolApprovalRequestContent
("ficc_callId1", new FunctionCallContent("callId1", "Func1")),
85
new
ToolApprovalRequestContent
("ficc_callId2", new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
133
new
ToolApprovalRequestContent
("ficc_callId1", new FunctionCallContent("callId1", "Func1"))
137
new
ToolApprovalRequestContent
("ficc_callId2", new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
184
new
ToolApprovalRequestContent
("ficc_callId1", new FunctionCallContent("callId1", "Func1")),
185
new
ToolApprovalRequestContent
("ficc_callId2", new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
229
new
ToolApprovalRequestContent
("ficc_callId1", new FunctionCallContent("callId1", "Func1")),
230
new
ToolApprovalRequestContent
("ficc_callId2", new FunctionCallContent("callId2", "Unknown"))
259
new
ToolApprovalRequestContent
("ficc_callId1", new FunctionCallContent("callId1", "Func1")),
260
new
ToolApprovalRequestContent
("ficc_callId2", new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
311
new
ToolApprovalRequestContent
("ficc_callId1", new FunctionCallContent("callId1", "Func1")),
312
new
ToolApprovalRequestContent
("ficc_callId2", new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
363
new
ToolApprovalRequestContent
("ficc_callId1", new FunctionCallContent("callId1", "Func1")),
367
new
ToolApprovalRequestContent
("ficc_callId2", new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
422
new
ToolApprovalRequestContent
("ficc_callId1", new FunctionCallContent("callId1", "Func1")),
423
new
ToolApprovalRequestContent
("ficc_callId2", new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
481
new
ToolApprovalRequestContent
("ficc_callId1", new FunctionCallContent("callId1", "Func1")),
482
new
ToolApprovalRequestContent
("ficc_callId2", new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
545
new
ToolApprovalRequestContent
("ficc_callId1", new FunctionCallContent("callId1", "Func1")),
546
new
ToolApprovalRequestContent
("ficc_callId2", new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
611
new
ToolApprovalRequestContent
("ficc_callId1", new FunctionCallContent("callId1", "Func1")),
612
new
ToolApprovalRequestContent
("ficc_callId2", new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })),
613
new
ToolApprovalRequestContent
("ficc_callId3", new FunctionCallContent("callId3", "Func3", arguments: new Dictionary<string, object?> { { "s", "test" } }))
703
new
ToolApprovalRequestContent
("ficc_callId1", new FunctionCallContent("callId1", "Func1")),
761
new
ToolApprovalRequestContent
("ficc_callId1", new FunctionCallContent("callId1", "Func1")),
762
new
ToolApprovalRequestContent
("ficc_callId2", new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
789
new
ToolApprovalRequestContent
("ficc_callId2", new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 3 } }))
815
new
ToolApprovalRequestContent
("ficc_callId1", new FunctionCallContent("callId1", "Func1")),
816
new
ToolApprovalRequestContent
("ficc_callId2", new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
827
new
ToolApprovalRequestContent
("ficc_callId3", new FunctionCallContent("callId3", "Func1")),
894
new
ToolApprovalRequestContent
("ficc_callId1", requestFcc),
966
new
ToolApprovalRequestContent
("ficc_callId1", request1Fcc),
974
new
ToolApprovalRequestContent
("ficc_callId2", request2Fcc),
1086
new
ToolApprovalRequestContent
("ficc_callId1", new FunctionCallContent("callId1", "Func1")),
1302
new
ToolApprovalRequestContent
("ficc_callId1", new FunctionCallContent("callId1", "Func1")),
1357
new
ToolApprovalRequestContent
("ficc_callId1", new FunctionCallContent("callId1", "Func1")),
1415
new
ToolApprovalRequestContent
("ficc_callId1", new FunctionCallContent("callId1", "Func1")),
1688
new
ToolApprovalRequestContent
("approval-request-id", new FunctionCallContent("function-call-id", "Func1"))
1744
new
ToolApprovalRequestContent
("callId2", new McpServerToolCallContent("callId2", "McpCall", "myServer"))
1752
new
ToolApprovalRequestContent
("ficc_callId1", new FunctionCallContent("callId1", "Func")),
1753
new
ToolApprovalRequestContent
("callId2", new McpServerToolCallContent("callId2", "McpCall", "myServer"))
1782
new
ToolApprovalRequestContent
("ficc_callId1", new FunctionCallContent("callId1", "Func")),
1783
new
ToolApprovalRequestContent
("callId2", new McpServerToolCallContent("callId2", "McpCall", "myServer"))
1797
new
ToolApprovalRequestContent
("callId2", new McpServerToolCallContent("callId2", "McpCall", "myServer"))
1866
new
ToolApprovalRequestContent
("ficc_callId1", new FunctionCallContent("callId1", "Func")),
1867
new
ToolApprovalRequestContent
("callId2", new McpServerToolCallContent("callId2", "McpCall", "myServer"))
1880
new
ToolApprovalRequestContent
("callId2", new McpServerToolCallContent("callId2", "McpCall", "myServer"))
2103
new
ToolApprovalRequestContent
(tarc.RequestId, (ToolCallContent)CloneFcc(tarc.ToolCall))
ChatCompletion\FunctionInvokingChatClientTests.cs (3)
3362
new
ToolApprovalRequestContent
("ficc_callId1", new FunctionCallContent("callId1", "Func1"))
3398
new
ToolApprovalRequestContent
("ficc_callId1", new FunctionCallContent("callId1", "Func1"))
3435
new
ToolApprovalRequestContent
("ficc_callId1", new FunctionCallContent("callId1", "Func1"))
ChatCompletion\OpenTelemetryChatClientTests.cs (1)
845
new
ToolApprovalRequestContent
("approval-1", toolCall),
Generated\361d1da7f942c932\TestJsonSerializerContext.ToolApprovalRequestContent.g.cs (1)
32
ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.
ToolApprovalRequestContent
((string)args[0], (global::Microsoft.Extensions.AI.ToolCallContent)args[1]),