类class
agentscope.toolAskUserAnswer
class AskUserAnswer(BaseModel)
源码Source
agentscope/tool/_builtin/_ask_user.py:106–128Ask 用户答案,让智能体以受控方式调用外部能力。位于 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 |
|---|---|---|---|
question | str | 问题字段。 | Field(description='The question this answers, verbatim.') |
selected | list[str] | 已选择字段。 | Field(default_factory=list, description='Labels of the options the user chose.') |
other | str | 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:113selected
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:117other
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