AS AgentScopeAPI 手册 / API Reference

HintBlock

public final class HintBlock extends ContentBlock
源码Source io/agentscope/core/message/HintBlock.java:28–74

Hint 块,在智能体、模型与前端之间传递结构化消息和事件。位于 io.agentscope.core.message 包,继承自 ContentBlock。核心成员包括 getId、getHint、getSource、HintBlock。

A content block that provides hints to the LLM during reasoning.

Hint blocks are injected by middleware or memory systems (e.g., RAG) to supply contextual information that guides the agent's reasoning without being part of the conversation history.

构造器摘要Constructor Summary

构造器Constructor说明Description
public HintBlock(String id, String hint, String source)
初始化 `HintBlock` 实例。
Creates a new instance.
public HintBlock(String id, String hint)
初始化 `HintBlock` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public String getId()
获取标识。
Gets the unique identifier of this hint block.
public String getHint()
获取 `getHint`。
Gets the hint text.
public String getSource()
获取来源。
Returns the sender or origin of this hint.

构造器详情Constructor Detail

HintBlock

public HintBlock(String id, String hint, String source)

初始化 HintBlock 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
idString标识(类型 `String`)。The id.
hintStringhint(类型 `String`)。The hint.
sourceString来源(类型 `String`)。The source.
源码Source io/agentscope/core/message/HintBlock.java:34–42

HintBlock

public HintBlock(String id, String hint)

初始化 HintBlock 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
idString标识(类型 `String`)。The id.
hintStringhint(类型 `String`)。The hint.
源码Source io/agentscope/core/message/HintBlock.java:44–46

方法详情Method Detail

getId

public String getId()

获取标识。

Gets the unique identifier of this hint block.

返回Returns String
返回字符串结果。The hint block ID
源码Source io/agentscope/core/message/HintBlock.java:53–55

getHint

public String getHint()

获取 getHint。

Gets the hint text.

返回Returns String
返回字符串结果。The hint content
源码Source io/agentscope/core/message/HintBlock.java:62–64

getSource

public String getSource()

获取来源。

Returns the sender or origin of this hint.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/message/HintBlock.java:71–73
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.