10 writes to Outputs
Microsoft.Extensions.AI (1)
ChatCompletion\ImageGeneratingChatClient.cs (1)
352Outputs = imageContents
Microsoft.Extensions.AI.Abstractions.Tests (7)
ChatCompletion\ChatResponseUpdateExtensionsTests.cs (7)
935new() { Contents = [new ImageGenerationToolResultContent { ImageId = "img1", Outputs = [image1] }] }, 938new() { Contents = [new ImageGenerationToolResultContent { ImageId = "img2", Outputs = [image2] }] }, 941new() { Contents = [new ImageGenerationToolResultContent { ImageId = "img1", Outputs = [image3] }] }, 944new() { Contents = [new ImageGenerationToolResultContent { ImageId = "img2", Outputs = [image4] }] }, 989new() { Contents = [new ImageGenerationToolResultContent { ImageId = null, Outputs = [image1] }] }, 992new() { Contents = [new ImageGenerationToolResultContent { ImageId = "", Outputs = [image2] }] }, 995new() { Contents = [new ImageGenerationToolResultContent { ImageId = null, Outputs = [image3] }] },
Microsoft.Extensions.AI.OpenAI (2)
OpenAIResponsesChatClient.cs (2)
1369Outputs = [new DataContent(outputItem.ImageResultBytes, $"image/{outputFormat}")] 1382Outputs =
25 references to Outputs
Microsoft.Extensions.AI (1)
ChatCompletion\ImageGeneratingChatClient.cs (1)
198foreach (var output in toolResultContent.Outputs ?? [])
Microsoft.Extensions.AI.Abstractions.Tests (7)
ChatCompletion\ChatResponseUpdateExtensionsTests.cs (7)
966Assert.NotNull(firstImageResult.Outputs); 967var firstOutput = Assert.Single(firstImageResult.Outputs); 972Assert.NotNull(secondImageResult.Outputs); 973var secondOutput = Assert.Single(secondImageResult.Outputs); 1006Assert.Same(image1, imageResults[0].Outputs![0]); 1007Assert.Same(image2, imageResults[1].Outputs![0]); 1008Assert.Same(image3, imageResults[2].Outputs![0]);
Microsoft.Extensions.AI.Integration.Tests (9)
ImageGeneratingChatClientIntegrationTests.cs (9)
90Assert.NotNull(toolResult.Outputs); 92foreach (var dataContent in toolResult.Outputs.OfType<DataContent>()) 144Assert.NotNull(imageResult.Outputs); 145var imageContent = Assert.Single(imageResult.Outputs.OfType<DataContent>()); 216Assert.NotNull(firstToolResultContent.Outputs); 217var firstContent = Assert.Single(firstToolResultContent.Outputs.OfType<DataContent>()); 221Assert.Single(secondResponse.Messages.SelectMany(m => m.Contents).OfType<ImageGenerationToolResultContent>().SelectMany(t => t.Outputs!.OfType<DataContent>())); 271var secondImage = Assert.Single(secondToolResultContent.Outputs!.OfType<DataContent>()); 316var firstGeneratedImage = Assert.Single(firstToolResultContent.Outputs!.OfType<DataContent>());
Microsoft.Extensions.AI.OpenAI.Tests (8)
OpenAIResponseClientTests.cs (8)
5412Assert.Single(toolResult.Outputs!); 5414var imageData = toolResult.Outputs![0] as DataContent; 5517result.Outputs != null && result.Outputs.Any(o => o.AdditionalProperties != null && o.AdditionalProperties.ContainsKey("PartialImageIndex")))); 5623result.Outputs != null && result.Outputs.Any(o => o.AdditionalProperties != null && o.AdditionalProperties.ContainsKey("PartialImageIndex")))).ToList(); 5638if (result.Outputs == null) 5643return result.Outputs.Any(o => HasCorrectImageData(o, index));