prompt_003.log 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. ----------
  2. # Task
  3. You are a proofreader tasked with fixing typos in the files in your current working directory.
  4. Specifically, your task is:
  5. Fix typos in bad.txt
  6. To achieve this goal, you should:
  7. 1. Scan the files for typos
  8. 2. Overwrite the files with the typos fixed
  9. 3. Provide a summary of the typos fixed
  10. ## Available Actions
  11. * `read` - reads the content of a file. Arguments:
  12. * `path` - the path of the file to read
  13. * `write` - writes the content to a file. Arguments:
  14. * `path` - the path of the file to write
  15. * `content` - the content to write to the file
  16. * `run` - runs a command on the command line in a Linux shell. Arguments:
  17. * `command` - the command to run
  18. * `message` - make a plan, set a goal, record your thoughts, or ask for more input from the user. Arguments:
  19. * `content` - the thought to record
  20. * `wait_for_response` - set to `true` to wait for the user to respond before proceeding
  21. * `finish` - if you're absolutely certain that you've completed your task, use the finish action to stop working. Arguments:
  22. * `outputs` - a dictionary representing the outputs of your task, if any
  23. To complete this task:
  24. 1. Use the `read` action to read the contents of the files in your current working directory. Make sure to provide the file path in the format `'./file_name.ext'`.
  25. 2. Use the `message` action to analyze the contents and identify typos.
  26. 3. Use the `write` action to create new versions of the files with the typos fixed.
  27. - Overwrite the original files with the corrected content. Make sure to provide the file path in the format `'./file_name.ext'`.
  28. 4. Use the `message` action to generate a summary of the typos fixed, including the original and fixed versions of each typo, and the file(s) they were found in.
  29. 5. Use the `finish` action to return the summary in the `outputs.summary` field.
  30. Do NOT finish until you have fixed all the typos and generated a summary.
  31. ## History
  32. Here is a recent history of actions you've taken in service of this plan,
  33. as well as observations you've made. This only includes the MOST RECENT
  34. actions and observations--more may have happened before that.
  35. They are time-ordered, with your most recent action at the bottom.
  36. [{"source": "agent", "action": "read", "args": {"path": "./bad.txt", "start": 0, "end": -1, "thought": ""}}, {"source": "agent", "observation": "read", "content": "This is a stupid typoo.\nReally?\nNo mor typos!\nEnjoy!\n", "extras": {"path": "./bad.txt"}}]
  37. ## Format
  38. Your response MUST be in JSON format. It must be an object, and it must contain two fields:
  39. * `action`, which is one of the actions specified here
  40. * `args`, which is a map of key-value pairs, specifying the arguments for that action
  41. You MUST NOT include any other text besides the JSON response
  42. For example, if you want to use the read action to read the contents of a file named example.txt, your response should look like this:
  43. {
  44. "action": "read",
  45. "args": {
  46. "path": "./example.txt"
  47. }
  48. }
  49. Similarly, if you want to use the write action to write content to a file named output.txt, your response should look like this:
  50. {
  51. "action": "write",
  52. "args": {
  53. "path": "./output.txt",
  54. "content": "This is the content to be written to the file."
  55. }
  56. }