跳到主要内容

Redis

捆绑包 (Bundles) 包含支持特定第三方与 Langflow 集成的自定义组件。

本页介绍了 Redis 捆绑包中可用的组件。

Redis 聊天记忆 (Redis Chat Memory)

Redis 聊天记忆 (Redis Chat Memory) 组件使用 Redis 内存存储检索和存储聊天消息。

聊天记忆在内存存储组件之间作为 Memory 数据类型传递。

有关在流中使用外部聊天记忆的更多信息,请参阅 消息历史 (Message History) 组件

Redis 聊天记忆参数

Some parameters are hidden by default in the visual editor. You can modify all parameters through the Controls in the component's header menu.

名称显示名称信息
hosthostname输入参数。IP 地址或主机名。
portport输入参数。Redis 端口号。
databasedatabase输入参数。Redis 数据库。
usernameUsername输入参数。Redis 用户名。
passwordPassword输入参数。该用户名的密码。
key_prefixKey prefix输入参数。键前缀。
session_idSession ID输入参数。消息的唯一会话标识符。

Redis 向量存储 (Redis Vector Store)

Redis 向量存储组件使用 RedisVectorStore 实例读写 Redis 向量存储。

关于向量存储实例

Because Langflow is based on LangChain, vector store components use an instance of LangChain vector store to drive the underlying read and write functions. These instances are provider-specific and configured according to the component's parameters, such as the connection string, index name, and schema.

In component code, this is often instantiated as vector_store, but some vector store components use a different name, such as the provider name.

Some LangChain classes don't expose all possible options as component parameters. Depending on the provider, these options might use default values or allow modification through environment variables, if they are supported in Langflow. For information about specific options, see the LangChain API reference and vector store provider's documentation.

If you use a vector store component to query your vector database, it produces search results that you can pass to downstream components in your flow as a list of Data objects or a tabular DataFrame. If both types are supported, you can set the format near the vector store component's output port in the visual editor.

提示

有关在流中使用向量数据库的教程,请参阅 创建向量 RAG 聊天机器人.

Redis 向量存储参数

您可以检查向量存储组件的参数,以了解更多关于它接受的输入、支持的功能以及如何配置它的信息。

Some parameters are hidden by default in the visual editor. You can modify all parameters through the Controls in the component's header menu.

Some parameters are conditional, and they are only available after you set other parameters or select specific options for other parameters. Conditional parameters may not be visible on the Controls pane until you set the required dependencies.

有关可接受的值和功能的详细信息,请参阅 Redis 文档 或检查 组件代码

名称类型描述
redis_server_urlSecretString输入参数。Redis 服务器连接字符串。
redis_index_nameString输入参数。Redis 索引的名称。
codeString输入参数。Redis 的其他自定义代码(如果支持)。
schemaString输入参数。Redis 索引的架构。
ingest_dataData输入参数。要摄入向量存储的数据。
search_queryString输入参数。用于相似性搜索的查询语句。
embeddingEmbeddings输入参数。要使用的嵌入函数。
number_of_resultsInteger输入参数。搜索返回的结果数量。
Search