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

Add categories to command registry #5063

Merged
merged 3 commits into from
Jul 29, 2023
Merged

Add categories to command registry #5063

merged 3 commits into from
Jul 29, 2023

Conversation

Pwuts
Copy link
Member

@Pwuts Pwuts commented Jul 26, 2023

Background

In order to build better prompts and make agents with access to different sets of abilities, the CommandRegistry needs extension to accommodate categories of commands.

Changes

  • Add categories attribute to CommandRegistry class
  • Move command loading code from main.py into CommandRegistry
  • Add name and title attributes to command modules

Documentation

No changes needed

Test Plan

CI

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.
  • I have run the following commands against my code to ensure it passes our linters:
    black .
    isort .
    mypy
    autoflake --remove-all-unused-imports --recursive --ignore-init-module-imports --ignore-pass-after-docstring autogpt tests --in-place

@Pwuts Pwuts requested a review from collijk as a code owner July 26, 2023 21:10
@netlify
Copy link

netlify bot commented Jul 26, 2023

Deploy Preview for auto-gpt-docs failed.

Name Link
🔨 Latest commit 0acd543
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/64c576befbd1bd0008b35a9a

@codecov
Copy link

codecov bot commented Jul 26, 2023

Codecov Report

Patch coverage: 76.33% and project coverage change: +0.32% 🎉

Comparison is base (c8d9b69) 51.18% compared to head (0acd543) 51.50%.
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5063      +/-   ##
==========================================
+ Coverage   51.18%   51.50%   +0.32%     
==========================================
  Files         116      116              
  Lines        4937     4982      +45     
  Branches      663      670       +7     
==========================================
+ Hits         2527     2566      +39     
- Misses       2216     2217       +1     
- Partials      194      199       +5     
Files Changed Coverage Δ
autogpt/app/main.py 42.08% <0.00%> (+2.33%) ⬆️
autogpt/commands/__init__.py 100.00% <ø> (ø)
autogpt/core/runner/cli_web_app/server/api.py 0.00% <0.00%> (ø)
autogpt/models/command_registry.py 64.42% <56.00%> (-7.25%) ⬇️
autogpt/config/ai_config.py 73.68% <75.00%> (-2.59%) ⬇️
autogpt/agents/base.py 71.75% <86.36%> (+2.52%) ⬆️
autogpt/agents/agent.py 50.00% <100.00%> (ø)
autogpt/app/setup.py 73.41% <100.00%> (+0.34%) ⬆️
autogpt/commands/execute_code.py 72.47% <100.00%> (+0.51%) ⬆️
autogpt/commands/file_operations.py 82.67% <100.00%> (+0.13%) ⬆️
... and 10 more

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Pwuts Pwuts added this to the v0.4.7 Release milestone Jul 26, 2023
@waynehamadi waynehamadi merged commit c9bf2ee into master Jul 29, 2023
@waynehamadi waynehamadi deleted the command-categories branch July 29, 2023 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants