5 types derived from AIFunction
Microsoft.Extensions.AI.Abstractions (2)
Functions\AIFunctionFactory.cs (1)
470private sealed class ReflectionAIFunction : AIFunction
Functions\DelegatingAIFunction.cs (1)
19public class DelegatingAIFunction : AIFunction
Microsoft.Extensions.AI.Abstractions.Tests (2)
Contents\FunctionCallContentTests..cs (1)
248private sealed class NetTypelessAIFunction : AIFunction
Functions\AIFunctionTests.cs (1)
19private sealed class DerivedAIFunction : AIFunction
Microsoft.Extensions.AI.Integration.Tests (1)
ChatClientIntegrationTests.cs (1)
508private sealed class CustomAIFunction(string name, string jsonSchema, IReadOnlyDictionary<string, object?> additionalProperties) : AIFunction
220 references to AIFunction
Microsoft.Extensions.AI (10)
ChatCompletion\FunctionInvocationContext.cs (3)
18private static readonly AIFunction _nopFunction = AIFunctionFactory.Create(() => { }, nameof(FunctionInvocationContext)); 24private AIFunction _function = _nopFunction; 38public AIFunction Function
ChatCompletion\FunctionInvokingChatClient.cs (7)
31/// by calling the corresponding <see cref="AIFunction"/> defined in <see cref="ChatOptions.Tools"/>, 38/// <see cref="AIFunction"/> instances employed as part of the supplied <see cref="ChatOptions"/> are also safe. 74/// <param name="functionInvocationServices">An optional <see cref="IServiceProvider"/> to use for resolving services required by the <see cref="AIFunction"/> instances being invoked.</param> 208/// <summary>Gets or sets a delegate used to invoke <see cref="AIFunction"/> instances.</summary> 210/// By default, the protected <see cref="InvokeFunctionAsync"/> method is called for each <see cref="AIFunction"/> to be invoked, 704AIFunction? aiFunction = options.Tools!.OfType<AIFunction>().FirstOrDefault(t => t.Name == callContent.Name);
Microsoft.Extensions.AI.Abstractions (94)
ChatCompletion\ChatToolMode.cs (1)
58/// and that the specified <see cref="AIFunction"/> must be selected. The function name
ChatCompletion\RequiredChatToolMode.cs (1)
18/// Gets the name of a specific <see cref="AIFunction"/> that must be called.
Functions\AIFunction.cs (3)
49/// Gets the underlying <see cref="MethodInfo"/> that this <see cref="AIFunction"/> might be wrapping. 59/// <summary>Invokes the <see cref="AIFunction"/> and returns its result.</summary> 68/// <summary>Invokes the <see cref="AIFunction"/> and returns its result.</summary>
Functions\AIFunctionArguments.cs (5)
20/// <summary>Represents arguments to be used with <see cref="AIFunction.InvokeAsync"/>.</summary> 23/// as inputs to an <see cref="AIFunction"/>. However, an instance carries additional non-nominal 25/// an <see cref="AIFunction"/> if it needs to resolve any services from a dependency injection 98/// information for use by an <see cref="AIFunction"/> implementation. The meaning of this 99/// data is left up to the implementer of the <see cref="AIFunction"/>.
Functions\AIFunctionFactory.cs (64)
33/// <summary>Provides factory methods for creating commonly-used implementations of <see cref="AIFunction"/>.</summary> 44/// <summary>Creates an <see cref="AIFunction"/> instance for a method, specified via a delegate.</summary> 45/// <param name="method">The method to be represented via the created <see cref="AIFunction"/>.</param> 47/// <returns>The created <see cref="AIFunction"/> for invoking <paramref name="method"/>.</returns> 51/// of key/value pairs and are represented in the JSON schema for the function, as exposed in the returned <see cref="AIFunction"/>'s 52/// <see cref="AIFunction.JsonSchema"/>. There are a few exceptions to this: 57/// the invocation via <see cref="AIFunction.InvokeAsync"/>'s <see cref="CancellationToken"/> parameter. The parameter is 73/// passed into <see cref="AIFunction.InvokeAsync"/> and are not included in the JSON schema. If the <see cref="AIFunctionArguments"/> 74/// instance passed to <see cref="AIFunction.InvokeAsync"/> is <see langword="null"/>, the <see cref="AIFunction"/> implementation 81/// All other parameter types are, by default, bound from the <see cref="AIFunctionArguments"/> dictionary passed into <see cref="AIFunction.InvokeAsync"/> 86/// into <see cref="AIFunction.InvokeAsync"/> via the <see cref="AIFunctionArguments"/>'s <see cref="AIFunctionArguments.Context"/> dictionary; the default 111public static AIFunction Create(Delegate method, AIFunctionFactoryOptions? options) 118/// <summary>Creates an <see cref="AIFunction"/> instance for a method, specified via a delegate.</summary> 119/// <param name="method">The method to be represented via the created <see cref="AIFunction"/>.</param> 121/// The name to use for the <see cref="AIFunction"/>. If <see langword="null"/>, the name will be derived from 125/// The description to use for the <see cref="AIFunction"/>. If <see langword="null"/>, a description will be derived from 129/// <returns>The created <see cref="AIFunction"/> for invoking <paramref name="method"/>.</returns> 133/// of key/value pairs and are represented in the JSON schema for the function, as exposed in the returned <see cref="AIFunction"/>'s 134/// <see cref="AIFunction.JsonSchema"/>. There are a few exceptions to this: 139/// the invocation via <see cref="AIFunction.InvokeAsync"/>'s <see cref="CancellationToken"/> parameter. The parameter is 154/// passed into <see cref="AIFunction.InvokeAsync"/> and are not included in the JSON schema. If the <see cref="AIFunctionArguments"/> 155/// instance passed to <see cref="AIFunction.InvokeAsync"/> is <see langword="null"/>, the <see cref="AIFunction"/> implementation 161/// All other parameter types are bound from the <see cref="AIFunctionArguments"/> dictionary passed into <see cref="AIFunction.InvokeAsync"/> 184public static AIFunction Create(Delegate method, string? name = null, string? description = null, JsonSerializerOptions? serializerOptions = null) 201/// Creates an <see cref="AIFunction"/> instance for a method, specified via an <see cref="MethodInfo"/> instance 204/// <param name="method">The method to be represented via the created <see cref="AIFunction"/>.</param> 210/// <returns>The created <see cref="AIFunction"/> for invoking <paramref name="method"/>.</returns> 214/// of key/value pairs and are represented in the JSON schema for the function, as exposed in the returned <see cref="AIFunction"/>'s 215/// <see cref="AIFunction.JsonSchema"/>. There are a few exceptions to this: 220/// the invocation via <see cref="AIFunction.InvokeAsync"/>'s <see cref="CancellationToken"/> parameter. The parameter is 236/// passed into <see cref="AIFunction.InvokeAsync"/> and are not included in the JSON schema. If the <see cref="AIFunctionArguments"/> 237/// instance passed to <see cref="AIFunction.InvokeAsync"/> is <see langword="null"/>, the <see cref="AIFunction"/> implementation 244/// All other parameter types are, by default, bound from the <see cref="AIFunctionArguments"/> dictionary passed into <see cref="AIFunction.InvokeAsync"/> 249/// into <see cref="AIFunction.InvokeAsync"/> via the <see cref="AIFunctionArguments"/>'s <see cref="AIFunctionArguments.Context"/> dictionary; the default 277public static AIFunction Create(MethodInfo method, object? target, AIFunctionFactoryOptions? options) 285/// Creates an <see cref="AIFunction"/> instance for a method, specified via an <see cref="MethodInfo"/> instance 288/// <param name="method">The method to be represented via the created <see cref="AIFunction"/>.</param> 294/// The name to use for the <see cref="AIFunction"/>. If <see langword="null"/>, the name will be derived from 298/// The description to use for the <see cref="AIFunction"/>. If <see langword="null"/>, a description will be derived from 302/// <returns>The created <see cref="AIFunction"/> for invoking <paramref name="method"/>.</returns> 306/// of key/value pairs and are represented in the JSON schema for the function, as exposed in the returned <see cref="AIFunction"/>'s 307/// <see cref="AIFunction.JsonSchema"/>. There are a few exceptions to this: 312/// the invocation via <see cref="AIFunction.InvokeAsync"/>'s <see cref="CancellationToken"/> parameter. The parameter is 327/// passed into <see cref="AIFunction.InvokeAsync"/> and are not included in the JSON schema. If the <see cref="AIFunctionArguments"/> 328/// instance passed to <see cref="AIFunction.InvokeAsync"/> is <see langword="null"/>, the <see cref="AIFunction"/> implementation 334/// All other parameter types are bound from the <see cref="AIFunctionArguments"/> dictionary passed into <see cref="AIFunction.InvokeAsync"/> 360public static AIFunction Create(MethodInfo method, object? target, string? name = null, string? description = null, JsonSerializerOptions? serializerOptions = null) 377/// Creates an <see cref="AIFunction"/> instance for a method, specified via a <see cref="MethodInfo"/> for 379/// the receiver object each time the <see cref="AIFunction"/> is invoked. 381/// <param name="method">The instance method to be represented via the created <see cref="AIFunction"/>.</param> 388/// <returns>The created <see cref="AIFunction"/> for invoking <paramref name="method"/>.</returns> 400/// of key/value pairs and are represented in the JSON schema for the function, as exposed in the returned <see cref="AIFunction"/>'s 401/// <see cref="AIFunction.JsonSchema"/>. There are a few exceptions to this: 406/// the invocation via <see cref="AIFunction.InvokeAsync"/>'s <see cref="CancellationToken"/> parameter. The parameter is 422/// passed into <see cref="AIFunction.InvokeAsync"/> and are not included in the JSON schema. If the <see cref="AIFunctionArguments"/> 423/// instance passed to <see cref="AIFunction.InvokeAsync"/> is <see langword="null"/>, the <see cref="AIFunction"/> implementation 430/// All other parameter types are, by default, bound from the <see cref="AIFunctionArguments"/> dictionary passed into <see cref="AIFunction.InvokeAsync"/> 435/// into <see cref="AIFunction.InvokeAsync"/> via the <see cref="AIFunctionArguments"/>'s <see cref="AIFunctionArguments.Context"/> dictionary; the default 464public static AIFunction Create(
Functions\AIFunctionFactoryOptions.cs (11)
15/// Represents options that can be provided when creating an <see cref="AIFunction"/> from a method. 65/// this delegate will be invoked once for each parameter in the function as part of creating the <see cref="AIFunction"/> instance. 67/// provided to the <see cref="AIFunction.InvokeAsync"/> invocation. 76/// <summary>Gets or sets a delegate used to determine the <see cref="object"/> returned by <see cref="AIFunction.InvokeAsync"/>.</summary> 79/// By default, the return value of invoking the method wrapped into an <see cref="AIFunction"/> by <see cref="AIFunctionFactory"/> 80/// is then JSON serialized, with the resulting <see cref="JsonElement"/> returned from the <see cref="AIFunction.InvokeAsync"/> method. 84/// and its return value is then returned from the <see cref="AIFunction.InvokeAsync"/> method. 88/// a <see langword="null"/> argument. By default, <see langword="null"/> is returned from the <see cref="AIFunction.InvokeAsync"/> 89/// method for <see cref="AIFunction"/> instances produced by <see cref="AIFunctionFactory"/> to wrap 119/// If non- <see langword="null"/>, each time the <see cref="AIFunction"/> is invoked, this delegate will be invoked 136/// It, however, is permissible for cases where invocation of the <see cref="AIFunction"/> is tightly controlled, and the caller
Functions\DelegatingAIFunction.cs (4)
17/// Provides an optional base class for an <see cref="AIFunction"/> that passes through calls to another instance. 26protected DelegatingAIFunction(AIFunction innerFunction) 31/// <summary>Gets the inner <see cref="AIFunction" />.</summary> 32protected AIFunction InnerFunction { get; }
Utilities\AIJsonSchemaTransformCache.cs (5)
16/// This cache stores weak references from AI abstractions that declare JSON schemas such as <see cref="AIFunction"/> or <see cref="ChatResponseFormatJson"/> 26private readonly ConditionalWeakTable<AIFunction, object> _functionSchemaCache = new(); 29private readonly ConditionalWeakTable<AIFunction, object>.CreateValueCallback _functionSchemaCreateValueCallback; 56/// Gets or creates a transformed JSON schema for the specified <see cref="AIFunction"/> instance. 60public JsonElement GetOrCreateTransformedSchema(AIFunction function)
Microsoft.Extensions.AI.Abstractions.Tests (14)
Contents\FunctionCallContentTests..cs (4)
111AIFunction function = AIFunctionFactory.Create((DayOfWeek[] a, double b, Guid c, Dictionary<string, string> d) => b, serializerOptions: TestJsonSerializerContext.Default.Options); 133AIFunction function = AIFunctionFactory.Create((DayOfWeek[] a, double b, Guid c, Dictionary<string, string> d) => b, serializerOptions: TestJsonSerializerContext.Default.Options); 166AIFunction function = AIFunctionFactory.Create((DayOfWeek[] a, double b, Guid c, Dictionary<string, string> d) => b, serializerOptions: TestJsonSerializerContext.Default.Options); 187AIFunction function = AIFunctionFactory.Create((DayOfWeek[] a, double b, Guid c, Dictionary<string, string> d) => b, serializerOptions: TestJsonSerializerContext.Default.Options);
Functions\DelegatingAIFunctionTests.cs (6)
23AIFunction expected = AIFunctionFactory.Create(() => 42); 37private sealed class DerivedFunction(AIFunction innerFunction) : DelegatingAIFunction(innerFunction) 39public new AIFunction InnerFunction => base.InnerFunction; 64AIFunction inner = AIFunctionFactory.Create(int () => 70AIFunction actual = new OverridesInvocation(inner, (args, ct) => new ValueTask<object?>(84)); 87private sealed class OverridesInvocation(AIFunction innerFunction, Func<AIFunctionArguments, CancellationToken, ValueTask<object?>> invokeAsync) : DelegatingAIFunction(innerFunction)
Utilities\AIJsonSchemaTransformCacheTests.cs (1)
51AIFunction func = AIFunctionFactory.Create((int x, int y) => x + y);
Utilities\AIJsonUtilitiesTests.cs (3)
270AIFunction func = AIFunctionFactory.Create((int x, int y) => x + y, serializerOptions: options); 324AIFunction func = AIFunctionFactory.Create(( 345AIFunction func = AIFunctionFactory.Create((int a, int? b, long c, short d, float e, double f, decimal g) => { }, serializerOptions: options);
Microsoft.Extensions.AI.AzureAIInference (2)
AzureAIInferenceChatClient.cs (2)
345if (tool is AIFunction af) 412private static ChatCompletionsToolDefinition ToAzureAIChatTool(AIFunction aiFunction)
Microsoft.Extensions.AI.AzureAIInference.Tests (5)
AzureAIInferenceChatClientTests.cs (5)
328AIFunction tool = AIFunctionFactory.Create(([Description("The person whose age is being requested")] string personName) => 42, "GetPersonAge", "Gets the age of the specified person."); 412AIFunction tool = AIFunctionFactory.Create(([Description("The person whose age is being requested")] string personName) => 42, "GetPersonAge", "Gets the age of the specified person."); 501AIFunction tool = AIFunctionFactory.Create(([Description("The person whose age is being requested")] string personName) => 42, "GetPersonAge", "Gets the age of the specified person."); 576AIFunction tool = AIFunctionFactory.Create(([Description("The person whose age is being requested")] string personName) => 42, "GetPersonAge", "Gets the age of the specified person."); 620private static ChatCompletionsToolDefinition ToAzureAIChatTool(AIFunction aiFunction)
Microsoft.Extensions.AI.Evaluation.Quality (17)
AIToolExtensions.cs (2)
22foreach (AIFunction function in toolDefinitions.OfType<AIFunction>())
IntentResolutionEvaluator.cs (1)
28/// defined as <see cref="AIFunction"/>s. Any other <see cref="AITool"/> definitions that are supplied via
IntentResolutionEvaluatorContext.cs (4)
22/// defined as <see cref="AIFunction"/>s. Any other <see cref="AITool"/> definitions that are supplied via 39/// are defined as <see cref="AIFunction"/>s. Any other <see cref="AITool"/> definitions will be ignored. 58/// are defined as <see cref="AIFunction"/>s. Any other <see cref="AITool"/> definitions will be ignored. 84/// are defined as <see cref="AIFunction"/>s. Any other <see cref="AITool"/> definitions that are supplied via
TaskAdherenceEvaluator.cs (1)
27/// defined as <see cref="AIFunction"/>s. Any other <see cref="AITool"/> definitions that are supplied via
TaskAdherenceEvaluatorContext.cs (4)
23/// defined as <see cref="AIFunction"/>s. Any other <see cref="AITool"/> definitions that are supplied via 40/// are defined as <see cref="AIFunction"/>s. Any other <see cref="AITool"/> definitions will be ignored. 59/// are defined as <see cref="AIFunction"/>s. Any other <see cref="AITool"/> definitions will be ignored. 86/// defined as <see cref="AIFunction"/>s. Any other <see cref="AITool"/> definitions that are supplied via
ToolCallAccuracyEvaluator.cs (1)
28/// defined as <see cref="AIFunction"/>s. Any other <see cref="AITool"/> definitions that are supplied via
ToolCallAccuracyEvaluatorContext.cs (4)
24/// defined as <see cref="AIFunction"/>s. Any other <see cref="AITool"/> definitions that are supplied via 41/// are defined as <see cref="AIFunction"/>s. Any other <see cref="AITool"/> definitions will be ignored. 60/// are defined as <see cref="AIFunction"/>s. Any other <see cref="AITool"/> definitions will be ignored. 88/// are defined as <see cref="AIFunction"/>s. Any other <see cref="AITool"/> definitions that are supplied via
Microsoft.Extensions.AI.Integration.Tests (11)
ChatClientIntegrationTests.cs (10)
302AIFunction func = AIFunctionFactory.Create((string id = "defaultId") => id is "foo" ? secretNumber : -1, "GetSecretNumberById"); 334AIFunction func = AIFunctionFactory.Create((PersonRecord person) => person.Name is "John" ? secretNumber + person.Age : -1, "GetSecretNumberByPerson"); 366AIFunction func = AIFunctionFactory.Create((string[] items, string shopperId) => { shoppingCart.AddRange(items); shopperName = shopperId; }, "AddItemsToShoppingCart"); 432Func<string, AIFunction> createWithSchema = schema => 597var tool = AIFunctionFactory.Create(() => 620var getSecretNumberTool = AIFunctionFactory.Create(() => 123, "GetSecretNumber"); 621var shieldsUpTool = AIFunctionFactory.Create(() => shieldsUp = true, "ShieldsUp"); 717var getTemperature = AIFunctionFactory.Create([Description("Gets the current temperature")] () => 756var getTemperature = AIFunctionFactory.Create([Description("Gets the current temperature")] () => 798var getTemperature = AIFunctionFactory.Create([Description("Gets the current temperature")] () =>
PromptBasedFunctionCallingChatClient.cs (1)
169var toolDescriptorsJson = JsonSerializer.Serialize(tools.OfType<AIFunction>().Select(t => t.JsonSchema), _jsonOptions);
Microsoft.Extensions.AI.Ollama (2)
OllamaChatClient.cs (2)
326Tools = options?.ToolMode is not NoneChatToolMode && options?.Tools is { Count: > 0 } tools ? tools.OfType<AIFunction>().Select(ToOllamaTool) : null, 492private static OllamaTool ToOllamaTool(AIFunction function)
Microsoft.Extensions.AI.Ollama.Tests (2)
OllamaChatClientIntegrationTests.cs (2)
65var stockPriceTool = AIFunctionFactory.Create([Description("Returns the stock price for a given ticker symbol")] ( 75var irrelevantTool = AIFunctionFactory.Create(() => { didCallIrrelevantTool = true; return 123; }, "GetSecretNumber");
Microsoft.Extensions.AI.OpenAI (17)
OpenAIAssistantChatClient.cs (2)
238internal static FunctionToolDefinition ToOpenAIAssistantsFunctionToolDefinition(AIFunction aiFunction, ChatOptions? options = null) 298case AIFunction aiFunction:
OpenAIChatClient.cs (2)
104internal static ChatTool ToOpenAIChatTool(AIFunction aiFunction, ChatOptions? options = null) 535if (tool is AIFunction af)
OpenAIClientExtensions.cs (10)
156/// <summary>Creates an OpenAI <see cref="ChatTool"/> from an <see cref="AIFunction"/>.</summary> 160public static ChatTool AsOpenAIChatTool(this AIFunction function) => 163/// <summary>Creates an OpenAI <see cref="FunctionToolDefinition"/> from an <see cref="AIFunction"/>.</summary> 167public static FunctionToolDefinition AsOpenAIAssistantsFunctionToolDefinition(this AIFunction function) => 170/// <summary>Creates an OpenAI <see cref="ResponseTool"/> from an <see cref="AIFunction"/>.</summary> 174public static ResponseTool AsOpenAIResponseTool(this AIFunction function) => 177/// <summary>Creates an OpenAI <see cref="ConversationFunctionTool"/> from an <see cref="AIFunction"/>.</summary> 181public static ConversationFunctionTool AsOpenAIConversationFunctionTool(this AIFunction function) => 192/// <summary>Extracts from an <see cref="AIFunction"/> the parameters and strictness setting for use with OpenAI's APIs.</summary> 193internal static BinaryData ToOpenAIFunctionParameters(AIFunction aiFunction, bool? strict)
OpenAIRealtimeConversationClient.cs (1)
11public static ConversationFunctionTool ToOpenAIConversationFunctionTool(AIFunction aiFunction, ChatOptions? options = null)
OpenAIResponseChatClient.cs (2)
333internal static ResponseTool ToResponseTool(AIFunction aiFunction, ChatOptions? options = null) 396case AIFunction aiFunction:
Microsoft.Extensions.AI.OpenAI.Tests (7)
OpenAIAIFunctionConversionTests.cs (1)
17private static readonly AIFunction _testFunction = AIFunctionFactory.Create(
OpenAIChatClientTests.cs (4)
383AIFunction tool = AIFunctionFactory.Create(([Description("The person whose age is being requested")] string personName) => 42, "GetPersonAge", "Gets the age of the specified person."); 460AIFunction tool = AIFunctionFactory.Create(([Description("The person whose age is being requested")] string personName) => 42, "GetPersonAge", "Gets the age of the specified person."); 543AIFunction tool = AIFunctionFactory.Create(([Description("The person whose age is being requested")] string personName) => 42, "GetPersonAge", "Gets the age of the specified person."); 617AIFunction tool = AIFunctionFactory.Create(([Description("The person whose age is being requested")] string personName) => 42, "GetPersonAge", "Gets the age of the specified person.");
OpenAIResponseClientTests.cs (2)
444AIFunction tool = AIFunctionFactory.Create(([Description("The person whose age is being requested")] string personName) => 42, "GetPersonAge", "Gets the age of the specified person."); 483private static ResponseTool ToOpenAIResponseChatTool(AIFunction aiFunction)
Microsoft.Extensions.AI.Tests (39)
ChatCompletion\FunctionInvocationContextTests.cs (1)
51AIFunction function = AIFunctionFactory.Create(() => { }, nameof(Properties_Roundtrip));
ChatCompletion\FunctionInvokingChatClientTests.cs (2)
747var function = AIFunctionFactory.Create(async (int i) => 822var function = AIFunctionFactory.Create((string? result = null) =>
Functions\AIFunctionFactoryTest.cs (36)
41AIFunction func; 56AIFunction func = AIFunctionFactory.Create((string a = "test") => a + " " + a); 64AIFunction[] funcs = 72foreach (AIFunction f in funcs) 82AIFunction func = AIFunctionFactory.Create((int x, int y, int z, int w, int u) => x + y + z + w + u); 111AIFunction func = AIFunctionFactory.Create((JsonElement param) => param, serializerOptions: options); 131AIFunction func = AIFunctionFactory.Create((JsonElement param) => param); 150AIFunction func = AIFunctionFactory.Create((int value1 = 1, string value2 = "2", CancellationToken cancellationToken = default) => 164AIFunction func; 213AIFunction func; 258AIFunction func = AIFunctionFactory.Create(dotnetFunc, options); 282AIFunction func = AIFunctionFactory.Create( 311AIFunction func = AIFunctionFactory.Create(( 355AIFunction func = AIFunctionFactory.Create(( 387AIFunction func = AIFunctionFactory.Create( 405AIFunction func = AIFunctionFactory.Create( 416AIFunction func = AIFunctionFactory.Create( 435AIFunction func = AIFunctionFactory.Create( 454AIFunction func = AIFunctionFactory.Create( 473AIFunction func = AIFunctionFactory.Create( 500AIFunction f = AIFunctionFactory.Create(([FromKeyedServices("key")] MyService service, int myInteger) => service.Value + myInteger, 523AIFunction f = AIFunctionFactory.Create(([FromKeyedServices(null!)] MyService service, int myInteger) => service.Value + myInteger, 546AIFunction f = AIFunctionFactory.Create(([FromKeyedServices("key")] MyService? service = null, int myInteger = 0) => 565AIFunction f = AIFunctionFactory.Create( 617AIFunction f = AIFunctionFactory.Create( 634AIFunction f = AIFunctionFactory.Create( 650AIFunction f = AIFunctionFactory.Create( 673AIFunction f = AIFunctionFactory.Create( 696AIFunction f = AIFunctionFactory.Create( 719AIFunction f = AIFunctionFactory.Create( 742AIFunction f = AIFunctionFactory.Create( 765AIFunction f = AIFunctionFactory.Create( 788AIFunction f = AIFunctionFactory.Create( 811AIFunction f = AIFunctionFactory.Create( 835AIFunction f = AIFunctionFactory.Create((Guid g = default, StructWithDefaultCtor s = default) => g.ToString() + "," + s.Value.ToString(), serializerOptions: JsonContext.Default.Options); 844AIFunction f = AIFunctionFactory.Create(Add, serializerOptions: JsonContext.Default.Options);