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");
HostedCodeInterpreterToolTests.cs (1)
28new HostedFileContent("id123"),
HostedFileSearchToolTests.cs (1)
30new HostedFileContent("id456"),
Microsoft.Extensions.AI.OpenAI (3)
OpenAIChatClient.cs (1)
701contentPart.FileId is not null ? new HostedFileContent(contentPart.FileId) :
OpenAIResponsesChatClient.cs (2)
637results.Add(new HostedFileContent(part.InputImageFileId) { RawRepresentation = part }); 641results.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,
HostedCodeInterpreterTool.cs (1)
23/// represented via <see cref="HostedFileContent"/>. Some also support binary data, represented via <see cref="DataContent"/>.
HostedFileSearchTool.cs (1)
23/// support different kinds of inputs, e.g. some may 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");
HostedCodeInterpreterToolTests.cs (1)
35Assert.IsType<HostedFileContent>(tool.Inputs[0]);
HostedFileSearchToolTests.cs (1)
39Assert.IsType<HostedFileContent>(tool.Inputs[1]);
Microsoft.Extensions.AI.OpenAI (4)
OpenAIAssistantsChatClient.cs (1)
364if (input is HostedFileContent hostedFile)
OpenAIChatClient.cs (1)
285case HostedFileContent fileContent:
OpenAIResponsesChatClient.cs (2)
434inputs.OfType<HostedFileContent>().Select(c => c.FileId), 718case HostedFileContent fileContent: