AS AgentScopeAPI 手册 / API Reference
包package io.agentscope.core.message

io.agentscope.core.message

package io.agentscope.core.message

io.agentscope.core.message 属于消息·事件·格式化,统一消息模型与协议转换。 该包共收录 38 个公开类型。

io.agentscope.core.message belongs to the Messages, events & formatting layer and contains 38 public types.

所属构件Artifacts agentscope-core

类Classes

类型Type种类Kind说明Description
AssistantMessage类class
Assistant 消息,在智能体、模型与前端之间传递结构化消息和事件。
A `Msg` with `MsgRole#ASSISTANT` pinned at construction time.
AudioBlock类class
表示音频内容 in 消息。
Represents audio content in a message.
Base64Source类class
基类 64 来源,在智能体、模型与前端之间传递结构化消息和事件。
Represents Base64-encoded media content with media type and data.
ContentBlock类class
内容块,在智能体、模型与前端之间传递结构化消息和事件。
Base sealed class for all content blocks in messages.
DataBlock类class
数据块,在智能体、模型与前端之间传递结构化消息和事件。
Unified data block for arbitrary binary media (image / audio / video / file).
HintBlock类class
Hint 块,在智能体、模型与前端之间传递结构化消息和事件。
A content block that provides hints to the LLM during reasoning.
ImageBlock类class
表示图像内容 in 消息使用 URL 或 Base64 来源。
Represents image content in a message with URL or Base64 source.
MessageMetadataKeys类class
消息元数据密钥,在智能体、模型与前端之间传递结构化消息和事件。
Constants for well-known message metadata keys.
Msg类class
Java 消息模型
Represents a message in the AgentScope framework.
Source类class
来源,在智能体、模型与前端之间传递结构化消息和事件。
Base class for media sources (URL or Base64).
SystemMessage类class
系统消息,在智能体、模型与前端之间传递结构化消息和事件。
A `Msg` with `MsgRole#SYSTEM` pinned at construction time.
TextBlock类class
文本块,在智能体、模型与前端之间传递结构化消息和事件。
Represents plain text content in a message.
ThinkingBlock类class
Thinking 块,在智能体、模型与前端之间传递结构化消息和事件。
Represents reasoning or thinking content in a message.
ToolResultBlock类class
表示结果的工具执行。
Represents the result of a tool execution.
ToolResultMessage类class
工具结果消息,在智能体、模型与前端之间传递结构化消息和事件。
A `Msg` with `MsgRole#TOOL` pinned at construction time.
ToolUseBlock类class
工具使用块,在智能体、模型与前端之间传递结构化消息和事件。
Represents a tool use request within a message.
URLSource类class
URL 来源,在智能体、模型与前端之间传递结构化消息和事件。
Represents URL-based media content.
UserMessage类class
用户消息,在智能体、模型与前端之间传递结构化消息和事件。
A `Msg` with `MsgRole#USER` pinned at construction time.
VideoBlock类class
表示视频内容 in 消息。
Represents video content in a message.

枚举Enums

类型Type种类Kind说明Description
GenerateReason枚举enum
定义Generate 推理相关取值的枚举。
Represents the reason why a message was generated by an agent.
MsgRole枚举enum
定义消息角色相关取值的枚举。
Defines the role of a message participant in agent conversations.
ToolCallState枚举enum
定义工具调用状态的枚举。
A enum in io.agentscope.core.message that defines enum values used when components carries structured messages and events between agents, models and UIs.
ToolResultState枚举enum
定义工具结果状态的枚举。
A enum in io.agentscope.core.message that defines enum values used when components carries structured messages and events between agents, models and UIs.
基于官方固定版本源码静态生成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.