类class
agentscope.messageToolCallBlock
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) |
type | Literal['tool_call'] | 类型字段。 | 'tool_call' |
id | str | 标识字段。 | — |
name | str | 名称字段。 | — |
input | str | 输入字段。 | — |
state | ToolCallState | 状态字段。 | ToolCallState.PENDING |
suggested_rules | list[PermissionRule] | `suggested_rules` 字段。 | Field(default_factory=list) |
created_at | str | 已创建 at字段。 | Field(default_factory=_generate_timestamp) |
finished_at | str | None | `finished_at` 字段。 | None |
属性详情Attribute Detail
model_config
= ConfigDict(use_enum_values=True)模型配置字段。
The model config field.
源码Source
agentscope/message/_block.py:141type
Literal['tool_call'] = 'tool_call'类型字段。声明为 Literal['tool_call']。
The type field.
源码Source
agentscope/message/_block.py:143id
str标识字段。声明为 str。
The id field.
源码Source
agentscope/message/_block.py:145name
str名称字段。声明为 str。
The name field.
源码Source
agentscope/message/_block.py:147input
str输入字段。声明为 str。
The input field.
源码Source
agentscope/message/_block.py:149state
ToolCallState = ToolCallState.PENDING状态字段。声明为 ToolCallState。
The state field.
源码Source
agentscope/message/_block.py:151suggested_rules
list[PermissionRule] = Field(default_factory=list)suggested_rules 字段。声明为 list[PermissionRule]。
The suggested rules field.
源码Source
agentscope/message/_block.py:176created_at
str = Field(default_factory=_generate_timestamp)已创建 at字段。声明为 str。
The created at field.
源码Source
agentscope/message/_block.py:179finished_at
str | None = Nonefinished_at 字段。声明为 str | None。
The finished at field.
源码Source
agentscope/message/_block.py:181