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][Transforms-V2] Fix LLM transform can not parse boolean value type #7620

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

hawk9821
Copy link
Contributor

@hawk9821 hawk9821 commented Sep 10, 2024

Purpose of this pull request

issues: #7617

Does this PR introduce any user-facing change?

no

How was this patch tested?

TestLLMBooleanIT#testLLMWithOpenAI

Check list

@Hisoka-X Hisoka-X changed the title [Fix][Transforms-V2] LLM trans when output_data_type = boolean, throw execpition [Fix][Transforms-V2] Fix LLM transform can not parse boolean value type Sep 10, 2024
Copy link
Member

@Hisoka-X Hisoka-X left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hawk9821
Copy link
Contributor Author

Why not change it in

?

LLM return [True], The JSON standard requires Boolean values to be lowercase true or false, not uppercase True or False.
OBJECT_MAPPER.readValue("[True]", new TypeReference<List<String>>() {});
resulting in Json serialization errors.

@Hisoka-X
Copy link
Member

Why not change it in

?

LLM return [True], The JSON standard requires Boolean values to be lowercase true or false, not uppercase True or False. OBJECT_MAPPER.readValue("[True]", new TypeReference<List<String>>() {}); resulting in Json serialization errors.

Got it

Copy link
Member

@Hisoka-X Hisoka-X left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @hawk9821

@hailin0 hailin0 merged commit 6e1f207 into apache:dev Sep 10, 2024
4 of 5 checks passed
@hawk9821 hawk9821 deleted the llm_return_boolean branch September 12, 2024 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants