Skip to main content

ClickHouse

Bundles 包含支援與 AgentBuilder 特定第三方整合的自訂Components。

此頁面描述 ClickHouse bundle 中可用的Components。

ClickHouse 向量儲存

ClickHouse Components使用 ClickHouse 向量儲存實例讀取和寫入 ClickHouse 向量儲存。

關於向量儲存實例

Because AgentBuilder 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 AgentBuilder. For information about specific options, see the LangChain API reference and vector store provider's documentation.

如果您使用向量儲存Components查詢您的向量資料庫,它會產生搜尋結果,您可以將其作為 Data 物件清單或表格 DataFrame 傳遞給FLOW中的下游Components。 如果支援兩種類型,您可以在視覺編輯器中向量儲存Components的輸出連接埠附近設定格式。

tip

如需在 Flow中使用向量資料庫的教學,請參閱建立向量 RAG 聊天機器人

ClickHouse 參數

您可以檢查向量儲存Components的參數,以深入了解它接受的輸入、支援的功能以及如何配置它。

某些參數在視覺編輯器中預設為隱藏。 您可以透過 Components的標頭選單 中的 Controls 修改所有參數。

某些參數是條件性的,只有在您設定其他參數或為其他參數選取特定選項後才可用。 條件參數在您設定所需的依賴項之前,可能不會在 Controls 窗格中顯示。

如需接受值和功能的資訊,請參閱 ClickHouse 文件 或檢查Components程式碼

NameDisplay NameInfo
hosthostname輸入參數。ClickHouse 伺服器主機名稱。必要。預設值:localhost
portport輸入參數。ClickHouse 伺服器連接埠。必要。預設值:8123
databasedatabase輸入參數。ClickHouse 資料庫名稱。必要。
tableTable name輸入參數。ClickHouse 資料表名稱。必要。
usernameUsername輸入參數。ClickHouse 用於驗證的使用者名稱。必要。
passwordPassword輸入參數。ClickHouse 用於驗證的密碼。必要。
index_typeindex_type輸入參數。索引類型,可以是 annoy(預設)或 vector_similarity
metricmetric輸入參數。計算相似性搜尋距離的指標。選項包括 angular(預設)、euclideanmanhattanhammingdot
secureUse HTTPS/TLS輸入參數。如果為 true,為 ClickHouse 伺服器啟用 HTTPS/TLS,並覆蓋介面或連接埠引數的推斷值。預設值:false
index_paramParam of the index輸入參數。索引參數。預設值:100,'L2Distance'
index_query_paramsindex query params輸入參數。額外的索引查詢參數。
search_querySearch Query輸入參數。相似性搜尋的查詢字串。僅與讀取相關。
ingest_dataIngest Data輸入參數。要載入到向量儲存的記錄。
cache_vector_storeCache Vector Store輸入參數。如果為 true,Components會在記憶體中快取向量儲存以加快讀取速度。預設值:啟用(true)。
embeddingEmbedding輸入參數。要使用的嵌入模型。
number_of_resultsNumber of Results輸入參數。要返回的搜尋結果數量。預設值:4。僅與讀取相關。
score_thresholdScore threshold輸入參數。相似性分數比較的閾值。預設值:未設定(無閾值)。僅與讀取相關。
Search