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)
234
(hcitrc.Outputs ??= []).Add(new
HostedFileContent
(output.ImageFileId) { MediaType = "image/*" });
OpenAIChatClient.cs (1)
778
contentPart.FileId is not null ? new
HostedFileContent
(contentPart.FileId) { Name = contentPart.Filename } :
OpenAIResponsesChatClient.cs (2)
1270
content = new
HostedFileContent
(part.InputImageFileId) { MediaType = "image/*" };
1274
content = new
HostedFileContent
(part.InputFileId) { Name = part.InputFilename };
Microsoft.Extensions.AI.OpenAI.Tests (4)
OpenAIConversionTests.cs (1)
293
var fileContent = new
HostedFileContent
("file-123");
OpenAIResponseClientTests.cs (3)
4424
new FunctionResultContent("call_file", new
HostedFileContent
("file-abc123") { MediaType = "image/png", Name = "result.png" })
4770
new FunctionResultContent("call_hosted_file", new
HostedFileContent
("file-xyz789") { MediaType = "text/plain", Name = "document.txt" })
4942
new
HostedFileContent
("file-123"),
Microsoft.Extensions.AI.Tests (3)
ChatCompletion\OpenTelemetryChatClientTests.cs (3)
364
new
HostedFileContent
("file-abc123"),
380
yield return new() { Contents = [new
HostedFileContent
("file-abc123")] };
400
new
HostedFileContent
("file-xyz789"),