Update tool_executor.py

pull/1100/head
晴空 2025-07-08 14:56:40 +08:00 committed by GitHub
parent 7fe3749ae3
commit 239bae6dd3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 4 deletions

View File

@ -188,10 +188,9 @@ class ToolExecutor:
logger.info(f"{self.log_prefix}工具{tool_name}执行成功,类型: {tool_info['type']}")
content = tool_info['content']
if isinstance(content, (str, list, tuple)):
preview = content[:200]
else:
preview = str(content)[:200]
if not isinstance(content, (str, list, tuple)):
content = str(content)
preview = content[:200]
logger.debug(f"{self.log_prefix}工具{tool_name}结果内容: {preview}...")
except Exception as e: