Files
Dorod-Sky/skyvern/forge/prompts/skyvern/check-phone-number-format.j2
2025-04-23 01:56:43 +08:00

50 lines
1.9 KiB
Django/Jinja

You need to help checking two goals:
1. Based on the context/intention, check whether the current value is used to input as a phone number
2. If the current value is a phone number, check whether the format of the phone number matches the required format based on the user's goals, user details, and HTML elements.
There are several checkpoints to verify the format of the phone number:
- Whether the phone number should add hyphen.
- Whether the phone number should add country code.
- Whether the phone number should add space between the country code and the area code.
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 goal.
"is_phone_number_input": bool, // Think step by step. True if the current value is used to input as a phone number.
"thought": str, // Think step by step. Describe your thought about how you come up with the phone_number_format. Use information you see on the site to explain.
"phone_number_format": str, // Think step by step. The format of the phone number required on the page according to HTML elements. Null if is_phone_number_input is False.
"is_current_format_correct": bool, // True if the current phone number format is matching the required format. Null if is_phone_number_input is False.
"recommended_phone_number": str, // If is_current_format_correct is True or is_phone_number_input is False, return null. Otherwise, return the recommended phone number with the correct format.
}
Context/Intention
```
{{ context }}
```
Current value:
```
{{ current_value }}
```
User goal:
```
{{ navigation_goal }}
```
User details:
```
{{ navigation_payload_str }}
```
HTML elements:
```
{{ elements }}
```
Current datetime, ISO format:
```
{{ local_datetime }}
```