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

Auto continue #1260

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Auto continue #1260

wants to merge 2 commits into from

Conversation

aj47
Copy link
Contributor

@aj47 aj47 commented May 10, 2024

Describe the changes you have made:

Added a flag auto_continue which sends back prompt "Continue" to LLM automatically after conversation has initiated.
This is very useful for 7B models as they tell you what they are going to do without doing it, so usually a lot of manual 'continue' prompting is required.

Reference any relevant issues (e.g. "Fixes #000"):

Pre-Submission Checklist (optional but appreciated):

  • [ Y ] I have included relevant documentation updates (stored in /docs)
  • [ Y ] I have read docs/CONTRIBUTING.md
  • [ Y ] I have read docs/ROADMAP.md

OS Tests (optional but appreciated):

  • [ Y ] Tested on Windows
  • Tested on MacOS
  • Tested on Linux

@KillianLucas
Copy link
Collaborator

[pasting from discord, for more visibility if anyone has comments]

this is awesome @aj47! I think we do have a version of this flag in the form of --force_task_completion, but i've always hated that abstraction. I like --auto_continue more, but there is some extra functionality in the "force task completion" idea— we let the model break out of the loop by emitting a certain message:

# current
interpreter.force_task_completion = True
interpreter.force_task_completion_message = "If the task is done, say 'The task is done.'" # This will be sent to the LLM after every response
interpreter.force_task_completion_breakers = ["The task is done."] # The LLM can say this to break out of the loop

so you should be able to recreate the --auto_continue behavior in Python with:

# current
interpreter.force_task_completion = True
interpreter.force_task_completion_message = "continue"
interpreter.force_task_completion_breakers = [] # No phrases break it out of the loop

this will run OI in a loop, and always hit it with the "continue" message.

I think we could improve this abstraction, and add TUI flag:

# proposed
interpreter.loop = True
interpreter.loop_message = "continue"
# proposed
interpreter --loop 'continue'

do those seem like they would work? also any thoughts/vibes on this @CyanideByte or @mike.bird? that way we could keep the functionality of force_task_completion, but make it simpler and easily become a form of auto continue

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 this pull request may close these issues.

None yet

2 participants