lancedb
langroid/vector_store/lancedb.py
LanceDB(config=LanceDBConfig())
¶
Bases: VectorStore
Source code in langroid/vector_store/lancedb.py
clear_all_collections(really=False, prefix='')
¶
Clear all collections with the given prefix.
Source code in langroid/vector_store/lancedb.py
list_collections(empty=False)
¶
Returns:
Type | Description |
---|---|
List[str]
|
List of collection names that have at least one vector. |
Parameters:
Name | Type | Description | Default |
---|---|---|---|
empty |
bool
|
Whether to include empty collections. |
False
|
Source code in langroid/vector_store/lancedb.py
add_dataframe(df, content='content', metadata=[])
¶
Add a dataframe to the collection. Args: df (pd.DataFrame): A dataframe content (str): The name of the column in the dataframe that contains the text content to be embedded using the embedding model. metadata (List[str]): A list of column names in the dataframe that contain metadata to be stored in the database. Defaults to [].