mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-22 11:00:37 +00:00
various templates improvements (#12500)
This commit is contained in:
@@ -1,14 +1,18 @@
|
||||
import os
|
||||
|
||||
from elasticsearch import Elasticsearch
|
||||
|
||||
es_host = os.environ["ELASTIC_SEARCH_SERVER"]
|
||||
es_password = os.environ["ELASTIC_PASSWORD"]
|
||||
# Setup Elasticsearch
|
||||
# This shows how to set it up for a cloud hosted version
|
||||
|
||||
# Password for the 'elastic' user generated by Elasticsearch
|
||||
ELASTIC_PASSWORD = "..."
|
||||
|
||||
# Found in the 'Manage Deployment' page
|
||||
CLOUD_ID = "..."
|
||||
|
||||
# Create the client instance
|
||||
db = Elasticsearch(
|
||||
es_host,
|
||||
http_auth=('elastic', es_password),
|
||||
ca_certs='http_ca.crt' # Replace with your actual path
|
||||
cloud_id=CLOUD_ID,
|
||||
basic_auth=("elastic", ELASTIC_PASSWORD)
|
||||
)
|
||||
|
||||
customers = [
|
||||
|
Reference in New Issue
Block a user