类 ThinkingBlock
java.lang.Object
io.agentscope.core.message.ContentBlock
io.agentscope.core.message.ThinkingBlock
- 所有已实现的接口:
State
Represents reasoning or thinking content in a message.
This content block is used to capture the internal reasoning process of an agent before taking action. It provides transparency into how the agent arrived at its decisions or tool choices.
Thinking blocks are particularly useful in ReAct agents and other reasoning-intensive systems where understanding the agent's thought process is valuable for debugging and analysis.
The optional metadata field can store additional reasoning information such as OpenRouter's reasoning_details (reasoning.text, reasoning.encrypted, reasoning.summary) that need to be preserved and restored when formatting messages back to the API.
-
嵌套类概要
嵌套类 -
字段概要
字段 -
方法概要
修饰符和类型方法说明static ThinkingBlock.Builderbuilder()Creates a new builder for constructing ThinkingBlock instances.Gets the metadata associated with this thinking block.Gets the thinking/reasoning content of this block.
-
字段详细资料
-
METADATA_REASONING_DETAILS
Metadata key for storing OpenRouter/Gemini reasoning details list.- 另请参阅:
-
-
方法详细资料
-
getThinking
Gets the thinking/reasoning content of this block.- 返回:
- The thinking content
-
getMetadata
Gets the metadata associated with this thinking block.Metadata can contain additional reasoning information such as:
METADATA_REASONING_DETAILS- List of OpenAIReasoningDetail objects from OpenRouter/Gemini
- 返回:
- The metadata map, or null if no metadata is set
-
builder
Creates a new builder for constructing ThinkingBlock instances.- 返回:
- A new builder instance
-