feat: add es headers config (#3088)

This commit is contained in:
AkisAya
2025-08-19 01:15:23 +05:30
committed by GitHub
parent 49ad64708b
commit 346b913ace
4 changed files with 69 additions and 1 deletions
+2
View File
@@ -31,12 +31,14 @@ class ElasticsearchDB(VectorStoreBase):
cloud_id=config.cloud_id,
api_key=config.api_key,
verify_certs=config.verify_certs,
headers= config.headers or {},
)
else:
self.client = Elasticsearch(
hosts=[f"{config.host}" if config.port is None else f"{config.host}:{config.port}"],
basic_auth=(config.user, config.password) if (config.user and config.password) else None,
verify_certs=config.verify_certs,
headers= config.headers or {},
)
self.collection_name = config.collection_name