17 writes to ImageId
Microsoft.Extensions.AI (1)
ChatCompletion\ImageGeneratingChatClient.cs (1)
352ImageId = functionResult.CallId,
Microsoft.Extensions.AI.Abstractions.Tests (12)
ChatCompletion\ChatResponseUpdateExtensionsTests.cs (7)
934new() { Contents = [new ImageGenerationToolResultContent { ImageId = "img1", Outputs = [image1] }] }, 937new() { Contents = [new ImageGenerationToolResultContent { ImageId = "img2", Outputs = [image2] }] }, 940new() { Contents = [new ImageGenerationToolResultContent { ImageId = "img1", Outputs = [image3] }] }, 943new() { Contents = [new ImageGenerationToolResultContent { ImageId = "img2", Outputs = [image4] }] }, 988new() { Contents = [new ImageGenerationToolResultContent { ImageId = null, Outputs = [image1] }] }, 991new() { Contents = [new ImageGenerationToolResultContent { ImageId = "", Outputs = [image2] }] }, 994new() { Contents = [new ImageGenerationToolResultContent { ImageId = null, Outputs = [image3] }] },
Contents\AIContentTests.cs (1)
80new ImageGenerationToolResultContent { ImageId = "img456", Outputs = [new DataContent(new byte[] { 4, 5, 6 }, "image/png")] }
Contents\ImageGenerationToolResultContentTests.cs (4)
28c.ImageId = "img123"; 52ImageId = "img456", 73ImageId = "img123", 99ImageId = "img789",
Microsoft.Extensions.AI.OpenAI (2)
OpenAIResponsesChatClient.cs (2)
1432ImageId = outputItem.Id, 1445ImageId = update.ItemId,
Microsoft.Extensions.AI.Tests (2)
ChatCompletion\OpenTelemetryChatClientTests.cs (2)
617new ImageGenerationToolResultContent { ImageId = "img-123", Outputs = [new UriContent(new Uri("https://example.com/image.png"), "image/png")] }, 633yield return new() { Contents = [new ImageGenerationToolResultContent { ImageId = "img-123", Outputs = [new UriContent(new Uri("https://example.com/image.png"), "image/png")] }] };
12 references to ImageId
Microsoft.Extensions.AI (1)
ChatCompletion\OpenTelemetryChatClient.cs (1)
406Id = igtrc.ImageId,
Microsoft.Extensions.AI.Abstractions (3)
ChatCompletion\ChatResponseExtensions.cs (3)
199if (contents[i] is ImageGenerationToolResultContent imageResult && !string.IsNullOrEmpty(imageResult.ImageId)) 207if (imageResultIndexById.TryGetValue(imageResult.ImageId!, out int existingIndex)) 216imageResultIndexById[imageResult.ImageId!] = i;
Microsoft.Extensions.AI.Abstractions.Tests (7)
ChatCompletion\ChatResponseUpdateExtensionsTests.cs (2)
964var firstImageResult = imageResults.First(ir => ir.ImageId == "img1"); 970var secondImageResult = imageResults.First(ir => ir.ImageId == "img2");
Contents\ImageGenerationToolResultContentTests.cs (5)
18Assert.Null(c.ImageId); 27Assert.Null(c.ImageId); 29Assert.Equal("img123", c.ImageId); 85Assert.Equal("img123", deserializedSut.ImageId); 117Assert.Equal("img789", imageResult.ImageId);
Microsoft.Extensions.AI.OpenAI.Tests (1)
OpenAIResponseClientTests.cs (1)
5753Assert.Equal("img_call_abc123", toolResult.ImageId);