Geminix.V1beta.Document (geminix v0.2.0)

A Document is a collection of Chunks.

Fields:

  • :create_time (DateTime.t/0) - Output only. The Timestamp of when the Document was created.
  • :custom_metadata (list of Geminix.V1beta.CustomMetadata.t/0) - Optional. User provided custom metadata stored as key-value pairs used for querying. A Document can have a maximum of 20 CustomMetadata.
  • :display_name (binary/0) - Optional. The human-readable display name for the Document. The display name must be no more than 512 characters in length, including spaces. Example: "Semantic Retriever Documentation"
  • :mime_type (binary/0) - Output only. The mime type of the Document.
  • :name (binary/0) - Immutable. Identifier. The Document resource name. The ID (name excluding the "fileSearchStores/*/documents/" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end with a dash. If the name is empty on create, a unique name will be derived from display_name along with a 12 character random suffix. Example: fileSearchStores/{file_search_store_id}/documents/my-awesome-doc-123a456b789c
  • :size_bytes (binary/0) - Output only. The size of raw bytes ingested into the Document.
  • :state (binary/0) - Output only. Current state of the Document.
  • :update_time (DateTime.t/0) - Output only. The Timestamp of when the Document was last updated.

Summary

Functions

Create a Geminix.V1beta.Document.t/0 from a map returned by the Gemini API.

Types

t()

@type t() :: %Geminix.V1beta.Document{
  __meta__: term(),
  create_time: DateTime.t(),
  custom_metadata: [Geminix.V1beta.CustomMetadata.t()],
  display_name: binary(),
  mime_type: binary(),
  name: binary(),
  size_bytes: binary(),
  state: binary(),
  update_time: DateTime.t()
}

Functions

from_map(schema \\ %__MODULE__{}, map)

@spec from_map(t(), map()) :: {:ok, t()} | {:error, Ecto.Changeset.t()}

Create a Geminix.V1beta.Document.t/0 from a map returned by the Gemini API.

Sometimes, this function should not be applied to the full response body, but instead it should be applied to the correct part of the map in the response body. This depends on the concrete API call.