fix some prompts missing current date (#2122)

This commit is contained in:
Shuchang Zheng
2025-04-10 22:29:47 -07:00
committed by GitHub
parent bdee1add43
commit a0bd4242f7
8 changed files with 39 additions and 2 deletions

View File

@@ -1204,6 +1204,7 @@ class ForgeAgent:
navigation_goal=task.navigation_goal,
navigation_payload=task.navigation_payload,
complete_criterion=task.complete_criterion,
local_datetime=datetime.now(skyvern_context.ensure_context().tz_info).isoformat(),
)
# this prompt is critical to our agent so let's use the primary LLM API handler
@@ -2155,6 +2156,7 @@ class ForgeAgent:
navigation_goal=task.navigation_goal,
navigation_payload=task.navigation_payload,
steps=steps_results,
local_datetime=datetime.now(skyvern_context.ensure_context().tz_info).isoformat(),
)
json_response = await app.LLM_API_HANDLER(
prompt=prompt, screenshots=screenshots, step=step, prompt_name="summarize-max-steps-reason"

View File

@@ -49,4 +49,9 @@ User details:
HTML elements:
```
{{ elements }}
```
Current datetime, ISO format:
```
{{ local_datetime }}
```

View File

@@ -36,4 +36,9 @@ User goal:
User details:
```
{{ navigation_payload_str }}
```
Current datetime, ISO format:
```
{{ local_datetime }}
```

View File

@@ -45,4 +45,9 @@ User details:
Popped up elements:
```
{{ popped_up_elements }}
```
Current datetime, ISO format:
```
{{ local_datetime }}
```

View File

@@ -27,4 +27,9 @@ Complete Criterion:
Elements on the page:
```
{{ elements }}
```
```
Current datetime, ISO format:
```
{{ local_datetime }}
```

View File

@@ -36,4 +36,9 @@ User details:
Option list:
```
{{ options }}
```
Current datetime, ISO format:
```
{{ local_datetime }}
```

View File

@@ -15,4 +15,9 @@ User Details:
Actions Taken In Each Step:
{% for step in steps %}Step {{ step.order }} -- {{ step.actions_result }}
{% endfor %}
{% endfor %}
Current datetime, ISO format:
```
{{ local_datetime }}
```