Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -604,7 +604,7 @@ def filter_input_with_llama_guard(user_input, model="llama-guard-3-8b"):
|
|
| 604 |
class NutritionBot:
|
| 605 |
def __init__(self):
|
| 606 |
# Initialize a memory client to store and retrieve customer interactions
|
| 607 |
-
self.memory = MemoryClient(
|
| 608 |
#self.memory = MemoryClient(api_key=userdata.get("mem0")) # Complete the code to define the memory client API key
|
| 609 |
# Initialize the Azure OpenAI client using the provided credentials
|
| 610 |
self.client = AzureChatOpenAI(
|
|
@@ -619,7 +619,7 @@ class NutritionBot:
|
|
| 619 |
api_version= api_version, # API version being used
|
| 620 |
temperature=0 # Controls randomness in responses; 0 ensures deterministic results
|
| 621 |
)
|
| 622 |
-
|
| 623 |
"""
|
| 624 |
Initialize the NutritionBot class, setting up memory, the LLM client, tools, and the agent executor.
|
| 625 |
"""
|
|
|
|
| 604 |
class NutritionBot:
|
| 605 |
def __init__(self):
|
| 606 |
# Initialize a memory client to store and retrieve customer interactions
|
| 607 |
+
self.memory = new MemoryClient(os.environ["mem0"]) # Complete the code to define the memory client API key
|
| 608 |
#self.memory = MemoryClient(api_key=userdata.get("mem0")) # Complete the code to define the memory client API key
|
| 609 |
# Initialize the Azure OpenAI client using the provided credentials
|
| 610 |
self.client = AzureChatOpenAI(
|
|
|
|
| 619 |
api_version= api_version, # API version being used
|
| 620 |
temperature=0 # Controls randomness in responses; 0 ensures deterministic results
|
| 621 |
)
|
| 622 |
+
|
| 623 |
"""
|
| 624 |
Initialize the NutritionBot class, setting up memory, the LLM client, tools, and the agent executor.
|
| 625 |
"""
|