Update app.py
Browse files
app.py
CHANGED
@@ -63,7 +63,7 @@ MEM0_api_key = os.getenv("MEM0_API_KEY")
|
|
63 |
print("API_KEY:", "π set" if api_key else "β missing")
|
64 |
print("API_BASE:", endpoint or "β missing")
|
65 |
print("GROQ_API_KEY:", "π set" if llama_api_key else "β missing")
|
66 |
-
print("MEM0_API_KEY:", "π set" if
|
67 |
|
68 |
|
69 |
# Initialize the OpenAI embedding function for Chroma
|
@@ -586,7 +586,7 @@ class NutritionBot:
|
|
586 |
"""
|
587 |
|
588 |
# Initialize a memory client to store and retrieve customer interactions
|
589 |
-
self.memory = MemoryClient(api_key=userdata.get("
|
590 |
|
591 |
# # Initialize the OpenAI client using the provided credentials
|
592 |
# self.client = ChatOpenAI(
|
@@ -599,9 +599,9 @@ class NutritionBot:
|
|
599 |
import os
|
600 |
from openai import OpenAI
|
601 |
|
602 |
-
# Set environment variables beforehand, if not already
|
603 |
-
os.environ['OPENAI_API_KEY'] = config.get("API_KEY")
|
604 |
-
os.environ['OPENAI_API_BASE'] = config.get("OPENAI_API_BASE")
|
605 |
|
606 |
# Use the proper OpenAI client
|
607 |
self.client = OpenAI(
|
|
|
63 |
print("API_KEY:", "π set" if api_key else "β missing")
|
64 |
print("API_BASE:", endpoint or "β missing")
|
65 |
print("GROQ_API_KEY:", "π set" if llama_api_key else "β missing")
|
66 |
+
print("MEM0_API_KEY:", "π set" if MEM0_api_key else "β missing")
|
67 |
|
68 |
|
69 |
# Initialize the OpenAI embedding function for Chroma
|
|
|
586 |
"""
|
587 |
|
588 |
# Initialize a memory client to store and retrieve customer interactions
|
589 |
+
self.memory = MemoryClient(api_key=userdata.get("MEM0_API_KEY")) # Complete the code to define the memory client API key
|
590 |
|
591 |
# # Initialize the OpenAI client using the provided credentials
|
592 |
# self.client = ChatOpenAI(
|
|
|
599 |
import os
|
600 |
from openai import OpenAI
|
601 |
|
602 |
+
# # Set environment variables beforehand, if not already
|
603 |
+
# os.environ['OPENAI_API_KEY'] = config.get("API_KEY")
|
604 |
+
# os.environ['OPENAI_API_BASE'] = config.get("OPENAI_API_BASE")
|
605 |
|
606 |
# Use the proper OpenAI client
|
607 |
self.client = OpenAI(
|