์๋ ํ์ธ์. ๊ธฐ์กด์ elasticsearch์ ์๋ ๋ฐ์ดํฐ๋ฅผ ์ด์ฉํ๊ณ ์ถ์ด์ langchain๊ณผ elasticsearch๋ฅผ ์ฐ๋ํ๊ณ ์ถ์ด ๊ณต์๋ฌธ์๋ฅผ ๋ณด๊ณ ๋ฐ๋ผํ๋ ์ค ์๋ฌ๊ฐ ๋ฐ์ํด ์ง๋ฌธ ๋จ๊น๋๋ค..!
โโโ
import elasticsearch
from langchain_elasticsearch import ElasticsearchStore
es_client= elasticsearch.Elasticsearch(
hosts=["http://localhost:9200"],
es_user="elastic",
es_password="changeme"
max_retries=10,
)
embedding = OpenAIEmbeddings()
elastic_vector_search = ElasticsearchStore(
index_name="test_index",
es_connection=es_client,
embedding=embedding,
)
โโโ
์์ ์ฝ๋๋ ๊ณต์๋ฌธ์์ ๋์์๋ ์ฝ๋์ธ๋ฐ
elastic_transport.ConnectionError: Connection error caused by: ConnectionError(Connection error caused by: ProtocolError(('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))))
์ด๋ ๊ฒ ์๋ฌ๊ฐ ๋ฐ์ํ๋ค๊ฑฐ๋ https๋ก url์ ์ค์ ํ๋ฉด
elastic_transport.TlsError: TLS error caused by: TlsError(TLS error caused by: SSLError([SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1133)))
์ด๋ ๊ฒ ์๋ฌ๊ฐ ๋ฐ์ํฉ๋๋ค.
ํน์ ํด๊ฒฐ๋ฐฉ๋ฒ์ ์์๋ ๋ถ์ด ๊ณ์๋ค๋ฉด ๋ต๋ณ ๋ถํ๋๋ฆฝ๋๋ค..! ๊ฐ์ฌํฉ๋๋ค.