问题:
? File "/home/server/miniconda3/envs/rag/lib/python3.8/site-packages/elastic_transport/_transport.py", line 328, in perform_request
? ? meta, raw_data = node.perform_request(
? File "/home/server/miniconda3/envs/rag/lib/python3.8/site-packages/elastic_transport/_node/_http_urllib3.py", line 202, in perform_request
? ? raise err from None
elastic_transport.TlsError: TLS error caused by: TlsError(TLS error caused by: SSLError([SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1131)))
当前,ElasticVectorSearch
和?ElasticKNNSearch 为旧版 ,这里直接使用新版
ElasticsearchStore
修改前:
es_connection = ElasticsearchStore(
embedding=embedings_h,
index_name="hello-index",
es_url = "https://192.168.0.133:9200",
es_user = "elastic",
es_password = "cwr9De0nHWPT27QyJMf+",
distance_strategy = 'COSINE',
)
添加?es_params = {"ca_certs":False,"verify_certs" : False} 字段即可
es_connection = ElasticsearchStore(
embedding=embedings_h,
index_name="hello-index",
es_url = "https://192.168.0.133:9200",
es_user = "elastic",
es_password = "cwr9De0nHWPT27QyJMf+",
distance_strategy = 'COSINE',
es_params = {"ca_certs":False,"verify_certs" : False},
)
当前为快速验证阶段,不想看警告信息,可添加到头部
import urllib3
urllib3.disable_warnings()