mirror of
https://github.com/langflow-ai/langflow.git
synced 2026-07-24 13:29:52 +08:00
fix: Problem checking Clickhouse connection when port is different from default (#5981)
* fix: Problem checking clickhouse connection when port is different from default * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
2043b2f4f7
commit
22fa4cf088
@ -49,7 +49,7 @@ class ClickhouseVectorStoreComponent(LCVectorStoreComponent):
|
||||
value=False,
|
||||
advanced=True,
|
||||
),
|
||||
StrInput(name="index_param", display_name="Param of the index", value="'L2Distance',100", advanced=True),
|
||||
StrInput(name="index_param", display_name="Param of the index", value="100,'L2Distance'", advanced=True),
|
||||
DictInput(name="index_query_params", display_name="index query params", advanced=True),
|
||||
*LCVectorStoreComponent.inputs,
|
||||
HandleInput(name="embedding", display_name="Embedding", input_types=["Embeddings"]),
|
||||
@ -75,7 +75,9 @@ class ClickhouseVectorStoreComponent(LCVectorStoreComponent):
|
||||
raise ImportError(msg) from e
|
||||
|
||||
try:
|
||||
client = clickhouse_connect.get_client(host=self.host, username=self.username, password=self.password)
|
||||
client = clickhouse_connect.get_client(
|
||||
host=self.host, port=self.port, username=self.username, password=self.password
|
||||
)
|
||||
client.command("SELECT 1")
|
||||
except Exception as e:
|
||||
msg = f"Failed to connect to Clickhouse: {e}"
|
||||
|
||||
Reference in New Issue
Block a user