MyScaleSettings#
- class langchain_community.vectorstores.myscale.MyScaleSettings[source]#
Bases:
BaseSettings
MyScale 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][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- 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: Dict[str, str] | None = None#
- param index_type: str = 'MSTG'#
- param metric: str = 'Cosine'#
- param password: str | None = None#
- param port: int = 8443#
- param table: str = 'langchain'#
- param username: str | None = None#
- classmethod settings_customise_sources(settings_cls: type[BaseSettings], init_settings: PydanticBaseSettingsSource, env_settings: PydanticBaseSettingsSource, dotenv_settings: PydanticBaseSettingsSource, file_secret_settings: PydanticBaseSettingsSource) tuple[PydanticBaseSettingsSource, ...] #
Define the sources and their order for loading the settings values.
- Parameters:
settings_cls (type[BaseSettings]) – The Settings class.
init_settings (PydanticBaseSettingsSource) – The InitSettingsSource instance.
env_settings (PydanticBaseSettingsSource) – The EnvSettingsSource instance.
dotenv_settings (PydanticBaseSettingsSource) – The DotEnvSettingsSource instance.
file_secret_settings (PydanticBaseSettingsSource) – The SecretsSettingsSource instance.
- Returns:
A tuple containing the sources and their order for loading the settings values.
- Return type:
tuple[PydanticBaseSettingsSource, …]