bstraehle commited on
Commit
47d412f
ยท
verified ยท
1 Parent(s): 46d5cf1

Update agents/tools/ai_tools.py

Browse files
Files changed (1) hide show
  1. agents/tools/ai_tools.py +18 -9
agents/tools/ai_tools.py CHANGED
@@ -87,7 +87,8 @@ class AITools():
87
  result = response.text
88
 
89
  print(f"๐Ÿ› ๏ธ AITools: {tool_name}: model={current_model}")
90
- print(f"๐Ÿ› ๏ธ AITools: {tool_name}: thinking_level={THINKING_LEVEL_MEDIA_ANALYSIS}")
 
91
  print(f"๐Ÿ› ๏ธ AITools: {tool_name}: result={result}")
92
 
93
  return result
@@ -143,7 +144,8 @@ class AITools():
143
  result = response.text
144
 
145
  print(f"๐Ÿ› ๏ธ AITools: web_search_tool: model={model}")
146
- print(f"๐Ÿ› ๏ธ AITools: web_search_tool: thinking_level={THINKING_LEVEL_WEB_SEARCH}")
 
147
  print(f"๐Ÿ› ๏ธ AITools: web_search_tool: result={result}")
148
 
149
  return result
@@ -291,7 +293,8 @@ class AITools():
291
  )
292
 
293
  print(f"๐Ÿ› ๏ธ AITools: youtube_analysis_tool: model={model}")
294
- print(f"๐Ÿ› ๏ธ AITools: youtube_analysis_tool: thinking_level={THINKING_LEVEL_YOUTUBE_ANALYSIS}")
 
295
  print(f"๐Ÿ› ๏ธ AITools: youtube_analysis_tool: result={result}")
296
 
297
  return result
@@ -355,7 +358,8 @@ class AITools():
355
  result = response.text
356
 
357
  print(f"๐Ÿ› ๏ธ AITools: document_analysis_tool: model={model}")
358
- print(f"๐Ÿ› ๏ธ AITools: document_analysis_tool: thinking_level={THINKING_LEVEL_DOCUMENT_ANALYSIS}")
 
359
  print(f"๐Ÿ› ๏ธ AITools: document_analysis_tool: result={result}")
360
 
361
  return result
@@ -404,7 +408,8 @@ class AITools():
404
  result = AITools._extract_execution_result(response)
405
 
406
  print(f"๐Ÿ› ๏ธ AITools: code_generation_and_execution_tool: model={model}")
407
- print(f"๐Ÿ› ๏ธ AITools: code_generation_and_execution_tool: thinking_level={THINKING_LEVEL_CODE_GENERATION}")
 
408
  print(f"๐Ÿ› ๏ธ AITools: code_generation_and_execution_tool: result={result}")
409
 
410
  return result
@@ -456,7 +461,8 @@ class AITools():
456
  result = AITools._extract_execution_result(response)
457
 
458
  print(f"๐Ÿ› ๏ธ AITools: code_execution_tool: model={model}")
459
- print(f"๐Ÿ› ๏ธ AITools: code_execution_tool: thinking_level={THINKING_LEVEL_CODE_EXECUTION}")
 
460
  print(f"๐Ÿ› ๏ธ AITools: code_execution_tool: result={result}")
461
 
462
  return result
@@ -532,7 +538,8 @@ class AITools():
532
  board = chess.Board(result) # FEN validation
533
 
534
  print(f"๐Ÿ› ๏ธ AITools: img_to_fen_tool: model={model}")
535
- print(f"๐Ÿ› ๏ธ AITools: img_to_fen_tool: thinking_level={THINKING_LEVEL_IMAGE_TO_FEN}")
 
536
  print(f"๐Ÿ› ๏ธ AITools: img_to_fen_tool: result={result}")
537
 
538
  return result
@@ -606,7 +613,8 @@ class AITools():
606
  break
607
 
608
  print(f"๐Ÿ› ๏ธ AITools: algebraic_notation_tool: model={model}")
609
- print(f"๐Ÿ› ๏ธ AITools: algebraic_notation_tool: thinking_level={THINKING_LEVEL_ALGEBRAIC_NOTATION}")
 
610
  print(f"๐Ÿ› ๏ธ AITools: algebraic_notation_tool: result={result}")
611
 
612
  return result
@@ -657,7 +665,8 @@ class AITools():
657
  result = response.text.strip()
658
 
659
  print(f"๐Ÿ› ๏ธ AITools: final_answer_tool: model={model}")
660
- print(f"๐Ÿ› ๏ธ AITools: final_answer_tool: thinking_level={THINKING_LEVEL_FINAL_ANSWER}")
 
661
  print(f"๐Ÿ› ๏ธ AITools: final_answer_tool: result={result}")
662
 
663
  return result
 
87
  result = response.text
88
 
89
  print(f"๐Ÿ› ๏ธ AITools: {tool_name}: model={current_model}")
90
+ if current_model != LLM_FALLBACK:
91
+ print(f"๐Ÿ› ๏ธ AITools: {tool_name}: thinking_level={THINKING_LEVEL_MEDIA_ANALYSIS}")
92
  print(f"๐Ÿ› ๏ธ AITools: {tool_name}: result={result}")
93
 
94
  return result
 
144
  result = response.text
145
 
146
  print(f"๐Ÿ› ๏ธ AITools: web_search_tool: model={model}")
147
+ if current_model != LLM_FALLBACK:
148
+ print(f"๐Ÿ› ๏ธ AITools: web_search_tool: thinking_level={THINKING_LEVEL_WEB_SEARCH}")
149
  print(f"๐Ÿ› ๏ธ AITools: web_search_tool: result={result}")
150
 
151
  return result
 
293
  )
294
 
295
  print(f"๐Ÿ› ๏ธ AITools: youtube_analysis_tool: model={model}")
296
+ if current_model != LLM_FALLBACK:
297
+ print(f"๐Ÿ› ๏ธ AITools: youtube_analysis_tool: thinking_level={THINKING_LEVEL_YOUTUBE_ANALYSIS}")
298
  print(f"๐Ÿ› ๏ธ AITools: youtube_analysis_tool: result={result}")
299
 
300
  return result
 
358
  result = response.text
359
 
360
  print(f"๐Ÿ› ๏ธ AITools: document_analysis_tool: model={model}")
361
+ if current_model != LLM_FALLBACK:
362
+ print(f"๐Ÿ› ๏ธ AITools: document_analysis_tool: thinking_level={THINKING_LEVEL_DOCUMENT_ANALYSIS}")
363
  print(f"๐Ÿ› ๏ธ AITools: document_analysis_tool: result={result}")
364
 
365
  return result
 
408
  result = AITools._extract_execution_result(response)
409
 
410
  print(f"๐Ÿ› ๏ธ AITools: code_generation_and_execution_tool: model={model}")
411
+ if current_model != LLM_FALLBACK:
412
+ print(f"๐Ÿ› ๏ธ AITools: code_generation_and_execution_tool: thinking_level={THINKING_LEVEL_CODE_GENERATION}")
413
  print(f"๐Ÿ› ๏ธ AITools: code_generation_and_execution_tool: result={result}")
414
 
415
  return result
 
461
  result = AITools._extract_execution_result(response)
462
 
463
  print(f"๐Ÿ› ๏ธ AITools: code_execution_tool: model={model}")
464
+ if current_model != LLM_FALLBACK:
465
+ print(f"๐Ÿ› ๏ธ AITools: code_execution_tool: thinking_level={THINKING_LEVEL_CODE_EXECUTION}")
466
  print(f"๐Ÿ› ๏ธ AITools: code_execution_tool: result={result}")
467
 
468
  return result
 
538
  board = chess.Board(result) # FEN validation
539
 
540
  print(f"๐Ÿ› ๏ธ AITools: img_to_fen_tool: model={model}")
541
+ if current_model != LLM_FALLBACK:
542
+ print(f"๐Ÿ› ๏ธ AITools: img_to_fen_tool: thinking_level={THINKING_LEVEL_IMAGE_TO_FEN}")
543
  print(f"๐Ÿ› ๏ธ AITools: img_to_fen_tool: result={result}")
544
 
545
  return result
 
613
  break
614
 
615
  print(f"๐Ÿ› ๏ธ AITools: algebraic_notation_tool: model={model}")
616
+ if current_model != LLM_FALLBACK:
617
+ print(f"๐Ÿ› ๏ธ AITools: algebraic_notation_tool: thinking_level={THINKING_LEVEL_ALGEBRAIC_NOTATION}")
618
  print(f"๐Ÿ› ๏ธ AITools: algebraic_notation_tool: result={result}")
619
 
620
  return result
 
665
  result = response.text.strip()
666
 
667
  print(f"๐Ÿ› ๏ธ AITools: final_answer_tool: model={model}")
668
+ if current_model != LLM_FALLBACK:
669
+ print(f"๐Ÿ› ๏ธ AITools: final_answer_tool: thinking_level={THINKING_LEVEL_FINAL_ANSWER}")
670
  print(f"๐Ÿ› ๏ธ AITools: final_answer_tool: result={result}")
671
 
672
  return result