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 orjson encoding text with UTF-8 surrogates #3666

Merged
merged 4 commits into from
Jul 14, 2023

Conversation

ido777
Copy link
Contributor

@ido777 ido777 commented May 2, 2023

Background

Fixes #778, surrogates errors

Changes

  1. added lib to requirments.txt
  2. changed the insertion of the text to the list to be fixed before adding it to the list
  3. added test of with problematic test that creates an encoding error but pass the addition to the cache with no error

Documentation

Test Plan

Added dedicated test

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 2, 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 2, 2023 5:38am

@github-actions github-actions bot added the size/m label May 2, 2023
@p-i-
Copy link
Contributor

p-i- commented May 5, 2023

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

@github-actions github-actions bot added the conflicts Automatically applied to PRs with merge conflicts label May 25, 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 Pwuts self-assigned this Jul 14, 2023
@Pwuts Pwuts added this to the v0.4.5 Release milestone Jul 14, 2023
@Pwuts Pwuts changed the title Fix deserializing bad input third attempt Fix orjson encoding text with UTF-8 surrogates Jul 14, 2023
@github-actions github-actions bot removed the conflicts Automatically applied to PRs with merge conflicts label Jul 14, 2023
@github-actions
Copy link
Contributor

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

@netlify
Copy link

netlify bot commented Jul 14, 2023

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit ac208f2
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/64b1c1e0ecef44000851d29f

@github-actions github-actions bot added size/s and removed size/m labels Jul 14, 2023
@codecov
Copy link

codecov bot commented Jul 14, 2023

Codecov Report

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

Comparison is base (376ecf0) 51.00% compared to head (ac208f2) 51.02%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3666      +/-   ##
==========================================
+ Coverage   51.00%   51.02%   +0.02%     
==========================================
  Files         118      118              
  Lines        4884     4886       +2     
  Branches      643      643              
==========================================
+ Hits         2491     2493       +2     
  Misses       2212     2212              
  Partials      181      181              
Impacted Files Coverage Δ
autogpt/memory/vector/memory_item.py 86.66% <100.00%> (+0.30%) ⬆️

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

@Pwuts Pwuts merged commit c821b29 into Significant-Gravitas:master Jul 14, 2023
@Pwuts
Copy link
Member

Pwuts commented Jul 14, 2023

Better late than never. :')

Thanks @ido777!

@Pwuts Pwuts added function: memory bug Something isn't working labels Jul 14, 2023
dayofthedave pushed a commit to dayofthedave/Auto-GPT that referenced this pull request Jul 17, 2023
…3666)

* added lib ftfy (fixes text for you), to solve surrogates errors

---------

Co-authored-by: Reinier van der Leer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working function: memory size/s
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

"str is not valid UTF-8: surrogates not allowed" after "y -10" command
3 participants