mirror of
https://github.com/browser-use/browser-use
synced 2026-05-06 17:52:15 +02:00
Refactor response logging in service.py to improve emoji representation based on evaluation state. Updated checks to be case-insensitive for 'success' and 'failure', enhancing robustness in response handling.
This commit is contained in:
@@ -83,9 +83,9 @@ def log_response(response: AgentOutput, registry=None, logger=None) -> None:
|
||||
if logger is None:
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
if 'Success' in response.current_state.evaluation_previous_goal:
|
||||
if 'success' in response.current_state.evaluation_previous_goal.lower():
|
||||
emoji = '👍'
|
||||
elif 'Failed' in response.current_state.evaluation_previous_goal:
|
||||
elif 'failure' in response.current_state.evaluation_previous_goal.lower():
|
||||
emoji = '⚠️'
|
||||
else:
|
||||
emoji = '❔'
|
||||
|
||||
Reference in New Issue
Block a user