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 CustomFunction deserializing escaped JSON strings #1814

Merged
merged 3 commits into from
Mar 1, 2024

Conversation

mokeyish
Copy link
Contributor

@mokeyish mokeyish commented Feb 26, 2024

This PR relates to #1539 . If it is json after unescaping, it will be parsed into a json object.

@HenryHengZJ
Copy link
Contributor

can you provide more description or elaboration what this PR trying to solve? screenshot/example of bug/errors/how to replicate the issue

@mokeyish
Copy link
Contributor Author

@HenryHengZJ This PR relates to #1539 . If it is json after unescaping, it will be parsed into a json object.

@mokeyish
Copy link
Contributor Author

图片

@HenryHengZJ
Copy link
Contributor

@mokeyish do you have some examples chatflow that I can replicate the issue?

@mokeyish
Copy link
Contributor Author

@mokeyish do you have some examples chatflow that I can replicate the issue?

In my case it's LLMChain that outputs a JSON string, and then the next node is CustomFunction.

@HenryHengZJ
Copy link
Contributor

@mokeyish do you have some examples chatflow that I can replicate the issue?

In my case it's LLMChain that outputs a JSON string, and then the next node is CustomFunction.

does the JSON string contains the escaped characters like FLOWISE_DOUBLE_QUOTE ? I was just thinking any downside of handling the conversion of escaped charactes before JSON parsing it

@mokeyish
Copy link
Contributor Author

Yes, it contains FLOWISE_DOUBLE_QUOTE, so JSON parsing failed. then in the CustomFunction, it json string other than json object.

@HenryHengZJ
Copy link
Contributor

We will have to do the same for IfElseFunction.ts as well

@mokeyish

This comment was marked as off-topic.

@HenryHengZJ
Copy link
Contributor

@mokeyish
Copy link
Contributor Author

Okay, I'll change it later too.

@HenryHengZJ HenryHengZJ merged commit c5e0bb9 into FlowiseAI:main Mar 1, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants