包package
agentscope.typesagentscope.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:5Embedding
= List[float]向量化字段。
The embedding field.
源码Source
agentscope/types/_object.py:5JSONPrimitive
TypeAlias = str | int | float | bool | NoneJSONPrimitive 字段。声明为 TypeAlias。
The JSON primitive field.
源码Source
agentscope/types/_json.py:5JSONSerializableObject
TypeAlias = JSONPrimitive | list['JSONSerializableObject'] | dict[str, 'JSONSerializableObject']JSONSerializableObject 字段。声明为 TypeAlias。
The JSON serializable object field.
源码Source
agentscope/types/_json.py:7ReActAgentHookTypes
= AgentHookTypes | Literal['pre_reasoning', 'post_reasoning', 'pre_acting', 'post_acting']ReAct 智能体钩子类型字段。
The ReAct agent hook types field.
源码Source
agentscope/types/_hook.py:17