375 references to FunctionCallContent
Microsoft.Extensions.AI (1)
ChatCompletion\FunctionInvocationContext.cs (1)
42
get => field ??=
new
(string.Empty, _nopFunction.Name, EmptyReadOnlyDictionary<string, object?>.Instance);
Microsoft.Extensions.AI.Abstractions (2)
Contents\FunctionCallContent.cs (1)
100
return new
FunctionCallContent
(callId, name, arguments)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.FunctionCallContent.g.cs (1)
34
ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.
FunctionCallContent
((string)args[0], (string)args[1], (global::System.Collections.Generic.IDictionary<string, object>)args[2]),
Microsoft.Extensions.AI.Abstractions.Tests (34)
ChatCompletion\ChatMessageTests.cs (2)
148
new
FunctionCallContent
("callId1", "fc1"),
271
new
FunctionCallContent
("function-id", "plugin-name-function-name", new Dictionary<string, object?> { ["parameter"] = "argument" }),
ChatCompletion\ChatResponseUpdateExtensionsTests.cs (1)
1127
new() { Contents = [new
FunctionCallContent
("fc1", "SearchTool", new Dictionary<string, object?> { ["q"] = "test" })] },
ChatCompletion\ChatResponseUpdateTests.cs (3)
94
new
FunctionCallContent
("callId1", "fc1"),
123
new
FunctionCallContent
("callId1", "fc1"),
186
new
FunctionCallContent
("callId1", "fc1"),
Contents\AIContentTests.cs (3)
72
new
FunctionCallContent
("call123", "functionName", new Dictionary<string, object?> { { "param1", 123 } }),
77
new ToolApprovalRequestContent("request123", new
FunctionCallContent
("call123", "functionName", new Dictionary<string, object?> { { "param1", 123 } })),
78
new ToolApprovalResponseContent("request123", approved: true, new
FunctionCallContent
("call123", "functionName", new Dictionary<string, object?> { { "param1", 123 } })),
Contents\FunctionCallContentTests.cs (7)
21
FunctionCallContent c =
new
("callId1", "name");
39
FunctionCallContent c =
new
("id", "name", args);
52
FunctionCallContent c =
new
("callId1", "name");
87
var sut = new
FunctionCallContent
("callId1", "functionName", new Dictionary<string, object?> { ["key"] = "value" })
148
var original = new
FunctionCallContent
("callId1", "functionName") { InformationalOnly = informationalOnly };
164
var sut = new
FunctionCallContent
("callId1", "functionName", new Dictionary<string, object?> { ["key"] = "value" }) { Exception = ex };
412
var content = new
FunctionCallContent
("call123", "myFunction")
Contents\InputRequestContentTests.cs (1)
40
new ToolApprovalRequestContent("request123", new
FunctionCallContent
("call123", "functionName", new Dictionary<string, object?> { { "param1", 123 } })),
Contents\InputResponseContentTests.cs (1)
39
new ToolApprovalResponseContent("request123", true, new
FunctionCallContent
("call123", "functionName")),
Contents\ToolApprovalRequestContentTests.cs (7)
16
Assert.Throws<ArgumentNullException>("requestId", () => new ToolApprovalRequestContent(null!, new
FunctionCallContent
("FCC1", "TestFunction")));
17
Assert.Throws<ArgumentException>("requestId", () => new ToolApprovalRequestContent("", new
FunctionCallContent
("FCC1", "TestFunction")));
18
Assert.Throws<ArgumentException>("requestId", () => new ToolApprovalRequestContent("\r\t\n ", new
FunctionCallContent
("FCC1", "TestFunction")));
24
new
FunctionCallContent
("FCC1", "TestFunction", new Dictionary<string, object?> { { "param1", 123 } }),
65
FunctionCallContent functionCall =
new
("FCC1", "TestFunction");
137
var content = new ToolApprovalRequestContent("req-1", new
FunctionCallContent
("call1", "Func"));
146
var content = new ToolApprovalRequestContent("req-1", new
FunctionCallContent
("call1", "Func"))
Contents\ToolApprovalResponseContentTests.cs (5)
16
Assert.Throws<ArgumentNullException>("requestId", () => new ToolApprovalResponseContent(null!, true, new
FunctionCallContent
("FCC1", "TestFunction")));
17
Assert.Throws<ArgumentException>("requestId", () => new ToolApprovalResponseContent("", true, new
FunctionCallContent
("FCC1", "TestFunction")));
18
Assert.Throws<ArgumentException>("requestId", () => new ToolApprovalResponseContent("\r\t\n ", true, new
FunctionCallContent
("FCC1", "TestFunction")));
24
new
FunctionCallContent
("FCC1", "TestFunction", new Dictionary<string, object?> { { "param1", 123 } }),
82
var content = new ToolApprovalResponseContent("request123", true, new
FunctionCallContent
("call123", "functionName"))
Contents\ToolCallContentTests.cs (1)
56
new
FunctionCallContent
("call1", "function1", new Dictionary<string, object?> { { "param1", 123 } }),
Generated\361d1da7f942c932\TestJsonSerializerContext.FunctionCallContent.g.cs (1)
32
ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.
FunctionCallContent
((string)args[0], (string)args[1], (global::System.Collections.Generic.IDictionary<string, object>)args[2]),
Realtime\RealtimeConversationItemTests.cs (1)
57
var functionCall = new
FunctionCallContent
("call_1", "myFunc");
SpeechToText\SpeechToTextResponseUpdateTests.cs (1)
64
new
FunctionCallContent
("callId1", "fc1"),
Microsoft.Extensions.AI.Evaluation.Reporting (1)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.FunctionCallContent.g.cs (1)
34
ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.
FunctionCallContent
((string)args[0], (string)args[1], (global::System.Collections.Generic.IDictionary<string, object>)args[2]),
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (1)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.FunctionCallContent.g.cs (1)
34
ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.
FunctionCallContent
((string)args[0], (string)args[1], (global::System.Collections.Generic.IDictionary<string, object>)args[2]),
Microsoft.Extensions.AI.Evaluation.Reporting.Tests (1)
ScenarioRunResultTests.cs (1)
219
var functionCall = new
FunctionCallContent
(
Microsoft.Extensions.AI.Integration.Tests (1)
PromptBasedFunctionCallingChatClient.cs (1)
118
message.Contents.Add(new
FunctionCallContent
(id, toolCallParsed.Name!, toolCallParsed.Arguments is { } args ? new ReadOnlyDictionary<string, object?>(args) : null));
Microsoft.Extensions.AI.OpenAI (1)
OpenAIRealtimeClientSession.cs (1)
1117
[new
FunctionCallContent
(funcCallItem.CallId ?? string.Empty, funcCallItem.FunctionName, arguments)],
Microsoft.Extensions.AI.OpenAI.Tests (12)
OpenAIChatClientTests.cs (2)
1472
new
FunctionCallContent
("12345", "SayHello"),
1473
new
FunctionCallContent
("12346", "SayHi"),
OpenAIConversionTests.cs (10)
731
new
FunctionCallContent
("callid123", "SomeFunction", new Dictionary<string, object?>
800
new
FunctionCallContent
("callid123", "SomeFunction", new Dictionary<string, object?>
1220
new
FunctionCallContent
("call123", "TestFunction", new Dictionary<string, object?> { ["param"] = "value" })
1591
new
FunctionCallContent
("process_data", "ProcessComplexData", complexArgs)
1774
var functionCallContent = new
FunctionCallContent
("call-123", "GetWeather", new Dictionary<string, object?>
1812
var functionCall1 = new
FunctionCallContent
("call-1", "Function1", new Dictionary<string, object?> { ["param1"] = "value1" });
1813
var functionCall2 = new
FunctionCallContent
("call-2", "Function2", new Dictionary<string, object?> { ["param2"] = "value2" });
1846
new
FunctionCallContent
("call-123", "GetWeather", new Dictionary<string, object?> { ["location"] = "Seattle" }),
2087
new
FunctionCallContent
("call-123", "TestFunction", new Dictionary<string, object?> { ["param"] = "value" })
2122
new
FunctionCallContent
("call-456", "GetWeather", new Dictionary<string, object?> { ["location"] = "Seattle" })
Microsoft.Extensions.AI.Stabilization.Tests (1)
Generated\361d1da7f942c932\AIContentSerializationRegressionContext.FunctionCallContent.g.cs (1)
32
ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.
FunctionCallContent
((string)args[0], (string)args[1], (global::System.Collections.Generic.IDictionary<string, object>)args[2]),
Microsoft.Extensions.AI.Tests (320)
ChatCompletion\ChatClientStructuredOutputExtensionsTests.cs (1)
201
new
FunctionCallContent
("callid123", "get_data"),
ChatCompletion\DistributedCachingChatClientTest.cs (4)
52
Contents = [new
FunctionCallContent
("someCallId", "functionName", new Dictionary<string, object?>
255
new
FunctionCallContent
("someCallId", "someFn", new Dictionary<string, object?> { ["arg1"] = "value1" }),
266
Contents = [new
FunctionCallContent
("someCallId", "someFn", new Dictionary<string, object?> { ["arg1"] = "value1" })],
316
new() { Role = ChatRole.Assistant, Contents = [new
FunctionCallContent
("callId1", "separator")] },
ChatCompletion\FunctionInvocationContextTests.cs (1)
55
FunctionCallContent callContent =
new
(string.Empty, string.Empty, new Dictionary<string, object?>());
ChatCompletion\FunctionInvokingChatClientApprovalsTests.cs (165)
41
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
48
new ToolApprovalRequestContent("ficc_callId1", new
FunctionCallContent
("callId1", "Func1")),
49
new ToolApprovalRequestContent("ficc_callId2", new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
77
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
84
new ToolApprovalRequestContent("ficc_callId1", new
FunctionCallContent
("callId1", "Func1")),
85
new ToolApprovalRequestContent("ficc_callId2", new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
124
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
133
new ToolApprovalRequestContent("ficc_callId1", new
FunctionCallContent
("callId1", "Func1"))
137
new ToolApprovalRequestContent("ficc_callId2", new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
175
new
FunctionCallContent
("callId1", "Func1"),
176
new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })
184
new ToolApprovalRequestContent("ficc_callId1", new
FunctionCallContent
("callId1", "Func1")),
185
new ToolApprovalRequestContent("ficc_callId2", new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
220
new
FunctionCallContent
("callId1", "Func1"),
221
new
FunctionCallContent
("callId2", "Unknown"),
229
new ToolApprovalRequestContent("ficc_callId1", new
FunctionCallContent
("callId1", "Func1")),
230
new ToolApprovalRequestContent("ficc_callId2", new
FunctionCallContent
("callId2", "Unknown"))
259
new ToolApprovalRequestContent("ficc_callId1", new
FunctionCallContent
("callId1", "Func1")),
260
new ToolApprovalRequestContent("ficc_callId2", new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
264
new ToolApprovalResponseContent("ficc_callId1", true, new
FunctionCallContent
("callId1", "Func1")),
265
new ToolApprovalResponseContent("ficc_callId2", true, new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
272
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
283
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
311
new ToolApprovalRequestContent("ficc_callId1", new
FunctionCallContent
("callId1", "Func1")),
312
new ToolApprovalRequestContent("ficc_callId2", new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
316
new ToolApprovalResponseContent("ficc_callId1", true, new
FunctionCallContent
("callId1", "Func1")),
317
new ToolApprovalResponseContent("ficc_callId2", true, new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
325
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
336
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
363
new ToolApprovalRequestContent("ficc_callId1", new
FunctionCallContent
("callId1", "Func1")),
367
new ToolApprovalRequestContent("ficc_callId2", new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
371
new ToolApprovalResponseContent("ficc_callId1", true, new
FunctionCallContent
("callId1", "Func1")),
375
new ToolApprovalResponseContent("ficc_callId2", true, new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
382
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]) { MessageId = "resp1" },
383
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]) { MessageId = "resp2" },
394
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]) { MessageId = "resp1" },
395
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]) { MessageId = "resp2" },
422
new ToolApprovalRequestContent("ficc_callId1", new
FunctionCallContent
("callId1", "Func1")),
423
new ToolApprovalRequestContent("ficc_callId2", new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
427
new ToolApprovalResponseContent("ficc_callId1", false, new
FunctionCallContent
("callId1", "Func1")),
428
new ToolApprovalResponseContent("ficc_callId2", false, new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
435
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
450
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
481
new ToolApprovalRequestContent("ficc_callId1", new
FunctionCallContent
("callId1", "Func1")),
482
new ToolApprovalRequestContent("ficc_callId2", new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
486
new ToolApprovalResponseContent("ficc_callId1", false, new
FunctionCallContent
("callId1", "Func1")),
487
new ToolApprovalResponseContent("ficc_callId2", true, new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
494
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
506
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
514
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
545
new ToolApprovalRequestContent("ficc_callId1", new
FunctionCallContent
("callId1", "Func1")),
546
new ToolApprovalRequestContent("ficc_callId2", new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
550
new ToolApprovalResponseContent("ficc_callId1", false, new
FunctionCallContent
("callId1", "Func1"))
554
new ToolApprovalResponseContent("ficc_callId2", false, new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
564
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
579
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
611
new ToolApprovalRequestContent("ficc_callId1", new
FunctionCallContent
("callId1", "Func1")),
612
new ToolApprovalRequestContent("ficc_callId2", new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })),
613
new ToolApprovalRequestContent("ficc_callId3", new
FunctionCallContent
("callId3", "Func3", arguments: new Dictionary<string, object?> { { "s", "test" } }))
617
new ToolApprovalResponseContent("ficc_callId1", false, new
FunctionCallContent
("callId1", "Func1")) { Reason = "Custom rejection for Func1" },
618
new ToolApprovalResponseContent("ficc_callId2", false, new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })),
619
new ToolApprovalResponseContent("ficc_callId3", true, new
FunctionCallContent
("callId3", "Func3", arguments: new Dictionary<string, object?> { { "s", "test" } }))
628
new
FunctionCallContent
("callId1", "Func1"),
629
new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }),
630
new
FunctionCallContent
("callId3", "Func3", arguments: new Dictionary<string, object?> { { "s", "test" } })
649
new
FunctionCallContent
("callId1", "Func1"),
650
new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }),
651
new
FunctionCallContent
("callId3", "Func3", arguments: new Dictionary<string, object?> { { "s", "test" } })
666
new
FunctionCallContent
("callId1", "Func1"),
667
new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }),
668
new
FunctionCallContent
("callId3", "Func3", arguments: new Dictionary<string, object?> { { "s", "test" } })
703
new ToolApprovalRequestContent("ficc_callId1", new
FunctionCallContent
("callId1", "Func1")),
707
new ToolApprovalResponseContent("ficc_callId1", false, new
FunctionCallContent
("callId1", "Func1"))
717
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
731
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
761
new ToolApprovalRequestContent("ficc_callId1", new
FunctionCallContent
("callId1", "Func1")),
762
new ToolApprovalRequestContent("ficc_callId2", new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
766
new ToolApprovalResponseContent("ficc_callId1", true, new
FunctionCallContent
("callId1", "Func1")),
767
new ToolApprovalResponseContent("ficc_callId2", true, new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
774
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
780
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 3 } })]),
785
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
789
new ToolApprovalRequestContent("ficc_callId2", new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 3 } }))
815
new ToolApprovalRequestContent("ficc_callId1", new
FunctionCallContent
("callId1", "Func1")),
816
new ToolApprovalRequestContent("ficc_callId2", new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
820
new ToolApprovalResponseContent("ficc_callId1", true, new
FunctionCallContent
("callId1", "Func1")),
821
new ToolApprovalResponseContent("ficc_callId2", true, new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
823
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
827
new ToolApprovalRequestContent("ficc_callId3", new
FunctionCallContent
("callId3", "Func1")),
831
new ToolApprovalResponseContent("ficc_callId3", true, new
FunctionCallContent
("callId3", "Func1")),
838
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
840
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId3", "Func1")]),
851
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId3", "Func1")]),
875
var requestFcc = new
FunctionCallContent
("callId1", "Func1");
876
var responseFcc = new
FunctionCallContent
("callId1", "Func1");
945
var request1Fcc = new
FunctionCallContent
("callId1", "Func1");
946
var response1Fcc = new
FunctionCallContent
("callId1", "Func1") { InformationalOnly = true };
948
var request2Fcc = new
FunctionCallContent
("callId2", "Func1");
1040
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
1049
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
1059
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
1086
new ToolApprovalRequestContent("ficc_callId1", new
FunctionCallContent
("callId1", "Func1")),
1116
new ToolApprovalResponseContent("ficc_callId1", true, new
FunctionCallContent
("callId1", "Func1")),
1117
new ToolApprovalResponseContent("ficc_callId2", true, new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
1124
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
1135
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
1162
new ToolApprovalResponseContent("ficc_callId1", true, new
FunctionCallContent
("callId1", "Func1")),
1163
new ToolApprovalResponseContent("ficc_callId2", true, new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
1179
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
1206
new ToolApprovalResponseContent("ficc_callId1", true, new
FunctionCallContent
("callId1", "Func1")),
1228
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
1256
new ToolApprovalResponseContent("ficc_callId1", true, new
FunctionCallContent
("callId1", "Func1")),
1276
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
1302
new ToolApprovalRequestContent("ficc_callId1", new
FunctionCallContent
("callId1", "Func1")),
1306
new ToolApprovalResponseContent("ficc_callId1", true, new
FunctionCallContent
("callId1", "Func1")),
1318
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
1330
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
1357
new ToolApprovalRequestContent("ficc_callId1", new
FunctionCallContent
("callId1", "Func1")),
1361
new ToolApprovalResponseContent("ficc_callId1", true, new
FunctionCallContent
("callId1", "Func1")),
1369
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
1381
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
1415
new ToolApprovalRequestContent("ficc_callId1", new
FunctionCallContent
("callId1", "Func1")),
1419
new ToolApprovalResponseContent("ficc_callId1", true, new
FunctionCallContent
("callId1", "Func1")),
1425
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
1482
yield return new ChatResponseUpdate(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]) { MessageId = messageId };
1488
new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })
1562
yield return new ChatResponseUpdate(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]) { MessageId = messageId };
1567
new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })
1571
yield return new ChatResponseUpdate(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func3")]) { MessageId = messageId };
1644
var alreadyProcessedFunctionCall = new
FunctionCallContent
("callId1", "Func1") { InformationalOnly = true };
1688
new ToolApprovalRequestContent("approval-request-id", new
FunctionCallContent
("function-call-id", "Func1"))
1692
new ToolApprovalResponseContent("approval-request-id", true, new
FunctionCallContent
("function-call-id", "Func1"))
1704
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("function-call-id", "Func1")]) { MessageId = OriginalMessageId },
1743
new
FunctionCallContent
("callId1", "Func"),
1752
new ToolApprovalRequestContent("ficc_callId1", new
FunctionCallContent
("callId1", "Func")),
1782
new ToolApprovalRequestContent("ficc_callId1", new
FunctionCallContent
("callId1", "Func")),
1787
new ToolApprovalResponseContent("ficc_callId1", true, new
FunctionCallContent
("callId1", "Func")),
1801
new
FunctionCallContent
("callId1", "Func")
1825
new
FunctionCallContent
("callId1", "Func")
1866
new ToolApprovalRequestContent("ficc_callId1", new
FunctionCallContent
("callId1", "Func")),
1871
new ToolApprovalResponseContent("ficc_callId1", approveFuncCall, new
FunctionCallContent
("callId1", "Func")),
1884
new
FunctionCallContent
("callId1", "Func")
1911
new
FunctionCallContent
("callId1", "Func"),
2098
FunctionCallContent fcc => new
FunctionCallContent
(fcc.CallId, fcc.Name, fcc.Arguments)
ChatCompletion\FunctionInvokingChatClientTests.cs (126)
94
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
96
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
98
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId3", "VoidReturn", arguments: new Dictionary<string, object?> { { "i", 43 } })]),
128
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
130
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
132
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId3", "VoidReturn", arguments: new Dictionary<string, object?> { { "i", 43 } })]),
161
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
163
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
165
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId3", "VoidReturn", arguments: new Dictionary<string, object?> { { "i", 43 } })]),
194
new
FunctionCallContent
("callId1", "Func1"),
195
new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 34 } }),
196
new
FunctionCallContent
("callId3", "Func2", arguments: new Dictionary<string, object?> { { "i", 56 } }),
206
new
FunctionCallContent
("callId4", "Func2", arguments: new Dictionary<string, object?> { { "i", 78 } }),
207
new
FunctionCallContent
("callId5", "Func1")
254
new
FunctionCallContent
("callId1", "Func", arguments: new Dictionary<string, object?> { { "arg", "hello" } }),
255
new
FunctionCallContent
("callId2", "Func", arguments: new Dictionary<string, object?> { { "arg", "world" } }),
298
new
FunctionCallContent
("callId1", "Func", arguments: new Dictionary<string, object?> { { "arg", "hello" } }),
299
new
FunctionCallContent
("callId2", "Func", arguments: new Dictionary<string, object?> { { "arg", "world" } }),
330
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
332
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
334
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId3", "VoidReturn", arguments: new Dictionary<string, object?> { { "i", 43 } })]),
380
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")])));
393
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")])).ToChatResponseUpdates());
461
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")])));
474
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")])).ToChatResponseUpdates());
542
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")])));
555
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")])).ToChatResponseUpdates());
637
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
($"callId0", "VoidReturn")]),
645
plan.Add(new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
($"callId{(i + 1)}", "VoidReturn")]));
668
var message = new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
($"callId{capturedOptions.Count}", "Func1")]);
712
var message = new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
($"callId{capturedOptions.Count}", "Func1")]);
759
var message = new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]);
804
var message = new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]);
960
assistantMessage.Contents.Add(new
FunctionCallContent
(callId, "Func",
984
new ChatMessage(ChatRole.Assistant, [new TextContent("extra"), new
FunctionCallContent
("callId1", "Func1"), new TextContent("stuff")]),
986
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
988
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId3", "VoidReturn", arguments: new Dictionary<string, object?> { { "i", 43 } }), new TextContent("more")]),
1021
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
1043
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1", new Dictionary<string, object?> { ["arg1"] = "value1" })]),
1100
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1", new Dictionary<string, object?> { ["arg1"] = "value1" })]),
1192
new() { Contents = [new
FunctionCallContent
("callId1", "Func1", new Dictionary<string, object?> { ["text"] = "Input 1" })] },
1193
new() { Contents = [new
FunctionCallContent
("callId2", "Func1", new Dictionary<string, object?> { ["text"] = "Input 2" })] }
1245
new(ChatRole.Assistant, [new
FunctionCallContent
($"callId{chatContents.Count()}", "Func1")]) :
1294
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1", new Dictionary<string, object?> { ["i"] = 41 })]),
1296
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId2", "Func1", new Dictionary<string, object?> { ["i"] = 42 })]),
1304
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId3", "Func1", new Dictionary<string, object?> { ["i"] = 43 })]),
1364
new
FunctionCallContent
("callId1", "Search"),
1365
new
FunctionCallContent
("callId2", "Search", new Dictionary<string, object?> { { "result", "birds" } }),
1366
new
FunctionCallContent
("callId3", "Search"),
1412
return new ChatResponse(new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId-abc", "Func1")]))
1450
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1", new Dictionary<string, object?> { ["arg1"] = "value1" })]),
1480
new
FunctionCallContent
("callId1", "Func1", new Dictionary<string, object?> { ["arg"] = "value1" }),
1481
new
FunctionCallContent
("callId2", "Func1", new Dictionary<string, object?> { ["arg"] = "value2" }),
1533
new
FunctionCallContent
("callId1", "UnknownFunc", new Dictionary<string, object?> { ["i"] = 1 }),
1534
new
FunctionCallContent
("callId2", "KnownFunc", new Dictionary<string, object?> { ["i"] = 2 })
1552
new
FunctionCallContent
("callId1", "UnknownFunc", new Dictionary<string, object?> { ["i"] = 1 }),
1553
new
FunctionCallContent
("callId2", "KnownFunc", new Dictionary<string, object?> { ["i"] = 2 })
1580
new(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "DefOnly")]),
1610
new
FunctionCallContent
("callId1", "Known"),
1611
new
FunctionCallContent
("callId2", "DefOnly")
1645
messages.Add(new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]));
1682
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
1741
? new(ChatRole.Assistant, [new
FunctionCallContent
("call1", "Func1")])
1793
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
1835
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
1885
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1", new Dictionary<string, object?> { ["arg1"] = "secret" })]),
1957
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
2006
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
2033
var alreadyProcessedFunctionCall = new
FunctionCallContent
("callId1", "Func1") { InformationalOnly = true };
2085
var needsProcessing = new
FunctionCallContent
("callId1", "Func1") { InformationalOnly = false };
2086
var alreadyProcessed = new
FunctionCallContent
("callId2", "Func2") { InformationalOnly = true };
2161
return new ChatResponse(new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]));
2329
cloned.Add(new
FunctionCallContent
(fcc.CallId, fcc.Name, fcc.Arguments)
2389
[new
FunctionCallContent
("callId1", "FunctionA")])]);
2396
[new
FunctionCallContent
("callId2", "FunctionB")])]);
2412
[new
FunctionCallContent
("callId1", "FunctionA")]);
2418
[new
FunctionCallContent
("callId2", "FunctionB")]);
2483
[new
FunctionCallContent
("callId1", "FunctionA")])]);
2490
[new
FunctionCallContent
("callId2", "FunctionB")])]);
2506
[new
FunctionCallContent
("callId1", "FunctionA")]);
2512
[new
FunctionCallContent
("callId2", "FunctionB")]);
2590
[new
FunctionCallContent
("callId1", "FunctionA")])]);
2596
[new
FunctionCallContent
("callId2", "FunctionB")])]);
2611
[new
FunctionCallContent
("callId1", "FunctionA")]);
2617
[new
FunctionCallContent
("callId2", "FunctionB")]);
2688
[new
FunctionCallContent
("callId1", "FunctionA")])]);
2696
[new
FunctionCallContent
("callId2", "FunctionB"),
2697
new
FunctionCallContent
("callId3", "AdditionalTool")])]);
2712
[new
FunctionCallContent
("callId1", "FunctionA")]);
2718
[new
FunctionCallContent
("callId2", "FunctionB"),
2719
new
FunctionCallContent
("callId3", "AdditionalTool")]);
2792
[new
FunctionCallContent
("callId1", "FunctionA")])]);
2798
[new
FunctionCallContent
("callId2", "SharedName")])]);
2813
[new
FunctionCallContent
("callId1", "FunctionA")]);
2819
[new
FunctionCallContent
("callId2", "SharedName")]);
2890
[new
FunctionCallContent
($"callId{callCount}", "FunctionA")])]);
2905
[new
FunctionCallContent
($"callId{callCount}", "FunctionA")]);
2968
[new
FunctionCallContent
("callId1", "FunctionA")])]);
2976
[new
FunctionCallContent
("callId2", "FunctionB")])]);
2991
[new
FunctionCallContent
("callId1", "FunctionA")]);
2997
[new
FunctionCallContent
("callId2", "FunctionB")]);
3069
[new
FunctionCallContent
("callId1", "FunctionA")])]);
3077
[new
FunctionCallContent
("callId2", "FunctionB")])]);
3092
[new
FunctionCallContent
("callId1", "FunctionA")]);
3098
[new
FunctionCallContent
("callId2", "FunctionB")]);
3175
[new
FunctionCallContent
("callId1", "FunctionA")])]);
3183
[new
FunctionCallContent
("callId2", "FunctionB")])]);
3198
[new
FunctionCallContent
("callId1", "FunctionA")]);
3204
[new
FunctionCallContent
("callId2", "FunctionB")]);
3258
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "UnknownFunc")]),
3288
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
3324
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "TerminatingFunc")]),
3353
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
3362
new ToolApprovalRequestContent("ficc_callId1", new
FunctionCallContent
("callId1", "Func1"))
3398
new ToolApprovalRequestContent("ficc_callId1", new
FunctionCallContent
("callId1", "Func1"))
3402
new ToolApprovalResponseContent("ficc_callId1", true, new
FunctionCallContent
("callId1", "Func1"))
3435
new ToolApprovalRequestContent("ficc_callId1", new
FunctionCallContent
("callId1", "Func1"))
3439
new ToolApprovalResponseContent("ficc_callId1", false, new
FunctionCallContent
("callId1", "Func1")) { Reason = "User denied" }
3474
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
3482
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
3538
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2")]),
3553
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2")]),
3607
return new ChatResponse(new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]));
3618
var response = new ChatResponse(new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]));
ChatCompletion\ImageGeneratingChatClientTests.cs (8)
317
[new
FunctionCallContent
(callId, "GenerateImage", new Dictionary<string, object?> { ["prompt"] = "a cat" })]);
360
[new
FunctionCallContent
(callId, "GenerateImage", new Dictionary<string, object?> { ["prompt"] = "a cat" })]);
405
"at-start" => [new
FunctionCallContent
(imageCallId, "GenerateImage", new Dictionary<string, object?> { ["prompt"] = "a cat" }),
408
new
FunctionCallContent
(imageCallId, "GenerateImage", new Dictionary<string, object?> { ["prompt"] = "a cat" })],
410
new
FunctionCallContent
(imageCallId, "GenerateImage", new Dictionary<string, object?> { ["prompt"] = "a cat" }),
480
"at-start" => [new
FunctionCallContent
(imageCallId, "GenerateImage", new Dictionary<string, object?> { ["prompt"] = "a cat" }),
483
new
FunctionCallContent
(imageCallId, "GenerateImage", new Dictionary<string, object?> { ["prompt"] = "a cat" })],
485
new
FunctionCallContent
(imageCallId, "GenerateImage", new Dictionary<string, object?> { ["prompt"] = "a cat" }),
ChatCompletion\OpenTelemetryChatClientTests.cs (4)
116
new(ChatRole.Assistant, [new
FunctionCallContent
("12345", "GetPersonName")]),
408
new
FunctionCallContent
("call-123", "GetWeather", new Dictionary<string, object?> { ["location"] = "Seattle" }),
424
yield return new() { Contents = [new
FunctionCallContent
("call-123", "GetWeather", new Dictionary<string, object?> { ["location"] = "Seattle" })] };
450
new(ChatRole.Assistant, [new
FunctionCallContent
("call-456", "SearchFiles")]),
ChatReduction\MessageCountingChatReducerTests.cs (3)
128
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("call1", "get_weather", new Dictionary<string, object?> { ["location"] = "Seattle" })]),
223
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("call1", "func", null)]),
225
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("call2", "func", null)]),
ChatReduction\SummarizingChatReducerTests.cs (3)
99
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("call1", "get_weather"), new TestInputRequestContent("uir1")]),
188
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("call1", "get_weather", new Dictionary<string, object?> { ["location"] = "Seattle" }), new TestInputRequestContent("uir2")]),
193
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("call2", "get_weather", new Dictionary<string, object?> { ["location"] = "New York" })]),
Generated\361d1da7f942c932\TestJsonSerializerContext.FunctionCallContent.g.cs (1)
32
ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.
FunctionCallContent
((string)args[0], (string)args[1], (global::System.Collections.Generic.IDictionary<string, object>)args[2]),
Realtime\FunctionInvokingRealtimeClientTests.cs (3)
481
new
FunctionCallContent
("call_a", "slow_func"),
482
new
FunctionCallContent
("call_b", "slow_func"),
641
var functionCallContent = new
FunctionCallContent
(callId, functionName, arguments);
Realtime\OpenTelemetryRealtimeClientTests.cs (1)
602
[new
FunctionCallContent
("call_123", "search", new Dictionary<string, object?> { ["query"] = "test" })],