Chat message.
| 27 | |
| 28 | |
| 29 | class Message(BaseModel): |
| 30 | """Chat message.""" |
| 31 | |
| 32 | role: str # "system", "user", "assistant", "tool" |
| 33 | content: str | list[dict[str, Any]] # Can be string or list of content blocks |
| 34 | thinking: str | None = None # Extended thinking content for assistant messages |
| 35 | tool_calls: list[ToolCall] | None = None |
| 36 | tool_call_id: str | None = None |
| 37 | name: str | None = None # For tool role |
| 38 | |
| 39 | |
| 40 | class TokenUsage(BaseModel): |
no outgoing calls