prompt_004.log 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. ----------
  2. # Task
  3. You are a software engineer. You've inherited an existing codebase, which you
  4. need to modify to complete this task:
  5. Write a shell script 'hello.sh' that prints 'hello'.
  6. ## Available Actions
  7. * `run` - runs a command on the command line in a Linux shell. Arguments:
  8. * `command` - the command to run
  9. * `background` - if true, run the command in the background, so that other commands can be run concurrently. Useful for e.g. starting a server. You won't be able to see the logs. You don't need to end the command with `&`, just set this to true.
  10. * `write` - writes the content to a file. Arguments:
  11. * `path` - the path of the file to write
  12. * `content` - the content to write to the file
  13. * `read` - reads the content of a file. Arguments:
  14. * `path` - the path of the file to read
  15. * `message` - make a plan, set a goal, record your thoughts, or ask for more input from the user. Arguments:
  16. * `content` - the thought to record
  17. * `wait_for_response` - set to `true` to wait for the user to respond before proceeding
  18. * `finish` - if you're absolutely certain that you've completed your task, use the finish action to stop working. Arguments:
  19. * `outputs` - a dictionary representing the outputs of your task, if any
  20. Do NOT finish until you have completed the tasks.
  21. ## History
  22. Here is a recent history of actions you've taken in service of this plan,
  23. as well as observations you've made. This only includes the MOST RECENT
  24. actions and observations--more may have happened before that.
  25. They are time-ordered, with your most recent action at the bottom.
  26. [[{"source": "agent", "action": "write", "args": {"path": "hello.sh", "content": "#!/bin/bash\n\n# Print 'hello'\necho 'hello'", "start": 0, "end": -1, "thought": ""}}, {"source": "agent", "observation": "write", "content": "", "extras": {"path": "hello.sh"}}], [{"source": "agent", "action": "run", "args": {"command": "chmod +x hello.sh", "background": false, "thought": "", "is_confirmed": "confirmed"}}, {"source": "agent", "observation": "run", "content": "", "extras": {"command_id": -1, "command": "chmod +x hello.sh", "exit_code": 0}}]]
  27. ## Format
  28. Your response MUST be in JSON format. It must be an object, and it must contain two fields:
  29. * `action`, which is one of the actions specified here
  30. * `args`, which is a map of key-value pairs, specifying the arguments for that action
  31. You MUST NOT include any other text besides the JSON response