generated from datawhalechina/repo-template
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
1. 遇到问题的章节 / Affected Chapter
代码不够完整,依赖不够清楚
2. 问题类型 / Issue Type
文档不清晰 / Unclear Documentation
3. 具体问题描述 / Problem Description
纯复制粘贴是必报错的,我都零基础了,当然是不会改的;
- 最关键:缺少实例化步骤
资料里写:
team_chat = RoundRobinGroupChat(
participants=[
product_manager, # ← 这些变量从哪来?
engineer,
code_reviewer,
user_proxy
],
...
)
team_chat = RoundRobinGroupChat( participants=[ product_manager, # ← 这些变量从哪来? engineer, code_reviewer, user_proxy ], ...)
但没有给出这 4 个变量是如何创建的。虽然前面讲了 create_product_manager 等函数,但在“定义 team_chat”这一段里,直接把 product_manager 等当成已存在的变量使用,却没写:
model_client = create_openai_model_client()
product_manager = create_product_manager(model_client)
engineer = create_engineer(model_client)
...
model_client = create_openai_model_client()product_manager = create_product_manager(model_client)engineer = create_engineer(model_client)...
这是典型的教学材料省略:作者假定读者会自己补初始化,但对初学者来说很难看出来,很容易照抄出 NameError。 - import 不完整
资料只给了部分 import,缺少很多实际要用到的:
AssistantAgent、UserProxyAgent
Console
asyncio
这些在完整可运行脚本里都必须有,资料没给全。 - 非 OpenAI 模型说明“藏得太深”
非 OpenAI 模型(DeepSeek 等)需要传 model_info,这点在 6.2.4 节(第 347 行附近)才出现,而且:
主流程示例完全没涉及
没有在“创建模型客户端”的地方提示“如果你用 DeepSeek 等非 OpenAI 模型,需要加 model_info”
很多读者会只按 6.2.3 的主流程抄,自然会在 DeepSeek 等场景报错。 - 环境变量加载未说明
主流程里没有 load_dotenv,直接用 os.getenv。如果你的配置在 .env 里:
不调用 load_dotenv 就读不到
资料没提这一点,也没在任何示例里加 load_dotenv - Agent 名称的约束没说明
资料里用的是 name="ProductManager",这是对的
你曾写成 name="产品经理",API 会报:Invalid name: 产品经理. Only letters, numbers, '_' and '-' are allowed.
资料没有明确说明:agent name 必须只用字母、数字、下划线和连字符,读者容易自己改成中文名踩坑。
4. 问题重现材料 / Reproduction Materials
5. 补充信息 / Additional Information
No response
确认事项 / Verification
- 我已阅读过相关章节的文档 / I have read the relevant chapter documentation
- 我已搜索过现有的Issues,确认此问题未被报告 / I have searched existing Issues and confirmed this hasn't been reported
- 我已尝试过基本的故障排除(如重启、重新安装依赖等) / I have tried basic troubleshooting (restart, reinstall dependencies, etc.)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation