AS AgentScopeAPI 手册 / API Reference
包package agentscope.types

agentscope.types

module agentscope.types

agentscope.types 属于基础设施,类型、异常、传输与工具函数。 该包共收录 8 个公开类型。

The types in agentscope

源码Source agentscope/types/__init__.py:1

类Classes

ErrorInfo
类class
错误信息,为框架提供通用类型与基础能力。
Structured, UI-facing description of a fatal reply error.
ErrorType
类class
错误类型,为框架提供通用类型与基础能力。
Classification of a fatal error that terminated a reply.
ReplyFinishedReason
类class
回复 Finished 推理,在智能体、模型与前端之间传递结构化消息和事件。
The reason a reply finished.

属性Attributes

AgentHookTypes
字段attribute
—
Embedding
字段attribute
—
JSONPrimitive
字段attribute
—
JSONSerializableObject
字段attribute
—
ReActAgentHookTypes
字段attribute
—

属性详情Attribute Details

AgentHookTypes

 = str | Literal['pre_reply', 'post_reply', 'pre_print', 'post_print', 'pre_observe', 'post_observe']

智能体钩子类型字段。

The agent hook types field.

源码Source agentscope/types/_hook.py:5

Embedding

 = List[float]

向量化字段。

The embedding field.

源码Source agentscope/types/_object.py:5

JSONPrimitive

TypeAlias = str | int | float | bool | None

JSONPrimitive 字段。声明为 TypeAlias。

The JSON primitive field.

源码Source agentscope/types/_json.py:5

JSONSerializableObject

TypeAlias = JSONPrimitive | list['JSONSerializableObject'] | dict[str, 'JSONSerializableObject']

JSONSerializableObject 字段。声明为 TypeAlias。

The JSON serializable object field.

源码Source agentscope/types/_json.py:7

ReActAgentHookTypes

 = AgentHookTypes | Literal['pre_reasoning', 'post_reasoning', 'pre_acting', 'post_acting']

ReAct 智能体钩子类型字段。

The ReAct agent hook types field.

源码Source agentscope/types/_hook.py:17
基于官方固定版本源码静态生成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.