choicemodel_tierWhich model tier should handle this request?
smallbalancedfrontier
使用 typed choice 作为策略层,为不同请求选择下游模型。
Prove whether the following Rust unsafe block can cause undefined behavior and explain the exact aliasing rule involved.
choicemodel_tierWhich model tier should handle this request?
noulneeds_reasoningDoes this request require deep technical reasoning?
from laya import Router
router = Router(preload=True)
state = {"request": "Prove whether this Rust unsafe block can cause undefined behavior."}
questions = {
"model_tier": {
"type": "choice",
"instructions": "Which model tier should handle this request?",
"criteria": {"small": "simple extraction", "balanced": "normal reasoning", "frontier": "deep technical reasoning"}
},
"needs_reasoning": {"type": "noul", "instructions": "Does this request require deep technical reasoning?"}
}
print(router.predict(state, questions))import { Laya } from "@receptron/laya";
const laya = await Laya.load();
const result = await laya.systemOne(
{ request: "Prove whether this Rust unsafe block can cause undefined behavior." },
{
model_tier: { type: "choice", instructions: "Which model tier?", criteria: { small: "simple", balanced: "normal reasoning", frontier: "deep technical reasoning" } },
needs_reasoning: { type: "noul", instructions: "Does this require deep technical reasoning?" },
},
);
console.log(result.answers);
await laya.close();