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

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -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=userdata.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=config.get("API_KEY"), # API key for authentication
528
- openai_api_base = config.get("OPENAI_API_BASE"),
529
  temperature=0 # Controls randomness in responses; 0 ensures deterministic results
530
  )
531
 
 
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