1 type derived from FunctionResultContent
Microsoft.Extensions.AI.Tests (1)
ChatCompletion\FunctionInvokingChatClientTests.cs (1)
605private sealed class DerivedFunctionResultContent : FunctionResultContent
150 instantiations of FunctionResultContent
Microsoft.Extensions.AI (2)
ChatCompletion\FunctionInvokingChatClient.cs (2)
1237return new FunctionResultContent(result.CallContent.CallId, functionResult) { Exception = result.Exception }; 1568return (AIContent)new FunctionResultContent(m.Response.FunctionCall.CallId, result);
Microsoft.Extensions.AI.Abstractions.Tests (10)
ChatCompletion\ChatMessageTests.cs (2)
151new FunctionResultContent("callId1", "result"), 272new FunctionResultContent("function-id", "function-result"),
ChatCompletion\ChatResponseUpdateTests.cs (1)
97new FunctionResultContent("callId1", "result"),
Contents\AIContentTests.cs (1)
69new FunctionResultContent("call123", "result data"),
Contents\FunctionResultContentTests.cs (5)
15FunctionResultContent c = new("callId1", null); 26FunctionResultContent c = new("id", "result"); 37FunctionResultContent c = new("callId1", null); 65var sut = new FunctionResultContent("id", "result"); 82var sut = new FunctionResultContent("callId1", null) { Exception = new InvalidOperationException("hello") };
SpeechToText\SpeechToTextResponseUpdateTests.cs (1)
67new FunctionResultContent("callId1", "result"),
Microsoft.Extensions.AI.OpenAI (2)
MicrosoftExtensionsAIChatExtensions.cs (1)
220resultMessage.Contents.Add(new FunctionResultContent(tcm.ToolCallId, ToToolResult(tcm.Content))
OpenAIResponsesChatClient.cs (1)
202message.Contents.Add(new FunctionResultContent(functionCallOutputItem.CallId, functionCallOutputItem.FunctionOutput) { RawRepresentation = functionCallOutputItem });
Microsoft.Extensions.AI.OpenAI.Tests (16)
OpenAIChatClientTests.cs (2)
1474new FunctionResultContent("12345", new TextContent("Said hello")), 1475new FunctionResultContent("12346", "Said hi"),
OpenAIConversionTests.cs (3)
607new(ChatRole.Tool, [new FunctionResultContent("callid123", "theresult")]), 676new(ChatRole.Tool, [new FunctionResultContent("callid123", "theresult")]), 1549new(ChatRole.Tool, [new FunctionResultContent("call-456", "The weather is sunny")]),
OpenAIResponseClientTests.cs (11)
3961new ChatMessage(ChatRole.Tool, [new FunctionResultContent("call_123", new TextContent("Result text"))]) 4018new FunctionResultContent("call_456", new List<AIContent> 4080new FunctionResultContent("call_789", new DataContent(imageData, "image/png")) 4137new FunctionResultContent("call_uri", new UriContent(new Uri("https://example.com/image.png"), "image/png")) 4194new FunctionResultContent("call_file", new HostedFileContent("file-abc123") { MediaType = "image/png", Name = "result.png" }) 4253new FunctionResultContent("call_mixed", new List<AIContent> 4316new FunctionResultContent("call_pdf", new DataContent(pdfData, "application/pdf") { Name = "report.pdf" }) 4371new FunctionResultContent("call_obj", new { name = "John", age = 30 }) 4426new FunctionResultContent("call_string", "Simple string result") 4483new FunctionResultContent("call_file_uri", new UriContent(new Uri("https://example.com/document.pdf"), "application/pdf")) 4540new FunctionResultContent("call_hosted_file", new HostedFileContent("file-xyz789") { MediaType = "text/plain", Name = "document.txt" })
Microsoft.Extensions.AI.Tests (120)
ChatCompletion\ChatClientStructuredOutputExtensionsTests.cs (1)
203new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callid123", "result")]),
ChatCompletion\FunctionInvokingChatClientApprovalsTests.cs (57)
169new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", result: "Result 1"), new FunctionResultContent("callId2", result: "Result 2: 42")]), 180new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", result: "Result 1"), new FunctionResultContent("callId2", result: "Result 2: 42")]), 222new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", result: "Result 1"), new FunctionResultContent("callId2", result: "Result 2: 42")]), 233new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", result: "Result 1"), new FunctionResultContent("callId2", result: "Result 2: 42")]), 280new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", result: "Result 1"), new FunctionResultContent("callId2", result: "Result 2: 42")]), 292new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", result: "Result 1"), new FunctionResultContent("callId2", result: "Result 2: 42")]), 334new FunctionResultContent("callId1", result: "Tool call invocation rejected."), 335new FunctionResultContent("callId2", result: "Tool call invocation rejected.") 349new FunctionResultContent("callId1", result: "Tool call invocation rejected."), 350new FunctionResultContent("callId2", result: "Tool call invocation rejected.") 391new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", result: "Tool call invocation rejected.")]), 392new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId2", result: "Result 2: 42")]), 403new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", result: "Tool call invocation rejected.")]), 404new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId2", result: "Result 2: 42")]), 413new FunctionResultContent("callId1", result: "Tool call invocation rejected."), 414new FunctionResultContent("callId2", result: "Result 2: 42") 463new FunctionResultContent("callId1", result: "Tool call invocation rejected. User denied permission for this operation"), 464new FunctionResultContent("callId2", result: "Tool call invocation rejected. Function Func2 is not allowed at this time") 478new FunctionResultContent("callId1", result: "Tool call invocation rejected. User denied permission for this operation"), 479new FunctionResultContent("callId2", result: "Tool call invocation rejected. Function Func2 is not allowed at this time") 530new FunctionResultContent("callId1", result: "Tool call invocation rejected. Custom rejection for Func1"), 531new FunctionResultContent("callId2", result: "Tool call invocation rejected.") 533new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId3", result: "Result 3: test")]), 551new FunctionResultContent("callId1", result: "Tool call invocation rejected. Custom rejection for Func1"), 552new FunctionResultContent("callId2", result: "Tool call invocation rejected.") 554new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId3", result: "Result 3: test")]), 568new FunctionResultContent("callId1", result: "Tool call invocation rejected. Custom rejection for Func1"), 569new FunctionResultContent("callId2", result: "Tool call invocation rejected."), 570new FunctionResultContent("callId3", result: "Result 3: test") 616new FunctionResultContent("callId1", result: "Tool call invocation rejected.") 630new FunctionResultContent("callId1", result: "Tool call invocation rejected.") 671new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", result: "Result 1"), new FunctionResultContent("callId2", result: "Result 2: 42")]), 682new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", result: "Result 1"), new FunctionResultContent("callId2", result: "Result 2: 42")]), 720new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", result: "Result 1"), new FunctionResultContent("callId2", result: "Result 2: 42")]), 735new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", result: "Result 1"), new FunctionResultContent("callId2", result: "Result 2: 42")]), 737new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId3", result: "Result 1")]), 748new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId3", result: "Result 1")]), 792new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId2", result: "Result 2: 42")]) 811new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId2", result: "Result 2: 42")]), 876new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", result: "Result 1"), new FunctionResultContent("callId2", result: "Result 2: 42")]), 887new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", result: "Result 1"), new FunctionResultContent("callId2", result: "Result 2: 42")]), 920new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", result: "Result 1"), new FunctionResultContent("callId2", result: "Result 2: 42")]), 931new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", result: "Result 1"), new FunctionResultContent("callId2", result: "Result 2: 42")]),
ChatCompletion\FunctionInvokingChatClientTests.cs (52)
95new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", result: "Result 1")]), 97new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId2", result: "Result 2: 42")]), 99new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId3", result: "Success: Function completed.")]), 129new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", result: "Result 1")]), 131new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId2", result: "Result 2: 42")]), 133new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId3", result: "Success: Function completed.")]), 162new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", result: "Result 1")]), 164new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId2", result: "Result 2: 42")]), 166new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId3", result: "Success: Function completed.")]), 200new FunctionResultContent("callId1", result: "Result 1"), 201new FunctionResultContent("callId2", result: "Result 2: 34"), 202new FunctionResultContent("callId3", result: "Result 2: 56"), 211new FunctionResultContent("callId4", result: "Result 2: 78"), 212new FunctionResultContent("callId5", result: "Result 1") 259new FunctionResultContent("callId1", result: "hellohello"), 260new FunctionResultContent("callId2", result: "worldworld"), 303new FunctionResultContent("callId1", result: "hellohello"), 304new FunctionResultContent("callId2", result: "worldworld"), 331new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", result: "Result 1 from delegate")]), 333new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId2", result: "Result 2: 42 from delegate")]), 335new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId3", result: "Success: Function completed.")]), 406returnedFrc = new FunctionResultContent(ctx.CallContent.CallId, "Custom result from function") 488returnedFrc = new FunctionResultContent("differentCallId", "Result from function"); 644plan.Add(new ChatMessage(ChatRole.Tool, [new FunctionResultContent($"callId{i}", result: "Success: Function completed.")])); 962toolMessage.Contents.Add(new FunctionResultContent(callId, result: callShouldThrow ? "Error: Function failed." : "Success")); 985new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId2", result: "Result 1")]), 987new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId2", result: "Result 2: 42")]), 989new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId3", result: "Success: Function completed.")]), 1022new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", result: detailedErrors ? "Error: Function failed. Exception: Oh no!" : "Error: Function failed.")]), 1044new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", result: "Result 1")]), 1101new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", result: "Result 1")]), 1295new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", result: "Result 41")]), 1297new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId2", result: "Result 42")]), 1305new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId3", result: "Result 43")]), 1451new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", result: "Result 1")]), 1485new FunctionResultContent("callId2", result: "value1"), 1486new FunctionResultContent("callId2", result: "value2") 1537new FunctionResultContent("callId1", result: "Error: Requested function \"UnknownFunc\" not found."), 1538new FunctionResultContent("callId2", result: "Known: 2") 1556new FunctionResultContent("callId1", result: "Error: Requested function \"UnknownFunc\" not found."), 1557new FunctionResultContent("callId2", result: "Known: 2") 1581new(ChatRole.Tool, [new FunctionResultContent("callId1", result: "Should not be produced")]), 1613new(ChatRole.Tool, [new FunctionResultContent("callId1", result: "OK"), new FunctionResultContent("callId2", result: "nope")]), 1680new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", result: "Result 1")]), 1729new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", result: "Result 1")]), 1769new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", result: "Result 1")]), 1818new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", result: "Result 1")]), 1890new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", result: "Result 1")]), 2970new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", result: "Error: Requested function \"UnknownFunc\" not found.")]), 3000new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", result: "Should not be produced")]), 3036new ChatMessage(ChatRole.Tool, [new FunctionResultContent("callId1", result: "Terminated")]),
ChatCompletion\OpenTelemetryChatClientTests.cs (4)
112new(ChatRole.Tool, [new FunctionResultContent("12345", "John")]), 361new FunctionResultContent("call-123", "72°F and sunny"), 377yield return new() { Contents = [new FunctionResultContent("call-123", "72°F and sunny")] }; 403new(ChatRole.Tool, [new FunctionResultContent("call-456", "Found 3 files")]),
ChatReduction\MessageCountingChatReducerTests.cs (3)
129new ChatMessage(ChatRole.Tool, [new FunctionResultContent("call1", "Sunny, 72°F")]), 224new ChatMessage(ChatRole.Tool, [new FunctionResultContent("call1", "result")]), 226new ChatMessage(ChatRole.Tool, [new FunctionResultContent("call2", "result")]),
ChatReduction\SummarizingChatReducerTests.cs (3)
100new ChatMessage(ChatRole.Tool, [new FunctionResultContent("call1", "Sunny")]), 189new ChatMessage(ChatRole.Tool, [new FunctionResultContent("call1", "Sunny, 72°F")]), 194new ChatMessage(ChatRole.Tool, [new FunctionResultContent("call2", "Rainy, 65°F")]),
96 references to FunctionResultContent
Microsoft.Extensions.AI (13)
ChatCompletion\FunctionInvokingChatClient.cs (9)
32/// in <see cref="ChatOptions.Tools"/> (or in <see cref="AdditionalTools"/>), producing a <see cref="FunctionResultContent"/> 39/// to pass back out to the caller. It is then that caller's responsibility to create the appropriate <see cref="FunctionResultContent"/> 123/// the <see cref="FunctionResultContent.Exception"/> property. 1073if (added.Any(static m => m.Contents.Any(static c => c is FunctionResultContent { Exception: not null }))) 1081.SelectMany(m => m.Contents.OfType<FunctionResultContent>()) 1204FunctionResultContent CreateFunctionResultContent(FunctionInvocationResult result) 1212if (result.Result is FunctionResultContent frc && 1383/// 3. Generate failed <see cref="FunctionResultContent"/> for any rejected <see cref="FunctionApprovalResponseContent"/>. 1476case FunctionResultContent frc:
ChatCompletion\ImageGeneratingChatClient.cs (1)
342else if (content is FunctionResultContent functionResult &&
ChatCompletion\OpenTelemetryChatClient.cs (1)
269case FunctionResultContent frc:
ChatReduction\MessageCountingChatReducer.cs (1)
57else if (!message.Contents.Any(m => m is FunctionCallContent or FunctionResultContent))
ChatReduction\SummarizingChatReducer.cs (1)
210or FunctionResultContent
Microsoft.Extensions.AI.Abstractions (2)
Contents\AIContent.cs (1)
14[JsonDerivedType(typeof(FunctionResultContent), typeDiscriminator: "functionResult")]
Contents\FunctionResultContent.cs (1)
19/// Initializes a new instance of the <see cref="FunctionResultContent"/> class.
Microsoft.Extensions.AI.Abstractions.Tests (14)
AssertExtensions.cs (3)
44else if (expectedItem is FunctionResultContent expectedFunctionResult) 46var chatFunctionResult = (FunctionResultContent)chatItem;
ChatCompletion\ChatMessageTests.cs (2)
334var functionResultContent = deserializedMessage.Contents[5] as FunctionResultContent;
Contents\FunctionResultContentTests.cs (9)
15FunctionResultContent c = new("callId1", null); 26FunctionResultContent c = new("id", "result"); 37FunctionResultContent c = new("callId1", null); 65var sut = new FunctionResultContent("id", "result"); 70var deserializedSut = JsonSerializer.Deserialize<FunctionResultContent>(json, TestJsonSerializerContext.Default.Options); 82var sut = new FunctionResultContent("callId1", null) { Exception = new InvalidOperationException("hello") }; 86var deserializedSut = JsonSerializer.Deserialize<FunctionResultContent>(json, TestJsonSerializerContext.Default.Options);
Microsoft.Extensions.AI.Evaluation.Quality (2)
ChatResponseExtensions.cs (2)
31if (content is FunctionCallContent or FunctionResultContent) 34content is FunctionCallContent ? typeof(FunctionCallContent) : typeof(FunctionResultContent);
Microsoft.Extensions.AI.Integration.Tests (1)
PromptBasedFunctionCallingChatClient.cs (1)
69if (message.Contents[itemIndex] is FunctionResultContent frc)
Microsoft.Extensions.AI.OpenAI (9)
OpenAIAssistantsChatClient.cs (7)
79(RunCreationOptions runOptions, ToolResources? toolResources, List<FunctionResultContent>? toolResults) = await CreateRunOptionsAsync(messages, options, cancellationToken).ConfigureAwait(false); 340private async ValueTask<(RunCreationOptions RunOptions, ToolResources? Resources, List<FunctionResultContent>? ToolResults)> CreateRunOptionsAsync( 506List<FunctionResultContent>? functionResults = null; 545case FunctionResultContent result when chatMessage.Role == ChatRole.Tool: 564/// <summary>Convert <see cref="FunctionResultContent"/> instances to <see cref="ToolOutput"/> instances.</summary> 568private static string? ConvertFunctionResultsToToolOutput(List<FunctionResultContent>? toolResults, out List<ToolOutput>? toolOutputs) 574foreach (var frc in toolResults)
OpenAIChatClient.cs (1)
168if (item is FunctionResultContent resultContent)
OpenAIResponsesChatClient.cs (1)
937case FunctionResultContent resultContent:
Microsoft.Extensions.AI.OpenAI.Tests (6)
OpenAIChatClientTests.cs (2)
1795var frc = Assert.IsType<FunctionResultContent>(Assert.Single(extMessages[0].Contents));
OpenAIConversionTests.cs (1)
867Assert.Equal("Function output", convertedMessages[3].Contents.OfType<FunctionResultContent>().First().Result);
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (3)
44else if (expectedItem is FunctionResultContent expectedFunctionResult) 46var chatFunctionResult = (FunctionResultContent)chatItem;
Microsoft.Extensions.AI.Tests (49)
ChatCompletion\FunctionInvokingChatClientTests.cs (39)
362FunctionResultContent? returnedFrc = null; 431var capturedFrc = Assert.Single(toolMessage.Contents.OfType<FunctionResultContent>()); 443FunctionResultContent? returnedFrc = null; 511var frc = Assert.Single(toolMessage.Contents.OfType<FunctionResultContent>()); 514var innerFrc = (FunctionResultContent)frc.Result!; 595var capturedFrc = Assert.Single(toolMessage.Contents.OfType<FunctionResultContent>()); 1001Assert.Contains(content, c => c is FunctionCallContent or FunctionResultContent); 1220c => Assert.Equal("Result for Input 1", Assert.IsType<FunctionResultContent>(c).Result?.ToString()), 1221c => Assert.Equal("Result for Input 2", Assert.IsType<FunctionResultContent>(c).Result?.ToString())), 1259Assert.IsType<FunctionResultContent>(Assert.Single(response.Messages[1].Contents)); 1261Assert.IsType<FunctionResultContent>(Assert.Single(response.Messages[3].Contents)); 1361AIContent[] resultContents = existingSearchResult is not null && existingSearchResult.Contents.OfType<FunctionResultContent>().ToList() is { } frcs 1385var frcs = lastMessage.Contents.OfType<FunctionResultContent>().ToList(); 2145Assert.Contains(result.Messages, m => m.Contents.OfType<FunctionResultContent>().Any(frc => frc.Result?.ToString() == "FunctionB result")); 2150Assert.Contains(result.Messages, m => m.Contents.OfType<FunctionResultContent>().Any(frc => frc.Result?.ToString() == "FunctionB result")); 2241Assert.Contains(result.Messages, m => m.Contents.OfType<FunctionResultContent>() 2250Assert.Contains(result.Messages, m => m.Contents.OfType<FunctionResultContent>() 2346Assert.Contains(result.Messages, m => m.Contents.OfType<FunctionResultContent>() 2348Assert.DoesNotContain(result.Messages, m => m.Contents.OfType<FunctionResultContent>() 2354Assert.Contains(result.Messages, m => m.Contents.OfType<FunctionResultContent>() 2356Assert.DoesNotContain(result.Messages, m => m.Contents.OfType<FunctionResultContent>() 2449Assert.Contains(result.Messages, m => m.Contents.OfType<FunctionResultContent>() 2451Assert.Contains(result.Messages, m => m.Contents.OfType<FunctionResultContent>() 2457Assert.Contains(result.Messages, m => m.Contents.OfType<FunctionResultContent>() 2459Assert.Contains(result.Messages, m => m.Contents.OfType<FunctionResultContent>() 2551Assert.Contains(result.Messages, m => m.Contents.OfType<FunctionResultContent>() 2553Assert.DoesNotContain(result.Messages, m => m.Contents.OfType<FunctionResultContent>() 2559Assert.Contains(result.Messages, m => m.Contents.OfType<FunctionResultContent>() 2561Assert.DoesNotContain(result.Messages, m => m.Contents.OfType<FunctionResultContent>() 2726Assert.Contains(result.Messages, m => m.Contents.OfType<FunctionResultContent>() 2735Assert.Contains(result.Messages, m => m.Contents.OfType<FunctionResultContent>() 2830Assert.Contains(result.Messages, m => m.Contents.OfType<FunctionResultContent>().Any(frc => frc.Result?.ToString() == "FunctionA result")); 2840Assert.Contains(result.Messages, m => m.Contents.OfType<FunctionResultContent>().Any(frc => frc.Result?.ToString() == "FunctionA result")); 2936Assert.DoesNotContain(result.Messages, m => m.Contents.OfType<FunctionResultContent>() 2947Assert.DoesNotContain(result.Messages, m => m.Contents.OfType<FunctionResultContent>()
ChatReduction\MessageCountingChatReducerTests.cs (2)
144Assert.DoesNotContain(m.Contents, c => c is FunctionResultContent); 151Assert.DoesNotContain(m.Contents, c => c is FunctionResultContent);
ChatReduction\SummarizingChatReducerTests.cs (5)
107Assert.DoesNotContain(msgs, m => m.Contents.Any(c => c is FunctionCallContent or FunctionResultContent or TestUserInputRequestContent or TestUserInputResponseContent)); 125m => Assert.Contains(m.Contents, c => c is FunctionResultContent), 203Assert.DoesNotContain(msgList, m => m.Contents.Any(c => c is FunctionCallContent or FunctionResultContent or TestUserInputRequestContent or TestUserInputResponseContent)); 220Assert.Contains(resultList, m => m.Contents.Any(c => c is FunctionResultContent fr && fr.CallId == "call2")); 222Assert.DoesNotContain(resultList, m => m.Contents.Any(c => c is FunctionResultContent fr && fr.CallId == "call1"));
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (3)
44else if (expectedItem is FunctionResultContent expectedFunctionResult) 46var chatFunctionResult = (FunctionResultContent)chatItem;