这段内容块解析代码会输出什么?

来自 Claude API
Claude Developer Platform (2026-09) 入门 2分钟

这段内容块解析代码会输出什么?

Python
message = {
    "content": [
        {"type": "text", "text": "Ready"},
        {"type": "tool_use", "name": "lookup", "input": {}},
    ]
}
texts = [b["text"] for b in message["content"] if b["type"] == "text"]
calls = [b for b in message["content"] if b["type"] == "tool_use"]
print("".join(texts), len(calls))
在试验场中打开
报告错误