42 references to FunctionCallContent
Microsoft.Extensions.AI.Abstractions (1)
Contents\FunctionCallContent.cs (1)
93
return new
FunctionCallContent
(callId, name, arguments)
Microsoft.Extensions.AI.Abstractions.Tests (15)
ChatCompletion\ChatMessageTests.cs (5)
128
new
FunctionCallContent
("callId1", "fc1"),
131
new FunctionResultContent(new
FunctionCallContent
("callId1", "fc2"), "result"),
167
new
FunctionCallContent
("callId1", "fc1"),
293
new
FunctionCallContent
("function-id", "plugin-name-function-name", new Dictionary<string, object?> { ["parameter"] = "argument" }),
294
new FunctionResultContent(new
FunctionCallContent
("function-id", "plugin-name-function-name"), "function-result"),
ChatCompletion\StreamingChatCompletionUpdateTests.cs (4)
96
new
FunctionCallContent
("callId1", "fc1"),
99
new FunctionResultContent(new
FunctionCallContent
("callId1", "fc2"), "result"),
141
new
FunctionCallContent
("callId1", "fc1"),
173
new
FunctionCallContent
("callId1", "fc1"),
Contents\FunctionCallContentTests..cs (4)
21
FunctionCallContent c =
new
("callId1", "name");
39
FunctionCallContent c =
new
("id", "name", args);
53
FunctionCallContent c =
new
("callId1", "name");
89
var sut = new
FunctionCallContent
("callId1", "functionName", new Dictionary<string, object?> { ["key"] = "value" }) { Exception = ex };
Contents\FunctionResultContentTests.cs (2)
45
FunctionResultContent c = new(new
FunctionCallContent
("id", "name"), "result", e);
91
var sut = new FunctionResultContent(new
FunctionCallContent
("id", "p1-f1"), "result");
Microsoft.Extensions.AI.Integration.Tests (1)
PromptBasedFunctionCallingChatClient.cs (1)
113
message.Contents.Add(new
FunctionCallContent
(id, toolCallParsed.Name!, toolCallParsed.Arguments is { } args ? new ReadOnlyDictionary<string, object?>(args) : null));
Microsoft.Extensions.AI.Ollama (1)
OllamaChatClient.cs (1)
214
contents.Add(new
FunctionCallContent
(id, function.Name, function.Arguments));
Microsoft.Extensions.AI.Ollama.Tests (1)
OllamaChatClientTests.cs (1)
445
new(ChatRole.Assistant, [new
FunctionCallContent
("abcd1234", "GetPersonAge", new Dictionary<string, object?> { ["personName"] = "Alice" })]),
Microsoft.Extensions.AI.Tests (23)
ChatCompletion\DistributedCachingChatClientTest.cs (1)
46
Contents = [new
FunctionCallContent
("someCallId", "functionName", new Dictionary<string, object?>
ChatCompletion\FunctionInvokingChatClientTests.cs (21)
42
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
44
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
46
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId3", "VoidReturn", arguments: new Dictionary<string, object?> { { "i", 43 } })]),
67
new
FunctionCallContent
("callId1", "Func1"),
68
new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 34 } }),
69
new
FunctionCallContent
("callId3", "Func2", arguments: new Dictionary<string, object?> { { "i", 56 } }),
77
new
FunctionCallContent
("callId4", "Func2", arguments: new Dictionary<string, object?> { { "i", 78 } }),
78
new
FunctionCallContent
("callId5", "Func1")]),
105
new
FunctionCallContent
("callId1", "Func", arguments: new Dictionary<string, object?> { { "arg", "hello" } }),
106
new
FunctionCallContent
("callId2", "Func", arguments: new Dictionary<string, object?> { { "arg", "world" } }),
138
new
FunctionCallContent
("callId1", "Func", arguments: new Dictionary<string, object?> { { "arg", "hello" } }),
139
new
FunctionCallContent
("callId2", "Func", arguments: new Dictionary<string, object?> { { "arg", "world" } }),
169
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
171
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
173
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId3", "VoidReturn", arguments: new Dictionary<string, object?> { { "i", 43 } })]),
216
new ChatMessage(ChatRole.Assistant, [new TextContent("extra"), new
FunctionCallContent
("callId1", "Func1"), new TextContent("stuff")]),
218
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId2", "Func2", arguments: new Dictionary<string, object?> { { "i", 42 } })]),
220
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId3", "VoidReturn", arguments: new Dictionary<string, object?> { { "i", 43 } }), new TextContent("more")]),
261
new ChatMessage(ChatRole.Assistant, [new
FunctionCallContent
("callId1", "Func1")]),
281
new(ChatRole.Assistant, [new
FunctionCallContent
("callId1", func1.Metadata.Name)]),
282
new(ChatRole.Assistant, [new
FunctionCallContent
("callId2", func2.Metadata.Name)]),
ChatCompletion\OpenTelemetryChatClientTests.cs (1)
101
new(ChatRole.Assistant, [new
FunctionCallContent
("12345", "GetPersonName")]),