mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-01 00:49:25 +00:00
community[minor]: clickhouse -- ability to use secure connection (#22108)
- **Description:** this PR gives clickhouse client the ability to use a secure connection to the clickhosue server - **Issue:** fixes #22082 - **Dependencies:** - - **Twitter handle:** `_codingcoffee_` Signed-off-by: Ameya Shenoy <shenoy.ameya@gmail.com> Co-authored-by: Shresth Rana <shresth@grapevine.in>
This commit is contained in:
parent
9a010fb761
commit
8ba492ed6a
@ -39,6 +39,7 @@ class ClickhouseSettings(BaseSettings):
|
||||
port (int) : URL port to connect with HTTP. Defaults to 8443.
|
||||
username (str) : Username to login. Defaults to None.
|
||||
password (str) : Password to login. Defaults to None.
|
||||
secure (bool) : Connect to server over secure connection. Defaults to False.
|
||||
index_type (str): index type string.
|
||||
index_param (list): index build parameter.
|
||||
index_query_params(dict): index query parameters.
|
||||
@ -72,6 +73,8 @@ class ClickhouseSettings(BaseSettings):
|
||||
username: Optional[str] = None
|
||||
password: Optional[str] = None
|
||||
|
||||
secure: bool = False
|
||||
|
||||
index_type: Optional[str] = "annoy"
|
||||
# Annoy supports L2Distance and cosineDistance.
|
||||
index_param: Optional[Union[List, Dict]] = ["'L2Distance'", 100]
|
||||
@ -193,6 +196,7 @@ class Clickhouse(VectorStore):
|
||||
port=self.config.port,
|
||||
username=self.config.username,
|
||||
password=self.config.password,
|
||||
secure=self.config.secure,
|
||||
**kwargs,
|
||||
)
|
||||
# Enable JSON type
|
||||
|
Loading…
Reference in New Issue
Block a user