Skip to main content

Documentation Index

Fetch the complete documentation index at: https://nvd-54.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

This page covers how to use the Postgres PGVector ecosystem within LangChain It is broken into two parts: installation and setup, and then references to specific PGVector wrappers.

安装

  • Install the Python 包 with pip install pgvector

设置

  1. The first step is to create a database with the pgvector extension installed. Follow the steps at PGVector Installation Steps to install the database and the extension. The docker image is the easiest way to get started.

Wrappers

向量存储

存在一个围绕 Postgres 向量数据库的封装器,允许您将其用作向量存储, 无论是用于语义搜索还是示例选择。 要导入此向量存储:
from langchain_community.vectorstores.pgvector import PGVector

使用方法

有关 PGVector Wrapper, see this notebook