gptme icon indicating copy to clipboard operation
gptme copied to clipboard

feat: added attempt_complete tool, giving agent ability to signal completion

Open ErikBjare opened this issue 9 months ago • 1 comments

Played with this a couple of days ago, idea was to mimic a similar tool I saw in one of the SWE-Bench submissions.

Could be a more reliable stopping-condition (and a good place to run appropriate checks) than waiting for a non-tooluse message.

Not sure if this should be merged here or in gptme-contrib, but since it required some changes to the Python tool it'll go here for now.


[!IMPORTANT] Add attempt_complete tool to signal task completion, integrated into Python execution flow in python.py.

  • New Tool:
    • Added attempt_complete.py with Completed class to signal task completion.
    • attempt_complete() function attempts task completion and returns Completed.
    • check_completion() placeholder for task completion checks.
  • Integration:
    • In python.py, import Completed from attempt_complete.py.
    • Update execute_python() to handle Completed by exiting process.
  • Misc:
    • attempt_complete tool is disabled by default in ToolSpec.

This description was created by Ellipsis for 70e5b91ce6f27cab9f94d074b84a1eba485fcff0. It will automatically update as commits are pushed.

ErikBjare avatar Jan 16 '25 18:01 ErikBjare