Gemini.Types.FileSearchDocument (GeminiEx v0.8.4)

View Source

Represents a document within a File Search Store.

This is similar to the regular Document type but specific to file search stores. Documents are created when files are imported into the store.

Summary

Types

Document state in the file search store.

t()

A document in a file search store.

Functions

Checks if the document is active.

Creates a FileSearchDocument from API response.

Parses document state from API string.

Types

document_state()

@type document_state() :: :state_unspecified | :processing | :active | :failed

Document state in the file search store.

t()

@type t() :: %Gemini.Types.FileSearchDocument{
  chunk_count: integer() | nil,
  create_time: String.t() | nil,
  display_name: String.t() | nil,
  error: map() | nil,
  mime_type: String.t() | nil,
  name: String.t() | nil,
  size_bytes: integer() | nil,
  state: document_state() | nil,
  update_time: String.t() | nil
}

A document in a file search store.

Fields

  • name - Resource name (e.g., "fileSearchStores/abc/documents/xyz")
  • display_name - Human-readable name
  • state - Processing state
  • create_time - When the document was created
  • update_time - Last update timestamp
  • size_bytes - Document size in bytes
  • mime_type - MIME type of the document
  • chunk_count - Number of chunks for indexing
  • error - Error details if processing failed

Functions

active?(arg1)

@spec active?(t()) :: boolean()

Checks if the document is active.

from_api_response(response)

@spec from_api_response(map()) :: t()

Creates a FileSearchDocument from API response.

parse_state(arg1)

@spec parse_state(String.t() | nil) :: document_state() | nil

Parses document state from API string.