AS AgentScopeAPI 手册 / API Reference

AguiContext

public class AguiContext
源码Source io/agentscope/core/agui/model/AguiContext.java:29–82

AGUI 上下文,与模型服务通信并返回生成或向量化结果。位于 io.agentscope.core.agui.model 包。核心成员包括 getDescription、getValue、toString、equals、hashCode、AguiContext。

Represents a piece of contextual information in the AG-UI protocol.

Context items provide additional information to the agent that may be relevant for generating responses. They contain a description of what the context represents and its actual value.

构造器摘要Constructor Summary

构造器Constructor说明Description
public AguiContext(String description, String value)
创建新的AguiContext。
Creates a new AguiContext.

方法摘要Method Summary

方法Method说明Description
public String getDescription()
获取 `getDescription`。
Get the context description.
public String getValue()
获取上下文值。
Get the context value.
public String toString()
返回 `toString` 结果。
Returns the to string.
public boolean equals(Object o)
设置该参数。
Performs the equals operation.
public int hashCode()
返回 `hashCode` 结果。
Returns the hash code.

构造器详情Constructor Detail

AguiContext

public AguiContext(String description, String value)

创建新的AguiContext。

Creates a new AguiContext.

参数Parameters
名称Name类型Type说明Description
descriptionString描述(类型 `String`)。Description of what this context represents
valueString值(类型 `String`)。The actual context value
源码Source io/agentscope/core/agui/model/AguiContext.java:40–45

方法详情Method Detail

getDescription

public String getDescription()

获取 getDescription。

Get the context description.

返回Returns String
返回字符串结果。The description
源码Source io/agentscope/core/agui/model/AguiContext.java:52–54

getValue

public String getValue()

获取上下文值。

Get the context value.

返回Returns String
返回字符串结果。The value
源码Source io/agentscope/core/agui/model/AguiContext.java:61–63

toString

public String toString()

返回 toString 结果。

Returns the to string.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/agui/model/AguiContext.java:65–68

equals

public boolean equals(Object o)

设置该参数。

Performs the equals operation.

参数Parameters
名称Name类型Type说明Description
oObjecto(类型 `Object`)。The o.
返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/core/agui/model/AguiContext.java:70–76

hashCode

public int hashCode()

返回 hashCode 结果。

Returns the hash code.

返回Returns int
返回数值结果。Returns a numeric result.
源码Source io/agentscope/core/agui/model/AguiContext.java:78–81
基于官方固定版本源码静态生成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.