You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
systemMessage:=`You are a general AI agent. You can make decisions based on the user input. You should output a list of decisions based on the input. Available actions within categories you can choose from are below. Only use built-in actions such as analyze (ai analysis) or ask (human analysis) if it makes sense. If you need to ask for input multiple times in a row, ask both questions at the same time. Only ask if the User context doesn't contain the details you need. Assume authentication already exists for all your tools.
6479
+
systemMessage:=`You are a general AI agent which makes decisions based on user input. You should output a list of decisions based on the same input. Available actions within categories you can choose from are below. Only use built-in actions such as analyze (ai analysis) or ask (human analysis) if it is absolutely necessary. If you need to ask for input multiple times in a row, ask both questions at the same time. Only ask if the User context doesn't contain the details you need, AND the question isn't about networking or authentication.
extraString:="Return a MINIMUM of two decisions in a JSON array. "
6418
6546
iflen(typeOptions) ==0 {
6419
6547
extraString=""
6420
6548
}
6421
6549
6422
-
systemMessage+=fmt.Sprintf(`. Available categories (default: singul): %s. If you are unsure about a decision, always ask for user input. The output should be an ordered JSON list in the format [{"i": 0, "category": "singul", "action": "action_name", "tool": "<tool name>", "confidence": 0.95, "runs": "1", "reason": "Short reason why", "fields": [{"key": "max_results", "value": "5"}, {"key": "body", "value": "$action_name"}] WITHOUT newlines. The reason should be concise and understandable to a user, and should not include unnecessary details.
6550
+
systemMessage+=fmt.Sprintf(`Available categories (default: singul): %s. If you are unsure about a decision, always ask for user input. The output should be an ordered JSON list in the format [{"i": 0, "category": "singul", "action": "action_name", "tool": "<tool name>", "confidence": 0.95, "runs": "1", "reason": "Short reason why", "fields": [{"key": "max_results", "value": "5"}, {"key": "body", "value": "$action_name"}] WITHOUT newlines. The reason should be concise and understandable to a user, and should not include unnecessary details.
6423
6551
6424
-
User Context:
6552
+
# User Context:
6425
6553
%s
6426
6554
6427
-
Formatting Rules:
6555
+
# Formatting Rules:
6428
6556
- Do NOT ask to narrow down the scope unless ABSOLUTELY necessary. Assume all the information is already in place.
6429
6557
- If a tool or app is mentioned, add it to the tool field. Otherwise make the field empty.
6430
6558
- Indexes should be the same if they should run in parallell.
6431
6559
- The confidence is between 0 and 1.
6432
6560
- Runs are how many times it should run requests (default: 1, * for all looped items).
6433
6561
- The {{action_name}} has to match EXACTLY the action name of a previous decision.
6434
6562
- NEVER add unnecessary fields to the fields array, only add the ones that are absolutely needed for the action to run!
6435
-
- If you ask for user input, use the "ask" action and add a "question" field.
6436
-
- Do NOT add empty decisions for now reason.
6563
+
- If you ask for user input, use the "ask" action and add a "question" field. Do NOT use this for authentication.
6564
+
- If you use the "API" action, make sure to fill the "tool". Additionally fill in "url", "method" and "body" fields.
6565
+
- Do NOT add empty decisions for no reason.
6437
6566
6438
-
Decision Rules:
6567
+
# Decision Rules:
6568
+
- NEVER ask for usernames, apikeys or other authentication information from the user.
6439
6569
- Do NOT add random fields and do NOT guess formatting e.g. body formatting
6440
6570
- Fields can be set manually, or use previous action output by adding them in the format {{action_name}}, such as {"key": "body": "value": "{{tickets[0].fieldname}}} to get the first 'ticket' fieldname from a previous decision.
6441
6571
@@ -6447,7 +6577,7 @@ Decision Rules:
6447
6577
//Model: "gpt-4o-mini",
6448
6578
//Model: "gpt-4.1-mini",
6449
6579
//Model: "o4-mini", // "gpt-4o-mini" is the same as "4o-mini" in OpenAI API
6450
-
Model: "gpt-5-mini", // "gpt-4o-mini" is the same as "4o-mini" in OpenAI API
6580
+
Model: "gpt-5-nano", // "gpt-4o-mini" is the same as "4o-mini" in OpenAI API
6451
6581
Messages: []openai.ChatCompletionMessage{
6452
6582
{
6453
6583
Role: openai.ChatMessageRoleSystem,
@@ -6461,11 +6591,13 @@ Decision Rules:
6461
6591
//Temperature: 0.95, // Adds a tiny bit of randomness
6462
6592
Temperature: 1,
6463
6593
6594
+
// json_object -> tends to want a single item and not an array
headerParserCode="if isinstance(headers, dict):\n request_headers = headers\n elif len(headers) > 0:\n for header in str(headers).split(\"\\n\"):\n if ':' in header:\n headersplit=header.split(':')\n request_headers[headersplit[0].strip()] = ':'.join(headersplit[1:]).strip()\n elif '=' in header:\n headersplit=header.split('=')\n request_headers[headersplit[0].strip()] = '='.join(headersplit[1:]).strip()"
717
717
718
718
} elseifstrings.Contains(param, "queries=") {
719
-
queryParserCode="\n if len(queries) > 0:\n if queries[0] == \"?\" or queries[0] == \"&\":\n queries = queries[1:len(queries)]\n if queries[len(queries)-1] == \"?\" or queries[len(queries)-1] == \"&\":\n queries = queries[0:-1]\n for query in queries.split(\"&\"):\n if isinstance(query, list) or isinstance(query, dict):\n try:\n query = json.dumps(query)\n except:\n pass\n if '=' in query:\n headersplit=query.split('=')\n params[requests.utils.quote(headersplit[0].strip())] = requests.utils.quote(headersplit[1].strip())\n else:\n params[requests.utils.quote(query.strip())] = None\n params = '&'.join([k if v is None else f\"{k}={v}\" for k, v in params.items()])"
719
+
queryParserCode="\n if len(queries) > 0:\n if isinstance(queries, dict):\n params=queries\n else:\n if queries[0] == \"?\" or queries[0] == \"&\":\n queries = queries[1:len(queries)]\n if queries[len(queries)-1] == \"?\" or queries[len(queries)-1] == \"&\":\n queries = queries[0:-1]\n for query in queries.split(\"&\"):\n if isinstance(query, list) or isinstance(query, dict):\n try:\n query = json.dumps(query)\n except:\n pass\n if '=' in query:\n headersplit=query.split('=')\n params[requests.utils.quote(headersplit[0].strip())] = requests.utils.quote(headersplit[1].strip())\n else:\n params[requests.utils.quote(query.strip())] = None\n params = '&'.join([k if v is None else f\"{k}={v}\" for k, v in params.items()])"
log.Printf("[INFO][%s] Updating %s (%s) in workflow from %s to %s", workflowExecution.ExecutionId, actionResult.Action.Name, actionResult.Action.ID, workflowExecution.Results[outerindex].Status, actionResult.Status)
16932
+
log.Printf("[INFO][%s] Updating '%s' (%s) in workflow from %s to %s", workflowExecution.ExecutionId, actionResult.Action.Name, actionResult.Action.ID, workflowExecution.Results[outerindex].Status, actionResult.Status)
16933
16933
16934
16934
if workflowExecution.Results[outerindex].Status != actionResult.Status {
0 commit comments