Chroma.Collection (chroma v0.1.0)
Chroma Collection methods.
Summary
Functions
Counts all embeddings from a collection.
Creates a collection.
Creates an index for a collection.
Deletes a collection by name.
Gets a collection by name.
Gets or create a collection by name.
Lists all collections.
Creates a new Chroma.Collection
struct.
Functions
Link to this function
count(collection)
@spec count(%Chroma.Collection{id: any(), metadata: term(), name: term()}) :: {:error, any()} | {:ok, any()}
Counts all embeddings from a collection.
Link to this function
create(name, metadata \\ %{})
@spec create(String.t(), map()) :: {:error, any()} | {:ok, %Chroma.Collection{id: any(), metadata: any(), name: any()}}
Creates a collection.
Link to this function
create_index(collection)
@spec create_index(%Chroma.Collection{id: any(), metadata: term(), name: term()}) :: {:error, any()} | {:ok, any()}
Creates an index for a collection.
Link to this function
delete(collection)
@spec delete(%Chroma.Collection{id: term(), metadata: term(), name: String.t()}) :: {:error, any()} | {:ok, any()}
Deletes a collection by name.
Link to this function
get(name)
@spec get(any()) :: {:error, any()} | {:ok, %Chroma.Collection{id: any(), metadata: any(), name: any()}}
Gets a collection by name.
Link to this function
get_or_create(name, metadata \\ %{})
@spec get_or_create(String.t(), map()) :: {:error, any()} | {:ok, %Chroma.Collection{id: any(), metadata: any(), name: any()}}
Gets or create a collection by name.
Link to this function
list()
Lists all collections.
Link to this function
modify(collection, kwargs)
Link to this function
new(map)
Creates a new Chroma.Collection
struct.
Examples:
iex> Chroma.Collection.new(%{"id" => "123", "name" => "my_collection", "metadata" => %{}})
%Chroma.Collection{id: "123", name: "my_collection", metadata: %{}}
Link to this function
query(collection, embeddings, options)
Link to this function
update(collection, embeddings)
Link to this function