25 lines
1.2 KiB
Python
25 lines
1.2 KiB
Python
"""需求节点的意图判断定义"""
|
|
|
|
from app.schemas.decision import ChoiceDecision
|
|
|
|
|
|
def build_intent_question() -> ChoiceDecision:
|
|
return ChoiceDecision(
|
|
# 判断主要意图;只有明确要求实际编辑时才判断为修改,不能仅根据选中节点判断
|
|
instructions=(
|
|
"Classify the user's primary intent. "
|
|
"Choose modify_screen only when the user explicitly requests an actual edit. "
|
|
"Do not infer editing solely from selected nodes."
|
|
),
|
|
criteria={
|
|
# 创建新的大屏
|
|
"create_screen": "Create a new screen",
|
|
# 明确要求修改、增加、删除或重新设计已有大屏
|
|
"modify_screen": "Explicitly request modifying, adding, deleting, or redesigning an existing screen",
|
|
# 询问知识、原因、建议或如何修改,但没有要求实际执行
|
|
"qa": "Ask for information, reasons, suggestions, or how to improve something without requesting an actual edit",
|
|
# 无法判断意图或不属于上述类型
|
|
"unclear": "Intent is unclear or outside the above categories",
|
|
},
|
|
)
|