1 instantiation of FunctionInvocationContext
Microsoft.Extensions.AI (1)
ChatCompletion\FunctionInvokingChatClient.cs (1)
560FunctionInvocationContext 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> 44private static readonly AsyncLocal<FunctionInvocationContext?> _currentContext = new(); 57/// Gets or sets the <see cref="FunctionInvocationContext"/> for the current function invocation. 62public static FunctionInvocationContext? CurrentContext 560FunctionInvocationContext context = new(chatMessages, functionCallContent, function) 656protected 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)
559var invocationContexts = new List<FunctionInvokingChatClient.FunctionInvocationContext>(); 565var context = FunctionInvokingChatClient.CurrentContext!; 629void AssertInvocationContext(FunctionInvokingChatClient.FunctionInvocationContext context, int iteration, bool terminate)