1 instantiation of FunctionInvocationContext
Microsoft.Extensions.AI (1)
ChatCompletion\FunctionInvokingChatClient.cs (1)
560
FunctionInvocationContext context =
new
(chatMessages, functionCallContent, function)
10 references to FunctionInvocationContext
Microsoft.Extensions.AI (7)
ChatCompletion\FunctionInvokingChatClient.cs (7)
43
/// <summary>The <see cref="
FunctionInvocationContext
"/> for the current function invocation.</summary>
44
private static readonly AsyncLocal<
FunctionInvocationContext
?> _currentContext = new();
57
/// Gets or sets the <see cref="
FunctionInvocationContext
"/> for the current function invocation.
62
public static
FunctionInvocationContext
? CurrentContext
560
FunctionInvocationContext
context = new(chatMessages, functionCallContent, function)
656
protected virtual async Task<object?> InvokeFunctionAsync(
FunctionInvocationContext
context, CancellationToken cancellationToken)
749
/// <summary>Initializes a new instance of the <see cref="
FunctionInvocationContext
"/> class.</summary>
Microsoft.Extensions.AI.Tests (3)
ChatCompletion\FunctionInvokingChatClientTests.cs (3)
559
var invocationContexts = new List<FunctionInvokingChatClient.
FunctionInvocationContext
>();
565
var
context = FunctionInvokingChatClient.CurrentContext!;
629
void AssertInvocationContext(FunctionInvokingChatClient.
FunctionInvocationContext
context, int iteration, bool terminate)