mirror of
https://github.com/shareAI-lab/learn-claude-code.git
synced 2026-04-28 06:19:32 +00:00
fix(agents): print final assistant response in s02-s12 (#39)
This commit is contained in:
parent
dbffe7c8d0
commit
aaa93bcfc4
11 changed files with 55 additions and 0 deletions
|
|
@ -217,4 +217,9 @@ if __name__ == "__main__":
|
|||
break
|
||||
history.append({"role": "user", "content": query})
|
||||
agent_loop(history)
|
||||
response_content = history[-1]["content"]
|
||||
if isinstance(response_content, list):
|
||||
for block in response_content:
|
||||
if hasattr(block, "text"):
|
||||
print(block.text)
|
||||
print()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue