Compare commits
No commits in common. "79f9e368719880d3e6f534d9d6f20ca0ec4e4c53" and "3aeaea5fe494aafb950ce082e7fd341742751d23" have entirely different histories.
79f9e36871
...
3aeaea5fe4
@ -128,24 +128,12 @@ impl OpenAIProvider {
|
||||
let normalized = self.normalize_tool_arguments(arguments);
|
||||
|
||||
if self.uses_json_tool_arguments() {
|
||||
// Model expects JSON object format
|
||||
normalized
|
||||
} else {
|
||||
// Standard OpenAI format: arguments as JSON string
|
||||
// But ensure we serialize valid JSON, not null
|
||||
match normalized {
|
||||
Value::String(raw) => {
|
||||
// If the string is already valid JSON, keep it as-is
|
||||
// Otherwise, ensure it's a proper JSON string
|
||||
if serde_json::from_str::<Value>(raw).is_ok() {
|
||||
Value::String(raw)
|
||||
} else {
|
||||
// Invalid JSON string - wrap it as a proper JSON string
|
||||
serde_json::to_string(&raw).unwrap_or_else(|_| "null".to_string())
|
||||
}
|
||||
}
|
||||
Value::String(raw) => Value::String(raw),
|
||||
value => Value::String(
|
||||
serde_json::to_string(&value).unwrap_or_else(|_| "{}".to_string()),
|
||||
serde_json::to_string(&value).unwrap_or_else(|_| "null".to_string()),
|
||||
),
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,16 +31,7 @@ impl Tool for SchedulerManageTool {
|
||||
}
|
||||
|
||||
fn description(&self) -> &str {
|
||||
"Manage repository-backed scheduled jobs. Supports actions: list, get, put, delete, pause, resume. Jobs are persisted by the configured scheduler job repository and executed by the scheduler runtime. \
|
||||
\
|
||||
When creating agent_task or silent_agent_task jobs, keep prompt/system_prompt focused on the work to perform; do not restate execution times unless the task logic truly depends on them, because the trigger already controls timing. For cron schedules, standard cron syntax is supported: use 1-5 for Monday-Friday, 0 or 7 for Sunday. \
|
||||
\
|
||||
IMPORTANT - Target Configuration: \
|
||||
For agent_task and silent_agent_task, the target.channel and target.chat_id determine where notifications are sent. \
|
||||
- If target is omitted or fields are empty, they are automatically filled from the current conversation context. \
|
||||
- To send to the current conversation: omit target or set target fields to null/empty. \
|
||||
- To send to a specific target: explicitly provide channel (e.g., 'feishu', 'wechat', 'cli') and chat_id (e.g., 'oc_xxx'). \
|
||||
- Do NOT use placeholder values like 'current' or 'default' - these will be treated as literal values and cause message delivery failures."
|
||||
"Manage repository-backed scheduled jobs. Supports actions: list, get, put, delete, pause, resume. Jobs are persisted by the configured scheduler job repository and executed by the scheduler runtime. When creating agent_task or silent_agent_task jobs, keep prompt/system_prompt focused on the work to perform; do not restate execution times unless the task logic truly depends on them, because the trigger already controls timing. For cron schedules, standard cron syntax is supported: use 1-5 for Monday-Friday, 0 or 7 for Sunday."
|
||||
}
|
||||
|
||||
fn parameters_schema(&self) -> serde_json::Value {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user