-
-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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
New Feature - Output Parsers #1115
New Feature - Output Parsers #1115
Conversation
awesome! will use this as the base for further improvement. 1.) In this PR we will be returning the reponse as a JSON instead of string - 2.) For Zod Schema, would love to have a UI that allow easier schema input. Similar to custom tool: 3.) From the PR, we have if else check to cater for PromptTemplate and ChatPromptTemplate, what about other prompt like FewShot, can we use output parser for that, if not, how do we disable connection Just few thoughts, don't have to implement all of these yet |
1 & 2): Could be a new PR, as they will add a lot of value. After the 1.0 release of this component node. |
@vinodkiran would love to have the 1.) implemented for the next PR, so we can properly return the JSON when calling API, and this can lead to us starting to implement extraction/tagging chain - https://js.langchain.com/docs/modules/chains/popular/structured_output. What do you think? |
@HenryHengZJ Agreed. Makes perfect sense. I will update this PR to return json...when will the base PR be merged? |
will be testing it today |
Sporadically, I see double responses to the front end. Also, sometimes the response is shown before the output parser (parse method) is invoked (in a debug mode). Kindly validate. |
@vinodkiran can we use this as base branch for Output Parser, and create branch for further PRs and merge into this. Once everything is in, then we merge to main and release to public. |
@vinodkiran can you allow edits from maintainer on your fork? here's guide |
Yes, maintainer edits are enabled for this PR. |
try { | ||
parsedStructure = JSON.parse(structure) | ||
|
||
// NOTE: When we change Flowise to return a json response, the following has to be changed to: JsonStructuredOutputParser |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@HenryHengZJ we could probably use the JsonStructuredOutputParser and not hardcode ```json in the downstream classes.
@vinodkiran let me know if you have any question before merging |
@HenryHengZJ 1) do we continue to use the word experimental in the category? 2) currently the input parameter is defined for LLMchain only and not for others. Do we target the rest as a separate PR? |
|
Merged in #1009, resolving the conflict now |
# Conflicts: # packages/ui/src/views/chatmessage/ChatMessage.js
New Feature - Output Parsers
@HenryHengZJ Need your (early) feedback on this new Feature.
Lanchain Output Parsers
Very initial (draft) implementation for handing output parsers in Flowise.
Do not spend time reviewing the code, it needs a lot of cleanup / refactoring.