ClickhouseSettings#

class langchain_community.vectorstores.clickhouse.ClickhouseSettings[source]#

Bases: BaseSettings

ClickHouse client configuration.

Attribute:
host (str)An URL to connect to MyScale backend.

Defaults to ‘localhost’.

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. database (str) : Database name to find the table. Defaults to ‘default’. table (str) : Table name to operate on.

Defaults to ‘vector_table’.

metric (str)Metric to compute distance,

supported are (‘angular’, ‘euclidean’, ‘manhattan’, ‘hamming’, ‘dot’). Defaults to ‘angular’. spotify/annoy

column_map (Dict)Column type map to project column name onto langchain

semantics. Must have keys: text, id, vector, must be same size to number of columns. For example: .. code-block:: python

{

‘id’: ‘text_id’, ‘uuid’: ‘global_unique_id’ ‘embedding’: ‘text_embedding’, ‘document’: ‘text_plain’, ‘metadata’: ‘metadata_dictionary_in_json’,

}

Defaults to identity map.

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

param column_map: Dict[str, str] = {'document': 'document', 'embedding': 'embedding', 'id': 'id', 'metadata': 'metadata', 'uuid': 'uuid'}#
param database: str = 'default'#
param host: str = 'localhost'#
param index_param: List | Dict | None = ["'L2Distance'", 100]#
param index_query_params: Dict[str, str] = {}#
param index_type: str | None = 'annoy'#
param metric: str = 'angular'#
param password: str | None = None#
param port: int = 8123#
param secure: bool = False#
param table: str = 'langchain'#
param username: str | None = None#

Examples using ClickhouseSettings