10 instantiations of HostedFileContent
Microsoft.Extensions.AI.Abstractions.Tests (7)
Contents\HostedFileContentTests.cs (5)
14Assert.Throws<ArgumentNullException>(() => new HostedFileContent(null!)); 15Assert.Throws<ArgumentException>(() => new HostedFileContent(string.Empty)); 16Assert.Throws<ArgumentException>(() => new HostedFileContent(" ")); 23HostedFileContent c = new(fileId); 32HostedFileContent c = new("id123");
Tools\HostedCodeInterpreterToolTests.cs (1)
28new HostedFileContent("id123"),
Tools\HostedFileSearchToolTests.cs (1)
30new HostedFileContent("id456"),
Microsoft.Extensions.AI.OpenAI (3)
OpenAIChatClient.cs (1)
691contentPart.FileId is not null ? new HostedFileContent(contentPart.FileId) :
OpenAIResponsesChatClient.cs (2)
731results.Add(new HostedFileContent(part.InputImageFileId) { RawRepresentation = part }); 735results.Add(new HostedFileContent(part.InputFileId) { RawRepresentation = part });
13 references to HostedFileContent
Microsoft.Extensions.AI.Abstractions (5)
Contents\AIContent.cs (1)
15[JsonDerivedType(typeof(HostedFileContent), typeDiscriminator: "hostedFile")]
Contents\HostedFileContent.cs (1)
23/// Initializes a new instance of the <see cref="HostedFileContent"/> class.
Contents\HostedVectorStoreContent.cs (1)
14/// Unlike <see cref="HostedFileContent"/> which represents a specific file that is hosted by the AI service,
Tools\HostedCodeInterpreterTool.cs (1)
23/// represented via <see cref="HostedFileContent"/>. Some also support binary data, represented via <see cref="DataContent"/>.
Tools\HostedFileSearchTool.cs (1)
23/// support different kinds of inputs, for example, some might respect <see cref="HostedFileContent"/> using provider-specific file IDs,
Microsoft.Extensions.AI.Abstractions.Tests (4)
Contents\HostedFileContentTests.cs (2)
23HostedFileContent c = new(fileId); 32HostedFileContent c = new("id123");
Tools\HostedCodeInterpreterToolTests.cs (1)
35Assert.IsType<HostedFileContent>(tool.Inputs[0]);
Tools\HostedFileSearchToolTests.cs (1)
39Assert.IsType<HostedFileContent>(tool.Inputs[1]);
Microsoft.Extensions.AI.OpenAI (4)
OpenAIAssistantsChatClient.cs (1)
355if (input is HostedFileContent hostedFile)
OpenAIChatClient.cs (1)
275case HostedFileContent fileContent:
OpenAIResponsesChatClient.cs (2)
444inputs.OfType<HostedFileContent>().Select(c => c.FileId), 827case HostedFileContent fileContent: