Skip to content

Commit

Permalink
readd hash
Browse files Browse the repository at this point in the history
  • Loading branch information
ty-elastic committed Dec 12, 2023
1 parent eedd593 commit 57e8787
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions notebooks/Session_1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,9 @@
" #generate and share \"your\" unique hash\n",
" os.environ['USER_HASH'] = secrets.token_hex(nbytes=6)\n",
" print(f\"Your unique user hash is: {os.environ['USER_HASH']}\")\n",
"\n",
" #get the current API key and combine with your hash\n",
" os.environ['OPENAI_API_KEY'] = f\"{os.environ['OPENAI_API_KEY']} {os.environ['USER_HASH']}\"\n",
"else:\n",
" openai.api_type = os.environ['OPENAI_API_TYPE']\n",
" openai.api_version = os.environ['OPENAI_API_VERSION']\n",
Expand Down
5 changes: 4 additions & 1 deletion notebooks/Session_2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@
"\n",
" #generate and share \"your\" unique hash\n",
" os.environ['USER_HASH'] = secrets.token_hex(nbytes=6)\n",
" print(f\"Your unique user hash is: {os.environ['USER_HASH']}\")\n"
" print(f\"Your unique user hash is: {os.environ['USER_HASH']}\")\n",
"\n",
" #get the current API key and combine with your hash\n",
" os.environ['OPENAI_API_KEY'] = f\"{os.environ['OPENAI_API_KEY']} {os.environ['USER_HASH']}\"\n"
]
},
{
Expand Down

0 comments on commit 57e8787

Please sign in to comment.