Construct an instance of QdrantVectorStore from a list of texts.
This is a user-friendly interface that:
This is intended to be a quick way to get started.
from langchain_qdrant import Qdrant
from langchain_openai import OpenAIEmbeddings
embeddings = OpenAIEmbeddings()
qdrant = Qdrant.from_texts(texts, embeddings, url="http://localhost:6333")from_texts(
cls: type[QdrantVectorStore],
texts: list[str],
embedding: Embeddings | None = None,
metadatas: list[dict] | None = None,
ids: Sequence[str | int] | None = None,
collection_name: str | None = None,
location: str | None = None,
url: str | None = None,
port: int | None = 6333,
grpc_port: int = 6334,
prefer_grpc: bool = False,
https: bool | None = None,
api_key: str | None = None,
prefix: str | None = None,
timeout: int | None = None,
host: str | None = None,
path: str | None = None,
distance: models.Distance = models.Distance.COSINE,
content_payload_key: str = CONTENT_KEY,
metadata_payload_key: str = METADATA_KEY,
vector_name: str = VECTOR_NAME,
retrieval_mode: RetrievalMode = RetrievalMode.DENSE,
sparse_embedding: SparseEmbeddings | None = None,
sparse_vector_name: str = SPARSE_VECTOR_NAME,
collection_create_options: dict[str, Any] | None = None,
vector_params: dict[str, Any] | None = None,
sparse_vector_params: dict[str, Any] | None = None,
batch_size: int = 64,
force_recreate: bool = False,
validate_embeddings: bool = True,
validate_collection_config: bool = True,
**kwargs: Any = {}
) -> QdrantVectorStore