Update agents/tools/ai_tools.py
Browse files- agents/tools/ai_tools.py +10 -10
agents/tools/ai_tools.py
CHANGED
|
@@ -64,7 +64,7 @@ class AITools():
|
|
| 64 |
print(f"๐ ๏ธ AITools: {tool_name}: result={result}")
|
| 65 |
return result
|
| 66 |
except Exception as e:
|
| 67 |
-
print(f"
|
| 68 |
raise RuntimeError(f"Processing failed: {str(e)}")
|
| 69 |
|
| 70 |
def _extract_execution_result(response):
|
|
@@ -107,7 +107,7 @@ class AITools():
|
|
| 107 |
print(f"๐ ๏ธ AITools: web_search_tool: result={result}")
|
| 108 |
return result
|
| 109 |
except Exception as e:
|
| 110 |
-
print(f"
|
| 111 |
raise RuntimeError(f"Processing failed: {str(e)}")
|
| 112 |
|
| 113 |
@tool("Web Browser Tool")
|
|
@@ -152,7 +152,7 @@ class AITools():
|
|
| 152 |
print(f"๐ ๏ธ AITools: web_browser_tool: result={result}")
|
| 153 |
return result
|
| 154 |
except Exception as e:
|
| 155 |
-
print(f"
|
| 156 |
raise RuntimeError(f"Processing failed: {str(e)}")
|
| 157 |
|
| 158 |
@tool("Image Analysis Tool")
|
|
@@ -238,7 +238,7 @@ class AITools():
|
|
| 238 |
print(f"๐ ๏ธ AITools: youtube_analysis_tool: result={result}")
|
| 239 |
return result
|
| 240 |
except Exception as e:
|
| 241 |
-
print(f"
|
| 242 |
raise RuntimeError(f"Processing failed: {str(e)}")
|
| 243 |
|
| 244 |
@tool("Document Analysis Tool")
|
|
@@ -288,7 +288,7 @@ class AITools():
|
|
| 288 |
print(f"๐ ๏ธ AITools: document_analysis_tool: result={result}")
|
| 289 |
return result
|
| 290 |
except Exception as e:
|
| 291 |
-
print(f"
|
| 292 |
raise RuntimeError(f"Processing failed: {str(e)}")
|
| 293 |
|
| 294 |
@tool("Code Generation and Execution Tool")
|
|
@@ -325,7 +325,7 @@ class AITools():
|
|
| 325 |
print(f"๐ ๏ธ AITools: code_generation_and_execution_tool: result={result}")
|
| 326 |
return result
|
| 327 |
except Exception as e:
|
| 328 |
-
print(f"
|
| 329 |
raise RuntimeError(f"Processing failed: {str(e)}")
|
| 330 |
|
| 331 |
@tool("Code Execution Tool")
|
|
@@ -365,7 +365,7 @@ class AITools():
|
|
| 365 |
print(f"๐ ๏ธ AITools: code_execution_tool: result={result}")
|
| 366 |
return result
|
| 367 |
except Exception as e:
|
| 368 |
-
print(f"
|
| 369 |
raise RuntimeError(f"Processing failed: {str(e)}")
|
| 370 |
|
| 371 |
@tool("Image to FEN Tool")
|
|
@@ -428,7 +428,7 @@ class AITools():
|
|
| 428 |
print(f"๐ ๏ธ AITools: img_to_fen_tool: result={result}")
|
| 429 |
return result
|
| 430 |
except Exception as e:
|
| 431 |
-
print(f"
|
| 432 |
raise RuntimeError(f"Processing failed: {str(e)}")
|
| 433 |
|
| 434 |
@tool("Algebraic Notation Tool")
|
|
@@ -489,7 +489,7 @@ class AITools():
|
|
| 489 |
print(f"๐ ๏ธ AITools: algebraic_notation_tool: result={result}")
|
| 490 |
return result
|
| 491 |
except Exception as e:
|
| 492 |
-
print(f"
|
| 493 |
raise RuntimeError(f"Processing failed: {str(e)}")
|
| 494 |
|
| 495 |
def final_answer_tool(question: str, answer: str) -> str:
|
|
@@ -526,5 +526,5 @@ class AITools():
|
|
| 526 |
print(f"๐ ๏ธ AITools: final_answer_tool: result={result}")
|
| 527 |
return result
|
| 528 |
except Exception as e:
|
| 529 |
-
print(f"
|
| 530 |
raise RuntimeError(f"Processing failed: {str(e)}")
|
|
|
|
| 64 |
print(f"๐ ๏ธ AITools: {tool_name}: result={result}")
|
| 65 |
return result
|
| 66 |
except Exception as e:
|
| 67 |
+
print(f"โ ๏ธ AITools: {tool_name}: exception={str(e)}")
|
| 68 |
raise RuntimeError(f"Processing failed: {str(e)}")
|
| 69 |
|
| 70 |
def _extract_execution_result(response):
|
|
|
|
| 107 |
print(f"๐ ๏ธ AITools: web_search_tool: result={result}")
|
| 108 |
return result
|
| 109 |
except Exception as e:
|
| 110 |
+
print(f"โ ๏ธ AITools: web_search_tool: exception={str(e)}")
|
| 111 |
raise RuntimeError(f"Processing failed: {str(e)}")
|
| 112 |
|
| 113 |
@tool("Web Browser Tool")
|
|
|
|
| 152 |
print(f"๐ ๏ธ AITools: web_browser_tool: result={result}")
|
| 153 |
return result
|
| 154 |
except Exception as e:
|
| 155 |
+
print(f"โ ๏ธ AITools: web_browser_tool: exception={str(e)}")
|
| 156 |
raise RuntimeError(f"Processing failed: {str(e)}")
|
| 157 |
|
| 158 |
@tool("Image Analysis Tool")
|
|
|
|
| 238 |
print(f"๐ ๏ธ AITools: youtube_analysis_tool: result={result}")
|
| 239 |
return result
|
| 240 |
except Exception as e:
|
| 241 |
+
print(f"โ ๏ธ AITools: youtube_analysis_tool: exception={str(e)}")
|
| 242 |
raise RuntimeError(f"Processing failed: {str(e)}")
|
| 243 |
|
| 244 |
@tool("Document Analysis Tool")
|
|
|
|
| 288 |
print(f"๐ ๏ธ AITools: document_analysis_tool: result={result}")
|
| 289 |
return result
|
| 290 |
except Exception as e:
|
| 291 |
+
print(f"โ ๏ธ AITools: document_analysis_tool: exception={str(e)}")
|
| 292 |
raise RuntimeError(f"Processing failed: {str(e)}")
|
| 293 |
|
| 294 |
@tool("Code Generation and Execution Tool")
|
|
|
|
| 325 |
print(f"๐ ๏ธ AITools: code_generation_and_execution_tool: result={result}")
|
| 326 |
return result
|
| 327 |
except Exception as e:
|
| 328 |
+
print(f"โ ๏ธ AITools: code_generation_and_execution_tool: exception={str(e)}")
|
| 329 |
raise RuntimeError(f"Processing failed: {str(e)}")
|
| 330 |
|
| 331 |
@tool("Code Execution Tool")
|
|
|
|
| 365 |
print(f"๐ ๏ธ AITools: code_execution_tool: result={result}")
|
| 366 |
return result
|
| 367 |
except Exception as e:
|
| 368 |
+
print(f"โ ๏ธ AITools: code_execution_tool: exception={str(e)}")
|
| 369 |
raise RuntimeError(f"Processing failed: {str(e)}")
|
| 370 |
|
| 371 |
@tool("Image to FEN Tool")
|
|
|
|
| 428 |
print(f"๐ ๏ธ AITools: img_to_fen_tool: result={result}")
|
| 429 |
return result
|
| 430 |
except Exception as e:
|
| 431 |
+
print(f"โ ๏ธ AITools: img_to_fen_tool: exception={str(e)}")
|
| 432 |
raise RuntimeError(f"Processing failed: {str(e)}")
|
| 433 |
|
| 434 |
@tool("Algebraic Notation Tool")
|
|
|
|
| 489 |
print(f"๐ ๏ธ AITools: algebraic_notation_tool: result={result}")
|
| 490 |
return result
|
| 491 |
except Exception as e:
|
| 492 |
+
print(f"โ ๏ธ AITools: algebraic_notation_tool: exception={str(e)}")
|
| 493 |
raise RuntimeError(f"Processing failed: {str(e)}")
|
| 494 |
|
| 495 |
def final_answer_tool(question: str, answer: str) -> str:
|
|
|
|
| 526 |
print(f"๐ ๏ธ AITools: final_answer_tool: result={result}")
|
| 527 |
return result
|
| 528 |
except Exception as e:
|
| 529 |
+
print(f"โ ๏ธ AITools: final_answer_tool: exception={str(e)}")
|
| 530 |
raise RuntimeError(f"Processing failed: {str(e)}")
|