Node connection validation improvements #53
-
This comment by @ScripterSugar points out that our approach to validating connection between nodes might need some improvements: Specifically this part:
I'd like to hear @anovazzi1 and @lucaseduoli 's opinions on this matter. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
The hard-coded "type:str" on the output of the nodes was exclusively implemented to make connections with the Chat Output and the String node, for concatenation. Since both nodes are not present on the present version, that type is not necessary anymore. We can remove it for now. |
Beta Was this translation helpful? Give feedback.
-
My original thought was that all of the functions of the LangChain library output a string to be printed or used by other functions. That's why I hard-coded the str type into it. But, if we don't use this type for anything else, we can remove it with no problems. |
Beta Was this translation helpful? Give feedback.
-
We can set up an issue for that. Thanks, @lucaseduoli! About the custom components.. we will still be required to setup types that interact well with LangChain in the beginning, so Tools are python functions which use str as input and output, and possibly other types that inherit from Chain or Memory, etc. The first step would be to set up tools as these are very important to increase LangFlow's power compared to LangChain's. |
Beta Was this translation helpful? Give feedback.
We can set up an issue for that. Thanks, @lucaseduoli!
About the custom components.. we will still be required to setup types that interact well with LangChain in the beginning, so Tools are python functions which use str as input and output, and possibly other types that inherit from Chain or Memory, etc.
The first step would be to set up tools as these are very important to increase LangFlow's power compared to LangChain's.
To do that we most likely will create a text area that validates the function in the backend once saved and uses it to make the prediction.