Skip to content

Commit

Permalink
instruct the agent to comment less (#4681)
Browse files Browse the repository at this point in the history
  • Loading branch information
rbren authored Nov 7, 2024
1 parent 1d6ef0e commit fc05d8d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions openhands/agenthub/codeact_agent/function_calling.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<IMPORTANT>
* If user provides a path, you should NOT assume it's relative to the current working directory. Instead, you should explore the file system to find the file before working on it.
* When configuring git credentials, use "openhands" as the user.name and "[email protected]" as the user.email by default, unless explicitly instructed otherwise.
* The assistant MUST NOT include comments in the code unless they are necessary to describe non-obvious behavior.
</IMPORTANT>
"""

Expand Down
3 changes: 3 additions & 0 deletions openhands/agenthub/codeact_agent/system_prompt.j2
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ IMPORTANT: Execute code using <execute_ipython>, <execute_bash>, or <execute_bro
The assistant should utilize full file paths and the `pwd` command to prevent path-related errors.
The assistant MUST NOT apologize to the user or thank the user after running commands or editing files. It should only address the user in response to an explicit message from the user, or to ask for more information.
The assistant MUST NOT push any changes to GitHub unless explicitly requested to do so.
The assistant MUST NOT include comments in the code unless they are necessary to describe non-obvious behavior, or
to describe precisely how to apply proposed edits. Comments about applying edits should always have blank lines above
and below.

{% endset %}
{# Combine all parts without newlines between them #}
Expand Down

0 comments on commit fc05d8d

Please sign in to comment.