3 types derived from AIFunction
Microsoft.Extensions.AI (1)
Microsoft.Extensions.AI.Abstractions.Tests (2)
65 references to AIFunction
Microsoft.Extensions.AI (32)
Functions\AIFunctionFactory.cs (22)
21/// <summary>Provides factory methods for creating commonly-used implementations of <see cref="AIFunction"/>.</summary>
27/// <summary>Creates an <see cref="AIFunction"/> instance for a method, specified via a delegate.</summary>
28/// <param name="method">The method to be represented via the created <see cref="AIFunction"/>.</param>
30/// <returns>The created <see cref="AIFunction"/> for invoking <paramref name="method"/>.</returns>
31public static AIFunction Create(Delegate method, AIFunctionFactoryCreateOptions? options)
38/// <summary>Creates an <see cref="AIFunction"/> instance for a method, specified via a delegate.</summary>
39/// <param name="method">The method to be represented via the created <see cref="AIFunction"/>.</param>
40/// <param name="name">The name to use for the <see cref="AIFunction"/>.</param>
41/// <param name="description">The description to use for the <see cref="AIFunction"/>.</param>
43/// <returns>The created <see cref="AIFunction"/> for invoking <paramref name="method"/>.</returns>
44public static AIFunction Create(Delegate method, string? name = null, string? description = null, JsonSerializerOptions? serializerOptions = null)
61/// Creates an <see cref="AIFunction"/> instance for a method, specified via an <see cref="MethodInfo"/> instance
64/// <param name="method">The method to be represented via the created <see cref="AIFunction"/>.</param>
70/// <returns>The created <see cref="AIFunction"/> for invoking <paramref name="method"/>.</returns>
71public static AIFunction Create(MethodInfo method, object? target, AIFunctionFactoryCreateOptions? options)
78/// Creates an <see cref="AIFunction"/> instance for a method, specified via an <see cref="MethodInfo"/> instance
81/// <param name="method">The method to be represented via the created <see cref="AIFunction"/>.</param>
86/// <param name="name">The name to use for the <see cref="AIFunction"/>.</param>
87/// <param name="description">The description to use for the <see cref="AIFunction"/>.</param>
89/// <returns>The created <see cref="AIFunction"/> for invoking <paramref name="method"/>.</returns>
90public static AIFunction Create(MethodInfo method, object? target, string? name = null, string? description = null, JsonSerializerOptions? serializerOptions = null)
119/// <param name="method">The method to be represented via the created <see cref="AIFunction"/>.</param>
Microsoft.Extensions.AI.Abstractions (7)
Microsoft.Extensions.AI.Abstractions.Tests (5)
Contents\FunctionCallContentTests..cs (4)
119AIFunction function = AIFunctionFactory.Create((DayOfWeek[] a, double b, Guid c, Dictionary<string, string> d) => b, serializerOptions: TestJsonSerializerContext.Default.Options);
141AIFunction function = AIFunctionFactory.Create((DayOfWeek[] a, double b, Guid c, Dictionary<string, string> d) => b, serializerOptions: TestJsonSerializerContext.Default.Options);
174AIFunction function = AIFunctionFactory.Create((DayOfWeek[] a, double b, Guid c, Dictionary<string, string> d) => b, serializerOptions: TestJsonSerializerContext.Default.Options);
195AIFunction function = AIFunctionFactory.Create((DayOfWeek[] a, double b, Guid c, Dictionary<string, string> d) => b, serializerOptions: TestJsonSerializerContext.Default.Options);
Microsoft.Extensions.AI.AzureAIInference (2)
Microsoft.Extensions.AI.Integration.Tests (5)
Microsoft.Extensions.AI.Ollama (2)
Microsoft.Extensions.AI.Ollama.Tests (2)
Microsoft.Extensions.AI.OpenAI (2)
Microsoft.Extensions.AI.Tests (8)