Skip to content

Commit

Permalink
improve need_verification_code prompt (#788)
Browse files Browse the repository at this point in the history
  • Loading branch information
wintonzheng authored Oct 23, 2024
1 parent d81fcaa commit 96c807e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion skyvern/forge/prompts/skyvern/extract-action.j2
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ Reply in JSON format with the following keys:
}]
{% endif %}
}],{% if verification_code_check %}
"need_verification_code": bool, // Whether a verification code is needed to proceed.{% endif %}
"verification_code_reasoning": str, // Let's think step by step. Describe what you see and think if a verification code is needed for login or any verification step. Explain why you believe a verification code is needed or not. Has the code been sent and is code available somewhere (email, phone or 2FA device)?
"need_verification_code": bool, // Whether a verification code is needed to proceed. True only if the code is available to user. If the code is not sent, return false {% endif %}
}
{% if action_history %}
Consider the action history from the last step and the screenshot together, if actions from the last step don't yield positive impact, try other actions or other action combinations.
Expand Down
1 change: 1 addition & 0 deletions skyvern/webeye/actions/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -2316,6 +2316,7 @@ async def poll_verification_code(
while True:
# check timeout
if datetime.utcnow() > timeout_datetime:
LOG.warning("Polling verification code timed out", workflow_id=workflow_id)
return None
verification_code = None
if totp_verification_url:
Expand Down

0 comments on commit 96c807e

Please sign in to comment.