Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Augment XML comments for AIFunctionFactory.Create #5658

Merged
merged 3 commits into from
Nov 18, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ public static partial class AIFunctionFactory
/// <param name="method">The method to be represented via the created <see cref="AIFunction"/>.</param>
/// <param name="options">Metadata to use to override defaults inferred from <paramref name="method"/>.</param>
/// <returns>The created <see cref="AIFunction"/> for invoking <paramref name="method"/>.</returns>
/// <remarks>
/// The resulting <see cref="AIFunction"/> exposes metadata about the function via <see cref="AIFunction.Metadata"/>.
/// This metadata includes the function's name, description, and parameters. All of that information may be specified
/// explicitly via <paramref name="options"/>; however, if not specified, defaults are inferred by examining
/// <paramref name="method"/>. That includes examining the method and its parameters for <see cref="DescriptionAttribute"/>s.
/// </remarks>
public static AIFunction Create(Delegate method, AIFunctionFactoryCreateOptions? options)
{
_ = Throw.IfNull(method);
Expand All @@ -41,6 +47,13 @@ public static AIFunction Create(Delegate method, AIFunctionFactoryCreateOptions?
/// <param name="description">The description to use for the <see cref="AIFunction"/>.</param>
/// <param name="serializerOptions">The <see cref="JsonSerializerOptions"/> used to marshal function parameters and any return value.</param>
/// <returns>The created <see cref="AIFunction"/> for invoking <paramref name="method"/>.</returns>
/// <remarks>
/// The resulting <see cref="AIFunction"/> exposes metadata about the function via <see cref="AIFunction.Metadata"/>.
/// This metadata includes the function's name, description, and parameters. The function's name and description may
/// be specified explicitly via <paramref name="name"/> and <paramref name="description"/>, but if they're not, this method
/// will infer values from examining <paramref name="method"/>. That includes looking for <see cref="DescriptionAttribute"/>
stephentoub marked this conversation as resolved.
Show resolved Hide resolved
/// attributes on the method itself and on its parameters.
/// </remarks>
public static AIFunction Create(Delegate method, string? name = null, string? description = null, JsonSerializerOptions? serializerOptions = null)
{
_ = Throw.IfNull(method);
Expand Down Expand Up @@ -68,6 +81,12 @@ public static AIFunction Create(Delegate method, string? name = null, string? de
/// </param>
/// <param name="options">Metadata to use to override defaults inferred from <paramref name="method"/>.</param>
/// <returns>The created <see cref="AIFunction"/> for invoking <paramref name="method"/>.</returns>
/// <remarks>
/// The resulting <see cref="AIFunction"/> exposes metadata about the function via <see cref="AIFunction.Metadata"/>.
/// This metadata includes the function's name, description, and parameters. All of that information may be specified
/// explicitly via <paramref name="options"/>; however, if not specified, defaults are inferred by examining
/// <paramref name="method"/>. That includes examining the method and its parameters for <see cref="DescriptionAttribute"/>s.
/// </remarks>
public static AIFunction Create(MethodInfo method, object? target, AIFunctionFactoryCreateOptions? options)
{
_ = Throw.IfNull(method);
Expand All @@ -87,6 +106,13 @@ public static AIFunction Create(MethodInfo method, object? target, AIFunctionFac
/// <param name="description">The description to use for the <see cref="AIFunction"/>.</param>
/// <param name="serializerOptions">The <see cref="JsonSerializerOptions"/> used to marshal function parameters and return value.</param>
/// <returns>The created <see cref="AIFunction"/> for invoking <paramref name="method"/>.</returns>
/// <remarks>
/// The resulting <see cref="AIFunction"/> exposes metadata about the function via <see cref="AIFunction.Metadata"/>.
/// This metadata includes the function's name, description, and parameters. The function's name and description may
/// be specified explicitly via <paramref name="name"/> and <paramref name="description"/>, but if they're not, this method
/// will infer values from examining <paramref name="method"/>. That includes looking for <see cref="DescriptionAttribute"/>
/// attributes on the method itself and on its parameters.
/// </remarks>
public static AIFunction Create(MethodInfo method, object? target, string? name = null, string? description = null, JsonSerializerOptions? serializerOptions = null)
{
_ = Throw.IfNull(method);
Expand Down
Loading