类class
agentscope.classifierChoiceAnswer
@dataclass
class ChoiceAnswer(DictMixin)
源码Source
agentscope/classifier/_response.py:26–41选项答案,与模型服务通信并返回生成或向量化结果。位于 agentscope.classifier 包,继承自 DictMixin。
The selected alternative and its probability distribution. Declared in agentscope.classifier. Extends DictMixin.
属性摘要Attribute Summary
| 属性Attribute | 类型Type | 说明Description | 值Value |
|---|---|---|---|
choice | str | 选项字段。 | — |
confidence | float | 置信度字段。 | — |
probabilities | dict[str, float] | `probabilities` 字段。 | — |
type | Literal['choice_answer'] | 类型字段。 | field(default_factory=lambda: 'choice_answer') |
属性详情Attribute Detail
choice
str选项字段。声明为 str。
The choice field.
源码Source
agentscope/classifier/_response.py:29confidence
float置信度字段。声明为 float。
The confidence field.
源码Source
agentscope/classifier/_response.py:32probabilities
dict[str, float]probabilities 字段。声明为 dict[str, float]。
The probabilities field.
源码Source
agentscope/classifier/_response.py:35type
Literal['choice_answer'] = field(default_factory=lambda: 'choice_answer')类型字段。声明为 Literal['choice_answer']。
The type field.
源码Source
agentscope/classifier/_response.py:38