60 references to FunctionCallContent
Microsoft.Extensions.AI (1)
ChatCompletion\FunctionInvocationContext.cs (1)
54
get => _callContent ??=
new
(string.Empty, _nopFunction.Name, EmptyReadOnlyDictionary<string, object?>.Instance);
Microsoft.Extensions.AI.Abstractions (1)
Contents\FunctionCallContent.cs (1)
97
return new
FunctionCallContent
(callId, name, arguments)
Microsoft.Extensions.AI.Abstractions.Tests (9)
ChatCompletion\ChatMessageTests.cs (2)
146
new
FunctionCallContent
("callId1", "fc1"),
255
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\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 };
SpeechToText\SpeechToTextResponseUpdateTests.cs (1)
65
new
FunctionCallContent
("callId1", "fc1"),
Microsoft.Extensions.AI.AzureAIInference.Tests (1)
AzureAIInferenceChatClientTests.cs (1)
990
new(ChatRole.Assistant, [new
FunctionCallContent
("abcd123", "GetMood")]),
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 (4)
OpenAIChatClientTests.cs (2)
1454
new
FunctionCallContent
("12345", "SayHello"),
1455
new
FunctionCallContent
("12346", "SayHi"),
OpenAIConversionTests.cs (2)
92
new
FunctionCallContent
("callid123", "SomeFunction", new Dictionary<string, object?>
144
new
FunctionCallContent
("callid123", "SomeFunction", new Dictionary<string, object?>
Microsoft.Extensions.AI.Tests (43)
ChatCompletion\DistributedCachingChatClientTest.cs (4)
51
Contents = [new
FunctionCallContent
("someCallId", "functionName", new Dictionary<string, object?>
254
new
FunctionCallContent
("someCallId", "someFn", new Dictionary<string, object?> { ["arg1"] = "value1" }),
265
Contents = [new
FunctionCallContent
("someCallId", "someFn", new Dictionary<string, object?> { ["arg1"] = "value1" })],
315
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\FunctionInvokingChatClientTests.cs (37)
88
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
90
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
92
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId3", "VoidReturn", arguments: new Dictionary<string, object?> { { "i", 43 } })]),
121
new
FunctionCallContent
("callId1", "Func1"),
122
new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 34 } }),
123
new
FunctionCallContent
("callId3", "Func2", arguments: new Dictionary<string, object?> { { "i", 56 } }),
133
new
FunctionCallContent
("callId4", "Func2", arguments: new Dictionary<string, object?> { { "i", 78 } }),
134
new
FunctionCallContent
("callId5", "Func1")
181
new
FunctionCallContent
("callId1", "Func", arguments: new Dictionary<string, object?> { { "arg", "hello" } }),
182
new
FunctionCallContent
("callId2", "Func", arguments: new Dictionary<string, object?> { { "arg", "world" } }),
225
new
FunctionCallContent
("callId1", "Func", arguments: new Dictionary<string, object?> { { "arg", "hello" } }),
226
new
FunctionCallContent
("callId2", "Func", arguments: new Dictionary<string, object?> { { "arg", "world" } }),
257
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
259
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
261
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId3", "VoidReturn", arguments: new Dictionary<string, object?> { { "i", 43 } })]),
306
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
($"callId0", "VoidReturn")]),
314
plan.Add(new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
($"callId{(i + 1)}", "VoidReturn")]));
456
assistantMessage.Contents.Add(new
FunctionCallContent
(callId, "Func",
480
new ChatMessage(ChatRole.Assistant, [new TextContent("extra"), new
FunctionCallContent
("callId1", "Func1"), new TextContent("stuff")]),
482
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
484
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId3", "VoidReturn", arguments: new Dictionary<string, object?> { { "i", 43 } }), new TextContent("more")]),
517
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
539
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1", new Dictionary<string, object?> { ["arg1"] = "value1" })]),
595
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1", new Dictionary<string, object?> { ["arg1"] = "value1" })]),
670
new() { Contents = [new
FunctionCallContent
("callId1", "Func1", new Dictionary<string, object?> { ["text"] = "Input 1" })] },
671
new() { Contents = [new
FunctionCallContent
("callId2", "Func1", new Dictionary<string, object?> { ["text"] = "Input 2" })] }
723
new(ChatRole.Assistant, [new
FunctionCallContent
($"callId{chatContents.Count()}", "Func1")]) :
772
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1", new Dictionary<string, object?> { ["i"] = 41 })]),
774
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId2", "Func1", new Dictionary<string, object?> { ["i"] = 42 })]),
782
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId3", "Func1", new Dictionary<string, object?> { ["i"] = 43 })]),
842
new
FunctionCallContent
("callId1", "Search"),
843
new
FunctionCallContent
("callId2", "Search", new Dictionary<string, object?> { { "result", "birds" } }),
844
new
FunctionCallContent
("callId3", "Search"),
890
return new ChatResponse(new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId-abc", "Func1")]))
928
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1", new Dictionary<string, object?> { ["arg1"] = "value1" })]),
958
new
FunctionCallContent
("callId1", "Func1", new Dictionary<string, object?> { ["arg"] = "value1" }),
959
new
FunctionCallContent
("callId2", "Func1", new Dictionary<string, object?> { ["arg"] = "value2" }),
ChatCompletion\OpenTelemetryChatClientTests.cs (1)
112
new(ChatRole.Assistant, [new
FunctionCallContent
("12345", "GetPersonName")]),