jenngang commited on
Commit
d05b6ab
·
verified ·
1 Parent(s): db3ee91

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -570,9 +570,9 @@ class NutritionBot:
570
 
571
  self.client = ChatOpenAI(
572
  model_name="gpt-4o", # Specify the model to use (e.g., GPT-4 optimized version)
573
- api_key = my_api_key, # config.get("API_KEY"), # API key for authentication
574
- #base_url = endpoint, # config.get("OPENAI_API_BASE"),
575
- #temperature=0 # Controls randomness in responses; 0 ensures deterministic results
576
  )
577
 
578
  # Define tools available to the chatbot, such as web search
@@ -596,7 +596,7 @@ class NutritionBot:
596
  prompt = ChatPromptTemplate.from_messages([
597
  ("system", system_prompt), # System instructions
598
  ("human", "{input}"), # Placeholder for human input
599
- ("placeholder", "{agent_scratchpad}") # Placeholder for intermediate reasoning steps
600
  ])
601
 
602
  # Create an agent capable of interacting with tools and executing tasks
 
570
 
571
  self.client = ChatOpenAI(
572
  model_name="gpt-4o", # Specify the model to use (e.g., GPT-4 optimized version)
573
+ api_key = api_key, # config.get("API_KEY"), # API key for authentication
574
+ base_url = endpoint, # config.get("OPENAI_API_BASE"),
575
+ temperature=0 # Controls randomness in responses; 0 ensures deterministic results
576
  )
577
 
578
  # Define tools available to the chatbot, such as web search
 
596
  prompt = ChatPromptTemplate.from_messages([
597
  ("system", system_prompt), # System instructions
598
  ("human", "{input}"), # Placeholder for human input
599
+ #("placeholder", "{agent_scratchpad}") # Placeholder for intermediate reasoning steps
600
  ])
601
 
602
  # Create an agent capable of interacting with tools and executing tasks