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

fix(agent): Handle action_history-related exceptions gracefully #6990

Conversation

kcze
Copy link
Contributor

@kcze kcze commented Mar 7, 2024

This fixes OPEN-121 and OPEN-149:

  • CLI: prevent resumed agent to register action on already existing one
  • Server: prevent trying to json() command without result

Extra: accept pressing enter when asking user Resume [Y/n] (previously was expecting explicit y or n)

- CLI: prevent resumed agent to register action on already existing one
- Server: prevent trying to json() command without result
Copy link

netlify bot commented Mar 7, 2024

Deploy Preview for auto-gpt-docs ready!

Name Link
🔨 Latest commit fec862d
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/65f04c5d660ab600087b4e3e
😎 Deploy Preview https://deploy-preview-6990--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.

@kcze kcze changed the title OPEN-121: Fix action_history-related exceptions fix(agent): Handle action_history-related exceptions gracefully Mar 9, 2024
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 Mar 11, 2024
@github-actions github-actions bot removed the conflicts Automatically applied to PRs with merge conflicts label Mar 12, 2024
Copy link
Contributor

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

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 changed the title fix(agent): Handle action_history-related exceptions gracefully fix(agent): Handle action_history-related exceptions gracefully Mar 12, 2024
@Pwuts Pwuts merged commit fd2c261 into Significant-Gravitas:master Mar 12, 2024
11 of 14 checks passed
@kcze kcze deleted the kpczerwinski/open-121-valueerror-action-for-current-cycle-already-set branch March 12, 2024 22:18
Pwuts added a commit that referenced this pull request Mar 13, 2024
…nism

- Add `AgentFinished` exception (subclass of `AgentTerminated`)
- Raise `AgentFinished` instead of `AgentTerminated` in `finish` method
- Remove resumption patch from PR #6990 in `BaseAgent`
- Clean up implementation of `finish` in `AgentProtocolServer`
- Add resumption mechanism in `run_auto_gpt` (main.py)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants