laya_predict
Execute typed decisions on a text state by evaluating predefined questions, returning choice, score, or noul judgments without text generation.
Instructions
状態に対して typed decision を実行する。
Args:
state: 判定対象の文章。JSON オブジェクト/配列の文字列でも可。
questions_json: 質問定義の JSON オブジェクト文字列。各値は type / instructions
(choice・score は criteria)を持つ。
model: 使うチェックポイント。省略時はロード済み、なければ既定モデル。
dtype: float16 または float32。
Example questions_json:
{
"department": {
"type": "choice",
"instructions": "どの部署が対応すべきか?",
"criteria": ["billing", "technical", "sales"]
},
"urgency": {
"type": "score",
"instructions": "緊急度は?",
"criteria": ["not urgent", "soon", "critical"]
},
"refund": {
"type": "noul",
"instructions": "返金を求めているか?"
}
}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dtype | No | ||
| model | No | ||
| state | Yes | ||
| questions_json | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |