SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]
Further adapt anthropic_openhands config to original
Kilian Lieretc20b91d494cd
diff --git a/config/function_calling_anthropic_openhands.yaml b/config/function_calling_anthropic_openhands.yamlindex f82fed27..3b663b50 100644--- a/config/function_calling_anthropic_openhands.yaml+++ b/config/function_calling_anthropic_openhands.yaml@@ -3,49 +3,10 @@ agent:templates:system_template: |-You are a helpful assistant that can interact with a computer to solve tasks.-- <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.- * Do not try to install any packages with `pip`, `conda`, or any other way. This will usually not work. If the environment is not set up correctly, try to fix the issue without executing python code or running any tests that require the package installed.- </IMPORTANT>-- The special interface consists of a file editor that shows you {{WINDOW}} lines of a file at a time.- In addition to typical bash commands, you can also use specific commands to help you navigate and edit files.- To call a command, you need to invoke it with a function call/tool call.-- <notes>- Please note that THE EDIT COMMAND REQUIRES PROPER INDENTATION.-- For example, if you are looking at this file:-- def fct():- print("Hello world")-- and you want to edit the file to read:-- def fct():- print("Hello")- print("world")-- you search string should be `Hello world` and your replace string should be `"Hello"\n print("world")`- (note the extra spaces before the print statement!).-- You could also get the same result by search for ` print("Hello world")` and replace with ` print("Hello")\n print("world")`.- </notes>- <response_format>- Your shell prompt is formatted as follows:- (Open file: <path>)- (Current directory: <cwd>)- bash-$-- First, you should _always_ include a general thought about what you're going to do next.- Then, for every response, you must include exactly _ONE_ tool call/function call.-- Remember, you should always include a _SINGLE_ tool call/function call and then wait for a response from the shell before continuing with more discussion and commands. Everything you include in the DISCUSSION section will be saved for future reference.- If you'd like to issue two commands at once, PLEASE DO NOT DO THAT! Please instead first submit just the first tool call, and then after receiving a response you'll be able to issue the second .- Note that the environment does NOT support interactive session commands (e.g. python, vim), so please do not invoke them.- </response_format>instance_template: |-+ <uploaded_files>+ {{working_dir}}+ </uploaded_files>I've uploaded a python code repository in the directory {{working_dir}}. Consider the following PR description:<pr_description>@@ -62,17 +23,11 @@ agent:4. Rerun your reproduce script and confirm that the error is fixed!5. Think about edgecases and make sure your fix handles them as wellYour thinking should be thorough and so it's fine if it's very long.-- (Current directory: {{working_dir}})- bash-$next_step_template: |-+ OBSERVATION:{{observation}}- (Current directory: {{working_dir}})- bash-$next_step_no_output_template: |-Your command ran successfully and did not produce any output.- (Current directory: {{working_dir}})- bash-$demonstrations:- trajectories/demonstrations/str_replace_anthropic_demo.yamlput_demos_in_history: true@@ -83,6 +38,4 @@ agent:enable_bash_tool: trueparse_function:type: function_calling- history_processors:- - type: last_n_observations- n: 5+ history_processors: []