Spaces:
Running
Running
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
@@ -573,16 +573,17 @@ class NutritionBot:
|
|
573 |
Initialize the NutritionBot class, setting up memory, the LLM client, tools, and the agent executor.
|
574 |
"""
|
575 |
st.write("Entered NutritionBot...")
|
|
|
576 |
# Initialize a memory client to store and retrieve customer interactions
|
577 |
self.memory = MemoryClient(api_key=MEM0_api_key) # userdata.get("mem0")) # Complete the code to define the memory client API key
|
|
|
578 |
st.write("Got memory...")
|
|
|
579 |
|
580 |
-
st.write(f"my_api_key: {my_api_key}")
|
581 |
-
|
582 |
# Initialize the OpenAI client using the provided credentials
|
583 |
self.client = ChatOpenAI(
|
584 |
-
model_name="gpt-4o", # Used gpt-4o to get improved results; Specify the model to use (e.g., GPT-4 optimized version)
|
585 |
-
api_key=
|
586 |
temperature=0 # Controls randomness in responses; 0 ensures deterministic results
|
587 |
)
|
588 |
st.write("Got client...")
|
|
|
573 |
Initialize the NutritionBot class, setting up memory, the LLM client, tools, and the agent executor.
|
574 |
"""
|
575 |
st.write("Entered NutritionBot...")
|
576 |
+
st.write(f"MEM0_api_key: {MEM0_api_key}")
|
577 |
# Initialize a memory client to store and retrieve customer interactions
|
578 |
self.memory = MemoryClient(api_key=MEM0_api_key) # userdata.get("mem0")) # Complete the code to define the memory client API key
|
579 |
+
|
580 |
st.write("Got memory...")
|
581 |
+
st.write(f"api_key: {api_key}")
|
582 |
|
|
|
|
|
583 |
# Initialize the OpenAI client using the provided credentials
|
584 |
self.client = ChatOpenAI(
|
585 |
+
model_name="gpt-4o-mini", # Used gpt-4o to get improved results; Specify the model to use (e.g., GPT-4 optimized version)
|
586 |
+
api_key=api_key, # API key for authentication
|
587 |
temperature=0 # Controls randomness in responses; 0 ensures deterministic results
|
588 |
)
|
589 |
st.write("Got client...")
|