44 references to ApprovalRequiredAIFunction
Microsoft.Extensions.AI.Abstractions.Tests (4)
Functions\ApprovalRequiredAIFunctionTests.cs (3)
15Assert.Throws<ArgumentNullException>("innerFunction", () => new ApprovalRequiredAIFunction(null!)); 22var func = new ApprovalRequiredAIFunction(inner); 38var func = new ApprovalRequiredAIFunction(inner);
Functions\DelegatingAIFunctionTests.cs (1)
23AIFunction expected = new ApprovalRequiredAIFunction(AIFunctionFactory.Create(() => 42));
Microsoft.Extensions.AI.Tests (40)
ChatCompletion\FunctionInvokingChatClientApprovalsTests.cs (35)
23new ApprovalRequiredAIFunction( 25new ApprovalRequiredAIFunction( 65new ApprovalRequiredAIFunction(AIFunctionFactory.Create(() => "Result 1", "Func1")), 106additionalToolsRequireApproval ? new ApprovalRequiredAIFunction(func1) : func1, 113additionalToolsRequireApproval ? func2 : new ApprovalRequiredAIFunction(func2), 160new ApprovalRequiredAIFunction( 208new ApprovalRequiredAIFunction(AIFunctionFactory.Create(() => "Result 1", "Func1")), 249new ApprovalRequiredAIFunction(AIFunctionFactory.Create(() => "Result 1", "Func1")), 300new ApprovalRequiredAIFunction(AIFunctionFactory.Create(() => "Result 1", "Func1")), 301new ApprovalRequiredAIFunction(AIFunctionFactory.Create((int i) => $"Result 2: {i}", "Func2")), 353new ApprovalRequiredAIFunction(AIFunctionFactory.Create(() => "Result 1", "Func1")), 412new ApprovalRequiredAIFunction(AIFunctionFactory.Create(() => "Result 1", "Func1")), 471new ApprovalRequiredAIFunction(AIFunctionFactory.Create(() => "Result 1", "Func1")), 535new ApprovalRequiredAIFunction(AIFunctionFactory.Create(() => "Result 1", "Func1")), 600new ApprovalRequiredAIFunction(AIFunctionFactory.Create(() => "Result 1", "Func1")), 694new ApprovalRequiredAIFunction(AIFunctionFactory.Create(() => "Result 1", "Func1")), 752new ApprovalRequiredAIFunction(AIFunctionFactory.Create((int i) => $"Result 2: {i}", "Func2")), 806new ApprovalRequiredAIFunction(AIFunctionFactory.Create((int i) => $"Result 2: {i}", "Func2")), 885new ApprovalRequiredAIFunction(AIFunctionFactory.Create(() => "Result 1", "Func1")), 957new ApprovalRequiredAIFunction(AIFunctionFactory.Create(() => "Result 1", "Func1")), 1021new ApprovalRequiredAIFunction(AIFunctionFactory.Create(() => "Result 1", "Func1")), 1076new ApprovalRequiredAIFunction(AIFunctionFactory.Create(() => "Result 1", "Func1")), 1106new ApprovalRequiredAIFunction(AIFunctionFactory.Create(() => "Result 1", "Func1")), 1152new ApprovalRequiredAIFunction(AIFunctionFactory.Create(() => "Result 1", "Func1")), 1198Tools = [new ApprovalRequiredAIFunction(AIFunctionFactory.Create(() => "Result 1", "Func1"))], 1248Tools = [new ApprovalRequiredAIFunction(AIFunctionFactory.Create(() => "Result 1", "Func1"))], 1294Tools = [new ApprovalRequiredAIFunction(AIFunctionFactory.Create(() => "Result 1", "Func1"))], 1349Tools = [new ApprovalRequiredAIFunction(AIFunctionFactory.Create(() => "Result 1", "Func1"))], 1402new ApprovalRequiredAIFunction(AIFunctionFactory.Create(() => 1538new ApprovalRequiredAIFunction(AIFunctionFactory.Create((int i) => $"Result 2: {i}", "Func2")), 1636new ApprovalRequiredAIFunction( 1676new ApprovalRequiredAIFunction(AIFunctionFactory.Create(() => "Result 1", "Func1")), 1725new ApprovalRequiredAIFunction(AIFunctionFactory.Create(() => "Result 1", "Func")), 1768new ApprovalRequiredAIFunction(AIFunctionFactory.Create(() => "Result 1", "Func")), 1852new ApprovalRequiredAIFunction(AIFunctionFactory.Create(() => "Result 1", "Func")),
ChatCompletion\FunctionInvokingChatClientTests.cs (5)
3040AIFunction functionB = new ApprovalRequiredAIFunction(AIFunctionFactory.Create(() => "FunctionB result", "FunctionB")); 3143AIFunction replacementFunctionB = new ApprovalRequiredAIFunction(AIFunctionFactory.Create(() => "Replacement FunctionB result", "FunctionB")); 3344var approvalFunc = new ApprovalRequiredAIFunction(AIFunctionFactory.Create(() => "Result 1", "Func1")); 3381var approvalFunc = new ApprovalRequiredAIFunction(AIFunctionFactory.Create(() => "Result 1", "Func1")); 3418var approvalFunc = new ApprovalRequiredAIFunction(AIFunctionFactory.Create(() => "Result 1", "Func1"));