Murali44 commited on
Commit
43f2a86
·
verified ·
1 Parent(s): 8b3cfc6

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -57,7 +57,7 @@ from datetime import datetime
57
  api_key = os.environ.get("API_KEY")
58
  endpoint = os.environ.get("OPENAI_API_BASE")
59
  llama_api_key = os.environ.get("GROQ_API_KEY")
60
- MEM0_api_key = os.environ.get("MEM0")
61
 
62
  # Initialize the OpenAI embedding function for Chroma
63
  embedding_function = chromadb.utils.embedding_functions.OpenAIEmbeddingFunction(
@@ -519,13 +519,13 @@ class NutritionBot:
519
  """
520
 
521
  # Initialize a memory client to store and retrieve customer interactions
522
- self.memory = MemoryClient(api_key=os.getenv("mem0")) # Complete the code to define the memory client API key
523
 
524
  # Initialize the OpenAI client using the provided credentials
525
  self.client = ChatOpenAI(
526
  model_name="gpt-4o-mini", # Specify the model to use (e.g., GPT-4 optimized version)
527
- api_key=os.getenv("API_KEY"), # API key for authentication
528
- openai_api_base = os.getenv("OPENAI_API_BASE"),
529
  temperature=0 # Controls randomness in responses; 0 ensures deterministic results
530
  )
531
 
 
57
  api_key = os.environ.get("API_KEY")
58
  endpoint = os.environ.get("OPENAI_API_BASE")
59
  llama_api_key = os.environ.get("GROQ_API_KEY")
60
+ MEM0_api_key = os.environ.get("mem0")
61
 
62
  # Initialize the OpenAI embedding function for Chroma
63
  embedding_function = chromadb.utils.embedding_functions.OpenAIEmbeddingFunction(
 
519
  """
520
 
521
  # Initialize a memory client to store and retrieve customer interactions
522
+ self.memory = MemoryClient(api_key=os.environ.get("mem0")) # Complete the code to define the memory client API key
523
 
524
  # Initialize the OpenAI client using the provided credentials
525
  self.client = ChatOpenAI(
526
  model_name="gpt-4o-mini", # Specify the model to use (e.g., GPT-4 optimized version)
527
+ api_key=os.environ.get("API_KEY"), # API key for authentication
528
+ openai_api_base = os.environ.get("OPENAI_API_BASE"),
529
  temperature=0 # Controls randomness in responses; 0 ensures deterministic results
530
  )
531