Skip to content

Commit

Permalink
fix elasticsearch can not use apikey for local server
Browse files Browse the repository at this point in the history
  • Loading branch information
yp05327 committed Jan 21, 2025
1 parent 264a683 commit ab9940c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mem0/vector_stores/elasticsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ def __init__(self, **kwargs):
else:
self.client = Elasticsearch(
hosts=[f"{config.host}" if config.port is None else f"{config.host}:{config.port}"],
api_key=config.api_key,
basic_auth=(config.user, config.password) if (config.user and config.password) else None,
verify_certs=config.verify_certs,
)
Expand Down

0 comments on commit ab9940c

Please sign in to comment.