要求
- 您的 LangSmith 实例将具有网络访问权限的已配置 PostgreSQL 数据库。我们建议使用托管 PostgreSQL 服务,例如:
- 注意:我们仅正式支持 PostgreSQL 版本 >= 14。
- 具有 PostgreSQL 数据库管理员访问权限的用户。此用户将用于创建必要的表、索引和架构。
- 此用户还需要具有在数据库中创建扩展的能力。我们使用/将尝试安装 btree_gin、btree_gist、pgcrypto、citext、ltree 和 pg_trgm 扩展。
- 如果使用非 public 的架构,请确保没有启用扩展的任何其他架构,或者必须将其包含在搜索路径中。
-
pgbouncer 和其他连接池器的支持是基于社区的。社区成员报告说 pgbouncer 在
pool_mode=session和ignore_startup_parameters的合适设置下工作(截至撰写时,需要忽略search_path和lock_timeout)。需要注意避免污染连接池;建议具有一定的 PostgreSQL 专业知识。LangChain Inc 目前没有正式测试覆盖率或商业支持 pgbouncer 或 amazon rds proxy 或任何其他池器的路线图计划,但欢迎社区通过 GitHub 问题讨论和协作支持。 - 默认情况下,我们建议至少具有 2 个 vCPU 和 8GB 内存的实例。但是,实际要求将取决于您的工作负载和用户数量。我们建议监控您的 PostgreSQL 实例并根据需要扩展。
Connection String
You will need to provide a connection string to your PostgreSQL database. This connection string should include the following information:- Host
- Port
- Database
- Username
- Password(Make sure to url encode this if there are any special characters)
- URL params
Configuration
With your connection string in hand, you can configure your LangSmith instance to use an external PostgreSQL database. You can do this by modifying thevalues file for your LangSmith Helm Chart installation or the .env file for your Docker installation.