AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

D/alt command class

Open DarylRodrigo opened this issue 1 year ago • 3 comments

Background

Suggestion on alternative structure for command registration. By wrapping commands in a command handler you can inject any dependency that command might have in the handler (which should be initiated on the app level), and execute them. For example if there is dockerClass which handlers all docker image interaction, this could be instantiated in the app and then injected into one or more command Handlers where commands would then have access to it.

Example usage at the bottom - if this is something that people are interested in exploring I can make a fully functional PR with tests.

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

DarylRodrigo avatar May 06 '23 15:05 DarylRodrigo

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) May 6, 2023 3:18pm

vercel[bot] avatar May 06 '23 15:05 vercel[bot]

should probably coordinate with #3914

Boostrix avatar May 07 '23 10:05 Boostrix

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

github-actions[bot] avatar May 07 '23 22:05 github-actions[bot]