From ebb2d86ce30155f0455b7d9d4b86a56effb687c5 Mon Sep 17 00:00:00 2001 From: Boxuan Li Date: Sat, 28 Dec 2024 10:25:50 -0800 Subject: [PATCH] Headless or endless? Rewrite auto continue response in headless mode (#5879) --- openhands/core/main.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/openhands/core/main.py b/openhands/core/main.py index 3be74235ba..3d36b2522b 100644 --- a/openhands/core/main.py +++ b/openhands/core/main.py @@ -249,9 +249,14 @@ def auto_continue_response( try_parse: Callable[[Action | None], str] | None = None, ) -> str: """Default function to generate user responses. - Returns 'continue' to tell the agent to proceed without asking for more input. + Tell the agent to proceed without asking for more input, or finish the interaction. """ - return 'continue' + message = ( + 'Please continue on whatever approach you think is suitable.\n' + 'If you think you have solved the task, please finish the interaction.\n' + 'IMPORTANT: YOU SHOULD NEVER ASK FOR HUMAN RESPONSE.\n' + ) + return message if __name__ == '__main__':