jesusgj commited on
Commit
83c17f6
·
1 Parent(s): 6c2989a

Modified files

Browse files
Files changed (1) hide show
  1. agent.py +2 -2
agent.py CHANGED
@@ -185,8 +185,8 @@ def initialize_agent():
185
  model = InferenceClientModel(model_id="Qwen/Qwen2.5-7B-Instruct", token=api_keys['together'], provider="together")
186
  logging.info("✅ Fallback model (Qwen 2.5 7B) loaded successfully")
187
 
188
- # CORRECTED LINE: Use 'api_key' instead of 'serpapi_api_key'
189
- google_search_tool = GoogleSearchTool(provider='serpapi', api_key=api_keys['serpapi']) if api_keys['serpapi'] else None
190
 
191
  tools_list = [
192
  tool for tool in [
 
185
  model = InferenceClientModel(model_id="Qwen/Qwen2.5-7B-Instruct", token=api_keys['together'], provider="together")
186
  logging.info("✅ Fallback model (Qwen 2.5 7B) loaded successfully")
187
 
188
+ # CORRECT INITIALIZATION: The tool takes no arguments and finds the SERPAPI_API_KEY from the environment.
189
+ google_search_tool = GoogleSearchTool() if api_keys['serpapi'] else None
190
 
191
  tools_list = [
192
  tool for tool in [