AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

Fixed a bug in the function that tries to enclose the json properties with double quotes

Open apssouza22 opened this issue 2 years ago β€’ 7 comments

Background

The existing function to add quotes to the property name has an issue. It contains a simple regex that matches to content already inside quotes. The existing function would change the property value "something http://link.to/" to "something "http":link.to"

I have updated the regex to avoid matching to content enclosed by quotes.

Changes

Test Plan

The JSON response from openAI should contain properties missing the double quotes

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

apssouza22 avatar Apr 17 '23 14:04 apssouza22

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

github-actions[bot] avatar Apr 19 '23 00:04 github-actions[bot]

Conflicts have been resolved! πŸŽ‰ A maintainer will review the pull request shortly.

github-actions[bot] avatar Apr 19 '23 08:04 github-actions[bot]

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

github-actions[bot] avatar Apr 24 '23 18:04 github-actions[bot]

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 8, 2023 6:39am

vercel[bot] avatar Apr 27 '23 10:04 vercel[bot]

Conflicts have been resolved! πŸŽ‰ A maintainer will review the pull request shortly.

github-actions[bot] avatar Apr 27 '23 10:04 github-actions[bot]

@nponeccop, any chance to have this reviewed again?

apssouza22 avatar Apr 28 '23 09:04 apssouza22

This is a mass message from the AutoGPT core team. Our apologies for the ongoing delay in processing PRs. This is because we are re-architecting the AutoGPT core!

For more details (and for infor on joining our Discord), please refer to: https://github.com/Significant-Gravitas/Auto-GPT/wiki/Architecting

p-i- avatar May 05 '23 00:05 p-i-

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

github-actions[bot] avatar May 18 '23 06:05 github-actions[bot]

Conflicts have been resolved! πŸŽ‰ A maintainer will review the pull request shortly.

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

Codecov Report

Patch coverage: 50.00% and no project coverage change.

Comparison is base (1e851ba) 69.67% compared to head (828d5f1) 69.67%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2188   +/-   ##
=======================================
  Coverage   69.67%   69.67%           
=======================================
  Files          72       72           
  Lines        3558     3558           
  Branches      569      569           
=======================================
  Hits         2479     2479           
  Misses        890      890           
  Partials      189      189           
Impacted Files Coverage Ξ”
autogpt/json_utils/json_fix_general.py 52.38% <50.00%> (ΓΈ)

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

codecov[bot] avatar Jun 08 '23 06:06 codecov[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 13 '23 17:06 github-actions[bot]

Thanks for submitting! The help in fixing our JSON issues is much appreciated, even though we couldn't include all submitted PRs in the process. We have since changed the way we instruct the LLM on the response format (using a JSON schema), so this PR is no longer necessary. If you are still interested in contributing, be sure to shoot us a message on Discord! :)

Pwuts avatar Jul 07 '23 15:07 Pwuts