langchain.vectorstores.myscale.MyScaleSettings¶
- class langchain.vectorstores.myscale.MyScaleSettings(_env_file: Optional[Union[str, PathLike, List[Union[str, PathLike]], Tuple[Union[str, PathLike], ...]]] = '<object object>', _env_file_encoding: Optional[str] = None, _env_nested_delimiter: Optional[str] = None, _secrets_dir: Optional[Union[str, PathLike]] = None, *, host: str = 'localhost', port: int = 8443, username: Optional[str] = None, password: Optional[str] = None, index_type: str = 'IVFFLAT', index_param: Optional[Dict[str, str]] = None, column_map: Dict[str, str] = {'id': 'id', 'metadata': 'metadata', 'text': 'text', 'vector': 'vector'}, database: str = 'default', table: str = 'langchain', metric: str = 'cosine')[source]¶
Bases:
BaseSettingsMyScale Client Configuration
- Attribute:
- myscale_host (str)An URL to connect to MyScale backend.
Defaults to ‘localhost’.
myscale_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. index_type (str): index type string. index_param (dict): index build parameter. 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 (‘l2’, ‘cosine’, ‘ip’). Defaults to ‘cosine’.
- 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’, ‘vector’: ‘text_embedding’, ‘text’: ‘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] = {'id': 'id', 'metadata': 'metadata', 'text': 'text', 'vector': 'vector'}¶
- param database: str = 'default'¶
- param host: str = 'localhost'¶
- param index_param: Optional[Dict[str, str]] = None¶
- param index_type: str = 'IVFFLAT'¶
- param metric: str = 'cosine'¶
- param password: Optional[str] = None¶
- param port: int = 8443¶
- param table: str = 'langchain'¶
- param username: Optional[str] = None¶