AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

🎉 Python scripts can now be executed with arguments through Docker.🎉

Open MauroDruwel opened this issue 2 years ago • 2 comments
trafficstars

Background

Auto-GPT couldn't run Python scripts when args were specified. Now it can!

Changes

Added args field, also made it optional so that it doesn't always need args.

Documentation

Added to the command explanation. Added the args field in the Python command. Documented in the code as you can see below: Screenshot from 2023-05-07 21-02-11

Test Plan

I was able to execute files with and without arguments in a Docker container.

PR Quality Checklist

  • [ x ] My pull request is atomic and focuses on a single change.
  • [ x ] I have thoroughly tested my changes with multiple different prompts.
  • [ x ] I have considered potential risks and mitigations for my changes.
  • [ x ] I have documented my changes clearly and comprehensively.
  • [ x ] I have not snuck in any "extra" small tweaks changes

MauroDruwel avatar May 07 '23 19:05 MauroDruwel

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

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 7, 2023 1:12am

vercel[bot] avatar May 07 '23 19:05 vercel[bot]

See also:

  • https://github.com/Significant-Gravitas/Auto-GPT/issues/4045

Boostrix avatar May 09 '23 08:05 Boostrix

Deployment failed with the following error:

Resource is limited - try again in 26 minutes (more than 100, code: "api-deployments-free-per-day").

vercel[bot] avatar May 18 '23 12:05 vercel[bot]

Codecov Report

Patch coverage: 60.00% and project coverage change: +18.98% :tada:

Comparison is base (78a620c) 50.73% compared to head (d5c1ee0) 69.71%. Report is 1588 commits behind head on master.

:exclamation: Current head d5c1ee0 differs from pull request most recent head 648d124. Consider uploading reports for the commit 648d124 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #3972       +/-   ##
===========================================
+ Coverage   50.73%   69.71%   +18.98%     
===========================================
  Files         128       72       -56     
  Lines        5517     3563     -1954     
  Branches      759      570      -189     
===========================================
- Hits         2799     2484      -315     
+ Misses       2507      889     -1618     
+ Partials      211      190       -21     
Files Changed Coverage Δ
autogpt/commands/execute_code.py 65.59% <60.00%> (-10.56%) :arrow_down:

... and 146 files with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 18 '23 13:05 codecov[bot]

Deployment failed with the following error:

Resource is limited - try again in 20 minutes (more than 100, code: "api-deployments-free-per-day").

vercel[bot] avatar May 18 '23 17:05 vercel[bot]

Deployment failed with the following error:

Resource is limited - try again in 4 minutes (more than 100, code: "api-deployments-free-per-day").

vercel[bot] avatar May 18 '23 17:05 vercel[bot]

After a lot of struggling, the test now also succeeds! The problem was that I didn't add the args function when the script is not executed in the we_are_running_in_a_docker_container function (See screenshot). Now that is also added and it passes the checks successfully. Screenshot from 2023-05-19 07-49-41

MauroDruwel avatar May 19 '23 05:05 MauroDruwel

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

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

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

github-actions[bot] avatar Jun 07 '23 01:06 github-actions[bot]

Deployment failed with the following error:

Resource is limited - try again in 21 minutes (more than 100, code: "api-deployments-free-per-day").

vercel[bot] avatar Jun 07 '23 01:06 vercel[bot]

Deployment failed with the following error:

Resource is limited - try again in 16 minutes (more than 100, code: "api-deployments-free-per-day").

vercel[bot] avatar Jun 07 '23 01:06 vercel[bot]

Deployment failed with the following error:

Resource is limited - try again in 7 minutes (more than 100, code: "api-deployments-free-per-day").

vercel[bot] avatar Jun 07 '23 01:06 vercel[bot]

You changed AutoGPT's behaviour. The cassettes have been updated and will be merged to the submodule when this Pull Request gets merged.

Auto-GPT-Bot avatar Jun 07 '23 01:06 Auto-GPT-Bot

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

github-actions[bot] avatar Jun 09 '23 17:06 github-actions[bot]

@MauroDruwel still interested in this PR?

Please fix conflicts and address https://github.com/Significant-Gravitas/Auto-GPT/pull/3972#discussion_r1220665023

lc0rp avatar Jun 21 '23 08:06 lc0rp

Deploy Preview for auto-gpt-docs ready!

Name Link
Latest commit 648d124e204f698ccdb5021ae6d111e8fa2ee6d3
Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/64fbcbf1bb5a070008d65418
Deploy Preview https://deploy-preview-3972--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.

netlify[bot] avatar Jun 21 '23 11:06 netlify[bot]

You changed AutoGPT's behaviour. The cassettes have been updated and will be merged to the submodule when this Pull Request gets merged.

Auto-GPT-Bot avatar Jun 21 '23 11:06 Auto-GPT-Bot

I sincerely apologize for my delayed response. I was caught up in some commitments, and it completely slipped my mind. I've incorporated the necessary changes to make it compatible as both a list or a string. Should you encounter any problems, please don't hesitate to reach out to me. I'm here to assist! Thank you for your understanding.

MauroDruwel avatar Aug 29 '23 19:08 MauroDruwel

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

github-actions[bot] avatar Sep 09 '23 01:09 github-actions[bot]