38 references to FunctionResultContent
Microsoft.Extensions.AI (1)
ChatCompletion\FunctionInvokingChatClient.cs (1)
615
return new
FunctionResultContent
(result.CallContent.CallId, result.CallContent.Name, functionResult) { Exception = result.Exception };
Microsoft.Extensions.AI.Abstractions.Tests (9)
ChatCompletion\ChatCompletionTests.cs (1)
252
new
FunctionResultContent
("call123", "name", 42),
ChatCompletion\ChatMessageTests.cs (2)
132
new
FunctionResultContent
("callId1", "fc2", "result"),
289
new
FunctionResultContent
("function-id", "plugin-name-function-name", "function-result"),
ChatCompletion\StreamingChatCompletionUpdateTests.cs (1)
99
new
FunctionResultContent
("callId1", "fc2", "result"),
Contents\FunctionResultContentTests.cs (5)
15
FunctionResultContent c =
new
("callId1", "functionName", null);
27
FunctionResultContent c =
new
("id", "name", "result");
39
FunctionResultContent c =
new
("callId1", "functionName", null);
69
var sut = new
FunctionResultContent
("id", "p1-f1", "result");
87
var sut = new
FunctionResultContent
("callId1", "functionName", null) { Exception = new InvalidOperationException("hello") };
Microsoft.Extensions.AI.Ollama.Tests (1)
OllamaChatClientTests.cs (1)
461
new(ChatRole.Tool, [new
FunctionResultContent
("abcd1234", "GetPersonAge", 42)]),
Microsoft.Extensions.AI.OpenAI.Tests (2)
OpenAIChatClientTests.cs (2)
897
new
FunctionResultContent
("12345", "SayHello", "Said hello"),
898
new
FunctionResultContent
("12346", "SayHi", "Said hi"),
Microsoft.Extensions.AI.Tests (25)
ChatCompletion\FunctionInvokingChatClientTests.cs (24)
59
new ChatMessage(ChatRole.Tool, [new
FunctionResultContent
("callId1", "Func1", result: "Result 1")]),
61
new ChatMessage(ChatRole.Tool, [new
FunctionResultContent
("callId2", "Func2", result: "Result 2: 42")]),
63
new ChatMessage(ChatRole.Tool, [new
FunctionResultContent
("callId3", "VoidReturn", result: "Success: Function completed.")]),
97
new
FunctionResultContent
("callId1", "Func1", result: "Result 1"),
98
new
FunctionResultContent
("callId2", "Func2", result: "Result 2: 34"),
99
new
FunctionResultContent
("callId3", "Func2", result: "Result 2: 56"),
108
new
FunctionResultContent
("callId4", "Func2", result: "Result 2: 78"),
109
new
FunctionResultContent
("callId5", "Func1", result: "Result 1")
148
new
FunctionResultContent
("callId1", "Func", result: "hellohello"),
149
new
FunctionResultContent
("callId2", "Func", result: "worldworld"),
191
new
FunctionResultContent
("callId1", "Func", result: "hellohello"),
192
new
FunctionResultContent
("callId2", "Func", result: "worldworld"),
221
new ChatMessage(ChatRole.Tool, [new
FunctionResultContent
("callId1", "Func1", result: "Result 1")]),
223
new ChatMessage(ChatRole.Tool, [new
FunctionResultContent
("callId2", "Func2", result: "Result 2: 42")]),
225
new ChatMessage(ChatRole.Tool, [new
FunctionResultContent
("callId3", "VoidReturn", result: "Success: Function completed.")]),
273
new ChatMessage(ChatRole.Tool, [new
FunctionResultContent
("callId2", "Func1", result: "Result 1")]),
275
new ChatMessage(ChatRole.Tool, [new
FunctionResultContent
("callId2", "Func2", result: "Result 2: 42")]),
277
new ChatMessage(ChatRole.Tool, [new
FunctionResultContent
("callId3", "VoidReturn", result: "Success: Function completed.")]),
296
new ChatMessage(ChatRole.Tool, [new
FunctionResultContent
("callId2", "Func1", result: "Result 1")]),
298
new ChatMessage(ChatRole.Tool, [new
FunctionResultContent
("callId2", "Func2", result: "Result 2: 42")]),
300
new ChatMessage(ChatRole.Tool, [new
FunctionResultContent
("callId3", "VoidReturn", result: "Success: Function completed.")]),
339
new ChatMessage(ChatRole.Tool, [new
FunctionResultContent
("callId1", "Func1", result: detailedErrors ? "Error: Function failed. Exception: Oh no!" : "Error: Function failed.")]),
398
new ChatMessage(ChatRole.Tool, [new
FunctionResultContent
("callId1", "Func1", result: "Result 1")]),
454
new ChatMessage(ChatRole.Tool, [new
FunctionResultContent
("callId1", "Func1", result: "Result 1")]),
ChatCompletion\OpenTelemetryChatClientTests.cs (1)
103
new(ChatRole.Tool, [new
FunctionResultContent
("12345", "GetPersonName", "John")]),