ExChromaDb.Types (ex_chroma_db v0.1.0)

View Source

A module that provides some useful types for working with the Chroma DB API.

Summary

Types

collection_id()

@type collection_id() :: String.t()

collection_info()

@type collection_info() :: %{
  tenant_name: String.t(),
  database_name: String.t(),
  collection_name: String.t()
}

collection_meta_info()

@type collection_meta_info() :: %{
  tenant_name: String.t(),
  database_name: String.t(),
  collection_id: collection_id()
}

database_info()

@type database_info() :: %{tenant_name: String.t(), database_name: String.t()}

document()

@type document() :: String.t()

document_embedding()

@type document_embedding() :: [number()]

document_metadata()

@type document_metadata() :: map()

embedding_vector()

@type embedding_vector() :: [float()]

id()

@type id() :: String.t()

list_result(t)

@type list_result(t) :: {:ok, [t]} | {:error, any()}

one_result(t)

@type one_result(t) :: {:ok, t} | {:error, any()}

pagination()

@type pagination() :: %{limit: non_neg_integer(), offset: non_neg_integer()}

record_id()

@type record_id() :: String.t()

records()

@type records() :: %{
  ids: [record_id()],
  embeddings: [document_embedding()],
  metadatas: [document_metadata()],
  documents: [document()],
  uris: [uri()]
}

uri()

@type uri() :: String.t()