schedule_task:改op分派get/create/update/delete,生命周期对AI开放;update对齐PATCH(仅改cron才重算next);撞车/扑空报错回显op并指路update/create,废"会话页删除"死路;prompt上限20000入create/update;delete不落scheduler_note;schema仅required op,条件必填代码校验
This commit is contained in:
@@ -103,18 +103,23 @@
|
||||
"type": "function",
|
||||
"function": {
|
||||
"name": "schedule_task",
|
||||
"description": "Create a recurring scheduled task for the CURRENT session. At each trigger, the given prompt is sent to this session as a new user message. Only one task per session is allowed; if one already exists the call fails and the user must delete it first in the session view. Schedule times are interpreted in Asia/Shanghai (UTC+8). Call this ONLY when the user explicitly asks for something to run periodically or at a specific time.",
|
||||
"description": "Manage the recurring scheduled task bound to the CURRENT session. At most one task per session; it is deleted together with the session. At each trigger, the prompt is sent to this session as a new user message. Schedule times are interpreted in Asia/Shanghai (UTC+8). Call this ONLY when the user explicitly asks for something to run periodically or at a specific time.\n\nop=get No arguments.\nop=create Requires cron_expr and prompt.\nop=update Requires at least one of cron_expr, prompt; only the given fields change.\nop=delete No arguments.",
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"required": ["cron_expr", "prompt"],
|
||||
"required": ["op"],
|
||||
"properties": {
|
||||
"op": {
|
||||
"type": "string",
|
||||
"enum": ["get", "create", "update", "delete"],
|
||||
"description": "Operation to perform on the current session's scheduled task."
|
||||
},
|
||||
"cron_expr": {
|
||||
"type": "string",
|
||||
"description": "Standard 5-field cron expression in Asia/Shanghai (UTC+8), e.g. '0 9 * * *' for 09:00 Beijing time every day. The interval between two consecutive runs must be at least 1 hour."
|
||||
"description": "Standard 5-field cron expression in Asia/Shanghai (UTC+8), e.g. '0 9 * * *' for 09:00 Beijing time every day. The interval between two consecutive runs must be at least 1 hour. Required with op=create; optional with op=update (next run time is recomputed)."
|
||||
},
|
||||
"prompt": {
|
||||
"type": "string",
|
||||
"description": "The message to send to this session at each trigger. Write it as a self-contained instruction: previous conversation history is archived before each run, so this prompt is the only input the model will see. The output stays in this session for the user to view; if it must reach the user proactively, state how in the prompt (e.g. via a skill or webhook)."
|
||||
"description": "The message to send to this session at each trigger. Write it as a self-contained instruction: previous conversation history is archived before each run, so this prompt is the only input the model will see. The output stays in this session for the user to view; if it must reach the user proactively, state how in the prompt (e.g. via a skill or webhook). Required with op=create; optional with op=update."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user