Spaces:
Sleeping
Sleeping
Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
@@ -542,14 +542,16 @@ class NutritionBot:
|
|
542 |
"""
|
543 |
|
544 |
# Initialize a memory client to store and retrieve customer interactions
|
545 |
-
self.memory = MemoryClient(
|
546 |
|
547 |
# Initialize the OpenAI client using the provided credentials
|
548 |
self.client = ChatOpenAI(
|
549 |
model_name="gpt-4o-mini", # Specify the model to use (e.g., GPT-4 optimized version)
|
550 |
-
openai_api_key=config.get("API_KEY"), # API key for authentication
|
|
|
551 |
#openai_endpoint = config.get("OPENAI_API_BASE"),
|
552 |
-
openai_api_base = config.get("OPENAI_API_BASE"),
|
|
|
553 |
temperature=0 # Controls randomness in responses; 0 ensures deterministic results
|
554 |
)
|
555 |
|
|
|
542 |
"""
|
543 |
|
544 |
# Initialize a memory client to store and retrieve customer interactions
|
545 |
+
self.memory = MemoryClient(MEM0_api_key) # Complete the code to define the memory client API key
|
546 |
|
547 |
# Initialize the OpenAI client using the provided credentials
|
548 |
self.client = ChatOpenAI(
|
549 |
model_name="gpt-4o-mini", # Specify the model to use (e.g., GPT-4 optimized version)
|
550 |
+
#openai_api_key=config.get("API_KEY"), # API key for authentication
|
551 |
+
openai_api_key=api_key, # API key for authentication
|
552 |
#openai_endpoint = config.get("OPENAI_API_BASE"),
|
553 |
+
#openai_api_base = config.get("OPENAI_API_BASE"),
|
554 |
+
openai_api_base = endpoint,
|
555 |
temperature=0 # Controls randomness in responses; 0 ensures deterministic results
|
556 |
)
|
557 |
|