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

OPEN-165: Improvement - check for duplicate command #6937

Conversation

kcze
Copy link
Contributor

@kcze kcze commented Feb 28, 2024

Changes πŸ—οΈ

Raise in parse_and_process_response inside agent.py if agent tries to execute the same command twice in a row.

PR Quality Scorecard ✨

  • Have you used the PR description template?   +2 pts
  • Is your pull request atomic, focusing on a single change?   +5 pts
  • Have you linked the GitHub issue(s) that this PR addresses?   +5 pts
  • Have you documented your changes clearly and comprehensively?   +5 pts
  • Have you changed or added a feature?   -4 pts
    • Have you added/updated corresponding documentation?   +4 pts
    • Have you added/updated corresponding integration tests?   +5 pts
  • Have you changed the behavior of AutoGPT?   -5 pts
    • Have you also run agbenchmark to verify that these changes do not regress performance?   +10 pts

kcze added 2 commits February 28, 2024 15:47
Raise in `parse_and_process_response` if the same operation already happened
@kcze kcze requested a review from a team as a code owner February 28, 2024 14:56
Copy link

netlify bot commented Feb 28, 2024

βœ… Deploy Preview for auto-gpt-docs ready!

Name Link
πŸ”¨ Latest commit 11d8325
πŸ” Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/65e07cd1cf423300081477fa
😎 Deploy Preview https://deploy-preview-6937--auto-gpt-docs.netlify.app
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Member

@Pwuts Pwuts left a comment

Choose a reason for hiding this comment

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

This is clean, but too restrictive, as it disallows ever executing the same command twice within the same session. The only repetition that makes sense to directly disallow is executing the same command twice in succession.

Sensibly disallowing later re-execution would require more complex logic to determine whether the effect of a command has been compounded/altered since it was executed.

@kcze
Copy link
Contributor Author

kcze commented Feb 29, 2024

I modified it, so it only checks the last command executed.

Sensibly disallowing later re-execution would require more complex logic to determine whether the effect of a command has been compounded/altered since it was executed.

I'll do this in another PR, when I remove logs from AgentFileManager and use event_history instead.

@kcze kcze requested a review from Pwuts February 29, 2024 12:17
Copy link
Member

@Pwuts Pwuts left a comment

Choose a reason for hiding this comment

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

LGTM!

@Pwuts Pwuts merged commit 2c96f61 into Significant-Gravitas:master Feb 29, 2024
10 of 13 checks passed
@kcze kcze deleted the kpczerwinski/open-165-duplicateoperationerror-the-file-x-is-already-open branch February 29, 2024 19:37
@Significant-Gravitas Significant-Gravitas deleted a comment from sentry-io bot Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: βœ… Done
Development

Successfully merging this pull request may close these issues.

2 participants