remove print()in prompt, remove the PIL and CV2.
Browse files162 unmodified lines1631641651661671681691661671681697 unmodified lines177178179183184185186187188189180181182183184185186162 unmodified lines You may freely think, reason, and use tools or your own knowledge as needed to solve the problem. IMPORTANT OUTPUT INSTRUCTIONS: - When you need to return your final answer, use print() to output it - For example: print("Qxf7") or print("42") or print("unknown") - DO NOT just write the answer as a standalone variable - If you cannot solve the problem, use: print("unknown") When you need to return your final answer, just output the answer directly Answer format requirements: - If the answer is a number, output only the number (no units, no commas)7 unmodified lines files_prompt = f"\n[You have the following attached files available: {', '.join(files)}]\n" # 添加文件处理指导 files_prompt += """ To work with image files, you can: 1. Use PIL (from PIL import Image) to load and analyze images 2. Use cv2 (import cv2) for image processing 3. For chess positions, you might need to analyze the board position pixel by pixel 4. Consider using OCR libraries if there's text in the image """ Note: PIL and cv2 imports are restricted in this environment. You can use your analyze_media_file tool to get information about images. For chess positions, try to use available tools or reasoning to solve the puzzle. """ full_question = system_prompt + files_prompt + "\n\n" + question return self.agent.run(full_question) except Exception as e:app.py+5-11