-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
.Net: Fix #10389 #10406
base: main
Are you sure you want to change the base?
.Net: Fix #10389 #10406
Conversation
Use `JsonSerializerOptions.Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping`
Hi @RamType0, thanks for submitting the PR. We are evaluating the fix along with an alternative solution that would allow for customizing the function result serialization process. Please bear with us; it shouldn't take long. |
Why you think that we will use the function result for HTML rendering directly? I could not imagine that scenario.
Customization feature is good, but I think this should be the default behavior. Many alphabet speaker programmers previously made many bugs with multi byte characters. |
@RamType0 Thanks for your response! My comment is outdated now, @SergeyMenshykh will provide more details soon. |
Hi @RamType0, we plan to proceed with merging this PR, but before that, please cover the change with unit test(s). |
Linking this PR to the M.E.AI one: Use unsafe relaxed escaping in AIJsonUtilities.DefaultOptions as both address the same issue |
@microsoft-github-policy-service agree |
Motivation and Context
Fixes issue #10389.
Description
Use
JsonSerializerOptions.Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping
to generate more LLM friendly serialized FunctionResult.Contribution Checklist