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

Function message_body

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

Source from the content-addressed store, hash-verified

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

Calls

no outgoing calls

Tested by

no test coverage detected