janus.embedding.collections#

Classes#

Collections

Manage embedding collections

Module Contents#

class janus.embedding.collections.Collections(client, config=None)#

Manage embedding collections

Parameters:
  • client (chromadb.Client) –

  • config (Optional[Dict[str, str]]) –

create(name, model_name=None)#

Create a Chroma collection for the given embedding type.

Parameters:
Return type:

langchain_community.vectorstores.Chroma

get_or_create(name, model_name=None)#

Create a Chroma collection for the given embedding type.

Parameters:
Return type:

langchain_community.vectorstores.Chroma

get(name=None)#

Get the Chroma collections.

Returns:

The Chroma collections. Raises ValueError if not found.

Parameters:

name (None | janus.utils.enums.EmbeddingType | str) –

Return type:

Sequence[chromadb.Collection]

delete(name)#

Delete a Chroma collection

Parameters:

name (janus.utils.enums.EmbeddingType | str) –

Return type:

None