DragonProgrammer commited on
Commit
89affd1
·
verified ·
1 Parent(s): 8fe02be

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -10
app.py CHANGED
@@ -154,26 +154,26 @@ class HfAgentWrapper:
154
  model_repo = "google/gemma-1.1-7b-it" # <<< --- CORRECTED MODEL REPO ID
155
  print(f"Loading HfAgent with model: {model_repo}")
156
 
157
- try:
158
- if not get_current_time_in_timezone.__doc__:
159
- raise ValueError("Tool 'get_current_time_in_timezone' is missing a docstring.")
160
- if not web_search.__doc__:
161
- raise ValueError("Tool 'web_search' is missing a docstring.")
162
- if not safe_calculator.__doc__:
163
- raise ValueError("Tool 'safe_calculator' is missing a docstring.")
164
 
165
  time_tool_obj = Tool(
166
- name=get_current_time_in_timezone.__name__,
167
  func=get_current_time_in_timezone,
168
  description=get_current_time_in_timezone.__doc__
169
  )
170
  search_tool_obj = Tool(
171
- name=web_search.__name__,
172
  func=web_search,
173
  description=web_search.__doc__
174
  )
175
  calculator_tool_obj = Tool(
176
- name=safe_calculator.__name__,
177
  func=safe_calculator,
178
  description=safe_calculator.__doc__
179
  )
 
154
  model_repo = "google/gemma-1.1-7b-it" # <<< --- CORRECTED MODEL REPO ID
155
  print(f"Loading HfAgent with model: {model_repo}")
156
 
157
+ try:
158
+ if not get_current_time_in_timezone.__doc__:
159
+ raise ValueError("Tool 'get_current_time_in_timezone' is missing a docstring.")
160
+ if not web_search.__doc__:
161
+ raise ValueError("Tool 'web_search' is missing a docstring.")
162
+ if not safe_calculator.__doc__:
163
+ raise ValueError("Tool 'safe_calculator' is missing a docstring.")
164
 
165
  time_tool_obj = Tool(
166
+ name="get_current_time_in_timezone",
167
  func=get_current_time_in_timezone,
168
  description=get_current_time_in_timezone.__doc__
169
  )
170
  search_tool_obj = Tool(
171
+ name="web_search",
172
  func=web_search,
173
  description=web_search.__doc__
174
  )
175
  calculator_tool_obj = Tool(
176
+ name="safe_calculator", # <--- EXPLICIT NAME
177
  func=safe_calculator,
178
  description=safe_calculator.__doc__
179
  )