微信扫码
添加专属顾问
我要投稿
深入探索OpenManus核心脚本,掌握斐波那契数列计算与异常处理。 核心内容: 1. 分析run_flow.py脚本,理解其在OpenManus中的作用 2. 通过计算斐波那契数列第五位,学习如何记录和调试运行结果 3. 掌握messages和tools的使用,了解规划工具的参数和功能
[ { "type": "function", "function": { "name": "planning", "description": "规划工具,用于创建和管理复杂任务的解决方案计划。\n提供创建计划、更新步骤和跟踪进度等功能。", "parameters": { "type": "object", "properties": { "command": { "type": "string", "description": "执行的命令,可选值:create(创建计划)、update(更新计划)、list(列出计划)、get(获取详情)、set_active(设置激活计划)、mark_step(标记步骤状态)、delete(删除计划)", "enum": ["create", "update", "list", "get", "set_active", "mark_step", "delete"] }, "plan_id": { "type": "string", "description": "计划唯一标识符。create/update/set_active/delete命令必填,get/mark_step命令可不填(默认使用当前激活计划)" }, "title": { "type": "string", "description": "计划标题。create命令必填,update命令可选" }, "steps": { "type": "array", "description": "计划步骤列表。create命令必填,update命令可选", "items": { "type": "object", "properties": { "step_description": {"type": "string"}, "expected_result": {"type": "string"} } } }, "step_index": { "type": "integer", "description": "步骤序号(从0开始)。mark_step命令必填" }, "step_status": { "type": "string", "description": "步骤状态。用于mark_step命令", "enum": ["not_started", "in_progress", "completed", "failed"] }, "step_notes": { "type": "string", "description": "步骤备注。mark_step命令可选" } }, "required": ["command"], "additionalProperties": False } } }]def fibonacci(n):if n <= 0:return 0elif n == 1:return 1else:return fibonacci(n-1) + fibonacci(n-2)fib_5 = fibonacci(5)print(fib_5)
53AI,企业落地大模型首选服务商
产品:场景落地咨询+大模型应用平台+行业解决方案
承诺:免费POC验证,效果达标后再合作。零风险落地应用大模型,已交付160+中大型企业
2026-06-17
GLM-5.2 技术解读:智谱百万上下文的新一代旗舰模型
2026-06-16
26.1%的AI编程技能有漏洞:NVIDIA开源 SkillSpector 能扫出什么?
2026-06-12
当 AI Coding Agent 成为基础设施:我们为什么要开源 LoongSuite Pilot
2026-06-09
CPU 跑得比 Whisper GPU还快的开源语音识别,本地部署
2026-06-09
别再问我什么是爱马仕!
2026-06-09
Open Design:开源界的 Claude Design 替代品,61.7K Star,21+ Agent 都能跑,本地第一
2026-06-08
我开源了 PPT-Library:让历史 PPT 变成 AI 可复用资产
2026-06-08
knowledge-work-plugins:Anthropic 官方开源的知识工作插件集,19,000+Star
2026-03-30
2026-04-09
2026-04-03
2026-03-23
2026-04-01
2026-03-31
2026-03-30
2026-04-18
2026-04-18
2026-03-20
2026-06-16
2026-05-30
2026-05-16
2026-04-22
2026-04-21
2026-04-15
2026-04-09
2026-04-01