MCPcopy
hub / github.com/AstrBotDevs/AstrBot / TextPart

Class TextPart

astrbot/core/agent/message.py:80–87  ·  view source on GitHub ↗

>>> TextPart(text="Hello, world!").model_dump() {'type': 'text', 'text': 'Hello, world!'}

Source from the content-addressed store, hash-verified

78
79
80class TextPart(ContentPart):
81 """
82 >>> TextPart(text="Hello, world!").model_dump()
83 {'type': 'text', 'text': 'Hello, world!'}
84 """
85
86 type: str = "text"
87 text: str
88
89
90class ThinkPart(ContentPart):

Callers 15

_apply_kbFunction · 0.90
_ensure_img_captionFunction · 0.90
_append_audio_attachmentFunction · 0.90
_append_video_attachmentFunction · 0.90
_process_quote_messageFunction · 0.90
_append_system_remindersFunction · 0.90
build_main_agentFunction · 0.90
stepMethod · 0.90

Calls

no outgoing calls