类class
agentscope.messageTextBlock
class TextBlock(BaseModel)
源码Source
agentscope/message/_block.py:11–23文本块。位于 agentscope.message 包。
The text block. Declared in agentscope.message.
属性摘要Attribute Summary
| 属性Attribute | 类型Type | 说明Description | 值Value |
|---|---|---|---|
type | Literal['text'] | 类型字段。 | 'text' |
text | str | 文本字段。 | — |
id | str | 标识字段。 | Field(default_factory=_generate_id) |
created_at | str | 已创建 at字段。 | Field(default_factory=_generate_timestamp) |
finished_at | str | None | `finished_at` 字段。 | None |
属性详情Attribute Detail
type
Literal['text'] = 'text'类型字段。声明为 Literal['text']。
The type field.
源码Source
agentscope/message/_block.py:14text
str文本字段。声明为 str。
The text field.
源码Source
agentscope/message/_block.py:16id
str = Field(default_factory=_generate_id)标识字段。声明为 str。
The id field.
源码Source
agentscope/message/_block.py:18created_at
str = Field(default_factory=_generate_timestamp)已创建 at字段。声明为 str。
The created at field.
源码Source
agentscope/message/_block.py:20finished_at
str | None = Nonefinished_at 字段。声明为 str | None。
The finished at field.
源码Source
agentscope/message/_block.py:22