StreamEvent
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| BaseMessage clawd_code_sdk.models.messages Base class for messages. |
â‹” Inheritance diagram¶
graph TD
1015004014["messages.StreamEvent"]
3295781244["messages.BaseMessage"]
3879467795["main.BaseModel"]
2751680898["builtins.object"]
3295781244 --> 1015004014
3879467795 --> 3295781244
2751680898 --> 3879467795
🛈 DocStrings¶
Bases: BaseMessage
Stream event for partial message updates during streaming.
Source code in src/clawd_code_sdk/models/messages.py
627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 | |
api_message_id
class-attribute
instance-attribute
¶
ID of the API message this event belongs to (undocumented).
owed_rows
class-attribute
instance-attribute
¶
Uuids of transcript rows the turn wrote before its first model request that change what Claude holds of a claude.ai Project or an attached PDF (internal, CLI 2.1.330+).
thinking_display
class-attribute
instance-attribute
¶
Active thinking display mode (undocumented).
block_start_text
classmethod
¶
block_start_text(*, index: int, session_id: str, uuid: str) -> StreamEvent
Create a synthetic content_block_start StreamEvent for a text block.
Source code in src/clawd_code_sdk/models/messages.py
block_start_thinking
classmethod
¶
block_start_thinking(*, index: int, session_id: str, uuid: str) -> StreamEvent
Create a synthetic content_block_start StreamEvent for a thinking block.
Source code in src/clawd_code_sdk/models/messages.py
block_start_tool_use
classmethod
¶
block_start_tool_use(
*, tool_use_id: str, name: str, index: int, session_id: str, uuid: str
) -> StreamEvent
Create a synthetic content_block_start StreamEvent for a tool_use block.
Source code in src/clawd_code_sdk/models/messages.py
block_stop
classmethod
¶
block_stop(*, index: int, session_id: str, uuid: str) -> StreamEvent
Create a synthetic content_block_stop StreamEvent.
Source code in src/clawd_code_sdk/models/messages.py
block_text_delta
classmethod
¶
block_text_delta(*, text: str, index: int, session_id: str, uuid: str) -> StreamEvent
Create a synthetic content_block_delta StreamEvent with full block content.
Source code in src/clawd_code_sdk/models/messages.py
block_thinking_delta
classmethod
¶
block_thinking_delta(*, thinking: str, index: int, session_id: str, uuid: str) -> StreamEvent
Create a synthetic content_block_delta StreamEvent with full block content.
Source code in src/clawd_code_sdk/models/messages.py
block_tool_json_delta
classmethod
¶
block_tool_json_delta(*, partial_json: str, index: int, session_id: str, uuid: str) -> StreamEvent
Create a synthetic content_block_delta StreamEvent with full block content.
Source code in src/clawd_code_sdk/models/messages.py
message_delta
classmethod
¶
message_delta(*, stop_reason: BetaStopReason | None, session_id: str, uuid: str) -> StreamEvent
Create a synthetic message_delta StreamEvent.
Source code in src/clawd_code_sdk/models/messages.py
message_stop
classmethod
¶
message_stop(*, session_id: str, uuid: str) -> StreamEvent
Create a synthetic message_stop StreamEvent.