40 references to AIFunctionArguments
Microsoft.Extensions.AI.Abstractions.Tests (4)
Contents\FunctionCallContentTests..cs (1)
99
AIFunctionArguments arguments =
new
()
Functions\AIFunctionArgumentsTests.cs (2)
17
var args = new
AIFunctionArguments
();
53
var args = new
AIFunctionArguments
Functions\DelegatingAIFunctionTests.cs (1)
81
object? result = await actual.InvokeAsync(
new
(), CancellationToken.None);
Microsoft.Extensions.AI.Tests (36)
Functions\AIFunctionFactoryTest.cs (36)
44
AssertExtensions.EqualFunctionCallResults("test test", await func.InvokeAsync(
new
() { ["a"] = "test" }));
47
AssertExtensions.EqualFunctionCallResults("hello world", await func.InvokeAsync(
new
() { ["b"] = "hello", ["a"] = "world" }));
50
AssertExtensions.EqualFunctionCallResults(3L, await func.InvokeAsync(
new
() { ["a"] = 1, ["b"] = 2L }));
58
AssertExtensions.EqualFunctionCallResults("hello hello", await func.InvokeAsync(
new
() { ["a"] = "hello" }));
84
var result = await func.InvokeAsync(
new
()
114
var result = await func.InvokeAsync(
new
()
134
var result = await func.InvokeAsync(
new
()
168
AssertExtensions.EqualFunctionCallResults("test test", await func.InvokeAsync(
new
() { ["a"] = "test" }));
172
AssertExtensions.EqualFunctionCallResults("hello world", await func.InvokeAsync(
new
() { ["b"] = "hello", ["a"] = "world" }));
177
AssertExtensions.EqualFunctionCallResults(null, await func.InvokeAsync(
new
() { ["a"] = 1, ["b"] = 2L }));
183
AssertExtensions.EqualFunctionCallResults(null, await func.InvokeAsync(
new
() { ["a"] = 1, ["b"] = 2L }));
188
AssertExtensions.EqualFunctionCallResults(new int[] { 0, 1, 2, 3, 4 }, await func.InvokeAsync(
new
() { ["count"] = 5 }), JsonContext.Default.Options);
295
var result = (JsonElement?)await func.InvokeAsync(
new
()
325
AIFunctionArguments arguments =
new
() { ["myInteger"] = 42 };
385
var result = await func.InvokeAsync(
new
() { ["myInteger"] = 42 });
413
var result = (Tuple<MyFunctionTypeWithOneArg, MyArgumentType>?)await func.InvokeAsync(
new
() { Services = sp });
524
Exception e = await Assert.ThrowsAsync<ArgumentException>("arguments.Services", () => f.InvokeAsync(
new
() { ["myInteger"] = 1 }).AsTask());
526
var result = await f.InvokeAsync(
new
() { ["myInteger"] = 1, Services = sp });
547
Exception e = await Assert.ThrowsAsync<ArgumentException>("arguments.Services", () => f.InvokeAsync(
new
() { ["myInteger"] = 1 }).AsTask());
549
var result = await f.InvokeAsync(
new
() { ["myInteger"] = 1, Services = sp });
569
var result = await f.InvokeAsync(
new
() { ["myInteger"] = 1 });
572
result = await f.InvokeAsync(
new
() { ["myInteger"] = 1, Services = sp });
606
Exception e = await Assert.ThrowsAsync<ArgumentException>(() => f.InvokeAsync(
new
() { ["myInteger"] = 1 }).AsTask());
609
e = await Assert.ThrowsAsync<ArgumentException>(() => f.InvokeAsync(
new
()
616
var result = await f.InvokeAsync(
new
()
640
var result = await f.InvokeAsync(
new
() { Services = sp1 });
647
AIFunctionArguments args1 =
new
() { ["a"] = 42 };
648
AIFunctionArguments args2 =
new
() { ["a"] = 43 };
680
object? result = await f.InvokeAsync(
new
() { ["i"] = 42 }, cts.Token);
703
object? result = await f.InvokeAsync(
new
() { ["i"] = 42 }, cts.Token);
726
object? result = await f.InvokeAsync(
new
() { ["i"] = 42 }, cts.Token);
749
object? result = await f.InvokeAsync(
new
() { ["i"] = 42 }, cts.Token);
772
object? result = await f.InvokeAsync(
new
() { ["i"] = 42 }, cts.Token);
795
object? result = await f.InvokeAsync(
new
() { ["i"] = 42 }, cts.Token);
818
object? result = await f.InvokeAsync(
new
() { ["i"] = 42 }, cts.Token);
842
object? result = await f.InvokeAsync(
new
() { ["i"] = 42 }, cts.Token);