类class
agentscope.messageThinkingBlock
class ThinkingBlock(BaseModel)
源码Source
agentscope/message/_block.py:26–53Thinking 块,在智能体、模型与前端之间传递结构化消息和事件。位于 agentscope.message 包。
Allows extra provider-specific fields (e.g. Anthropic's signature,
redacted_thinking_data) via extra="allow" so that model
implementations can pass arbitrary metadata without subclassing.
属性摘要Attribute Summary
| 属性Attribute | 类型Type | 说明Description | 值Value |
|---|---|---|---|
model_config | — | 模型配置字段。 | ConfigDict(extra='allow') |
type | Literal['thinking'] | 类型字段。 | 'thinking' |
thinking | str | `thinking` 字段。 | — |
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
model_config
= ConfigDict(extra='allow')模型配置字段。
The model config field.
源码Source
agentscope/message/_block.py:42type
Literal['thinking'] = 'thinking'类型字段。声明为 Literal['thinking']。
The type field.
源码Source
agentscope/message/_block.py:44thinking
strthinking 字段。声明为 str。
The thinking field.
源码Source
agentscope/message/_block.py:46id
str = Field(default_factory=_generate_id)标识字段。声明为 str。
The id field.
源码Source
agentscope/message/_block.py:48created_at
str = Field(default_factory=_generate_timestamp)已创建 at字段。声明为 str。
The created at field.
源码Source
agentscope/message/_block.py:50finished_at
str | None = Nonefinished_at 字段。声明为 str | None。
The finished at field.
源码Source
agentscope/message/_block.py:52