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

Prep for #2291 Allow feedback and interrupting during continuous run #2481

Closed
wants to merge 30 commits into from

Conversation

ehei
Copy link

@ehei ehei commented Apr 19, 2023

Background

While running with the 'y -XXX' prompt, I found myself wanting to know how many steps had been performed, and how many were left out of how many I had authorized. Additionally, I wanted a way to interrupt the process without resorting to crashing the system or killing a process outright.

Changes

Changes are extracting some methods for the functionality I eventually want to change and create unit tests for same.

Documentation

Test Plan

Created unit tests for the changes to ensure current functionality and lay the foundation for future changes.

PR Quality Checklist

  • My pull request is atomic and focuses on a single change.
  • I have thoroughly tested my changes with multiple different prompts.
  • I have considered potential risks and mitigations for my changes.
  • I have documented my changes clearly and comprehensively.
  • I have not snuck in any "extra" small tweaks changes.

Ran the app and tested the following inputs:

  • 'n' - exited appropriately
  • 'y -X' - showed error message and re-prompted
  • 'y -2' - continued twice
  • '(some relevant feedback)' - parsed feedback
  • 'y asdfasdfads' - gave error message and looped back correctly

@github-actions github-actions bot added the conflicts Automatically applied to PRs with merge conflicts label Apr 19, 2023
@github-actions
Copy link
Contributor

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

@Pwuts
Copy link
Member

Pwuts commented Apr 22, 2023

Sidenote, point of feedback: for us it would have been much more convenient (project management-wise) if you had updated #2291 instead of opening a new PR for the same thing. Nevermind, misunderstood the purpose of the PR

@Pwuts
Copy link
Member

Pwuts commented Apr 22, 2023

Can you please resolve the conflicts so we can review? :)

@Pwuts Pwuts changed the title Allow feedback and interrupting during continuous run Prep for #2291 Allow feedback and interrupting during continuous run Apr 22, 2023
@Pwuts Pwuts self-assigned this Apr 22, 2023
@ehei
Copy link
Author

ehei commented Apr 22, 2023 via email

@github-actions github-actions bot removed the conflicts Automatically applied to PRs with merge conflicts label Apr 22, 2023
@github-actions
Copy link
Contributor

Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.

@github-actions
Copy link
Contributor

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

@github-actions github-actions bot added the conflicts Automatically applied to PRs with merge conflicts label Apr 23, 2023
@github-actions
Copy link
Contributor

Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.

@github-actions github-actions bot removed the conflicts Automatically applied to PRs with merge conflicts label Apr 24, 2023
@codecov
Copy link

codecov bot commented Apr 24, 2023

Codecov Report

Patch coverage: 66.66% and project coverage change: +0.87 🎉

Comparison is base (4a20616) 41.66% compared to head (3f1e498) 42.53%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2481      +/-   ##
==========================================
+ Coverage   41.66%   42.53%   +0.87%     
==========================================
  Files          65       65              
  Lines        3029     3042      +13     
  Branches      507      509       +2     
==========================================
+ Hits         1262     1294      +32     
+ Misses       1702     1682      -20     
- Partials       65       66       +1     
Impacted Files Coverage Δ
autogpt/agent/agent.py 36.80% <65.62%> (+23.52%) ⬆️
autogpt/api_manager.py 88.88% <100.00%> (+0.20%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@github-actions
Copy link
Contributor

github-actions bot commented May 8, 2023

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

@github-actions
Copy link
Contributor

github-actions bot commented May 8, 2023

This PR exceeds the recommended size of 200 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size

@github-actions github-actions bot removed the conflicts Automatically applied to PRs with merge conflicts label May 8, 2023
@github-actions
Copy link
Contributor

github-actions bot commented May 8, 2023

Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.

@github-actions
Copy link
Contributor

github-actions bot commented May 8, 2023

This PR exceeds the recommended size of 200 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size

@vercel vercel bot temporarily deployed to Preview May 8, 2023 16:04 Inactive
@Pwuts Pwuts dismissed their stale review May 8, 2023 18:39

resolved

command_registry: CommandRegistry,
config: AIConfig,
system_prompt: str,
initial_prompt: str,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is still triggering_prompt I am afraid, it is the message we send at the end of a "conversation" in order to trigger a response. Please explain the change.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was my change; I found triggering_prompt to be a bit ambiguous and thought renaming it could help, although I see my choice of name could have been better.

if self.autonomous_cycles_remaining > 0:
self.autonomous_cycles_remaining -= 1

# Check if there's a result from the command append it to the message
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is something really wrong here, that code should be outside of the else scope, why was it tabbed?

@k-boikov
Copy link
Contributor

k-boikov commented May 9, 2023

Overall not a big fan of the determine_next_command addition, we do elseif there and then we do elseif again outside to check the determine_next_command's result.

@ehei
Copy link
Author

ehei commented May 11, 2023 via email

@Boostrix
Copy link
Contributor

To be fair, some of this was suggested by other folks, too - and some of it may even be covered by similar PRs. So maybe this needs a little more planning/coordination. Personally, I can definitely see the need for this!

Even moreso because the current design has zero support for persistence, let alone for recovering a workspace properly.
Thus, being able to pause an agent to "direct" it would seem like a good compromise.

Usually, there's a ton of work (API tokens + time) going to the wastebin once we realize that the agent went off an irrelevant trajectory.

So given the state of affairs, the feature itself could be useful regardless of stylistic disagreements at the code level

@ehei
Copy link
Author

ehei commented May 11, 2023 via email

@github-actions
Copy link
Contributor

This PR exceeds the recommended size of 200 lines. Please make sure you are NOT addressing multiple issues with one PR. Note this PR might be rejected due to its size

@github-actions github-actions bot added the conflicts Automatically applied to PRs with merge conflicts label May 13, 2023
@github-actions
Copy link
Contributor

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

@ehei
Copy link
Author

ehei commented May 13, 2023

Happy to jump on Discord and figure out how best to accomplish this. Just let me know (ericheikkila#1667)

@p-i- p-i- modified the milestones: v0.3.1 Release, v0.3.2-release May 14, 2023
@Boostrix Boostrix mentioned this pull request May 15, 2023
1 task
@Boostrix
Copy link
Contributor

Hi, just a short update - thanks for taking the time to update your PR, your PR was today discussed on Discord by several devs and it's being assigned to be reviewed right now!

So, given that there seem to be at least 5+ different PRs in the pipeline currently using similar but still a different method, it is likely that we're going to take parts from each and every one of these PRs, to ensure that the feature is well-aligned with the ongoing re-arch effort.

This means, you will end up in the credits automagically - but won't have to do any more work from now on.

If there are remaining questions, someone is going to contact you, the PR is being reviewed by @gravelBridge

@ehei
Copy link
Author

ehei commented May 15, 2023 via email

@gravelBridge
Copy link
Contributor

Hello! Thank you so much for your contribution and feature suggestion! I have finished implementing our version of this feature here: #4230. Once again, thank you!

@ehei
Copy link
Author

ehei commented May 23, 2023

AWESOME!! Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conflicts Automatically applied to PRs with merge conflicts enhancement New feature or request size/xl testing
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

8 participants