from_texts(
cls: Type[SQLServer_VectorStore],
texts: List[str]| Name | Type | Description |
|---|---|---|
texts* | List[str] | Iterable of strings to add into the vectorstore. |
embedding* | Embeddings | Any embedding function implementing
|
metadatas | Optional[List[dict]] | Default: None |
connection_string | str | Default: str() |
embedding_length | int | Default: 0 |
table_name | str | Default: DEFAULT_TABLE_NAME |
db_schema | Optional[str] | Default: None |
distance_strategy | DistanceStrategy | Default: DEFAULT_DISTANCE_STRATEGY |
ids | Optional[List[str]] | Default: None |
batch_size | int | Default: DEFAULT_BATCH_SIZE |
**kwargs | Any | Default: {} |
Create a SQL Server vectorStore initialized from texts and embeddings.
Optional list of metadatas (python dicts) associated with the input texts.
SQLServer connection string.
If the connection string does not contain a username & password
or TrustedConnection=yes, Entra ID authentication is used.
SQL Server ODBC connection string can be retrieved from the
Connection strings pane of the database in Azure portal.
Sample connection string format:
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.
The name of the table to use for storing embeddings.
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:
Optional list of IDs for the input texts.
Number of texts to be inserted at once to Db, max MAX_BATCH_SIZE.
vectorstore specific parameters.