fix check user goal (#993)

This commit is contained in:
LawyZheng
2024-10-18 02:18:43 +08:00
committed by GitHub
parent de999c6e97
commit c0113a94f8

View File

@@ -891,7 +891,7 @@ class ForgeAgent:
verification_response = await verification_llm_api_handler(
prompt=verification_prompt, step=step, screenshots=None
)
if "user_goal_achieved" not in verification_response or "reasoning" not in verification_response:
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",
verification_response=verification_response,
@@ -900,7 +900,7 @@ class ForgeAgent:
user_goal_achieved: bool = verification_response["user_goal_achieved"]
complete_action = CompleteAction(
reasoning=verification_response["reasoning"],
reasoning=verification_response["thoughts"],
data_extraction_goal=task.data_extraction_goal,
)
# We don't want to return a complete action if the user goal is not achieved since we're checking at every step