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

Chinese will be garbled in function calling #186

Open
andyli0123 opened this issue Jul 10, 2024 · 1 comment
Open

Chinese will be garbled in function calling #186

andyli0123 opened this issue Jul 10, 2024 · 1 comment
Assignees
Labels
component:dart sdk Issue/PR related to Dart SDK status:triaged Issue/PR triaged to the corresponding sub-team type:bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@andyli0123
Copy link

Description of the bug:

  1. If the result contains Chinese, Gemini reads it as garbled. (always)
response = await chat.sendMessage(Content.functionResponse(functionCall.name, result));
  1. Properties will also be garbled. (sometimes)

traditional-chinese

Actual vs expected behavior:

\350\230\213\346\236\234 should be 蘋果
\351\200\231\345\200\213\346\274\217\346\264\236\345\245\275\345\232\264\351\207\215 should be 這個漏洞好嚴重

Any other information you'd like to share?

Simulates a garbled situation in Python:

encoded_string = "\350\230\213\346\236\234"
decoded_string = encoded_string.encode('latin1').decode('utf-8')
print(decoded_string)
@singhniraj08 singhniraj08 added type:bug Incorrect behavior (everything from a crash to more subtle misbehavior) component:dart sdk Issue/PR related to Dart SDK status:triaged Issue/PR triaged to the corresponding sub-team labels Jul 11, 2024
@andyli0123
Copy link
Author

Café will also become Caf\303\251.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:dart sdk Issue/PR related to Dart SDK status:triaged Issue/PR triaged to the corresponding sub-team type:bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

3 participants