分类
classifyAssign a state or context to one of a set of known labels and return the selected index, label, and confidence.
Instructions
何时使用:需要把一段状态/上下文归入若干已知标签之一(意图分类、类型识别)时。何时不使用:标签未知或不固定时(改走 route 或让模型自由作答);需要对同一对象打多重分数时(用 score)。返回 choice=选项下标(0 起)、label、置信度;服务不可用返回明确错误。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| state | Yes | 待分类的上下文/状态描述(必填;上限 20000 字符) | |
| labels | Yes | 候选标签列表(必填;1–100 个非空字符串,单项上限 2000 字符) | |
| server | No | 可选:覆盖服务地址(http://host:port,等价于 --server;上限 2048 字符) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| label | Yes | ||
| model | No | ||
| state | Yes | ||
| usage | No | ||
| choice | Yes | ||
| labels | Yes | ||
| server | No | ||
| question | Yes | ||
| confidence | No |