Update app.py
Browse files
app.py
CHANGED
@@ -22,15 +22,15 @@ _ = load_dotenv(find_dotenv())
|
|
22 |
|
23 |
|
24 |
# Schnittstellen hinzubinden und OpenAI Key holen aus den Secrets
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
-
openai.api_key = os.getenv["OPENAI_API_KEY"]
|
34 |
|
35 |
MONGODB_URI = os.environ["MONGODB_ATLAS_CLUSTER_URI"]
|
36 |
client = MongoClient(MONGODB_URI)
|
|
|
22 |
|
23 |
|
24 |
# Schnittstellen hinzubinden und OpenAI Key holen aus den Secrets
|
25 |
+
client = OpenAI(
|
26 |
+
api_key=os.getenv("OPENAI_API_KEY"), # this is also the default, it can be omitted
|
27 |
+
)
|
28 |
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
+
#openai.api_key = os.getenv["OPENAI_API_KEY"]
|
34 |
|
35 |
MONGODB_URI = os.environ["MONGODB_ATLAS_CLUSTER_URI"]
|
36 |
client = MongoClient(MONGODB_URI)
|