Spaces:
Paused
No, that's not the python code you would write with native python and langchain...
\n","updatedAt":"2023-06-04T05:50:52.172Z","author":{"_id":"644a80747c5c68c77628b931","avatarUrl":"/avatars/85de09e8a9c67e6471a0802776116df4.svg","fullname":"RobertoDonPedro","name":"RobertoDonPedro","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"followerCount":2,"isUserFollowing":false}},"numEdits":0,"identifiedLanguage":{"language":"en","probability":0.9660831093788147},"editors":["RobertoDonPedro"],"editorAvatarUrls":["/avatars/85de09e8a9c67e6471a0802776116df4.svg"],"reactions":[{"reaction":"👍","users":["robustor","RodriMauri001"],"count":2}],"isReport":false}},{"id":"648aef81daec2acf5e396f29","author":{"_id":"6487151df217fde8d50ee20b","avatarUrl":"/avatars/bd8672e06e357a5bd68b8d166b95c0bf.svg","fullname":"Akash Talole","name":"akashtalole","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"isUserFollowing":false,"isOwner":false,"isOrgMember":false},"createdAt":"2023-06-15T11:01:21.000Z","type":"comment","data":{"edited":false,"hidden":false,"latest":{"raw":"IS there any solution for convering to native langchain python code from lanflow json?","html":"IS there any solution for convering to native langchain python code from lanflow json?
\n","updatedAt":"2023-06-15T11:01:21.041Z","author":{"_id":"6487151df217fde8d50ee20b","avatarUrl":"/avatars/bd8672e06e357a5bd68b8d166b95c0bf.svg","fullname":"Akash Talole","name":"akashtalole","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"isUserFollowing":false}},"numEdits":0,"identifiedLanguage":{"language":"en","probability":0.7876949310302734},"editors":["akashtalole"],"editorAvatarUrls":["/avatars/bd8672e06e357a5bd68b8d166b95c0bf.svg"],"reactions":[],"isReport":false}},{"id":"6498e3b473e20520c1da899c","author":{"_id":"63ea6b42a332618465d17bcb","avatarUrl":"/avatars/52a9b50e3e5ef3306d3b8ec8503a5221.svg","fullname":"Michael Connor","name":"mlconnor","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"isUserFollowing":false,"isOwner":false,"isOrgMember":false},"createdAt":"2023-06-26T01:02:44.000Z","type":"comment","data":{"edited":false,"hidden":false,"latest":{"raw":"+1","html":"+1
\n","updatedAt":"2023-06-26T01:02:44.070Z","author":{"_id":"63ea6b42a332618465d17bcb","avatarUrl":"/avatars/52a9b50e3e5ef3306d3b8ec8503a5221.svg","fullname":"Michael Connor","name":"mlconnor","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"isUserFollowing":false}},"numEdits":0,"identifiedLanguage":{"language":"it","probability":0.9861560463905334},"editors":["mlconnor"],"editorAvatarUrls":["/avatars/52a9b50e3e5ef3306d3b8ec8503a5221.svg"],"reactions":[],"isReport":false}},{"id":"649b08367aa03e1551a841d0","author":{"_id":"614b3f2706de150e816d12ee","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/1632321295605-noauth.png","fullname":"Barrett Velker","name":"BearThreat","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"isUserFollowing":false,"isOwner":false,"isOrgMember":false},"createdAt":"2023-06-27T16:03:02.000Z","type":"comment","data":{"edited":false,"hidden":false,"latest":{"raw":"+1","html":"+1
\n","updatedAt":"2023-06-27T16:03:02.987Z","author":{"_id":"614b3f2706de150e816d12ee","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/1632321295605-noauth.png","fullname":"Barrett Velker","name":"BearThreat","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"isUserFollowing":false}},"numEdits":0,"identifiedLanguage":{"language":"it","probability":0.9861560463905334},"editors":["BearThreat"],"editorAvatarUrls":["https://cdn-avatars.huggingface.co/v1/production/uploads/1632321295605-noauth.png"],"reactions":[],"isReport":false}},{"id":"649b0e9f9cd776a57990182a","author":{"_id":"614b3f2706de150e816d12ee","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/1632321295605-noauth.png","fullname":"Barrett Velker","name":"BearThreat","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"isUserFollowing":false,"isOwner":false,"isOrgMember":false},"createdAt":"2023-06-27T16:30:23.000Z","type":"comment","data":{"edited":true,"hidden":false,"latest":{"raw":"Here is more info on this topic. This is largely taken from the langflow read.md\n\nFrom langflow you build out a flow then, once you're done, you can export your flow as a JSON file to use with LangChain. To do so, click the \"Export\" button in the top right corner of the canvas, then in Python, you can load the flow with:\n\nfrom langflow import load_flow_from_json\n\nflow = load_flow_from_json(\"path/to/flow.json\")\nflow(\"Hey, have you heard of LangFlow?\")\n\nIt looks like langchain treats the entire flow as a single chain\n\n\nIt would be very slick if langflow implemented a raw text python script output option. I can see many advantages when starting with langflow to quickly build out an overall app structure and then generalizing from there.\nIn the UI one fairly simple add on could be to add completed projects/flows to the chain selection menu. That way you could use a chain in later flows","html":"Here is more info on this topic. This is largely taken from the langflow read.md
\nFrom langflow you build out a flow then, once you're done, you can export your flow as a JSON file to use with LangChain. To do so, click the \"Export\" button in the top right corner of the canvas, then in Python, you can load the flow with:
\nfrom langflow import load_flow_from_json
\nflow = load_flow_from_json(\"path/to/flow.json\")
flow(\"Hey, have you heard of LangFlow?\")
It looks like langchain treats the entire flow as a single chain
\nIt would be very slick if langflow implemented a raw text python script output option. I can see many advantages when starting with langflow to quickly build out an overall app structure and then generalizing from there.
In the UI one fairly simple add on could be to add completed projects/flows to the chain selection menu. That way you could use a chain in later flows
Any updates on this?
\n","updatedAt":"2025-01-26T16:16:34.413Z","author":{"_id":"6733dc6424b316be87f6931b","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/no-auth/YEqaBZzEV5C2zG0F9ke7B.png","fullname":"Maurino","name":"RodriMauri001","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"isUserFollowing":false}},"numEdits":0,"identifiedLanguage":{"language":"en","probability":0.7419278025627136},"editors":["RodriMauri001"],"editorAvatarUrls":["https://cdn-avatars.huggingface.co/v1/production/uploads/no-auth/YEqaBZzEV5C2zG0F9ke7B.png"],"reactions":[],"isReport":false}},{"id":"679cd9b44cb9fb01ef390523","author":{"_id":"64e804ba24abf6be050837f2","avatarUrl":"/avatars/876b6a2ea9d114142069b04d67d4b16f.svg","fullname":"Hygor Xavier Araújo","name":"hygorxaraujo","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"isUserFollowing":false,"isOwner":false,"isOrgMember":false},"createdAt":"2025-01-31T14:09:56.000Z","type":"comment","data":{"edited":false,"hidden":false,"latest":{"raw":"I was also looking for how to export Python code from the flow, I didn't find an option to export everything together, but if you select each component there is a \"code\" option at the top left where you can see the code for the component:\n\n\n\n\n\nBut it seems to be mostly implemented using the langflow package, not only langchain.","html":"I was also looking for how to export Python code from the flow, I didn't find an option to export everything together, but if you select each component there is a \"code\" option at the top left where you can see the code for the component:
\n\n\nBut it seems to be mostly implemented using the langflow package, not only langchain.
\n","updatedAt":"2025-01-31T14:09:56.452Z","author":{"_id":"64e804ba24abf6be050837f2","avatarUrl":"/avatars/876b6a2ea9d114142069b04d67d4b16f.svg","fullname":"Hygor Xavier Araújo","name":"hygorxaraujo","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"isUserFollowing":false}},"numEdits":0,"identifiedLanguage":{"language":"en","probability":0.8461534976959229},"editors":["hygorxaraujo"],"editorAvatarUrls":["/avatars/876b6a2ea9d114142069b04d67d4b16f.svg"],"reactions":[],"isReport":false}}],"pinned":false,"locked":false,"collection":"discussions","isPullRequest":false,"isReport":false},"repo":{"name":"Langflow/Langflow","type":"space"},"activeTab":"discussion","discussionRole":0,"watched":false,"muted":false,"repoDiscussionsLocked":false}">Export Python code rather than json file
No, that's not the python code you would write with native python and langchain...
\n","updatedAt":"2023-06-04T05:50:52.172Z","author":{"_id":"644a80747c5c68c77628b931","avatarUrl":"/avatars/85de09e8a9c67e6471a0802776116df4.svg","fullname":"RobertoDonPedro","name":"RobertoDonPedro","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"followerCount":2,"isUserFollowing":false}},"numEdits":0,"identifiedLanguage":{"language":"en","probability":0.9660831093788147},"editors":["RobertoDonPedro"],"editorAvatarUrls":["/avatars/85de09e8a9c67e6471a0802776116df4.svg"],"reactions":[{"reaction":"👍","users":["robustor","RodriMauri001"],"count":2}],"isReport":false}},{"id":"648aef81daec2acf5e396f29","author":{"_id":"6487151df217fde8d50ee20b","avatarUrl":"/avatars/bd8672e06e357a5bd68b8d166b95c0bf.svg","fullname":"Akash Talole","name":"akashtalole","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"isUserFollowing":false,"isOwner":false,"isOrgMember":false},"createdAt":"2023-06-15T11:01:21.000Z","type":"comment","data":{"edited":false,"hidden":false,"latest":{"raw":"IS there any solution for convering to native langchain python code from lanflow json?","html":"IS there any solution for convering to native langchain python code from lanflow json?
\n","updatedAt":"2023-06-15T11:01:21.041Z","author":{"_id":"6487151df217fde8d50ee20b","avatarUrl":"/avatars/bd8672e06e357a5bd68b8d166b95c0bf.svg","fullname":"Akash Talole","name":"akashtalole","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"isUserFollowing":false}},"numEdits":0,"identifiedLanguage":{"language":"en","probability":0.7876949310302734},"editors":["akashtalole"],"editorAvatarUrls":["/avatars/bd8672e06e357a5bd68b8d166b95c0bf.svg"],"reactions":[],"isReport":false}},{"id":"6498e3b473e20520c1da899c","author":{"_id":"63ea6b42a332618465d17bcb","avatarUrl":"/avatars/52a9b50e3e5ef3306d3b8ec8503a5221.svg","fullname":"Michael Connor","name":"mlconnor","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"isUserFollowing":false,"isOwner":false,"isOrgMember":false},"createdAt":"2023-06-26T01:02:44.000Z","type":"comment","data":{"edited":false,"hidden":false,"latest":{"raw":"+1","html":"+1
\n","updatedAt":"2023-06-26T01:02:44.070Z","author":{"_id":"63ea6b42a332618465d17bcb","avatarUrl":"/avatars/52a9b50e3e5ef3306d3b8ec8503a5221.svg","fullname":"Michael Connor","name":"mlconnor","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"isUserFollowing":false}},"numEdits":0,"identifiedLanguage":{"language":"it","probability":0.9861560463905334},"editors":["mlconnor"],"editorAvatarUrls":["/avatars/52a9b50e3e5ef3306d3b8ec8503a5221.svg"],"reactions":[],"isReport":false}},{"id":"649b08367aa03e1551a841d0","author":{"_id":"614b3f2706de150e816d12ee","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/1632321295605-noauth.png","fullname":"Barrett Velker","name":"BearThreat","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"isUserFollowing":false,"isOwner":false,"isOrgMember":false},"createdAt":"2023-06-27T16:03:02.000Z","type":"comment","data":{"edited":false,"hidden":false,"latest":{"raw":"+1","html":"+1
\n","updatedAt":"2023-06-27T16:03:02.987Z","author":{"_id":"614b3f2706de150e816d12ee","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/1632321295605-noauth.png","fullname":"Barrett Velker","name":"BearThreat","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"isUserFollowing":false}},"numEdits":0,"identifiedLanguage":{"language":"it","probability":0.9861560463905334},"editors":["BearThreat"],"editorAvatarUrls":["https://cdn-avatars.huggingface.co/v1/production/uploads/1632321295605-noauth.png"],"reactions":[],"isReport":false}},{"id":"649b0e9f9cd776a57990182a","author":{"_id":"614b3f2706de150e816d12ee","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/1632321295605-noauth.png","fullname":"Barrett Velker","name":"BearThreat","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"isUserFollowing":false,"isOwner":false,"isOrgMember":false},"createdAt":"2023-06-27T16:30:23.000Z","type":"comment","data":{"edited":true,"hidden":false,"latest":{"raw":"Here is more info on this topic. This is largely taken from the langflow read.md\n\nFrom langflow you build out a flow then, once you're done, you can export your flow as a JSON file to use with LangChain. To do so, click the \"Export\" button in the top right corner of the canvas, then in Python, you can load the flow with:\n\nfrom langflow import load_flow_from_json\n\nflow = load_flow_from_json(\"path/to/flow.json\")\nflow(\"Hey, have you heard of LangFlow?\")\n\nIt looks like langchain treats the entire flow as a single chain\n\n\nIt would be very slick if langflow implemented a raw text python script output option. I can see many advantages when starting with langflow to quickly build out an overall app structure and then generalizing from there.\nIn the UI one fairly simple add on could be to add completed projects/flows to the chain selection menu. That way you could use a chain in later flows","html":"Here is more info on this topic. This is largely taken from the langflow read.md
\nFrom langflow you build out a flow then, once you're done, you can export your flow as a JSON file to use with LangChain. To do so, click the \"Export\" button in the top right corner of the canvas, then in Python, you can load the flow with:
\nfrom langflow import load_flow_from_json
\nflow = load_flow_from_json(\"path/to/flow.json\")
flow(\"Hey, have you heard of LangFlow?\")
It looks like langchain treats the entire flow as a single chain
\nIt would be very slick if langflow implemented a raw text python script output option. I can see many advantages when starting with langflow to quickly build out an overall app structure and then generalizing from there.
In the UI one fairly simple add on could be to add completed projects/flows to the chain selection menu. That way you could use a chain in later flows
Any updates on this?
\n","updatedAt":"2025-01-26T16:16:34.413Z","author":{"_id":"6733dc6424b316be87f6931b","avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/no-auth/YEqaBZzEV5C2zG0F9ke7B.png","fullname":"Maurino","name":"RodriMauri001","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"isUserFollowing":false}},"numEdits":0,"identifiedLanguage":{"language":"en","probability":0.7419278025627136},"editors":["RodriMauri001"],"editorAvatarUrls":["https://cdn-avatars.huggingface.co/v1/production/uploads/no-auth/YEqaBZzEV5C2zG0F9ke7B.png"],"reactions":[],"isReport":false}},{"id":"679cd9b44cb9fb01ef390523","author":{"_id":"64e804ba24abf6be050837f2","avatarUrl":"/avatars/876b6a2ea9d114142069b04d67d4b16f.svg","fullname":"Hygor Xavier Araújo","name":"hygorxaraujo","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"isUserFollowing":false,"isOwner":false,"isOrgMember":false},"createdAt":"2025-01-31T14:09:56.000Z","type":"comment","data":{"edited":false,"hidden":false,"latest":{"raw":"I was also looking for how to export Python code from the flow, I didn't find an option to export everything together, but if you select each component there is a \"code\" option at the top left where you can see the code for the component:\n\n\n\n\n\nBut it seems to be mostly implemented using the langflow package, not only langchain.","html":"I was also looking for how to export Python code from the flow, I didn't find an option to export everything together, but if you select each component there is a \"code\" option at the top left where you can see the code for the component:
\n\n\nBut it seems to be mostly implemented using the langflow package, not only langchain.
\n","updatedAt":"2025-01-31T14:09:56.452Z","author":{"_id":"64e804ba24abf6be050837f2","avatarUrl":"/avatars/876b6a2ea9d114142069b04d67d4b16f.svg","fullname":"Hygor Xavier Araújo","name":"hygorxaraujo","type":"user","isPro":false,"isHf":false,"isHfAdmin":false,"isMod":false,"isUserFollowing":false}},"numEdits":0,"identifiedLanguage":{"language":"en","probability":0.8461534976959229},"editors":["hygorxaraujo"],"editorAvatarUrls":["/avatars/876b6a2ea9d114142069b04d67d4b16f.svg"],"reactions":[],"isReport":false}}],"pinned":false,"locked":false,"collection":"discussions","isPullRequest":false,"isReport":false},"primaryEmailConfirmed":false,"repo":{"name":"Langflow/Langflow","type":"space"},"discussionRole":0,"acceptLanguages":["*"],"hideComments":true,"repoDiscussionsLocked":false,"isDiscussionAuthor":false,"diffUnavailable":false}">Is it possible the generate a full python app from the instantiated components on the canvas, rather than just exporting a json file?
No, that's not the python code you would write with native python and langchain...
IS there any solution for convering to native langchain python code from lanflow json?
+1
+1
Here is more info on this topic. This is largely taken from the langflow read.md
From langflow you build out a flow then, once you're done, you can export your flow as a JSON file to use with LangChain. To do so, click the "Export" button in the top right corner of the canvas, then in Python, you can load the flow with:
from langflow import load_flow_from_json
flow = load_flow_from_json("path/to/flow.json")
flow("Hey, have you heard of LangFlow?")
It looks like langchain treats the entire flow as a single chain
It would be very slick if langflow implemented a raw text python script output option. I can see many advantages when starting with langflow to quickly build out an overall app structure and then generalizing from there.
In the UI one fairly simple add on could be to add completed projects/flows to the chain selection menu. That way you could use a chain in later flows
Any updates on this?
I was also looking for how to export Python code from the flow, I didn't find an option to export everything together, but if you select each component there is a "code" option at the top left where you can see the code for the component:
But it seems to be mostly implemented using the langflow package, not only langchain.