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

[DRAFT] allow python code only to be compiled/validated #4112

Conversation

Boostrix
Copy link
Contributor

@Boostrix Boostrix commented May 11, 2023

trivial addition, might be useful to some folks - at least could make it into the docs to demonstrate how to extend the current command manager with custom commands (I don't seem to have wiki access and don't know if I can simply open a PR to get this added to the wiki?):

mainly useful to save bandwidth (API tokens), so that Python code can be compiled first before being executed. A simple form of validation. But -if extended- could also work to address a few RFEs such as executing calculations/expressions (regex, think sed/awk!) directly, like:

Background

Changes

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

@vercel
Copy link

vercel bot commented May 11, 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) May 11, 2023 3:01pm

@codecov
Copy link

codecov bot commented May 11, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.08 🎉

Comparison is base (8f31196) 60.99% compared to head (5776169) 61.07%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4112      +/-   ##
==========================================
+ Coverage   60.99%   61.07%   +0.08%     
==========================================
  Files          73       73              
  Lines        3310     3317       +7     
  Branches      542      543       +1     
==========================================
+ Hits         2019     2026       +7     
  Misses       1152     1152              
  Partials      139      139              
Impacted Files Coverage Δ
autogpt/commands/execute_code.py 72.36% <100.00%> (+2.80%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@github-actions github-actions bot added size/m and removed size/s labels May 11, 2023
@github-actions github-actions bot added the conflicts Automatically applied to PRs with merge conflicts label May 26, 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.

@Pwuts
Copy link
Member

Pwuts commented Sep 8, 2023

I like this idea. It could be very effective when integrated into write_file, checking the syntax automatically when the extension is .py and throwing an error if it fails.

@Boostrix
Copy link
Contributor Author

Boostrix commented Oct 5, 2023

Is this something that you consider trivial to be reviewed/added or should I clean up/update the merge request ?

@Swiftyos Swiftyos closed this Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conflicts Automatically applied to PRs with merge conflicts function: run code size/m
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants