1 write to FunctionCall
Microsoft.Extensions.AI.Abstractions (1)
Contents\FunctionApprovalResponseContent.cs (1)
29
FunctionCall
= Throw.IfNull(functionCall);
14 references to FunctionCall
Microsoft.Extensions.AI (7)
ChatCompletion\FunctionInvokingChatClient.cs (7)
1318
_ = approvalRequestCallIds?.Remove(farc.
FunctionCall
.CallId);
1377
if (functionResultCallIds?.Contains(approvalResponse.
FunctionCall
.CallId) is true)
1386
_ = allApprovalRequestsMessages?.TryGetValue(approvalResponse.
FunctionCall
.CallId, out requestMessage);
1402
rejections.ConvertAll(static m => (AIContent)new FunctionResultContent(m.Response.
FunctionCall
.CallId, "Error: Tool call invocation was rejected by user.")) :
1443
currentMessage.Contents.Add(resultWithRequestMessage.Response.
FunctionCall
);
1472
functionCallMessage.Contents = [resultWithRequestMessage.Response.
FunctionCall
];
1628
originalMessages, options, toolMap, notInvokedApprovals.Select(x => x.Response.
FunctionCall
).ToList(), 0, consecutiveErrorCount, isStreaming, cancellationToken);
Microsoft.Extensions.AI.Abstractions.Tests (7)
Contents\FunctionApprovalRequestContentTests.cs (1)
54
Assert.Same(functionCall, response.
FunctionCall
);
Contents\FunctionApprovalResponseContentTests.cs (6)
35
Assert.Same(functionCall, content.
FunctionCall
);
49
Assert.NotNull(deserializedContent.
FunctionCall
);
50
Assert.Equal(content.
FunctionCall
.CallId, deserializedContent.
FunctionCall
.CallId);
51
Assert.Equal(content.
FunctionCall
.Name, deserializedContent.
FunctionCall
.Name);