From f7e632551be995f2c5fe702206c0a95bf2ec660a Mon Sep 17 00:00:00 2001 From: somewheresy <43761886+somewheresy@users.noreply.github.com> Date: Mon, 12 Aug 2024 13:05:13 -0400 Subject: [PATCH] Update strawberry.py Implement dotenv for better secrets management --- strawberry.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/strawberry.py b/strawberry.py index fc0a9de..c955543 100644 --- a/strawberry.py +++ b/strawberry.py @@ -1,8 +1,11 @@ import os from openai import OpenAI +from dotenv import load_dotenv + +load_dotenv() beta_headers = { - "authorization": f"Bearer {os.environ['OPENAI_BETA_KEY']}", + "authorization": f"Bearer {os.environ['OPENAI_API_KEY']}", "openai-beta": "early-access-strawberry" }