bstraehle commited on
Commit
7c47f9f
·
verified ·
1 Parent(s): 61e315b

Update agents/tools/ai_tools.py

Browse files
Files changed (1) hide show
  1. agents/tools/ai_tools.py +9 -9
agents/tools/ai_tools.py CHANGED
@@ -94,7 +94,7 @@ class AITools():
94
  return result
95
  except Exception as e:
96
  if attempt == 0 and AITools._is_rate_limit_error(e):
97
- print(f"⚠️ AITools: {tool_name}: Rate limit hit with {current_model}, falling back to {LLM_FALLBACK}")
98
  current_model = LLM_FALLBACK
99
  continue
100
  print(f"⚠️ AITools: {tool_name}: exception={str(e)}")
@@ -151,7 +151,7 @@ class AITools():
151
  return result
152
  except Exception as e:
153
  if attempt == 0 and AITools._is_rate_limit_error(e):
154
- print(f"⚠️ AITools: web_search_tool: Rate limit hit with {model}, falling back to {LLM_FALLBACK}")
155
  model = LLM_FALLBACK
156
  continue
157
  print(f"⚠️ AITools: web_search_tool: exception={str(e)}")
@@ -300,7 +300,7 @@ class AITools():
300
  return result
301
  except Exception as e:
302
  if attempt == 0 and AITools._is_rate_limit_error(e):
303
- print(f"⚠️ AITools: youtube_analysis_tool: Rate limit hit with {model}, falling back to {LLM_FALLBACK}")
304
  model = LLM_FALLBACK
305
  continue
306
  print(f"⚠️ AITools: youtube_analysis_tool: exception={str(e)}")
@@ -365,7 +365,7 @@ class AITools():
365
  return result
366
  except Exception as e:
367
  if attempt == 0 and AITools._is_rate_limit_error(e):
368
- print(f"⚠️ AITools: document_analysis_tool: Rate limit hit with {model}, falling back to {LLM_FALLBACK}")
369
  model = LLM_FALLBACK
370
  continue
371
  print(f"⚠️ AITools: document_analysis_tool: exception={str(e)}")
@@ -415,7 +415,7 @@ class AITools():
415
  return result
416
  except Exception as e:
417
  if attempt == 0 and AITools._is_rate_limit_error(e):
418
- print(f"⚠️ AITools: code_generation_and_execution_tool: Rate limit hit with {model}, falling back to {LLM_FALLBACK}")
419
  model = LLM_FALLBACK
420
  continue
421
  print(f"⚠️ AITools: code_generation_and_execution_tool: exception={str(e)}")
@@ -468,7 +468,7 @@ class AITools():
468
  return result
469
  except Exception as e:
470
  if attempt == 0 and AITools._is_rate_limit_error(e):
471
- print(f"⚠️ AITools: code_execution_tool: Rate limit hit with {model}, falling back to {LLM_FALLBACK}")
472
  model = LLM_FALLBACK
473
  continue
474
  print(f"⚠️ AITools: code_execution_tool: exception={str(e)}")
@@ -545,7 +545,7 @@ class AITools():
545
  return result
546
  except Exception as e:
547
  if attempt == 0 and AITools._is_rate_limit_error(e):
548
- print(f"⚠️ AITools: img_to_fen_tool: Rate limit hit with {model}, falling back to {LLM_FALLBACK}")
549
  model = LLM_FALLBACK
550
  continue
551
  print(f"⚠️ AITools: img_to_fen_tool: exception={str(e)}")
@@ -620,7 +620,7 @@ class AITools():
620
  return result
621
  except Exception as e:
622
  if attempt == 0 and AITools._is_rate_limit_error(e):
623
- print(f"⚠️ AITools: algebraic_notation_tool: Rate limit hit with {model}, falling back to {LLM_FALLBACK}")
624
  model = LLM_FALLBACK
625
  continue
626
  print(f"⚠️ AITools: algebraic_notation_tool: exception={str(e)}")
@@ -672,7 +672,7 @@ class AITools():
672
  return result
673
  except Exception as e:
674
  if attempt == 0 and AITools._is_rate_limit_error(e):
675
- print(f"⚠️ AITools: final_answer_tool: Rate limit hit with {model}, falling back to {LLM_FALLBACK}")
676
  model = LLM_FALLBACK
677
  continue
678
  print(f"⚠️ AITools: final_answer_tool: exception={str(e)}")
 
94
  return result
95
  except Exception as e:
96
  if attempt == 0 and AITools._is_rate_limit_error(e):
97
+ print(f"⚠️ AITools: {tool_name}: Daily rate limit hit with {current_model}, falling back to {LLM_FALLBACK}")
98
  current_model = LLM_FALLBACK
99
  continue
100
  print(f"⚠️ AITools: {tool_name}: exception={str(e)}")
 
151
  return result
152
  except Exception as e:
153
  if attempt == 0 and AITools._is_rate_limit_error(e):
154
+ print(f"⚠️ AITools: web_search_tool: Daily rate limit hit with {model}, falling back to {LLM_FALLBACK}")
155
  model = LLM_FALLBACK
156
  continue
157
  print(f"⚠️ AITools: web_search_tool: exception={str(e)}")
 
300
  return result
301
  except Exception as e:
302
  if attempt == 0 and AITools._is_rate_limit_error(e):
303
+ print(f"⚠️ AITools: youtube_analysis_tool: Daily rate limit hit with {model}, falling back to {LLM_FALLBACK}")
304
  model = LLM_FALLBACK
305
  continue
306
  print(f"⚠️ AITools: youtube_analysis_tool: exception={str(e)}")
 
365
  return result
366
  except Exception as e:
367
  if attempt == 0 and AITools._is_rate_limit_error(e):
368
+ print(f"⚠️ AITools: document_analysis_tool: Daily rate limit hit with {model}, falling back to {LLM_FALLBACK}")
369
  model = LLM_FALLBACK
370
  continue
371
  print(f"⚠️ AITools: document_analysis_tool: exception={str(e)}")
 
415
  return result
416
  except Exception as e:
417
  if attempt == 0 and AITools._is_rate_limit_error(e):
418
+ print(f"⚠️ AITools: code_generation_and_execution_tool: Daily rate limit hit with {model}, falling back to {LLM_FALLBACK}")
419
  model = LLM_FALLBACK
420
  continue
421
  print(f"⚠️ AITools: code_generation_and_execution_tool: exception={str(e)}")
 
468
  return result
469
  except Exception as e:
470
  if attempt == 0 and AITools._is_rate_limit_error(e):
471
+ print(f"⚠️ AITools: code_execution_tool: Daily rate limit hit with {model}, falling back to {LLM_FALLBACK}")
472
  model = LLM_FALLBACK
473
  continue
474
  print(f"⚠️ AITools: code_execution_tool: exception={str(e)}")
 
545
  return result
546
  except Exception as e:
547
  if attempt == 0 and AITools._is_rate_limit_error(e):
548
+ print(f"⚠️ AITools: img_to_fen_tool: Daily rate limit hit with {model}, falling back to {LLM_FALLBACK}")
549
  model = LLM_FALLBACK
550
  continue
551
  print(f"⚠️ AITools: img_to_fen_tool: exception={str(e)}")
 
620
  return result
621
  except Exception as e:
622
  if attempt == 0 and AITools._is_rate_limit_error(e):
623
+ print(f"⚠️ AITools: algebraic_notation_tool: Daily rate limit hit with {model}, falling back to {LLM_FALLBACK}")
624
  model = LLM_FALLBACK
625
  continue
626
  print(f"⚠️ AITools: algebraic_notation_tool: exception={str(e)}")
 
672
  return result
673
  except Exception as e:
674
  if attempt == 0 and AITools._is_rate_limit_error(e):
675
+ print(f"⚠️ AITools: final_answer_tool: Daily rate limit hit with {model}, falling back to {LLM_FALLBACK}")
676
  model = LLM_FALLBACK
677
  continue
678
  print(f"⚠️ AITools: final_answer_tool: exception={str(e)}")