Skip to content

Commit

Permalink
use primpary llm api for user goal check (#997)
Browse files Browse the repository at this point in the history
  • Loading branch information
wintonzheng authored Oct 18, 2024
1 parent f132a9c commit ae32848
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions skyvern/forge/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -886,11 +886,9 @@ async def check_user_goal_success(
navigation_payload=task.navigation_payload,
elements=scraped_page.build_element_tree(ElementTreeFormat.HTML),
)
verification_llm_api_handler = app.SECONDARY_LLM_API_HANDLER

verification_response = await verification_llm_api_handler(
prompt=verification_prompt, step=step, screenshots=None
)
# this prompt is critical to our agent so let's use the primary LLM API handler
verification_response = await app.LLM_API_HANDLER(prompt=verification_prompt, step=step, screenshots=None)
if "user_goal_achieved" not in verification_response or "thoughts" not in verification_response:
LOG.error(
"Invalid LLM response for user goal success verification, skipping verification",
Expand Down

0 comments on commit ae32848

Please sign in to comment.