38 instantiations of FunctionResultContent
Microsoft.Extensions.AI (1)
Microsoft.Extensions.AI.Abstractions.Tests (9)
Contents\FunctionResultContentTests.cs (5)
15FunctionResultContent c = new("callId1", "functionName", null);
27FunctionResultContent c = new("id", "name", "result");
39FunctionResultContent c = new("callId1", "functionName", null);
69var sut = new FunctionResultContent("id", "p1-f1", "result");
87var sut = new FunctionResultContent("callId1", "functionName", null) { Exception = new InvalidOperationException("hello") };
Microsoft.Extensions.AI.Ollama.Tests (1)
Microsoft.Extensions.AI.OpenAI.Tests (2)
Microsoft.Extensions.AI.Tests (25)
ChatCompletion\FunctionInvokingChatClientTests.cs (24)
59new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", "Func1", result: "Result 1")]),
61new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId2", "Func2", result: "Result 2: 42")]),
63new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId3", "VoidReturn", result: "Success: Function completed.")]),
97new FunctionResultContent("callId1", "Func1", result: "Result 1"),
98new FunctionResultContent("callId2", "Func2", result: "Result 2: 34"),
99new FunctionResultContent("callId3", "Func2", result: "Result 2: 56"),
108new FunctionResultContent("callId4", "Func2", result: "Result 2: 78"),
109new FunctionResultContent("callId5", "Func1", result: "Result 1")
148new FunctionResultContent("callId1", "Func", result: "hellohello"),
149new FunctionResultContent("callId2", "Func", result: "worldworld"),
191new FunctionResultContent("callId1", "Func", result: "hellohello"),
192new FunctionResultContent("callId2", "Func", result: "worldworld"),
221new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", "Func1", result: "Result 1")]),
223new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId2", "Func2", result: "Result 2: 42")]),
225new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId3", "VoidReturn", result: "Success: Function completed.")]),
273new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId2", "Func1", result: "Result 1")]),
275new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId2", "Func2", result: "Result 2: 42")]),
277new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId3", "VoidReturn", result: "Success: Function completed.")]),
296new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId2", "Func1", result: "Result 1")]),
298new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId2", "Func2", result: "Result 2: 42")]),
300new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId3", "VoidReturn", result: "Success: Function completed.")]),
339new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", "Func1", result: detailedErrors ? "Error: Function failed. Exception: Oh no!" : "Error: Function failed.")]),
398new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", "Func1", result: "Result 1")]),
454new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", "Func1", result: "Result 1")]),
34 references to FunctionResultContent
Microsoft.Extensions.AI (6)
Microsoft.Extensions.AI.Abstractions (2)
Microsoft.Extensions.AI.Abstractions.Tests (12)
Contents\FunctionResultContentTests.cs (9)
15FunctionResultContent c = new("callId1", "functionName", null);
27FunctionResultContent c = new("id", "name", "result");
39FunctionResultContent c = new("callId1", "functionName", null);
69var sut = new FunctionResultContent("id", "p1-f1", "result");
74var deserializedSut = JsonSerializer.Deserialize<FunctionResultContent>(json, TestJsonSerializerContext.Default.Options);
87var sut = new FunctionResultContent("callId1", "functionName", null) { Exception = new InvalidOperationException("hello") };
91var 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 (10)