类class
agentscope.classifierChoiceQuestion
class ChoiceQuestion(BaseModel)
源码Source
agentscope/classifier/_question.py:35–47选项问题,与模型服务通信并返回生成或向量化结果。位于 agentscope.classifier 包。
A question that selects one named alternative. Declared in agentscope.classifier.
属性摘要Attribute Summary
| 属性Attribute | 类型Type | 说明Description | 值Value |
|---|---|---|---|
model_config | — | 模型配置字段。 | ConfigDict(extra='forbid') |
type | Literal['choice'] | 类型字段。 | 'choice' |
criteria | dict[str, str | None] | 标准字段。 | Field(min_length=1) |
instructions | str | None | 指令字段。 | None |
属性详情Attribute Detail
model_config
= ConfigDict(extra='forbid')模型配置字段。
The model config field.
源码Source
agentscope/classifier/_question.py:38type
Literal['choice'] = 'choice'类型字段。声明为 Literal['choice']。
The type field.
源码Source
agentscope/classifier/_question.py:40criteria
dict[str, str | None] = Field(min_length=1)标准字段。声明为 dict[str, str | None]。
The criteria field.
源码Source
agentscope/classifier/_question.py:43instructions
str | None = None指令字段。声明为 str | None。
The instructions field.
源码Source
agentscope/classifier/_question.py:46