Myscale
MyScale读取器 #
基类:EventBaseReader
MyScale 读取器。
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
myscale_host (str)
|
连接到 MyScale 后端的 URL。 |
required | |
username (str)
|
用于登录的用户名。 |
required | |
password (str)
|
登录密码。 |
required | |
myscale_port (int)
|
用于通过HTTP连接的URL端口。默认为8443。 |
required | |
database (str)
|
要查找表的数据库名称。默认为 'default'。 |
required | |
table (str)
|
要操作的表名。默认为'vector_table'。 |
required | |
index_type
|
str
|
索引类型字符串。默认为 "IVFLAT" |
'IVFLAT'
|
metric (str)
|
用于计算距离的度量标准,支持的类型包括 ('l2', 'cosine', 'ip')。 默认为 'cosine' |
required | |
batch_size
|
int
|
要插入的文档大小。默认为32。 |
32
|
index_params
|
dict
|
MyScale 的索引参数。 默认为 None。 |
None
|
search_params
|
dict
|
MyScale查询的搜索参数。 默认为None。 |
None
|
workflows/handler.py 中的源代码llama_index/readers/myscale/base.py
87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | |
load_data #
load_data(query_vector: List[float], where_str: Optional[str] = None, limit: int = 10) -> List[文档]
从MyScale加载数据。
参数:
| 名称 | 类型 | 描述 | 默认 |
|---|---|---|---|
query_vector
|
List[float]
|
查询向量。 |
required |
where_str
|
Optional[str]
|
条件字符串。 默认为 None。 |
None
|
limit
|
int
|
返回结果的数量。 |
10
|
返回:
| 类型 | 描述 |
|---|---|
List[文档]
|
List[Document]: 文档列表。 |
workflows/handler.py 中的源代码llama_index/readers/myscale/base.py
143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 | |
选项: 成员:- MyScaleReader