AS AgentScopeAPI 手册 / API Reference
包package agentscope.classifier

agentscope.classifier

module agentscope.classifier

agentscope.classifier 属于模型与向量化,大模型接入、凭证与嵌入。 该包共收录 15 个公开类型。

Typed probabilistic classifier models.

源码Source agentscope/classifier/__init__.py:1

类Classes

BinaryAnswer
类class
二元答案,与模型服务通信并返回生成或向量化结果。
The probability of a positive answer to a binary question.
BinaryCriteria
类class
二元标准,与模型服务通信并返回生成或向量化结果。
Optional descriptions for the two outcomes of a binary question.
BinaryQuestion
类class
二元问题,与模型服务通信并返回生成或向量化结果。
A question whose answer is a probability between zero and one.
ChoiceAnswer
类class
选项答案,与模型服务通信并返回生成或向量化结果。
The selected alternative and its probability distribution.
ChoiceQuestion
类class
选项问题,与模型服务通信并返回生成或向量化结果。
A question that selects one named alternative.
ClassifierModelBase
类class
分类器模型基类,与模型服务通信并返回生成或向量化结果。
Base class for models that return typed probabilistic decisions.
ClassifierResponse
类class
分类器模型的规范化响应。
The normalized response of a classifier model.
ClassifierUsage
类class
分类器用量,与模型服务通信并返回生成或向量化结果。
The usage of a classifier model API invocation.
JevClassifierModel
类class
Jev 分类器模型,与模型服务通信并返回生成或向量化结果。
A classifier backed by TypeSafe's Jev System One API.
OpenAIClassifierModel
类class
OpenAI 分类器模型,与模型服务通信并返回生成或向量化结果。
A classifier backed by the OpenAI Decisions API.
RefusalAnswer
类class
拒答答案,与模型服务通信并返回生成或向量化结果。
A refusal to answer one question, independent of other answers.
ScoreAnswer
类class
分数答案,与模型服务通信并返回生成或向量化结果。
An expected score and its probability distribution.
ScoreQuestion
类class
分数问题,与模型服务通信并返回生成或向量化结果。
A question that assigns an expected score using an ordered rubric.

属性Attributes

ClassifierAnswer
字段attribute
—
ClassifierQuestion
字段attribute
—

属性详情Attribute Details

ClassifierAnswer

TypeAlias = BinaryAnswer | ChoiceAnswer | ScoreAnswer | RefusalAnswer

分类器答案字段。声明为 TypeAlias。

The classifier answer field.

源码Source agentscope/classifier/_response.py:83

ClassifierQuestion

TypeAlias = Annotated[BinaryQuestion | ChoiceQuestion | ScoreQuestion, Field(discriminator='type')]

分类器问题字段。声明为 TypeAlias。

The classifier question field.

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