Fix up docs (#477)

This commit is contained in:
Chang She
2023-09-05 22:29:50 -07:00
committed by GitHub
parent 9a9a73a65d
commit 32163063dc
5 changed files with 18 additions and 2 deletions

View File

@@ -31,9 +31,13 @@ def connect(
----------
uri: str or Path
The uri of the database.
api_token: str, optional
api_key: str, optional
If presented, connect to LanceDB cloud.
Otherwise, connect to a database on file system or cloud storage.
region: str, default "us-west-2"
The region to use for LanceDB Cloud.
host_override: str, optional
The override url for LanceDB Cloud.
Examples
--------

View File

@@ -17,5 +17,6 @@ from .functions import (
EmbeddingFunctionModel,
EmbeddingFunctionRegistry,
SentenceTransformerEmbeddingFunction,
TextEmbeddingFunctionModel,
)
from .utils import with_embeddings

View File

@@ -169,6 +169,10 @@ class TextEmbeddingFunctionModel(EmbeddingFunctionModel):
@REGISTRY.register()
class SentenceTransformerEmbeddingFunction(TextEmbeddingFunctionModel):
"""
An embedding function that uses the sentence-transformers library
"""
name: str = "all-MiniLM-L6-v2"
device: str = "cpu"
normalize: bool = False

View File

@@ -231,6 +231,7 @@ class Table(ABC):
self,
query: Optional[Union[VEC, str]] = None,
vector_column_name: str = VECTOR_COLUMN_NAME,
query_type: str = "auto",
) -> LanceQueryBuilder:
"""Create a search query to find the nearest neighbors
of the given query vector.