| Name | Type | Description |
|---|---|---|
connection | Optional[Any] | Default: NoneLanceDB connection to use. If not provided, a new connection will be created. |
embedding | Optional[Embeddings] | Default: NoneEmbedding to use for the vectorstore. |
vector_key | Optional[str] | Default: 'vector' |
id_key | Optional[str] | Default: 'id' |
text_key | Optional[str] | Default: 'text' |
table_name | Optional[str] | Default: 'vectorstore' |
api_key | Optional[str] | Default: None |
region | Optional[str] | Default: None |
mode | Optional[str] | Default: 'overwrite' |
| Name | Type |
|---|---|
| connection | Optional[Any] |
| embedding | Optional[Embeddings] |
| uri | Optional[str] |
| vector_key | Optional[str] |
| id_key | Optional[str] |
| text_key | Optional[str] |
| table_name | Optional[str] |
| api_key | Optional[str] |
| region | Optional[str] |
| mode | Optional[str] |
| table | Optional[Any] |
| distance | Optional[str] |
| reranker | Optional[Any] |
| relevance_score_fn | Optional[Callable[[float], float]] |
| limit | int |
LanceDB vector store.
To use, you should have lancedb python package installed.
You can install it with pip install lancedb.
Example:
.. code-block:: python vectorstore = LanceDB(uri='/lancedb', embedding_function) vectorstore.add_texts(['text1', 'text2']) result = vectorstore.similarity_search('text1')
Key to use for the vector in the database. Defaults to vector.
Key to use for the id in the database. Defaults to id.
Key to use for the text in the database. Defaults to text.
Name of the table to use. Defaults to vectorstore.
API key to use for LanceDB cloud database.
Region to use for LanceDB cloud database.
Mode to use for adding data to the table. Valid values are
append and overwrite. Defaults to overwrite.