mirror of
https://github.com/hwchase17/langchain
synced 2024-11-06 03:20:49 +00:00
Update default index type and metric type for MyScale vector store (#9353)
We update the default index type from `IVFFLAT` to `MSTG`, a new vector type developed by MyScale.
This commit is contained in:
parent
a9c86774da
commit
c215481531
@ -46,7 +46,7 @@ class MyScaleSettings(BaseSettings):
|
|||||||
table (str) : Table name to operate on.
|
table (str) : Table name to operate on.
|
||||||
Defaults to 'vector_table'.
|
Defaults to 'vector_table'.
|
||||||
metric (str) : Metric to compute distance,
|
metric (str) : Metric to compute distance,
|
||||||
supported are ('l2', 'cosine', 'ip'). Defaults to 'cosine'.
|
supported are ('L2', 'Cosine', 'IP'). Defaults to 'Cosine'.
|
||||||
column_map (Dict) : Column type map to project column name onto langchain
|
column_map (Dict) : Column type map to project column name onto langchain
|
||||||
semantics. Must have keys: `text`, `id`, `vector`,
|
semantics. Must have keys: `text`, `id`, `vector`,
|
||||||
must be same size to number of columns. For example:
|
must be same size to number of columns. For example:
|
||||||
@ -69,7 +69,7 @@ class MyScaleSettings(BaseSettings):
|
|||||||
username: Optional[str] = None
|
username: Optional[str] = None
|
||||||
password: Optional[str] = None
|
password: Optional[str] = None
|
||||||
|
|
||||||
index_type: str = "IVFFLAT"
|
index_type: str = "MSTG"
|
||||||
index_param: Optional[Dict[str, str]] = None
|
index_param: Optional[Dict[str, str]] = None
|
||||||
|
|
||||||
column_map: Dict[str, str] = {
|
column_map: Dict[str, str] = {
|
||||||
@ -81,7 +81,7 @@ class MyScaleSettings(BaseSettings):
|
|||||||
|
|
||||||
database: str = "default"
|
database: str = "default"
|
||||||
table: str = "langchain"
|
table: str = "langchain"
|
||||||
metric: str = "cosine"
|
metric: str = "Cosine"
|
||||||
|
|
||||||
def __getitem__(self, item: str) -> Any:
|
def __getitem__(self, item: str) -> Any:
|
||||||
return getattr(self, item)
|
return getattr(self, item)
|
||||||
|
Loading…
Reference in New Issue
Block a user