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