use primpary llm api for user goal check (#997)
This commit is contained in:
@@ -886,11 +886,9 @@ class ForgeAgent:
|
|||||||
navigation_payload=task.navigation_payload,
|
navigation_payload=task.navigation_payload,
|
||||||
elements=scraped_page.build_element_tree(ElementTreeFormat.HTML),
|
elements=scraped_page.build_element_tree(ElementTreeFormat.HTML),
|
||||||
)
|
)
|
||||||
verification_llm_api_handler = app.SECONDARY_LLM_API_HANDLER
|
|
||||||
|
|
||||||
verification_response = await verification_llm_api_handler(
|
# this prompt is critical to our agent so let's use the primary LLM API handler
|
||||||
prompt=verification_prompt, step=step, screenshots=None
|
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:
|
if "user_goal_achieved" not in verification_response or "thoughts" not in verification_response:
|
||||||
LOG.error(
|
LOG.error(
|
||||||
"Invalid LLM response for user goal success verification, skipping verification",
|
"Invalid LLM response for user goal success verification, skipping verification",
|
||||||
|
|||||||
Reference in New Issue
Block a user