MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / message_body

Function message_body

tests/test_middleware.py:62–72  ·  view source on GitHub ↗
(*, model: str = "claude-opus-4-6")

Source from the content-addressed store, hash-verified

60
61
62def message_body(*, model: str = "claude-opus-4-6") -> dict[str, Any]:
63 return {
64 "id": "msg_013Zva2CMHLNnXjNJJKqJ2EF",
65 "type": "message",
66 "role": "assistant",
67 "model": model,
68 "content": [{"type": "text", "text": "Hello!"}],
69 "stop_reason": "end_turn",
70 "stop_sequence": None,
71 "usage": {"input_tokens": 10, "output_tokens": 5},
72 }
73
74
75def error_body(*, type: str, message: str) -> dict[str, Any]:

Calls

no outgoing calls

Tested by

no test coverage detected