Update src/streamlit_app.py
Browse files- src/streamlit_app.py +6 -5
src/streamlit_app.py
CHANGED
|
@@ -22,10 +22,11 @@ import textwrap
|
|
| 22 |
import requests
|
| 23 |
|
| 24 |
# ============================== CONFIGURATION ==============================
|
| 25 |
-
NEO4J_URI = os.getenv
|
| 26 |
-
NEO4J_USERNAME = os.getenv
|
| 27 |
-
NEO4J_PASSWORD = os.getenv
|
| 28 |
-
openai.api_key = os.getenv
|
|
|
|
| 29 |
os.environ["TRANSFORMERS_CACHE"] = "/tmp/hf_cache"
|
| 30 |
# ============================== DOWNLOAD ==============================
|
| 31 |
def download_if_missing(url, local_path):
|
|
@@ -265,7 +266,7 @@ Return your response strictly as a **JSON object** with the following fields:
|
|
| 265 |
|
| 266 |
Do not include any explanation or commentary—only return the JSON object.
|
| 267 |
"""
|
| 268 |
-
client = openai.OpenAI(api_key=os.getenv
|
| 269 |
response = client.chat.completions.create(
|
| 270 |
model="gpt-4o",
|
| 271 |
messages=[{"role": "user", "content": prompt}],
|
|
|
|
| 22 |
import requests
|
| 23 |
|
| 24 |
# ============================== CONFIGURATION ==============================
|
| 25 |
+
NEO4J_URI = os.getenv("NEO4J_URI")
|
| 26 |
+
NEO4J_USERNAME = os.getenv("NEO4J_USERNAME")
|
| 27 |
+
NEO4J_PASSWORD = os.getenv("NEO4J_PASSWORD")
|
| 28 |
+
openai.api_key = os.getenv("OPENAI_API_KEY")
|
| 29 |
+
|
| 30 |
os.environ["TRANSFORMERS_CACHE"] = "/tmp/hf_cache"
|
| 31 |
# ============================== DOWNLOAD ==============================
|
| 32 |
def download_if_missing(url, local_path):
|
|
|
|
| 266 |
|
| 267 |
Do not include any explanation or commentary—only return the JSON object.
|
| 268 |
"""
|
| 269 |
+
client = openai.OpenAI(api_key=os.getenv("OPENAI_API_KEY"))
|
| 270 |
response = client.chat.completions.create(
|
| 271 |
model="gpt-4o",
|
| 272 |
messages=[{"role": "user", "content": prompt}],
|