233 references to FunctionCallContent
Microsoft.Extensions.AI.Abstractions (1)
Contents\FunctionCallContent.cs (1)
95
return new
FunctionCallContent
(callId, name, arguments)
Microsoft.Extensions.AI.Abstractions.Tests (24)
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\ChatResponseUpdateTests.cs (2)
94
new
FunctionCallContent
("callId1", "fc1"),
123
new
FunctionCallContent
("callId1", "fc1"),
Contents\AIContentTests.cs (3)
68
new
FunctionCallContent
("call123", "functionName", new Dictionary<string, object?> { { "param1", 123 } }),
73
new FunctionApprovalRequestContent("request123", new
FunctionCallContent
("call123", "functionName", new Dictionary<string, object?> { { "param1", 123 } })),
74
new FunctionApprovalResponseContent("request123", approved: true, new
FunctionCallContent
("call123", "functionName", new Dictionary<string, object?> { { "param1", 123 } })),
Contents\FunctionApprovalRequestContentTests.cs (5)
16
FunctionCallContent functionCall =
new
("FCC1", "TestFunction");
31
FunctionCallContent functionCall =
new
("FCC1", "TestFunction");
45
FunctionCallContent functionCall =
new
("FCC1", "TestFunction");
66
FunctionCallContent functionCall =
new
("FCC1", "TestFunction");
82
var content = new FunctionApprovalRequestContent("request123", new
FunctionCallContent
("call123", "functionName", new Dictionary<string, object?> { { "param1", 123 } }));
Contents\FunctionApprovalResponseContentTests.cs (3)
15
FunctionCallContent functionCall =
new
("FCC1", "TestFunction");
30
FunctionCallContent functionCall =
new
("FCC1", "TestFunction");
43
var content = new FunctionApprovalResponseContent("request123", true, new
FunctionCallContent
("call123", "functionName"))
Contents\FunctionCallContentTests.cs (4)
21
FunctionCallContent c =
new
("callId1", "name");
38
FunctionCallContent c =
new
("id", "name", args);
51
FunctionCallContent c =
new
("callId1", "name");
81
var sut = new
FunctionCallContent
("callId1", "functionName", new Dictionary<string, object?> { ["key"] = "value" }) { Exception = ex };
Contents\UserInputRequestContentTests.cs (2)
36
UserInputRequestContent content = new FunctionApprovalRequestContent("request123", new
FunctionCallContent
("call123", "functionName", new Dictionary<string, object?> { { "param1", 123 } }));
44
new FunctionApprovalRequestContent("request123", new
FunctionCallContent
("call123", "functionName", new Dictionary<string, object?> { { "param1", 123 } })),
Contents\UserInputResponseContentTests.cs (2)
34
UserInputResponseContent content = new FunctionApprovalResponseContent("request123", true, new
FunctionCallContent
("call123", "functionName"));
42
new FunctionApprovalResponseContent("request123", true, new
FunctionCallContent
("call123", "functionName")),
SpeechToText\SpeechToTextResponseUpdateTests.cs (1)
64
new
FunctionCallContent
("callId1", "fc1"),
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.Tests (12)
OpenAIChatClientTests.cs (2)
1469
new
FunctionCallContent
("12345", "SayHello"),
1470
new
FunctionCallContent
("12346", "SayHi"),
OpenAIConversionTests.cs (10)
601
new
FunctionCallContent
("callid123", "SomeFunction", new Dictionary<string, object?>
670
new
FunctionCallContent
("callid123", "SomeFunction", new Dictionary<string, object?>
910
new
FunctionCallContent
("call123", "TestFunction", new Dictionary<string, object?> { ["param"] = "value" })
1015
new
FunctionCallContent
("process_data", "ProcessComplexData", complexArgs)
1198
var functionCallContent = new
FunctionCallContent
("call-123", "GetWeather", new Dictionary<string, object?>
1236
var functionCall1 = new
FunctionCallContent
("call-1", "Function1", new Dictionary<string, object?> { ["param1"] = "value1" });
1237
var functionCall2 = new
FunctionCallContent
("call-2", "Function2", new Dictionary<string, object?> { ["param2"] = "value2" });
1270
new
FunctionCallContent
("call-123", "GetWeather", new Dictionary<string, object?> { ["location"] = "Seattle" }),
1512
new
FunctionCallContent
("call-123", "TestFunction", new Dictionary<string, object?> { ["param"] = "value" })
1547
new
FunctionCallContent
("call-456", "GetWeather", new Dictionary<string, object?> { ["location"] = "Seattle" })
Microsoft.Extensions.AI.Tests (195)
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 (122)
41
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
48
new FunctionApprovalRequestContent("callId1", new
FunctionCallContent
("callId1", "Func1")),
49
new FunctionApprovalRequestContent("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 FunctionApprovalRequestContent("callId1", new
FunctionCallContent
("callId1", "Func1")),
85
new FunctionApprovalRequestContent("callId2", new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
121
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
128
new FunctionApprovalRequestContent("callId1", new
FunctionCallContent
("callId1", "Func1")),
129
new FunctionApprovalRequestContent("callId2", new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
155
new FunctionApprovalRequestContent("callId1", new
FunctionCallContent
("callId1", "Func1")),
156
new FunctionApprovalRequestContent("callId2", new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
160
new FunctionApprovalResponseContent("callId1", true, new
FunctionCallContent
("callId1", "Func1")),
161
new FunctionApprovalResponseContent("callId2", true, new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
168
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
179
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
207
new FunctionApprovalRequestContent("callId1", new
FunctionCallContent
("callId1", "Func1")),
208
new FunctionApprovalRequestContent("callId2", new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
212
new FunctionApprovalResponseContent("callId1", true, new
FunctionCallContent
("callId1", "Func1")),
213
new FunctionApprovalResponseContent("callId2", true, new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
221
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
232
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
259
new FunctionApprovalRequestContent("callId1", new
FunctionCallContent
("callId1", "Func1")),
263
new FunctionApprovalRequestContent("callId2", new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
267
new FunctionApprovalResponseContent("callId1", true, new
FunctionCallContent
("callId1", "Func1")),
271
new FunctionApprovalResponseContent("callId2", true, new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
278
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]) { MessageId = "resp1" },
279
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]) { MessageId = "resp2" },
290
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]) { MessageId = "resp1" },
291
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]) { MessageId = "resp2" },
318
new FunctionApprovalRequestContent("callId1", new
FunctionCallContent
("callId1", "Func1")),
319
new FunctionApprovalRequestContent("callId2", new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
323
new FunctionApprovalResponseContent("callId1", false, new
FunctionCallContent
("callId1", "Func1")),
324
new FunctionApprovalResponseContent("callId2", false, new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
331
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
346
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
377
new FunctionApprovalRequestContent("callId1", new
FunctionCallContent
("callId1", "Func1")),
378
new FunctionApprovalRequestContent("callId2", new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
382
new FunctionApprovalResponseContent("callId1", false, new
FunctionCallContent
("callId1", "Func1")),
383
new FunctionApprovalResponseContent("callId2", true, new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
390
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
402
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
410
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
441
new FunctionApprovalRequestContent("callId1", new
FunctionCallContent
("callId1", "Func1")),
442
new FunctionApprovalRequestContent("callId2", new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
446
new FunctionApprovalResponseContent("callId1", false, new
FunctionCallContent
("callId1", "Func1"))
450
new FunctionApprovalResponseContent("callId2", false, new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
460
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
475
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
507
new FunctionApprovalRequestContent("callId1", new
FunctionCallContent
("callId1", "Func1")),
508
new FunctionApprovalRequestContent("callId2", new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })),
509
new FunctionApprovalRequestContent("callId3", new
FunctionCallContent
("callId3", "Func3", arguments: new Dictionary<string, object?> { { "s", "test" } }))
513
new FunctionApprovalResponseContent("callId1", false, new
FunctionCallContent
("callId1", "Func1")) { Reason = "Custom rejection for Func1" },
514
new FunctionApprovalResponseContent("callId2", false, new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })),
515
new FunctionApprovalResponseContent("callId3", true, new
FunctionCallContent
("callId3", "Func3", arguments: new Dictionary<string, object?> { { "s", "test" } }))
524
new
FunctionCallContent
("callId1", "Func1"),
525
new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }),
526
new
FunctionCallContent
("callId3", "Func3", arguments: new Dictionary<string, object?> { { "s", "test" } })
545
new
FunctionCallContent
("callId1", "Func1"),
546
new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }),
547
new
FunctionCallContent
("callId3", "Func3", arguments: new Dictionary<string, object?> { { "s", "test" } })
562
new
FunctionCallContent
("callId1", "Func1"),
563
new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }),
564
new
FunctionCallContent
("callId3", "Func3", arguments: new Dictionary<string, object?> { { "s", "test" } })
599
new FunctionApprovalRequestContent("callId1", new
FunctionCallContent
("callId1", "Func1")),
603
new FunctionApprovalResponseContent("callId1", false, new
FunctionCallContent
("callId1", "Func1"))
613
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
627
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
657
new FunctionApprovalRequestContent("callId1", new
FunctionCallContent
("callId1", "Func1")),
658
new FunctionApprovalRequestContent("callId2", new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
662
new FunctionApprovalResponseContent("callId1", true, new
FunctionCallContent
("callId1", "Func1")),
663
new FunctionApprovalResponseContent("callId2", true, new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
670
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
676
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 3 } })]),
681
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
685
new FunctionApprovalRequestContent("callId2", new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 3 } }))
711
new FunctionApprovalRequestContent("callId1", new
FunctionCallContent
("callId1", "Func1")),
712
new FunctionApprovalRequestContent("callId2", new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
716
new FunctionApprovalResponseContent("callId1", true, new
FunctionCallContent
("callId1", "Func1")),
717
new FunctionApprovalResponseContent("callId2", true, new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
719
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
723
new FunctionApprovalRequestContent("callId3", new
FunctionCallContent
("callId3", "Func1")),
727
new FunctionApprovalResponseContent("callId3", true, new
FunctionCallContent
("callId3", "Func1")),
734
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
736
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId3", "Func1")]),
747
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId3", "Func1")]),
791
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
800
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
810
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
837
new FunctionApprovalRequestContent("callId1", new
FunctionCallContent
("callId1", "Func1")),
867
new FunctionApprovalResponseContent("callId1", true, new
FunctionCallContent
("callId1", "Func1")),
868
new FunctionApprovalResponseContent("callId2", true, new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
875
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
886
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
913
new FunctionApprovalResponseContent("callId1", true, new
FunctionCallContent
("callId1", "Func1")),
914
new FunctionApprovalResponseContent("callId2", true, new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } }))
930
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1"), new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
975
yield return new ChatResponseUpdate(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]) { MessageId = messageId };
981
new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })
1052
yield return new ChatResponseUpdate(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]) { MessageId = messageId };
1057
new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })
1061
yield return new ChatResponseUpdate(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func3")]) { MessageId = messageId };
ChatCompletion\FunctionInvokingChatClientTests.cs (55)
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 } })]),
379
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
($"callId0", "VoidReturn")]),
387
plan.Add(new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
($"callId{(i + 1)}", "VoidReturn")]));
529
assistantMessage.Contents.Add(new
FunctionCallContent
(callId, "Func",
553
new ChatMessage(ChatRole.Assistant, [new TextContent("extra"), new
FunctionCallContent
("callId1", "Func1"), new TextContent("stuff")]),
555
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
557
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId3", "VoidReturn", arguments: new Dictionary<string, object?> { { "i", 43 } }), new TextContent("more")]),
590
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
612
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1", new Dictionary<string, object?> { ["arg1"] = "value1" })]),
669
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1", new Dictionary<string, object?> { ["arg1"] = "value1" })]),
761
new() { Contents = [new
FunctionCallContent
("callId1", "Func1", new Dictionary<string, object?> { ["text"] = "Input 1" })] },
762
new() { Contents = [new
FunctionCallContent
("callId2", "Func1", new Dictionary<string, object?> { ["text"] = "Input 2" })] }
814
new(ChatRole.Assistant, [new
FunctionCallContent
($"callId{chatContents.Count()}", "Func1")]) :
863
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1", new Dictionary<string, object?> { ["i"] = 41 })]),
865
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId2", "Func1", new Dictionary<string, object?> { ["i"] = 42 })]),
873
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId3", "Func1", new Dictionary<string, object?> { ["i"] = 43 })]),
933
new
FunctionCallContent
("callId1", "Search"),
934
new
FunctionCallContent
("callId2", "Search", new Dictionary<string, object?> { { "result", "birds" } }),
935
new
FunctionCallContent
("callId3", "Search"),
981
return new ChatResponse(new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId-abc", "Func1")]))
1019
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1", new Dictionary<string, object?> { ["arg1"] = "value1" })]),
1049
new
FunctionCallContent
("callId1", "Func1", new Dictionary<string, object?> { ["arg"] = "value1" }),
1050
new
FunctionCallContent
("callId2", "Func1", new Dictionary<string, object?> { ["arg"] = "value2" }),
1102
new
FunctionCallContent
("callId1", "UnknownFunc", new Dictionary<string, object?> { ["i"] = 1 }),
1103
new
FunctionCallContent
("callId2", "KnownFunc", new Dictionary<string, object?> { ["i"] = 2 })
1121
new
FunctionCallContent
("callId1", "UnknownFunc", new Dictionary<string, object?> { ["i"] = 1 }),
1122
new
FunctionCallContent
("callId2", "KnownFunc", new Dictionary<string, object?> { ["i"] = 2 })
1149
new(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "DefOnly")]),
1179
new
FunctionCallContent
("callId1", "Known"),
1180
new
FunctionCallContent
("callId2", "DefOnly")
1214
messages.Add(new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]));
1245
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
1291
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
1340
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1", new Dictionary<string, object?> { ["arg1"] = "secret" })]),
1412
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
ChatCompletion\ImageGeneratingChatClientTests.cs (2)
317
[new
FunctionCallContent
(callId, "GenerateImage", new Dictionary<string, object?> { ["prompt"] = "a cat" })]);
360
[new
FunctionCallContent
(callId, "GenerateImage", new Dictionary<string, object?> { ["prompt"] = "a cat" })]);
ChatCompletion\OpenTelemetryChatClientTests.cs (4)
109
new(ChatRole.Assistant, [new
FunctionCallContent
("12345", "GetPersonName")]),
357
new
FunctionCallContent
("call-123", "GetWeather", new Dictionary<string, object?> { ["location"] = "Seattle" }),
373
yield return new() { Contents = [new
FunctionCallContent
("call-123", "GetWeather", new Dictionary<string, object?> { ["location"] = "Seattle" })] };
399
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 TestUserInputRequestContent("uir1")]),
188
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("call1", "get_weather", new Dictionary<string, object?> { ["location"] = "Seattle" }), new TestUserInputRequestContent("uir2")]),
193
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("call2", "get_weather", new Dictionary<string, object?> { ["location"] = "New York" })]),