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

Pass agent to commands instead of config #4645

Merged

Conversation

erik-megarad
Copy link
Contributor

@erik-megarad erik-megarad commented Jun 10, 2023

Background

When writing commands it's useful to have access to the entire Agent so that you can get AI config and workspace references. Additionally, it furthers our long-term goal of having multiple agents.

Changes

  • Pass agent instead of config to commands
  • Fixup a lot of calls to commands

Documentation

Test Plan

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 autogpt tests --in-place

@vercel
Copy link

vercel bot commented Jun 10, 2023

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

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Jun 10, 2023 10:44pm

@github-actions
Copy link
Contributor

This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.

@erik-megarad erik-megarad force-pushed the fix/agent_through_command branch from 991426f to 6e99e67 Compare June 10, 2023 18:39
@github-actions
Copy link
Contributor

This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.

@erik-megarad erik-megarad force-pushed the fix/agent_through_command branch from 6e99e67 to fd5939d Compare June 10, 2023 18:59
@github-actions
Copy link
Contributor

This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.

@github-actions github-actions bot added the conflicts Automatically applied to PRs with merge conflicts label Jun 10, 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.

@erik-megarad erik-megarad changed the title Add config as attribute to Agent, rename old config to ai_config Pass agent to commands instead of config Jun 10, 2023
@waynehamadi
Copy link
Contributor

@erik-megarad totally aligned, the commands will need the full context of the agent to make the best decision (message_history in particular)

@github-actions
Copy link
Contributor

This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.

@erik-megarad erik-megarad marked this pull request as ready for review June 10, 2023 22:00
@github-actions
Copy link
Contributor

This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.

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

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

1 similar comment
@github-actions
Copy link
Contributor

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

@github-actions
Copy link
Contributor

This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.

@github-actions
Copy link
Contributor

This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.

waynehamadi
waynehamadi previously approved these changes Jun 10, 2023
@github-actions
Copy link
Contributor

This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.

@Auto-GPT-Bot Auto-GPT-Bot force-pushed the fix/agent_through_command branch from 4052468 to 51ef2d1 Compare June 10, 2023 22:40
@github-actions
Copy link
Contributor

This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.

@Auto-GPT-Bot Auto-GPT-Bot force-pushed the fix/agent_through_command branch from 51ef2d1 to 797fbdf Compare June 10, 2023 22:41
@github-actions
Copy link
Contributor

This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.

waynehamadi
waynehamadi previously approved these changes Jun 10, 2023
@codecov
Copy link

codecov bot commented Jun 10, 2023

Codecov Report

Patch coverage: 72.72% and project coverage change: +0.34 🎉

Comparison is base (097ce08) 68.86% compared to head (265f1e6) 69.20%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4645      +/-   ##
==========================================
+ Coverage   68.86%   69.20%   +0.34%     
==========================================
  Files          72       72              
  Lines        3597     3579      -18     
  Branches      578      569       -9     
==========================================
  Hits         2477     2477              
+ Misses        928      920       -8     
+ Partials      192      182      -10     
Impacted Files Coverage Δ
autogpt/llm/chat.py 65.33% <ø> (ø)
autogpt/memory/message_history.py 56.25% <ø> (ø)
autogpt/commands/audio_text.py 30.76% <44.44%> (-0.27%) ⬇️
autogpt/app.py 56.17% <57.14%> (-0.49%) ⬇️
autogpt/commands/web_selenium.py 85.04% <61.53%> (+1.71%) ⬆️
autogpt/commands/analyze_code.py 60.00% <66.66%> (+10.00%) ⬆️
autogpt/commands/improve_code.py 63.63% <66.66%> (+9.79%) ⬆️
autogpt/commands/write_tests.py 63.63% <66.66%> (+9.79%) ⬆️
autogpt/commands/image_gen.py 75.67% <71.42%> (+1.64%) ⬆️
autogpt/commands/execute_code.py 73.52% <75.00%> (ø)
... and 6 more

☔ 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

This PR exceeds the recommended size of 500 lines. Please make sure you are NOT addressing multiple issues with one PR.

@waynehamadi waynehamadi merged commit 0594ba3 into Significant-Gravitas:master Jun 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants