31 references to UriContent
Microsoft.Extensions.AI.Abstractions.Tests (20)
Contents\AIContentTests.cs (1)
70new UriContent("http://example.com", "application/json"),
Contents\ImageGenerationToolResultContentTests.cs (3)
54new UriContent("http://example.com/image.jpg", "image/jpeg"), 74new UriContent("http://example.com/image.jpg", "image/jpeg") 99new UriContent("http://example.com/another.jpg", "image/jpeg")
Contents\UriContentTests.cs (16)
15Assert.Throws<ArgumentNullException>("uri", () => new UriContent((string)null!, "image/png")); 17Assert.Throws<UriFormatException>(() => new UriContent("notauri", "image/png")); 19Assert.Throws<ArgumentException>("mediaType", () => new UriContent("data:image/png;base64,aGVsbG8=", "")); 20Assert.Throws<ArgumentException>("mediaType", () => new UriContent("data:image/png;base64,aGVsbG8=", "image")); 25UriContent c = new("http://localhost/something", "image/png"); 38Assert.Throws<ArgumentException>("mediaType", () => new UriContent("http://localhost/something", type)); 40UriContent c = new("http://localhost/something", "image/png"); 52var content = new UriContent("http://localhost/something", mediaType); 76var content = new UriContent(uri); 79var content2 = new UriContent(uri, null); 127var content = new UriContent(uri); 147var content = new UriContent("http://localhost/image.png", "application/octet-stream"); 160new UriContent("http://localhost/something", "image/png"), 191UriContent c = new("http://localhost", mediaType); 204var content = new UriContent("http://localhost", mediaType); 217var content = new UriContent("http://localhost", mediaType);
Microsoft.Extensions.AI.Evaluation.Integration.Tests (4)
SafetyEvaluatorTests.cs (4)
340new UriContent("https://uhf.microsoft.com/images/microsoft/RE1Mu3b.png", "image/png")], 425new UriContent("https://uhf.microsoft.com/images/banners/RW1iGSh.png", "image/png")], 461new UriContent("https://uhf.microsoft.com/images/microsoft/RE1Mu3b.png", "image/png")], 474new UriContent("https://uhf.microsoft.com/images/banners/RW1iGSh.png", "image/png")],
Microsoft.Extensions.AI.OpenAI.Tests (1)
OpenAIConversionTests.cs (1)
1522new UriContent("https://example.com/image.jpg", "image/jpeg"),
Microsoft.Extensions.AI.Stabilization.Tests (3)
parent\Microsoft.Extensions.AI.Abstractions.Tests\Contents\ImageGenerationToolResultContentTests.cs (3)
54new UriContent("http://example.com/image.jpg", "image/jpeg"), 74new UriContent("http://example.com/image.jpg", "image/jpeg") 99new UriContent("http://example.com/another.jpg", "image/jpeg")
Microsoft.Extensions.AI.Tests (3)
ChatCompletion\ChatClientStructuredOutputExtensionsTests.cs (1)
277var expectedResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, [new UriContent("https://example.com", "image/*")]));
Image\OpenTelemetryImageGeneratorTests.cs (2)
47new UriContent("http://example/output.png", "image/png"), 76OriginalImages = [new UriContent("http://example/input.png", "image/png")],