DashVector(
self,
collection: Any,
embedding: Embeddings,
text_field: str
)| Name | Type |
|---|---|
| collection | Any |
| embedding | Embeddings |
| text_field | str |
DashVector vector store.
To use, you should have the dashvector python package installed.
Example:
.. code-block:: python
from langchain_community.vectorstores import DashVector from langchain_community.embeddings.openai import OpenAIEmbeddings import dashvector
client = dashvector.Client(api_key="***") client.create("langchain", dimension=1024) collection = client.get("langchain") embeddings = OpenAIEmbeddings() vectorstore = DashVector(collection, embeddings.embed_query, "text")
Run more texts through the embeddings and add to the vectorstore.
Delete by vector ID.
Return docs most similar to query.
Return docs most similar to query text , alone with relevance scores.
Less is more similar, more is more dissimilar.
Return docs most similar to embedding vector.
Return docs selected using the maximal marginal relevance.
Maximal marginal relevance optimizes for similarity to query AND diversity among selected documents.
Return docs selected using the maximal marginal relevance.
Maximal marginal relevance optimizes for similarity to query AND diversity among selected documents.
Return DashVector VectorStore initialized from texts and embeddings.
This is the quick way to get started with dashvector vector store.