19 references to UriContent
Microsoft.Extensions.AI.Abstractions.Tests (13)
Contents\UriContentTests.cs (13)
15
Assert.Throws<ArgumentNullException>("uri", () => new
UriContent
((string)null!, "image/png"));
17
Assert.Throws<UriFormatException>(() => new
UriContent
("notauri", "image/png"));
19
Assert.Throws<ArgumentNullException>("mediaType", () => new
UriContent
("data:image/png;base64,aGVsbG8=", null!));
20
Assert.Throws<ArgumentException>("mediaType", () => new
UriContent
("data:image/png;base64,aGVsbG8=", ""));
21
Assert.Throws<ArgumentException>("mediaType", () => new
UriContent
("data:image/png;base64,aGVsbG8=", "image"));
27
UriContent c =
new
("http://localhost/something", "image/png");
40
Assert.Throws<ArgumentException>("mediaType", () => new
UriContent
("http://localhost/something", type));
42
UriContent c =
new
("http://localhost/something", "image/png");
54
var content = new
UriContent
("http://localhost/something", mediaType);
70
new
UriContent
("http://localhost/something", "image/png"),
101
UriContent c =
new
("http://localhost", mediaType);
114
var content = new
UriContent
("http://localhost", mediaType);
127
var content = new
UriContent
("http://localhost", mediaType);
Microsoft.Extensions.AI.AzureAIInference.Tests (1)
AzureAIInferenceChatClientTests.cs (1)
597
new
UriContent
("http://dot.net/someimage.png", mediaType: "image/*"),
Microsoft.Extensions.AI.Evaluation.Integration.Tests (4)
SafetyEvaluatorTests.cs (4)
229
new
UriContent
("https://uhf.microsoft.com/images/microsoft/RE1Mu3b.png", "image/png")],
296
new
UriContent
("https://uhf.microsoft.com/images/banners/RW1iGSh.png", "image/png")],
323
new
UriContent
("https://uhf.microsoft.com/images/microsoft/RE1Mu3b.png", "image/png")],
336
new
UriContent
("https://uhf.microsoft.com/images/banners/RW1iGSh.png", "image/png")],
Microsoft.Extensions.AI.Tests (1)
ChatCompletion\ChatClientStructuredOutputExtensionsTests.cs (1)
238
var expectedResponse = new ChatResponse(new ChatMessage(ChatRole.Assistant, [new
UriContent
("https://example.com", "image/*")]));