Class RemoteFileContent
- Namespace
- GenerativeAI.Microsoft.Extensions
- Assembly
- GenerativeAI.Microsoft.dll
Marker AIContent that points at a previously-uploaded Files-API
asset. Produced by PromoteOversizedAttachmentsAsync(IList<ChatMessage>, GenerativeModel, CancellationToken)
when a Microsoft.Extensions.AI.DataContent exceeds Gemini's 20 MB inline_data
limit; ToPart(AIContent, ChatOptions?) then emits a
FileData part referencing the remote URI instead of an
inline blob.
public sealed class RemoteFileContent : AIContent
- Inheritance
-
AIContentRemoteFileContent
- Inherited Members
-
AIContent.AnnotationsAIContent.RawRepresentationAIContent.AdditionalProperties
- Extension Methods
Constructors
RemoteFileContent(RemoteFile, string?)
Initializes a new instance of the RemoteFileContent class.
public RemoteFileContent(RemoteFile remoteFile, string? mimeType = null)
Parameters
remoteFileRemoteFileThe uploaded file to reference.
mimeTypestringOptional MIME type override; defaults to the file's own MIME type.
Properties
MimeType
Gets the MIME type override, or null to use RemoteFile's MIME type.
public string? MimeType { get; }
Property Value
RemoteFile
Gets the uploaded file this content refers to.
public RemoteFile RemoteFile { get; }