3 types derived from AIFunction
Microsoft.Extensions.AI (1)
Microsoft.Extensions.AI.Abstractions.Tests (2)
82 references to AIFunction
Microsoft.Extensions.AI (40)
Functions\AIFunctionFactory.cs (30)
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>
33/// The resulting <see cref="AIFunction"/> exposes metadata about the function via <see cref="AIFunction.Metadata"/>.
47public static AIFunction Create(Delegate method, AIFunctionFactoryCreateOptions? options)
54/// <summary>Creates an <see cref="AIFunction"/> instance for a method, specified via a delegate.</summary>
55/// <param name="method">The method to be represented via the created <see cref="AIFunction"/>.</param>
56/// <param name="name">The name to use for the <see cref="AIFunction"/>.</param>
57/// <param name="description">The description to use for the <see cref="AIFunction"/>.</param>
59/// <returns>The created <see cref="AIFunction"/> for invoking <paramref name="method"/>.</returns>
62/// The resulting <see cref="AIFunction"/> exposes metadata about the function via <see cref="AIFunction.Metadata"/>.
76public static AIFunction Create(Delegate method, string? name = null, string? description = null, JsonSerializerOptions? serializerOptions = null)
93/// Creates an <see cref="AIFunction"/> instance for a method, specified via an <see cref="MethodInfo"/> instance
96/// <param name="method">The method to be represented via the created <see cref="AIFunction"/>.</param>
102/// <returns>The created <see cref="AIFunction"/> for invoking <paramref name="method"/>.</returns>
105/// The resulting <see cref="AIFunction"/> exposes metadata about the function via <see cref="AIFunction.Metadata"/>.
119public static AIFunction Create(MethodInfo method, object? target, AIFunctionFactoryCreateOptions? options)
126/// Creates an <see cref="AIFunction"/> instance for a method, specified via an <see cref="MethodInfo"/> instance
129/// <param name="method">The method to be represented via the created <see cref="AIFunction"/>.</param>
134/// <param name="name">The name to use for the <see cref="AIFunction"/>.</param>
135/// <param name="description">The description to use for the <see cref="AIFunction"/>.</param>
137/// <returns>The created <see cref="AIFunction"/> for invoking <paramref name="method"/>.</returns>
140/// The resulting <see cref="AIFunction"/> exposes metadata about the function via <see cref="AIFunction.Metadata"/>.
154public static AIFunction Create(MethodInfo method, object? target, string? name = null, string? description = null, JsonSerializerOptions? serializerOptions = null)
183/// <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 (6)
Contents\FunctionCallContentTests..cs (4)
113AIFunction function = AIFunctionFactory.Create((DayOfWeek[] a, double b, Guid c, Dictionary<string, string> d) => b, serializerOptions: TestJsonSerializerContext.Default.Options);
135AIFunction function = AIFunctionFactory.Create((DayOfWeek[] a, double b, Guid c, Dictionary<string, string> d) => b, serializerOptions: TestJsonSerializerContext.Default.Options);
168AIFunction function = AIFunctionFactory.Create((DayOfWeek[] a, double b, Guid c, Dictionary<string, string> d) => b, serializerOptions: TestJsonSerializerContext.Default.Options);
189AIFunction 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 (7)
Microsoft.Extensions.AI.OpenAI.Tests (3)
Microsoft.Extensions.AI.Tests (8)