Geminix.V1beta.Corpus (geminix v0.2.0)

A Corpus is a collection of Documents. A project can create up to 10 corpora.

Fields:

  • :create_time (DateTime.t/0) - Output only. The Timestamp of when the Corpus was created.
  • :display_name (binary/0) - Optional. The human-readable display name for the Corpus. The display name must be no more than 512 characters in length, including spaces. Example: "Docs on Semantic Retriever"
  • :name (binary/0) - Output only. Immutable. Identifier. The Corpus resource name. The ID (name excluding the "corpora/" 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: corpora/my-awesome-corpora-123a456b789c
  • :update_time (DateTime.t/0) - Output only. The Timestamp of when the Corpus was last updated.

Summary

Functions

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

Types

t()

@type t() :: %Geminix.V1beta.Corpus{
  __meta__: term(),
  create_time: DateTime.t(),
  display_name: binary(),
  name: 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.Corpus.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.