mohitbhardwaj commited on
Commit
5452482
Β·
verified Β·
1 Parent(s): fa6916b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
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 mem0_api_key else "❌ missing")
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("mem0")) # 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,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(