choicemoderation_actionHow should this message be handled?
allowreviewblock
直接返回 typed decision,而不是再解析自由文本审核结果。
You are useless. I hope someone breaks your laptop tonight.
choicemoderation_actionHow should this message be handled?
noulthreatDoes this message contain a threat of harm or damage?
from laya import Router
router = Router(preload=True)
state = {"message": "You are useless. I hope someone breaks your laptop tonight."}
questions = {
"moderation_action": {"type": "choice", "instructions": "How should this message be handled?", "criteria": {"allow": "benign", "review": "borderline", "block": "clear abuse or threat"}},
"threat": {"type": "noul", "instructions": "Does this contain a threat?"}
}
print(router.predict(state, questions))import { Laya } from "@receptron/laya";
const laya = await Laya.load();
const result = await laya.systemOne(
{ message: "You are useless. I hope someone breaks your laptop tonight." },
{
moderation_action: { type: "choice", instructions: "How should this be handled?", criteria: { allow: "benign", review: "borderline", block: "clear abuse or threat" } },
threat: { type: "noul", instructions: "Does this contain a threat?" },
},
);
console.log(result.answers);
await laya.close();