langflow icon indicating copy to clipboard operation
langflow copied to clipboard

How to use output of LLMChain as input in another Chain?

Open thepok opened this issue 1 year ago • 5 comments

I would like to have one chain produce some text, and another chain refine that text.

thepok avatar Mar 31 '23 08:03 thepok

This is something we are planning on releasing very soon. We just need some more testing haha

ogabrielluiz avatar Mar 31 '23 20:03 ogabrielluiz

Hi @ogabrielluiz ! Just wanted to ask if you have an ETA for this feature? I think that this is what would really make the visual interface be worth it!

dnrico1 avatar Apr 14 '23 15:04 dnrico1

Hey, @dnrico1 . In the current version this is already possible but we still haven't tested many use cases. Could you give it a try and tell us what you think?

ogabrielluiz avatar Apr 14 '23 16:04 ogabrielluiz

Thanks for the quick reply @ogabrielluiz! I just installed the library today through pip install langflow, but I don't seem to be able to do that. How is it supposed to work, and do I perhaps just have an outdated version?

dnrico1 avatar Apr 14 '23 16:04 dnrico1

I think I know what you mean now.

LangFlow allows you to connect modules, not their inputs and outputs. So, the module itself goes into another one to build the final module.

One way to achieve what you want would be to create a Tool using a PythonFunction node and create the modules inside the function passing the output of one to the other.

ogabrielluiz avatar Apr 22 '23 15:04 ogabrielluiz

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jun 08 '23 08:06 stale[bot]