database#
Attributes#
Functions#
Module Contents#
- database.db#
- database.db_init(path=str(janus_dir / 'chroma.db'), url='')#
- database.db_status()#
- database.db_ls(collection_name=None, peek=None)#
List the current database’s collections
- database.db_add(collection_name, model_name, input_dir='./', input_lang='python', max_tokens=4096)#
Add a collection to the database
- Parameters:
collection_name (typing_extensions.Annotated[str, typer.Argument(help='The name of the collection.')]) – The name of the collection to add
model_name (typing_extensions.Annotated[str, typer.Argument(help='The name of the embedding model.')]) – The name of the embedding model to use
input_dir (typing_extensions.Annotated[str, typer.Option('--input', '-i', help='The directory containing the source code to be added.')]) – The directory containing the source code to be added
input_lang (typing_extensions.Annotated[str, typer.Option('--language', '-l', help='The language of the source code.')]) – The language of the source code
max_tokens (typing_extensions.Annotated[int, typer.Option('--max-tokens', '-m', help='The maximum number of tokens for each chunk of input source code.')]) – The maximum number of tokens for each chunk of input source code
- Return type:
None
- database.db_rm(collection_name, confirm)#
Remove a collection from the database