SQLServer_VectorStore(
self,
*,
connection: Optional[Connection] = None,
connection_string: str| Name | Type | Description |
|---|---|---|
connection | Optional[Connection] | Default: NoneOptional SQLServer connection. |
connection_string* | str | SQLServer connection string.
If the connection string does not contain a username & password
or
|
db_schema | Optional[str] | Default: None |
distance_strategy | DistanceStrategy | Default: DEFAULT_DISTANCE_STRATEGY |
embedding_function* | Embeddings | |
embedding_length* | int | |
relevance_score_fn | Optional[Callable[[float], float]] | Default: None |
table_name | str | Default: DEFAULT_TABLE_NAME |
batch_size | int | Default: DEFAULT_BATCH_SIZE |
| Name | Type |
|---|---|
| connection | Optional[Connection] |
| connection_string | str |
| db_schema | Optional[str] |
| distance_strategy | DistanceStrategy |
| embedding_function | Embeddings |
| embedding_length | int |
| relevance_score_fn | Optional[Callable[[float], float]] |
| table_name | str |
| batch_size | int |
SQL Server Vector Store.
This class provides a vector store interface for adding texts and performing similarity searches on the texts in SQL Server.
The schema in which the vector store will be created. This schema must exist and the user must have permissions to the schema.
The distance strategy to use for comparing embeddings. Default value is COSINE. Available options are:
Any embedding function implementing
langchain.embeddings.base.Embeddings interface.
The length (dimension) of the vectors to be stored in the table. Note that only vectors of same size can be added to the vector store.
Relevance score funtion to be used. Optional param, defaults to None.
The name of the table to use for storing embeddings.
Default value is sqlserver_vectorstore.
Number of documents/texts to be inserted at once to Db, max 419.