5 types derived from AIFunction
Microsoft.Extensions.AI.Abstractions (2)
Functions\AIFunctionFactory.cs (1)
512
private sealed class ReflectionAIFunction :
AIFunction
Functions\DelegatingAIFunction.cs (1)
17
public class DelegatingAIFunction :
AIFunction
Microsoft.Extensions.AI.Abstractions.Tests (2)
Contents\FunctionCallContentTests.cs (1)
248
private sealed class NetTypelessAIFunction :
AIFunction
Functions\AIFunctionTests.cs (1)
19
private sealed class DerivedAIFunction :
AIFunction
Microsoft.Extensions.AI.Integration.Tests (1)
ChatClientIntegrationTests.cs (1)
517
private sealed class CustomAIFunction(string name, string jsonSchema, IReadOnlyDictionary<string, object?> additionalProperties) :
AIFunction
222 references to AIFunction
Aspire.Dashboard (2)
Model\Assistant\AIHelpers.cs (1)
340
AIFunction
[] tools,
Model\Assistant\AssistantChatViewModel.cs (1)
189
private readonly
AIFunction
[] _aiTools;
Microsoft.Extensions.AI (11)
ChatCompletion\FunctionInvocationContext.cs (2)
18
private static readonly
AIFunction
_nopFunction = AIFunctionFactory.Create(() => { }, nameof(FunctionInvocationContext));
26
public
AIFunction
Function
ChatCompletion\FunctionInvokingChatClient.cs (9)
29
/// <see cref="IChatClient"/>, it responds by invoking the corresponding <see cref="
AIFunction
"/> defined
35
/// If a requested function is an <see cref="AIFunctionDeclaration"/> but not an <see cref="
AIFunction
"/>, the
55
/// <see cref="
AIFunction
"/> instances employed as part of the supplied <see cref="ChatOptions"/> are also safe.
85
/// <param name="functionInvocationServices">An optional <see cref="IServiceProvider"/> to use for resolving services required by the <see cref="
AIFunction
"/> instances being invoked.</param>
248
/// <see cref="ChatOptions.Tools"/> or <see cref="AdditionalTools"/>) but that aren't <see cref="
AIFunction
"/>s aren't considered
255
/// <summary>Gets or sets a delegate used to invoke <see cref="
AIFunction
"/> instances.</summary>
257
/// By default, the protected <see cref="InvokeFunctionAsync"/> method is called for each <see cref="
AIFunction
"/> to be invoked,
849
if (tool is not
AIFunction
)
1021
tool is not
AIFunction
aiFunction)
Microsoft.Extensions.AI.Abstractions (98)
Functions\AIFunction.cs (7)
14
/// <summary>Initializes a new instance of the <see cref="
AIFunction
"/> class.</summary>
20
/// Gets the underlying <see cref="MethodInfo"/> that this <see cref="
AIFunction
"/> might be wrapping.
30
/// <summary>Invokes the <see cref="
AIFunction
"/> and returns its result.</summary>
39
/// <summary>Invokes the <see cref="
AIFunction
"/> and returns its result.</summary>
47
/// <summary>Creates a <see cref="AIFunctionDeclaration"/> representation of this <see cref="
AIFunction
"/> that can't be invoked.</summary>
50
/// <see cref="
AIFunction
"/> derives from <see cref="AIFunctionDeclaration"/>, layering on the ability to invoke the function in addition
55
private sealed class NonInvocableAIFunction(
AIFunction
function) : DelegatingAIFunctionDeclaration(function);
Functions\AIFunctionArguments.cs (5)
18
/// <summary>Represents arguments to be used with <see cref="
AIFunction
.InvokeAsync"/>.</summary>
21
/// as inputs to an <see cref="
AIFunction
"/>. However, an instance carries additional non-nominal
23
/// an <see cref="
AIFunction
"/> if it needs to resolve any services from a dependency injection
92
/// information for use by an <see cref="
AIFunction
"/> implementation. The meaning of this
93
/// data is left up to the implementer of the <see cref="
AIFunction
"/>.
Functions\AIFunctionDeclaration.cs (2)
11
/// <see cref="AIFunctionDeclaration"/> is the base class for <see cref="
AIFunction
"/>, which
14
/// and can type test for <see cref="
AIFunction
"/> to determine whether they can be invoked.
Functions\AIFunctionFactory.cs (62)
29
/// <summary>Provides factory methods for creating commonly-used implementations of <see cref="
AIFunction
"/>.</summary>
40
/// <summary>Creates an <see cref="
AIFunction
"/> instance for a method, specified via a delegate.</summary>
41
/// <param name="method">The method to be represented via the created <see cref="
AIFunction
"/>.</param>
43
/// <returns>The created <see cref="
AIFunction
"/> for invoking <paramref name="method"/>.</returns>
47
/// of key/value pairs and are represented in the JSON schema for the function, as exposed in the returned <see cref="
AIFunction
"/>'s
53
/// the invocation via <see cref="
AIFunction
.InvokeAsync"/>'s <see cref="CancellationToken"/> parameter. The parameter is
69
/// passed into <see cref="
AIFunction
.InvokeAsync"/> and are not included in the JSON schema. If the <see cref="AIFunctionArguments"/>
70
/// instance passed to <see cref="
AIFunction
.InvokeAsync"/> is <see langword="null"/>, the <see cref="
AIFunction
"/> implementation
77
/// All other parameter types are, by default, bound from the <see cref="AIFunctionArguments"/> dictionary passed into <see cref="
AIFunction
.InvokeAsync"/>
82
/// into <see cref="
AIFunction
.InvokeAsync"/> via the <see cref="AIFunctionArguments"/>'s <see cref="AIFunctionArguments.Context"/> dictionary; the default
112
public static
AIFunction
Create(Delegate method, AIFunctionFactoryOptions? options)
119
/// <summary>Creates an <see cref="
AIFunction
"/> instance for a method, specified via a delegate.</summary>
120
/// <param name="method">The method to be represented via the created <see cref="
AIFunction
"/>.</param>
122
/// The name to use for the <see cref="
AIFunction
"/>. If <see langword="null"/>, the name will be derived from
126
/// The description to use for the <see cref="
AIFunction
"/>. If <see langword="null"/>, a description will be derived from
130
/// <returns>The created <see cref="
AIFunction
"/> for invoking <paramref name="method"/>.</returns>
134
/// of key/value pairs and are represented in the JSON schema for the function, as exposed in the returned <see cref="
AIFunction
"/>'s
140
/// the invocation via <see cref="
AIFunction
.InvokeAsync"/>'s <see cref="CancellationToken"/> parameter. The parameter is
155
/// passed into <see cref="
AIFunction
.InvokeAsync"/> and are not included in the JSON schema. If the <see cref="AIFunctionArguments"/>
156
/// instance passed to <see cref="
AIFunction
.InvokeAsync"/> is <see langword="null"/>, the <see cref="
AIFunction
"/> implementation
162
/// All other parameter types are bound from the <see cref="AIFunctionArguments"/> dictionary passed into <see cref="
AIFunction
.InvokeAsync"/>
187
public static
AIFunction
Create(Delegate method, string? name = null, string? description = null, JsonSerializerOptions? serializerOptions = null)
204
/// Creates an <see cref="
AIFunction
"/> instance for a method, specified via an <see cref="MethodInfo"/> instance
207
/// <param name="method">The method to be represented via the created <see cref="
AIFunction
"/>.</param>
213
/// <returns>The created <see cref="
AIFunction
"/> for invoking <paramref name="method"/>.</returns>
217
/// of key/value pairs and are represented in the JSON schema for the function, as exposed in the returned <see cref="
AIFunction
"/>'s
223
/// the invocation via <see cref="
AIFunction
.InvokeAsync"/>'s <see cref="CancellationToken"/> parameter. The parameter is
239
/// passed into <see cref="
AIFunction
.InvokeAsync"/> and are not included in the JSON schema. If the <see cref="AIFunctionArguments"/>
240
/// instance passed to <see cref="
AIFunction
.InvokeAsync"/> is <see langword="null"/>, the <see cref="
AIFunction
"/> implementation
247
/// All other parameter types are, by default, bound from the <see cref="AIFunctionArguments"/> dictionary passed into <see cref="
AIFunction
.InvokeAsync"/>
252
/// into <see cref="
AIFunction
.InvokeAsync"/> via the <see cref="AIFunctionArguments"/>'s <see cref="AIFunctionArguments.Context"/> dictionary; the default
282
public static
AIFunction
Create(MethodInfo method, object? target, AIFunctionFactoryOptions? options)
290
/// Creates an <see cref="
AIFunction
"/> instance for a method, specified via an <see cref="MethodInfo"/> instance
293
/// <param name="method">The method to be represented via the created <see cref="
AIFunction
"/>.</param>
299
/// The name to use for the <see cref="
AIFunction
"/>. If <see langword="null"/>, the name will be derived from
303
/// The description to use for the <see cref="
AIFunction
"/>. If <see langword="null"/>, a description will be derived from
307
/// <returns>The created <see cref="
AIFunction
"/> for invoking <paramref name="method"/>.</returns>
311
/// of key/value pairs and are represented in the JSON schema for the function, as exposed in the returned <see cref="
AIFunction
"/>'s
317
/// the invocation via <see cref="
AIFunction
.InvokeAsync"/>'s <see cref="CancellationToken"/> parameter. The parameter is
332
/// passed into <see cref="
AIFunction
.InvokeAsync"/> and are not included in the JSON schema. If the <see cref="AIFunctionArguments"/>
333
/// instance passed to <see cref="
AIFunction
.InvokeAsync"/> is <see langword="null"/>, the <see cref="
AIFunction
"/> implementation
339
/// All other parameter types are bound from the <see cref="AIFunctionArguments"/> dictionary passed into <see cref="
AIFunction
.InvokeAsync"/>
367
public static
AIFunction
Create(MethodInfo method, object? target, string? name = null, string? description = null, JsonSerializerOptions? serializerOptions = null)
384
/// Creates an <see cref="
AIFunction
"/> instance for a method, specified via a <see cref="MethodInfo"/> for
386
/// the receiver object each time the <see cref="
AIFunction
"/> is invoked.
388
/// <param name="method">The instance method to be represented via the created <see cref="
AIFunction
"/>.</param>
395
/// <returns>The created <see cref="
AIFunction
"/> for invoking <paramref name="method"/>.</returns>
407
/// of key/value pairs and are represented in the JSON schema for the function, as exposed in the returned <see cref="
AIFunction
"/>'s
413
/// the invocation via <see cref="
AIFunction
.InvokeAsync"/>'s <see cref="CancellationToken"/> parameter. The parameter is
429
/// passed into <see cref="
AIFunction
.InvokeAsync"/> and are not included in the JSON schema. If the <see cref="AIFunctionArguments"/>
430
/// instance passed to <see cref="
AIFunction
.InvokeAsync"/> is <see langword="null"/>, the <see cref="
AIFunction
"/> implementation
437
/// All other parameter types are, by default, bound from the <see cref="AIFunctionArguments"/> dictionary passed into <see cref="
AIFunction
.InvokeAsync"/>
442
/// into <see cref="
AIFunction
.InvokeAsync"/> via the <see cref="AIFunctionArguments"/>'s <see cref="AIFunctionArguments.Context"/> dictionary; the default
473
public static
AIFunction
Create(
488
/// but not invoke it. To create an invocable <see cref="
AIFunction
"/>, use Create. A non-invocable <see cref="AIFunctionDeclaration"/>
489
/// can also be created from an invocable <see cref="
AIFunction
"/> using that function's <see cref="
AIFunction
.AsDeclarationOnly"/> method.
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
132
/// If non- <see langword="null"/>, each time the <see cref="
AIFunction
"/> is invoked, this delegate will be invoked
149
/// It, however, is permissible for cases where invocation of the <see cref="
AIFunction
"/> is tightly controlled, and the caller
Functions\ApprovalRequiredAIFunction.cs (4)
10
/// Represents an <see cref="
AIFunction
"/> that can be described to an AI service and invoked, but for which
14
/// This class simply augments an <see cref="
AIFunction
"/> with an indication that approval is required before invocation.
23
/// <param name="innerFunction">The <see cref="
AIFunction
"/> represented by this instance.</param>
25
public ApprovalRequiredAIFunction(
AIFunction
innerFunction)
Functions\DelegatingAIFunction.cs (4)
15
/// Provides an optional base class for an <see cref="
AIFunction
"/> that passes through calls to another instance.
24
protected DelegatingAIFunction(
AIFunction
innerFunction)
29
/// <summary>Gets the inner <see cref="
AIFunction
" />.</summary>
30
protected
AIFunction
InnerFunction { get; }
Utilities\AIJsonSchemaTransformCache.cs (3)
16
/// This cache stores weak references from AI abstractions that declare JSON schemas such as <see cref="
AIFunction
"/> or <see cref="ChatResponseFormatJson"/>
56
/// Gets or creates a transformed JSON schema for the specified <see cref="
AIFunction
"/> instance.
61
public JsonElement GetOrCreateTransformedSchema(
AIFunction
function) =>
Microsoft.Extensions.AI.Abstractions.Tests (17)
Contents\FunctionCallContentTests.cs (4)
111
AIFunction
function = AIFunctionFactory.Create((DayOfWeek[] a, double b, Guid c, Dictionary<string, string> d) => b, serializerOptions: TestJsonSerializerContext.Default.Options);
133
AIFunction
function = AIFunctionFactory.Create((DayOfWeek[] a, double b, Guid c, Dictionary<string, string> d) => b, serializerOptions: TestJsonSerializerContext.Default.Options);
166
AIFunction
function = AIFunctionFactory.Create((DayOfWeek[] a, double b, Guid c, Dictionary<string, string> d) => b, serializerOptions: TestJsonSerializerContext.Default.Options);
187
AIFunction
function = AIFunctionFactory.Create((DayOfWeek[] a, double b, Guid c, Dictionary<string, string> d) => b, serializerOptions: TestJsonSerializerContext.Default.Options);
Functions\ApprovalRequiredAIFunctionTests.cs (2)
21
var
inner = AIFunctionFactory.Create(() => 42);
37
var
inner = AIFunctionFactory.Create(() => "result");
Functions\DelegatingAIFunctionTests.cs (6)
23
AIFunction
expected = new ApprovalRequiredAIFunction(AIFunctionFactory.Create(() => 42));
38
private sealed class DerivedFunction(
AIFunction
innerFunction) : DelegatingAIFunction(innerFunction)
40
public new
AIFunction
InnerFunction => base.InnerFunction;
65
AIFunction
inner = AIFunctionFactory.Create(int () =>
71
AIFunction
actual = new OverridesInvocation(inner, (args, ct) => new ValueTask<object?>(84));
88
private sealed class OverridesInvocation(
AIFunction
innerFunction, Func<AIFunctionArguments, CancellationToken, ValueTask<object?>> invokeAsync) : DelegatingAIFunction(innerFunction)
Utilities\AIJsonSchemaTransformCacheTests.cs (1)
51
AIFunction
func = AIFunctionFactory.Create((int x, int y) => x + y);
Utilities\AIJsonUtilitiesTests.cs (4)
285
AIFunction
func = AIFunctionFactory.Create((int x, int y) => x + y, serializerOptions: options);
339
AIFunction
func = AIFunctionFactory.Create((
360
AIFunction
func = AIFunctionFactory.Create((int a, int? b, long c, short d, float e, double f, decimal g) => { }, serializerOptions: options);
410
AIFunction
func = AIFunctionFactory.Create(([Range(1, 10)] int num, [StringLength(100, MinimumLength = 1)] string str) => num + str.Length, serializerOptions: options);
Microsoft.Extensions.AI.AzureAIInference.Tests (5)
AzureAIInferenceChatClientTests.cs (5)
328
AIFunction
tool = AIFunctionFactory.Create(([Description("The person whose age is being requested")] string personName) => 42, "GetPersonAge", "Gets the age of the specified person.");
412
AIFunction
tool = AIFunctionFactory.Create(([Description("The person whose age is being requested")] string personName) => 42, "GetPersonAge", "Gets the age of the specified person.");
501
AIFunction
tool = AIFunctionFactory.Create(([Description("The person whose age is being requested")] string personName) => 42, "GetPersonAge", "Gets the age of the specified person.");
576
AIFunction
tool = AIFunctionFactory.Create(([Description("The person whose age is being requested")] string personName) => 42, "GetPersonAge", "Gets the age of the specified person.");
620
private static ChatCompletionsToolDefinition ToAzureAIChatTool(
AIFunction
aiFunction)
Microsoft.Extensions.AI.Integration.Tests (21)
ChatClientIntegrationTests.cs (20)
311
AIFunction
func = AIFunctionFactory.Create((string id = "defaultId") => id is "foo" ? secretNumber : -1, "GetSecretNumberById");
343
AIFunction
func = AIFunctionFactory.Create((PersonRecord person) => person.Name is "John" ? secretNumber + person.Age : -1, "GetSecretNumberByPerson");
375
AIFunction
func = AIFunctionFactory.Create((string[] items, string shopperId) => { shoppingCart.AddRange(items); shopperName = shopperId; }, "AddItemsToShoppingCart");
441
Func<string,
AIFunction
> createWithSchema = schema =>
606
var
tool = AIFunctionFactory.Create(() =>
629
var
getSecretNumberTool = AIFunctionFactory.Create(() => 123, "GetSecretNumber");
630
var
shieldsUpTool = AIFunctionFactory.Create(() => shieldsUp = true, "ShieldsUp");
726
var
getTemperature = AIFunctionFactory.Create([Description("Gets the current temperature")] () =>
765
var
getTemperature = AIFunctionFactory.Create([Description("Gets the current temperature")] () =>
807
var
getTemperature = AIFunctionFactory.Create([Description("Gets the current temperature")] () =>
1228
var
getWeather = AIFunctionFactory.Create(([Description("Gets weather for a city")] string city) =>
1417
var
weatherTool = AIFunctionFactory.Create(
1425
var
translateTool = AIFunctionFactory.Create(
1433
var
mathTool = AIFunctionFactory.Create(
1501
var
translateTool = AIFunctionFactory.Create(
1509
var
weatherTool = AIFunctionFactory.Create(
1558
var
weatherTool = AIFunctionFactory.Create(
1634
var
weatherTool = AIFunctionFactory.Create(
1642
var
translateTool = AIFunctionFactory.Create(
1650
var
mathTool = AIFunctionFactory.Create(
PromptBasedFunctionCallingChatClient.cs (1)
169
var toolDescriptorsJson = JsonSerializer.Serialize(tools.OfType<
AIFunction
>().Select(t => t.JsonSchema), _jsonOptions);
Microsoft.Extensions.AI.OllamaSharp.Integration.Tests (2)
OllamaSharpChatClientIntegrationTests.cs (2)
66
var
stockPriceTool = AIFunctionFactory.Create([Description("Returns the stock price for a given ticker symbol")] (
76
var
irrelevantTool = AIFunctionFactory.Create(() => { didCallIrrelevantTool = true; return 123; }, "GetSecretNumber");
Microsoft.Extensions.AI.OpenAI (1)
MicrosoftExtensionsAIResponsesExtensions.cs (1)
124
/// such as <see cref="
AIFunction
"/>, <see cref="HostedWebSearchTool"/>, <see cref="HostedMcpServerTool"/>, or
Microsoft.Extensions.AI.OpenAI.Tests (6)
OpenAIChatClientTests.cs (4)
382
AIFunction
tool = AIFunctionFactory.Create(([Description("The person whose age is being requested")] string personName) => 42, "GetPersonAge", "Gets the age of the specified person.");
459
AIFunction
tool = AIFunctionFactory.Create(([Description("The person whose age is being requested")] string personName) => 42, "GetPersonAge", "Gets the age of the specified person.");
542
AIFunction
tool = AIFunctionFactory.Create(([Description("The person whose age is being requested")] string personName) => 42, "GetPersonAge", "Gets the age of the specified person.");
616
AIFunction
tool = AIFunctionFactory.Create(([Description("The person whose age is being requested")] string personName) => 42, "GetPersonAge", "Gets the age of the specified person.");
OpenAIConversionTests.cs (1)
22
private static readonly
AIFunction
_testFunction = AIFunctionFactory.Create(
OpenAIResponseClientTests.cs (1)
675
AIFunction
tool = AIFunctionFactory.Create(([Description("The person whose age is being requested")] string personName) => 42, "GetPersonAge", "Gets the age of the specified person.");
Microsoft.Extensions.AI.Tests (59)
ChatCompletion\FunctionInvocationContextTests.cs (1)
51
AIFunction
function = AIFunctionFactory.Create(() => { }, nameof(Properties_Roundtrip));
ChatCompletion\FunctionInvokingChatClientApprovalsTests.cs (2)
99
AIFunction
func1 = AIFunctionFactory.Create(() => "Result 1", "Func1");
100
AIFunction
func2 = AIFunctionFactory.Create((int i) => $"Result 2: {i}", "Func2");
ChatCompletion\FunctionInvokingChatClientTests.cs (3)
837
var
function = AIFunctionFactory.Create(async (int i) =>
912
var
function = AIFunctionFactory.Create((string? result = null) =>
1166
var
known = AIFunctionFactory.Create(() => { invoked++; return "OK"; }, "Known");
Functions\AIFunctionFactoryTest.cs (53)
44
AIFunction
func;
59
AIFunction
func = AIFunctionFactory.Create((string a = "test") => a + " " + a);
67
AIFunction
[] funcs =
75
foreach (
AIFunction
f in funcs)
85
AIFunction
func = AIFunctionFactory.Create((int x, int y, int z, int w, int u) => x + y + z + w + u);
114
AIFunction
func = AIFunctionFactory.Create((JsonElement param) => param, serializerOptions: options);
134
AIFunction
func = AIFunctionFactory.Create((JsonElement param) => param);
153
AIFunction
func = AIFunctionFactory.Create((int value1 = 1, string value2 = "2", CancellationToken cancellationToken = default) =>
167
AIFunction
func;
216
AIFunction
func;
245
AIFunction
func = AIFunctionFactory.Create(funcWithDisplayName);
294
AIFunction
func = AIFunctionFactory.Create(dotnetFunc, options);
319
AIFunction
func = AIFunctionFactory.Create(
343
AIFunction
func = AIFunctionFactory.Create(
363
AIFunction
func = AIFunctionFactory.Create((
407
AIFunction
func = AIFunctionFactory.Create((
439
AIFunction
func = AIFunctionFactory.Create(
457
AIFunction
func = AIFunctionFactory.Create(
468
AIFunction
func = AIFunctionFactory.Create(
487
AIFunction
func = AIFunctionFactory.Create(
506
AIFunction
func = AIFunctionFactory.Create(
525
AIFunction
func = AIFunctionFactory.Create(
552
AIFunction
f = AIFunctionFactory.Create(([FromKeyedServices("key")] MyService service, int myInteger) => service.Value + myInteger,
575
AIFunction
f = AIFunctionFactory.Create(([FromKeyedServices(null!)] MyService service, int myInteger) => service.Value + myInteger,
598
AIFunction
f = AIFunctionFactory.Create(([FromKeyedServices("key")] MyService? service = null, int myInteger = 0) =>
617
AIFunction
f = AIFunctionFactory.Create(
669
AIFunction
f = AIFunctionFactory.Create(
686
AIFunction
f = AIFunctionFactory.Create(
702
AIFunction
f = AIFunctionFactory.Create(
725
AIFunction
f = AIFunctionFactory.Create(
748
AIFunction
f = AIFunctionFactory.Create(
771
AIFunction
f = AIFunctionFactory.Create(
794
AIFunction
f = AIFunctionFactory.Create(
817
AIFunction
f = AIFunctionFactory.Create(
840
AIFunction
f = AIFunctionFactory.Create(
863
AIFunction
f = AIFunctionFactory.Create(
930
static async Task ValidateAsync<T>(IEnumerable<
AIFunction
> functions)
932
foreach (
var
f in functions)
944
AIFunction
f = AIFunctionFactory.Create((Guid g = default, StructWithDefaultCtor s = default) => g.ToString() + "," + s.Value.ToString(), serializerOptions: JsonContext.Default.Options);
955
AIFunction
f = AIFunctionFactory.Create(
988
AIFunction
f = AIFunctionFactory.Create(
1018
AIFunction
f = AIFunctionFactory.Create(Add, serializerOptions: JsonContext.Default.Options);
1144
var
tool = AIFunctionFactory.Create(DoSomething);
1163
var
tool1 = AIFunctionFactory.Create(FirstLocal);
1164
var
tool2 = AIFunctionFactory.Create(SecondLocal);
1180
var
tool = AIFunctionFactory.Create(lambda);
1199
var
tool1 = AIFunctionFactory.Create(lambda1);
1200
var
tool2 = AIFunctionFactory.Create(lambda2);
1214
var
tool = AIFunctionFactory.Create(Add);
1230
var
tool = AIFunctionFactory.Create(FetchDataAsync);
1247
var
tool = AIFunctionFactory.Create(DoSomething, name: "CustomName");
1256
var
tool = AIFunctionFactory.Create(Add, serializerOptions: JsonContext.Default.Options);
1268
var
tool = AIFunctionFactory.Create(TestStaticMethod, null, serializerOptions: JsonContext.Default.Options);