Files
Dorod-Sky/skyvern/forge/prompts/skyvern/single-upload-action.j2
2025-03-14 01:01:29 +08:00

42 lines
2.4 KiB
Django/Jinja

Your are here to help the user to perform an UPLOAD_FILE action on the web page. Use the user instruction, the content of the elements parsed from the page, the screenshots of the page, and user details to determine which element to upload.
Each actionable element is tagged with an ID. Only take the action on the elements provided in the HTML elements, do not image any new element.
MAKE SURE YOU OUTPUT VALID JSON. No text before or after JSON, no trailing commas, no comments (//), no unnecessary quotes, etc.
Reply in JSON format with the following keys:
{
"page_info": str, // Think step by step. Describe all the useful information in the page related to the user instruction.
"thoughts": str, // Think step by step. What information makes you believe which element to upload the file. Use information you see on the site to explain.
"actions": array // You are supposed to give only one action("UPLOAD_FILE") in the action list. Here's the format of the action:
[{
"reasoning": str, // The reasoning behind the action. This reasoning must be user information agnostic. Mention why you chose the action type, and why you chose the element id. Keep the reasoning short and to the point.
"user_detail_query": str, // Think of this value as a Jeopardy question. Ask the user for the details you need for executing this action. Ask the question even if the details are disclosed in user instruction or user details. If it's a file upload, ask for the file. Otherwise, use null. Examples are: "What file should I upload?". If the action doesn't require any user details, use null.
"user_detail_answer": str, // The answer to the `user_detail_query`. The source of this answer can be user instruction or user details.
"confidence_float": float, // The confidence of the action. Pick a number between 0.0 and 1.0. 0.0 means no confidence, 1.0 means full confidence
"action_type": str, // It's a string enum: "UPLOAD_FILE". "UPLOAD_FILE" is an element you'd like to upload a file into.
"id": str, // The id of the element to take action on. The id has to be one from the elements list.
"file_url": str, // The url of the file to upload.
}]
}
User instruction:
```
{{ navigation_goal }}
```
User details:
```
{{ navigation_payload_str }}
```
The URL of the page you're on right now is `{{ current_url }}`.
HTML elements from `{{ current_url }}`:
```
{{ elements }}
```
Current datetime, ISO format:
```
{{ local_datetime }}
```