Spaces:
Running
Running
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
@@ -576,15 +576,15 @@ class NutritionBot:
|
|
576 |
self.memory = MemoryClient(api_key=MEM0_api_key) # userdata.get("mem0")) # Complete the code to define the memory client API key
|
577 |
|
578 |
#st.write(f"my_api_key:{my_api_key}")
|
579 |
-
|
580 |
-
st.write(f"
|
581 |
try:
|
582 |
self.client = ChatOpenAI(
|
583 |
model="gpt-4o",
|
584 |
temperature=0.0,
|
585 |
streaming=False, # Explicitly disabling streaming
|
586 |
-
api_key=
|
587 |
-
openai_api_key=
|
588 |
#openai_api_base=endpoint # api_key
|
589 |
)
|
590 |
except Exception as e:
|
|
|
576 |
self.memory = MemoryClient(api_key=MEM0_api_key) # userdata.get("mem0")) # Complete the code to define the memory client API key
|
577 |
|
578 |
#st.write(f"my_api_key:{my_api_key}")
|
579 |
+
api_key = os.environ["API_KEY"]
|
580 |
+
st.write(f"api_key:{api_key}")
|
581 |
try:
|
582 |
self.client = ChatOpenAI(
|
583 |
model="gpt-4o",
|
584 |
temperature=0.0,
|
585 |
streaming=False, # Explicitly disabling streaming
|
586 |
+
api_key=api_key,
|
587 |
+
openai_api_key=api_key, # api_key
|
588 |
#openai_api_base=endpoint # api_key
|
589 |
)
|
590 |
except Exception as e:
|