Upload app.py with huggingface_hub
Browse files
app.py
CHANGED
|
@@ -613,17 +613,13 @@ class NutritionBot:
|
|
| 613 |
# azure_endpoint=config['_____'], # Endpoint URL for Azure OpenAI
|
| 614 |
# api_version=config['_____'], # API version being used
|
| 615 |
# temperature=_____ # Controls randomness in responses; 0 ensures deterministic results
|
| 616 |
-
model_name=
|
| 617 |
-
api_key=
|
| 618 |
-
azure_endpoint=
|
| 619 |
-
api_version=
|
| 620 |
temperature=0 # Controls randomness in responses; 0 ensures deterministic results
|
| 621 |
)
|
| 622 |
-
|
| 623 |
-
print("Model:", os.getenv("CHATGPT_MODEL"))
|
| 624 |
-
print("Endpoint:", os.getenv("AZURE_OPENAI_ENDPOINT"))
|
| 625 |
-
print("API Version:", os.getenv("AZURE_OPENAI_APIVERSION"))
|
| 626 |
-
print("Key Present:", os.getenv("AZURE_OPENAI_API_KEY") is not None)
|
| 627 |
"""
|
| 628 |
Initialize the NutritionBot class, setting up memory, the LLM client, tools, and the agent executor.
|
| 629 |
"""
|
|
|
|
| 613 |
# azure_endpoint=config['_____'], # Endpoint URL for Azure OpenAI
|
| 614 |
# api_version=config['_____'], # API version being used
|
| 615 |
# temperature=_____ # Controls randomness in responses; 0 ensures deterministic results
|
| 616 |
+
model_name= model_name, # Specify the model to use (e.g., GPT-4 optimized version)
|
| 617 |
+
api_key= api_key, # API key for authentication
|
| 618 |
+
azure_endpoint= endpoint, # Endpoint URL for Azure OpenAI
|
| 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 |
"""
|