25 references to HostedFileContent
Microsoft.Extensions.AI.Abstractions.Tests (17)
Contents\AIContentTests.cs (1)
70
new
HostedFileContent
("file123"),
Contents\CodeInterpreterToolCallContentTests.cs (2)
56
new
HostedFileContent
("file123"),
77
new
HostedFileContent
("file456")
Contents\CodeInterpreterToolResultContentTests.cs (2)
56
new
HostedFileContent
("output.png"),
79
new
HostedFileContent
("result.txt")
Contents\HostedFileContentTests.cs (10)
15
Assert.Throws<ArgumentNullException>(() => new
HostedFileContent
(null!));
16
Assert.Throws<ArgumentException>(() => new
HostedFileContent
(string.Empty));
17
Assert.Throws<ArgumentException>(() => new
HostedFileContent
(" "));
24
HostedFileContent c =
new
(fileId);
33
HostedFileContent c =
new
("id123");
57
var content = new
HostedFileContent
("file123");
69
HostedFileContent c =
new
("id123");
91
HostedFileContent c =
new
("id123");
103
HostedFileContent c =
new
("id123") { MediaType = mediaType };
110
HostedFileContent c =
new
("id123");
Tools\HostedCodeInterpreterToolTests.cs (1)
28
new
HostedFileContent
("id123"),
Tools\HostedFileSearchToolTests.cs (1)
30
new
HostedFileContent
("id456"),
Microsoft.Extensions.AI.OpenAI (4)
OpenAIAssistantsChatClient.cs (1)
231
(hcitrc.Outputs ??= []).Add(new
HostedFileContent
(output.ImageFileId) { MediaType = "image/*" });
OpenAIChatClient.cs (1)
724
contentPart.FileId is not null ? new
HostedFileContent
(contentPart.FileId) { Name = contentPart.Filename } :
OpenAIResponsesChatClient.cs (2)
1023
results.Add(new
HostedFileContent
(part.InputImageFileId) { MediaType = "image/*", RawRepresentation = part });
1027
results.Add(new
HostedFileContent
(part.InputFileId) { Name = part.InputFilename, RawRepresentation = part });
Microsoft.Extensions.AI.OpenAI.Tests (1)
OpenAIConversionTests.cs (1)
224
var fileContent = new
HostedFileContent
("file-123");
Microsoft.Extensions.AI.Tests (3)
ChatCompletion\OpenTelemetryChatClientTests.cs (3)
361
new
HostedFileContent
("file-abc123"),
377
yield return new() { Contents = [new
HostedFileContent
("file-abc123")] };
397
new
HostedFileContent
("file-xyz789"),