93 references to HostedFileContent
Microsoft.Extensions.AI.Abstractions (1)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.HostedFileContent.g.cs (1)
34ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.HostedFileContent((string)args[0]),
Microsoft.Extensions.AI.Abstractions.Tests (35)
Contents\AIContentTests.cs (1)
74new HostedFileContent("file123"),
Contents\CodeInterpreterToolCallContentTests.cs (2)
53new HostedFileContent("file123"), 73new HostedFileContent("file456")
Contents\CodeInterpreterToolResultContentTests.cs (2)
53new HostedFileContent("output.png"), 75new HostedFileContent("result.txt")
Contents\HostedFileContentTests.cs (17)
15Assert.Throws<ArgumentNullException>("fileId", () => new HostedFileContent(null!)); 16Assert.Throws<ArgumentException>("fileId", () => new HostedFileContent(string.Empty)); 17Assert.Throws<ArgumentException>("fileId", () => new HostedFileContent(" ")); 24HostedFileContent c = new(fileId); 39HostedFileContent c = new("id123"); 63var content = new HostedFileContent("file123"); 75HostedFileContent c = new("id123"); 97HostedFileContent c = new("id123"); 109HostedFileContent c = new("id123") { MediaType = mediaType }; 116HostedFileContent c = new("id123"); 132HostedFileContent c = new("id123"); 145HostedFileContent c = new("id123"); 160HostedFileContent c = new("id123"); 173HostedFileContent c = new("id123"); 188var content = new HostedFileContent("file123") 226HostedFileContent c = new("id123") { MediaType = mediaType }; 233HostedFileContent c = new("id123");
Files\DelegatingHostedFileClientTests.cs (4)
32var expectedFile = new HostedFileContent("file-123"); 88var expectedFile = new HostedFileContent("file-789") { Name = "info.txt" }; 115new HostedFileContent("file-1"), 116new HostedFileContent("file-2")
Files\HostedFileClientExtensionsTests.cs (6)
31return Task.FromResult(new HostedFileContent("file-1")); 82return new HostedFileContent("file-2"); 289var hostedFileContent = new HostedFileContent("file-hfc"); 308var content = new HostedFileContent("file-1"); 322var hostedFileContent = new HostedFileContent("file-scoped") { Scope = "container-42" }; 341var hostedFileContent = new HostedFileContent("file-scoped") { Scope = "container-from-content" };
Generated\361d1da7f942c932\TestJsonSerializerContext.HostedFileContent.g.cs (1)
32ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.HostedFileContent((string)args[0]),
Tools\HostedCodeInterpreterToolTests.cs (1)
47new HostedFileContent("id123"),
Tools\HostedFileSearchToolTests.cs (1)
49new HostedFileContent("id456"),
Microsoft.Extensions.AI.Evaluation.Reporting (1)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.HostedFileContent.g.cs (1)
34ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.HostedFileContent((string)args[0]),
Microsoft.Extensions.AI.Evaluation.Reporting.Azure (1)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\JsonContext.HostedFileContent.g.cs (1)
34ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.HostedFileContent((string)args[0]),
Microsoft.Extensions.AI.OpenAI (7)
OpenAIAssistantsChatClient.cs (1)
232(hcitrc.Outputs ??= []).Add(new HostedFileContent(output.ImageFileId) { MediaType = "image/*" });
OpenAIChatClient.cs (1)
808contentPart.FileId is not null ? new HostedFileContent(contentPart.FileId) { Name = contentPart.Filename } :
OpenAIHostedFileClient.cs (2)
328new(openAIFile.Id) 347return new HostedFileContent(file.Id)
OpenAIResponsesChatClient.cs (3)
1698content = new HostedFileContent(part.InputImageFileId) { MediaType = "image/*" }; 1702content = new HostedFileContent(part.InputFileId) { Name = part.InputFilename }; 1954var hfc = new HostedFileContent(fileId) { MediaType = mimeType, RawRepresentation = output };
Microsoft.Extensions.AI.OpenAI.Tests (6)
OpenAIConversionTests.cs (1)
352var fileContent = new HostedFileContent("file-123");
OpenAIResponseClientTests.cs (5)
5056new FunctionResultContent("call_file", new HostedFileContent("file-abc123") { MediaType = "image/png", Name = "result.png" }) 5402new FunctionResultContent("call_hosted_file", new HostedFileContent("file-xyz789") { MediaType = "text/plain", Name = "document.txt" }) 5576new HostedFileContent("file-img-456") { MediaType = "image/png" }, 5577new HostedFileContent("file-img-789") { MediaType = "image/jpeg", AdditionalProperties = new AdditionalPropertiesDictionary { ["detail"] = "high" }}, 5578new HostedFileContent("file-123"),
Microsoft.Extensions.AI.Stabilization.Tests (23)
Generated\361d1da7f942c932\AIContentSerializationRegressionContext.HostedFileContent.g.cs (1)
32ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.HostedFileContent((string)args[0]),
parent\Microsoft.Extensions.AI.Abstractions.Tests\Contents\CodeInterpreterToolCallContentTests.cs (2)
53new HostedFileContent("file123"), 73new HostedFileContent("file456")
parent\Microsoft.Extensions.AI.Abstractions.Tests\Contents\CodeInterpreterToolResultContentTests.cs (2)
53new HostedFileContent("output.png"), 75new HostedFileContent("result.txt")
parent\Microsoft.Extensions.AI.Abstractions.Tests\Contents\HostedFileContentTests.cs (17)
15Assert.Throws<ArgumentNullException>("fileId", () => new HostedFileContent(null!)); 16Assert.Throws<ArgumentException>("fileId", () => new HostedFileContent(string.Empty)); 17Assert.Throws<ArgumentException>("fileId", () => new HostedFileContent(" ")); 24HostedFileContent c = new(fileId); 39HostedFileContent c = new("id123"); 63var content = new HostedFileContent("file123"); 75HostedFileContent c = new("id123"); 97HostedFileContent c = new("id123"); 109HostedFileContent c = new("id123") { MediaType = mediaType }; 116HostedFileContent c = new("id123"); 132HostedFileContent c = new("id123"); 145HostedFileContent c = new("id123"); 160HostedFileContent c = new("id123"); 173HostedFileContent c = new("id123"); 188var content = new HostedFileContent("file123") 226HostedFileContent c = new("id123") { MediaType = mediaType }; 233HostedFileContent c = new("id123");
parent\Microsoft.Extensions.AI.Abstractions.Tests\Tools\HostedCodeInterpreterToolTests.cs (1)
47new HostedFileContent("id123"),
Microsoft.Extensions.AI.Tests (19)
ChatCompletion\OpenTelemetryChatClientTests.cs (3)
412new HostedFileContent("file-abc123"), 428yield return new() { Contents = [new HostedFileContent("file-abc123")] }; 448new HostedFileContent("file-xyz789"),
Files\LoggingHostedFileClientTests.cs (5)
61Task.FromResult(new HostedFileContent("file-123") { Name = "test.txt" }), 170Task.FromResult<HostedFileContent?>(new HostedFileContent("file-456") { Name = "report.pdf" }), 233yield return new HostedFileContent("file-1") { Name = "a.txt" }; 234yield return new HostedFileContent("file-2") { Name = "b.txt" }; 510yield return new HostedFileContent("file-1");
Files\OpenTelemetryHostedFileClientTests.cs (10)
41Task.FromResult(new HostedFileContent("file-abc") { Name = "test.txt", SizeInBytes = 1024 }), 134Task.FromResult<HostedFileContent?>(new HostedFileContent("file-info") { Name = "report.pdf", SizeInBytes = 2048 }), 188yield return new HostedFileContent("file-1") { Name = "a.txt" }; 189yield return new HostedFileContent("file-2") { Name = "b.txt" }; 190yield return new HostedFileContent("file-3") { Name = "c.txt" }; 312yield return new HostedFileContent("file-1"); 367Task.FromResult(new HostedFileContent("file-1")), 499Task.FromResult(new HostedFileContent("file-1")), 537Task.FromResult(new HostedFileContent("file-1")), 574Task.FromResult(new HostedFileContent("file-1")),
Generated\361d1da7f942c932\TestJsonSerializerContext.HostedFileContent.g.cs (1)
32ObjectWithParameterizedConstructorCreator = static args => new global::Microsoft.Extensions.AI.HostedFileContent((string)args[0]),