23 references to new
Microsoft.Extensions.AI.Abstractions (1)
Contents\FunctionApprovalRequestContent.cs (1)
40
public FunctionApprovalResponseContent CreateResponse(bool approved) =>
new
(Id, approved, FunctionCall);
Microsoft.Extensions.AI.Abstractions.Tests (5)
Contents\FunctionApprovalResponseContentTests.cs (5)
16
Assert.Throws<ArgumentNullException>("id", () => new
FunctionApprovalResponseContent
(null!, true, functionCall));
17
Assert.Throws<ArgumentException>("id", () => new
FunctionApprovalResponseContent
("", true, functionCall));
18
Assert.Throws<ArgumentException>("id", () => new
FunctionApprovalResponseContent
("\r\t\n ", true, functionCall));
20
Assert.Throws<ArgumentNullException>("functionCall", () => new
FunctionApprovalResponseContent
("id", true, null!));
30
FunctionApprovalResponseContent content =
new
(id, approved, functionCall);
Microsoft.Extensions.AI.Tests (17)
ChatCompletion\FunctionInvokingChatClientApprovalsTests.cs (17)
160
new
FunctionApprovalResponseContent
("callId1", true, new FunctionCallContent("callId1", "Func1")),
161
new
FunctionApprovalResponseContent
("callId2", true, new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
214
new
FunctionApprovalResponseContent
("callId1", true, new FunctionCallContent("callId1", "Func1")),
218
new
FunctionApprovalResponseContent
("callId2", true, new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
270
new
FunctionApprovalResponseContent
("callId1", false, new FunctionCallContent("callId1", "Func1")),
271
new
FunctionApprovalResponseContent
("callId2", false, new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
329
new
FunctionApprovalResponseContent
("callId1", false, new FunctionCallContent("callId1", "Func1")),
330
new
FunctionApprovalResponseContent
("callId2", true, new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
393
new
FunctionApprovalResponseContent
("callId1", true, new FunctionCallContent("callId1", "Func1")),
394
new
FunctionApprovalResponseContent
("callId2", true, new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
447
new
FunctionApprovalResponseContent
("callId1", true, new FunctionCallContent("callId1", "Func1")),
448
new
FunctionApprovalResponseContent
("callId2", true, new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
458
new
FunctionApprovalResponseContent
("callId3", true, new FunctionCallContent("callId3", "Func1")),
535
new
FunctionApprovalResponseContent
("callId1", true, new FunctionCallContent("callId1", "Func1")),
536
new
FunctionApprovalResponseContent
("callId2", true, new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
581
new
FunctionApprovalResponseContent
("callId1", true, new FunctionCallContent("callId1", "Func1")),
582
new
FunctionApprovalResponseContent
("callId2", true, new FunctionCallContent("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))