Skip to main content
Open on GitHub

DashVector

DashVector is a fully-managed vectorDB service that supports high-dimension dense and sparse vectors, real-time insertion and filtered search. It is built to scale automatically and can adapt to different application requirements.

本文档演示如何在 LangChain 生态系统中利用 DashVector。具体来说,它展示了如何安装 DashVector,以及如何将其用作 LangChain 中的 VectorStore 插件。 文档分为两部分:第一部分是安装和设置,第二部分是关于特定 DashVector 包装器的引用。

安装与设置

安装 Python SDK:

pip install dashvector

您必须拥有一个API密钥。以下是 安装说明

嵌入模型

from langchain_community.embeddings import DashScopeEmbeddings
API 参考:DashScopeEmbeddings

查看 使用示例

向量存储

DashVector 集合被封装为一个熟悉的向量存储库,以便在 LangChain 中原生使用,这使得它能够轻松应用于各种场景,例如语义搜索或示例选择。

你可以通过以下方式导入向量存储:

from langchain_community.vectorstores import DashVector
API 参考:DashVector

有关DashVector包装器的详细指南,请参阅 此笔记本