31 instantiations of FunctionResultContent
Microsoft.Extensions.AI (1)
Microsoft.Extensions.AI.Abstractions.Tests (9)
Contents\FunctionResultContentTests.cs (6)
15FunctionResultContent c = new("callId1", "functionName", null);
30FunctionResultContent c = new("id", "name", "result", e);
45FunctionResultContent c = new(new FunctionCallContent("id", "name"), "result", e);
57FunctionResultContent c = new("callId1", "functionName", null);
91var sut = new FunctionResultContent(new FunctionCallContent("id", "p1-f1"), "result");
109var sut = new FunctionResultContent("callId1", "functionName", null, new InvalidOperationException("hello"));
Microsoft.Extensions.AI.Ollama.Tests (1)
Microsoft.Extensions.AI.Tests (20)
ChatCompletion\FunctionInvokingChatClientTests.cs (19)
43new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", "Func1", result: "Result 1")]),
45new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId2", "Func2", result: "Result 2: 42")]),
47new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId3", "VoidReturn", result: "Success: Function completed.")]),
72new FunctionResultContent("callId1", "Func1", result: "Result 1"),
73new FunctionResultContent("callId2", "Func2", result: "Result 2: 34"),
74new FunctionResultContent("callId3", "Func2", result: "Result 2: 56"),
80new FunctionResultContent("callId4", "Func2", result: "Result 2: 78"),
81new FunctionResultContent("callId5", "Func1", result: "Result 1")]),
109new FunctionResultContent("callId1", "Func", result: "hellohello"),
110new FunctionResultContent("callId2", "Func", result: "worldworld"),
142new FunctionResultContent("callId1", "Func", result: "hellohello"),
143new FunctionResultContent("callId2", "Func", result: "worldworld"),
170new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", "Func1", result: "Result 1")]),
172new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId2", "Func2", result: "Result 2: 42")]),
174new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId3", "VoidReturn", result: "Success: Function completed.")]),
217new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId2", "Func1", result: "Result 1")]),
219new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId2", "Func2", result: "Result 2: 42")]),
221new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId3", "VoidReturn", result: "Success: Function completed.")]),
262new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", "Func1", result: detailedErrors ? "Error: Function failed. Exception: Oh no!" : "Error: Function failed.")]),
30 references to FunctionResultContent
Microsoft.Extensions.AI (6)
Microsoft.Extensions.AI.Abstractions (4)
Microsoft.Extensions.AI.Abstractions.Tests (12)
Contents\FunctionResultContentTests.cs (10)
15FunctionResultContent c = new("callId1", "functionName", null);
30FunctionResultContent c = new("id", "name", "result", e);
45FunctionResultContent c = new(new FunctionCallContent("id", "name"), "result", e);
57FunctionResultContent c = new("callId1", "functionName", null);
91var sut = new FunctionResultContent(new FunctionCallContent("id", "p1-f1"), "result");
96var deserializedSut = JsonSerializer.Deserialize<FunctionResultContent>(json, TestJsonSerializerContext.Default.Options);
109var sut = new FunctionResultContent("callId1", "functionName", null, new InvalidOperationException("hello"));
113var deserializedSut = JsonSerializer.Deserialize<FunctionResultContent>(json, TestJsonSerializerContext.Default.Options);
Microsoft.Extensions.AI.AzureAIInference (1)
Microsoft.Extensions.AI.Integration.Tests (1)
Microsoft.Extensions.AI.Ollama (1)
Microsoft.Extensions.AI.OpenAI (1)
Microsoft.Extensions.AI.Tests (4)