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