Create a SQL Server vectorStore initialized from texts and embeddings.
from_texts(
cls: Type[SQLServer_VectorStore],
texts: List[str],
embedding: Embeddings,
metadatas: Optional[List[dict]] = None,
connection_string: str = str(),
embedding_length: int = 0,
table_name: str = DEFAULT_TABLE_NAME,
db_schema: Optional[str] = None,
distance_strategy: DistanceStrategy = DEFAULT_DISTANCE_STRATEGY,
ids: Optional[List[str]] = None,
batch_size: int = DEFAULT_BATCH_SIZE,
**kwargs: Any = {}
) -> SQLServer_VectorStore| 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: NoneOptional list of metadatas (python dicts) associated with the input texts. |
connection_string | str | Default: str()SQLServer connection string.
If the connection string does not contain a username & password
or
|
embedding_length | int | Default: 0The 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. |
table_name | str | Default: DEFAULT_TABLE_NAMEThe name of the table to use for storing embeddings. |
db_schema | Optional[str] | Default: NoneThe schema in which the vector store will be created. This schema must exist and the user must have permissions to the schema. |
distance_strategy | DistanceStrategy | Default: DEFAULT_DISTANCE_STRATEGYThe distance strategy to use for comparing embeddings. Default value is COSINE. Available options are:
|
ids | Optional[List[str]] | Default: NoneOptional list of IDs for the input texts. |
batch_size | int | Default: DEFAULT_BATCH_SIZENumber of texts to be inserted at once to Db, max MAX_BATCH_SIZE. |
**kwargs | Any | Default: {}vectorstore specific parameters. |