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

AskUserAnswer

class AskUserAnswer(BaseModel)
源码Source agentscope/tool/_builtin/_ask_user.py:106–128

Ask 用户答案,让智能体以受控方式调用外部能力。位于 agentscope.tool 包。

An entry of :attr:AskUserMetadata.answers; a frontend building them one at a time has this to build them with.

属性摘要Attribute Summary

属性Attribute类型Type说明Description值Value
questionstr
问题字段。
Field(description='The question this answers, verbatim.')
selectedlist[str]
已选择字段。
Field(default_factory=list, description='Labels of the options the user chose.')
otherstr | None
`other` 字段。
Field(default=None, description='What the user typed instead of choosing, when they answered in their own words.')

属性详情Attribute Detail

question

str = Field(description='The question this answers, verbatim.')

问题字段。声明为 str。

The question this answers, verbatim.

源码Source agentscope/tool/_builtin/_ask_user.py:113

selected

list[str] = Field(default_factory=list, description='Labels of the options the user chose.')

已选择字段。声明为 list[str]。

Labels of the options the user chose.

源码Source agentscope/tool/_builtin/_ask_user.py:117

other

str | None = Field(default=None, description='What the user typed instead of choosing, when they answered in their own words.')

other 字段。声明为 str | None。

What the user typed instead of choosing, when they answered in their own words.

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