mirror of
https://github.com/lancedb/lancedb.git
synced 2026-01-05 11:22:58 +00:00
Fix up docs (#477)
This commit is contained in:
@@ -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
|
||||
--------
|
||||
|
||||
@@ -17,5 +17,6 @@ from .functions import (
|
||||
EmbeddingFunctionModel,
|
||||
EmbeddingFunctionRegistry,
|
||||
SentenceTransformerEmbeddingFunction,
|
||||
TextEmbeddingFunctionModel,
|
||||
)
|
||||
from .utils import with_embeddings
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user