本页面介绍如何在 LangChain 中使用 Postgres PGVector 生态系统。 它分为两部分:安装和设置,然后是特定 PGVector 包装器的参考。Documentation Index
Fetch the complete documentation index at: https://langchain-zh.cn/llms.txt
Use this file to discover all available pages before exploring further.
安装
- 使用
pip install pgvector安装 Python 包
设置
-
第一步是创建一个已安装
pgvector扩展的数据库。 请按照 PGVector 安装步骤 中的步骤安装数据库和扩展。docker 镜像是最简单的入门方式。
封装
VectorStore
存在一个围绕 Postgres 向量数据库的封装,允许您将其用作向量存储, 无论是用于语义搜索还是示例选择。 要导入此向量存储:用法
有关 PGVector 封装的更详细逐步指南,请参阅 此笔记本Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

