UpstashRedisByteStore 所有特性和配置的详细文档,请参阅 API 参考。
概述
UpstashRedisStore 是 ByteStore 的一个实现,将所有内容存储在你的 Upstash 托管 Redis 实例中。
如需使用基础 RedisStore,请参阅本指南。
集成详情
| 类 | 包 | 本地支持 | JS 支持 | 下载量 | 版本 |
|---|---|---|---|---|---|
| UpstashRedisByteStore | langchain-community | ❌ | ✅ |
配置
首先需要注册 Upstash 账户,然后创建一个 Redis 数据库进行连接。凭据
创建数据库后,获取数据库 URL(不要忘记https://!)和 token:
安装
LangChain Upstash 集成位于langchain-community 包中。还需要安装 upstash-redis 包作为对等依赖:
实例化
现在可以实例化字节存储:使用方法
可以使用mset 方法在键下设置数据:
mdelete 方法删除数据:
API 参考
有关UpstashRedisByteStore 所有特性和配置的详细文档,请参阅 API 参考:python.langchain.com/api_reference/community/storage/langchain_community.storage.upstash_redis.UpstashRedisByteStore.html
连接这些文档 到 Claude、VSCode 等,通过 MCP 获取实时解答。

