49 references to UriContent
Microsoft.Extensions.AI.Abstractions (2)
Microsoft.Extensions.AI.Abstractions.Tests (21)
Contents\UriContentTests.cs (9)
16Assert.Throws<ArgumentNullException>("uri", () => new UriContent((Uri)null!, "image/png"));
22Assert.Throws<ArgumentException>("mediaType", () => new UriContent(new Uri("data:image/png;base64,aGVsbG8="), ""));
23Assert.Throws<ArgumentException>("mediaType", () => new UriContent(new Uri("data:image/png;base64,aGVsbG8="), "audio"));
93var content = new UriContent(new Uri(uri));
96var content2 = new UriContent(new Uri(uri), null);
112var content = new UriContent(new Uri(uri, UriKind.Relative));
115var content2 = new UriContent(new Uri(uri, UriKind.Relative), null);
140var content = new UriContent(new Uri(uri, UriKind.Relative));
150var relContent = new UriContent(new Uri("image.png", UriKind.Relative), "application/octet-stream");
Contents\WebSearchToolResultContentTests.cs (7)
33new UriContent(new Uri("https://example.com/1"), "text/html") { AdditionalProperties = new() { ["title"] = "Result 1" } }
56new UriContent(new Uri("https://example.com/1"), "text/html") { AdditionalProperties = new() { ["title"] = "First" } },
57new UriContent(new Uri("https://example.com/2"), "text/html") { AdditionalProperties = new() { ["title"] = "Second" } },
58new UriContent(new Uri("https://example.com/3"), "text/html"),
82new UriContent(new Uri("https://example.com"), "text/html") { AdditionalProperties = new() { ["title"] = "Example Page" } },
83new UriContent(new Uri("https://another.com"), "text/html"),
110new UriContent(new Uri("https://test.com"), "text/html") { AdditionalProperties = new() { ["title"] = "Test" } },
Microsoft.Extensions.AI.Evaluation.Reporting (1)
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (1)
Microsoft.Extensions.AI.OpenAI (5)
Microsoft.Extensions.AI.OpenAI.Tests (5)
OpenAIResponseClientTests.cs (5)
4999new FunctionResultContent("call_uri", new UriContent(new Uri("https://example.com/image.png"), "image/png"))
5118new UriContent(new Uri("https://example.com/result.png"), "image/png"),
5345new FunctionResultContent("call_file_uri", new UriContent(new Uri("https://example.com/document.pdf"), "application/pdf"))
5571new UriContent(new Uri("https://example.com/image.png"), "image/png"),
5572new UriContent(new Uri("https://example.com/image.png"), "image/png") { AdditionalProperties = new AdditionalPropertiesDictionary { ["detail"] = "high" }},
Microsoft.Extensions.AI.Stabilization.Tests (8)
parent\Microsoft.Extensions.AI.Abstractions.Tests\Contents\WebSearchToolResultContentTests.cs (7)
33new UriContent(new Uri("https://example.com/1"), "text/html") { AdditionalProperties = new() { ["title"] = "Result 1" } }
56new UriContent(new Uri("https://example.com/1"), "text/html") { AdditionalProperties = new() { ["title"] = "First" } },
57new UriContent(new Uri("https://example.com/2"), "text/html") { AdditionalProperties = new() { ["title"] = "Second" } },
58new UriContent(new Uri("https://example.com/3"), "text/html"),
82new UriContent(new Uri("https://example.com"), "text/html") { AdditionalProperties = new() { ["title"] = "Example Page" } },
83new UriContent(new Uri("https://another.com"), "text/html"),
110new UriContent(new Uri("https://test.com"), "text/html") { AdditionalProperties = new() { ["title"] = "Test" } },
Microsoft.Extensions.AI.Tests (6)