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

Fix issues with execute_python_code responses #4738

Conversation

erik-megarad
Copy link
Contributor

Background

Issue reported on Discord. This is due to garbage that the AI sends back when a response includes code. Functions will fix this. In the meantime:

Screenshot_143

Changes

  • Fix argument name in execute_python_code
  • Lower level of response parse errors
  • Add debug message so it's easier to see what was messed up

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 --ignore-pass-after-docstring autogpt tests --in-place

@netlify
Copy link

netlify bot commented Jun 19, 2023

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit dd62b63
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/648fc9bd45b9400008734d99

@Auto-GPT-Bot
Copy link
Contributor

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

@codecov
Copy link

codecov bot commented Jun 19, 2023

Codecov Report

Patch coverage: 66.66% and project coverage change: -0.16 ⚠️

Comparison is base (a7f8056) 71.03% compared to head (dd62b63) 70.87%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4738      +/-   ##
==========================================
- Coverage   71.03%   70.87%   -0.16%     
==========================================
  Files          68       68              
  Lines        3235     3228       -7     
  Branches      516      512       -4     
==========================================
- Hits         2298     2288      -10     
  Misses        774      774              
- Partials      163      166       +3     
Impacted Files Coverage Δ
autogpt/command_decorator.py 100.00% <ø> (+4.34%) ⬆️
autogpt/json_utils/utilities.py 74.28% <0.00%> (-2.19%) ⬇️
autogpt/commands/execute_code.py 71.28% <100.00%> (-1.99%) ⬇️

... and 4 files with indirect coverage changes

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

@waynehamadi waynehamadi merged commit 9f73727 into Significant-Gravitas:master Jun 19, 2023
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.

3 participants