-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[Feature Request] Allow Configuration of ensure_ascii for JSON Serialization to Support Non-ASCII Characters #3139
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
Comments
Hey there! 😊 Thank you so much for reaching out and for your support for Agno — it truly means a lot to us. We’ve added your suggestion to our roadmap! Since Agno is open source, you’re more than welcome to take a stab at it yourself — and we’d be more than happy to support you along the way. Looking forward to building together! |
这个问题我在某个方法里修复过,也提交了pr,但是貌似有太多地方需要修改ensure_ascii=False |
hi @KinonoChen , I don't see your PR ? |
@monali7-d why was this closed as completed? As far as I understand, it's not yet possible to make sure the the non-ASCII characters are embedded properly? Example of my embeddings is here. The Lithuanian characters ą, č, ę, ė, į etc. are escaped in the "content" column for embeddings. {"Pavard\u0117": "Aglinskas", "Vardas": "Vincas", "T\u0117vo vardas": "juozo", "Slapyvardis": null, "Teritorija": "Vytauto", "Gimimo metai": "1920", "Mirties data": "1944-11-20 (22)", "Mirties vieta": "Roki\u0161kio aps. Kamaj\u0173 vls. Mikni\u016bn\u0173 k.", "Pastabos": null} |
Problem Description
I'm working with agno in french and I frequently encounter encoding issues with the model response. As an exemple, I get " l'ann\u0000e9e " instead of " l'année ". After some digging, I think the issue is related to the json library functions.
Proposed Solution
I think the option to choose the ensure_ascii parameter should be given at agent creation. This would improve the quality of results with languages that use characters outside the ascii table, such as french.
Alternatives Considered
Additional context
I had similar issues with other tools I use, which I fixed by adding ensure_ascii=False as an additional parameter for the json functions
Exemple : json.dumps(text) to json.dumps(text, ensure_ascii=False)
Would you like to work on this?
We welcome contributions! Let us know if you’d like to help implement this feature.
[ ] Yes, I’d love to work on it!
[ ] I’m open to collaborating but need guidance.
[X] No, I’m just sharing the idea.
The text was updated successfully, but these errors were encountered: