Skip to content

Commit 98221fb

Browse files
committed
updating env variables
1 parent 6f09b53 commit 98221fb

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

chatapi/ChatAPI + LangChain Basics.ipynb

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,14 @@
2828
" AIMessage,\n",
2929
" HumanMessage,\n",
3030
" SystemMessage\n",
31-
")"
31+
")\n",
32+
"\n",
33+
"\n",
34+
"# Supporting libraries\n",
35+
"import os\n",
36+
"from dotenv import load_dotenv\n",
37+
"\n",
38+
"load_dotenv()"
3239
]
3340
},
3441
{
@@ -40,7 +47,7 @@
4047
},
4148
"outputs": [],
4249
"source": [
43-
"OPENAI_API_KEY = '...'"
50+
"OPENAI_API_KEY = os.getenv('OPENAI_API_KEY', 'YourAPIKeyIfNotSet')"
4451
]
4552
},
4653
{

0 commit comments

Comments
 (0)