Update strawberry.py

Implement dotenv for better secrets management
This commit is contained in:
somewheresy 2024-08-12 13:05:13 -04:00 committed by GitHub
parent 841f575807
commit f7e632551b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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"
}