From 57e8787abab3ff38e87dd6dcb015fac3d913d6b8 Mon Sep 17 00:00:00 2001 From: Ty Bekiares Date: Mon, 11 Dec 2023 20:23:35 -0600 Subject: [PATCH] readd hash --- notebooks/Session_1.ipynb | 3 +++ notebooks/Session_2.ipynb | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/notebooks/Session_1.ipynb b/notebooks/Session_1.ipynb index 543cb6c..9628c6d 100644 --- a/notebooks/Session_1.ipynb +++ b/notebooks/Session_1.ipynb @@ -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", diff --git a/notebooks/Session_2.ipynb b/notebooks/Session_2.ipynb index 2508e05..0b014f0 100644 --- a/notebooks/Session_2.ipynb +++ b/notebooks/Session_2.ipynb @@ -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" ] }, {