AS AgentScopeAPI 手册 / API Reference
类class agentscope.event

ModelCallEndEvent

class ModelCallEndEvent(EventBase)
源码Source agentscope/event/_event.py:138–156

模型调用结束事件,描述执行过程中的事件。位于 agentscope.event 包,继承自 EventBase。

Model call end event. Declared in agentscope.event. Extends EventBase.

属性摘要Attribute Summary

属性Attribute类型Type说明Description值Value
typeLiteral[EventType.MODEL_CALL_END]
类型字段。
EventType.MODEL_CALL_END
reply_idstr
回复标识字段。
—
input_tokensint
输入令牌数字段。
—
output_tokensint
输出令牌数字段。
—
cache_input_tokensint
缓存输入令牌数字段。
0
cache_creation_input_tokensint
`cache_creation_input_tokens` 字段。
0
finished_reasonFinishedReason
`finished_reason` 字段。
Field(default=FinishedReason.COMPLETED)

属性详情Attribute Detail

type

Literal[EventType.MODEL_CALL_END] = EventType.MODEL_CALL_END

类型字段。声明为 Literal[EventType.MODEL_CALL_END]。

The type field.

源码Source agentscope/event/_event.py:141

reply_id

str

回复标识字段。声明为 str。

The reply id field.

源码Source agentscope/event/_event.py:143

input_tokens

int

输入令牌数字段。声明为 int。

The input tokens field.

源码Source agentscope/event/_event.py:145

output_tokens

int

输出令牌数字段。声明为 int。

The output tokens field.

源码Source agentscope/event/_event.py:147

cache_input_tokens

int = 0

缓存输入令牌数字段。声明为 int。

The cache input tokens field.

源码Source agentscope/event/_event.py:149

cache_creation_input_tokens

int = 0

cache_creation_input_tokens 字段。声明为 int。

The cache creation input tokens field.

源码Source agentscope/event/_event.py:151

finished_reason

FinishedReason = Field(default=FinishedReason.COMPLETED)

finished_reason 字段。声明为 FinishedReason。

The finished reason field.

源码Source agentscope/event/_event.py:153

继承成员Inherited Members

继承自Inherited from EventBase
基于官方固定版本源码静态生成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.