Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editing Tools #18

Closed
DavidSouther opened this issue Mar 30, 2024 · 1 comment · Fixed by #44
Closed

Editing Tools #18

DavidSouther opened this issue Mar 30, 2024 · 1 comment · Fixed by #44

Comments

@DavidSouther
Copy link
Owner

Explore alternative approaches to editing tool calling. The first goal is that Ailly will be able to apply and undo edits to larger source code files; the second goal is for Ailly to execute those files and iterate on the execution output.

@DavidSouther
Copy link
Owner Author

DavidSouther commented Apr 9, 2024

Add an edit mode. Requires a prompt.

  1. Load context.
  2. Include lines (eg 10 to 21).
  3. Create a final user message with "Provide an edit to {{filename}}. The current contents is {{extracted contents}}. {{prompt}}"
  4. Extract the response.
  5. Replace the given lines with the response.

???s:

  • Get models to only return the new text.
  • Trust the returned edits.

Lines: [start]:[end] 1-based, inclusive start, exclusive end. [start] is "insert after", :[end] is "insert before".

ailly hello.js --edit --lines 10 --prompt "Say hi again"
ailly hello.js --edit --lines $(ailly hello.js --find --prompt "bar") --prompt "foo"
ailly hello.js --edit --section "bar" --prompt "foo"
ailly hello.js --find < bar.txt

@DavidSouther DavidSouther changed the title Editing Tools? Editing Tools Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant