Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions code/chapter4/Reflection.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,7 @@ def get_last_execution(self) -> str:
{task}

# 你上一轮尝试的代码:
```python
{last_code_attempt}
```

# 评审员的反馈:
{feedback}
Expand Down Expand Up @@ -138,7 +136,7 @@ def run(self, task: str):
self.memory.add_record("execution", refined_code)

final_code = self.memory.get_last_execution()
print(f"\n--- 任务完成 ---\n最终生成的代码:\n```python\n{final_code}\n```")
print(f"\n--- 任务完成 ---\n最终生成的代码:\n{final_code}")
return final_code

def _get_llm_response(self, prompt: str) -> str:
Expand Down
1 change: 0 additions & 1 deletion docs/chapter4/第四章 智能体经典范式构建.md
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,6 @@ REFINE_PROMPT_TEMPLATE = """
{task}

# 你上一轮尝试的代码:
```
{last_code_attempt}
评审员的反馈:
{feedback}
Expand Down