28 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>("fileId", () => new
HostedFileContent
(null!));
16
Assert.Throws<ArgumentException>("fileId", () => new
HostedFileContent
(string.Empty));
17
Assert.Throws<ArgumentException>("fileId", () => 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)
47
new
HostedFileContent
("id123"),
Tools\HostedFileSearchToolTests.cs (1)
49
new
HostedFileContent
("id456"),
Microsoft.Extensions.AI.OpenAI (4)
OpenAIAssistantsChatClient.cs (1)
231
(hcitrc.Outputs ??= []).Add(new
HostedFileContent
(output.ImageFileId) { MediaType = "image/*" });
OpenAIChatClient.cs (1)
725
contentPart.FileId is not null ? new
HostedFileContent
(contentPart.FileId) { Name = contentPart.Filename } :
OpenAIResponsesChatClient.cs (2)
1182
!string.IsNullOrWhiteSpace(part.InputImageFileId) ? new
HostedFileContent
(part.InputImageFileId) { MediaType = "image/*" } :
1183
!string.IsNullOrWhiteSpace(part.InputFileId) ? new
HostedFileContent
(part.InputFileId) { Name = part.InputFilename } :
Microsoft.Extensions.AI.OpenAI.Tests (4)
OpenAIConversionTests.cs (1)
248
var fileContent = new
HostedFileContent
("file-123");
OpenAIResponseClientTests.cs (3)
4112
new FunctionResultContent("call_file", new
HostedFileContent
("file-abc123") { MediaType = "image/png", Name = "result.png" })
4458
new FunctionResultContent("call_hosted_file", new
HostedFileContent
("file-xyz789") { MediaType = "text/plain", Name = "document.txt" })
4630
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"),