effect-io-ai

Package: @effect/ai
Module: Prompt

Prompt.FilePartEncoded

Encoded representation of file parts for serialization.

Signature

export interface FilePartEncoded extends BasePartEncoded<"file", FilePartOptions> {
  /**
   * MIME type of the file (e.g., "image/jpeg", "application/pdf").
   */
  readonly mediaType: string
  /**
   * Optional filename for the file.
   */
  readonly fileName?: string | undefined
  /**
   * File data as base64 string of data, a byte array, or a URL.
   */
  readonly data: string | Uint8Array | URL
}

Source

Since v1.0.0