跳到主要内容

ClickHouse

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

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

ClickHouse 向量存储 (ClickHouse vector store)

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

关于向量存储实例

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 聊天机器人

ClickHouse 参数

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

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.

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

名称显示名称信息
host主机名输入参数。ClickHouse 服务器主机名。必填。默认值:localhost
port端口输入参数。ClickHouse 服务器端口。必填。默认值:8123
database数据库输入参数。ClickHouse 数据库名称。必填。
table表名输入参数。ClickHouse 表名。必填。
username用户名输入参数。用于身份验证的 ClickHouse 用户名。必填。
password密码输入参数。用于身份验证的 ClickHouse 密码。必填。
index_type索引类型输入参数。索引类型,为 annoy(默认)或 vector_similarity
metric指标输入参数。用于计算相似性搜索距离的指标。选项为 angular(默认)、euclideanmanhattanhammingdot
secure使用 HTTPS/TLS输入参数。如果为 true,则为 ClickHouse 服务器启用 HTTPS/TLS,并覆盖接口或端口参数的推断值。默认值:false
index_param索引参数输入参数。索引参数。默认值:100,'L2Distance'
index_query_params索引查询参数输入参数。额外的索引查询参数。
search_query搜索查询输入参数。相似性搜索的查询字符串。仅与读取相关。
ingest_data摄取数据输入参数。要加载到向量存储中的记录。
cache_vector_store缓存向量存储输入参数。如果为 true,组件将在内存中缓存向量存储以实现更快的读取。默认值:启用 (true)。
embedding嵌入输入参数。要使用的嵌入模型。
number_of_results结果数量输入参数。要返回的搜索结果数量。默认值:4。仅与读取相关。
score_threshold分数阈值输入参数。相似性分数比较的阈值。默认值:未设置(无阈值)。仅与读取相关。
Search