Skip to content

Commit 08f74d7

Browse files
committed
using os.environ to save sensitive variables
1 parent ba7b52f commit 08f74d7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

supporting-blog-content/using-crewai-with-elasticsearch/using_crewai_with_elasticsearch_notebook.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@
8282
},
8383
"outputs": [],
8484
"source": [
85-
"ELASTIC_ENDPOINT = getpass(\"Elastic Enpoint: \")\n",
86-
"ELASTIC_API_KEY = getpass(\"Elastic Api Key: \")\n",
85+
"os.environ[\"ELASTIC_ENDPOINT\"] = getpass(\"Elastic Enpoint: \")\n",
86+
"os.environ[\"ELASTIC_API_KEY\"] = getpass(\"Elastic Api Key: \")\n",
8787
"os.environ[\"SERPER_API_KEY\"] = getpass(\"Seper API Key: \")\n",
8888
"os.environ[\"OPENAI_API_KEY\"] = getpass(\"OpenAI API Key: \")"
8989
]
@@ -107,8 +107,8 @@
107107
"source": [
108108
"# Elasticsearch client\n",
109109
"_client = Elasticsearch(\n",
110-
" ELASTIC_ENDPOINT,\n",
111-
" api_key=ELASTIC_API_KEY,\n",
110+
" os.environ[\"ELASTIC_ENDPOINT\"],\n",
111+
" api_key=os.environ[\"ELASTIC_API_KEY\"],\n",
112112
")"
113113
]
114114
},

0 commit comments

Comments
 (0)