FirebaseVertexAI Framework Reference

InlineDataPart

@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
public struct InlineDataPart : Part

A data part that is provided inline in requests.

Data provided as an inline data part is encoded as base64 and included directly (inline) in the request. For large files, see FileDataPart which references content by URI instead of including the data in the request.

Important

Only small files can be sent as inline data because of limits on total request sizes; see input files and requirements for more details and size limits.

  • The data provided in the inline data part.

    Declaration

    Swift

    public var data: Data { get }
  • The IANA standard MIME type of the data.

    Declaration

    Swift

    public var mimeType: String { get }
  • Creates an inline data part from data and a MIME type.

    Important

    Supported input types depend on the model on the model being used; see input files and requirements for more details.

    Declaration

    Swift

    public init(data: Data, mimeType: String)

    Parameters

    data

    The data representation of an image, video, audio or document; see input files and requirements for supported media types.

    mimeType

    The IANA standard MIME type of the data, for example, "image/jpeg" or "video/mp4"; see input files and requirements for supported values.