Spaces:
Running
Running
Update agents/tools/ai_tools.py
Browse files86 unmodified lines8788899091929349 unmodified lines143144145146147148149141 unmodified lines29129229329429529629757 unmodified lines35535635735835936036142 unmodified lines40440540640740840941045 unmodified lines45645745845946046146269 unmodified lines53253353453553653753867 unmodified lines60660760860961061161244 unmodified lines65765865966066166266386 unmodified linesresult = response.textprint(f"๐ ๏ธ AITools: {tool_name}: model={current_model}")print(f"๐ ๏ธ AITools: {tool_name}: thinking_level={THINKING_LEVEL_MEDIA_ANALYSIS}")print(f"๐ ๏ธ AITools: {tool_name}: result={result}")return result49 unmodified linesresult = response.textprint(f"๐ ๏ธ AITools: web_search_tool: model={model}")print(f"๐ ๏ธ AITools: web_search_tool: thinking_level={THINKING_LEVEL_WEB_SEARCH}")print(f"๐ ๏ธ AITools: web_search_tool: result={result}")return result141 unmodified lines)print(f"๐ ๏ธ AITools: youtube_analysis_tool: model={model}")print(f"๐ ๏ธ AITools: youtube_analysis_tool: thinking_level={THINKING_LEVEL_YOUTUBE_ANALYSIS}")print(f"๐ ๏ธ AITools: youtube_analysis_tool: result={result}")return result57 unmodified linesresult = response.textprint(f"๐ ๏ธ AITools: document_analysis_tool: model={model}")print(f"๐ ๏ธ AITools: document_analysis_tool: thinking_level={THINKING_LEVEL_DOCUMENT_ANALYSIS}")print(f"๐ ๏ธ AITools: document_analysis_tool: result={result}")return result42 unmodified linesresult = AITools._extract_execution_result(response)print(f"๐ ๏ธ AITools: code_generation_and_execution_tool: model={model}")print(f"๐ ๏ธ AITools: code_generation_and_execution_tool: thinking_level={THINKING_LEVEL_CODE_GENERATION}")print(f"๐ ๏ธ AITools: code_generation_and_execution_tool: result={result}")return result45 unmodified linesresult = AITools._extract_execution_result(response)print(f"๐ ๏ธ AITools: code_execution_tool: model={model}")print(f"๐ ๏ธ AITools: code_execution_tool: thinking_level={THINKING_LEVEL_CODE_EXECUTION}")print(f"๐ ๏ธ AITools: code_execution_tool: result={result}")return result69 unmodified linesboard = chess.Board(result) # FEN validationprint(f"๐ ๏ธ AITools: img_to_fen_tool: model={model}")print(f"๐ ๏ธ AITools: img_to_fen_tool: thinking_level={THINKING_LEVEL_IMAGE_TO_FEN}")print(f"๐ ๏ธ AITools: img_to_fen_tool: result={result}")return result67 unmodified linesbreakprint(f"๐ ๏ธ AITools: algebraic_notation_tool: model={model}")print(f"๐ ๏ธ AITools: algebraic_notation_tool: thinking_level={THINKING_LEVEL_ALGEBRAIC_NOTATION}")print(f"๐ ๏ธ AITools: algebraic_notation_tool: result={result}")return result44 unmodified linesresult = response.text.strip()print(f"๐ ๏ธ AITools: final_answer_tool: model={model}")print(f"๐ ๏ธ AITools: final_answer_tool: thinking_level={THINKING_LEVEL_FINAL_ANSWER}")print(f"๐ ๏ธ AITools: final_answer_tool: result={result}")return result86 unmodified lines878889909192939449 unmodified lines144145146147148149150151141 unmodified lines29329429529629729829930057 unmodified lines35835936036136236336436542 unmodified lines40840941041141241341441545 unmodified lines46146246346446546646746869 unmodified lines53853954054154254354454567 unmodified lines61361461561661761861962044 unmodified lines66566666766866967067167286 unmodified linesresult = response.textprint(f"๐ ๏ธ AITools: {tool_name}: model={current_model}")if current_model != LLM_FALLBACK:print(f"๐ ๏ธ AITools: {tool_name}: thinking_level={THINKING_LEVEL_MEDIA_ANALYSIS}")print(f"๐ ๏ธ AITools: {tool_name}: result={result}")return result49 unmodified linesresult = response.textprint(f"๐ ๏ธ AITools: web_search_tool: model={model}")if current_model != LLM_FALLBACK:print(f"๐ ๏ธ AITools: web_search_tool: thinking_level={THINKING_LEVEL_WEB_SEARCH}")print(f"๐ ๏ธ AITools: web_search_tool: result={result}")return result141 unmodified lines)print(f"๐ ๏ธ AITools: youtube_analysis_tool: model={model}")if current_model != LLM_FALLBACK:print(f"๐ ๏ธ AITools: youtube_analysis_tool: thinking_level={THINKING_LEVEL_YOUTUBE_ANALYSIS}")print(f"๐ ๏ธ AITools: youtube_analysis_tool: result={result}")return result57 unmodified linesresult = response.textprint(f"๐ ๏ธ AITools: document_analysis_tool: model={model}")if current_model != LLM_FALLBACK:print(f"๐ ๏ธ AITools: document_analysis_tool: thinking_level={THINKING_LEVEL_DOCUMENT_ANALYSIS}")print(f"๐ ๏ธ AITools: document_analysis_tool: result={result}")return result42 unmodified linesresult = AITools._extract_execution_result(response)print(f"๐ ๏ธ AITools: code_generation_and_execution_tool: model={model}")if current_model != LLM_FALLBACK:print(f"๐ ๏ธ AITools: code_generation_and_execution_tool: thinking_level={THINKING_LEVEL_CODE_GENERATION}")print(f"๐ ๏ธ AITools: code_generation_and_execution_tool: result={result}")return result45 unmodified linesresult = AITools._extract_execution_result(response)print(f"๐ ๏ธ AITools: code_execution_tool: model={model}")if current_model != LLM_FALLBACK:print(f"๐ ๏ธ AITools: code_execution_tool: thinking_level={THINKING_LEVEL_CODE_EXECUTION}")print(f"๐ ๏ธ AITools: code_execution_tool: result={result}")return result69 unmodified linesboard = chess.Board(result) # FEN validationprint(f"๐ ๏ธ AITools: img_to_fen_tool: model={model}")if current_model != LLM_FALLBACK:print(f"๐ ๏ธ AITools: img_to_fen_tool: thinking_level={THINKING_LEVEL_IMAGE_TO_FEN}")print(f"๐ ๏ธ AITools: img_to_fen_tool: result={result}")return result67 unmodified linesbreakprint(f"๐ ๏ธ AITools: algebraic_notation_tool: model={model}")if current_model != LLM_FALLBACK:print(f"๐ ๏ธ AITools: algebraic_notation_tool: thinking_level={THINKING_LEVEL_ALGEBRAIC_NOTATION}")print(f"๐ ๏ธ AITools: algebraic_notation_tool: result={result}")return result44 unmodified linesresult = response.text.strip()print(f"๐ ๏ธ AITools: final_answer_tool: model={model}")if current_model != LLM_FALLBACK:print(f"๐ ๏ธ AITools: final_answer_tool: thinking_level={THINKING_LEVEL_FINAL_ANSWER}")print(f"๐ ๏ธ AITools: final_answer_tool: result={result}")return result
agents/tools/ai_tools.py+18-9