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

ToolCallBlock

class ToolCallBlock(BaseModel)
源码Source agentscope/message/_block.py:138–182

工具调用块。位于 agentscope.message 包。

The tool call block. Declared in agentscope.message.

属性摘要Attribute Summary

属性Attribute类型Type说明Description值Value
model_config—
模型配置字段。
ConfigDict(use_enum_values=True)
typeLiteral['tool_call']
类型字段。
'tool_call'
idstr
标识字段。
—
namestr
名称字段。
—
inputstr
输入字段。
—
stateToolCallState
状态字段。
ToolCallState.PENDING
suggested_ruleslist[PermissionRule]
`suggested_rules` 字段。
Field(default_factory=list)
created_atstr
已创建 at字段。
Field(default_factory=_generate_timestamp)
finished_atstr | None
`finished_at` 字段。
None

属性详情Attribute Detail

model_config

 = ConfigDict(use_enum_values=True)

模型配置字段。

The model config field.

源码Source agentscope/message/_block.py:141

type

Literal['tool_call'] = 'tool_call'

类型字段。声明为 Literal['tool_call']。

The type field.

源码Source agentscope/message/_block.py:143

id

str

标识字段。声明为 str。

The id field.

源码Source agentscope/message/_block.py:145

name

str

名称字段。声明为 str。

The name field.

源码Source agentscope/message/_block.py:147

input

str

输入字段。声明为 str。

The input field.

源码Source agentscope/message/_block.py:149

state

ToolCallState = ToolCallState.PENDING

状态字段。声明为 ToolCallState。

The state field.

源码Source agentscope/message/_block.py:151

suggested_rules

list[PermissionRule] = Field(default_factory=list)

suggested_rules 字段。声明为 list[PermissionRule]。

The suggested rules field.

源码Source agentscope/message/_block.py:176

created_at

str = Field(default_factory=_generate_timestamp)

已创建 at字段。声明为 str。

The created at field.

源码Source agentscope/message/_block.py:179

finished_at

str | None = None

finished_at 字段。声明为 str | None。

The finished at field.

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