AS AgentScopeAPI 手册 / API Reference

InputMessage

@JsonClassDescription("Input message") @JsonInclude(JsonInclude.Include.NON_NULL) public class InputMessage
源码Source io/agentscope/core/tracing/telemetry/model/InputMessage.java:31–72

表示输入消息已发送到模型。位于 io.agentscope.core.tracing.telemetry.model 包。核心成员包括 getRole、getParts、getName、create。

Represents an input message sent to the model.

方法摘要Method Summary

方法Method说明Description
public String getRole()
获取角色。
Returns the role.
public List<MessagePart> getParts()
获取 `getParts`。
Returns the parts.
public String getName()
获取名称。
Returns the name.
public static InputMessage create(String role, List<MessagePart> parts, String name)
static
创建并返回实例。
Creates and returns an instance.
public static InputMessage create(Role role, List<MessagePart> parts, String name)
static
创建并返回实例。
Creates and returns an instance.

方法详情Method Detail

getRole

public String getRole()

获取角色。

Returns the role.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/tracing/telemetry/model/InputMessage.java:41–45

getParts

public List<MessagePart> getParts()

获取 getParts。

Returns the parts.

返回Returns List<MessagePart>
返回列出。Returns list.
源码Source io/agentscope/core/tracing/telemetry/model/InputMessage.java:47–51

getName

public String getName()

获取名称。

Returns the name.

返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/core/tracing/telemetry/model/InputMessage.java:53–57

create

public static InputMessage create(String role, List<MessagePart> parts, String name)
static

创建并返回实例。

Creates and returns an instance.

参数Parameters
名称Name类型Type说明Description
roleString角色(类型 `String`)。The role.
partsList<MessagePart>parts(类型 `List`)。The parts.
nameString名称(类型 `String`)。The name.
返回Returns InputMessage
返回InputMessage。Returns input message.
源码Source io/agentscope/core/tracing/telemetry/model/InputMessage.java:59–61

create

public static InputMessage create(Role role, List<MessagePart> parts, String name)
static

创建并返回实例。

Creates and returns an instance.

参数Parameters
名称Name类型Type说明Description
roleRole角色(类型 `Role`)。The role.
partsList<MessagePart>parts(类型 `List`)。The parts.
nameString名称(类型 `String`)。The name.
返回Returns InputMessage
返回InputMessage。Returns input message.
源码Source io/agentscope/core/tracing/telemetry/model/InputMessage.java:63–65
基于官方固定版本源码静态生成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.