diff --git a/404.html b/404.html index e21b08291d..b22a246a9f 100644 --- a/404.html +++ b/404.html @@ -21,7 +21,7 @@ - + diff --git a/agents-overview.html b/agents-overview.html index c8596b5687..c0e40866d1 100644 --- a/agents-overview.html +++ b/agents-overview.html @@ -21,7 +21,7 @@ - + diff --git a/agents-tool-calling-agent-component.html b/agents-tool-calling-agent-component.html index d38f3a33c1..54cd176c35 100644 --- a/agents-tool-calling-agent-component.html +++ b/agents-tool-calling-agent-component.html @@ -21,7 +21,7 @@ - + diff --git a/api-reference-api-examples.html b/api-reference-api-examples.html index c981ebefd7..d7f614d6f6 100644 --- a/api-reference-api-examples.html +++ b/api-reference-api-examples.html @@ -21,7 +21,7 @@ - + diff --git a/api.html b/api.html index 46c28a1868..b33a1b665c 100644 --- a/api.html +++ b/api.html @@ -21,7 +21,7 @@ - + diff --git a/api/add-user.html b/api/add-user.html index adb814a9f8..a07e2074c0 100644 --- a/api/add-user.html +++ b/api/add-user.html @@ -21,7 +21,7 @@ - + diff --git a/api/auto-login.html b/api/auto-login.html index 61e7dd1ae9..8818c42c8a 100644 --- a/api/auto-login.html +++ b/api/auto-login.html @@ -21,7 +21,7 @@ - + diff --git a/api/build-flow.html b/api/build-flow.html index 4dff6ff5d4..803068ab24 100644 --- a/api/build-flow.html +++ b/api/build-flow.html @@ -21,7 +21,7 @@ - + diff --git a/api/build-public-tmp.html b/api/build-public-tmp.html index 5192d8913e..721a6b15ad 100644 --- a/api/build-public-tmp.html +++ b/api/build-public-tmp.html @@ -21,7 +21,7 @@ - + diff --git a/api/build-vertex-stream.html b/api/build-vertex-stream.html index a1e8d83420..c7e9e577fa 100644 --- a/api/build-vertex-stream.html +++ b/api/build-vertex-stream.html @@ -21,7 +21,7 @@ - + diff --git a/api/build-vertex.html b/api/build-vertex.html index 4a5c98c647..d41e53abc1 100644 --- a/api/build-vertex.html +++ b/api/build-vertex.html @@ -21,7 +21,7 @@ - + diff --git a/api/cancel-build.html b/api/cancel-build.html index f5a4efb3f8..c69861a5f5 100644 --- a/api/cancel-build.html +++ b/api/cancel-build.html @@ -21,7 +21,7 @@ - + diff --git a/api/check-if-store-has-api-key.html b/api/check-if-store-has-api-key.html index eb55264de3..a12398fef2 100644 --- a/api/check-if-store-has-api-key.html +++ b/api/check-if-store-has-api-key.html @@ -21,7 +21,7 @@ - + diff --git a/api/check-if-store-is-enabled.html b/api/check-if-store-is-enabled.html index bc6d120026..4261ef493f 100644 --- a/api/check-if-store-is-enabled.html +++ b/api/check-if-store-is-enabled.html @@ -21,7 +21,7 @@ - + diff --git a/api/create-api-key-route.html b/api/create-api-key-route.html index a3ef14802b..d1eb7ef51e 100644 --- a/api/create-api-key-route.html +++ b/api/create-api-key-route.html @@ -21,7 +21,7 @@ - + diff --git a/api/create-flow.html b/api/create-flow.html index a7a1599ff2..a8183b4de5 100644 --- a/api/create-flow.html +++ b/api/create-flow.html @@ -21,7 +21,7 @@ - + diff --git a/api/create-flows.html b/api/create-flows.html index 6c75f421c2..bd21b18b43 100644 --- a/api/create-flows.html +++ b/api/create-flows.html @@ -21,7 +21,7 @@ - + diff --git a/api/create-folder-redirect.html b/api/create-folder-redirect.html index 8506736585..11037a1df2 100644 --- a/api/create-folder-redirect.html +++ b/api/create-folder-redirect.html @@ -21,7 +21,7 @@ - + diff --git a/api/create-project.html b/api/create-project.html index b0f736b42d..3136562fe1 100644 --- a/api/create-project.html +++ b/api/create-project.html @@ -21,7 +21,7 @@ - + diff --git a/api/create-upload-file.html b/api/create-upload-file.html index f8eac83222..4e7fa0308a 100644 --- a/api/create-upload-file.html +++ b/api/create-upload-file.html @@ -21,7 +21,7 @@ - + diff --git a/api/create-variable.html b/api/create-variable.html index 344dbcd5c2..77af19e7ec 100644 --- a/api/create-variable.html +++ b/api/create-variable.html @@ -21,7 +21,7 @@ - + diff --git a/api/custom-component-update.html b/api/custom-component-update.html index 7bb5d3d7de..d1d3c4fb2e 100644 --- a/api/custom-component-update.html +++ b/api/custom-component-update.html @@ -21,7 +21,7 @@ - + diff --git a/api/custom-component.html b/api/custom-component.html index 9e29b46d48..67528bdf47 100644 --- a/api/custom-component.html +++ b/api/custom-component.html @@ -21,7 +21,7 @@ - + diff --git a/api/delete-all-files-1.html b/api/delete-all-files-1.html index 43e455d3de..dd18090a2f 100644 --- a/api/delete-all-files-1.html +++ b/api/delete-all-files-1.html @@ -21,7 +21,7 @@ - + diff --git a/api/delete-all-files.html b/api/delete-all-files.html index f024ac4683..1cbe7f0aa1 100644 --- a/api/delete-all-files.html +++ b/api/delete-all-files.html @@ -21,7 +21,7 @@ - + diff --git a/api/delete-api-key-route.html b/api/delete-api-key-route.html index 40cb25d272..2828af0337 100644 --- a/api/delete-api-key-route.html +++ b/api/delete-api-key-route.html @@ -21,7 +21,7 @@ - + diff --git a/api/delete-file-1.html b/api/delete-file-1.html index 82bc2810d9..20793bc096 100644 --- a/api/delete-file-1.html +++ b/api/delete-file-1.html @@ -21,7 +21,7 @@ - + diff --git a/api/delete-file.html b/api/delete-file.html index bf4be235af..cf2cc97754 100644 --- a/api/delete-file.html +++ b/api/delete-file.html @@ -21,7 +21,7 @@ - + diff --git a/api/delete-flow.html b/api/delete-flow.html index 71da4617e0..904479a668 100644 --- a/api/delete-flow.html +++ b/api/delete-flow.html @@ -21,7 +21,7 @@ - + diff --git a/api/delete-folder-redirect.html b/api/delete-folder-redirect.html index aba112cd36..4e23c30fca 100644 --- a/api/delete-folder-redirect.html +++ b/api/delete-folder-redirect.html @@ -21,7 +21,7 @@ - + diff --git a/api/delete-messages-session.html b/api/delete-messages-session.html index d17397d671..765a17fa54 100644 --- a/api/delete-messages-session.html +++ b/api/delete-messages-session.html @@ -21,7 +21,7 @@ - + diff --git a/api/delete-messages.html b/api/delete-messages.html index 5a1d99d0ac..8337fa5eae 100644 --- a/api/delete-messages.html +++ b/api/delete-messages.html @@ -21,7 +21,7 @@ - + diff --git a/api/delete-multiple-flows.html b/api/delete-multiple-flows.html index a738a3cc83..4f3bcd8727 100644 --- a/api/delete-multiple-flows.html +++ b/api/delete-multiple-flows.html @@ -21,7 +21,7 @@ - + diff --git a/api/delete-project.html b/api/delete-project.html index 64b7dc7b06..250f7a1342 100644 --- a/api/delete-project.html +++ b/api/delete-project.html @@ -21,7 +21,7 @@ - + diff --git a/api/delete-user.html b/api/delete-user.html index f6801e817f..9586aa0a5d 100644 --- a/api/delete-user.html +++ b/api/delete-user.html @@ -21,7 +21,7 @@ - + diff --git a/api/delete-variable.html b/api/delete-variable.html index 5b89df113d..aefc114965 100644 --- a/api/delete-variable.html +++ b/api/delete-variable.html @@ -21,7 +21,7 @@ - + diff --git a/api/delete-vertex-builds.html b/api/delete-vertex-builds.html index d81d2b0bb5..99ae51edc7 100644 --- a/api/delete-vertex-builds.html +++ b/api/delete-vertex-builds.html @@ -21,7 +21,7 @@ - + diff --git a/api/download-component.html b/api/download-component.html index 51b09e4bdf..91cd4f25aa 100644 --- a/api/download-component.html +++ b/api/download-component.html @@ -21,7 +21,7 @@ - + diff --git a/api/download-file-1.html b/api/download-file-1.html index fd6df27273..721a231078 100644 --- a/api/download-file-1.html +++ b/api/download-file-1.html @@ -21,7 +21,7 @@ - + diff --git a/api/download-file-2.html b/api/download-file-2.html index f9b69af2a4..4fe7fbcc19 100644 --- a/api/download-file-2.html +++ b/api/download-file-2.html @@ -21,7 +21,7 @@ - + diff --git a/api/download-file-redirect.html b/api/download-file-redirect.html index e3aea3c617..f4a1633303 100644 --- a/api/download-file-redirect.html +++ b/api/download-file-redirect.html @@ -21,7 +21,7 @@ - + diff --git a/api/download-file.html b/api/download-file.html index 0d2d627df3..1b69f320ce 100644 --- a/api/download-file.html +++ b/api/download-file.html @@ -21,7 +21,7 @@ - + diff --git a/api/download-image.html b/api/download-image.html index 25253b6cb8..84e15ed963 100644 --- a/api/download-image.html +++ b/api/download-image.html @@ -21,7 +21,7 @@ - + diff --git a/api/download-multiple-file.html b/api/download-multiple-file.html index 78de3b752a..6b0d716665 100644 --- a/api/download-multiple-file.html +++ b/api/download-multiple-file.html @@ -21,7 +21,7 @@ - + diff --git a/api/download-profile-picture.html b/api/download-profile-picture.html index 1a57775f37..148190ce01 100644 --- a/api/download-profile-picture.html +++ b/api/download-profile-picture.html @@ -21,7 +21,7 @@ - + diff --git a/api/edit-file-name.html b/api/edit-file-name.html index cf3e9a0003..11a26b2a78 100644 --- a/api/edit-file-name.html +++ b/api/edit-file-name.html @@ -21,7 +21,7 @@ - + diff --git a/api/experimental-run-flow.html b/api/experimental-run-flow.html index 6ad0d92c64..7726b2ab0b 100644 --- a/api/experimental-run-flow.html +++ b/api/experimental-run-flow.html @@ -21,7 +21,7 @@ - + diff --git a/api/get-all.html b/api/get-all.html index 8f5933aba8..ce6f613015 100644 --- a/api/get-all.html +++ b/api/get-all.html @@ -21,7 +21,7 @@ - + diff --git a/api/get-api-keys-route.html b/api/get-api-keys-route.html index 456d77d868..aebe93c895 100644 --- a/api/get-api-keys-route.html +++ b/api/get-api-keys-route.html @@ -21,7 +21,7 @@ - + diff --git a/api/get-build-events.html b/api/get-build-events.html index d0361107b3..f14a7a5e37 100644 --- a/api/get-build-events.html +++ b/api/get-build-events.html @@ -21,7 +21,7 @@ - + diff --git a/api/get-components.html b/api/get-components.html index 0e0c1db58f..1e5bee24ce 100644 --- a/api/get-components.html +++ b/api/get-components.html @@ -21,7 +21,7 @@ - + diff --git a/api/get-config.html b/api/get-config.html index 6eb4bae981..8dd65e6942 100644 --- a/api/get-config.html +++ b/api/get-config.html @@ -21,7 +21,7 @@ - + diff --git a/api/get-elevenlabs-voice-ids.html b/api/get-elevenlabs-voice-ids.html index 95cd0031fe..d15f0f36c3 100644 --- a/api/get-elevenlabs-voice-ids.html +++ b/api/get-elevenlabs-voice-ids.html @@ -21,7 +21,7 @@ - + diff --git a/api/get-list-of-components-liked-by-user.html b/api/get-list-of-components-liked-by-user.html index a34c9bcd84..db0307ba7f 100644 --- a/api/get-list-of-components-liked-by-user.html +++ b/api/get-list-of-components-liked-by-user.html @@ -21,7 +21,7 @@ - + diff --git a/api/get-messages.html b/api/get-messages.html index 12d3b54073..fb97cdf9e6 100644 --- a/api/get-messages.html +++ b/api/get-messages.html @@ -21,7 +21,7 @@ - + diff --git a/api/get-starter-projects.html b/api/get-starter-projects.html index 059a07e74e..6fcb47ee40 100644 --- a/api/get-starter-projects.html +++ b/api/get-starter-projects.html @@ -21,7 +21,7 @@ - + diff --git a/api/get-tags.html b/api/get-tags.html index 4f9eaa6e6d..6de794d4dd 100644 --- a/api/get-tags.html +++ b/api/get-tags.html @@ -21,7 +21,7 @@ - + diff --git a/api/get-task-status.html b/api/get-task-status.html index ea6f3d3ea9..63d4db4bec 100644 --- a/api/get-task-status.html +++ b/api/get-task-status.html @@ -21,7 +21,7 @@ - + diff --git a/api/get-transactions.html b/api/get-transactions.html index c2fff56866..6bd18b2764 100644 --- a/api/get-transactions.html +++ b/api/get-transactions.html @@ -21,7 +21,7 @@ - + diff --git a/api/get-version.html b/api/get-version.html index a0c46bd23c..c45f6ebcf7 100644 --- a/api/get-version.html +++ b/api/get-version.html @@ -21,7 +21,7 @@ - + diff --git a/api/get-vertex-builds.html b/api/get-vertex-builds.html index 1be7001d29..3355988f54 100644 --- a/api/get-vertex-builds.html +++ b/api/get-vertex-builds.html @@ -21,7 +21,7 @@ - + diff --git a/api/handle-messages-1.html b/api/handle-messages-1.html index 4a0c5daf9a..f68c906166 100644 --- a/api/handle-messages-1.html +++ b/api/handle-messages-1.html @@ -21,7 +21,7 @@ - + diff --git a/api/handle-messages.html b/api/handle-messages.html index 1d12a0f293..a04e06d531 100644 --- a/api/handle-messages.html +++ b/api/handle-messages.html @@ -21,7 +21,7 @@ - + diff --git a/api/handle-project-messages-with-slash.html b/api/handle-project-messages-with-slash.html index f77223e149..187fc79807 100644 --- a/api/handle-project-messages-with-slash.html +++ b/api/handle-project-messages-with-slash.html @@ -21,7 +21,7 @@ - + diff --git a/api/handle-project-messages.html b/api/handle-project-messages.html index 36c01937b3..9a6f5e351e 100644 --- a/api/handle-project-messages.html +++ b/api/handle-project-messages.html @@ -21,7 +21,7 @@ - + diff --git a/api/handle-project-sse.html b/api/handle-project-sse.html index 87418ad330..11d02c55c3 100644 --- a/api/handle-project-sse.html +++ b/api/handle-project-sse.html @@ -21,7 +21,7 @@ - + diff --git a/api/handle-sse-1.html b/api/handle-sse-1.html index cce875548e..07c0b06a31 100644 --- a/api/handle-sse-1.html +++ b/api/handle-sse-1.html @@ -21,7 +21,7 @@ - + diff --git a/api/handle-sse.html b/api/handle-sse.html index 6d80f9b4e3..3d8a6d465a 100644 --- a/api/handle-sse.html +++ b/api/handle-sse.html @@ -21,7 +21,7 @@ - + diff --git a/api/health-check.html b/api/health-check.html index ee915cf2c1..709b30f54b 100644 --- a/api/health-check.html +++ b/api/health-check.html @@ -21,7 +21,7 @@ - + diff --git a/api/health.html b/api/health.html index b8466c4b92..ed08ec22ca 100644 --- a/api/health.html +++ b/api/health.html @@ -21,7 +21,7 @@ - + diff --git a/api/like-component.html b/api/like-component.html index 091d17c4ec..b5a3c36c95 100644 --- a/api/like-component.html +++ b/api/like-component.html @@ -21,7 +21,7 @@ - + diff --git a/api/list-files-1.html b/api/list-files-1.html index 45968d5275..afd715dfea 100644 --- a/api/list-files-1.html +++ b/api/list-files-1.html @@ -21,7 +21,7 @@ - + diff --git a/api/list-files-2.html b/api/list-files-2.html index 7874ae08ea..c181df2d1b 100644 --- a/api/list-files-2.html +++ b/api/list-files-2.html @@ -21,7 +21,7 @@ - + diff --git a/api/list-files.html b/api/list-files.html index 713d3017d8..1624c26859 100644 --- a/api/list-files.html +++ b/api/list-files.html @@ -21,7 +21,7 @@ - + diff --git a/api/list-profile-pictures.html b/api/list-profile-pictures.html index 3c288e5dc1..d32cd22a3e 100644 --- a/api/list-profile-pictures.html +++ b/api/list-profile-pictures.html @@ -21,7 +21,7 @@ - + diff --git a/api/list-project-tools.html b/api/list-project-tools.html index 2ebc33eea8..c67b221e21 100644 --- a/api/list-project-tools.html +++ b/api/list-project-tools.html @@ -21,7 +21,7 @@ - + diff --git a/api/login-to-get-access-token.html b/api/login-to-get-access-token.html index 7378d3d171..f5bafd55a1 100644 --- a/api/login-to-get-access-token.html +++ b/api/login-to-get-access-token.html @@ -21,7 +21,7 @@ - + diff --git a/api/logout.html b/api/logout.html index a7a67ae166..5c7f61f4fb 100644 --- a/api/logout.html +++ b/api/logout.html @@ -21,7 +21,7 @@ - + diff --git a/api/logs.html b/api/logs.html index 10d3587f6b..30f487f77a 100644 --- a/api/logs.html +++ b/api/logs.html @@ -21,7 +21,7 @@ - + diff --git a/api/patch-user.html b/api/patch-user.html index 1303d7fa5a..d2d4aa81f1 100644 --- a/api/patch-user.html +++ b/api/patch-user.html @@ -21,7 +21,7 @@ - + diff --git a/api/post-validate-code.html b/api/post-validate-code.html index cfac5b3fe1..f2027a1cb6 100644 --- a/api/post-validate-code.html +++ b/api/post-validate-code.html @@ -21,7 +21,7 @@ - + diff --git a/api/post-validate-prompt.html b/api/post-validate-prompt.html index 1beb28575f..9ec8ea2411 100644 --- a/api/post-validate-prompt.html +++ b/api/post-validate-prompt.html @@ -21,7 +21,7 @@ - + diff --git a/api/process-1.html b/api/process-1.html index 3cc1758d46..67a79bb7cf 100644 --- a/api/process-1.html +++ b/api/process-1.html @@ -21,7 +21,7 @@ - + diff --git a/api/process.html b/api/process.html index faf6be22fc..42243bfafd 100644 --- a/api/process.html +++ b/api/process.html @@ -21,7 +21,7 @@ - + diff --git a/api/read-all-users.html b/api/read-all-users.html index a26542bed4..901f87a6a2 100644 --- a/api/read-all-users.html +++ b/api/read-all-users.html @@ -21,7 +21,7 @@ - + diff --git a/api/read-basic-examples.html b/api/read-basic-examples.html index 37a6f2f3e1..71bba74929 100644 --- a/api/read-basic-examples.html +++ b/api/read-basic-examples.html @@ -21,7 +21,7 @@ - + diff --git a/api/read-current-user.html b/api/read-current-user.html index 2754789342..eef7f2716a 100644 --- a/api/read-current-user.html +++ b/api/read-current-user.html @@ -21,7 +21,7 @@ - + diff --git a/api/read-flow.html b/api/read-flow.html index 92aef41c75..b989c6af16 100644 --- a/api/read-flow.html +++ b/api/read-flow.html @@ -21,7 +21,7 @@ - + diff --git a/api/read-flows.html b/api/read-flows.html index 2d072c64dc..a7b532cb9a 100644 --- a/api/read-flows.html +++ b/api/read-flows.html @@ -21,7 +21,7 @@ - + diff --git a/api/read-folder-redirect.html b/api/read-folder-redirect.html index 75cd2aa2fd..6e0452acce 100644 --- a/api/read-folder-redirect.html +++ b/api/read-folder-redirect.html @@ -21,7 +21,7 @@ - + diff --git a/api/read-folders-redirect.html b/api/read-folders-redirect.html index b00d5fbe9d..28f4b4049f 100644 --- a/api/read-folders-redirect.html +++ b/api/read-folders-redirect.html @@ -21,7 +21,7 @@ - + diff --git a/api/read-project.html b/api/read-project.html index 0d93a8f40c..b8f1f02611 100644 --- a/api/read-project.html +++ b/api/read-project.html @@ -21,7 +21,7 @@ - + diff --git a/api/read-projects.html b/api/read-projects.html index 2386b2b04b..d8b7457ad3 100644 --- a/api/read-projects.html +++ b/api/read-projects.html @@ -21,7 +21,7 @@ - + diff --git a/api/read-public-flow.html b/api/read-public-flow.html index 7600d493c1..9ee4d69733 100644 --- a/api/read-public-flow.html +++ b/api/read-public-flow.html @@ -21,7 +21,7 @@ - + diff --git a/api/read-variables.html b/api/read-variables.html index 16d25fad9e..bc95292ce3 100644 --- a/api/read-variables.html +++ b/api/read-variables.html @@ -21,7 +21,7 @@ - + diff --git a/api/refresh-token.html b/api/refresh-token.html index c8a952b407..e997391f51 100644 --- a/api/refresh-token.html +++ b/api/refresh-token.html @@ -21,7 +21,7 @@ - + diff --git a/api/reset-password.html b/api/reset-password.html index c0eeedbbe1..17ebbebfd6 100644 --- a/api/reset-password.html +++ b/api/reset-password.html @@ -21,7 +21,7 @@ - + diff --git a/api/retrieve-vertices-order.html b/api/retrieve-vertices-order.html index 27a716e347..05644d14b5 100644 --- a/api/retrieve-vertices-order.html +++ b/api/retrieve-vertices-order.html @@ -21,7 +21,7 @@ - + diff --git a/api/save-store-api-key.html b/api/save-store-api-key.html index a01441ca0b..7ef7e8896f 100644 --- a/api/save-store-api-key.html +++ b/api/save-store-api-key.html @@ -21,7 +21,7 @@ - + diff --git a/api/share-component.html b/api/share-component.html index 2f0675907a..940d0567f9 100644 --- a/api/share-component.html +++ b/api/share-component.html @@ -21,7 +21,7 @@ - + diff --git a/api/simplified-run-flow.html b/api/simplified-run-flow.html index f0e4d3a8ea..ce9ef447d0 100644 --- a/api/simplified-run-flow.html +++ b/api/simplified-run-flow.html @@ -21,7 +21,7 @@ - + diff --git a/api/stream-logs.html b/api/stream-logs.html index c3df4d0b0b..6e1c5edd14 100644 --- a/api/stream-logs.html +++ b/api/stream-logs.html @@ -21,7 +21,7 @@ - + diff --git a/api/update-flow.html b/api/update-flow.html index 933126dd4d..915e1b9888 100644 --- a/api/update-flow.html +++ b/api/update-flow.html @@ -21,7 +21,7 @@ - + diff --git a/api/update-folder-redirect.html b/api/update-folder-redirect.html index c05d3ef986..b73a8b1d3c 100644 --- a/api/update-folder-redirect.html +++ b/api/update-folder-redirect.html @@ -21,7 +21,7 @@ - + diff --git a/api/update-message.html b/api/update-message.html index 420b25886d..378db6367c 100644 --- a/api/update-message.html +++ b/api/update-message.html @@ -21,7 +21,7 @@ - + diff --git a/api/update-project-mcp-settings.html b/api/update-project-mcp-settings.html index d21bbe49a1..c25f3eea51 100644 --- a/api/update-project-mcp-settings.html +++ b/api/update-project-mcp-settings.html @@ -21,7 +21,7 @@ - + diff --git a/api/update-project.html b/api/update-project.html index 926457aa23..72d2c9a6c8 100644 --- a/api/update-project.html +++ b/api/update-project.html @@ -21,7 +21,7 @@ - + diff --git a/api/update-session-id.html b/api/update-session-id.html index d984402a5b..b09691a3da 100644 --- a/api/update-session-id.html +++ b/api/update-session-id.html @@ -21,7 +21,7 @@ - + diff --git a/api/update-shared-component.html b/api/update-shared-component.html index 14fb5ad321..8ac16dafa0 100644 --- a/api/update-shared-component.html +++ b/api/update-shared-component.html @@ -21,7 +21,7 @@ - + diff --git a/api/update-variable.html b/api/update-variable.html index 624d18f20f..77fc32f2e8 100644 --- a/api/update-variable.html +++ b/api/update-variable.html @@ -21,7 +21,7 @@ - + diff --git a/api/upload-file-1.html b/api/upload-file-1.html index 70ab5f6207..262c8e8c6a 100644 --- a/api/upload-file-1.html +++ b/api/upload-file-1.html @@ -21,7 +21,7 @@ - + diff --git a/api/upload-file-2.html b/api/upload-file-2.html index 507717eb7d..d885ae643c 100644 --- a/api/upload-file-2.html +++ b/api/upload-file-2.html @@ -21,7 +21,7 @@ - + diff --git a/api/upload-file-redirect.html b/api/upload-file-redirect.html index 2b7a20ed0f..19f12536a3 100644 --- a/api/upload-file-redirect.html +++ b/api/upload-file-redirect.html @@ -21,7 +21,7 @@ - + diff --git a/api/upload-file.html b/api/upload-file.html index 9e502188dc..99e8b805fd 100644 --- a/api/upload-file.html +++ b/api/upload-file.html @@ -21,7 +21,7 @@ - + diff --git a/api/upload-user-file-1.html b/api/upload-user-file-1.html index 4d5b0fe535..26f9779a0c 100644 --- a/api/upload-user-file-1.html +++ b/api/upload-user-file-1.html @@ -21,7 +21,7 @@ - + diff --git a/api/upload-user-file.html b/api/upload-user-file.html index 828ae98910..7b01d96d88 100644 --- a/api/upload-user-file.html +++ b/api/upload-user-file.html @@ -21,7 +21,7 @@ - + diff --git a/api/webhook-run-flow.html b/api/webhook-run-flow.html index 0819d9600b..211d0aeb53 100644 --- a/api/webhook-run-flow.html +++ b/api/webhook-run-flow.html @@ -21,7 +21,7 @@ - + diff --git a/assets/js/22dd74f7.0ccb1e3f.js b/assets/js/22dd74f7.0ccb1e3f.js deleted file mode 100644 index ebaf13dac9..0000000000 --- a/assets/js/22dd74f7.0ccb1e3f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[1567],{55226:e=>{e.exports=JSON.parse('{"version":{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"docs":[{"type":"link","label":"Welcome to Langflow","href":"/","docId":"Get-Started/welcome-to-langflow","unlisted":false},{"type":"category","label":"Get started","items":[{"type":"link","label":"Install Langflow","href":"/get-started-installation","docId":"Get-Started/get-started-installation","unlisted":false},{"type":"link","label":"Quickstart","href":"/get-started-quickstart","docId":"Get-Started/get-started-quickstart","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Starter projects","items":[{"type":"link","label":"Basic prompting","href":"/starter-projects-basic-prompting","docId":"Starter-Projects/starter-projects-basic-prompting","unlisted":false},{"type":"link","label":"Vector store RAG","href":"/starter-projects-vector-store-rag","docId":"Starter-Projects/starter-projects-vector-store-rag","unlisted":false},{"type":"link","label":"Simple agent","href":"/starter-projects-simple-agent","docId":"Starter-Projects/starter-projects-simple-agent","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Sample flows","items":[{"type":"link","label":"Blog writer","href":"/blog-writer","docId":"Sample-Flows/blog-writer","unlisted":false},{"type":"link","label":"Document QA","href":"/document-qa","docId":"Sample-Flows/document-qa","unlisted":false},{"type":"link","label":"Memory chatbot","href":"/memory-chatbot","docId":"Sample-Flows/memory-chatbot","unlisted":false},{"type":"link","label":"Sequential tasks agent","href":"/sequential-agent","docId":"Sample-Flows/sequential-agent","unlisted":false},{"type":"link","label":"Travel planning agent","href":"/travel-planning-agent","docId":"Sample-Flows/travel-planning-agent","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Concepts","items":[{"type":"link","label":"Langflow overview","href":"/concepts-overview","docId":"Concepts/concepts-overview","unlisted":false},{"type":"link","label":"Playground","href":"/concepts-playground","docId":"Concepts/concepts-playground","unlisted":false},{"type":"link","label":"Components","href":"/concepts-components","docId":"Concepts/concepts-components","unlisted":false},{"type":"link","label":"Flows","href":"/concepts-flows","docId":"Concepts/concepts-flows","unlisted":false},{"type":"link","label":"Langflow objects","href":"/concepts-objects","docId":"Concepts/concepts-objects","unlisted":false},{"type":"link","label":"Publish flows","href":"/concepts-publish","docId":"Concepts/concepts-publish","unlisted":false},{"type":"link","label":"Model Context Protocol (MCP) server","href":"/mcp-server","docId":"Concepts/mcp-server","unlisted":false},{"type":"link","label":"Manage files","href":"/concepts-file-management","docId":"Concepts/concepts-file-management","unlisted":false},{"type":"link","label":"Voice mode","href":"/concepts-voice-mode","docId":"Concepts/concepts-voice-mode","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Components","items":[{"type":"link","label":"Agents","href":"/components-agents","docId":"Components/components-agents","unlisted":false},{"type":"link","label":"Bundles","href":"/components-bundle-components","docId":"Components/components-bundles","unlisted":false},{"type":"link","label":"Create custom Python components","href":"/components-custom-components","docId":"Components/components-custom-components","unlisted":false},{"type":"link","label":"Data","href":"/components-data","docId":"Components/components-data","unlisted":false},{"type":"link","label":"Embeddings","href":"/components-embedding-models","docId":"Components/components-embedding-models","unlisted":false},{"type":"link","label":"Helpers","href":"/components-helpers","docId":"Components/components-helpers","unlisted":false},{"type":"link","label":"Inputs and outputs","href":"/components-io","docId":"Components/components-io","unlisted":false},{"type":"link","label":"Loaders","href":"/components-loaders","docId":"Components/components-loaders","unlisted":false},{"type":"link","label":"Logic","href":"/components-logic","docId":"Components/components-logic","unlisted":false},{"type":"link","label":"Memories","href":"/components-memories","docId":"Components/components-memories","unlisted":false},{"type":"link","label":"Models","href":"/components-models","docId":"Components/components-models","unlisted":false},{"type":"link","label":"Processing","href":"/components-processing","docId":"Components/components-processing","unlisted":false},{"type":"link","label":"Prompts","href":"/components-prompts","docId":"Components/components-prompts","unlisted":false},{"type":"link","label":"Tools","href":"/components-tools","docId":"Components/components-tools","unlisted":false},{"type":"link","label":"Vector stores","href":"/components-vector-stores","docId":"Components/components-vector-stores","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Agents","items":[{"type":"link","label":"Agents overview","href":"/agents-overview","docId":"Agents/agents-overview","unlisted":false},{"type":"link","label":"Create a problem-solving agent","href":"/agents-tool-calling-agent-component","docId":"Agents/agent-tool-calling-agent-component","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Configuration","items":[{"type":"link","label":"API keys","href":"/configuration-api-keys","docId":"Configuration/configuration-api-keys","unlisted":false},{"type":"link","label":"Authentication","href":"/configuration-authentication","docId":"Configuration/configuration-authentication","unlisted":false},{"type":"link","label":"Langflow CLI","href":"/configuration-cli","docId":"Configuration/configuration-cli","unlisted":false},{"type":"link","label":"Configure an external PostgreSQL database","href":"/configuration-custom-database","docId":"Configuration/configuration-custom-database","unlisted":false},{"type":"link","label":"Global variables","href":"/configuration-global-variables","docId":"Configuration/configuration-global-variables","unlisted":false},{"type":"link","label":"Environment variables","href":"/environment-variables","docId":"Configuration/environment-variables","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Develop","items":[{"type":"link","label":"About developing and configuring Langflow applications","href":"/develop-overview","docId":"Develop/develop-overview","unlisted":false},{"type":"link","label":"Develop an application in Langflow","href":"/develop-application","docId":"Develop/develop-application","unlisted":false},{"type":"link","label":"Install custom dependencies","href":"/install-custom-dependencies","docId":"Develop/install-custom-dependencies","unlisted":false},{"type":"link","label":"Memory management options","href":"/memory","docId":"Develop/memory","unlisted":false},{"type":"link","label":"Use session ID to manage communication between components","href":"/session-id","docId":"Develop/session-id","unlisted":false},{"type":"link","label":"Logging options in Langflow","href":"/logging","docId":"Develop/logging","unlisted":false},{"type":"link","label":"Trigger flows with webhooks","href":"/webhook","docId":"Develop/webhook","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Deployment","items":[{"type":"link","label":"Deployment overview","href":"/deployment-overview","docId":"Deployment/deployment-overview","unlisted":false},{"type":"link","label":"Docker","href":"/deployment-docker","docId":"Deployment/deployment-docker","unlisted":false},{"type":"category","label":"Kubernetes","items":[{"type":"link","label":"Langflow architecture and best practices","href":"/deployment-prod-best-practices","docId":"Deployment/deployment-prod-best-practices","unlisted":false},{"type":"link","label":"Deploy in development","href":"/deployment-kubernetes-dev","docId":"Deployment/deployment-kubernetes-dev","unlisted":false},{"type":"link","label":"Deploy in production","href":"/deployment-kubernetes-prod","docId":"Deployment/deployment-kubernetes-prod","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"link","label":"Google Cloud Platform","href":"/deployment-gcp","docId":"Deployment/deployment-gcp","unlisted":false},{"type":"link","label":"Hugging Face Spaces","href":"/deployment-hugging-face-spaces","docId":"Deployment/deployment-hugging-face-spaces","unlisted":false},{"type":"link","label":"Railway","href":"/deployment-railway","docId":"Deployment/deployment-railway","unlisted":false},{"type":"link","label":"Render","href":"/deployment-render","docId":"Deployment/deployment-render","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"API reference","items":[{"type":"link","label":"API documentation","href":"/api"},{"type":"link","label":"API examples","href":"/api-reference-api-examples","docId":"API-Reference/api-reference-api-examples","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Integrations","items":[{"type":"link","label":"Apify","href":"/integrations-apify","docId":"Integrations/Apify/integrations-apify","unlisted":false},{"type":"link","label":"Arize","href":"/integrations-arize","docId":"Integrations/Arize/integrations-arize","unlisted":false},{"type":"link","label":"AssemblyAI","href":"/integrations-assemblyai","docId":"Integrations/integrations-assemblyai","unlisted":false},{"type":"link","label":"Composio","href":"/integrations-composio","docId":"Integrations/Composio/integrations-composio","unlisted":false},{"type":"link","label":"Astra DB MCP server","href":"/mcp-component-astra","docId":"Integrations/mcp-component-astra","unlisted":false},{"type":"category","label":"Google","items":[{"type":"link","label":"Integrate Google OAuth with Langflow","href":"/integrations-setup-google-oauth-langflow","docId":"Integrations/Google/integrations-setup-google-oauth-langflow","unlisted":false},{"type":"link","label":"Integrate Google Cloud Vertex AI with Langflow","href":"/integrations-setup-google-cloud-vertex-ai-langflow","docId":"Integrations/Google/integrations-setup-google-cloud-vertex-ai-langflow","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"link","label":"Langfuse","href":"/integrations-langfuse","docId":"Integrations/integrations-langfuse","unlisted":false},{"type":"link","label":"LangSmith","href":"/integrations-langsmith","docId":"Integrations/integrations-langsmith","unlisted":false},{"type":"link","label":"LangWatch","href":"/integrations-langwatch","docId":"Integrations/integrations-langwatch","unlisted":false},{"type":"link","label":"Opik","href":"/integrations-opik","docId":"Integrations/integrations-opik","unlisted":false},{"type":"category","label":"Notion","items":[{"type":"link","label":"Setup","href":"/integrations/notion/setup","docId":"Integrations/Notion/integrations-notion","unlisted":false},{"type":"link","label":"Notion Conversational Agent","href":"/integrations/notion/notion-agent-conversational","docId":"Integrations/Notion/notion-agent-conversational","unlisted":false},{"type":"link","label":"Notion Meeting Notes Agent","href":"/integrations/notion/notion-agent-meeting-notes","docId":"Integrations/Notion/notion-agent-meeting-notes","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"NVIDIA","items":[{"type":"link","label":"Integrate NVIDIA Retriever Extraction with Langflow","href":"/integrations-nvidia-ingest","docId":"Integrations/Nvidia/integrations-nvidia-ingest","unlisted":false},{"type":"link","label":"Integrate NVIDIA NIMs with Langflow","href":"/integrations-nvidia-ingest-wsl2","docId":"Integrations/Nvidia/integrations-nvidia-nim-wsl2","unlisted":false}],"collapsed":true,"collapsible":true}],"collapsed":true,"collapsible":true},{"type":"category","label":"Contributing","items":[{"type":"link","label":"Join the Langflow community","href":"/contributing-community","docId":"Contributing/contributing-community","unlisted":false},{"type":"link","label":"Contribute components","href":"/contributing-components","docId":"Contributing/contributing-components","unlisted":false},{"type":"link","label":"Contribute component tests","href":"/contributing-component-tests","docId":"Contributing/contributing-component-tests","unlisted":false},{"type":"link","label":"Ask for help on the Discussions board","href":"/contributing-github-discussions","docId":"Contributing/contributing-github-discussion-board","unlisted":false},{"type":"link","label":"Request an enhancement or report a bug","href":"/contributing-github-issues","docId":"Contributing/contributing-github-issues","unlisted":false},{"type":"link","label":"Contribute to Langflow","href":"/contributing-how-to-contribute","docId":"Contributing/contributing-how-to-contribute","unlisted":false},{"type":"link","label":"Telemetry","href":"/contributing-telemetry","docId":"Contributing/contributing-telemetry","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Changelog","items":[{"type":"link","label":"Changelog","href":"https://github.com/langflow-ai/langflow/releases/latest"}],"collapsed":true,"collapsible":true},{"type":"category","label":"Support","items":[{"type":"link","label":"Luna for Langflow","href":"/luna-for-langflow","docId":"Support/luna-for-langflow","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"html","className":"sidebar-ad","value":"\\n \\n \\n
\\n Use Langflow in the cloud\\n Sign up for DataStax Langflow\\n
\\n
\\n "}]},"docs":{"Agents/agent-tool-calling-agent-component":{"id":"Agents/agent-tool-calling-agent-component","title":"Create a problem-solving agent","description":"Developing agents in Langchain is complex.","sidebar":"docs"},"Agents/agents-overview":{"id":"Agents/agents-overview","title":"Agents overview","description":"Agents are AI systems that use LLMs as a brain to analyze problems and select external tools.","sidebar":"docs"},"API-Reference/api-reference-api-examples":{"id":"API-Reference/api-reference-api-examples","title":"API examples","description":"This page provides examples and practices for managing Langflow using the Langflow API.","sidebar":"docs"},"Components/components-agents":{"id":"Components/components-agents","title":"Agents","description":"Agent components define the behavior and capabilities of AI agents in your flow.","sidebar":"docs"},"Components/components-bundles":{"id":"Components/components-bundles","title":"Bundles","description":"Bundles are third-party components grouped by provider.","sidebar":"docs"},"Components/components-custom-components":{"id":"Components/components-custom-components","title":"Create custom Python components","description":"Custom components are created within Langflow and extend the platform\'s functionality with custom, reusable Python code.","sidebar":"docs"},"Components/components-data":{"id":"Components/components-data","title":"Data","description":"Data components load data from a source into your flow.","sidebar":"docs"},"Components/components-embedding-models":{"id":"Components/components-embedding-models","title":"Embeddings","description":"Embeddings models convert text into numerical vectors. These embeddings capture semantic meaning of the input text, and allow LLMs to understand context.","sidebar":"docs"},"Components/components-helpers":{"id":"Components/components-helpers","title":"Helpers","description":"Helper components provide utility functions to help manage data, tasks, and other components in your flow.","sidebar":"docs"},"Components/components-io":{"id":"Components/components-io","title":"Inputs and outputs","description":"Input and output components define where data enters and exits your flow.","sidebar":"docs"},"Components/components-loaders":{"id":"Components/components-loaders","title":"Loaders","description":"As of Langflow 1.1, loader components are now found in the Components menu under Bundles.","sidebar":"docs"},"Components/components-logic":{"id":"Components/components-logic","title":"Logic","description":"Logic components provide functionalities for routing, conditional processing, and flow management.","sidebar":"docs"},"Components/components-memories":{"id":"Components/components-memories","title":"Memories","description":"Memory components store and retrieve chat messages by session_id.","sidebar":"docs"},"Components/components-models":{"id":"Components/components-models","title":"Models","description":"Model components generate text using large language models.","sidebar":"docs"},"Components/components-processing":{"id":"Components/components-processing","title":"Processing","description":"Processing components process and transform data within a flow.","sidebar":"docs"},"Components/components-prompts":{"id":"Components/components-prompts","title":"Prompts","description":"A prompt is a structured input to a language model that instructs the model how to handle user inputs and variables.","sidebar":"docs"},"Components/components-tools":{"id":"Components/components-tools","title":"Tools","description":"Tools are typically connected to agent components at the Tools port. Agents use LLMs as a reasoning engine to decide which of the connected tool components to use to solve a problem.","sidebar":"docs"},"Components/components-vector-stores":{"id":"Components/components-vector-stores","title":"Vector stores","description":"Vector databases store vector data, which backs AI workloads like chatbots and Retrieval Augmented Generation.","sidebar":"docs"},"Concepts/concepts-components":{"id":"Concepts/concepts-components","title":"Components","description":"A\xa0component\xa0is a single building block within a flow with inputs, outputs, functions, and parameters that define its functionality. A single component is like a class within a larger application.","sidebar":"docs"},"Concepts/concepts-file-management":{"id":"Concepts/concepts-file-management","title":"Manage files","description":"Upload, store, and manage files in Langflow\'s File management system.","sidebar":"docs"},"Concepts/concepts-flows":{"id":"Concepts/concepts-flows","title":"Flows","description":"Flows in Langflow are fully serializable and can be saved and loaded from the file system. In this guide, we\'ll explore how to import and export flows.","sidebar":"docs"},"Concepts/concepts-objects":{"id":"Concepts/concepts-objects","title":"Langflow objects","description":"In Langflow, objects are Pydantic models that serve as structured, functional representations of data.","sidebar":"docs"},"Concepts/concepts-overview":{"id":"Concepts/concepts-overview","title":"Langflow overview","description":"This page explores the fundamental building blocks of Langflow, beginning with the question, \\"What is a flow?\\"","sidebar":"docs"},"Concepts/concepts-playground":{"id":"Concepts/concepts-playground","title":"Playground","description":"The\xa0Playground\xa0is a dynamic interface designed for real-time interaction with LLMs, allowing users to chat, access memories, and monitor inputs and outputs. Here, users can directly prototype their models, making adjustments and observing different outcomes.","sidebar":"docs"},"Concepts/concepts-publish":{"id":"Concepts/concepts-publish","title":"Publish flows","description":"Langflow provides several ways to publish and integrate your flows into external applications. Whether you want to expose your flow as an API endpoint, embed it as a chat widget in your website, or share it as a public playground, this guide covers the options available for making your flows accessible to users.","sidebar":"docs"},"Concepts/concepts-voice-mode":{"id":"Concepts/concepts-voice-mode","title":"Voice mode","description":"The Langflow Playground supports voice mode for interacting with your applications through a microphone.","sidebar":"docs"},"Concepts/mcp-server":{"id":"Concepts/mcp-server","title":"Model Context Protocol (MCP) server","description":"Langflow integrates with the Model Context Protocol (MCP) as both an MCP server and an MCP client.","sidebar":"docs"},"Configuration/configuration-api-keys":{"id":"Configuration/configuration-api-keys","title":"API keys","description":"Langflow provides an API key functionality that allows users to access their individual components and flows without traditional login authentication.","sidebar":"docs"},"Configuration/configuration-authentication":{"id":"Configuration/configuration-authentication","title":"Authentication","description":"This guide covers Langflow\'s authentication system and API key management, including how to secure your deployment and manage access to flows and components.","sidebar":"docs"},"Configuration/configuration-cli":{"id":"Configuration/configuration-cli","title":"Langflow CLI","description":"The Langflow command line interface (Langflow CLI) is the main interface for managing and running the Langflow server.","sidebar":"docs"},"Configuration/configuration-custom-database":{"id":"Configuration/configuration-custom-database","title":"Configure an external PostgreSQL database","description":"Langflow\'s default database is SQLite, but you can configure Langflow to use PostgreSQL instead.","sidebar":"docs"},"Configuration/configuration-global-variables":{"id":"Configuration/configuration-global-variables","title":"Global variables","description":"Global variables let you store and reuse generic input values and credentials across your projects.","sidebar":"docs"},"Configuration/environment-variables":{"id":"Configuration/environment-variables","title":"Environment variables","description":"Langflow lets you configure a number of settings using environment variables.","sidebar":"docs"},"Contributing/contributing-community":{"id":"Contributing/contributing-community","title":"Join the Langflow community","description":"Join the Langflow Discord server","sidebar":"docs"},"Contributing/contributing-component-tests":{"id":"Contributing/contributing-component-tests","title":"Contribute component tests","description":"This guide outlines how to structure and implement tests for application components to ensure consistency and adequate coverage.","sidebar":"docs"},"Contributing/contributing-components":{"id":"Contributing/contributing-components","title":"Contribute components","description":"New components are added as objects of the\xa0CustomComponent\xa0class.","sidebar":"docs"},"Contributing/contributing-github-discussion-board":{"id":"Contributing/contributing-github-discussion-board","title":"Ask for help on the Discussions board","description":"If you\'re looking for help with your code, consider posting a question on the Langflow\xa0GitHub Discussions board. The Langflow team cannot provide individual support via email. The team also believes that help is much more valuable if it\'s\xa0shared publicly, so that more people can benefit from it.","sidebar":"docs"},"Contributing/contributing-github-issues":{"id":"Contributing/contributing-github-issues","title":"Request an enhancement or report a bug","description":"The\xa0Issues page in the Langflow repo is kept up to date with bugs, improvements, and feature requests. Labels are used to help with sorting and discovery of issues of interest. For an overview of the system Langflow uses to tag issues and pull requests, see the Langflow repo\'s labels page.","sidebar":"docs"},"Contributing/contributing-how-to-contribute":{"id":"Contributing/contributing-how-to-contribute","title":"Contribute to Langflow","description":"This guide is intended to help you start contributing to Langflow.","sidebar":"docs"},"Contributing/contributing-telemetry":{"id":"Contributing/contributing-telemetry","title":"Telemetry","description":"Langflow uses anonymous telemetry to collect essential usage statistics to enhance functionality and the user experience. This data helps us identify popular features and areas that need improvement, and ensures development efforts align with what you need.","sidebar":"docs"},"Deployment/deployment-docker":{"id":"Deployment/deployment-docker","title":"Deploy Langflow on Docker","description":"This guide demonstrates deploying Langflow with Docker and Docker Compose.","sidebar":"docs"},"Deployment/deployment-gcp":{"id":"Deployment/deployment-gcp","title":"Deploy Langflow on Google Cloud Platform","description":"This guide demonstrates deploying Langflow on Google Cloud Platform.","sidebar":"docs"},"Deployment/deployment-hugging-face-spaces":{"id":"Deployment/deployment-hugging-face-spaces","title":"Deploy Langflow on HuggingFace Spaces","description":"This guide explains how to deploy Langflow on HuggingFace Spaces.","sidebar":"docs"},"Deployment/deployment-kubernetes-dev":{"id":"Deployment/deployment-kubernetes-dev","title":"Deploy the Langflow development environment on Kubernetes","description":"The Langflow Integrated Development Environment (IDE) Helm chart is designed to provide a complete environment for developers to create, test, and debug their flows. It includes both the API and the UI.","sidebar":"docs"},"Deployment/deployment-kubernetes-prod":{"id":"Deployment/deployment-kubernetes-prod","title":"Deploy the Langflow production environment on Kubernetes","description":"The Langflow Runtime chart is tailored for deploying applications in a production environment. It is focused on stability, performance, isolation, and security to ensure that applications run reliably and efficiently.","sidebar":"docs"},"Deployment/deployment-overview":{"id":"Deployment/deployment-overview","title":"Langflow deployment overview","description":"You have a flow, and want to share it with the world in a production environment.","sidebar":"docs"},"Deployment/deployment-prod-best-practices":{"id":"Deployment/deployment-prod-best-practices","title":"Langflow architecture and best practices on Kubernetes","description":"While Langflow offers flexible deployment options, deploying on a Kubernetes cluster is highly recommended for production environments.","sidebar":"docs"},"Deployment/deployment-railway":{"id":"Deployment/deployment-railway","title":"Deploy Langflow on Railway","description":"This guide explains how to deploy Langflow on Railway, a cloud infrastructure platform that provides auto-deploy, managed databases, and automatic scaling.","sidebar":"docs"},"Deployment/deployment-render":{"id":"Deployment/deployment-render","title":"Deploy Langflow on Render","description":"This guide explains how to deploy Langflow on Render, a cloud platform for deploying web applications and APIs.","sidebar":"docs"},"Develop/develop-application":{"id":"Develop/develop-application","title":"Develop an application in Langflow","description":"Follow this guide to learn how to build an application using Langflow.","sidebar":"docs"},"Develop/develop-overview":{"id":"Develop/develop-overview","title":"About developing and configuring Langflow applications","description":"The following pages provide information about how to develop and configure Langflow applications.","sidebar":"docs"},"Develop/install-custom-dependencies":{"id":"Develop/install-custom-dependencies","title":"Install custom dependencies","description":"To install custom dependencies in your Langflow environment, add them with your package manager.","sidebar":"docs"},"Develop/logging":{"id":"Develop/logging","title":"Logging options in Langflow","description":"Langflow uses the loguru library for logging.","sidebar":"docs"},"Develop/memory":{"id":"Develop/memory","title":"Memory management options","description":"Langflow provides flexible memory management options for storage and retrieval.","sidebar":"docs"},"Develop/session-id":{"id":"Develop/session-id","title":"Use session ID to manage communication between components","description":"Session ID is a unique identifier for client/server connections. A single session equals the duration of a client\'s connection to a server.","sidebar":"docs"},"Develop/webhook":{"id":"Develop/webhook","title":"Trigger flows with webhooks","description":"Add a Webhook component to your flow to trigger it with external requests.","sidebar":"docs"},"Get-Started/get-started-installation":{"id":"Get-Started/get-started-installation","title":"Install Langflow","description":"Langflow can be installed in three ways:","sidebar":"docs"},"Get-Started/get-started-quickstart":{"id":"Get-Started/get-started-quickstart","title":"Quickstart","description":"Get to know Langflow by building an OpenAI-powered chatbot application. After you\'ve constructed a chatbot, add Retrieval Augmented Generation (RAG) to chat with your own data.","sidebar":"docs"},"Get-Started/welcome-to-langflow":{"id":"Get-Started/welcome-to-langflow","title":"Welcome to Langflow","description":"Langflow is a new, visual framework for building multi-agent and RAG applications. It is open-source, Python-powered, fully customizable, and LLM and vector store agnostic.","sidebar":"docs"},"Integrations/Apify/integrations-apify":{"id":"Integrations/Apify/integrations-apify","title":"Apify","description":"Apify is a web scraping and data extraction platform. It provides an Actor Store with more than 3,000 ready-made cloud tools called Actors.","sidebar":"docs"},"Integrations/Arize/integrations-arize":{"id":"Integrations/Arize/integrations-arize","title":"Integrate Arize with Langflow","description":"Arize is a tool built on OpenTelemetry and OpenInference for monitoring and optimizing LLM applications.","sidebar":"docs"},"Integrations/Composio/integrations-composio":{"id":"Integrations/Composio/integrations-composio","title":"Integrate Composio with Langflow","description":"Langflow integrates with Composio as a toolset for your Agent component.","sidebar":"docs"},"Integrations/Google/integrations-setup-google-cloud-vertex-ai-langflow":{"id":"Integrations/Google/integrations-setup-google-cloud-vertex-ai-langflow","title":"Integrate Google Cloud Vertex AI with Langflow","description":"A comprehensive guide on creating a Google OAuth app, obtaining tokens, and integrating them with Langflow\'s Google components.","sidebar":"docs"},"Integrations/Google/integrations-setup-google-oauth-langflow":{"id":"Integrations/Google/integrations-setup-google-oauth-langflow","title":"Integrate Google OAuth with Langflow","description":"A comprehensive guide on creating a Google OAuth app, obtaining tokens, and integrating them with Langflow\'s Google components.","sidebar":"docs"},"Integrations/integrations-assemblyai":{"id":"Integrations/integrations-assemblyai","title":"AssemblyAI","description":"The AssemblyAI components allow you to apply powerful Speech AI models to your app for tasks like:","sidebar":"docs"},"Integrations/integrations-langfuse":{"id":"Integrations/integrations-langfuse","title":"Langfuse","description":"Langfuse (GitHub) is an open-source platform for LLM observability. It provides tracing and monitoring capabilities for AI applications, helping developers debug, analyze, and optimize their AI systems. Langfuse integrates with various tools and frameworks such as workflows builders like Langflow.","sidebar":"docs"},"Integrations/integrations-langsmith":{"id":"Integrations/integrations-langsmith","title":"LangSmith","description":"LangSmith is a full-lifecycle DevOps service from LangChain that provides monitoring and observability. To integrate with Langflow, just add your LangChain API key as a Langflow environment variable and you are good to go!","sidebar":"docs"},"Integrations/integrations-langwatch":{"id":"Integrations/integrations-langwatch","title":"LangWatch","description":"938674091aac4d9d9aa4aa6eb5c215b4}","sidebar":"docs"},"Integrations/integrations-opik":{"id":"Integrations/integrations-opik","title":"Opik","description":"Opik is an open-source platform designed for evaluating, testing, and monitoring large language model (LLM) applications. Developed by Comet, it aims to facilitate more intuitive collaboration, testing, and monitoring of LLM-based applications.","sidebar":"docs"},"Integrations/mcp-component-astra":{"id":"Integrations/mcp-component-astra","title":"Connect an Astra DB MCP server to Langflow","description":"Use the MCP server component to connect Langflow to a Datastax Astra DB MCP server.","sidebar":"docs"},"Integrations/Notion/integrations-notion":{"id":"Integrations/Notion/integrations-notion","title":"Setup","description":"To use Notion components in Langflow, you first need to create a Notion integration and configure it with the necessary capabilities. This guide will walk you through the process of setting up a Notion integration and granting it access to your Notion databases.","sidebar":"docs"},"Integrations/Notion/notion-agent-conversational":{"id":"Integrations/Notion/notion-agent-conversational","title":"Notion Conversational Agent","description":"The Notion Conversational Agent is an AI-powered assistant that interacts with your Notion workspace through natural language conversations. This flow performs Notion-related tasks like creating pages, searching for information, and managing content, all through a chat interface.","sidebar":"docs"},"Integrations/Notion/notion-agent-meeting-notes":{"id":"Integrations/Notion/notion-agent-meeting-notes","title":"Notion Meeting Notes Agent","description":"The Notion Agent for Meeting Notes is an AI-powered tool that automatically processes meeting transcripts and updates your Notion workspace. It identifies tasks, action items, and key points from your meetings, then creates new tasks or updates existing ones in Notion without manual input.","sidebar":"docs"},"Integrations/Nvidia/integrations-nvidia-ingest":{"id":"Integrations/Nvidia/integrations-nvidia-ingest","title":"Integrate NVIDIA Retriever Extraction with Langflow","description":"NVIDIA Retriever Extraction is also known as NV-Ingest and NeMo Retriever Extraction.","sidebar":"docs"},"Integrations/Nvidia/integrations-nvidia-nim-wsl2":{"id":"Integrations/Nvidia/integrations-nvidia-nim-wsl2","title":"Integrate NVIDIA NIMs with Langflow","description":"Connect Langflow with NVIDIA NIM on an RTX Windows system with Windows Subsystem for Linux 2 (WSL2) installed.","sidebar":"docs"},"Sample-Flows/blog-writer":{"id":"Sample-Flows/blog-writer","title":"Blog writer","description":"Build a Blog Writer flow for a one-shot application using OpenAI.","sidebar":"docs"},"Sample-Flows/document-qa":{"id":"Sample-Flows/document-qa","title":"Document QA","description":"Build a question-and-answer chatbot with a document loaded from local memory.","sidebar":"docs"},"Sample-Flows/memory-chatbot":{"id":"Sample-Flows/memory-chatbot","title":"Memory chatbot","description":"This flow extends the basic prompting flow with a Chat memory component that stores up to 100 previous chat messages and uses them to provide context for the current conversation.","sidebar":"docs"},"Sample-Flows/sequential-agent":{"id":"Sample-Flows/sequential-agent","title":"Sequential tasks agent","description":"Build a Sequential Tasks Agent flow for a multi-agent application using multiple Agent components.","sidebar":"docs"},"Sample-Flows/travel-planning-agent":{"id":"Sample-Flows/travel-planning-agent","title":"Travel planning agent","description":"Build a Travel Planning Agent flow for an agentic application using the multiple Tool-calling agents.","sidebar":"docs"},"Starter-Projects/starter-projects-basic-prompting":{"id":"Starter-Projects/starter-projects-basic-prompting","title":"Basic prompting","description":"Prompts serve as the inputs to a large language model (LLM), acting as the interface between human instructions and computational tasks.","sidebar":"docs"},"Starter-Projects/starter-projects-simple-agent":{"id":"Starter-Projects/starter-projects-simple-agent","title":"Simple agent","description":"Build a Simple Agent flow for an agentic application using the Tool-calling agent component.","sidebar":"docs"},"Starter-Projects/starter-projects-vector-store-rag":{"id":"Starter-Projects/starter-projects-vector-store-rag","title":"Vector store RAG","description":"Retrieval Augmented Generation, or RAG, is a pattern for training LLMs on your data and querying it.","sidebar":"docs"},"Support/luna-for-langflow":{"id":"Support/luna-for-langflow","title":"Luna for Langflow","description":"With Luna for Langflow support, you can develop and deploy Langflow applications with confidence.","sidebar":"docs"}}}}')}}]); \ No newline at end of file diff --git a/assets/js/22dd74f7.1d02fab2.js b/assets/js/22dd74f7.1d02fab2.js new file mode 100644 index 0000000000..e83f39766a --- /dev/null +++ b/assets/js/22dd74f7.1d02fab2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[1567],{55226:e=>{e.exports=JSON.parse('{"version":{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"docs":[{"type":"link","label":"Welcome to Langflow","href":"/","docId":"Get-Started/welcome-to-langflow","unlisted":false},{"type":"category","label":"Get started","items":[{"type":"link","label":"Install Langflow","href":"/get-started-installation","docId":"Get-Started/get-started-installation","unlisted":false},{"type":"link","label":"Quickstart","href":"/get-started-quickstart","docId":"Get-Started/get-started-quickstart","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Starter projects","items":[{"type":"link","label":"Basic prompting","href":"/starter-projects-basic-prompting","docId":"Starter-Projects/starter-projects-basic-prompting","unlisted":false},{"type":"link","label":"Vector store RAG","href":"/starter-projects-vector-store-rag","docId":"Starter-Projects/starter-projects-vector-store-rag","unlisted":false},{"type":"link","label":"Simple agent","href":"/starter-projects-simple-agent","docId":"Starter-Projects/starter-projects-simple-agent","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Sample flows","items":[{"type":"link","label":"Blog writer","href":"/blog-writer","docId":"Sample-Flows/blog-writer","unlisted":false},{"type":"link","label":"Document QA","href":"/document-qa","docId":"Sample-Flows/document-qa","unlisted":false},{"type":"link","label":"Memory chatbot","href":"/memory-chatbot","docId":"Sample-Flows/memory-chatbot","unlisted":false},{"type":"link","label":"Sequential tasks agent","href":"/sequential-agent","docId":"Sample-Flows/sequential-agent","unlisted":false},{"type":"link","label":"Travel planning agent","href":"/travel-planning-agent","docId":"Sample-Flows/travel-planning-agent","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Concepts","items":[{"type":"link","label":"Langflow overview","href":"/concepts-overview","docId":"Concepts/concepts-overview","unlisted":false},{"type":"link","label":"Playground","href":"/concepts-playground","docId":"Concepts/concepts-playground","unlisted":false},{"type":"link","label":"Components","href":"/concepts-components","docId":"Concepts/concepts-components","unlisted":false},{"type":"link","label":"Flows","href":"/concepts-flows","docId":"Concepts/concepts-flows","unlisted":false},{"type":"link","label":"Langflow objects","href":"/concepts-objects","docId":"Concepts/concepts-objects","unlisted":false},{"type":"link","label":"Publish flows","href":"/concepts-publish","docId":"Concepts/concepts-publish","unlisted":false},{"type":"link","label":"Model Context Protocol (MCP) server","href":"/mcp-server","docId":"Concepts/mcp-server","unlisted":false},{"type":"link","label":"Manage files","href":"/concepts-file-management","docId":"Concepts/concepts-file-management","unlisted":false},{"type":"link","label":"Voice mode","href":"/concepts-voice-mode","docId":"Concepts/concepts-voice-mode","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Components","items":[{"type":"link","label":"Agents","href":"/components-agents","docId":"Components/components-agents","unlisted":false},{"type":"link","label":"Bundles","href":"/components-bundle-components","docId":"Components/components-bundles","unlisted":false},{"type":"link","label":"Create custom Python components","href":"/components-custom-components","docId":"Components/components-custom-components","unlisted":false},{"type":"link","label":"Data","href":"/components-data","docId":"Components/components-data","unlisted":false},{"type":"link","label":"Embeddings","href":"/components-embedding-models","docId":"Components/components-embedding-models","unlisted":false},{"type":"link","label":"Helpers","href":"/components-helpers","docId":"Components/components-helpers","unlisted":false},{"type":"link","label":"Inputs and outputs","href":"/components-io","docId":"Components/components-io","unlisted":false},{"type":"link","label":"Loaders","href":"/components-loaders","docId":"Components/components-loaders","unlisted":false},{"type":"link","label":"Logic","href":"/components-logic","docId":"Components/components-logic","unlisted":false},{"type":"link","label":"Memories","href":"/components-memories","docId":"Components/components-memories","unlisted":false},{"type":"link","label":"Models","href":"/components-models","docId":"Components/components-models","unlisted":false},{"type":"link","label":"Processing","href":"/components-processing","docId":"Components/components-processing","unlisted":false},{"type":"link","label":"Prompts","href":"/components-prompts","docId":"Components/components-prompts","unlisted":false},{"type":"link","label":"Tools","href":"/components-tools","docId":"Components/components-tools","unlisted":false},{"type":"link","label":"Vector stores","href":"/components-vector-stores","docId":"Components/components-vector-stores","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Agents","items":[{"type":"link","label":"Agents overview","href":"/agents-overview","docId":"Agents/agents-overview","unlisted":false},{"type":"link","label":"Create a problem-solving agent","href":"/agents-tool-calling-agent-component","docId":"Agents/agent-tool-calling-agent-component","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Configuration","items":[{"type":"link","label":"API keys","href":"/configuration-api-keys","docId":"Configuration/configuration-api-keys","unlisted":false},{"type":"link","label":"Authentication","href":"/configuration-authentication","docId":"Configuration/configuration-authentication","unlisted":false},{"type":"link","label":"Langflow CLI","href":"/configuration-cli","docId":"Configuration/configuration-cli","unlisted":false},{"type":"link","label":"Configure an external PostgreSQL database","href":"/configuration-custom-database","docId":"Configuration/configuration-custom-database","unlisted":false},{"type":"link","label":"Global variables","href":"/configuration-global-variables","docId":"Configuration/configuration-global-variables","unlisted":false},{"type":"link","label":"Environment variables","href":"/environment-variables","docId":"Configuration/environment-variables","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Develop","items":[{"type":"link","label":"About developing and configuring Langflow applications","href":"/develop-overview","docId":"Develop/develop-overview","unlisted":false},{"type":"link","label":"Develop an application in Langflow","href":"/develop-application","docId":"Develop/develop-application","unlisted":false},{"type":"link","label":"Install custom dependencies","href":"/install-custom-dependencies","docId":"Develop/install-custom-dependencies","unlisted":false},{"type":"link","label":"Memory management options","href":"/memory","docId":"Develop/memory","unlisted":false},{"type":"link","label":"Use session ID to manage communication between components","href":"/session-id","docId":"Develop/session-id","unlisted":false},{"type":"link","label":"Logging options in Langflow","href":"/logging","docId":"Develop/logging","unlisted":false},{"type":"link","label":"Trigger flows with webhooks","href":"/webhook","docId":"Develop/webhook","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Deployment","items":[{"type":"link","label":"Deployment overview","href":"/deployment-overview","docId":"Deployment/deployment-overview","unlisted":false},{"type":"link","label":"Docker","href":"/deployment-docker","docId":"Deployment/deployment-docker","unlisted":false},{"type":"category","label":"Kubernetes","items":[{"type":"link","label":"Langflow architecture and best practices","href":"/deployment-prod-best-practices","docId":"Deployment/deployment-prod-best-practices","unlisted":false},{"type":"link","label":"Deploy in development","href":"/deployment-kubernetes-dev","docId":"Deployment/deployment-kubernetes-dev","unlisted":false},{"type":"link","label":"Deploy in production","href":"/deployment-kubernetes-prod","docId":"Deployment/deployment-kubernetes-prod","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"link","label":"Google Cloud Platform","href":"/deployment-gcp","docId":"Deployment/deployment-gcp","unlisted":false},{"type":"link","label":"Hugging Face Spaces","href":"/deployment-hugging-face-spaces","docId":"Deployment/deployment-hugging-face-spaces","unlisted":false},{"type":"link","label":"Railway","href":"/deployment-railway","docId":"Deployment/deployment-railway","unlisted":false},{"type":"link","label":"Render","href":"/deployment-render","docId":"Deployment/deployment-render","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"API reference","items":[{"type":"link","label":"API documentation","href":"/api"},{"type":"link","label":"API examples","href":"/api-reference-api-examples","docId":"API-Reference/api-reference-api-examples","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Integrations","items":[{"type":"link","label":"Apify","href":"/integrations-apify","docId":"Integrations/Apify/integrations-apify","unlisted":false},{"type":"link","label":"Arize","href":"/integrations-arize","docId":"Integrations/Arize/integrations-arize","unlisted":false},{"type":"link","label":"AssemblyAI","href":"/integrations-assemblyai","docId":"Integrations/integrations-assemblyai","unlisted":false},{"type":"link","label":"Composio","href":"/integrations-composio","docId":"Integrations/Composio/integrations-composio","unlisted":false},{"type":"link","label":"Astra DB MCP server","href":"/mcp-component-astra","docId":"Integrations/mcp-component-astra","unlisted":false},{"type":"category","label":"Google","items":[{"type":"link","label":"Integrate Google OAuth with Langflow","href":"/integrations-setup-google-oauth-langflow","docId":"Integrations/Google/integrations-setup-google-oauth-langflow","unlisted":false},{"type":"link","label":"Integrate Google Cloud Vertex AI with Langflow","href":"/integrations-setup-google-cloud-vertex-ai-langflow","docId":"Integrations/Google/integrations-setup-google-cloud-vertex-ai-langflow","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"link","label":"Langfuse","href":"/integrations-langfuse","docId":"Integrations/integrations-langfuse","unlisted":false},{"type":"link","label":"LangSmith","href":"/integrations-langsmith","docId":"Integrations/integrations-langsmith","unlisted":false},{"type":"link","label":"LangWatch","href":"/integrations-langwatch","docId":"Integrations/integrations-langwatch","unlisted":false},{"type":"link","label":"Opik","href":"/integrations-opik","docId":"Integrations/integrations-opik","unlisted":false},{"type":"category","label":"Notion","items":[{"type":"link","label":"Setup","href":"/integrations/notion/setup","docId":"Integrations/Notion/integrations-notion","unlisted":false},{"type":"link","label":"Notion Conversational Agent","href":"/integrations/notion/notion-agent-conversational","docId":"Integrations/Notion/notion-agent-conversational","unlisted":false},{"type":"link","label":"Notion Meeting Notes Agent","href":"/integrations/notion/notion-agent-meeting-notes","docId":"Integrations/Notion/notion-agent-meeting-notes","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"NVIDIA","items":[{"type":"link","label":"Integrate NVIDIA Retriever Extraction with Langflow","href":"/integrations-nvidia-ingest","docId":"Integrations/Nvidia/integrations-nvidia-ingest","unlisted":false},{"type":"link","label":"Integrate NVIDIA NIMs with Langflow","href":"/integrations-nvidia-ingest-wsl2","docId":"Integrations/Nvidia/integrations-nvidia-nim-wsl2","unlisted":false}],"collapsed":true,"collapsible":true}],"collapsed":true,"collapsible":true},{"type":"category","label":"Contributing","items":[{"type":"link","label":"Join the Langflow community","href":"/contributing-community","docId":"Contributing/contributing-community","unlisted":false},{"type":"link","label":"Contribute components","href":"/contributing-components","docId":"Contributing/contributing-components","unlisted":false},{"type":"link","label":"Contribute component tests","href":"/contributing-component-tests","docId":"Contributing/contributing-component-tests","unlisted":false},{"type":"link","label":"Ask for help on the Discussions board","href":"/contributing-github-discussions","docId":"Contributing/contributing-github-discussion-board","unlisted":false},{"type":"link","label":"Request an enhancement or report a bug","href":"/contributing-github-issues","docId":"Contributing/contributing-github-issues","unlisted":false},{"type":"link","label":"Contribute to Langflow","href":"/contributing-how-to-contribute","docId":"Contributing/contributing-how-to-contribute","unlisted":false},{"type":"link","label":"Telemetry","href":"/contributing-telemetry","docId":"Contributing/contributing-telemetry","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Changelog","items":[{"type":"link","label":"Changelog","href":"https://github.com/langflow-ai/langflow/releases/latest"}],"collapsed":true,"collapsible":true},{"type":"category","label":"Support","items":[{"type":"link","label":"Luna for Langflow","href":"/luna-for-langflow","docId":"Support/luna-for-langflow","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"html","className":"sidebar-ad","value":"\\n \\n \\n
\\n Use Langflow in the cloud\\n Sign up for DataStax Langflow\\n
\\n
\\n "}]},"docs":{"Agents/agent-tool-calling-agent-component":{"id":"Agents/agent-tool-calling-agent-component","title":"Create a problem-solving agent","description":"Developing agents in Langchain is complex.","sidebar":"docs"},"Agents/agents-overview":{"id":"Agents/agents-overview","title":"Agents overview","description":"Agents are AI systems that use LLMs as a brain to analyze problems and select external tools.","sidebar":"docs"},"API-Reference/api-reference-api-examples":{"id":"API-Reference/api-reference-api-examples","title":"API examples","description":"This page provides examples and practices for managing Langflow using the Langflow API.","sidebar":"docs"},"Components/components-agents":{"id":"Components/components-agents","title":"Agents","description":"Agent components define the behavior and capabilities of AI agents in your flow.","sidebar":"docs"},"Components/components-bundles":{"id":"Components/components-bundles","title":"Bundles","description":"Bundles are third-party components grouped by provider.","sidebar":"docs"},"Components/components-custom-components":{"id":"Components/components-custom-components","title":"Create custom Python components","description":"Custom components extend Langflow\'s functionality through Python classes that inherit from Component. This enables integration of new features, data manipulation, external services, and specialized tools.","sidebar":"docs"},"Components/components-data":{"id":"Components/components-data","title":"Data","description":"Data components load data from a source into your flow.","sidebar":"docs"},"Components/components-embedding-models":{"id":"Components/components-embedding-models","title":"Embeddings","description":"Embeddings models convert text into numerical vectors. These embeddings capture semantic meaning of the input text, and allow LLMs to understand context.","sidebar":"docs"},"Components/components-helpers":{"id":"Components/components-helpers","title":"Helpers","description":"Helper components provide utility functions to help manage data, tasks, and other components in your flow.","sidebar":"docs"},"Components/components-io":{"id":"Components/components-io","title":"Inputs and outputs","description":"Input and output components define where data enters and exits your flow.","sidebar":"docs"},"Components/components-loaders":{"id":"Components/components-loaders","title":"Loaders","description":"As of Langflow 1.1, loader components are now found in the Components menu under Bundles.","sidebar":"docs"},"Components/components-logic":{"id":"Components/components-logic","title":"Logic","description":"Logic components provide functionalities for routing, conditional processing, and flow management.","sidebar":"docs"},"Components/components-memories":{"id":"Components/components-memories","title":"Memories","description":"Memory components store and retrieve chat messages by session_id.","sidebar":"docs"},"Components/components-models":{"id":"Components/components-models","title":"Models","description":"Model components generate text using large language models.","sidebar":"docs"},"Components/components-processing":{"id":"Components/components-processing","title":"Processing","description":"Processing components process and transform data within a flow.","sidebar":"docs"},"Components/components-prompts":{"id":"Components/components-prompts","title":"Prompts","description":"A prompt is a structured input to a language model that instructs the model how to handle user inputs and variables.","sidebar":"docs"},"Components/components-tools":{"id":"Components/components-tools","title":"Tools","description":"Tools are typically connected to agent components at the Tools port. Agents use LLMs as a reasoning engine to decide which of the connected tool components to use to solve a problem.","sidebar":"docs"},"Components/components-vector-stores":{"id":"Components/components-vector-stores","title":"Vector stores","description":"Vector databases store vector data, which backs AI workloads like chatbots and Retrieval Augmented Generation.","sidebar":"docs"},"Concepts/concepts-components":{"id":"Concepts/concepts-components","title":"Components","description":"A\xa0component\xa0is a single building block within a flow with inputs, outputs, functions, and parameters that define its functionality. A single component is like a class within a larger application.","sidebar":"docs"},"Concepts/concepts-file-management":{"id":"Concepts/concepts-file-management","title":"Manage files","description":"Upload, store, and manage files in Langflow\'s File management system.","sidebar":"docs"},"Concepts/concepts-flows":{"id":"Concepts/concepts-flows","title":"Flows","description":"Flows in Langflow are fully serializable and can be saved and loaded from the file system. In this guide, we\'ll explore how to import and export flows.","sidebar":"docs"},"Concepts/concepts-objects":{"id":"Concepts/concepts-objects","title":"Langflow objects","description":"In Langflow, objects are Pydantic models that serve as structured, functional representations of data.","sidebar":"docs"},"Concepts/concepts-overview":{"id":"Concepts/concepts-overview","title":"Langflow overview","description":"This page explores the fundamental building blocks of Langflow, beginning with the question, \\"What is a flow?\\"","sidebar":"docs"},"Concepts/concepts-playground":{"id":"Concepts/concepts-playground","title":"Playground","description":"The\xa0Playground\xa0is a dynamic interface designed for real-time interaction with LLMs, allowing users to chat, access memories, and monitor inputs and outputs. Here, users can directly prototype their models, making adjustments and observing different outcomes.","sidebar":"docs"},"Concepts/concepts-publish":{"id":"Concepts/concepts-publish","title":"Publish flows","description":"Langflow provides several ways to publish and integrate your flows into external applications. Whether you want to expose your flow as an API endpoint, embed it as a chat widget in your website, or share it as a public playground, this guide covers the options available for making your flows accessible to users.","sidebar":"docs"},"Concepts/concepts-voice-mode":{"id":"Concepts/concepts-voice-mode","title":"Voice mode","description":"The Langflow Playground supports voice mode for interacting with your applications through a microphone.","sidebar":"docs"},"Concepts/mcp-server":{"id":"Concepts/mcp-server","title":"Model Context Protocol (MCP) server","description":"Langflow integrates with the Model Context Protocol (MCP) as both an MCP server and an MCP client.","sidebar":"docs"},"Configuration/configuration-api-keys":{"id":"Configuration/configuration-api-keys","title":"API keys","description":"Langflow provides an API key functionality that allows users to access their individual components and flows without traditional login authentication.","sidebar":"docs"},"Configuration/configuration-authentication":{"id":"Configuration/configuration-authentication","title":"Authentication","description":"This guide covers Langflow\'s authentication system and API key management, including how to secure your deployment and manage access to flows and components.","sidebar":"docs"},"Configuration/configuration-cli":{"id":"Configuration/configuration-cli","title":"Langflow CLI","description":"The Langflow command line interface (Langflow CLI) is the main interface for managing and running the Langflow server.","sidebar":"docs"},"Configuration/configuration-custom-database":{"id":"Configuration/configuration-custom-database","title":"Configure an external PostgreSQL database","description":"Langflow\'s default database is SQLite, but you can configure Langflow to use PostgreSQL instead.","sidebar":"docs"},"Configuration/configuration-global-variables":{"id":"Configuration/configuration-global-variables","title":"Global variables","description":"Global variables let you store and reuse generic input values and credentials across your projects.","sidebar":"docs"},"Configuration/environment-variables":{"id":"Configuration/environment-variables","title":"Environment variables","description":"Langflow lets you configure a number of settings using environment variables.","sidebar":"docs"},"Contributing/contributing-community":{"id":"Contributing/contributing-community","title":"Join the Langflow community","description":"Join the Langflow Discord server","sidebar":"docs"},"Contributing/contributing-component-tests":{"id":"Contributing/contributing-component-tests","title":"Contribute component tests","description":"This guide outlines how to structure and implement tests for application components to ensure consistency and adequate coverage.","sidebar":"docs"},"Contributing/contributing-components":{"id":"Contributing/contributing-components","title":"Contribute components","description":"New components are added as objects of the\xa0CustomComponent\xa0class.","sidebar":"docs"},"Contributing/contributing-github-discussion-board":{"id":"Contributing/contributing-github-discussion-board","title":"Ask for help on the Discussions board","description":"If you\'re looking for help with your code, consider posting a question on the Langflow\xa0GitHub Discussions board. The Langflow team cannot provide individual support via email. The team also believes that help is much more valuable if it\'s\xa0shared publicly, so that more people can benefit from it.","sidebar":"docs"},"Contributing/contributing-github-issues":{"id":"Contributing/contributing-github-issues","title":"Request an enhancement or report a bug","description":"The\xa0Issues page in the Langflow repo is kept up to date with bugs, improvements, and feature requests. Labels are used to help with sorting and discovery of issues of interest. For an overview of the system Langflow uses to tag issues and pull requests, see the Langflow repo\'s labels page.","sidebar":"docs"},"Contributing/contributing-how-to-contribute":{"id":"Contributing/contributing-how-to-contribute","title":"Contribute to Langflow","description":"This guide is intended to help you start contributing to Langflow.","sidebar":"docs"},"Contributing/contributing-telemetry":{"id":"Contributing/contributing-telemetry","title":"Telemetry","description":"Langflow uses anonymous telemetry to collect essential usage statistics to enhance functionality and the user experience. This data helps us identify popular features and areas that need improvement, and ensures development efforts align with what you need.","sidebar":"docs"},"Deployment/deployment-docker":{"id":"Deployment/deployment-docker","title":"Deploy Langflow on Docker","description":"This guide demonstrates deploying Langflow with Docker and Docker Compose.","sidebar":"docs"},"Deployment/deployment-gcp":{"id":"Deployment/deployment-gcp","title":"Deploy Langflow on Google Cloud Platform","description":"This guide demonstrates deploying Langflow on Google Cloud Platform.","sidebar":"docs"},"Deployment/deployment-hugging-face-spaces":{"id":"Deployment/deployment-hugging-face-spaces","title":"Deploy Langflow on HuggingFace Spaces","description":"This guide explains how to deploy Langflow on HuggingFace Spaces.","sidebar":"docs"},"Deployment/deployment-kubernetes-dev":{"id":"Deployment/deployment-kubernetes-dev","title":"Deploy the Langflow development environment on Kubernetes","description":"The Langflow Integrated Development Environment (IDE) Helm chart is designed to provide a complete environment for developers to create, test, and debug their flows. It includes both the API and the UI.","sidebar":"docs"},"Deployment/deployment-kubernetes-prod":{"id":"Deployment/deployment-kubernetes-prod","title":"Deploy the Langflow production environment on Kubernetes","description":"The Langflow Runtime chart is tailored for deploying applications in a production environment. It is focused on stability, performance, isolation, and security to ensure that applications run reliably and efficiently.","sidebar":"docs"},"Deployment/deployment-overview":{"id":"Deployment/deployment-overview","title":"Langflow deployment overview","description":"You have a flow, and want to share it with the world in a production environment.","sidebar":"docs"},"Deployment/deployment-prod-best-practices":{"id":"Deployment/deployment-prod-best-practices","title":"Langflow architecture and best practices on Kubernetes","description":"While Langflow offers flexible deployment options, deploying on a Kubernetes cluster is highly recommended for production environments.","sidebar":"docs"},"Deployment/deployment-railway":{"id":"Deployment/deployment-railway","title":"Deploy Langflow on Railway","description":"This guide explains how to deploy Langflow on Railway, a cloud infrastructure platform that provides auto-deploy, managed databases, and automatic scaling.","sidebar":"docs"},"Deployment/deployment-render":{"id":"Deployment/deployment-render","title":"Deploy Langflow on Render","description":"This guide explains how to deploy Langflow on Render, a cloud platform for deploying web applications and APIs.","sidebar":"docs"},"Develop/develop-application":{"id":"Develop/develop-application","title":"Develop an application in Langflow","description":"Follow this guide to learn how to build an application using Langflow.","sidebar":"docs"},"Develop/develop-overview":{"id":"Develop/develop-overview","title":"About developing and configuring Langflow applications","description":"The following pages provide information about how to develop and configure Langflow applications.","sidebar":"docs"},"Develop/install-custom-dependencies":{"id":"Develop/install-custom-dependencies","title":"Install custom dependencies","description":"To install custom dependencies in your Langflow environment, add them with your package manager.","sidebar":"docs"},"Develop/logging":{"id":"Develop/logging","title":"Logging options in Langflow","description":"Langflow uses the loguru library for logging.","sidebar":"docs"},"Develop/memory":{"id":"Develop/memory","title":"Memory management options","description":"Langflow provides flexible memory management options for storage and retrieval.","sidebar":"docs"},"Develop/session-id":{"id":"Develop/session-id","title":"Use session ID to manage communication between components","description":"Session ID is a unique identifier for client/server connections. A single session equals the duration of a client\'s connection to a server.","sidebar":"docs"},"Develop/webhook":{"id":"Develop/webhook","title":"Trigger flows with webhooks","description":"Add a Webhook component to your flow to trigger it with external requests.","sidebar":"docs"},"Get-Started/get-started-installation":{"id":"Get-Started/get-started-installation","title":"Install Langflow","description":"Langflow can be installed in three ways:","sidebar":"docs"},"Get-Started/get-started-quickstart":{"id":"Get-Started/get-started-quickstart","title":"Quickstart","description":"Get to know Langflow by building an OpenAI-powered chatbot application. After you\'ve constructed a chatbot, add Retrieval Augmented Generation (RAG) to chat with your own data.","sidebar":"docs"},"Get-Started/welcome-to-langflow":{"id":"Get-Started/welcome-to-langflow","title":"Welcome to Langflow","description":"Langflow is a new, visual framework for building multi-agent and RAG applications. It is open-source, Python-powered, fully customizable, and LLM and vector store agnostic.","sidebar":"docs"},"Integrations/Apify/integrations-apify":{"id":"Integrations/Apify/integrations-apify","title":"Apify","description":"Apify is a web scraping and data extraction platform. It provides an Actor Store with more than 3,000 ready-made cloud tools called Actors.","sidebar":"docs"},"Integrations/Arize/integrations-arize":{"id":"Integrations/Arize/integrations-arize","title":"Integrate Arize with Langflow","description":"Arize is a tool built on OpenTelemetry and OpenInference for monitoring and optimizing LLM applications.","sidebar":"docs"},"Integrations/Composio/integrations-composio":{"id":"Integrations/Composio/integrations-composio","title":"Integrate Composio with Langflow","description":"Langflow integrates with Composio as a toolset for your Agent component.","sidebar":"docs"},"Integrations/Google/integrations-setup-google-cloud-vertex-ai-langflow":{"id":"Integrations/Google/integrations-setup-google-cloud-vertex-ai-langflow","title":"Integrate Google Cloud Vertex AI with Langflow","description":"A comprehensive guide on creating a Google OAuth app, obtaining tokens, and integrating them with Langflow\'s Google components.","sidebar":"docs"},"Integrations/Google/integrations-setup-google-oauth-langflow":{"id":"Integrations/Google/integrations-setup-google-oauth-langflow","title":"Integrate Google OAuth with Langflow","description":"A comprehensive guide on creating a Google OAuth app, obtaining tokens, and integrating them with Langflow\'s Google components.","sidebar":"docs"},"Integrations/integrations-assemblyai":{"id":"Integrations/integrations-assemblyai","title":"AssemblyAI","description":"The AssemblyAI components allow you to apply powerful Speech AI models to your app for tasks like:","sidebar":"docs"},"Integrations/integrations-langfuse":{"id":"Integrations/integrations-langfuse","title":"Langfuse","description":"Langfuse (GitHub) is an open-source platform for LLM observability. It provides tracing and monitoring capabilities for AI applications, helping developers debug, analyze, and optimize their AI systems. Langfuse integrates with various tools and frameworks such as workflows builders like Langflow.","sidebar":"docs"},"Integrations/integrations-langsmith":{"id":"Integrations/integrations-langsmith","title":"LangSmith","description":"LangSmith is a full-lifecycle DevOps service from LangChain that provides monitoring and observability. To integrate with Langflow, just add your LangChain API key as a Langflow environment variable and you are good to go!","sidebar":"docs"},"Integrations/integrations-langwatch":{"id":"Integrations/integrations-langwatch","title":"LangWatch","description":"938674091aac4d9d9aa4aa6eb5c215b4}","sidebar":"docs"},"Integrations/integrations-opik":{"id":"Integrations/integrations-opik","title":"Opik","description":"Opik is an open-source platform designed for evaluating, testing, and monitoring large language model (LLM) applications. Developed by Comet, it aims to facilitate more intuitive collaboration, testing, and monitoring of LLM-based applications.","sidebar":"docs"},"Integrations/mcp-component-astra":{"id":"Integrations/mcp-component-astra","title":"Connect an Astra DB MCP server to Langflow","description":"Use the MCP server component to connect Langflow to a Datastax Astra DB MCP server.","sidebar":"docs"},"Integrations/Notion/integrations-notion":{"id":"Integrations/Notion/integrations-notion","title":"Setup","description":"To use Notion components in Langflow, you first need to create a Notion integration and configure it with the necessary capabilities. This guide will walk you through the process of setting up a Notion integration and granting it access to your Notion databases.","sidebar":"docs"},"Integrations/Notion/notion-agent-conversational":{"id":"Integrations/Notion/notion-agent-conversational","title":"Notion Conversational Agent","description":"The Notion Conversational Agent is an AI-powered assistant that interacts with your Notion workspace through natural language conversations. This flow performs Notion-related tasks like creating pages, searching for information, and managing content, all through a chat interface.","sidebar":"docs"},"Integrations/Notion/notion-agent-meeting-notes":{"id":"Integrations/Notion/notion-agent-meeting-notes","title":"Notion Meeting Notes Agent","description":"The Notion Agent for Meeting Notes is an AI-powered tool that automatically processes meeting transcripts and updates your Notion workspace. It identifies tasks, action items, and key points from your meetings, then creates new tasks or updates existing ones in Notion without manual input.","sidebar":"docs"},"Integrations/Nvidia/integrations-nvidia-ingest":{"id":"Integrations/Nvidia/integrations-nvidia-ingest","title":"Integrate NVIDIA Retriever Extraction with Langflow","description":"NVIDIA Retriever Extraction is also known as NV-Ingest and NeMo Retriever Extraction.","sidebar":"docs"},"Integrations/Nvidia/integrations-nvidia-nim-wsl2":{"id":"Integrations/Nvidia/integrations-nvidia-nim-wsl2","title":"Integrate NVIDIA NIMs with Langflow","description":"Connect Langflow with NVIDIA NIM on an RTX Windows system with Windows Subsystem for Linux 2 (WSL2) installed.","sidebar":"docs"},"Sample-Flows/blog-writer":{"id":"Sample-Flows/blog-writer","title":"Blog writer","description":"Build a Blog Writer flow for a one-shot application using OpenAI.","sidebar":"docs"},"Sample-Flows/document-qa":{"id":"Sample-Flows/document-qa","title":"Document QA","description":"Build a question-and-answer chatbot with a document loaded from local memory.","sidebar":"docs"},"Sample-Flows/memory-chatbot":{"id":"Sample-Flows/memory-chatbot","title":"Memory chatbot","description":"This flow extends the basic prompting flow with a Chat memory component that stores up to 100 previous chat messages and uses them to provide context for the current conversation.","sidebar":"docs"},"Sample-Flows/sequential-agent":{"id":"Sample-Flows/sequential-agent","title":"Sequential tasks agent","description":"Build a Sequential Tasks Agent flow for a multi-agent application using multiple Agent components.","sidebar":"docs"},"Sample-Flows/travel-planning-agent":{"id":"Sample-Flows/travel-planning-agent","title":"Travel planning agent","description":"Build a Travel Planning Agent flow for an agentic application using the multiple Tool-calling agents.","sidebar":"docs"},"Starter-Projects/starter-projects-basic-prompting":{"id":"Starter-Projects/starter-projects-basic-prompting","title":"Basic prompting","description":"Prompts serve as the inputs to a large language model (LLM), acting as the interface between human instructions and computational tasks.","sidebar":"docs"},"Starter-Projects/starter-projects-simple-agent":{"id":"Starter-Projects/starter-projects-simple-agent","title":"Simple agent","description":"Build a Simple Agent flow for an agentic application using the Tool-calling agent component.","sidebar":"docs"},"Starter-Projects/starter-projects-vector-store-rag":{"id":"Starter-Projects/starter-projects-vector-store-rag","title":"Vector store RAG","description":"Retrieval Augmented Generation, or RAG, is a pattern for training LLMs on your data and querying it.","sidebar":"docs"},"Support/luna-for-langflow":{"id":"Support/luna-for-langflow","title":"Luna for Langflow","description":"With Luna for Langflow support, you can develop and deploy Langflow applications with confidence.","sidebar":"docs"}}}}')}}]); \ No newline at end of file diff --git a/assets/js/2ab0d4f5.432fb3ac.js b/assets/js/2ab0d4f5.a45fbbd1.js similarity index 50% rename from assets/js/2ab0d4f5.432fb3ac.js rename to assets/js/2ab0d4f5.a45fbbd1.js index 158fd8af76..39110f559a 100644 --- a/assets/js/2ab0d4f5.432fb3ac.js +++ b/assets/js/2ab0d4f5.a45fbbd1.js @@ -1 +1 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[1845],{28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>o});var i=t(96540);const s={},r=i.createContext(s);function a(e){const n=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),i.createElement(r.Provider,{value:n},e.children)}},83640:(e,n,t)=>{t.r(n),t.d(n,{contentTitle:()=>o,default:()=>c,frontMatter:()=>a,metadata:()=>i,toc:()=>l});const i=JSON.parse('{"type":"api","id":"simplified-run-flow","title":"Simplified Run Flow","description":"","slug":"/simplified-run-flow","frontMatter":{},"api":{"tags":["Base"],"description":"Executes a specified flow by ID with support for streaming and telemetry.\\n\\nThis endpoint executes a flow identified by ID or name, with options for streaming the response\\nand tracking execution metrics. It handles both streaming and non-streaming execution modes.\\n\\nArgs:\\n background_tasks (BackgroundTasks): FastAPI background task manager\\n flow (FlowRead | None): The flow to execute, loaded via dependency\\n input_request (SimplifiedAPIRequest | None): Input parameters for the flow\\n stream (bool): Whether to stream the response\\n api_key_user (UserRead): Authenticated user from API key\\n request (Request): The incoming HTTP request\\n\\nReturns:\\n Union[StreamingResponse, RunResponse]: Either a streaming response for real-time results\\n or a RunResponse with the complete execution results\\n\\nRaises:\\n HTTPException: For flow not found (404) or invalid input (400)\\n APIException: For internal execution errors (500)\\n\\nNotes:\\n - Supports both streaming and non-streaming execution modes\\n - Tracks execution time and success/failure via telemetry\\n - Handles graceful client disconnection in streaming mode\\n - Provides detailed error handling with appropriate HTTP status codes\\n - In streaming mode, uses EventManager to handle events:\\n - \\"add_message\\": New messages during execution\\n - \\"token\\": Individual tokens during streaming\\n - \\"end\\": Final execution result","operationId":"simplified_run_flow_api_v1_run__flow_id_or_name__post","security":[{"API key query":[]},{"API key header":[]}],"parameters":[{"name":"flow_id_or_name","in":"path","required":true,"schema":{"type":"string","title":"Flow Id Or Name"}},{"name":"stream","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Stream"}},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"properties":{"input_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input Value","description":"The input value"},"input_type":{"anyOf":[{"type":"string","enum":["chat","text","any"]},{"type":"null"}],"title":"Input Type","description":"The input type","default":"chat"},"output_type":{"anyOf":[{"type":"string","enum":["chat","text","any","debug"]},{"type":"null"}],"title":"Output Type","description":"The output type","default":"chat"},"output_component":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Component","description":"If there are multiple output components, you can specify the component to get the output from.","default":""},"tweaks":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object"}]},"type":"object","title":"Tweaks","description":"A dictionary of tweaks to adjust the flow\'s execution. Allows customizing flow behavior dynamically. All tweaks are overridden by the input values.","examples":[{"Component Name":{"parameter_name":"value"},"component_id":{"parameter_name":"value"},"parameter_name":"value"}]},{"type":"null"}],"description":"The tweaks"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"The session id"}},"type":"object","title":"SimplifiedAPIRequest"},{"type":"null"}],"title":"Input Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}},"method":"post","path":"/api/v1/run/{flow_id_or_name}","securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"api/v1/login"}}},"API key query":{"type":"apiKey","in":"query","name":"x-api-key"},"API key header":{"type":"apiKey","in":"header","name":"x-api-key"}},"info":{"title":"Langflow","version":"1.4.0"},"postman":{"name":"Simplified Run Flow","description":{"content":"Executes a specified flow by ID with support for streaming and telemetry.\\n\\nThis endpoint executes a flow identified by ID or name, with options for streaming the response\\nand tracking execution metrics. It handles both streaming and non-streaming execution modes.\\n\\nArgs:\\n background_tasks (BackgroundTasks): FastAPI background task manager\\n flow (FlowRead | None): The flow to execute, loaded via dependency\\n input_request (SimplifiedAPIRequest | None): Input parameters for the flow\\n stream (bool): Whether to stream the response\\n api_key_user (UserRead): Authenticated user from API key\\n request (Request): The incoming HTTP request\\n\\nReturns:\\n Union[StreamingResponse, RunResponse]: Either a streaming response for real-time results\\n or a RunResponse with the complete execution results\\n\\nRaises:\\n HTTPException: For flow not found (404) or invalid input (400)\\n APIException: For internal execution errors (500)\\n\\nNotes:\\n - Supports both streaming and non-streaming execution modes\\n - Tracks execution time and success/failure via telemetry\\n - Handles graceful client disconnection in streaming mode\\n - Provides detailed error handling with appropriate HTTP status codes\\n - In streaming mode, uses EventManager to handle events:\\n - \\"add_message\\": New messages during execution\\n - \\"token\\": Individual tokens during streaming\\n - \\"end\\": Final execution result","type":"text/plain"},"url":{"path":["api","v1","run",":flow_id_or_name"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"key":"stream","value":"false"},{"disabled":false,"key":"user_id","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"flow_id_or_name"}]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"{\\n \\"input_value\\": \\"\\",\\n \\"input_type\\": \\"\\",\\n \\"output_type\\": \\"\\",\\n \\"output_component\\": \\"\\",\\n \\"tweaks\\": {\\n \\"doa9\\": \\"\\"\\n },\\n \\"session_id\\": \\"\\"\\n}","options":{"raw":{"language":"json"}}},"auth":{"type":"apikey","apikey":[{"type":"any","value":"x-api-key","key":"key"},{"type":"any","value":"{{apiKey}}","key":"value"},{"type":"any","value":"query","key":"in"}]}}},"source":"@site/openapi.json","sourceDirName":".","permalink":"/api/simplified-run-flow","previous":{"title":"Get All","permalink":"/api/get-all"},"next":{"title":"Webhook Run Flow","permalink":"/api/webhook-run-flow"}}');var s=t(74848),r=t(28453);const a={},o="Simplified Run Flow",l=[];function d(e){const n={h1:"h1",header:"header",li:"li",p:"p",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"simplified-run-flow",children:"Simplified Run Flow"})}),"\n",(0,s.jsx)(n.p,{children:"Executes a specified flow by ID with support for streaming and telemetry."}),"\n",(0,s.jsx)(n.p,{children:"This endpoint executes a flow identified by ID or name, with options for streaming the response\nand tracking execution metrics. It handles both streaming and non-streaming execution modes."}),"\n",(0,s.jsx)(n.p,{children:"Args:\nbackground_tasks (BackgroundTasks): FastAPI background task manager\nflow (FlowRead | None): The flow to execute, loaded via dependency\ninput_request (SimplifiedAPIRequest | None): Input parameters for the flow\nstream (bool): Whether to stream the response\napi_key_user (UserRead): Authenticated user from API key\nrequest (Request): The incoming HTTP request"}),"\n",(0,s.jsx)(n.p,{children:"Returns:\nUnion[StreamingResponse, RunResponse]: Either a streaming response for real-time results\nor a RunResponse with the complete execution results"}),"\n",(0,s.jsx)(n.p,{children:"Raises:\nHTTPException: For flow not found (404) or invalid input (400)\nAPIException: For internal execution errors (500)"}),"\n",(0,s.jsx)(n.p,{children:"Notes:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Supports both streaming and non-streaming execution modes"}),"\n",(0,s.jsx)(n.li,{children:"Tracks execution time and success/failure via telemetry"}),"\n",(0,s.jsx)(n.li,{children:"Handles graceful client disconnection in streaming mode"}),"\n",(0,s.jsx)(n.li,{children:"Provides detailed error handling with appropriate HTTP status codes"}),"\n",(0,s.jsxs)(n.li,{children:["In streaming mode, uses EventManager to handle events:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:'"add_message": New messages during execution'}),"\n",(0,s.jsx)(n.li,{children:'"token": Individual tokens during streaming'}),"\n",(0,s.jsx)(n.li,{children:'"end": Final execution result'}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)("table",{style:{display:"table",width:"100%"},children:[(0,s.jsx)("thead",{children:(0,s.jsx)("tr",{children:(0,s.jsx)("th",{style:{textAlign:"left"},children:"Path Parameters"})})}),(0,s.jsx)("tbody",{children:(0,s.jsx)("tr",{children:(0,s.jsxs)("td",{children:[(0,s.jsx)("code",{children:"flow_id_or_name"}),(0,s.jsx)("span",{style:{opacity:"0.6"},children:" Flow Id Or Name"}),(0,s.jsx)("span",{style:{opacity:"0.6"},children:" \u2014 "}),(0,s.jsx)("strong",{style:{fontSize:"var(--ifm-code-font-size)",color:"var(--openapi-required)"},children:" REQUIRED"})]})})})]}),"\n",(0,s.jsxs)("table",{style:{display:"table",width:"100%"},children:[(0,s.jsx)("thead",{children:(0,s.jsx)("tr",{children:(0,s.jsx)("th",{style:{textAlign:"left"},children:"Query Parameters"})})}),(0,s.jsxs)("tbody",{children:[(0,s.jsx)("tr",{children:(0,s.jsxs)("td",{children:[(0,s.jsx)("code",{children:"stream"}),(0,s.jsx)("span",{style:{opacity:"0.6"},children:" Stream"})]})}),(0,s.jsx)("tr",{children:(0,s.jsxs)("td",{children:[(0,s.jsx)("code",{children:"user_id"}),(0,s.jsx)("span",{style:{opacity:"0.6"},children:" User Id"})]})})]})]}),"\n",(0,s.jsxs)("table",{style:{display:"table",width:"100%"},children:[(0,s.jsx)("thead",{children:(0,s.jsx)("tr",{children:(0,s.jsxs)("th",{style:{textAlign:"left"},children:[(0,s.jsx)("span",{children:"Request Body "}),(0,s.jsx)("div",{})]})})}),(0,s.jsx)("tbody",{children:(0,s.jsx)("tr",{children:(0,s.jsx)("td",{children:(0,s.jsx)("span",{style:{opacity:"0.6"},children:" undefined"})})})})]}),"\n",(0,s.jsxs)("table",{style:{display:"table",width:"100%"},children:[(0,s.jsx)("thead",{children:(0,s.jsx)("tr",{children:(0,s.jsx)("th",{style:{textAlign:"left"},children:"Responses"})})}),(0,s.jsxs)("tbody",{children:[(0,s.jsx)("tr",{children:(0,s.jsxs)("td",{children:[(0,s.jsxs)("div",{style:{display:"flex"},children:[(0,s.jsx)("div",{style:{marginRight:"var(--ifm-table-cell-padding)"},children:(0,s.jsx)("code",{children:"200"})}),(0,s.jsx)("div",{children:(0,s.jsx)(n.p,{children:"Successful Response"})})]}),(0,s.jsx)("div",{children:(0,s.jsxs)("table",{style:{display:"table",width:"100%",marginTop:"var(--ifm-table-cell-padding)",marginBottom:"0px"},children:[(0,s.jsx)("thead",{children:(0,s.jsx)("tr",{children:(0,s.jsxs)("th",{style:{textAlign:"left"},children:[(0,s.jsx)("span",{children:"Schema "}),(0,s.jsx)("span",{style:{opacity:"0.6"},children:" \u2014 "}),(0,s.jsx)("strong",{style:{fontSize:"var(--ifm-code-font-size)",color:"var(--openapi-optional)"},children:" OPTIONAL"}),(0,s.jsx)("div",{})]})})}),(0,s.jsx)("tbody",{children:(0,s.jsx)("tr",{children:(0,s.jsx)("td",{children:(0,s.jsx)("span",{style:{opacity:"0.6"},children:" undefined"})})})})]})})]})}),(0,s.jsx)("tr",{children:(0,s.jsxs)("td",{children:[(0,s.jsxs)("div",{style:{display:"flex"},children:[(0,s.jsx)("div",{style:{marginRight:"var(--ifm-table-cell-padding)"},children:(0,s.jsx)("code",{children:"422"})}),(0,s.jsx)("div",{children:(0,s.jsx)(n.p,{children:"Validation Error"})})]}),(0,s.jsx)("div",{children:(0,s.jsxs)("table",{style:{display:"table",width:"100%",marginTop:"var(--ifm-table-cell-padding)",marginBottom:"0px"},children:[(0,s.jsx)("thead",{children:(0,s.jsx)("tr",{children:(0,s.jsxs)("th",{style:{textAlign:"left"},children:[(0,s.jsx)("span",{children:"Schema "}),(0,s.jsx)("span",{style:{opacity:"0.6"},children:" \u2014 "}),(0,s.jsx)("strong",{style:{fontSize:"var(--ifm-code-font-size)",color:"var(--openapi-optional)"},children:" OPTIONAL"}),(0,s.jsx)("div",{})]})})}),(0,s.jsx)("tbody",{children:(0,s.jsx)("tr",{children:(0,s.jsxs)("td",{children:[(0,s.jsx)("code",{children:"detail"}),(0,s.jsx)("span",{style:{opacity:"0.6"},children:" object[]"}),(0,s.jsx)("span",{style:{opacity:"0.6"},children:" \u2014 "}),(0,s.jsx)("strong",{style:{fontSize:"var(--ifm-code-font-size)",color:"var(--openapi-optional)"},children:" OPTIONAL"}),(0,s.jsx)("table",{style:{display:"table",width:"100%",marginTop:"var(--ifm-table-cell-padding)",marginBottom:"0px"},children:(0,s.jsxs)("tbody",{children:[(0,s.jsx)("tr",{children:(0,s.jsxs)("td",{children:[(0,s.jsx)("code",{children:"loc"}),(0,s.jsx)("span",{style:{opacity:"0.6"},children:" undefined[]"})]})}),(0,s.jsx)("tr",{children:(0,s.jsxs)("td",{children:[(0,s.jsx)("code",{children:"msg"}),(0,s.jsx)("span",{style:{opacity:"0.6"},children:" Message"})]})}),(0,s.jsx)("tr",{children:(0,s.jsxs)("td",{children:[(0,s.jsx)("code",{children:"type"}),(0,s.jsx)("span",{style:{opacity:"0.6"},children:" Error Type"})]})})]})})]})})})]})})]})})]})]})]})}function c(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}}}]); \ No newline at end of file +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[1845],{28453:(e,n,t)=>{t.d(n,{R:()=>a,x:()=>o});var i=t(96540);const s={},r=i.createContext(s);function a(e){const n=i.useContext(r);return i.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),i.createElement(r.Provider,{value:n},e.children)}},83640:(e,n,t)=>{t.r(n),t.d(n,{contentTitle:()=>o,default:()=>c,frontMatter:()=>a,metadata:()=>i,toc:()=>l});const i=JSON.parse('{"type":"api","id":"simplified-run-flow","title":"Simplified Run Flow","description":"","slug":"/simplified-run-flow","frontMatter":{},"api":{"tags":["Base"],"description":"Executes a specified flow by ID with support for streaming and telemetry.\\n\\nThis endpoint executes a flow identified by ID or name, with options for streaming the response\\nand tracking execution metrics. It handles both streaming and non-streaming execution modes.\\n\\nArgs:\\n background_tasks (BackgroundTasks): FastAPI background task manager\\n flow (FlowRead | None): The flow to execute, loaded via dependency\\n input_request (SimplifiedAPIRequest | None): Input parameters for the flow\\n stream (bool): Whether to stream the response\\n api_key_user (UserRead): Authenticated user from API key\\n request (Request): The incoming HTTP request\\n\\nReturns:\\n Union[StreamingResponse, RunResponse]: Either a streaming response for real-time results\\n or a RunResponse with the complete execution results\\n\\nRaises:\\n HTTPException: For flow not found (404) or invalid input (400)\\n APIException: For internal execution errors (500)\\n\\nNotes:\\n - Supports both streaming and non-streaming execution modes\\n - Tracks execution time and success/failure via telemetry\\n - Handles graceful client disconnection in streaming mode\\n - Provides detailed error handling with appropriate HTTP status codes\\n - In streaming mode, uses EventManager to handle events:\\n - \\"add_message\\": New messages during execution\\n - \\"token\\": Individual tokens during streaming\\n - \\"end\\": Final execution result","operationId":"simplified_run_flow_api_v1_run__flow_id_or_name__post","security":[{"API key query":[]},{"API key header":[]}],"parameters":[{"name":"flow_id_or_name","in":"path","required":true,"schema":{"type":"string","title":"Flow Id Or Name"}},{"name":"stream","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Stream"}},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"properties":{"input_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input Value","description":"The input value"},"input_type":{"anyOf":[{"type":"string","enum":["chat","text","any"]},{"type":"null"}],"title":"Input Type","description":"The input type","default":"chat"},"output_type":{"anyOf":[{"type":"string","enum":["chat","text","any","debug"]},{"type":"null"}],"title":"Output Type","description":"The output type","default":"chat"},"output_component":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Output Component","description":"If there are multiple output components, you can specify the component to get the output from.","default":""},"tweaks":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object"}]},"type":"object","title":"Tweaks","description":"A dictionary of tweaks to adjust the flow\'s execution. Allows customizing flow behavior dynamically. All tweaks are overridden by the input values.","examples":[{"Component Name":{"parameter_name":"value"},"component_id":{"parameter_name":"value"},"parameter_name":"value"}]},{"type":"null"}],"description":"The tweaks"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id","description":"The session id"}},"type":"object","title":"SimplifiedAPIRequest"},{"type":"null"}],"title":"Input Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}},"method":"post","path":"/api/v1/run/{flow_id_or_name}","securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"api/v1/login"}}},"API key query":{"type":"apiKey","in":"query","name":"x-api-key"},"API key header":{"type":"apiKey","in":"header","name":"x-api-key"}},"info":{"title":"Langflow","version":"1.4.0"},"postman":{"name":"Simplified Run Flow","description":{"content":"Executes a specified flow by ID with support for streaming and telemetry.\\n\\nThis endpoint executes a flow identified by ID or name, with options for streaming the response\\nand tracking execution metrics. It handles both streaming and non-streaming execution modes.\\n\\nArgs:\\n background_tasks (BackgroundTasks): FastAPI background task manager\\n flow (FlowRead | None): The flow to execute, loaded via dependency\\n input_request (SimplifiedAPIRequest | None): Input parameters for the flow\\n stream (bool): Whether to stream the response\\n api_key_user (UserRead): Authenticated user from API key\\n request (Request): The incoming HTTP request\\n\\nReturns:\\n Union[StreamingResponse, RunResponse]: Either a streaming response for real-time results\\n or a RunResponse with the complete execution results\\n\\nRaises:\\n HTTPException: For flow not found (404) or invalid input (400)\\n APIException: For internal execution errors (500)\\n\\nNotes:\\n - Supports both streaming and non-streaming execution modes\\n - Tracks execution time and success/failure via telemetry\\n - Handles graceful client disconnection in streaming mode\\n - Provides detailed error handling with appropriate HTTP status codes\\n - In streaming mode, uses EventManager to handle events:\\n - \\"add_message\\": New messages during execution\\n - \\"token\\": Individual tokens during streaming\\n - \\"end\\": Final execution result","type":"text/plain"},"url":{"path":["api","v1","run",":flow_id_or_name"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"key":"stream","value":"false"},{"disabled":false,"key":"user_id","value":""}],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"flow_id_or_name"}]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"{\\n \\"input_value\\": \\"\\",\\n \\"input_type\\": \\"\\",\\n \\"output_type\\": \\"\\",\\n \\"output_component\\": \\"\\",\\n \\"tweaks\\": {\\n \\"minim2\\": \\"\\",\\n \\"animc\\": \\"\\"\\n },\\n \\"session_id\\": \\"\\"\\n}","options":{"raw":{"language":"json"}}},"auth":{"type":"apikey","apikey":[{"type":"any","value":"x-api-key","key":"key"},{"type":"any","value":"{{apiKey}}","key":"value"},{"type":"any","value":"query","key":"in"}]}}},"source":"@site/openapi.json","sourceDirName":".","permalink":"/api/simplified-run-flow","previous":{"title":"Get All","permalink":"/api/get-all"},"next":{"title":"Webhook Run Flow","permalink":"/api/webhook-run-flow"}}');var s=t(74848),r=t(28453);const a={},o="Simplified Run Flow",l=[];function d(e){const n={h1:"h1",header:"header",li:"li",p:"p",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"simplified-run-flow",children:"Simplified Run Flow"})}),"\n",(0,s.jsx)(n.p,{children:"Executes a specified flow by ID with support for streaming and telemetry."}),"\n",(0,s.jsx)(n.p,{children:"This endpoint executes a flow identified by ID or name, with options for streaming the response\nand tracking execution metrics. It handles both streaming and non-streaming execution modes."}),"\n",(0,s.jsx)(n.p,{children:"Args:\nbackground_tasks (BackgroundTasks): FastAPI background task manager\nflow (FlowRead | None): The flow to execute, loaded via dependency\ninput_request (SimplifiedAPIRequest | None): Input parameters for the flow\nstream (bool): Whether to stream the response\napi_key_user (UserRead): Authenticated user from API key\nrequest (Request): The incoming HTTP request"}),"\n",(0,s.jsx)(n.p,{children:"Returns:\nUnion[StreamingResponse, RunResponse]: Either a streaming response for real-time results\nor a RunResponse with the complete execution results"}),"\n",(0,s.jsx)(n.p,{children:"Raises:\nHTTPException: For flow not found (404) or invalid input (400)\nAPIException: For internal execution errors (500)"}),"\n",(0,s.jsx)(n.p,{children:"Notes:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Supports both streaming and non-streaming execution modes"}),"\n",(0,s.jsx)(n.li,{children:"Tracks execution time and success/failure via telemetry"}),"\n",(0,s.jsx)(n.li,{children:"Handles graceful client disconnection in streaming mode"}),"\n",(0,s.jsx)(n.li,{children:"Provides detailed error handling with appropriate HTTP status codes"}),"\n",(0,s.jsxs)(n.li,{children:["In streaming mode, uses EventManager to handle events:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:'"add_message": New messages during execution'}),"\n",(0,s.jsx)(n.li,{children:'"token": Individual tokens during streaming'}),"\n",(0,s.jsx)(n.li,{children:'"end": Final execution result'}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)("table",{style:{display:"table",width:"100%"},children:[(0,s.jsx)("thead",{children:(0,s.jsx)("tr",{children:(0,s.jsx)("th",{style:{textAlign:"left"},children:"Path Parameters"})})}),(0,s.jsx)("tbody",{children:(0,s.jsx)("tr",{children:(0,s.jsxs)("td",{children:[(0,s.jsx)("code",{children:"flow_id_or_name"}),(0,s.jsx)("span",{style:{opacity:"0.6"},children:" Flow Id Or Name"}),(0,s.jsx)("span",{style:{opacity:"0.6"},children:" \u2014 "}),(0,s.jsx)("strong",{style:{fontSize:"var(--ifm-code-font-size)",color:"var(--openapi-required)"},children:" REQUIRED"})]})})})]}),"\n",(0,s.jsxs)("table",{style:{display:"table",width:"100%"},children:[(0,s.jsx)("thead",{children:(0,s.jsx)("tr",{children:(0,s.jsx)("th",{style:{textAlign:"left"},children:"Query Parameters"})})}),(0,s.jsxs)("tbody",{children:[(0,s.jsx)("tr",{children:(0,s.jsxs)("td",{children:[(0,s.jsx)("code",{children:"stream"}),(0,s.jsx)("span",{style:{opacity:"0.6"},children:" Stream"})]})}),(0,s.jsx)("tr",{children:(0,s.jsxs)("td",{children:[(0,s.jsx)("code",{children:"user_id"}),(0,s.jsx)("span",{style:{opacity:"0.6"},children:" User Id"})]})})]})]}),"\n",(0,s.jsxs)("table",{style:{display:"table",width:"100%"},children:[(0,s.jsx)("thead",{children:(0,s.jsx)("tr",{children:(0,s.jsxs)("th",{style:{textAlign:"left"},children:[(0,s.jsx)("span",{children:"Request Body "}),(0,s.jsx)("div",{})]})})}),(0,s.jsx)("tbody",{children:(0,s.jsx)("tr",{children:(0,s.jsx)("td",{children:(0,s.jsx)("span",{style:{opacity:"0.6"},children:" undefined"})})})})]}),"\n",(0,s.jsxs)("table",{style:{display:"table",width:"100%"},children:[(0,s.jsx)("thead",{children:(0,s.jsx)("tr",{children:(0,s.jsx)("th",{style:{textAlign:"left"},children:"Responses"})})}),(0,s.jsxs)("tbody",{children:[(0,s.jsx)("tr",{children:(0,s.jsxs)("td",{children:[(0,s.jsxs)("div",{style:{display:"flex"},children:[(0,s.jsx)("div",{style:{marginRight:"var(--ifm-table-cell-padding)"},children:(0,s.jsx)("code",{children:"200"})}),(0,s.jsx)("div",{children:(0,s.jsx)(n.p,{children:"Successful Response"})})]}),(0,s.jsx)("div",{children:(0,s.jsxs)("table",{style:{display:"table",width:"100%",marginTop:"var(--ifm-table-cell-padding)",marginBottom:"0px"},children:[(0,s.jsx)("thead",{children:(0,s.jsx)("tr",{children:(0,s.jsxs)("th",{style:{textAlign:"left"},children:[(0,s.jsx)("span",{children:"Schema "}),(0,s.jsx)("span",{style:{opacity:"0.6"},children:" \u2014 "}),(0,s.jsx)("strong",{style:{fontSize:"var(--ifm-code-font-size)",color:"var(--openapi-optional)"},children:" OPTIONAL"}),(0,s.jsx)("div",{})]})})}),(0,s.jsx)("tbody",{children:(0,s.jsx)("tr",{children:(0,s.jsx)("td",{children:(0,s.jsx)("span",{style:{opacity:"0.6"},children:" undefined"})})})})]})})]})}),(0,s.jsx)("tr",{children:(0,s.jsxs)("td",{children:[(0,s.jsxs)("div",{style:{display:"flex"},children:[(0,s.jsx)("div",{style:{marginRight:"var(--ifm-table-cell-padding)"},children:(0,s.jsx)("code",{children:"422"})}),(0,s.jsx)("div",{children:(0,s.jsx)(n.p,{children:"Validation Error"})})]}),(0,s.jsx)("div",{children:(0,s.jsxs)("table",{style:{display:"table",width:"100%",marginTop:"var(--ifm-table-cell-padding)",marginBottom:"0px"},children:[(0,s.jsx)("thead",{children:(0,s.jsx)("tr",{children:(0,s.jsxs)("th",{style:{textAlign:"left"},children:[(0,s.jsx)("span",{children:"Schema "}),(0,s.jsx)("span",{style:{opacity:"0.6"},children:" \u2014 "}),(0,s.jsx)("strong",{style:{fontSize:"var(--ifm-code-font-size)",color:"var(--openapi-optional)"},children:" OPTIONAL"}),(0,s.jsx)("div",{})]})})}),(0,s.jsx)("tbody",{children:(0,s.jsx)("tr",{children:(0,s.jsxs)("td",{children:[(0,s.jsx)("code",{children:"detail"}),(0,s.jsx)("span",{style:{opacity:"0.6"},children:" object[]"}),(0,s.jsx)("span",{style:{opacity:"0.6"},children:" \u2014 "}),(0,s.jsx)("strong",{style:{fontSize:"var(--ifm-code-font-size)",color:"var(--openapi-optional)"},children:" OPTIONAL"}),(0,s.jsx)("table",{style:{display:"table",width:"100%",marginTop:"var(--ifm-table-cell-padding)",marginBottom:"0px"},children:(0,s.jsxs)("tbody",{children:[(0,s.jsx)("tr",{children:(0,s.jsxs)("td",{children:[(0,s.jsx)("code",{children:"loc"}),(0,s.jsx)("span",{style:{opacity:"0.6"},children:" undefined[]"})]})}),(0,s.jsx)("tr",{children:(0,s.jsxs)("td",{children:[(0,s.jsx)("code",{children:"msg"}),(0,s.jsx)("span",{style:{opacity:"0.6"},children:" Message"})]})}),(0,s.jsx)("tr",{children:(0,s.jsxs)("td",{children:[(0,s.jsx)("code",{children:"type"}),(0,s.jsx)("span",{style:{opacity:"0.6"},children:" Error Type"})]})})]})})]})})})]})})]})})]})]})]})}function c(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}}}]); \ No newline at end of file diff --git a/assets/js/873ebc27.ddc13f75.js b/assets/js/873ebc27.ddc13f75.js new file mode 100644 index 0000000000..505b3ccb54 --- /dev/null +++ b/assets/js/873ebc27.ddc13f75.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[5572],{42439:(o,e,t)=>{t.r(e),t.d(e,{CH:()=>d,assets:()=>i,chCodeConfig:()=>a,contentTitle:()=>p,default:()=>u,frontMatter:()=>c,metadata:()=>n,toc:()=>h});const n=JSON.parse('{"id":"Components/components-custom-components","title":"Create custom Python components","description":"Custom components extend Langflow\'s functionality through Python classes that inherit from Component. This enables integration of new features, data manipulation, external services, and specialized tools.","source":"@site/docs/Components/components-custom-components.md","sourceDirName":"Components","slug":"/components-custom-components","permalink":"/components-custom-components","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Create custom Python components","slug":"/components-custom-components"},"sidebar":"docs","previous":{"title":"Bundles","permalink":"/components-bundle-components"},"next":{"title":"Data","permalink":"/components-data"}}');var s=t(74848),r=t(28453),l=t(24754);const c={title:"Create custom Python components",slug:"/components-custom-components"},p=void 0,i={},d={annotations:l.hk,Code:l.Cy},a={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},h=[{value:"Class-level attributes",id:"class-level-attributes",level:2},{value:"Structure of a custom component",id:"structure-of-a-custom-component",level:3},{value:"Internal Lifecycle and Execution Flow",id:"internal-lifecycle-and-execution-flow",level:3},{value:"Inputs and outputs",id:"inputs-and-outputs",level:3},{value:"Associated Methods",id:"associated-methods",level:3},{value:"Components with multiple outputs",id:"components-with-multiple-outputs",level:3},{value:"Common internal patterns",id:"common-internal-patterns",level:3},{value:"_pre_run_setup()",id:"_pre_run_setup",level:4},{value:"Override run or _run",id:"override-run-or-_run",level:4},{value:"Store data in self.ctx",id:"store-data-in-selfctx",level:4},{value:"Directory structure requirements",id:"directory-structure-requirements",level:2},{value:"Custom component inputs and outputs",id:"custom-component-inputs-and-outputs",level:2},{value:"Inputs",id:"inputs",level:3},{value:"Outputs",id:"outputs",level:3},{value:"Tool mode",id:"tool-mode",level:3},{value:"Typed annotations",id:"typed-annotations",level:2},{value:"Common Return Types",id:"common-return-types",level:3},{value:"Tips for typed annotations",id:"tips-for-typed-annotations",level:3},{value:"Enable dynamic fields",id:"enable-dynamic-fields",level:2},{value:"Implement update_build_config",id:"implement-update_build_config",level:3},{value:"Additional Dynamic Field Controls",id:"additional-dynamic-field-controls",level:3},{value:"Tips for Managing Dynamic Fields",id:"tips-for-managing-dynamic-fields",level:3},{value:"Error handling and logging",id:"error-handling-and-logging",level:2},{value:"Error handling techniques",id:"error-handling-techniques",level:3},{value:"Improve debugging and flow management",id:"improve-debugging-and-flow-management",level:3},{value:"Tips for error handling and logging",id:"tips-for-error-handling-and-logging",level:3},{value:"Contribute custom components to Langflow",id:"contribute-custom-components-to-langflow",level:2}];function y(o){const e={a:"a",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",li:"li",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...o.components};return d||F("CH",!1),d.Code||F("CH.Code",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n",(0,s.jsxs)(e.p,{children:["Custom components extend Langflow's functionality through Python classes that inherit from ",(0,s.jsx)(e.code,{children:"Component"}),". This enables integration of new features, data manipulation, external services, and specialized tools."]}),"\n",(0,s.jsx)(e.p,{children:'In Langflow\'s node-based environment, each node is a "component" that performs discrete functions. Custom components are Python classes which define:'}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Inputs"})," \u2014 Data or parameters your component requires."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Outputs"})," \u2014 Data your component provides to downstream nodes."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Logic"})," \u2014 How you process inputs to produce outputs."]}),"\n"]}),"\n",(0,s.jsx)(e.p,{children:"The benefits of creating custom components include unlimited extensibility, reusability, automatic UI field generation based on inputs, and type-safe connections between nodes."}),"\n",(0,s.jsx)(e.p,{children:"Create custom components for performing specialized tasks, calling APIs, or adding advanced logic."}),"\n",(0,s.jsx)(e.p,{children:"Custom components in Langflow are built upon:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:["The Python class that inherits from ",(0,s.jsx)(e.code,{children:"Component"}),"."]}),"\n",(0,s.jsx)(e.li,{children:"Class-level attributes that identify and describe the component."}),"\n",(0,s.jsx)(e.li,{children:"Input and output lists that determine data flow."}),"\n",(0,s.jsx)(e.li,{children:"Internal variables for logging and advanced logic."}),"\n"]}),"\n",(0,s.jsx)(e.h2,{id:"class-level-attributes",children:"Class-level attributes"}),"\n",(0,s.jsx)(e.p,{children:"Define these attributes to control a custom component's appearance and behavior:"}),"\n",(0,s.jsx)(d.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"class ",props:{style:{color:"#FF7B72"}}},{content:"MyCsvReader",props:{style:{color:"#FFA657"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"Component",props:{style:{color:"#79C0FF"}}},{content:"):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"CSV Reader" ',props:{style:{color:"#A5D6FF"}}},{content:"# Shown in node header",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" description ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"Reads CSV files" ',props:{style:{color:"#A5D6FF"}}},{content:"# Tooltip text",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" icon ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"file-text" ',props:{style:{color:"#A5D6FF"}}},{content:"# Visual identifier",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" name ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"CSVReader" ',props:{style:{color:"#A5D6FF"}}},{content:"# Unique internal ID",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" documentation ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"http://docs.example.com/csv_reader" ',props:{style:{color:"#A5D6FF"}}},{content:"# Optional",props:{style:{color:"#8B949E"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"display_name"}),": A user-friendly label in the node header."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"description"}),": A brief summary shown in tooltips."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"icon"}),": A visual identifier from Langflow's icon library."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"name"}),": A unique internal identifier."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"documentation"}),": An optional link to external docs."]}),"\n"]}),"\n",(0,s.jsx)(e.h3,{id:"structure-of-a-custom-component",children:"Structure of a custom component"}),"\n",(0,s.jsxs)(e.p,{children:["A ",(0,s.jsx)(e.strong,{children:"Langflow custom component"})," goes beyond a simple class with inputs and outputs. It includes an internal structure with optional lifecycle steps, output generation, front-end interaction, and logic organization."]}),"\n",(0,s.jsx)(e.p,{children:"A basic component:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:["Inherits from ",(0,s.jsx)(e.code,{children:"langflow.custom.Component"}),"."]}),"\n",(0,s.jsxs)(e.li,{children:["Declares metadata like ",(0,s.jsx)(e.code,{children:"display_name"}),", ",(0,s.jsx)(e.code,{children:"description"}),", ",(0,s.jsx)(e.code,{children:"icon"}),", and more."]}),"\n",(0,s.jsxs)(e.li,{children:["Defines ",(0,s.jsx)(e.code,{children:"inputs"})," and ",(0,s.jsx)(e.code,{children:"outputs"})," lists."]}),"\n",(0,s.jsx)(e.li,{children:"Implements methods matching output specifications."}),"\n"]}),"\n",(0,s.jsx)(e.p,{children:"A minimal custom component skeleton contains the following:"}),"\n",(0,s.jsx)(d.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.custom ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Component",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.template ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Output",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"class ",props:{style:{color:"#FF7B72"}}},{content:"MyComponent",props:{style:{color:"#FFA657"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"Component",props:{style:{color:"#79C0FF"}}},{content:"):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"My Component"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" description ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"A short summary."',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" icon ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"sparkles"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" name ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"MyComponent"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" inputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" []",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" outputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" []",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" def ",props:{style:{color:"#FF7B72"}}},{content:"some_output_method",props:{style:{color:"#D2A8FF"}}},{content:"(self):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return ",props:{style:{color:"#FF7B72"}}},{content:"...",props:{style:{color:"#79C0FF"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(e.h3,{id:"internal-lifecycle-and-execution-flow",children:"Internal Lifecycle and Execution Flow"}),"\n",(0,s.jsx)(e.p,{children:"Langflow's engine manages:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Instantiation"}),": A component is created and internal structures are initialized."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Assigning Inputs"}),": Values from the UI or connections are assigned to component fields."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Validation and Setup"}),": Optional hooks like ",(0,s.jsx)(e.code,{children:"_pre_run_setup"}),"."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Outputs Generation"}),": ",(0,s.jsx)(e.code,{children:"run()"})," or ",(0,s.jsx)(e.code,{children:"build_results()"})," triggers output methods."]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Optional Hooks"}),":"]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"initialize_data"})," or ",(0,s.jsx)(e.code,{children:"_pre_run_setup"})," can run setup logic before the component's main execution."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"__call__"}),", ",(0,s.jsx)(e.code,{children:"run()"}),", or ",(0,s.jsx)(e.code,{children:"_run()"})," can be overridden to customize how the component is called or to define custom execution logic."]}),"\n"]}),"\n",(0,s.jsx)(e.h3,{id:"inputs-and-outputs",children:"Inputs and outputs"}),"\n",(0,s.jsx)(e.p,{children:"Custom component inputs are defined with properties like:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"name"}),", ",(0,s.jsx)(e.code,{children:"display_name"})]}),"\n",(0,s.jsxs)(e.li,{children:["Optional: ",(0,s.jsx)(e.code,{children:"info"}),", ",(0,s.jsx)(e.code,{children:"value"}),", ",(0,s.jsx)(e.code,{children:"advanced"}),", ",(0,s.jsx)(e.code,{children:"is_list"}),", ",(0,s.jsx)(e.code,{children:"tool_mode"}),", ",(0,s.jsx)(e.code,{children:"real_time_refresh"})]}),"\n"]}),"\n",(0,s.jsx)(e.p,{children:"For example:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"StrInput"}),": simple text input."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"DropdownInput"}),": selectable options."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"HandleInput"}),": specialized connections."]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:["Custom component ",(0,s.jsx)(e.code,{children:"Output"})," properties define:"]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"name"}),", ",(0,s.jsx)(e.code,{children:"display_name"}),", ",(0,s.jsx)(e.code,{children:"method"})]}),"\n",(0,s.jsxs)(e.li,{children:["Optional: ",(0,s.jsx)(e.code,{children:"info"})]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:["For more information, see ",(0,s.jsx)(e.a,{href:"/components-custom-components#custom-component-inputs-and-outputs",children:"Custom component inputs and outputs"}),"."]}),"\n",(0,s.jsx)(e.h3,{id:"associated-methods",children:"Associated Methods"}),"\n",(0,s.jsx)(e.p,{children:"Each output is linked to a method:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:"The output method name must match the method name."}),"\n",(0,s.jsx)(e.li,{children:"The method typically returns objects like Message, Data, or DataFrame."}),"\n",(0,s.jsxs)(e.li,{children:["The method can use inputs with ",(0,s.jsx)(e.code,{children:"self."}),"."]}),"\n"]}),"\n",(0,s.jsx)(e.p,{children:"For example:"}),"\n",(0,s.jsx)(d.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Output(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"File Contents"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"file_contents"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" method",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"read_file"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:")",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"#...",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"read_file",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> Data:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" path ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".filename",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" with ",props:{style:{color:"#FF7B72"}}},{content:"open",props:{style:{color:"#79C0FF"}}},{content:"(path, ",props:{style:{color:"#C9D1D9"}}},{content:'"r"',props:{style:{color:"#A5D6FF"}}},{content:") ",props:{style:{color:"#C9D1D9"}}},{content:"as",props:{style:{color:"#FF7B72"}}},{content:" f:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" content ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" f.read()",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" self",props:{style:{color:"#79C0FF"}}},{content:".status ",props:{style:{color:"#C9D1D9"}}},{content:"= f",props:{style:{color:"#FF7B72"}}},{content:'"Read ',props:{style:{color:"#A5D6FF"}}},{content:"{len",props:{style:{color:"#79C0FF"}}},{content:"(content)",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:" chars from ",props:{style:{color:"#A5D6FF"}}},{content:"{",props:{style:{color:"#79C0FF"}}},{content:"path",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" Data(",props:{style:{color:"#C9D1D9"}}},{content:"data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"{",props:{style:{color:"#C9D1D9"}}},{content:'"content"',props:{style:{color:"#A5D6FF"}}},{content:": content})",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(e.h3,{id:"components-with-multiple-outputs",children:"Components with multiple outputs"}),"\n",(0,s.jsx)(e.p,{children:"A component can define multiple outputs.\nEach output can have a different corresponding method.\nFor example:"}),"\n",(0,s.jsx)(d.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"outputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" Output(",props:{style:{color:"#C9D1D9"}}},{content:"display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Processed Data"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"processed_data"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"method",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"process_data"',props:{style:{color:"#A5D6FF"}}},{content:"),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" Output(",props:{style:{color:"#C9D1D9"}}},{content:"display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Debug Info"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"debug_info"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"method",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"provide_debug_info"',props:{style:{color:"#A5D6FF"}}},{content:"),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(e.h3,{id:"common-internal-patterns",children:"Common internal patterns"}),"\n",(0,s.jsx)(e.h4,{id:"_pre_run_setup",children:(0,s.jsx)(e.code,{children:"_pre_run_setup()"})}),"\n",(0,s.jsx)(e.p,{children:"To initialize a custom component with counters set:"}),"\n",(0,s.jsx)(d.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"_pre_run_setup",props:{style:{color:"#D2A8FF"}}},{content:"(self):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" if not ",props:{style:{color:"#FF7B72"}}},{content:"hasattr",props:{style:{color:"#79C0FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"_initialized"',props:{style:{color:"#A5D6FF"}}},{content:"):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" self",props:{style:{color:"#79C0FF"}}},{content:"._initialized ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"True",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" self",props:{style:{color:"#79C0FF"}}},{content:".iteration ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"0",props:{style:{color:"#79C0FF"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsxs)(e.h4,{id:"override-run-or-_run",children:["Override ",(0,s.jsx)(e.code,{children:"run"})," or ",(0,s.jsx)(e.code,{children:"_run"})]}),"\n",(0,s.jsxs)(e.p,{children:["You can override ",(0,s.jsx)(e.code,{children:"async def _run(self): ..."})," to define custom execution logic, although the default behavior from the base class usually covers most cases."]}),"\n",(0,s.jsxs)(e.h4,{id:"store-data-in-selfctx",children:["Store data in ",(0,s.jsx)(e.code,{children:"self.ctx"})]}),"\n",(0,s.jsxs)(e.p,{children:["Use ",(0,s.jsx)(e.code,{children:"self.ctx"})," as a shared storage for data or counters across the component's execution flow:"]}),"\n",(0,s.jsx)(d.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"some_method",props:{style:{color:"#D2A8FF"}}},{content:"(self):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" count ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".ctx.get(",props:{style:{color:"#C9D1D9"}}},{content:'"my_count"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"0",props:{style:{color:"#79C0FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" self",props:{style:{color:"#79C0FF"}}},{content:".ctx[",props:{style:{color:"#C9D1D9"}}},{content:'"my_count"',props:{style:{color:"#A5D6FF"}}},{content:"] ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" count ",props:{style:{color:"#C9D1D9"}}},{content:"+ ",props:{style:{color:"#FF7B72"}}},{content:"1",props:{style:{color:"#79C0FF"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(e.h2,{id:"directory-structure-requirements",children:"Directory structure requirements"}),"\n",(0,s.jsxs)(e.p,{children:["By default, Langflow looks for custom components in the ",(0,s.jsx)(e.code,{children:"langflow/components"})," directory."]}),"\n",(0,s.jsxs)(e.p,{children:["If you're creating custom components in a different location using the ",(0,s.jsx)(e.a,{href:"/environment-variables#LANGFLOW_COMPONENTS_PATH",children:"LANGFLOW_COMPONENTS_PATH"})," environment variable, components must be organized in a specific directory structure to be properly loaded and displayed in the UI:"]}),"\n",(0,s.jsx)(d.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"/your/custom/components/path/ # Base directory set by LANGFLOW_COMPONENTS_PATH",props:{}}]},{tokens:[{content:" \u2514\u2500\u2500 category_name/ # Required category subfolder that determines menu name",props:{}}]},{tokens:[{content:" \u2514\u2500\u2500 custom_component.py # Component file",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsxs)(e.p,{children:["Components must be placed inside ",(0,s.jsx)(e.strong,{children:"category folders"}),", not directly in the base directory.\nThe category folder name determines where the component appears in the UI menu."]}),"\n",(0,s.jsxs)(e.p,{children:["For example, to add a component to the ",(0,s.jsx)(e.strong,{children:"Helpers"})," menu, place it in a ",(0,s.jsx)(e.code,{children:"helpers"})," subfolder:"]}),"\n",(0,s.jsx)(d.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"/app/custom_components/ # LANGFLOW_COMPONENTS_PATH",props:{}}]},{tokens:[{content:' \u2514\u2500\u2500 helpers/ # Displayed within the "Helpers" menu',props:{}}]},{tokens:[{content:" \u2514\u2500\u2500 custom_component.py # Your component",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsxs)(e.p,{children:["You can have ",(0,s.jsx)(e.strong,{children:"multiple category folders"})," to organize components into different menus:"]}),"\n",(0,s.jsx)(d.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"/app/custom_components/",props:{}}]},{tokens:[{content:" \u251c\u2500\u2500 helpers/",props:{}}]},{tokens:[{content:" \u2502 \u2514\u2500\u2500 helper_component.py",props:{}}]},{tokens:[{content:" \u2514\u2500\u2500 tools/",props:{}}]},{tokens:[{content:" \u2514\u2500\u2500 tool_component.py",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsx)(e.p,{children:"This folder structure is required for Langflow to properly discover and load your custom components. Components placed directly in the base directory will not be loaded."}),"\n",(0,s.jsx)(d.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"/app/custom_components/ # LANGFLOW_COMPONENTS_PATH",props:{}}]},{tokens:[{content:" \u2514\u2500\u2500 custom_component.py # Won't be loaded - missing category folder!",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsx)(e.h2,{id:"custom-component-inputs-and-outputs",children:"Custom component inputs and outputs"}),"\n",(0,s.jsx)(e.p,{children:"Inputs and outputs define how data flows through the component, how it appears in the UI, and how connections to other components are validated."}),"\n",(0,s.jsx)(e.h3,{id:"inputs",children:"Inputs"}),"\n",(0,s.jsxs)(e.p,{children:["Inputs are defined in a class-level ",(0,s.jsx)(e.code,{children:"inputs"})," list. When Langflow loads the component, it uses this list to render fields and handles in the UI. Users or other components provide values or connections to fill these inputs."]}),"\n",(0,s.jsxs)(e.p,{children:["An input is usually an instance of a class from ",(0,s.jsx)(e.code,{children:"langflow.io"})," (such as ",(0,s.jsx)(e.code,{children:"StrInput"}),", ",(0,s.jsx)(e.code,{children:"DataInput"}),", or ",(0,s.jsx)(e.code,{children:"MessageTextInput"}),"). The most common constructor parameters are:"]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"name"})}),": The internal variable name, accessed via ",(0,s.jsx)(e.code,{children:"self."}),"."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"display_name"})}),": The label shown to users in the UI."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"info"})})," ",(0,s.jsx)(e.em,{children:"(optional)"}),": A tooltip or short description."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"value"})})," ",(0,s.jsx)(e.em,{children:"(optional)"}),": The default value."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"advanced"})})," ",(0,s.jsx)(e.em,{children:"(optional)"}),": If ",(0,s.jsx)(e.code,{children:"True"}),', moves the field into the "Advanced" section.']}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"required"})})," ",(0,s.jsx)(e.em,{children:"(optional)"}),": If ",(0,s.jsx)(e.code,{children:"True"}),", forces the user to provide a value."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"is_list"})})," ",(0,s.jsx)(e.em,{children:"(optional)"}),": If ",(0,s.jsx)(e.code,{children:"True"}),", allows multiple values."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"input_types"})})," ",(0,s.jsx)(e.em,{children:"(optional)"}),": Restricts allowed connection types (e.g., ",(0,s.jsx)(e.code,{children:'["Data"]'}),", ",(0,s.jsx)(e.code,{children:'["LanguageModel"]'}),")."]}),"\n"]}),"\n",(0,s.jsx)(e.p,{children:"Here are the most commonly used input classes and their typical usage."}),"\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Text Inputs"}),": For simple text entries."]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"StrInput"})})," creates a single-line text field."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"MultilineInput"})})," creates a multi-line text area."]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Numeric and Boolean Inputs"}),": Ensures users can only enter valid numeric or boolean data."]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"BoolInput"})}),", ",(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"IntInput"})}),", and ",(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"FloatInput"})})," provide fields for boolean, integer, and float values, ensuring type consistency."]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Dropdowns"}),": For selecting from predefined options, useful for modes or levels."]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"DropdownInput"})})}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Secrets"}),": A specialized input for sensitive data, ensuring input is hidden in the UI."]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"SecretStrInput"})})," for API keys and passwords."]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Specialized Data Inputs"}),": Ensures type-checking and color-coded connections in the UI."]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"DataInput"})})," expects a ",(0,s.jsx)(e.code,{children:"Data"})," object (typically with ",(0,s.jsx)(e.code,{children:".data"})," and optional ",(0,s.jsx)(e.code,{children:".text"}),")."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"MessageInput"})})," expects a ",(0,s.jsx)(e.code,{children:"Message"})," object, used in chat or agent-based flows."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"MessageTextInput"})})," simplifies access to the ",(0,s.jsx)(e.code,{children:".text"})," field of a ",(0,s.jsx)(e.code,{children:"Message"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Handle-Based Inputs"}),": Used to connect outputs of specific types, ensuring correct pipeline connections."]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"HandleInput"})})}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"File Uploads"}),": Allows users to upload files directly through the UI or receive file paths from other components."]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"FileInput"})})}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Lists"}),": Set ",(0,s.jsx)(e.code,{children:"is_list=True"})," to accept multiple values, ideal for batch or grouped operations."]}),"\n",(0,s.jsxs)(e.p,{children:["This example defines three inputs: a text field (",(0,s.jsx)(e.code,{children:"StrInput"}),"), a boolean toggle (",(0,s.jsx)(e.code,{children:"BoolInput"}),"), and a dropdown selection (",(0,s.jsx)(e.code,{children:"DropdownInput"}),")."]}),"\n",(0,s.jsx)(d.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.io ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" StrInput, BoolInput, DropdownInput",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"inputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" StrInput(",props:{style:{color:"#C9D1D9"}}},{content:"name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"title"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Title"',props:{style:{color:"#A5D6FF"}}},{content:"),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" BoolInput(",props:{style:{color:"#C9D1D9"}}},{content:"name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"enabled"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Enabled"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"value",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"True",props:{style:{color:"#79C0FF"}}},{content:"),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" DropdownInput(",props:{style:{color:"#C9D1D9"}}},{content:"name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"mode"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Mode"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"options",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"[",props:{style:{color:"#C9D1D9"}}},{content:'"Fast"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"Safe"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"Experimental"',props:{style:{color:"#A5D6FF"}}},{content:"], ",props:{style:{color:"#C9D1D9"}}},{content:"value",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Safe"',props:{style:{color:"#A5D6FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(e.h3,{id:"outputs",children:"Outputs"}),"\n",(0,s.jsxs)(e.p,{children:["Outputs are defined in a class-level ",(0,s.jsx)(e.code,{children:"outputs"})," list. When Langflow renders a component, each output becomes a connector point in the UI. When you connect something to an output, Langflow automatically calls the corresponding method and passes the returned object to the next component."]}),"\n",(0,s.jsxs)(e.p,{children:["An output is usually an instance of ",(0,s.jsx)(e.code,{children:"Output"})," from ",(0,s.jsx)(e.code,{children:"langflow.io"}),", with common parameters:"]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"name"})}),": The internal variable name."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"display_name"})}),": The label shown in the UI."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"method"})}),": The name of the method called to produce the output."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"info"})})," ",(0,s.jsx)(e.em,{children:"(optional)"}),": Help text shown on hover."]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:["The method must exist in the class, and it is recommended to annotate its return type for better type checking.\nYou can also set a ",(0,s.jsx)(e.code,{children:"self.status"})," message inside the method to show progress or logs."]}),"\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Common Return Types"}),":"]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"Message"})}),": Structured chat messages."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"Data"})}),": Flexible object with ",(0,s.jsx)(e.code,{children:".data"})," and optional ",(0,s.jsx)(e.code,{children:".text"}),"."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"DataFrame"})}),": Pandas-based tables (",(0,s.jsx)(e.code,{children:"langflow.schema.DataFrame"}),")."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Primitive types"}),": ",(0,s.jsx)(e.code,{children:"str"}),", ",(0,s.jsx)(e.code,{children:"int"}),", ",(0,s.jsx)(e.code,{children:"bool"})," (not recommended if you need type/color consistency)."]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:["In this example, the ",(0,s.jsx)(e.code,{children:"DataToDataFrame"})," component defines its output using the outputs list. The ",(0,s.jsx)(e.code,{children:"df_out"})," output is linked to the ",(0,s.jsx)(e.code,{children:"build_df"})," method, so when connected in the UI, Langflow calls this method and passes its returned DataFrame to the next node. This demonstrates how each output maps to a method that generates the actual output data."]}),"\n",(0,s.jsx)(d.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.custom ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Component",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.io ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" DataInput, Output",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.schema ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Data, DataFrame",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"class ",props:{style:{color:"#FF7B72"}}},{content:"DataToDataFrame",props:{style:{color:"#FFA657"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"Component",props:{style:{color:"#79C0FF"}}},{content:"):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"Data to DataFrame"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" description ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"Convert multiple Data objects into a DataFrame"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" icon ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"table"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" name ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"DataToDataFrame"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" inputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" DataInput(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"items"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Data Items"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" info",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"List of Data objects to convert"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" is_list",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"True",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" )",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" outputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" Output(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"df_out"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"DataFrame Output"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" method",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"build_df"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" )",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" def ",props:{style:{color:"#FF7B72"}}},{content:"build_df",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> DataFrame:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" rows ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" []",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" for",props:{style:{color:"#FF7B72"}}},{content:" item ",props:{style:{color:"#C9D1D9"}}},{content:"in ",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".items:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" row_dict ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" item.data.copy() ",props:{style:{color:"#C9D1D9"}}},{content:"if",props:{style:{color:"#FF7B72"}}},{content:" item.data ",props:{style:{color:"#C9D1D9"}}},{content:"else",props:{style:{color:"#FF7B72"}}},{content:" {}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" row_dict[",props:{style:{color:"#C9D1D9"}}},{content:'"text"',props:{style:{color:"#A5D6FF"}}},{content:"] ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" item.get_text() ",props:{style:{color:"#C9D1D9"}}},{content:"or ",props:{style:{color:"#FF7B72"}}},{content:'""',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" rows.append(row_dict)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" df ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" DataFrame(rows)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" self",props:{style:{color:"#79C0FF"}}},{content:".status ",props:{style:{color:"#C9D1D9"}}},{content:"= f",props:{style:{color:"#FF7B72"}}},{content:'"Built DataFrame with ',props:{style:{color:"#A5D6FF"}}},{content:"{len",props:{style:{color:"#79C0FF"}}},{content:"(rows)",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:' rows."',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" df",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(e.h3,{id:"tool-mode",children:"Tool mode"}),"\n",(0,s.jsxs)(e.p,{children:["You can configure a Custom Component to work as a ",(0,s.jsx)(e.strong,{children:"Tool"})," by setting the parameter ",(0,s.jsx)(e.code,{children:"tool_mode=True"}),". This allows the component to be used in Langflow's Tool Mode workflows, such as by Agent components."]}),"\n",(0,s.jsx)(e.p,{children:"Langflow currently supports the following input types for Tool Mode:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.code,{children:"DataInput"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.code,{children:"DataFrameInput"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.code,{children:"PromptInput"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.code,{children:"MessageTextInput"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.code,{children:"MultilineInput"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.code,{children:"DropdownInput"})}),"\n"]}),"\n",(0,s.jsx)(d.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"inputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" MessageTextInput(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"message"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Mensage"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" info",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Enter the message that will be processed directly by the tool"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" tool_mode",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"True",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(e.h2,{id:"typed-annotations",children:"Typed annotations"}),"\n",(0,s.jsxs)(e.p,{children:["In Langflow, ",(0,s.jsx)(e.strong,{children:"typed annotations"})," allow Langflow to visually guide users and maintain flow consistency."]}),"\n",(0,s.jsx)(e.p,{children:"Typed annotations provide:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Color-coding"}),": Outputs like ",(0,s.jsx)(e.code,{children:"-> Data"})," or ",(0,s.jsx)(e.code,{children:"-> Message"})," get distinct colors."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Validation"}),": Langflow blocks incompatible connections automatically."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Readability"}),": Developers can quickly understand data flow."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Development tools"}),": Better code suggestions and error checking in your code editor."]}),"\n"]}),"\n",(0,s.jsx)(e.h3,{id:"common-return-types",children:"Common Return Types"}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"Message"})})}),"\n",(0,s.jsx)(e.p,{children:"For chat-style outputs."}),"\n",(0,s.jsx)(d.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"produce_message",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> Message:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" Message(",props:{style:{color:"#C9D1D9"}}},{content:"text",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Hello! from typed method!"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"sender",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"System"',props:{style:{color:"#A5D6FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(e.p,{children:"In the UI, connects only to Message-compatible inputs."}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"Data"})})}),"\n",(0,s.jsx)(e.p,{children:"For structured data like dicts or partial texts."}),"\n",(0,s.jsx)(d.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"get_processed_data",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> Data:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" processed ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}},{content:'"key1"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"value1"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"key2"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"123",props:{style:{color:"#79C0FF"}}},{content:"}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" Data(",props:{style:{color:"#C9D1D9"}}},{content:"data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"processed)",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(e.p,{children:"In the UI, connects only with DataInput."}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"DataFrame"})})}),"\n",(0,s.jsx)(e.p,{children:"For tabular data"}),"\n",(0,s.jsx)(d.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"build_df",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> DataFrame:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" pdf ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" pd.DataFrame({",props:{style:{color:"#C9D1D9"}}},{content:'"A"',props:{style:{color:"#A5D6FF"}}},{content:": [",props:{style:{color:"#C9D1D9"}}},{content:"1",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"2",props:{style:{color:"#79C0FF"}}},{content:"], ",props:{style:{color:"#C9D1D9"}}},{content:'"B"',props:{style:{color:"#A5D6FF"}}},{content:": [",props:{style:{color:"#C9D1D9"}}},{content:"3",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"4",props:{style:{color:"#79C0FF"}}},{content:"]})",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" DataFrame(pdf)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(e.p,{children:"In the UI, connects only to DataFrameInput."}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsxs)(e.strong,{children:["Primitive Types (",(0,s.jsx)(e.code,{children:"str"}),", ",(0,s.jsx)(e.code,{children:"int"}),", ",(0,s.jsx)(e.code,{children:"bool"}),")"]})}),"\n",(0,s.jsx)(e.p,{children:"Returning primitives is allowed but wrapping in Data or Message is recommended for better UI consistency."}),"\n",(0,s.jsx)(d.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"compute_sum",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> ",props:{style:{color:"#C9D1D9"}}},{content:"int",props:{style:{color:"#79C0FF"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return ",props:{style:{color:"#FF7B72"}}},{content:"sum",props:{style:{color:"#79C0FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".numbers)",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(e.h3,{id:"tips-for-typed-annotations",children:"Tips for typed annotations"}),"\n",(0,s.jsx)(e.p,{children:"When using typed annotations, consider the following best practices:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Always Annotate Outputs"}),": Specify return types like ",(0,s.jsx)(e.code,{children:"-> Data"}),", ",(0,s.jsx)(e.code,{children:"-> Message"}),", or ",(0,s.jsx)(e.code,{children:"-> DataFrame"})," to enable proper UI color-coding and validation."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Wrap Raw Data"}),": Use ",(0,s.jsx)(e.code,{children:"Data"}),", ",(0,s.jsx)(e.code,{children:"Message"}),", or ",(0,s.jsx)(e.code,{children:"DataFrame"})," wrappers instead of returning plain structures."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Use Primitives Carefully"}),": Direct ",(0,s.jsx)(e.code,{children:"str"})," or ",(0,s.jsx)(e.code,{children:"int"})," returns are fine for simple flows, but wrapping improves flexibility."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Annotate Helpers Too"}),": Even if internal, typing improves maintainability and clarity."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Handle Edge Cases"}),": Prefer returning structured ",(0,s.jsx)(e.code,{children:"Data"})," with error fields when needed."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Stay Consistent"}),": Use the same types across your components to make flows predictable and easier to build."]}),"\n"]}),"\n",(0,s.jsx)(e.h2,{id:"enable-dynamic-fields",children:"Enable dynamic fields"}),"\n",(0,s.jsxs)(e.p,{children:["In ",(0,s.jsx)(e.strong,{children:"Langflow"}),", dynamic fields allow inputs to change or appear based on user interactions. You can make an input dynamic by setting ",(0,s.jsx)(e.code,{children:"dynamic=True"}),".\nOptionally, setting ",(0,s.jsx)(e.code,{children:"real_time_refresh=True"})," triggers the ",(0,s.jsx)(e.code,{children:"update_build_config"})," method to adjust the input's visibility or properties in real time, creating a contextual UI that only displays relevant fields based on the user's choices."]}),"\n",(0,s.jsxs)(e.p,{children:["In this example, the operator field triggers updates via ",(0,s.jsx)(e.code,{children:"real_time_refresh=True"}),".\nThe ",(0,s.jsx)(e.code,{children:"regex_pattern"})," field is initially hidden and controlled via ",(0,s.jsx)(e.code,{children:"dynamic=True"}),"."]}),"\n",(0,s.jsx)(d.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.io ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" DropdownInput, StrInput",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"class ",props:{style:{color:"#FF7B72"}}},{content:"RegexRouter",props:{style:{color:"#FFA657"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"Component",props:{style:{color:"#79C0FF"}}},{content:"):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"Regex Router"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" description ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"Demonstrates dynamic fields for regex input."',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" inputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" DropdownInput(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"operator"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Operator"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" options",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"[",props:{style:{color:"#C9D1D9"}}},{content:'"equals"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"contains"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"regex"',props:{style:{color:"#A5D6FF"}}},{content:"],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" value",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"equals"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" real_time_refresh",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"True",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" StrInput(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"regex_pattern"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Regex Pattern"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" info",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"\"Used if operator='regex'\"",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" dynamic",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"True",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" show",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"False",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ]",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsxs)(e.h3,{id:"implement-update_build_config",children:["Implement ",(0,s.jsx)(e.code,{children:"update_build_config"})]}),"\n",(0,s.jsxs)(e.p,{children:["When a field with ",(0,s.jsx)(e.code,{children:"real_time_refresh=True"})," is modified, Langflow calls the ",(0,s.jsx)(e.code,{children:"update_build_config"})," method, passing the updated field name, value, and the component's configuration to dynamically adjust the visibility or properties of other fields based on user input."]}),"\n",(0,s.jsxs)(e.p,{children:["This example will show or hide the ",(0,s.jsx)(e.code,{children:"regex_pattern"})," field when the user selects a different operator."]}),"\n",(0,s.jsx)(d.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"update_build_config",props:{style:{color:"#D2A8FF"}}},{content:"(self, build_config: ",props:{style:{color:"#C9D1D9"}}},{content:"dict",props:{style:{color:"#79C0FF"}}},{content:", field_value: ",props:{style:{color:"#C9D1D9"}}},{content:"str",props:{style:{color:"#79C0FF"}}},{content:", field_name: ",props:{style:{color:"#C9D1D9"}}},{content:"str ",props:{style:{color:"#79C0FF"}}},{content:"| ",props:{style:{color:"#FF7B72"}}},{content:"None ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"None",props:{style:{color:"#79C0FF"}}},{content:") -> ",props:{style:{color:"#C9D1D9"}}},{content:"dict",props:{style:{color:"#79C0FF"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" if",props:{style:{color:"#FF7B72"}}},{content:" field_name ",props:{style:{color:"#C9D1D9"}}},{content:"== ",props:{style:{color:"#FF7B72"}}},{content:'"operator"',props:{style:{color:"#A5D6FF"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" if",props:{style:{color:"#FF7B72"}}},{content:" field_value ",props:{style:{color:"#C9D1D9"}}},{content:"== ",props:{style:{color:"#FF7B72"}}},{content:'"regex"',props:{style:{color:"#A5D6FF"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" build_config[",props:{style:{color:"#C9D1D9"}}},{content:'"regex_pattern"',props:{style:{color:"#A5D6FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:'"show"',props:{style:{color:"#A5D6FF"}}},{content:"] ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"True",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" else",props:{style:{color:"#FF7B72"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" build_config[",props:{style:{color:"#C9D1D9"}}},{content:'"regex_pattern"',props:{style:{color:"#A5D6FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:'"show"',props:{style:{color:"#A5D6FF"}}},{content:"] ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"False",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" build_config",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(e.h3,{id:"additional-dynamic-field-controls",children:"Additional Dynamic Field Controls"}),"\n",(0,s.jsxs)(e.p,{children:["You can also modify other properties within ",(0,s.jsx)(e.code,{children:"update_build_config"}),", such as:"]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:"required"}),": Set ",(0,s.jsx)(e.code,{children:'build_config["some_field"]["required"] = True/False'})]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:"advanced"}),": Set ",(0,s.jsx)(e.code,{children:'build_config["some_field"]["advanced"] = True'})]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:"options"}),": Modify dynamic dropdown options."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(e.h3,{id:"tips-for-managing-dynamic-fields",children:"Tips for Managing Dynamic Fields"}),"\n",(0,s.jsx)(e.p,{children:"When working with dynamic fields, consider the following best practices to ensure a smooth user experience:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Minimize field changes"}),": Hide only fields that are truly irrelevant to avoid confusing users."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Test behavior"}),": Ensure that adding or removing fields doesn't accidentally erase user input."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Preserve data"}),": Use ",(0,s.jsx)(e.code,{children:'build_config["some_field"]["show"] = False'})," to hide fields without losing their values."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Clarify logic"}),": Add ",(0,s.jsx)(e.code,{children:"info"})," notes to explain why fields appear or disappear based on conditions."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Keep it manageable"}),": If the dynamic logic becomes too complex, consider breaking it into smaller components, unless it serves a clear purpose in a single node."]}),"\n"]}),"\n",(0,s.jsx)(e.h2,{id:"error-handling-and-logging",children:"Error handling and logging"}),"\n",(0,s.jsx)(e.p,{children:"In Langflow, robust error handling ensures that your components behave predictably, even when unexpected situations occur, such as invalid inputs, external API failures, or internal logic errors."}),"\n",(0,s.jsx)(e.h3,{id:"error-handling-techniques",children:"Error handling techniques"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Raise Exceptions"}),":\nIf a critical error occurs, you can raise standard Python exceptions such as ",(0,s.jsx)(e.code,{children:"ValueError"}),", or specialized exceptions like ",(0,s.jsx)(e.code,{children:"ToolException"}),". Langflow will automatically catch these and display appropriate error messages in the UI, helping users quickly identify what went wrong.","\n",(0,s.jsx)(d.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"compute_result",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> ",props:{style:{color:"#C9D1D9"}}},{content:"str",props:{style:{color:"#79C0FF"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" if not ",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".user_input:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" raise ",props:{style:{color:"#FF7B72"}}},{content:"ValueError",props:{style:{color:"#79C0FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:'"No input provided."',props:{style:{color:"#A5D6FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" # ...",props:{style:{color:"#8B949E"}}}]}],lang:"python"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Return Structured Error Data"}),':\nInstead of stopping a flow abruptly, you can return a Data object containing an "error" field. This approach allows the flow to continue operating and enables downstream components to detect and handle the error gracefully.',"\n",(0,s.jsx)(d.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"run_model",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> Data:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" try",props:{style:{color:"#FF7B72"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" # ...",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" except ",props:{style:{color:"#FF7B72"}}},{content:"Exception ",props:{style:{color:"#79C0FF"}}},{content:"as",props:{style:{color:"#FF7B72"}}},{content:" e:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" Data(",props:{style:{color:"#C9D1D9"}}},{content:"data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"{",props:{style:{color:"#C9D1D9"}}},{content:'"error"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"str",props:{style:{color:"#79C0FF"}}},{content:"(e)})",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(e.h3,{id:"improve-debugging-and-flow-management",children:"Improve debugging and flow management"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsxs)(e.strong,{children:["Use ",(0,s.jsx)(e.code,{children:"self.status"})]}),":\nEach component has a status field where you can store short messages about the execution result\u2014such as success summaries, partial progress, or error notifications. These appear directly in the UI, making troubleshooting easier for users."]}),"\n",(0,s.jsx)(d.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"parse_data",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> Data:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# ...",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"self",props:{style:{color:"#79C0FF"}}},{content:".status ",props:{style:{color:"#C9D1D9"}}},{content:"= f",props:{style:{color:"#FF7B72"}}},{content:'"Parsed ',props:{style:{color:"#A5D6FF"}}},{content:"{len",props:{style:{color:"#79C0FF"}}},{content:"(rows)",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:' rows successfully."',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"return",props:{style:{color:"#FF7B72"}}},{content:" Data(",props:{style:{color:"#C9D1D9"}}},{content:"data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"{",props:{style:{color:"#C9D1D9"}}},{content:'"rows"',props:{style:{color:"#A5D6FF"}}},{content:": rows})",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsxs)(e.strong,{children:["Stop specific outputs with ",(0,s.jsx)(e.code,{children:"self.stop(...)"})]}),":\nYou can halt individual output paths when certain conditions fail, without affecting the entire component. This is especially useful when working with components that have multiple output branches."]}),"\n",(0,s.jsx)(d.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"some_output",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> Data:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"if <",props:{style:{color:"#FF7B72"}}},{content:"some condition",props:{style:{color:"#C9D1D9"}}},{content:">",props:{style:{color:"#FF7B72"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" self",props:{style:{color:"#79C0FF"}}},{content:".stop(",props:{style:{color:"#C9D1D9"}}},{content:'"some_output"',props:{style:{color:"#A5D6FF"}}},{content:") ",props:{style:{color:"#C9D1D9"}}},{content:"# Tells Langflow no data flows",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" Data(",props:{style:{color:"#C9D1D9"}}},{content:"data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"{",props:{style:{color:"#C9D1D9"}}},{content:'"error"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Condition not met"',props:{style:{color:"#A5D6FF"}}},{content:"})",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Log events"}),':\nYou can log key execution details inside components. Logs are displayed in the "Logs" or "Events" section of the component\'s detail view and can be accessed later through the flow\'s debug panel or exported files, providing a clear trace of the component\'s behavior for easier debugging.']}),"\n",(0,s.jsx)(d.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"process_file",props:{style:{color:"#D2A8FF"}}},{content:"(self, file_path: ",props:{style:{color:"#C9D1D9"}}},{content:"str",props:{style:{color:"#79C0FF"}}},{content:"):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"self",props:{style:{color:"#79C0FF"}}},{content:".log(",props:{style:{color:"#C9D1D9"}}},{content:"f",props:{style:{color:"#FF7B72"}}},{content:'"Processing file ',props:{style:{color:"#A5D6FF"}}},{content:"{",props:{style:{color:"#79C0FF"}}},{content:"file_path",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:'"',props:{style:{color:"#A5D6FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# ...",props:{style:{color:"#8B949E"}}}]}],lang:"python"},annotations:[]}]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(e.h3,{id:"tips-for-error-handling-and-logging",children:"Tips for error handling and logging"}),"\n",(0,s.jsx)(e.p,{children:"To build more reliable components, consider the following best practices:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Validate inputs early"}),": Catch missing or invalid inputs at the start to prevent broken logic."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsxs)(e.strong,{children:["Summarize with ",(0,s.jsx)(e.code,{children:"self.status"})]}),": Use short success or error summaries to help users understand results quickly."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Keep logs concise"}),": Focus on meaningful messages to avoid cluttering the UI."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Return structured errors"}),": When appropriate, return ",(0,s.jsx)(e.code,{children:'Data(data={"error": ...})'})," instead of raising exceptions to allow downstream handling."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Stop outputs selectively"}),": Only halt specific outputs with ",(0,s.jsx)(e.code,{children:"self.stop(...)"})," if necessary, to preserve correct flow behavior elsewhere."]}),"\n"]}),"\n",(0,s.jsx)(e.h2,{id:"contribute-custom-components-to-langflow",children:"Contribute custom components to Langflow"}),"\n",(0,s.jsxs)(e.p,{children:["See ",(0,s.jsx)(e.a,{href:"/contributing-components",children:"How to Contribute"})," to contribute your custom component to Langflow."]})]})}function u(o={}){const{wrapper:e}={...(0,r.R)(),...o.components};return e?(0,s.jsx)(e,{...o,children:(0,s.jsx)(y,{...o})}):y(o)}function F(o,e){throw new Error("Expected "+(e?"component":"object")+" `"+o+"` to be defined: you likely forgot to import, pass, or provide it.")}}}]); \ No newline at end of file diff --git a/assets/js/873ebc27.f7be1bf9.js b/assets/js/873ebc27.f7be1bf9.js deleted file mode 100644 index f814c3736a..0000000000 --- a/assets/js/873ebc27.f7be1bf9.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[5572],{42439:(o,t,e)=>{e.r(t),e.d(t,{CH:()=>a,assets:()=>i,chCodeConfig:()=>d,contentTitle:()=>p,default:()=>u,frontMatter:()=>c,metadata:()=>n,toc:()=>y});const n=JSON.parse('{"id":"Components/components-custom-components","title":"Create custom Python components","description":"Custom components are created within Langflow and extend the platform\'s functionality with custom, reusable Python code.","source":"@site/docs/Components/components-custom-components.md","sourceDirName":"Components","slug":"/components-custom-components","permalink":"/components-custom-components","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Create custom Python components","slug":"/components-custom-components"},"sidebar":"docs","previous":{"title":"Bundles","permalink":"/components-bundle-components"},"next":{"title":"Data","permalink":"/components-data"}}');var s=e(74848),r=e(28453),l=e(24754);const c={title:"Create custom Python components",slug:"/components-custom-components"},p=void 0,i={},a={annotations:l.hk,Code:l.Cy},d={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},y=[{value:"Directory structure requirements",id:"directory-structure-requirements",level:2},{value:"Create a custom component in Langflow",id:"create-a-custom-component-in-langflow",level:2},{value:"Add inputs and modify output methods",id:"add-inputs-and-modify-output-methods",level:2},{value:"Input Types",id:"3815589831f24ab792328ed233c8b00d",level:2},{value:"HandleInput",id:"fb06c48a326043ffa46badc1ab3ba467",level:3},{value:"DataInput",id:"0e1dcb768e38487180d720b0884a90f5",level:3},{value:"StrInput",id:"4ec6e68ad9ab4cd194e8e607bc5b3411",level:3},{value:"MessageInput",id:"9292ac0105e14177af5eff2131b9c71b",level:3},{value:"MessageTextInput",id:"5511f5e32b944b4e973379a6bd5405e4",level:3},{value:"MultilineInput",id:"e6d8315b0fb44a2fb8c62c3f3184bbe9",level:3},{value:"SecretStrInput",id:"2283c13aa5f745b8b0009f7d40e59419",level:3},{value:"IntInput",id:"612680db6578451daef695bd19827a56",level:3},{value:"FloatInput",id:"a15e1fdae15b49fc9bfbf38f8bd7b203",level:3},{value:"BoolInput",id:"3083671e0e7f4390a03396485114be66",level:3},{value:"NestedDictInput",id:"2866fc4018e743d8a45afde53f1e57be",level:3},{value:"DictInput",id:"daa2c2398f694ec199b425e2ed4bcf93",level:3},{value:"DropdownInput",id:"14dcdef11bab4d3f8127eaf2e36a77b9",level:3},{value:"FileInput",id:"73e6377dc5f446f39517a558a1291410",level:3},{value:"Generic Input",id:"278e2027493e45b68746af0a5b6c06f6",level:3},{value:"Create a Custom Component with Generic Input",id:"create-a-custom-component-with-generic-input",level:2},{value:"Create a Custom Component with Multiple Outputs",id:"6f225be8a142450aa19ee8e46a3b3c8c",level:2},{value:"Special Operations",id:"special-operations",level:2},{value:"Contribute Custom Components to Langflow",id:"contribute-custom-components-to-langflow",level:2}];function F(o){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",hr:"hr",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...o.components};return a||h("CH",!1),a.Code||h("CH.Code",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n",(0,s.jsx)(t.p,{children:"Custom components are created within Langflow and extend the platform's functionality with custom, reusable Python code."}),"\n",(0,s.jsxs)(t.p,{children:["Since Langflow operates with Python behind the scenes, you can implement any Python function within a Custom Component. This means you can leverage the power of libraries such as Pandas, Scikit-learn, Numpy, and thousands of other packages to create components that handle data processing in unlimited ways. You can use any type as long as the type is properly annotated in the output methods (e.g.,\xa0",(0,s.jsx)(t.code,{children:"> list[int]"}),")."]}),"\n",(0,s.jsx)(t.p,{children:"Custom Components create reusable and configurable components to enhance the capabilities of Langflow, making it a powerful tool for developing complex processing between user and AI messages."}),"\n",(0,s.jsx)(t.h2,{id:"directory-structure-requirements",children:"Directory structure requirements"}),"\n",(0,s.jsxs)(t.p,{children:["By default, Langflow looks for custom components in the ",(0,s.jsx)(t.code,{children:"langflow/components"})," directory."]}),"\n",(0,s.jsxs)(t.p,{children:["If you're creating custom components in a different location using the ",(0,s.jsx)(t.a,{href:"/environment-variables#LANGFLOW_COMPONENTS_PATH",children:"LANGFLOW_COMPONENTS_PATH"}),"\n",(0,s.jsx)(t.code,{children:"LANGFLOW_COMPONENTS_PATH"})," environment variable, components must be organized in a specific directory structure to be properly loaded and displayed in the UI:"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"/your/custom/components/path/ # Base directory (set by LANGFLOW_COMPONENTS_PATH)",props:{}}]},{tokens:[{content:" \u2514\u2500\u2500 category_name/ # Required category subfolder (determines menu name)",props:{}}]},{tokens:[{content:" \u2514\u2500\u2500 custom_component.py # Component file",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsxs)(t.p,{children:["Components must be placed inside ",(0,s.jsx)(t.strong,{children:"category folders"}),", not directly in the base directory.\nThe category folder name determines where the component appears in the UI menu."]}),"\n",(0,s.jsxs)(t.p,{children:["For example, to add a component to the ",(0,s.jsx)(t.strong,{children:"Helpers"})," menu, place it in a ",(0,s.jsx)(t.code,{children:"helpers"})," subfolder:"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"/app/custom_components/ # LANGFLOW_COMPONENTS_PATH",props:{}}]},{tokens:[{content:' \u2514\u2500\u2500 helpers/ # Shows up as "Helpers" menu',props:{}}]},{tokens:[{content:" \u2514\u2500\u2500 custom_component.py # Your component",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsxs)(t.p,{children:["You can have ",(0,s.jsx)(t.strong,{children:"multiple category folders"})," to organize components into different menus:"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"/app/custom_components/",props:{}}]},{tokens:[{content:" \u251c\u2500\u2500 helpers/",props:{}}]},{tokens:[{content:" \u2502 \u2514\u2500\u2500 helper_component.py",props:{}}]},{tokens:[{content:" \u2514\u2500\u2500 tools/",props:{}}]},{tokens:[{content:" \u2514\u2500\u2500 tool_component.py",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsx)(t.p,{children:"This folder structure is required for Langflow to properly discover and load your custom components. Components placed directly in the base directory will not be loaded."}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"/app/custom_components/ # LANGFLOW_COMPONENTS_PATH",props:{}}]},{tokens:[{content:" \u2514\u2500\u2500 custom_component.py # Won't be loaded - missing category folder!",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsx)(t.h2,{id:"create-a-custom-component-in-langflow",children:"Create a custom component in Langflow"}),"\n",(0,s.jsx)(t.p,{children:"Creating custom components in Langflow involves creating a Python class that defines the component's functionality, inputs, and outputs.\nThe default code provides a working structure for your custom component."}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"# from langflow.field_typing import Data",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.custom ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Component",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.io ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" MessageTextInput, Output",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.schema ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Data",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"class ",props:{style:{color:"#FF7B72"}}},{content:"CustomComponent",props:{style:{color:"#FFA657"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"Component",props:{style:{color:"#79C0FF"}}},{content:"):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"Custom Component"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" description ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"Use as a template to create your own component."',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" documentation: ",props:{style:{color:"#C9D1D9"}}},{content:"str ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"https://docs.langflow.org/components-custom-components"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" icon ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"custom_components"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" name ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"CustomComponent"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" inputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" MessageTextInput(",props:{style:{color:"#C9D1D9"}}},{content:"name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"input_value"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Input Value"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"value",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Hello, World!"',props:{style:{color:"#A5D6FF"}}},{content:"),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" outputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" Output(",props:{style:{color:"#C9D1D9"}}},{content:"display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Output"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"output"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"method",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"build_output"',props:{style:{color:"#A5D6FF"}}},{content:"),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" def ",props:{style:{color:"#FF7B72"}}},{content:"build_output",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> Data:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" data ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" Data(",props:{style:{color:"#C9D1D9"}}},{content:"value",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".input_value)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" self",props:{style:{color:"#79C0FF"}}},{content:".status ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" data",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" data",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(t.p,{children:"You can create your class in your favorite text editor outside of Langflow and paste it in later, or just follow along in the code pane."}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["In Langflow, click ",(0,s.jsx)(t.strong,{children:"+ Custom Component"})," to add a custom component into the workspace."]}),"\n",(0,s.jsx)(t.li,{children:"Open the component's code pane."}),"\n",(0,s.jsxs)(t.li,{children:["Import dependencies.\nYour custom component inherits from the langflow ",(0,s.jsx)(t.code,{children:"Component"})," class so you need to include it."]}),"\n"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.custom ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Component",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.io ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" MessageTextInput, Output",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.schema ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Data",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsxs)(t.ol,{start:"4",children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Define the Class"}),": Start by defining a Python class that inherits from\xa0",(0,s.jsx)(t.code,{children:"Component"}),". This class will encapsulate the functionality of your custom component."]}),"\n"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"class ",props:{style:{color:"#FF7B72"}}},{content:"CustomComponent",props:{style:{color:"#FFA657"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"Component",props:{style:{color:"#79C0FF"}}},{content:"):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"Custom Component"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" description ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"Use as a template to create your own component."',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" documentation: ",props:{style:{color:"#C9D1D9"}}},{content:"str ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"https://docs.langflow.org/components-custom-components"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" icon ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"custom_components"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" name ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"CustomComponent"',props:{style:{color:"#A5D6FF"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsxs)(t.ol,{start:"5",children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Specify Inputs and Outputs"}),": Use Langflow's input and output classes to define the inputs and outputs of your component. They should be declared as class attributes."]}),"\n"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:" inputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" MessageTextInput(",props:{style:{color:"#C9D1D9"}}},{content:"name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"input_value"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Input Value"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"value",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Hello, World!"',props:{style:{color:"#A5D6FF"}}},{content:"),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" outputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" Output(",props:{style:{color:"#C9D1D9"}}},{content:"display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Output"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"output"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"method",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"build_output"',props:{style:{color:"#A5D6FF"}}},{content:"),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ]",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsxs)(t.ol,{start:"6",children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Implement Output Methods"}),": Implement\xa0methods for each output, which contains the logic of your component. These methods can access input values using\xa0",(0,s.jsx)(t.code,{children:"self."})," , return processed values and define what to be displayed in the component with the\xa0",(0,s.jsx)(t.code,{children:"self.status"}),"\xa0attribute."]}),"\n"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:" def ",props:{style:{color:"#FF7B72"}}},{content:"build_output",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> Data:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" data ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" Data(",props:{style:{color:"#C9D1D9"}}},{content:"value",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".input_value)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" self",props:{style:{color:"#79C0FF"}}},{content:".status ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" data",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" data",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsxs)(t.ol,{start:"7",children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Use Proper Annotations"}),": Ensure that output methods are properly annotated with their types. Langflow uses these annotations to validate and handle data correctly. For example, this method is annotated to output ",(0,s.jsx)(t.code,{children:"Data"}),"."]}),"\n"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:" def ",props:{style:{color:"#FF7B72"}}},{content:"build_output",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> Data:",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsxs)(t.ol,{start:"8",children:["\n",(0,s.jsxs)(t.li,{children:["Click ",(0,s.jsx)(t.strong,{children:"Check & Save"})," to confirm your component works.\nYou now have an operational custom component."]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"add-inputs-and-modify-output-methods",children:"Add inputs and modify output methods"}),"\n",(0,s.jsx)(t.p,{children:"This code defines a custom component that accepts 5 inputs and outputs a Message."}),"\n",(0,s.jsxs)(t.p,{children:["Copy and paste it into the Custom Component code pane and click ",(0,s.jsx)(t.strong,{children:"Check & Save."})]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.custom ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Component",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.inputs ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" StrInput, MultilineInput, SecretStrInput, IntInput, DropdownInput",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.template ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Output, Input",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.schema.message ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Message",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"class ",props:{style:{color:"#FF7B72"}}},{content:"MyCustomComponent",props:{style:{color:"#FFA657"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"Component",props:{style:{color:"#79C0FF"}}},{content:"):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"My Custom Component"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" description ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"An example of a custom component with various input types."',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" inputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" StrInput(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"username"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Username"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" info",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Enter your username."',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" SecretStrInput(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"password"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Password"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" info",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Enter your password."',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" MessageTextInput(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"special_message"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"special_message"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" info",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Enter a special message."',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" IntInput(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"age"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Age"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" info",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Enter your age."',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" DropdownInput(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"gender"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Gender"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" options",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"[",props:{style:{color:"#C9D1D9"}}},{content:'"Male"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"Female"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"Other"',props:{style:{color:"#A5D6FF"}}},{content:"],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" info",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Select your gender."',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" )",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" outputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" Output(",props:{style:{color:"#C9D1D9"}}},{content:"display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Result"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"result"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"method",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"process_inputs"',props:{style:{color:"#A5D6FF"}}},{content:"),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" def ",props:{style:{color:"#FF7B72"}}},{content:"process_inputs",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> Message:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' """',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" Process the user inputs and return a Message object.",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" Returns:",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" Message: A Message object containing the processed information.",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' """',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" try",props:{style:{color:"#FF7B72"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" processed_text ",props:{style:{color:"#C9D1D9"}}},{content:"= f",props:{style:{color:"#FF7B72"}}},{content:'"User ',props:{style:{color:"#A5D6FF"}}},{content:"{self",props:{style:{color:"#79C0FF"}}},{content:".username",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:" (Age: ",props:{style:{color:"#A5D6FF"}}},{content:"{self",props:{style:{color:"#79C0FF"}}},{content:".age",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:", Gender: ",props:{style:{color:"#A5D6FF"}}},{content:"{self",props:{style:{color:"#79C0FF"}}},{content:".gender",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:') "',props:{style:{color:"#A5D6FF"}}},{content:" \\",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" f",props:{style:{color:"#FF7B72"}}},{content:'"sent the following special message: ',props:{style:{color:"#A5D6FF"}}},{content:"{self",props:{style:{color:"#79C0FF"}}},{content:".special_message",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" Message(",props:{style:{color:"#C9D1D9"}}},{content:"text",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"processed_text)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" except ",props:{style:{color:"#FF7B72"}}},{content:"AttributeError ",props:{style:{color:"#79C0FF"}}},{content:"as",props:{style:{color:"#FF7B72"}}},{content:" e:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" Message(",props:{style:{color:"#C9D1D9"}}},{content:"text",props:{style:{color:"#FFA657"}}},{content:"=f",props:{style:{color:"#FF7B72"}}},{content:'"Error processing inputs: ',props:{style:{color:"#A5D6FF"}}},{content:"{str",props:{style:{color:"#79C0FF"}}},{content:"(e)",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:'"',props:{style:{color:"#A5D6FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsxs)(t.p,{children:["Since the component outputs a ",(0,s.jsx)(t.code,{children:"Message"}),", you can wire it into a chat and pass messages to yourself."]}),"\n",(0,s.jsxs)(t.p,{children:["Your Custom Component accepts the Chat Input message through ",(0,s.jsx)(t.code,{children:"MessageTextInput"}),", fills in the variables with the ",(0,s.jsx)(t.code,{children:"process_inputs"})," method, and finally passes the message ",(0,s.jsx)(t.code,{children:"User Username (Age: 49, Gender: Male) sent the following special message: Hello!"})," to Chat Output."]}),"\n",(0,s.jsx)(t.p,{children:"By defining inputs this way, Langflow can automatically handle the validation and display of these fields in the user interface, making it easier to create robust and user-friendly custom components."}),"\n",(0,s.jsxs)(t.p,{children:["All of the types detailed above derive from a general class that can also be accessed through the generic\xa0",(0,s.jsx)(t.code,{children:"Input"}),"\xa0class."]}),"\n",(0,s.jsx)(t.admonition,{type:"tip",children:(0,s.jsxs)(t.p,{children:["Use ",(0,s.jsx)(t.code,{children:"MessageInput"})," to get the entire Message object instead of just the text."]})}),"\n",(0,s.jsx)(t.h2,{id:"3815589831f24ab792328ed233c8b00d",children:"Input Types"}),"\n",(0,s.jsx)(t.hr,{}),"\n",(0,s.jsx)(t.p,{children:"Langflow provides several higher-level input types to simplify the creation of custom components. These input types standardize how inputs are defined, validated, and used. Here\u2019s a guide on how to use these inputs and their primary purposes:"}),"\n",(0,s.jsx)(t.h3,{id:"fb06c48a326043ffa46badc1ab3ba467",children:(0,s.jsx)(t.strong,{children:"HandleInput"})}),"\n",(0,s.jsxs)(t.p,{children:["Represents an input that has a handle to a specific type (e.g.,\xa0",(0,s.jsx)(t.code,{children:"BaseLanguageModel"}),",\xa0",(0,s.jsx)(t.code,{children:"BaseRetriever"}),", etc.)."]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Usage:"}),"\xa0Useful for connecting to specific component types in a flow."]}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"0e1dcb768e38487180d720b0884a90f5",children:(0,s.jsx)(t.strong,{children:"DataInput"})}),"\n",(0,s.jsxs)(t.p,{children:["Represents an input that receives a\xa0",(0,s.jsx)(t.code,{children:"Data"}),"\xa0object."]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Usage:"}),"\xa0Ideal for components that process or manipulate data objects."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Input Types:"}),"\xa0",(0,s.jsx)(t.code,{children:'["Data"]'})]}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"4ec6e68ad9ab4cd194e8e607bc5b3411",children:(0,s.jsx)(t.strong,{children:"StrInput"})}),"\n",(0,s.jsx)(t.p,{children:"Represents a standard string input field."}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Usage:"}),"\xa0Used for any text input where the user needs to provide a string."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Input Types:"}),"\xa0",(0,s.jsx)(t.code,{children:'["Text"]'})]}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"9292ac0105e14177af5eff2131b9c71b",children:(0,s.jsx)(t.strong,{children:"MessageInput"})}),"\n",(0,s.jsxs)(t.p,{children:["Represents an input field specifically for\xa0",(0,s.jsx)(t.code,{children:"Message"}),"\xa0objects."]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Usage:"}),"\xa0Used in components that handle or process messages."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Input Types:"}),"\xa0",(0,s.jsx)(t.code,{children:'["Message"]'})]}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"5511f5e32b944b4e973379a6bd5405e4",children:(0,s.jsx)(t.strong,{children:"MessageTextInput"})}),"\n",(0,s.jsx)(t.p,{children:"Represents a text input for messages."}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Usage:"}),"\xa0Suitable for components that need to extract text from message objects."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Input Types:"}),"\xa0",(0,s.jsx)(t.code,{children:'["Message"]'})]}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"e6d8315b0fb44a2fb8c62c3f3184bbe9",children:(0,s.jsx)(t.strong,{children:"MultilineInput"})}),"\n",(0,s.jsx)(t.p,{children:"Represents a text field that supports multiple lines."}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Usage:"}),"\xa0Ideal for longer text inputs where the user might need to write extended text."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Input Types:"}),"\xa0",(0,s.jsx)(t.code,{children:'["Text"]'})]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Attributes:"}),"\xa0",(0,s.jsx)(t.code,{children:"multiline=True"})]}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"2283c13aa5f745b8b0009f7d40e59419",children:(0,s.jsx)(t.strong,{children:"SecretStrInput"})}),"\n",(0,s.jsx)(t.p,{children:"Represents a password input field."}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Usage:"}),"\xa0Used for sensitive text inputs where the input should be hidden (e.g., passwords, API keys)."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Attributes:"}),"\xa0",(0,s.jsx)(t.code,{children:"password=True"})]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Input Types:"}),"\xa0Does not accept input types, meaning it has no input handles for previous nodes/components to connect to it."]}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"612680db6578451daef695bd19827a56",children:(0,s.jsx)(t.strong,{children:"IntInput"})}),"\n",(0,s.jsx)(t.p,{children:"Represents an integer input field."}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Usage:"}),"\xa0Used for numeric inputs where the value should be an integer."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Input Types:"}),"\xa0",(0,s.jsx)(t.code,{children:'["Integer"]'})]}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"a15e1fdae15b49fc9bfbf38f8bd7b203",children:(0,s.jsx)(t.strong,{children:"FloatInput"})}),"\n",(0,s.jsx)(t.p,{children:"Represents a float input field."}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Usage:"}),"\xa0Used for numeric inputs where the value should be a floating-point number."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Input Types:"}),"\xa0",(0,s.jsx)(t.code,{children:'["Float"]'})]}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"3083671e0e7f4390a03396485114be66",children:(0,s.jsx)(t.strong,{children:"BoolInput"})}),"\n",(0,s.jsx)(t.p,{children:"Represents a boolean input field."}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Usage:"}),"\xa0Used for true/false or yes/no type inputs."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Input Types:"}),"\xa0",(0,s.jsx)(t.code,{children:'["Boolean"]'})]}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"2866fc4018e743d8a45afde53f1e57be",children:(0,s.jsx)(t.strong,{children:"NestedDictInput"})}),"\n",(0,s.jsx)(t.p,{children:"Represents an input field for nested dictionaries."}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Usage:"}),"\xa0Used for more complex data structures where the input needs to be a dictionary."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Input Types:"}),"\xa0",(0,s.jsx)(t.code,{children:'["NestedDict"]'})]}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"daa2c2398f694ec199b425e2ed4bcf93",children:(0,s.jsx)(t.strong,{children:"DictInput"})}),"\n",(0,s.jsx)(t.p,{children:"Represents an input field for dictionaries."}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Usage:"}),"\xa0Suitable for inputs that require a dictionary format."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Input Types:"}),"\xa0",(0,s.jsx)(t.code,{children:'["Dict"]'})]}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"14dcdef11bab4d3f8127eaf2e36a77b9",children:(0,s.jsx)(t.strong,{children:"DropdownInput"})}),"\n",(0,s.jsx)(t.p,{children:"Represents a dropdown input field."}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Usage:"}),"\xa0Used where the user needs to select from a predefined list of options."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Attributes:"}),"\xa0",(0,s.jsx)(t.code,{children:"options"}),"\xa0to define the list of selectable options."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Input Types:"}),"\xa0",(0,s.jsx)(t.code,{children:'["Text"]'})]}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"73e6377dc5f446f39517a558a1291410",children:(0,s.jsx)(t.strong,{children:"FileInput"})}),"\n",(0,s.jsx)(t.p,{children:"Represents a file input field."}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Usage:"}),"\xa0Used to upload files."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Attributes:"}),"\xa0",(0,s.jsx)(t.code,{children:"file_types"}),"\xa0to specify the types of files that can be uploaded."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Input Types:"}),"\xa0",(0,s.jsx)(t.code,{children:'["File"]'})]}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"278e2027493e45b68746af0a5b6c06f6",children:"Generic Input"}),"\n",(0,s.jsx)(t.hr,{}),"\n",(0,s.jsxs)(t.p,{children:["Langflow offers native input types, but you can use any type as long as they are properly annotated in the output methods (e.g.,\xa0",(0,s.jsx)(t.code,{children:"-> list[int]"}),")."]}),"\n",(0,s.jsxs)(t.p,{children:["The\xa0",(0,s.jsx)(t.code,{children:"Input"}),"\xa0class is highly customizable, allowing you to specify a wide range of attributes for each input field. It has several attributes that can be customized:"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"field_type"}),": Specifies the type of field (e.g.,\xa0",(0,s.jsx)(t.code,{children:"str"}),",\xa0",(0,s.jsx)(t.code,{children:"int"}),"). Default is\xa0",(0,s.jsx)(t.code,{children:"str"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"required"}),": Boolean indicating if the field is required. Default is\xa0",(0,s.jsx)(t.code,{children:"False"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"placeholder"}),": Placeholder text for the input field. Default is an empty string."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"is_list"}),": Boolean indicating if the field should accept a list of values. Default is\xa0",(0,s.jsx)(t.code,{children:"False"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"show"}),": Boolean indicating if the field should be shown. Default is\xa0",(0,s.jsx)(t.code,{children:"True"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"multiline"}),": Boolean indicating if the field should allow multi-line input. Default is\xa0",(0,s.jsx)(t.code,{children:"False"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"value"}),": Default value for the input field. Default is\xa0",(0,s.jsx)(t.code,{children:"None"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"file_types"}),": List of accepted file types (for file inputs). Default is an empty list."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"file_path"}),": File path if the field is a file input. Default is\xa0",(0,s.jsx)(t.code,{children:"None"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"password"}),": Boolean indicating if the field is a password. Default is\xa0",(0,s.jsx)(t.code,{children:"False"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"options"}),": List of options for the field (for dropdowns). Default is\xa0",(0,s.jsx)(t.code,{children:"None"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"name"}),": Name of the input field. Default is\xa0",(0,s.jsx)(t.code,{children:"None"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"display_name"}),": Display name for the input field. Default is\xa0",(0,s.jsx)(t.code,{children:"None"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"advanced"}),": Boolean indicating if the field is an advanced parameter. Default is\xa0",(0,s.jsx)(t.code,{children:"False"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"input_types"}),": List of accepted input types. Default is\xa0",(0,s.jsx)(t.code,{children:"None"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"dynamic"}),": Boolean indicating if the field is dynamic. Default is\xa0",(0,s.jsx)(t.code,{children:"False"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"info"}),": Additional information or tooltip for the input field. Default is an empty string."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"real_time_refresh"}),": Boolean indicating if the field should refresh in real-time. Default is\xa0",(0,s.jsx)(t.code,{children:"None"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"refresh_button"}),": Boolean indicating if the field should have a refresh button. Default is\xa0",(0,s.jsx)(t.code,{children:"None"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"refresh_button_text"}),": Text for the refresh button. Default is\xa0",(0,s.jsx)(t.code,{children:"None"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"range_spec"}),": Range specification for numeric fields. Default is\xa0",(0,s.jsx)(t.code,{children:"None"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"load_from_db"}),": Boolean indicating if the field should load from the database. Default is\xa0",(0,s.jsx)(t.code,{children:"False"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"title_case"}),": Boolean indicating if the display name should be in title case. Default is\xa0",(0,s.jsx)(t.code,{children:"True"}),"."]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"create-a-custom-component-with-generic-input",children:"Create a Custom Component with Generic Input"}),"\n",(0,s.jsxs)(t.p,{children:["Here is an example of how to define inputs for a component using the\xa0",(0,s.jsx)(t.code,{children:"Input"}),"\xa0class."]}),"\n",(0,s.jsxs)(t.p,{children:["Copy and paste it into the Custom Component code pane and click ",(0,s.jsx)(t.strong,{children:"Check & Save."})]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.template ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Input, Output",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.custom ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Component",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.field_typing ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Text",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.schema.message ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Message",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" typing ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Dict, Any",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"class ",props:{style:{color:"#FF7B72"}}},{content:"TextAnalyzerComponent",props:{style:{color:"#FFA657"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"Component",props:{style:{color:"#79C0FF"}}},{content:"):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"Text Analyzer"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" description ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"Analyzes input text and provides basic statistics."',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" inputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" Input(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"input_text"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Input Text"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" field_type",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Message"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" required",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"True",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" placeholder",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Enter text to analyze"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" multiline",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"True",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" info",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"The text you want to analyze."',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" input_types",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"[",props:{style:{color:"#C9D1D9"}}},{content:'"Text"',props:{style:{color:"#A5D6FF"}}},{content:"]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" Input(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"include_word_count"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Include Word Count"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" field_type",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"bool"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" required",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"False",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" info",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Whether to include word count in the analysis."',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" Input(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"perform_sentiment_analysis"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Perform Sentiment Analysis"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" field_type",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"bool"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" required",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"False",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" info",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Whether to perform basic sentiment analysis."',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" outputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" Output(",props:{style:{color:"#C9D1D9"}}},{content:"display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Analysis Results"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"results"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"method",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"analyze_text"',props:{style:{color:"#A5D6FF"}}},{content:"),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" def ",props:{style:{color:"#FF7B72"}}},{content:"analyze_text",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> Message:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" # Extract text from the Message object",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" if ",props:{style:{color:"#FF7B72"}}},{content:"isinstance",props:{style:{color:"#79C0FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".input_text, Message):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" text ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".input_text.text",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" else",props:{style:{color:"#FF7B72"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" text ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"str",props:{style:{color:"#79C0FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".input_text)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" results ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "character_count"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"len",props:{style:{color:"#79C0FF"}}},{content:"(text),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sentence_count"',props:{style:{color:"#A5D6FF"}}},{content:": text.count(",props:{style:{color:"#C9D1D9"}}},{content:"'.'",props:{style:{color:"#A5D6FF"}}},{content:") ",props:{style:{color:"#C9D1D9"}}},{content:"+",props:{style:{color:"#FF7B72"}}},{content:" text.count(",props:{style:{color:"#C9D1D9"}}},{content:"'!'",props:{style:{color:"#A5D6FF"}}},{content:") ",props:{style:{color:"#C9D1D9"}}},{content:"+",props:{style:{color:"#FF7B72"}}},{content:" text.count(",props:{style:{color:"#C9D1D9"}}},{content:"'?'",props:{style:{color:"#A5D6FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" if ",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".include_word_count:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" results[",props:{style:{color:"#C9D1D9"}}},{content:'"word_count"',props:{style:{color:"#A5D6FF"}}},{content:"] ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"len",props:{style:{color:"#79C0FF"}}},{content:"(text.split())",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" if ",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".perform_sentiment_analysis:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" # Basic sentiment analysis",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" text_lower ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" text.lower()",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" if ",props:{style:{color:"#FF7B72"}}},{content:'"happy" ',props:{style:{color:"#A5D6FF"}}},{content:"in",props:{style:{color:"#FF7B72"}}},{content:" text_lower ",props:{style:{color:"#C9D1D9"}}},{content:"or ",props:{style:{color:"#FF7B72"}}},{content:'"good" ',props:{style:{color:"#A5D6FF"}}},{content:"in",props:{style:{color:"#FF7B72"}}},{content:" text_lower:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" sentiment ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"positive"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" elif ",props:{style:{color:"#FF7B72"}}},{content:'"sad" ',props:{style:{color:"#A5D6FF"}}},{content:"in",props:{style:{color:"#FF7B72"}}},{content:" text_lower ",props:{style:{color:"#C9D1D9"}}},{content:"or ",props:{style:{color:"#FF7B72"}}},{content:'"bad" ',props:{style:{color:"#A5D6FF"}}},{content:"in",props:{style:{color:"#FF7B72"}}},{content:" text_lower:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" sentiment ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"negative"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" else",props:{style:{color:"#FF7B72"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" sentiment ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"neutral"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" results[",props:{style:{color:"#C9D1D9"}}},{content:'"sentiment"',props:{style:{color:"#A5D6FF"}}},{content:"] ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" sentiment",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" # Convert the results dictionary to a formatted string",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" formatted_results ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"',props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:'"',props:{style:{color:"#A5D6FF"}}},{content:".join([",props:{style:{color:"#C9D1D9"}}},{content:"f",props:{style:{color:"#FF7B72"}}},{content:'"',props:{style:{color:"#A5D6FF"}}},{content:"{",props:{style:{color:"#79C0FF"}}},{content:"key",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:": ",props:{style:{color:"#A5D6FF"}}},{content:"{",props:{style:{color:"#79C0FF"}}},{content:"value",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"for",props:{style:{color:"#FF7B72"}}},{content:" key, value ",props:{style:{color:"#C9D1D9"}}},{content:"in",props:{style:{color:"#FF7B72"}}},{content:" results.items()])",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" # Return a Message object",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" Message(",props:{style:{color:"#C9D1D9"}}},{content:"text",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"formatted_results)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# Define how to use the inputs and outputs",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"component ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" TextAnalyzerComponent()",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(t.p,{children:"In this custom component:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"input_text"})," input is a required multi-line text field that accepts a Message object or a string. It's used to provide the text for analysis."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"include_word_count"})," input is an optional boolean field. When set to True, it adds a word count to the analysis results."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"perform_sentiment_analysis"})," input is an optional boolean field. When set to True, it triggers a basic sentiment analysis of the input text."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"The component performs basic text analysis, including character count and sentence count (based on punctuation marks). If word count is enabled, it splits the text and counts the words. If sentiment analysis is enabled, it performs a simple keyword-based sentiment classification (positive, negative, or neutral)."}),"\n",(0,s.jsxs)(t.p,{children:["Since the component inputs and outputs a ",(0,s.jsx)(t.code,{children:"Message"}),", you can wire the component into a chat and see how the basic custom component logic interacts with your input."]}),"\n",(0,s.jsx)(t.h2,{id:"6f225be8a142450aa19ee8e46a3b3c8c",children:"Create a Custom Component with Multiple Outputs"}),"\n",(0,s.jsx)(t.hr,{}),"\n",(0,s.jsx)(t.p,{children:"In Langflow, custom components can have multiple outputs. Each output can be associated with a specific method in the component, allowing you to define distinct behaviors for each output path. This feature is particularly useful when you want to route data based on certain conditions or process it in multiple ways."}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Definition of Outputs"}),": Each output is defined in the\xa0",(0,s.jsx)(t.code,{children:"outputs"}),"\xa0list of the component. Each output is associated with a display name, an internal name, and a method that gets called to generate the output."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Output Methods"}),": The methods associated with outputs are responsible for generating the data for that particular output. These methods are called when the component is executed, and each method can independently produce its result."]}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"This example component has two outputs:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"process_data"}),": Processes the input text (e.g., converts it to uppercase) and returns it."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"get_processing_function"}),": Returns the\xa0",(0,s.jsx)(t.code,{children:"process_data"}),"\xa0method itself to be reused in composition."]}),"\n"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" typing ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Callable",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.custom ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Component",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.inputs ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" StrInput",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.template ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Output",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.field_typing ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Text",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"class ",props:{style:{color:"#FF7B72"}}},{content:"DualOutputComponent",props:{style:{color:"#FFA657"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"Component",props:{style:{color:"#79C0FF"}}},{content:"):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"Dual Output"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" description ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"Processes input text and returns both the result and the processing function."',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" icon ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"double-arrow"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" inputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" StrInput(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"input_text"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Input Text"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" info",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"The text input to be processed."',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" outputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" Output(",props:{style:{color:"#C9D1D9"}}},{content:"display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Processed Data"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"processed_data"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"method",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"process_data"',props:{style:{color:"#A5D6FF"}}},{content:"),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" Output(",props:{style:{color:"#C9D1D9"}}},{content:"display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Processing Function"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"processing_function"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"method",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"get_processing_function"',props:{style:{color:"#A5D6FF"}}},{content:"),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" def ",props:{style:{color:"#FF7B72"}}},{content:"process_data",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> Text:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" # Process the input text (e.g., convert to uppercase)",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" processed ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".input_text.upper()",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" self",props:{style:{color:"#79C0FF"}}},{content:".status ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" processed",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" processed",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" def ",props:{style:{color:"#FF7B72"}}},{content:"get_processing_function",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> Callable[[], Text]:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" # Return the processing function itself",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" return ",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".process_data",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(t.p,{children:"This example shows how to define multiple outputs in a custom component. The first output returns the processed data, while the second output returns the processing function itself."}),"\n",(0,s.jsxs)(t.p,{children:["The\xa0",(0,s.jsx)(t.code,{children:"processing_function"}),"\xa0output can be used in scenarios where the function itself is needed for further processing or dynamic flow control. Notice how both outputs are properly annotated with their respective types, ensuring clarity and type safety."]}),"\n",(0,s.jsx)(t.h2,{id:"special-operations",children:"Special Operations"}),"\n",(0,s.jsx)(t.p,{children:"Advanced methods and attributes offer additional control and functionality. Understanding how to leverage these can enhance your custom components' capabilities."}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"self.inputs"}),": Access all defined inputs. Useful when an output method needs to interact with multiple inputs."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"self.outputs"}),": Access all defined outputs. This is particularly useful if an output function needs to trigger another output function."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"self.status"}),": Use this to update the component's status or intermediate results. It helps track the component's internal state or store temporary data."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"self.graph.flow_id"}),": Retrieve the flow ID, useful for maintaining context or debugging."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:'self.stop("output_name")'}),": Use this method within an output function to prevent data from being sent through other components. This method stops next component execution and is particularly useful for specific operations where a component should stop from running based on specific conditions."]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"contribute-custom-components-to-langflow",children:"Contribute Custom Components to Langflow"}),"\n",(0,s.jsxs)(t.p,{children:["See ",(0,s.jsx)(t.a,{href:"/contributing-components",children:"How to Contribute"})," to contribute your custom component to Langflow."]})]})}function u(o={}){const{wrapper:t}={...(0,r.R)(),...o.components};return t?(0,s.jsx)(t,{...o,children:(0,s.jsx)(F,{...o})}):F(o)}function h(o,t){throw new Error("Expected "+(t?"component":"object")+" `"+o+"` to be defined: you likely forgot to import, pass, or provide it.")}}}]); \ No newline at end of file diff --git a/assets/js/e6c6a4d2.73491a92.js b/assets/js/e6c6a4d2.21747145.js similarity index 55% rename from assets/js/e6c6a4d2.73491a92.js rename to assets/js/e6c6a4d2.21747145.js index 6c79616849..b2b2446f7f 100644 --- a/assets/js/e6c6a4d2.73491a92.js +++ b/assets/js/e6c6a4d2.21747145.js @@ -1 +1 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[8504],{28453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>l});var s=n(96540);const i={},o=s.createContext(i);function a(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),s.createElement(o.Provider,{value:t},e.children)}},94910:(e,t,n)=>{n.r(t),n.d(t,{contentTitle:()=>l,default:()=>d,frontMatter:()=>a,metadata:()=>s,toc:()=>r});const s=JSON.parse('{"type":"api","id":"experimental-run-flow","title":"Experimental Run Flow","description":"","slug":"/experimental-run-flow","frontMatter":{},"api":{"tags":["Base"],"description":"Executes a specified flow by ID with optional input values, output selection, tweaks, and streaming capability.\\n\\nThis endpoint supports running flows with caching to enhance performance and efficiency.\\n\\n### Parameters:\\n- `flow_id` (str): The unique identifier of the flow to be executed.\\n- `inputs` (List[InputValueRequest], optional): A list of inputs specifying the input values and components\\n for the flow. Each input can target specific components and provide custom values.\\n- `outputs` (List[str], optional): A list of output names to retrieve from the executed flow.\\n If not provided, all outputs are returned.\\n- `tweaks` (Optional[Tweaks], optional): A dictionary of tweaks to customize the flow execution.\\n The tweaks can be used to modify the flow\'s parameters and components.\\n Tweaks can be overridden by the input values.\\n- `stream` (bool, optional): Specifies whether the results should be streamed. Defaults to False.\\n- `session_id` (Union[None, str], optional): An optional session ID to utilize existing session data for the flow\\n execution.\\n- `api_key_user` (User): The user associated with the current API key. Automatically resolved from the API key.\\n\\n### Returns:\\nA `RunResponse` object containing the selected outputs (or all if not specified) of the executed flow\\nand the session ID.\\nThe structure of the response accommodates multiple inputs, providing a nested list of outputs for each input.\\n\\n### Raises:\\nHTTPException: Indicates issues with finding the specified flow, invalid input formats, or internal errors during\\nflow execution.\\n\\n### Example usage:\\n```json\\nPOST /run/flow_id\\nx-api-key: YOUR_API_KEY\\nPayload:\\n{\\n \\"inputs\\": [\\n {\\"components\\": [\\"component1\\"], \\"input_value\\": \\"value1\\"},\\n {\\"components\\": [\\"component3\\"], \\"input_value\\": \\"value2\\"}\\n ],\\n \\"outputs\\": [\\"Component Name\\", \\"component_id\\"],\\n \\"tweaks\\": {\\"parameter_name\\": \\"value\\", \\"Component Name\\": {\\"parameter_name\\": \\"value\\"}, \\"component_id\\": {\\"parameter_name\\": \\"value\\"}}\\n \\"stream\\": false\\n}\\n```\\n\\nThis endpoint facilitates complex flow executions with customized inputs, outputs, and configurations,\\ncatering to diverse application requirements.","operationId":"experimental_run_flow_api_v1_run_advanced__flow_id__post","security":[{"API key query":[]},{"API key header":[]}],"parameters":[{"name":"flow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Flow Id"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"inputs":{"anyOf":[{"items":{"properties":{"components":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Components","default":[]},"input_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input Value"},"session":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"},"type":{"anyOf":[{"type":"string","enum":["chat","text","any"]},{"type":"null"}],"title":"Type","description":"Defines on which components the input value should be applied. \'any\' applies to all input components.","default":"any"}},"additionalProperties":false,"type":"object","title":"InputValueRequest","examples":[{"components":["components_id","Component Name"],"input_value":"input_value","session":"session_id"},{"components":["Component Name"],"input_value":"input_value"},{"input_value":"input_value"},{"components":["Component Name"],"input_value":"input_value","session":"session_id"},{"input_value":"input_value","session":"session_id"},{"input_value":"input_value","type":"chat"},{"input_value":"{\\"key\\": \\"value\\"}","type":"json"}]},"type":"array"},{"type":"null"}],"title":"Inputs"},"outputs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Outputs"},"tweaks":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object"}]},"type":"object","title":"Tweaks","description":"A dictionary of tweaks to adjust the flow\'s execution. Allows customizing flow behavior dynamically. All tweaks are overridden by the input values.","examples":[{"Component Name":{"parameter_name":"value"},"component_id":{"parameter_name":"value"},"parameter_name":"value"}]},{"type":"null"}]},"stream":{"type":"boolean","title":"Stream","default":false},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"}},"type":"object","title":"Body_experimental_run_flow_api_v1_run_advanced__flow_id__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"outputs":{"anyOf":[{"items":{"properties":{"inputs":{"type":"object","title":"Inputs"},"outputs":{"items":{"anyOf":[{"properties":{"results":{"anyOf":[{},{"type":"null"}],"title":"Results"},"artifacts":{"anyOf":[{},{"type":"null"}],"title":"Artifacts"},"outputs":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Outputs"},"logs":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Logs"},"messages":{"anyOf":[{"items":{"properties":{"message":{"anyOf":[{"type":"string"},{"items":{"anyOf":[{"type":"string"},{"type":"object"}]},"type":"array"}],"title":"Message"},"sender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender","default":"Machine"},"sender_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Name","default":"AI"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"stream_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stream Url"},"component_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Component Id"},"files":{"items":{"properties":{"path":{"type":"string","title":"Path"},"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"}},"type":"object","required":["path","name","type"],"title":"File","description":"File schema."},"type":"array","title":"Files","default":[]},"type":{"type":"string","title":"Type"}},"type":"object","required":["message","type"],"title":"ChatOutputResponse","description":"Chat output response schema."},"type":"array"},{"type":"null"}],"title":"Messages"},"timedelta":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Timedelta"},"duration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duration"},"component_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Component Display Name"},"component_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Component Id"},"used_frozen_result":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Used Frozen Result","default":false}},"type":"object","title":"ResultData"},{"type":"null"}]},"type":"array","title":"Outputs"}},"type":"object","title":"RunOutputs"},"type":"array"},{"type":"null"}],"title":"Outputs","default":[]},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"}},"type":"object","title":"RunResponse","description":"Run response schema."}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}},"method":"post","path":"/api/v1/run/advanced/{flow_id}","securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"api/v1/login"}}},"API key query":{"type":"apiKey","in":"query","name":"x-api-key"},"API key header":{"type":"apiKey","in":"header","name":"x-api-key"}},"jsonRequestBodyExample":{"stream":false},"info":{"title":"Langflow","version":"1.4.0"},"postman":{"name":"Experimental Run Flow","description":{"content":"Executes a specified flow by ID with optional input values, output selection, tweaks, and streaming capability.\\n\\nThis endpoint supports running flows with caching to enhance performance and efficiency.\\n\\n### Parameters:\\n- `flow_id` (str): The unique identifier of the flow to be executed.\\n- `inputs` (List[InputValueRequest], optional): A list of inputs specifying the input values and components\\n for the flow. Each input can target specific components and provide custom values.\\n- `outputs` (List[str], optional): A list of output names to retrieve from the executed flow.\\n If not provided, all outputs are returned.\\n- `tweaks` (Optional[Tweaks], optional): A dictionary of tweaks to customize the flow execution.\\n The tweaks can be used to modify the flow\'s parameters and components.\\n Tweaks can be overridden by the input values.\\n- `stream` (bool, optional): Specifies whether the results should be streamed. Defaults to False.\\n- `session_id` (Union[None, str], optional): An optional session ID to utilize existing session data for the flow\\n execution.\\n- `api_key_user` (User): The user associated with the current API key. Automatically resolved from the API key.\\n\\n### Returns:\\nA `RunResponse` object containing the selected outputs (or all if not specified) of the executed flow\\nand the session ID.\\nThe structure of the response accommodates multiple inputs, providing a nested list of outputs for each input.\\n\\n### Raises:\\nHTTPException: Indicates issues with finding the specified flow, invalid input formats, or internal errors during\\nflow execution.\\n\\n### Example usage:\\n```json\\nPOST /run/flow_id\\nx-api-key: YOUR_API_KEY\\nPayload:\\n{\\n \\"inputs\\": [\\n {\\"components\\": [\\"component1\\"], \\"input_value\\": \\"value1\\"},\\n {\\"components\\": [\\"component3\\"], \\"input_value\\": \\"value2\\"}\\n ],\\n \\"outputs\\": [\\"Component Name\\", \\"component_id\\"],\\n \\"tweaks\\": {\\"parameter_name\\": \\"value\\", \\"Component Name\\": {\\"parameter_name\\": \\"value\\"}, \\"component_id\\": {\\"parameter_name\\": \\"value\\"}}\\n \\"stream\\": false\\n}\\n```\\n\\nThis endpoint facilitates complex flow executions with customized inputs, outputs, and configurations,\\ncatering to diverse application requirements.","type":"text/plain"},"url":{"path":["api","v1","run","advanced",":flow_id"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"flow_id"}]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"{\\n \\"inputs\\": [\\n {\\n \\"components\\": [\\n \\"\\",\\n \\"\\"\\n ],\\n \\"input_value\\": \\"\\",\\n \\"session\\": \\"\\",\\n \\"type\\": \\"\\"\\n },\\n {\\n \\"components\\": [\\n \\"\\",\\n \\"\\"\\n ],\\n \\"input_value\\": \\"\\",\\n \\"session\\": \\"\\",\\n \\"type\\": \\"\\"\\n }\\n ],\\n \\"outputs\\": [\\n \\"\\",\\n \\"\\"\\n ],\\n \\"tweaks\\": {\\n \\"reprehenderit_3_d\\": \\"\\",\\n \\"laboris_75\\": \\"\\"\\n },\\n \\"stream\\": false,\\n \\"session_id\\": \\"\\"\\n}","options":{"raw":{"language":"json"}}},"auth":{"type":"apikey","apikey":[{"type":"any","value":"x-api-key","key":"key"},{"type":"any","value":"{{apiKey}}","key":"value"},{"type":"any","value":"query","key":"in"}]}}},"source":"@site/openapi.json","sourceDirName":".","permalink":"/api/experimental-run-flow","previous":{"title":"Webhook Run Flow","permalink":"/api/webhook-run-flow"},"next":{"title":"Process","permalink":"/api/process"}}');var i=n(74848),o=n(28453);const a={},l="Experimental Run Flow",r=[{value:"Parameters:",id:"parameters",level:3},{value:"Returns:",id:"returns",level:3},{value:"Raises:",id:"raises",level:3},{value:"Example usage:",id:"example-usage",level:3}];function p(e){const t={code:"code",h1:"h1",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"experimental-run-flow",children:"Experimental Run Flow"})}),"\n",(0,i.jsx)(t.p,{children:"Executes a specified flow by ID with optional input values, output selection, tweaks, and streaming capability."}),"\n",(0,i.jsx)(t.p,{children:"This endpoint supports running flows with caching to enhance performance and efficiency."}),"\n",(0,i.jsx)(t.h3,{id:"parameters",children:"Parameters:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"flow_id"})," (str): The unique identifier of the flow to be executed."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"inputs"})," (List[InputValueRequest], optional): A list of inputs specifying the input values and components\nfor the flow. Each input can target specific components and provide custom values."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"outputs"})," (List[str], optional): A list of output names to retrieve from the executed flow.\nIf not provided, all outputs are returned."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"tweaks"})," (Optional[Tweaks], optional): A dictionary of tweaks to customize the flow execution.\nThe tweaks can be used to modify the flow's parameters and components.\nTweaks can be overridden by the input values."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"stream"})," (bool, optional): Specifies whether the results should be streamed. Defaults to False."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"session_id"})," (Union[None, str], optional): An optional session ID to utilize existing session data for the flow\nexecution."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"api_key_user"})," (User): The user associated with the current API key. Automatically resolved from the API key."]}),"\n"]}),"\n",(0,i.jsx)(t.h3,{id:"returns",children:"Returns:"}),"\n",(0,i.jsxs)(t.p,{children:["A ",(0,i.jsx)(t.code,{children:"RunResponse"})," object containing the selected outputs (or all if not specified) of the executed flow\nand the session ID.\nThe structure of the response accommodates multiple inputs, providing a nested list of outputs for each input."]}),"\n",(0,i.jsx)(t.h3,{id:"raises",children:"Raises:"}),"\n",(0,i.jsx)(t.p,{children:"HTTPException: Indicates issues with finding the specified flow, invalid input formats, or internal errors during\nflow execution."}),"\n",(0,i.jsx)(t.h3,{id:"example-usage",children:"Example usage:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-json",children:'POST /run/flow_id\nx-api-key: YOUR_API_KEY\nPayload:\n{\n "inputs": [\n {"components": ["component1"], "input_value": "value1"},\n {"components": ["component3"], "input_value": "value2"}\n ],\n "outputs": ["Component Name", "component_id"],\n "tweaks": {"parameter_name": "value", "Component Name": {"parameter_name": "value"}, "component_id": {"parameter_name": "value"}}\n "stream": false\n}\n'})}),"\n",(0,i.jsx)(t.p,{children:"This endpoint facilitates complex flow executions with customized inputs, outputs, and configurations,\ncatering to diverse application requirements."}),"\n",(0,i.jsxs)("table",{style:{display:"table",width:"100%"},children:[(0,i.jsx)("thead",{children:(0,i.jsx)("tr",{children:(0,i.jsx)("th",{style:{textAlign:"left"},children:"Path Parameters"})})}),(0,i.jsx)("tbody",{children:(0,i.jsx)("tr",{children:(0,i.jsxs)("td",{children:[(0,i.jsx)("code",{children:"flow_id"}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" uuid"}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" \u2014 "}),(0,i.jsx)("strong",{style:{fontSize:"var(--ifm-code-font-size)",color:"var(--openapi-required)"},children:" REQUIRED"})]})})})]}),"\n",(0,i.jsxs)("table",{style:{display:"table",width:"100%"},children:[(0,i.jsx)("thead",{children:(0,i.jsx)("tr",{children:(0,i.jsxs)("th",{style:{textAlign:"left"},children:[(0,i.jsx)("span",{children:"Request Body "}),(0,i.jsx)("div",{})]})})}),(0,i.jsxs)("tbody",{children:[(0,i.jsx)("tr",{children:(0,i.jsxs)("td",{children:[(0,i.jsx)("code",{children:"inputs"}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" Inputs"})]})}),(0,i.jsx)("tr",{children:(0,i.jsxs)("td",{children:[(0,i.jsx)("code",{children:"outputs"}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" Outputs"})]})}),(0,i.jsx)("tr",{children:(0,i.jsxs)("td",{children:[(0,i.jsx)("code",{children:"tweaks"}),(0,i.jsx)("span",{style:{opacity:"0.6"}})]})}),(0,i.jsx)("tr",{children:(0,i.jsxs)("td",{children:[(0,i.jsx)("code",{children:"stream"}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" Stream"})]})}),(0,i.jsx)("tr",{children:(0,i.jsxs)("td",{children:[(0,i.jsx)("code",{children:"session_id"}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" Session Id"})]})})]})]}),"\n",(0,i.jsxs)("table",{style:{display:"table",width:"100%"},children:[(0,i.jsx)("thead",{children:(0,i.jsx)("tr",{children:(0,i.jsx)("th",{style:{textAlign:"left"},children:"Responses"})})}),(0,i.jsxs)("tbody",{children:[(0,i.jsx)("tr",{children:(0,i.jsxs)("td",{children:[(0,i.jsxs)("div",{style:{display:"flex"},children:[(0,i.jsx)("div",{style:{marginRight:"var(--ifm-table-cell-padding)"},children:(0,i.jsx)("code",{children:"200"})}),(0,i.jsx)("div",{children:(0,i.jsx)(t.p,{children:"Successful Response"})})]}),(0,i.jsx)("div",{children:(0,i.jsxs)("table",{style:{display:"table",width:"100%",marginTop:"var(--ifm-table-cell-padding)",marginBottom:"0px"},children:[(0,i.jsx)("thead",{children:(0,i.jsx)("tr",{children:(0,i.jsxs)("th",{style:{textAlign:"left"},children:[(0,i.jsx)("span",{children:"Schema "}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" \u2014 "}),(0,i.jsx)("strong",{style:{fontSize:"var(--ifm-code-font-size)",color:"var(--openapi-optional)"},children:" OPTIONAL"}),(0,i.jsx)("div",{})]})})}),(0,i.jsxs)("tbody",{children:[(0,i.jsx)("tr",{children:(0,i.jsxs)("td",{children:[(0,i.jsx)("code",{children:"outputs"}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" Outputs"}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" \u2014 "}),(0,i.jsx)("strong",{style:{fontSize:"var(--ifm-code-font-size)",color:"var(--openapi-optional)"},children:" OPTIONAL"})]})}),(0,i.jsx)("tr",{children:(0,i.jsxs)("td",{children:[(0,i.jsx)("code",{children:"session_id"}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" Session Id"}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" \u2014 "}),(0,i.jsx)("strong",{style:{fontSize:"var(--ifm-code-font-size)",color:"var(--openapi-optional)"},children:" OPTIONAL"})]})})]})]})})]})}),(0,i.jsx)("tr",{children:(0,i.jsxs)("td",{children:[(0,i.jsxs)("div",{style:{display:"flex"},children:[(0,i.jsx)("div",{style:{marginRight:"var(--ifm-table-cell-padding)"},children:(0,i.jsx)("code",{children:"422"})}),(0,i.jsx)("div",{children:(0,i.jsx)(t.p,{children:"Validation Error"})})]}),(0,i.jsx)("div",{children:(0,i.jsxs)("table",{style:{display:"table",width:"100%",marginTop:"var(--ifm-table-cell-padding)",marginBottom:"0px"},children:[(0,i.jsx)("thead",{children:(0,i.jsx)("tr",{children:(0,i.jsxs)("th",{style:{textAlign:"left"},children:[(0,i.jsx)("span",{children:"Schema "}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" \u2014 "}),(0,i.jsx)("strong",{style:{fontSize:"var(--ifm-code-font-size)",color:"var(--openapi-optional)"},children:" OPTIONAL"}),(0,i.jsx)("div",{})]})})}),(0,i.jsx)("tbody",{children:(0,i.jsx)("tr",{children:(0,i.jsxs)("td",{children:[(0,i.jsx)("code",{children:"detail"}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" object[]"}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" \u2014 "}),(0,i.jsx)("strong",{style:{fontSize:"var(--ifm-code-font-size)",color:"var(--openapi-optional)"},children:" OPTIONAL"}),(0,i.jsx)("table",{style:{display:"table",width:"100%",marginTop:"var(--ifm-table-cell-padding)",marginBottom:"0px"},children:(0,i.jsxs)("tbody",{children:[(0,i.jsx)("tr",{children:(0,i.jsxs)("td",{children:[(0,i.jsx)("code",{children:"loc"}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" undefined[]"})]})}),(0,i.jsx)("tr",{children:(0,i.jsxs)("td",{children:[(0,i.jsx)("code",{children:"msg"}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" Message"})]})}),(0,i.jsx)("tr",{children:(0,i.jsxs)("td",{children:[(0,i.jsx)("code",{children:"type"}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" Error Type"})]})})]})})]})})})]})})]})})]})]})]})}function d(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(p,{...e})}):p(e)}}}]); \ No newline at end of file +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[8504],{28453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>l});var s=n(96540);const i={},o=s.createContext(i);function a(e){const t=s.useContext(o);return s.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function l(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),s.createElement(o.Provider,{value:t},e.children)}},94910:(e,t,n)=>{n.r(t),n.d(t,{contentTitle:()=>l,default:()=>d,frontMatter:()=>a,metadata:()=>s,toc:()=>r});const s=JSON.parse('{"type":"api","id":"experimental-run-flow","title":"Experimental Run Flow","description":"","slug":"/experimental-run-flow","frontMatter":{},"api":{"tags":["Base"],"description":"Executes a specified flow by ID with optional input values, output selection, tweaks, and streaming capability.\\n\\nThis endpoint supports running flows with caching to enhance performance and efficiency.\\n\\n### Parameters:\\n- `flow_id` (str): The unique identifier of the flow to be executed.\\n- `inputs` (List[InputValueRequest], optional): A list of inputs specifying the input values and components\\n for the flow. Each input can target specific components and provide custom values.\\n- `outputs` (List[str], optional): A list of output names to retrieve from the executed flow.\\n If not provided, all outputs are returned.\\n- `tweaks` (Optional[Tweaks], optional): A dictionary of tweaks to customize the flow execution.\\n The tweaks can be used to modify the flow\'s parameters and components.\\n Tweaks can be overridden by the input values.\\n- `stream` (bool, optional): Specifies whether the results should be streamed. Defaults to False.\\n- `session_id` (Union[None, str], optional): An optional session ID to utilize existing session data for the flow\\n execution.\\n- `api_key_user` (User): The user associated with the current API key. Automatically resolved from the API key.\\n\\n### Returns:\\nA `RunResponse` object containing the selected outputs (or all if not specified) of the executed flow\\nand the session ID.\\nThe structure of the response accommodates multiple inputs, providing a nested list of outputs for each input.\\n\\n### Raises:\\nHTTPException: Indicates issues with finding the specified flow, invalid input formats, or internal errors during\\nflow execution.\\n\\n### Example usage:\\n```json\\nPOST /run/flow_id\\nx-api-key: YOUR_API_KEY\\nPayload:\\n{\\n \\"inputs\\": [\\n {\\"components\\": [\\"component1\\"], \\"input_value\\": \\"value1\\"},\\n {\\"components\\": [\\"component3\\"], \\"input_value\\": \\"value2\\"}\\n ],\\n \\"outputs\\": [\\"Component Name\\", \\"component_id\\"],\\n \\"tweaks\\": {\\"parameter_name\\": \\"value\\", \\"Component Name\\": {\\"parameter_name\\": \\"value\\"}, \\"component_id\\": {\\"parameter_name\\": \\"value\\"}}\\n \\"stream\\": false\\n}\\n```\\n\\nThis endpoint facilitates complex flow executions with customized inputs, outputs, and configurations,\\ncatering to diverse application requirements.","operationId":"experimental_run_flow_api_v1_run_advanced__flow_id__post","security":[{"API key query":[]},{"API key header":[]}],"parameters":[{"name":"flow_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Flow Id"}}],"requestBody":{"content":{"application/json":{"schema":{"properties":{"inputs":{"anyOf":[{"items":{"properties":{"components":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Components","default":[]},"input_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Input Value"},"session":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session"},"type":{"anyOf":[{"type":"string","enum":["chat","text","any"]},{"type":"null"}],"title":"Type","description":"Defines on which components the input value should be applied. \'any\' applies to all input components.","default":"any"}},"additionalProperties":false,"type":"object","title":"InputValueRequest","examples":[{"components":["components_id","Component Name"],"input_value":"input_value","session":"session_id"},{"components":["Component Name"],"input_value":"input_value"},{"input_value":"input_value"},{"components":["Component Name"],"input_value":"input_value","session":"session_id"},{"input_value":"input_value","session":"session_id"},{"input_value":"input_value","type":"chat"},{"input_value":"{\\"key\\": \\"value\\"}","type":"json"}]},"type":"array"},{"type":"null"}],"title":"Inputs"},"outputs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Outputs"},"tweaks":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"object"}]},"type":"object","title":"Tweaks","description":"A dictionary of tweaks to adjust the flow\'s execution. Allows customizing flow behavior dynamically. All tweaks are overridden by the input values.","examples":[{"Component Name":{"parameter_name":"value"},"component_id":{"parameter_name":"value"},"parameter_name":"value"}]},{"type":"null"}]},"stream":{"type":"boolean","title":"Stream","default":false},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"}},"type":"object","title":"Body_experimental_run_flow_api_v1_run_advanced__flow_id__post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"outputs":{"anyOf":[{"items":{"properties":{"inputs":{"type":"object","title":"Inputs"},"outputs":{"items":{"anyOf":[{"properties":{"results":{"anyOf":[{},{"type":"null"}],"title":"Results"},"artifacts":{"anyOf":[{},{"type":"null"}],"title":"Artifacts"},"outputs":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Outputs"},"logs":{"anyOf":[{"type":"object"},{"type":"null"}],"title":"Logs"},"messages":{"anyOf":[{"items":{"properties":{"message":{"anyOf":[{"type":"string"},{"items":{"anyOf":[{"type":"string"},{"type":"object"}]},"type":"array"}],"title":"Message"},"sender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender","default":"Machine"},"sender_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Name","default":"AI"},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"},"stream_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stream Url"},"component_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Component Id"},"files":{"items":{"properties":{"path":{"type":"string","title":"Path"},"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"}},"type":"object","required":["path","name","type"],"title":"File","description":"File schema."},"type":"array","title":"Files","default":[]},"type":{"type":"string","title":"Type"}},"type":"object","required":["message","type"],"title":"ChatOutputResponse","description":"Chat output response schema."},"type":"array"},{"type":"null"}],"title":"Messages"},"timedelta":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Timedelta"},"duration":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duration"},"component_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Component Display Name"},"component_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Component Id"},"used_frozen_result":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Used Frozen Result","default":false}},"type":"object","title":"ResultData"},{"type":"null"}]},"type":"array","title":"Outputs"}},"type":"object","title":"RunOutputs"},"type":"array"},{"type":"null"}],"title":"Outputs","default":[]},"session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Id"}},"type":"object","title":"RunResponse","description":"Run response schema."}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"properties":{"detail":{"items":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"}}}}},"method":"post","path":"/api/v1/run/advanced/{flow_id}","securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"api/v1/login"}}},"API key query":{"type":"apiKey","in":"query","name":"x-api-key"},"API key header":{"type":"apiKey","in":"header","name":"x-api-key"}},"jsonRequestBodyExample":{"stream":false},"info":{"title":"Langflow","version":"1.4.0"},"postman":{"name":"Experimental Run Flow","description":{"content":"Executes a specified flow by ID with optional input values, output selection, tweaks, and streaming capability.\\n\\nThis endpoint supports running flows with caching to enhance performance and efficiency.\\n\\n### Parameters:\\n- `flow_id` (str): The unique identifier of the flow to be executed.\\n- `inputs` (List[InputValueRequest], optional): A list of inputs specifying the input values and components\\n for the flow. Each input can target specific components and provide custom values.\\n- `outputs` (List[str], optional): A list of output names to retrieve from the executed flow.\\n If not provided, all outputs are returned.\\n- `tweaks` (Optional[Tweaks], optional): A dictionary of tweaks to customize the flow execution.\\n The tweaks can be used to modify the flow\'s parameters and components.\\n Tweaks can be overridden by the input values.\\n- `stream` (bool, optional): Specifies whether the results should be streamed. Defaults to False.\\n- `session_id` (Union[None, str], optional): An optional session ID to utilize existing session data for the flow\\n execution.\\n- `api_key_user` (User): The user associated with the current API key. Automatically resolved from the API key.\\n\\n### Returns:\\nA `RunResponse` object containing the selected outputs (or all if not specified) of the executed flow\\nand the session ID.\\nThe structure of the response accommodates multiple inputs, providing a nested list of outputs for each input.\\n\\n### Raises:\\nHTTPException: Indicates issues with finding the specified flow, invalid input formats, or internal errors during\\nflow execution.\\n\\n### Example usage:\\n```json\\nPOST /run/flow_id\\nx-api-key: YOUR_API_KEY\\nPayload:\\n{\\n \\"inputs\\": [\\n {\\"components\\": [\\"component1\\"], \\"input_value\\": \\"value1\\"},\\n {\\"components\\": [\\"component3\\"], \\"input_value\\": \\"value2\\"}\\n ],\\n \\"outputs\\": [\\"Component Name\\", \\"component_id\\"],\\n \\"tweaks\\": {\\"parameter_name\\": \\"value\\", \\"Component Name\\": {\\"parameter_name\\": \\"value\\"}, \\"component_id\\": {\\"parameter_name\\": \\"value\\"}}\\n \\"stream\\": false\\n}\\n```\\n\\nThis endpoint facilitates complex flow executions with customized inputs, outputs, and configurations,\\ncatering to diverse application requirements.","type":"text/plain"},"url":{"path":["api","v1","run","advanced",":flow_id"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"flow_id"}]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"{\\n \\"inputs\\": [\\n {\\n \\"components\\": [\\n \\"\\",\\n \\"\\"\\n ],\\n \\"input_value\\": \\"\\",\\n \\"session\\": \\"\\",\\n \\"type\\": \\"\\"\\n },\\n {\\n \\"components\\": [\\n \\"\\",\\n \\"\\"\\n ],\\n \\"input_value\\": \\"\\",\\n \\"session\\": \\"\\",\\n \\"type\\": \\"\\"\\n }\\n ],\\n \\"outputs\\": [\\n \\"\\",\\n \\"\\"\\n ],\\n \\"tweaks\\": {\\n \\"voluptatef9\\": \\"\\",\\n \\"minim95\\": \\"\\"\\n },\\n \\"stream\\": false,\\n \\"session_id\\": \\"\\"\\n}","options":{"raw":{"language":"json"}}},"auth":{"type":"apikey","apikey":[{"type":"any","value":"x-api-key","key":"key"},{"type":"any","value":"{{apiKey}}","key":"value"},{"type":"any","value":"query","key":"in"}]}}},"source":"@site/openapi.json","sourceDirName":".","permalink":"/api/experimental-run-flow","previous":{"title":"Webhook Run Flow","permalink":"/api/webhook-run-flow"},"next":{"title":"Process","permalink":"/api/process"}}');var i=n(74848),o=n(28453);const a={},l="Experimental Run Flow",r=[{value:"Parameters:",id:"parameters",level:3},{value:"Returns:",id:"returns",level:3},{value:"Raises:",id:"raises",level:3},{value:"Example usage:",id:"example-usage",level:3}];function p(e){const t={code:"code",h1:"h1",h3:"h3",header:"header",li:"li",p:"p",pre:"pre",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(t.header,{children:(0,i.jsx)(t.h1,{id:"experimental-run-flow",children:"Experimental Run Flow"})}),"\n",(0,i.jsx)(t.p,{children:"Executes a specified flow by ID with optional input values, output selection, tweaks, and streaming capability."}),"\n",(0,i.jsx)(t.p,{children:"This endpoint supports running flows with caching to enhance performance and efficiency."}),"\n",(0,i.jsx)(t.h3,{id:"parameters",children:"Parameters:"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"flow_id"})," (str): The unique identifier of the flow to be executed."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"inputs"})," (List[InputValueRequest], optional): A list of inputs specifying the input values and components\nfor the flow. Each input can target specific components and provide custom values."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"outputs"})," (List[str], optional): A list of output names to retrieve from the executed flow.\nIf not provided, all outputs are returned."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"tweaks"})," (Optional[Tweaks], optional): A dictionary of tweaks to customize the flow execution.\nThe tweaks can be used to modify the flow's parameters and components.\nTweaks can be overridden by the input values."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"stream"})," (bool, optional): Specifies whether the results should be streamed. Defaults to False."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"session_id"})," (Union[None, str], optional): An optional session ID to utilize existing session data for the flow\nexecution."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"api_key_user"})," (User): The user associated with the current API key. Automatically resolved from the API key."]}),"\n"]}),"\n",(0,i.jsx)(t.h3,{id:"returns",children:"Returns:"}),"\n",(0,i.jsxs)(t.p,{children:["A ",(0,i.jsx)(t.code,{children:"RunResponse"})," object containing the selected outputs (or all if not specified) of the executed flow\nand the session ID.\nThe structure of the response accommodates multiple inputs, providing a nested list of outputs for each input."]}),"\n",(0,i.jsx)(t.h3,{id:"raises",children:"Raises:"}),"\n",(0,i.jsx)(t.p,{children:"HTTPException: Indicates issues with finding the specified flow, invalid input formats, or internal errors during\nflow execution."}),"\n",(0,i.jsx)(t.h3,{id:"example-usage",children:"Example usage:"}),"\n",(0,i.jsx)(t.pre,{children:(0,i.jsx)(t.code,{className:"language-json",children:'POST /run/flow_id\nx-api-key: YOUR_API_KEY\nPayload:\n{\n "inputs": [\n {"components": ["component1"], "input_value": "value1"},\n {"components": ["component3"], "input_value": "value2"}\n ],\n "outputs": ["Component Name", "component_id"],\n "tweaks": {"parameter_name": "value", "Component Name": {"parameter_name": "value"}, "component_id": {"parameter_name": "value"}}\n "stream": false\n}\n'})}),"\n",(0,i.jsx)(t.p,{children:"This endpoint facilitates complex flow executions with customized inputs, outputs, and configurations,\ncatering to diverse application requirements."}),"\n",(0,i.jsxs)("table",{style:{display:"table",width:"100%"},children:[(0,i.jsx)("thead",{children:(0,i.jsx)("tr",{children:(0,i.jsx)("th",{style:{textAlign:"left"},children:"Path Parameters"})})}),(0,i.jsx)("tbody",{children:(0,i.jsx)("tr",{children:(0,i.jsxs)("td",{children:[(0,i.jsx)("code",{children:"flow_id"}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" uuid"}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" \u2014 "}),(0,i.jsx)("strong",{style:{fontSize:"var(--ifm-code-font-size)",color:"var(--openapi-required)"},children:" REQUIRED"})]})})})]}),"\n",(0,i.jsxs)("table",{style:{display:"table",width:"100%"},children:[(0,i.jsx)("thead",{children:(0,i.jsx)("tr",{children:(0,i.jsxs)("th",{style:{textAlign:"left"},children:[(0,i.jsx)("span",{children:"Request Body "}),(0,i.jsx)("div",{})]})})}),(0,i.jsxs)("tbody",{children:[(0,i.jsx)("tr",{children:(0,i.jsxs)("td",{children:[(0,i.jsx)("code",{children:"inputs"}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" Inputs"})]})}),(0,i.jsx)("tr",{children:(0,i.jsxs)("td",{children:[(0,i.jsx)("code",{children:"outputs"}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" Outputs"})]})}),(0,i.jsx)("tr",{children:(0,i.jsxs)("td",{children:[(0,i.jsx)("code",{children:"tweaks"}),(0,i.jsx)("span",{style:{opacity:"0.6"}})]})}),(0,i.jsx)("tr",{children:(0,i.jsxs)("td",{children:[(0,i.jsx)("code",{children:"stream"}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" Stream"})]})}),(0,i.jsx)("tr",{children:(0,i.jsxs)("td",{children:[(0,i.jsx)("code",{children:"session_id"}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" Session Id"})]})})]})]}),"\n",(0,i.jsxs)("table",{style:{display:"table",width:"100%"},children:[(0,i.jsx)("thead",{children:(0,i.jsx)("tr",{children:(0,i.jsx)("th",{style:{textAlign:"left"},children:"Responses"})})}),(0,i.jsxs)("tbody",{children:[(0,i.jsx)("tr",{children:(0,i.jsxs)("td",{children:[(0,i.jsxs)("div",{style:{display:"flex"},children:[(0,i.jsx)("div",{style:{marginRight:"var(--ifm-table-cell-padding)"},children:(0,i.jsx)("code",{children:"200"})}),(0,i.jsx)("div",{children:(0,i.jsx)(t.p,{children:"Successful Response"})})]}),(0,i.jsx)("div",{children:(0,i.jsxs)("table",{style:{display:"table",width:"100%",marginTop:"var(--ifm-table-cell-padding)",marginBottom:"0px"},children:[(0,i.jsx)("thead",{children:(0,i.jsx)("tr",{children:(0,i.jsxs)("th",{style:{textAlign:"left"},children:[(0,i.jsx)("span",{children:"Schema "}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" \u2014 "}),(0,i.jsx)("strong",{style:{fontSize:"var(--ifm-code-font-size)",color:"var(--openapi-optional)"},children:" OPTIONAL"}),(0,i.jsx)("div",{})]})})}),(0,i.jsxs)("tbody",{children:[(0,i.jsx)("tr",{children:(0,i.jsxs)("td",{children:[(0,i.jsx)("code",{children:"outputs"}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" Outputs"}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" \u2014 "}),(0,i.jsx)("strong",{style:{fontSize:"var(--ifm-code-font-size)",color:"var(--openapi-optional)"},children:" OPTIONAL"})]})}),(0,i.jsx)("tr",{children:(0,i.jsxs)("td",{children:[(0,i.jsx)("code",{children:"session_id"}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" Session Id"}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" \u2014 "}),(0,i.jsx)("strong",{style:{fontSize:"var(--ifm-code-font-size)",color:"var(--openapi-optional)"},children:" OPTIONAL"})]})})]})]})})]})}),(0,i.jsx)("tr",{children:(0,i.jsxs)("td",{children:[(0,i.jsxs)("div",{style:{display:"flex"},children:[(0,i.jsx)("div",{style:{marginRight:"var(--ifm-table-cell-padding)"},children:(0,i.jsx)("code",{children:"422"})}),(0,i.jsx)("div",{children:(0,i.jsx)(t.p,{children:"Validation Error"})})]}),(0,i.jsx)("div",{children:(0,i.jsxs)("table",{style:{display:"table",width:"100%",marginTop:"var(--ifm-table-cell-padding)",marginBottom:"0px"},children:[(0,i.jsx)("thead",{children:(0,i.jsx)("tr",{children:(0,i.jsxs)("th",{style:{textAlign:"left"},children:[(0,i.jsx)("span",{children:"Schema "}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" \u2014 "}),(0,i.jsx)("strong",{style:{fontSize:"var(--ifm-code-font-size)",color:"var(--openapi-optional)"},children:" OPTIONAL"}),(0,i.jsx)("div",{})]})})}),(0,i.jsx)("tbody",{children:(0,i.jsx)("tr",{children:(0,i.jsxs)("td",{children:[(0,i.jsx)("code",{children:"detail"}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" object[]"}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" \u2014 "}),(0,i.jsx)("strong",{style:{fontSize:"var(--ifm-code-font-size)",color:"var(--openapi-optional)"},children:" OPTIONAL"}),(0,i.jsx)("table",{style:{display:"table",width:"100%",marginTop:"var(--ifm-table-cell-padding)",marginBottom:"0px"},children:(0,i.jsxs)("tbody",{children:[(0,i.jsx)("tr",{children:(0,i.jsxs)("td",{children:[(0,i.jsx)("code",{children:"loc"}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" undefined[]"})]})}),(0,i.jsx)("tr",{children:(0,i.jsxs)("td",{children:[(0,i.jsx)("code",{children:"msg"}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" Message"})]})}),(0,i.jsx)("tr",{children:(0,i.jsxs)("td",{children:[(0,i.jsx)("code",{children:"type"}),(0,i.jsx)("span",{style:{opacity:"0.6"},children:" Error Type"})]})})]})})]})})})]})})]})})]})]})]})}function d(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(p,{...e})}):p(e)}}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.548108f0.js b/assets/js/runtime~main.23e1dbde.js similarity index 97% rename from assets/js/runtime~main.548108f0.js rename to assets/js/runtime~main.23e1dbde.js index 341dadf7cb..41b18f7e5c 100644 --- a/assets/js/runtime~main.548108f0.js +++ b/assets/js/runtime~main.23e1dbde.js @@ -1 +1 @@ -(()=>{"use strict";var e,a,c,f,d,b={},t={};function r(e){var a=t[e];if(void 0!==a)return a.exports;var c=t[e]={id:e,loaded:!1,exports:{}};return b[e].call(c.exports,c,c.exports,r),c.loaded=!0,c.exports}r.m=b,r.c=t,e=[],r.O=(a,c,f,d)=>{if(!c){var b=1/0;for(i=0;i=d)&&Object.keys(r.O).every((e=>r.O[e](c[o])))?c.splice(o--,1):(t=!1,d0&&e[i-1][2]>d;i--)e[i]=e[i-1];e[i]=[c,f,d]},r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a:a}),a},c=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,f){if(1&f&&(e=this(e)),8&f)return e;if("object"==typeof e&&e){if(4&f&&e.__esModule)return e;if(16&f&&"function"==typeof e.then)return e}var d=Object.create(null);r.r(d);var b={};a=a||[null,c({}),c([]),c(c)];for(var t=2&f&&e;"object"==typeof t&&!~a.indexOf(t);t=c(t))Object.getOwnPropertyNames(t).forEach((a=>b[a]=()=>e[a]));return b.default=()=>e,r.d(d,b),d},r.d=(e,a)=>{for(var c in a)r.o(a,c)&&!r.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:a[c]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((a,c)=>(r.f[c](e,a),a)),[])),r.u=e=>"assets/js/"+({11:"d2df9b4e",31:"03e862ce",51:"b7251463",145:"0be1d5fe",191:"c643a6d5",202:"32c42bbe",230:"bc63ae25",265:"d3ca7a96",266:"eca2a4e0",299:"9b5a408c",321:"6e1a9721",368:"07c30ae4",417:"93e16042",444:"14f42f9e",730:"86b18dd0",762:"4af57a32",768:"6d684b63",787:"672a0eba",800:"a4c0ff01",868:"dc7b1ef3",944:"d3600190",957:"c141421f",964:"05d835b4",982:"021496c4",1022:"8a61012d",1035:"24d32e91",1079:"f5818e36",1185:"c2de64b8",1227:"647965d5",1394:"8054effa",1488:"ac3cc3f5",1500:"1e9025f7",1556:"264ffc80",1563:"3ef76b56",1567:"22dd74f7",1625:"92852ade",1690:"41a97a99",1841:"de94873f",1845:"2ab0d4f5",1956:"fe6f9601",2008:"7ad92a12",2073:"7b7db446",2097:"338a6f8e",2138:"1a4e3797",2273:"e756fa26",2288:"faf7ef88",2341:"0123c128",2551:"394022bb",2624:"8ff68e6f",2657:"a3ab51d1",2777:"b3ba68b4",2818:"a9b73094",3110:"6a2beaac",3225:"99a4401d",3247:"bd7ab245",3327:"6aa941bb",3347:"b5257597",3391:"f66238ae",3576:"64045095",3694:"c2b1730c",3740:"f113d167",3795:"c85076de",3832:"c3d82421",3859:"7679ca6e",3917:"c8dad5f1",3964:"829ff4d2",3968:"0e5205b8",4046:"9ac856ad",4133:"5cf11f26",4526:"8311683c",4615:"6801371f",4633:"c563aec0",4645:"fef056e9",4778:"e189eece",4784:"438e4337",4806:"fba42286",4841:"8298c1cb",4867:"d73246f8",4891:"ca67d85f",4930:"d2ad385b",4931:"a9b4f8aa",4954:"a71efd4a",4973:"2d2c4fcb",5107:"10156854",5109:"3542ed72",5138:"309383dc",5179:"41e3c105",5195:"b1ab2a41",5281:"a0511a5b",5284:"64ca91f1",5304:"7dbff1af",5339:"9447891f",5395:"98058046",5448:"5c480e8b",5467:"40d13080",5474:"d175aa8b",5475:"18f3809a",5513:"20d49d07",5514:"02955c09",5562:"20e9af62",5572:"873ebc27",5628:"a83bc7c0",5634:"9822a706",5647:"885eb549",5673:"73af8c33",5716:"946d1cee",5718:"5ccf4833",5742:"aba21aa0",5772:"4e7126f8",5799:"364e949f",5824:"214b2cc2",5865:"e1766139",5866:"3b577cbb",5883:"61cfab8e",5894:"f178e9b3",6003:"4d983c8e",6008:"445668ec",6010:"60c70af6",6053:"dfc50084",6066:"3f19c00a",6080:"4d15791b",6147:"ab17fe15",6201:"9ab37888",6214:"b1220dbd",6281:"c96ce3ed",6332:"873508e7",6350:"188ee668",6419:"96eb0e67",6445:"9fb9a766",6473:"4c5e977b",6511:"320c2db0",6559:"6f13807a",6649:"02e43f39",6682:"5a6d6120",6688:"388c3769",6753:"ff349d2f",6757:"86bd0a2e",6890:"8b85e1d0",6920:"c817e236",6934:"d745f4e6",6949:"b36bb719",7088:"91282a5c",7098:"a7bd4aaa",7108:"688feaef",7118:"4ce9199e",7142:"d0c1f670",7159:"aecfdd3d",7165:"547df4a1",7211:"cacdc615",7338:"c39b795e",7339:"7a774ddf",7408:"3ae94ad4",7453:"fdefa9a8",7462:"921b5fc1",7472:"744aaf8b",7507:"651ef245",7713:"3a82b27e",7894:"0f44198a",8031:"25bf2d67",8054:"85112c90",8064:"274fd934",8085:"cc44357e",8102:"019dbd1f",8184:"222029a9",8188:"ecd67556",8196:"75a9e1e0",8208:"216e3ed7",8245:"5e834a3c",8298:"153f2b62",8304:"73d1a090",8356:"c6a5eaec",8374:"261f8123",8401:"17896441",8504:"e6c6a4d2",8598:"44dfcf75",8661:"8f774222",8679:"3705a9c0",8927:"ae68aa8b",8929:"172b3cfb",8953:"adef6868",8977:"e5eb12ce",9036:"850d3674",9048:"a94703ab",9099:"b1bc5ffe",9126:"169603ea",9141:"19136925",9306:"667d0790",9371:"991799c5",9431:"cd8dccb5",9453:"913561e8",9455:"54175a6c",9476:"57c9a2b8",9479:"4e038a6a",9483:"7823fa72",9509:"49311ca0",9555:"dedd5914",9619:"29b8e27a",9642:"eae80ce0",9647:"5e95c892",9681:"5ff9f4db",9705:"ee3b5967",9731:"52edee88",9751:"25255263",9752:"72d61395",9789:"537e1953",9836:"b3c57e4b",9888:"be76515e",9905:"43df3697"}[e]||e)+"."+{11:"168581d1",31:"43b16ba0",51:"41498688",145:"9d54f496",191:"83533b11",202:"69f8fc12",230:"77c8c240",265:"b8b17601",266:"c2163ebe",299:"d952b796",321:"3ffaf0d0",368:"c9246492",417:"423af991",444:"a6d9ecf3",730:"03766140",756:"240f2e9c",762:"f26eeca8",768:"959a4bbe",787:"d1de1e24",800:"c2dd11be",868:"a2b10d40",900:"f83a9a5d",944:"ad8345f5",957:"da9e1d2b",964:"28ff855d",982:"bd4bbe43",1022:"11242dbc",1035:"be5d74c5",1079:"812abec2",1185:"f640094c",1227:"efa89a5e",1394:"c6bf3115",1488:"0fd73816",1500:"97378ff5",1556:"673367c0",1563:"892a275e",1567:"0ccb1e3f",1625:"14cdddbe",1690:"18a0aabc",1809:"2ba71c72",1841:"2b011ec8",1845:"432fb3ac",1956:"0790982a",2008:"7ff881a6",2073:"6755cfe3",2097:"e2eb4320",2138:"02023697",2273:"fad9ed79",2288:"c860cf3b",2341:"f79cba73",2551:"2680f7e9",2624:"4e3203d0",2657:"e301f410",2777:"e7886ea7",2818:"e14e61cc",3042:"f1fb0b14",3110:"0cb7cba6",3225:"125619ad",3247:"122fa329",3327:"ea2cd923",3347:"ed4c3a68",3391:"20b884ca",3576:"d3102945",3694:"e6dfa3ca",3740:"3b4b7014",3795:"0272ba02",3832:"e1931c05",3859:"ab383010",3917:"5b041d0c",3964:"33002324",3968:"6d49ed88",3997:"ff54fe17",4046:"f7eca8e9",4058:"44d6af12",4133:"56fe7f12",4526:"46dbc5ed",4615:"82ac6ca0",4633:"2670172c",4645:"6f7c5ff8",4778:"28645669",4784:"94e93dbb",4806:"0f85ccb8",4841:"fad5bbcc",4867:"5b7ac5f5",4891:"818b374a",4930:"0dd2be1d",4931:"1f0853a9",4954:"6b159ac6",4973:"76d07199",5107:"1499c50a",5109:"534de25b",5138:"71993e93",5179:"b2881237",5195:"bebcd954",5281:"e2ab724c",5284:"2c396846",5304:"11ff4120",5339:"5447d46a",5395:"299e8e2d",5448:"34a5f81a",5467:"7bd80a85",5474:"21c9fbe2",5475:"d430c771",5513:"cdc0240e",5514:"855d0709",5562:"10eed1f2",5572:"f7be1bf9",5628:"42006513",5634:"f0694192",5647:"5304d422",5673:"8a7c3581",5716:"2e412524",5718:"31276840",5742:"60b1d5b2",5772:"a7008733",5799:"a81e256c",5824:"df4edbad",5865:"786bf75c",5866:"ced87a42",5883:"6e960c1d",5894:"4ccf5f1a",6003:"35524587",6008:"5253986f",6010:"839f9e75",6053:"9b0d787e",6066:"076e5cc7",6080:"447a7218",6147:"0bd0c5ae",6201:"01e4e67e",6214:"41cb2bfe",6281:"60bd4a36",6332:"b2221cb0",6350:"01382664",6419:"76078b34",6445:"d3c24372",6473:"b5e32ff9",6511:"9f084237",6559:"c00a5ffd",6649:"667f9b4f",6682:"11546dbd",6688:"25512b38",6753:"fd250f80",6757:"88aaa7e5",6890:"af012556",6920:"20525113",6934:"8cef23f5",6949:"f6fdd0e4",7088:"1f49a1ed",7098:"d9bb61a0",7108:"b0173767",7118:"67e70c99",7142:"eaad0747",7159:"dceac5e8",7165:"3b87e098",7211:"2931db6c",7338:"ead0f1d0",7339:"38a12705",7408:"23b1699f",7453:"94ce1e19",7462:"5b0d7c49",7472:"4f49843b",7507:"f01e92e1",7713:"54701759",7894:"27692bde",8031:"d39ee16a",8054:"b01ef0b9",8064:"3dcda3b4",8085:"949a33d1",8102:"37d56f47",8158:"20de8b80",8184:"fc212127",8188:"75897100",8196:"9193a95c",8208:"c162501f",8245:"d723ee5e",8298:"633b75a4",8304:"c4e31b33",8356:"ff51d102",8374:"a7f6d0b6",8401:"bf953603",8504:"73491a92",8598:"70cf61ed",8661:"d1261411",8679:"627546dd",8913:"47209f3b",8927:"9d9ff467",8929:"99703724",8953:"f5324ebd",8977:"637025ee",9036:"0b9cf465",9048:"810f8ad8",9099:"46601ad6",9126:"c5e02c3c",9141:"d3838c09",9306:"8ecb1a62",9371:"537c060f",9431:"e4916159",9453:"ff972203",9455:"7fe77314",9476:"5ec69f98",9479:"6c9076f2",9483:"b1231ce2",9509:"b5d4cdad",9555:"dabc08f6",9619:"f661ff54",9642:"167c6e45",9647:"e6d9c2b6",9681:"47d8123a",9705:"d8c5b908",9729:"b22b7ae1",9731:"61443ecd",9751:"80a4b9a2",9752:"be046320",9789:"a25e6068",9836:"69fcbaa3",9888:"1d44fd01",9905:"3d8e83e3"}[e]+".js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),f={},d="langflow-docs:",r.l=(e,a,c,b)=>{if(f[e])f[e].push(a);else{var t,o;if(void 0!==c)for(var n=document.getElementsByTagName("script"),i=0;i{t.onerror=t.onload=null,clearTimeout(s);var d=f[e];if(delete f[e],t.parentNode&&t.parentNode.removeChild(t),d&&d.forEach((e=>e(c))),a)return a(c)},s=setTimeout(u.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=u.bind(null,t.onerror),t.onload=u.bind(null,t.onload),o&&document.head.appendChild(t)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r.p="/",r.gca=function(e){return e={10156854:"5107",17896441:"8401",19136925:"9141",25255263:"9751",64045095:"3576",98058046:"5395",d2df9b4e:"11","03e862ce":"31",b7251463:"51","0be1d5fe":"145",c643a6d5:"191","32c42bbe":"202",bc63ae25:"230",d3ca7a96:"265",eca2a4e0:"266","9b5a408c":"299","6e1a9721":"321","07c30ae4":"368","93e16042":"417","14f42f9e":"444","86b18dd0":"730","4af57a32":"762","6d684b63":"768","672a0eba":"787",a4c0ff01:"800",dc7b1ef3:"868",d3600190:"944",c141421f:"957","05d835b4":"964","021496c4":"982","8a61012d":"1022","24d32e91":"1035",f5818e36:"1079",c2de64b8:"1185","647965d5":"1227","8054effa":"1394",ac3cc3f5:"1488","1e9025f7":"1500","264ffc80":"1556","3ef76b56":"1563","22dd74f7":"1567","92852ade":"1625","41a97a99":"1690",de94873f:"1841","2ab0d4f5":"1845",fe6f9601:"1956","7ad92a12":"2008","7b7db446":"2073","338a6f8e":"2097","1a4e3797":"2138",e756fa26:"2273",faf7ef88:"2288","0123c128":"2341","394022bb":"2551","8ff68e6f":"2624",a3ab51d1:"2657",b3ba68b4:"2777",a9b73094:"2818","6a2beaac":"3110","99a4401d":"3225",bd7ab245:"3247","6aa941bb":"3327",b5257597:"3347",f66238ae:"3391",c2b1730c:"3694",f113d167:"3740",c85076de:"3795",c3d82421:"3832","7679ca6e":"3859",c8dad5f1:"3917","829ff4d2":"3964","0e5205b8":"3968","9ac856ad":"4046","5cf11f26":"4133","8311683c":"4526","6801371f":"4615",c563aec0:"4633",fef056e9:"4645",e189eece:"4778","438e4337":"4784",fba42286:"4806","8298c1cb":"4841",d73246f8:"4867",ca67d85f:"4891",d2ad385b:"4930",a9b4f8aa:"4931",a71efd4a:"4954","2d2c4fcb":"4973","3542ed72":"5109","309383dc":"5138","41e3c105":"5179",b1ab2a41:"5195",a0511a5b:"5281","64ca91f1":"5284","7dbff1af":"5304","9447891f":"5339","5c480e8b":"5448","40d13080":"5467",d175aa8b:"5474","18f3809a":"5475","20d49d07":"5513","02955c09":"5514","20e9af62":"5562","873ebc27":"5572",a83bc7c0:"5628","9822a706":"5634","885eb549":"5647","73af8c33":"5673","946d1cee":"5716","5ccf4833":"5718",aba21aa0:"5742","4e7126f8":"5772","364e949f":"5799","214b2cc2":"5824",e1766139:"5865","3b577cbb":"5866","61cfab8e":"5883",f178e9b3:"5894","4d983c8e":"6003","445668ec":"6008","60c70af6":"6010",dfc50084:"6053","3f19c00a":"6066","4d15791b":"6080",ab17fe15:"6147","9ab37888":"6201",b1220dbd:"6214",c96ce3ed:"6281","873508e7":"6332","188ee668":"6350","96eb0e67":"6419","9fb9a766":"6445","4c5e977b":"6473","320c2db0":"6511","6f13807a":"6559","02e43f39":"6649","5a6d6120":"6682","388c3769":"6688",ff349d2f:"6753","86bd0a2e":"6757","8b85e1d0":"6890",c817e236:"6920",d745f4e6:"6934",b36bb719:"6949","91282a5c":"7088",a7bd4aaa:"7098","688feaef":"7108","4ce9199e":"7118",d0c1f670:"7142",aecfdd3d:"7159","547df4a1":"7165",cacdc615:"7211",c39b795e:"7338","7a774ddf":"7339","3ae94ad4":"7408",fdefa9a8:"7453","921b5fc1":"7462","744aaf8b":"7472","651ef245":"7507","3a82b27e":"7713","0f44198a":"7894","25bf2d67":"8031","85112c90":"8054","274fd934":"8064",cc44357e:"8085","019dbd1f":"8102","222029a9":"8184",ecd67556:"8188","75a9e1e0":"8196","216e3ed7":"8208","5e834a3c":"8245","153f2b62":"8298","73d1a090":"8304",c6a5eaec:"8356","261f8123":"8374",e6c6a4d2:"8504","44dfcf75":"8598","8f774222":"8661","3705a9c0":"8679",ae68aa8b:"8927","172b3cfb":"8929",adef6868:"8953",e5eb12ce:"8977","850d3674":"9036",a94703ab:"9048",b1bc5ffe:"9099","169603ea":"9126","667d0790":"9306","991799c5":"9371",cd8dccb5:"9431","913561e8":"9453","54175a6c":"9455","57c9a2b8":"9476","4e038a6a":"9479","7823fa72":"9483","49311ca0":"9509",dedd5914:"9555","29b8e27a":"9619",eae80ce0:"9642","5e95c892":"9647","5ff9f4db":"9681",ee3b5967:"9705","52edee88":"9731","72d61395":"9752","537e1953":"9789",b3c57e4b:"9836",be76515e:"9888","43df3697":"9905"}[e]||e,r.p+r.u(e)},(()=>{var e={5354:0,1869:0};r.f.j=(a,c)=>{var f=r.o(e,a)?e[a]:void 0;if(0!==f)if(f)c.push(f[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var d=new Promise(((c,d)=>f=e[a]=[c,d]));c.push(f[2]=d);var b=r.p+r.u(a),t=new Error;r.l(b,(c=>{if(r.o(e,a)&&(0!==(f=e[a])&&(e[a]=void 0),f)){var d=c&&("load"===c.type?"missing":c.type),b=c&&c.target&&c.target.src;t.message="Loading chunk "+a+" failed.\n("+d+": "+b+")",t.name="ChunkLoadError",t.type=d,t.request=b,f[1](t)}}),"chunk-"+a,a)}},r.O.j=a=>0===e[a];var a=(a,c)=>{var f,d,b=c[0],t=c[1],o=c[2],n=0;if(b.some((a=>0!==e[a]))){for(f in t)r.o(t,f)&&(r.m[f]=t[f]);if(o)var i=o(r)}for(a&&a(c);n{"use strict";var e,a,c,f,d,b={},t={};function r(e){var a=t[e];if(void 0!==a)return a.exports;var c=t[e]={id:e,loaded:!1,exports:{}};return b[e].call(c.exports,c,c.exports,r),c.loaded=!0,c.exports}r.m=b,r.c=t,e=[],r.O=(a,c,f,d)=>{if(!c){var b=1/0;for(i=0;i=d)&&Object.keys(r.O).every((e=>r.O[e](c[o])))?c.splice(o--,1):(t=!1,d0&&e[i-1][2]>d;i--)e[i]=e[i-1];e[i]=[c,f,d]},r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a:a}),a},c=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,f){if(1&f&&(e=this(e)),8&f)return e;if("object"==typeof e&&e){if(4&f&&e.__esModule)return e;if(16&f&&"function"==typeof e.then)return e}var d=Object.create(null);r.r(d);var b={};a=a||[null,c({}),c([]),c(c)];for(var t=2&f&&e;"object"==typeof t&&!~a.indexOf(t);t=c(t))Object.getOwnPropertyNames(t).forEach((a=>b[a]=()=>e[a]));return b.default=()=>e,r.d(d,b),d},r.d=(e,a)=>{for(var c in a)r.o(a,c)&&!r.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:a[c]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((a,c)=>(r.f[c](e,a),a)),[])),r.u=e=>"assets/js/"+({11:"d2df9b4e",31:"03e862ce",51:"b7251463",145:"0be1d5fe",191:"c643a6d5",202:"32c42bbe",230:"bc63ae25",265:"d3ca7a96",266:"eca2a4e0",299:"9b5a408c",321:"6e1a9721",368:"07c30ae4",417:"93e16042",444:"14f42f9e",730:"86b18dd0",762:"4af57a32",768:"6d684b63",787:"672a0eba",800:"a4c0ff01",868:"dc7b1ef3",944:"d3600190",957:"c141421f",964:"05d835b4",982:"021496c4",1022:"8a61012d",1035:"24d32e91",1079:"f5818e36",1185:"c2de64b8",1227:"647965d5",1394:"8054effa",1488:"ac3cc3f5",1500:"1e9025f7",1556:"264ffc80",1563:"3ef76b56",1567:"22dd74f7",1625:"92852ade",1690:"41a97a99",1841:"de94873f",1845:"2ab0d4f5",1956:"fe6f9601",2008:"7ad92a12",2073:"7b7db446",2097:"338a6f8e",2138:"1a4e3797",2273:"e756fa26",2288:"faf7ef88",2341:"0123c128",2551:"394022bb",2624:"8ff68e6f",2657:"a3ab51d1",2777:"b3ba68b4",2818:"a9b73094",3110:"6a2beaac",3225:"99a4401d",3247:"bd7ab245",3327:"6aa941bb",3347:"b5257597",3391:"f66238ae",3576:"64045095",3694:"c2b1730c",3740:"f113d167",3795:"c85076de",3832:"c3d82421",3859:"7679ca6e",3917:"c8dad5f1",3964:"829ff4d2",3968:"0e5205b8",4046:"9ac856ad",4133:"5cf11f26",4526:"8311683c",4615:"6801371f",4633:"c563aec0",4645:"fef056e9",4778:"e189eece",4784:"438e4337",4806:"fba42286",4841:"8298c1cb",4867:"d73246f8",4891:"ca67d85f",4930:"d2ad385b",4931:"a9b4f8aa",4954:"a71efd4a",4973:"2d2c4fcb",5107:"10156854",5109:"3542ed72",5138:"309383dc",5179:"41e3c105",5195:"b1ab2a41",5281:"a0511a5b",5284:"64ca91f1",5304:"7dbff1af",5339:"9447891f",5395:"98058046",5448:"5c480e8b",5467:"40d13080",5474:"d175aa8b",5475:"18f3809a",5513:"20d49d07",5514:"02955c09",5562:"20e9af62",5572:"873ebc27",5628:"a83bc7c0",5634:"9822a706",5647:"885eb549",5673:"73af8c33",5716:"946d1cee",5718:"5ccf4833",5742:"aba21aa0",5772:"4e7126f8",5799:"364e949f",5824:"214b2cc2",5865:"e1766139",5866:"3b577cbb",5883:"61cfab8e",5894:"f178e9b3",6003:"4d983c8e",6008:"445668ec",6010:"60c70af6",6053:"dfc50084",6066:"3f19c00a",6080:"4d15791b",6147:"ab17fe15",6201:"9ab37888",6214:"b1220dbd",6281:"c96ce3ed",6332:"873508e7",6350:"188ee668",6419:"96eb0e67",6445:"9fb9a766",6473:"4c5e977b",6511:"320c2db0",6559:"6f13807a",6649:"02e43f39",6682:"5a6d6120",6688:"388c3769",6753:"ff349d2f",6757:"86bd0a2e",6890:"8b85e1d0",6920:"c817e236",6934:"d745f4e6",6949:"b36bb719",7088:"91282a5c",7098:"a7bd4aaa",7108:"688feaef",7118:"4ce9199e",7142:"d0c1f670",7159:"aecfdd3d",7165:"547df4a1",7211:"cacdc615",7338:"c39b795e",7339:"7a774ddf",7408:"3ae94ad4",7453:"fdefa9a8",7462:"921b5fc1",7472:"744aaf8b",7507:"651ef245",7713:"3a82b27e",7894:"0f44198a",8031:"25bf2d67",8054:"85112c90",8064:"274fd934",8085:"cc44357e",8102:"019dbd1f",8184:"222029a9",8188:"ecd67556",8196:"75a9e1e0",8208:"216e3ed7",8245:"5e834a3c",8298:"153f2b62",8304:"73d1a090",8356:"c6a5eaec",8374:"261f8123",8401:"17896441",8504:"e6c6a4d2",8598:"44dfcf75",8661:"8f774222",8679:"3705a9c0",8927:"ae68aa8b",8929:"172b3cfb",8953:"adef6868",8977:"e5eb12ce",9036:"850d3674",9048:"a94703ab",9099:"b1bc5ffe",9126:"169603ea",9141:"19136925",9306:"667d0790",9371:"991799c5",9431:"cd8dccb5",9453:"913561e8",9455:"54175a6c",9476:"57c9a2b8",9479:"4e038a6a",9483:"7823fa72",9509:"49311ca0",9555:"dedd5914",9619:"29b8e27a",9642:"eae80ce0",9647:"5e95c892",9681:"5ff9f4db",9705:"ee3b5967",9731:"52edee88",9751:"25255263",9752:"72d61395",9789:"537e1953",9836:"b3c57e4b",9888:"be76515e",9905:"43df3697"}[e]||e)+"."+{11:"168581d1",31:"43b16ba0",51:"41498688",145:"9d54f496",191:"83533b11",202:"69f8fc12",230:"77c8c240",265:"b8b17601",266:"c2163ebe",299:"d952b796",321:"3ffaf0d0",368:"c9246492",417:"423af991",444:"a6d9ecf3",730:"03766140",756:"240f2e9c",762:"f26eeca8",768:"959a4bbe",787:"d1de1e24",800:"c2dd11be",868:"a2b10d40",900:"f83a9a5d",944:"ad8345f5",957:"da9e1d2b",964:"28ff855d",982:"bd4bbe43",1022:"11242dbc",1035:"be5d74c5",1079:"812abec2",1185:"f640094c",1227:"efa89a5e",1394:"c6bf3115",1488:"0fd73816",1500:"97378ff5",1556:"673367c0",1563:"892a275e",1567:"1d02fab2",1625:"14cdddbe",1690:"18a0aabc",1809:"2ba71c72",1841:"2b011ec8",1845:"a45fbbd1",1956:"0790982a",2008:"7ff881a6",2073:"6755cfe3",2097:"e2eb4320",2138:"02023697",2273:"fad9ed79",2288:"c860cf3b",2341:"f79cba73",2551:"2680f7e9",2624:"4e3203d0",2657:"e301f410",2777:"e7886ea7",2818:"e14e61cc",3042:"f1fb0b14",3110:"0cb7cba6",3225:"125619ad",3247:"122fa329",3327:"ea2cd923",3347:"ed4c3a68",3391:"20b884ca",3576:"d3102945",3694:"e6dfa3ca",3740:"3b4b7014",3795:"0272ba02",3832:"e1931c05",3859:"ab383010",3917:"5b041d0c",3964:"33002324",3968:"6d49ed88",3997:"ff54fe17",4046:"f7eca8e9",4058:"44d6af12",4133:"56fe7f12",4526:"46dbc5ed",4615:"82ac6ca0",4633:"2670172c",4645:"6f7c5ff8",4778:"28645669",4784:"94e93dbb",4806:"0f85ccb8",4841:"fad5bbcc",4867:"5b7ac5f5",4891:"818b374a",4930:"0dd2be1d",4931:"1f0853a9",4954:"6b159ac6",4973:"76d07199",5107:"1499c50a",5109:"534de25b",5138:"71993e93",5179:"b2881237",5195:"bebcd954",5281:"e2ab724c",5284:"2c396846",5304:"11ff4120",5339:"5447d46a",5395:"299e8e2d",5448:"34a5f81a",5467:"7bd80a85",5474:"21c9fbe2",5475:"d430c771",5513:"cdc0240e",5514:"855d0709",5562:"10eed1f2",5572:"ddc13f75",5628:"42006513",5634:"f0694192",5647:"5304d422",5673:"8a7c3581",5716:"2e412524",5718:"31276840",5742:"60b1d5b2",5772:"a7008733",5799:"a81e256c",5824:"df4edbad",5865:"786bf75c",5866:"ced87a42",5883:"6e960c1d",5894:"4ccf5f1a",6003:"35524587",6008:"5253986f",6010:"839f9e75",6053:"9b0d787e",6066:"076e5cc7",6080:"447a7218",6147:"0bd0c5ae",6201:"01e4e67e",6214:"41cb2bfe",6281:"60bd4a36",6332:"b2221cb0",6350:"01382664",6419:"76078b34",6445:"d3c24372",6473:"b5e32ff9",6511:"9f084237",6559:"c00a5ffd",6649:"667f9b4f",6682:"11546dbd",6688:"25512b38",6753:"fd250f80",6757:"88aaa7e5",6890:"af012556",6920:"20525113",6934:"8cef23f5",6949:"f6fdd0e4",7088:"1f49a1ed",7098:"d9bb61a0",7108:"b0173767",7118:"67e70c99",7142:"eaad0747",7159:"dceac5e8",7165:"3b87e098",7211:"2931db6c",7338:"ead0f1d0",7339:"38a12705",7408:"23b1699f",7453:"94ce1e19",7462:"5b0d7c49",7472:"4f49843b",7507:"f01e92e1",7713:"54701759",7894:"27692bde",8031:"d39ee16a",8054:"b01ef0b9",8064:"3dcda3b4",8085:"949a33d1",8102:"37d56f47",8158:"20de8b80",8184:"fc212127",8188:"75897100",8196:"9193a95c",8208:"c162501f",8245:"d723ee5e",8298:"633b75a4",8304:"c4e31b33",8356:"ff51d102",8374:"a7f6d0b6",8401:"bf953603",8504:"21747145",8598:"70cf61ed",8661:"d1261411",8679:"627546dd",8913:"47209f3b",8927:"9d9ff467",8929:"99703724",8953:"f5324ebd",8977:"637025ee",9036:"0b9cf465",9048:"810f8ad8",9099:"46601ad6",9126:"c5e02c3c",9141:"d3838c09",9306:"8ecb1a62",9371:"537c060f",9431:"e4916159",9453:"ff972203",9455:"7fe77314",9476:"5ec69f98",9479:"6c9076f2",9483:"b1231ce2",9509:"b5d4cdad",9555:"dabc08f6",9619:"f661ff54",9642:"167c6e45",9647:"e6d9c2b6",9681:"47d8123a",9705:"d8c5b908",9729:"b22b7ae1",9731:"61443ecd",9751:"80a4b9a2",9752:"be046320",9789:"a25e6068",9836:"69fcbaa3",9888:"1d44fd01",9905:"3d8e83e3"}[e]+".js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),f={},d="langflow-docs:",r.l=(e,a,c,b)=>{if(f[e])f[e].push(a);else{var t,o;if(void 0!==c)for(var n=document.getElementsByTagName("script"),i=0;i{t.onerror=t.onload=null,clearTimeout(s);var d=f[e];if(delete f[e],t.parentNode&&t.parentNode.removeChild(t),d&&d.forEach((e=>e(c))),a)return a(c)},s=setTimeout(u.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=u.bind(null,t.onerror),t.onload=u.bind(null,t.onload),o&&document.head.appendChild(t)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r.p="/",r.gca=function(e){return e={10156854:"5107",17896441:"8401",19136925:"9141",25255263:"9751",64045095:"3576",98058046:"5395",d2df9b4e:"11","03e862ce":"31",b7251463:"51","0be1d5fe":"145",c643a6d5:"191","32c42bbe":"202",bc63ae25:"230",d3ca7a96:"265",eca2a4e0:"266","9b5a408c":"299","6e1a9721":"321","07c30ae4":"368","93e16042":"417","14f42f9e":"444","86b18dd0":"730","4af57a32":"762","6d684b63":"768","672a0eba":"787",a4c0ff01:"800",dc7b1ef3:"868",d3600190:"944",c141421f:"957","05d835b4":"964","021496c4":"982","8a61012d":"1022","24d32e91":"1035",f5818e36:"1079",c2de64b8:"1185","647965d5":"1227","8054effa":"1394",ac3cc3f5:"1488","1e9025f7":"1500","264ffc80":"1556","3ef76b56":"1563","22dd74f7":"1567","92852ade":"1625","41a97a99":"1690",de94873f:"1841","2ab0d4f5":"1845",fe6f9601:"1956","7ad92a12":"2008","7b7db446":"2073","338a6f8e":"2097","1a4e3797":"2138",e756fa26:"2273",faf7ef88:"2288","0123c128":"2341","394022bb":"2551","8ff68e6f":"2624",a3ab51d1:"2657",b3ba68b4:"2777",a9b73094:"2818","6a2beaac":"3110","99a4401d":"3225",bd7ab245:"3247","6aa941bb":"3327",b5257597:"3347",f66238ae:"3391",c2b1730c:"3694",f113d167:"3740",c85076de:"3795",c3d82421:"3832","7679ca6e":"3859",c8dad5f1:"3917","829ff4d2":"3964","0e5205b8":"3968","9ac856ad":"4046","5cf11f26":"4133","8311683c":"4526","6801371f":"4615",c563aec0:"4633",fef056e9:"4645",e189eece:"4778","438e4337":"4784",fba42286:"4806","8298c1cb":"4841",d73246f8:"4867",ca67d85f:"4891",d2ad385b:"4930",a9b4f8aa:"4931",a71efd4a:"4954","2d2c4fcb":"4973","3542ed72":"5109","309383dc":"5138","41e3c105":"5179",b1ab2a41:"5195",a0511a5b:"5281","64ca91f1":"5284","7dbff1af":"5304","9447891f":"5339","5c480e8b":"5448","40d13080":"5467",d175aa8b:"5474","18f3809a":"5475","20d49d07":"5513","02955c09":"5514","20e9af62":"5562","873ebc27":"5572",a83bc7c0:"5628","9822a706":"5634","885eb549":"5647","73af8c33":"5673","946d1cee":"5716","5ccf4833":"5718",aba21aa0:"5742","4e7126f8":"5772","364e949f":"5799","214b2cc2":"5824",e1766139:"5865","3b577cbb":"5866","61cfab8e":"5883",f178e9b3:"5894","4d983c8e":"6003","445668ec":"6008","60c70af6":"6010",dfc50084:"6053","3f19c00a":"6066","4d15791b":"6080",ab17fe15:"6147","9ab37888":"6201",b1220dbd:"6214",c96ce3ed:"6281","873508e7":"6332","188ee668":"6350","96eb0e67":"6419","9fb9a766":"6445","4c5e977b":"6473","320c2db0":"6511","6f13807a":"6559","02e43f39":"6649","5a6d6120":"6682","388c3769":"6688",ff349d2f:"6753","86bd0a2e":"6757","8b85e1d0":"6890",c817e236:"6920",d745f4e6:"6934",b36bb719:"6949","91282a5c":"7088",a7bd4aaa:"7098","688feaef":"7108","4ce9199e":"7118",d0c1f670:"7142",aecfdd3d:"7159","547df4a1":"7165",cacdc615:"7211",c39b795e:"7338","7a774ddf":"7339","3ae94ad4":"7408",fdefa9a8:"7453","921b5fc1":"7462","744aaf8b":"7472","651ef245":"7507","3a82b27e":"7713","0f44198a":"7894","25bf2d67":"8031","85112c90":"8054","274fd934":"8064",cc44357e:"8085","019dbd1f":"8102","222029a9":"8184",ecd67556:"8188","75a9e1e0":"8196","216e3ed7":"8208","5e834a3c":"8245","153f2b62":"8298","73d1a090":"8304",c6a5eaec:"8356","261f8123":"8374",e6c6a4d2:"8504","44dfcf75":"8598","8f774222":"8661","3705a9c0":"8679",ae68aa8b:"8927","172b3cfb":"8929",adef6868:"8953",e5eb12ce:"8977","850d3674":"9036",a94703ab:"9048",b1bc5ffe:"9099","169603ea":"9126","667d0790":"9306","991799c5":"9371",cd8dccb5:"9431","913561e8":"9453","54175a6c":"9455","57c9a2b8":"9476","4e038a6a":"9479","7823fa72":"9483","49311ca0":"9509",dedd5914:"9555","29b8e27a":"9619",eae80ce0:"9642","5e95c892":"9647","5ff9f4db":"9681",ee3b5967:"9705","52edee88":"9731","72d61395":"9752","537e1953":"9789",b3c57e4b:"9836",be76515e:"9888","43df3697":"9905"}[e]||e,r.p+r.u(e)},(()=>{var e={5354:0,1869:0};r.f.j=(a,c)=>{var f=r.o(e,a)?e[a]:void 0;if(0!==f)if(f)c.push(f[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var d=new Promise(((c,d)=>f=e[a]=[c,d]));c.push(f[2]=d);var b=r.p+r.u(a),t=new Error;r.l(b,(c=>{if(r.o(e,a)&&(0!==(f=e[a])&&(e[a]=void 0),f)){var d=c&&("load"===c.type?"missing":c.type),b=c&&c.target&&c.target.src;t.message="Loading chunk "+a+" failed.\n("+d+": "+b+")",t.name="ChunkLoadError",t.type=d,t.request=b,f[1](t)}}),"chunk-"+a,a)}},r.O.j=a=>0===e[a];var a=(a,c)=>{var f,d,b=c[0],t=c[1],o=c[2],n=0;if(b.some((a=>0!==e[a]))){for(f in t)r.o(t,f)&&(r.m[f]=t[f]);if(o)var i=o(r)}for(a&&a(c);n - + diff --git a/components-agents.html b/components-agents.html index 73798be30c..c8f7dfc191 100644 --- a/components-agents.html +++ b/components-agents.html @@ -21,7 +21,7 @@ - + diff --git a/components-bundle-components.html b/components-bundle-components.html index f3650e10fb..fbac8edb3c 100644 --- a/components-bundle-components.html +++ b/components-bundle-components.html @@ -21,7 +21,7 @@ - + diff --git a/components-custom-components.html b/components-custom-components.html index 3c9618577d..680801c1f1 100644 --- a/components-custom-components.html +++ b/components-custom-components.html @@ -3,7 +3,7 @@ -Create custom Python components | Langflow Documentation +Create custom Python components | Langflow Documentation @@ -21,7 +21,7 @@ - + @@ -34,226 +34,300 @@

Create custom Python components

-

Custom components are created within Langflow and extend the platform's functionality with custom, reusable Python code.

-

Since Langflow operates with Python behind the scenes, you can implement any Python function within a Custom Component. This means you can leverage the power of libraries such as Pandas, Scikit-learn, Numpy, and thousands of other packages to create components that handle data processing in unlimited ways. You can use any type as long as the type is properly annotated in the output methods (e.g., > list[int]).

-

Custom Components create reusable and configurable components to enhance the capabilities of Langflow, making it a powerful tool for developing complex processing between user and AI messages.

+

Custom components extend Langflow's functionality through Python classes that inherit from Component. This enables integration of new features, data manipulation, external services, and specialized tools.

+

In Langflow's node-based environment, each node is a "component" that performs discrete functions. Custom components are Python classes which define:

+
    +
  • Inputs — Data or parameters your component requires.
  • +
  • Outputs — Data your component provides to downstream nodes.
  • +
  • Logic — How you process inputs to produce outputs.
  • +
+

The benefits of creating custom components include unlimited extensibility, reusability, automatic UI field generation based on inputs, and type-safe connections between nodes.

+

Create custom components for performing specialized tasks, calling APIs, or adding advanced logic.

+

Custom components in Langflow are built upon:

+
    +
  • The Python class that inherits from Component.
  • +
  • Class-level attributes that identify and describe the component.
  • +
  • Input and output lists that determine data flow.
  • +
  • Internal variables for logging and advanced logic.
  • +
+

Class-level attributes​

+

Define these attributes to control a custom component's appearance and behavior:

+

_10
class MyCsvReader(Component):
_10
display_name = "CSV Reader" # Shown in node header
_10
description = "Reads CSV files" # Tooltip text
_10
icon = "file-text" # Visual identifier
_10
name = "CSVReader" # Unique internal ID
_10
documentation = "http://docs.example.com/csv_reader" # Optional

+
    +
  • display_name: A user-friendly label in the node header.
  • +
  • description: A brief summary shown in tooltips.
  • +
  • icon: A visual identifier from Langflow's icon library.
  • +
  • name: A unique internal identifier.
  • +
  • documentation: An optional link to external docs.
  • +
+

Structure of a custom component​

+

A Langflow custom component goes beyond a simple class with inputs and outputs. It includes an internal structure with optional lifecycle steps, output generation, front-end interaction, and logic organization.

+

A basic component:

+
    +
  • Inherits from langflow.custom.Component.
  • +
  • Declares metadata like display_name, description, icon, and more.
  • +
  • Defines inputs and outputs lists.
  • +
  • Implements methods matching output specifications.
  • +
+

A minimal custom component skeleton contains the following:

+

_14
from langflow.custom import Component
_14
from langflow.template import Output
_14
_14
class MyComponent(Component):
_14
display_name = "My Component"
_14
description = "A short summary."
_14
icon = "sparkles"
_14
name = "MyComponent"
_14
_14
inputs = []
_14
outputs = []
_14
_14
def some_output_method(self):
_14
return ...

+

Internal Lifecycle and Execution Flow​

+

Langflow's engine manages:

+
    +
  • Instantiation: A component is created and internal structures are initialized.
  • +
  • Assigning Inputs: Values from the UI or connections are assigned to component fields.
  • +
  • Validation and Setup: Optional hooks like _pre_run_setup.
  • +
  • Outputs Generation: run() or build_results() triggers output methods.
  • +
+

Optional Hooks:

+
    +
  • initialize_data or _pre_run_setup can run setup logic before the component's main execution.
  • +
  • __call__, run(), or _run() can be overridden to customize how the component is called or to define custom execution logic.
  • +
+

Inputs and outputs​

+

Custom component inputs are defined with properties like:

+
    +
  • name, display_name
  • +
  • Optional: info, value, advanced, is_list, tool_mode, real_time_refresh
  • +
+

For example:

+
    +
  • StrInput: simple text input.
  • +
  • DropdownInput: selectable options.
  • +
  • HandleInput: specialized connections.
  • +
+

Custom component Output properties define:

+
    +
  • name, display_name, method
  • +
  • Optional: info
  • +
+

For more information, see Custom component inputs and outputs.

+

Associated Methods​

+

Each output is linked to a method:

+
    +
  • The output method name must match the method name.
  • +
  • The method typically returns objects like Message, Data, or DataFrame.
  • +
  • The method can use inputs with self.<input_name>.
  • +
+

For example:

+

_12
Output(
_12
display_name="File Contents",
_12
name="file_contents",
_12
method="read_file"
_12
)
_12
#...
_12
def read_file(self) -> Data:
_12
path = self.filename
_12
with open(path, "r") as f:
_12
content = f.read()
_12
self.status = f"Read {len(content)} chars from {path}"
_12
return Data(data={"content": content})

+

Components with multiple outputs​

+

A component can define multiple outputs. +Each output can have a different corresponding method. +For example:

+

_10
outputs = [
_10
Output(display_name="Processed Data", name="processed_data", method="process_data"),
_10
Output(display_name="Debug Info", name="debug_info", method="provide_debug_info"),
_10
]

+

Common internal patterns​

+

_pre_run_setup()​

+

To initialize a custom component with counters set:

+

_10
def _pre_run_setup(self):
_10
if not hasattr(self, "_initialized"):
_10
self._initialized = True
_10
self.iteration = 0

+

Override run or _run​

+

You can override async def _run(self): ... to define custom execution logic, although the default behavior from the base class usually covers most cases.

+

Store data in self.ctx​

+

Use self.ctx as a shared storage for data or counters across the component's execution flow:

+

_10
def some_method(self):
_10
count = self.ctx.get("my_count", 0)
_10
self.ctx["my_count"] = count + 1

Directory structure requirements​

By default, Langflow looks for custom components in the langflow/components directory.

-

If you're creating custom components in a different location using the LANGFLOW_COMPONENTS_PATH -LANGFLOW_COMPONENTS_PATH environment variable, components must be organized in a specific directory structure to be properly loaded and displayed in the UI:

-

_10
/your/custom/components/path/ # Base directory (set by LANGFLOW_COMPONENTS_PATH)
_10
└── category_name/ # Required category subfolder (determines menu name)
_10
└── custom_component.py # Component file

+

If you're creating custom components in a different location using the LANGFLOW_COMPONENTS_PATH environment variable, components must be organized in a specific directory structure to be properly loaded and displayed in the UI:

+

_10
/your/custom/components/path/ # Base directory set by LANGFLOW_COMPONENTS_PATH
_10
└── category_name/ # Required category subfolder that determines menu name
_10
└── custom_component.py # Component file

Components must be placed inside category folders, not directly in the base directory. The category folder name determines where the component appears in the UI menu.

For example, to add a component to the Helpers menu, place it in a helpers subfolder:

-

_10
/app/custom_components/ # LANGFLOW_COMPONENTS_PATH
_10
└── helpers/ # Shows up as "Helpers" menu
_10
└── custom_component.py # Your component

+

_10
/app/custom_components/ # LANGFLOW_COMPONENTS_PATH
_10
└── helpers/ # Displayed within the "Helpers" menu
_10
└── custom_component.py # Your component

You can have multiple category folders to organize components into different menus:


_10
/app/custom_components/
_10
├── helpers/
_10
│ └── helper_component.py
_10
└── tools/
_10
└── tool_component.py

This folder structure is required for Langflow to properly discover and load your custom components. Components placed directly in the base directory will not be loaded.


_10
/app/custom_components/ # LANGFLOW_COMPONENTS_PATH
_10
└── custom_component.py # Won't be loaded - missing category folder!

-

Create a custom component in Langflow​

-

Creating custom components in Langflow involves creating a Python class that defines the component's functionality, inputs, and outputs. -The default code provides a working structure for your custom component.

-

_25
# from langflow.field_typing import Data
_25
from langflow.custom import Component
_25
from langflow.io import MessageTextInput, Output
_25
from langflow.schema import Data
_25
_25
_25
class CustomComponent(Component):
_25
display_name = "Custom Component"
_25
description = "Use as a template to create your own component."
_25
documentation: str = "https://docs.langflow.org/components-custom-components"
_25
icon = "custom_components"
_25
name = "CustomComponent"
_25
_25
inputs = [
_25
MessageTextInput(name="input_value", display_name="Input Value", value="Hello, World!"),
_25
]
_25
_25
outputs = [
_25
Output(display_name="Output", name="output", method="build_output"),
_25
]
_25
_25
def build_output(self) -> Data:
_25
data = Data(value=self.input_value)
_25
self.status = data
_25
return data

-

You can create your class in your favorite text editor outside of Langflow and paste it in later, or just follow along in the code pane.

-
    -
  1. In Langflow, click + Custom Component to add a custom component into the workspace.
  2. -
  3. Open the component's code pane.
  4. -
  5. Import dependencies. -Your custom component inherits from the langflow Component class so you need to include it.
  6. -
-

_10
from langflow.custom import Component
_10
from langflow.io import MessageTextInput, Output
_10
from langflow.schema import Data

-
    -
  1. Define the Class: Start by defining a Python class that inherits from Component. This class will encapsulate the functionality of your custom component.
  2. -
-

_10
class CustomComponent(Component):
_10
display_name = "Custom Component"
_10
description = "Use as a template to create your own component."
_10
documentation: str = "https://docs.langflow.org/components-custom-components"
_10
icon = "custom_components"
_10
name = "CustomComponent"

-
    -
  1. Specify Inputs and Outputs: Use Langflow's input and output classes to define the inputs and outputs of your component. They should be declared as class attributes.
  2. -
-

_10
inputs = [
_10
MessageTextInput(name="input_value", display_name="Input Value", value="Hello, World!"),
_10
]
_10
_10
outputs = [
_10
Output(display_name="Output", name="output", method="build_output"),
_10
]

-
    -
  1. Implement Output Methods: Implement methods for each output, which contains the logic of your component. These methods can access input values using self.<input_name> , return processed values and define what to be displayed in the component with the self.status attribute.
  2. -
-

_10
def build_output(self) -> Data:
_10
data = Data(value=self.input_value)
_10
self.status = data
_10
return data

-
    -
  1. Use Proper Annotations: Ensure that output methods are properly annotated with their types. Langflow uses these annotations to validate and handle data correctly. For example, this method is annotated to output Data.
  2. -
-

_10
def build_output(self) -> Data:

-
    -
  1. Click Check & Save to confirm your component works. -You now have an operational custom component.
  2. -
-

Add inputs and modify output methods​

-

This code defines a custom component that accepts 5 inputs and outputs a Message.

-

Copy and paste it into the Custom Component code pane and click Check & Save.

-

_55
from langflow.custom import Component
_55
from langflow.inputs import StrInput, MultilineInput, SecretStrInput, IntInput, DropdownInput
_55
from langflow.template import Output, Input
_55
from langflow.schema.message import Message
_55
_55
class MyCustomComponent(Component):
_55
display_name = "My Custom Component"
_55
description = "An example of a custom component with various input types."
_55
_55
inputs = [
_55
StrInput(
_55
name="username",
_55
display_name="Username",
_55
info="Enter your username."
_55
),
_55
SecretStrInput(
_55
name="password",
_55
display_name="Password",
_55
info="Enter your password."
_55
),
_55
MessageTextInput(
_55
name="special_message",
_55
display_name="special_message",
_55
info="Enter a special message.",
_55
),
_55
IntInput(
_55
name="age",
_55
display_name="Age",
_55
info="Enter your age."
_55
),
_55
DropdownInput(
_55
name="gender",
_55
display_name="Gender",
_55
options=["Male", "Female", "Other"],
_55
info="Select your gender."
_55
)
_55
]
_55
_55
outputs = [
_55
Output(display_name="Result", name="result", method="process_inputs"),
_55
]
_55
_55
def process_inputs(self) -> Message:
_55
"""
_55
Process the user inputs and return a Message object.
_55
_55
Returns:
_55
Message: A Message object containing the processed information.
_55
"""
_55
try:
_55
processed_text = f"User {self.username} (Age: {self.age}, Gender: {self.gender}) " \
_55
f"sent the following special message: {self.special_message}"
_55
return Message(text=processed_text)
_55
except AttributeError as e:
_55
return Message(text=f"Error processing inputs: {str(e)}")

-

Since the component outputs a Message, you can wire it into a chat and pass messages to yourself.

-

Your Custom Component accepts the Chat Input message through MessageTextInput, fills in the variables with the process_inputs method, and finally passes the message User Username (Age: 49, Gender: Male) sent the following special message: Hello! to Chat Output.

-

By defining inputs this way, Langflow can automatically handle the validation and display of these fields in the user interface, making it easier to create robust and user-friendly custom components.

-

All of the types detailed above derive from a general class that can also be accessed through the generic Input class.

-
tip

Use MessageInput to get the entire Message object instead of just the text.

-

Input Types​

-
-

Langflow provides several higher-level input types to simplify the creation of custom components. These input types standardize how inputs are defined, validated, and used. Here’s a guide on how to use these inputs and their primary purposes:

-

HandleInput​

-

Represents an input that has a handle to a specific type (e.g., BaseLanguageModel, BaseRetriever, etc.).

+

Custom component inputs and outputs​

+

Inputs and outputs define how data flows through the component, how it appears in the UI, and how connections to other components are validated.

+

Inputs​

+

Inputs are defined in a class-level inputs list. When Langflow loads the component, it uses this list to render fields and handles in the UI. Users or other components provide values or connections to fill these inputs.

+

An input is usually an instance of a class from langflow.io (such as StrInput, DataInput, or MessageTextInput). The most common constructor parameters are:

    -
  • Usage: Useful for connecting to specific component types in a flow.
  • +
  • name: The internal variable name, accessed via self.<name>.
  • +
  • display_name: The label shown to users in the UI.
  • +
  • info (optional): A tooltip or short description.
  • +
  • value (optional): The default value.
  • +
  • advanced (optional): If True, moves the field into the "Advanced" section.
  • +
  • required (optional): If True, forces the user to provide a value.
  • +
  • is_list (optional): If True, allows multiple values.
  • +
  • input_types (optional): Restricts allowed connection types (e.g., ["Data"], ["LanguageModel"]).
-

DataInput​

-

Represents an input that receives a Data object.

+

Here are the most commonly used input classes and their typical usage.

+

Text Inputs: For simple text entries.

    -
  • Usage: Ideal for components that process or manipulate data objects.
  • -
  • Input Types: ["Data"]
  • +
  • StrInput creates a single-line text field.
  • +
  • MultilineInput creates a multi-line text area.
-

StrInput​

-

Represents a standard string input field.

+

Numeric and Boolean Inputs: Ensures users can only enter valid numeric or boolean data.

    -
  • Usage: Used for any text input where the user needs to provide a string.
  • -
  • Input Types: ["Text"]
  • +
  • BoolInput, IntInput, and FloatInput provide fields for boolean, integer, and float values, ensuring type consistency.
-

MessageInput​

-

Represents an input field specifically for Message objects.

+

Dropdowns: For selecting from predefined options, useful for modes or levels.

    -
  • Usage: Used in components that handle or process messages.
  • -
  • Input Types: ["Message"]
  • +
  • DropdownInput
-

MessageTextInput​

-

Represents a text input for messages.

+

Secrets: A specialized input for sensitive data, ensuring input is hidden in the UI.

    -
  • Usage: Suitable for components that need to extract text from message objects.
  • -
  • Input Types: ["Message"]
  • +
  • SecretStrInput for API keys and passwords.
-

MultilineInput​

-

Represents a text field that supports multiple lines.

+

Specialized Data Inputs: Ensures type-checking and color-coded connections in the UI.

    -
  • Usage: Ideal for longer text inputs where the user might need to write extended text.
  • -
  • Input Types: ["Text"]
  • -
  • Attributes: multiline=True
  • +
  • DataInput expects a Data object (typically with .data and optional .text).
  • +
  • MessageInput expects a Message object, used in chat or agent-based flows.
  • +
  • MessageTextInput simplifies access to the .text field of a Message.
-

SecretStrInput​

-

Represents a password input field.

+

Handle-Based Inputs: Used to connect outputs of specific types, ensuring correct pipeline connections.

    -
  • Usage: Used for sensitive text inputs where the input should be hidden (e.g., passwords, API keys).
  • -
  • Attributes: password=True
  • -
  • Input Types: Does not accept input types, meaning it has no input handles for previous nodes/components to connect to it.
  • +
  • HandleInput
-

IntInput​

-

Represents an integer input field.

+

File Uploads: Allows users to upload files directly through the UI or receive file paths from other components.

    -
  • Usage: Used for numeric inputs where the value should be an integer.
  • -
  • Input Types: ["Integer"]
  • +
  • FileInput
-

FloatInput​

-

Represents a float input field.

+

Lists: Set is_list=True to accept multiple values, ideal for batch or grouped operations.

+

This example defines three inputs: a text field (StrInput), a boolean toggle (BoolInput), and a dropdown selection (DropdownInput).

+

_10
from langflow.io import StrInput, BoolInput, DropdownInput
_10
_10
inputs = [
_10
StrInput(name="title", display_name="Title"),
_10
BoolInput(name="enabled", display_name="Enabled", value=True),
_10
DropdownInput(name="mode", display_name="Mode", options=["Fast", "Safe", "Experimental"], value="Safe")
_10
]

+

Outputs​

+

Outputs are defined in a class-level outputs list. When Langflow renders a component, each output becomes a connector point in the UI. When you connect something to an output, Langflow automatically calls the corresponding method and passes the returned object to the next component.

+

An output is usually an instance of Output from langflow.io, with common parameters:

    -
  • Usage: Used for numeric inputs where the value should be a floating-point number.
  • -
  • Input Types: ["Float"]
  • +
  • name: The internal variable name.
  • +
  • display_name: The label shown in the UI.
  • +
  • method: The name of the method called to produce the output.
  • +
  • info (optional): Help text shown on hover.
-

BoolInput​

-

Represents a boolean input field.

+

The method must exist in the class, and it is recommended to annotate its return type for better type checking. +You can also set a self.status message inside the method to show progress or logs.

+

Common Return Types:

    -
  • Usage: Used for true/false or yes/no type inputs.
  • -
  • Input Types: ["Boolean"]
  • +
  • Message: Structured chat messages.
  • +
  • Data: Flexible object with .data and optional .text.
  • +
  • DataFrame: Pandas-based tables (langflow.schema.DataFrame).
  • +
  • Primitive types: str, int, bool (not recommended if you need type/color consistency).
-

NestedDictInput​

-

Represents an input field for nested dictionaries.

+

In this example, the DataToDataFrame component defines its output using the outputs list. The df_out output is linked to the build_df method, so when connected in the UI, Langflow calls this method and passes its returned DataFrame to the next node. This demonstrates how each output maps to a method that generates the actual output data.

+

_37
from langflow.custom import Component
_37
from langflow.io import DataInput, Output
_37
from langflow.schema import Data, DataFrame
_37
_37
class DataToDataFrame(Component):
_37
display_name = "Data to DataFrame"
_37
description = "Convert multiple Data objects into a DataFrame"
_37
icon = "table"
_37
name = "DataToDataFrame"
_37
_37
inputs = [
_37
DataInput(
_37
name="items",
_37
display_name="Data Items",
_37
info="List of Data objects to convert",
_37
is_list=True
_37
)
_37
]
_37
_37
outputs = [
_37
Output(
_37
name="df_out",
_37
display_name="DataFrame Output",
_37
method="build_df"
_37
)
_37
]
_37
_37
def build_df(self) -> DataFrame:
_37
rows = []
_37
for item in self.items:
_37
row_dict = item.data.copy() if item.data else {}
_37
row_dict["text"] = item.get_text() or ""
_37
rows.append(row_dict)
_37
_37
df = DataFrame(rows)
_37
self.status = f"Built DataFrame with {len(rows)} rows."
_37
return df

+

Tool mode​

+

You can configure a Custom Component to work as a Tool by setting the parameter tool_mode=True. This allows the component to be used in Langflow's Tool Mode workflows, such as by Agent components.

+

Langflow currently supports the following input types for Tool Mode:

    -
  • Usage: Used for more complex data structures where the input needs to be a dictionary.
  • -
  • Input Types: ["NestedDict"]
  • +
  • DataInput
  • +
  • DataFrameInput
  • +
  • PromptInput
  • +
  • MessageTextInput
  • +
  • MultilineInput
  • +
  • DropdownInput
-

DictInput​

-

Represents an input field for dictionaries.

+

_10
inputs = [
_10
MessageTextInput(
_10
name="message",
_10
display_name="Mensage",
_10
info="Enter the message that will be processed directly by the tool",
_10
tool_mode=True,
_10
),
_10
]

+

Typed annotations​

+

In Langflow, typed annotations allow Langflow to visually guide users and maintain flow consistency.

+

Typed annotations provide:

    -
  • Usage: Suitable for inputs that require a dictionary format.
  • -
  • Input Types: ["Dict"]
  • +
  • Color-coding: Outputs like -> Data or -> Message get distinct colors.
  • +
  • Validation: Langflow blocks incompatible connections automatically.
  • +
  • Readability: Developers can quickly understand data flow.
  • +
  • Development tools: Better code suggestions and error checking in your code editor.
-

DropdownInput​

-

Represents a dropdown input field.

+

Common Return Types​

+

Message

+

For chat-style outputs.

+

_10
def produce_message(self) -> Message:
_10
return Message(text="Hello! from typed method!", sender="System")

+

In the UI, connects only to Message-compatible inputs.

+

Data

+

For structured data like dicts or partial texts.

+

_10
def get_processed_data(self) -> Data:
_10
processed = {"key1": "value1", "key2": 123}
_10
return Data(data=processed)

+

In the UI, connects only with DataInput.

+

DataFrame

+

For tabular data

+

_10
def build_df(self) -> DataFrame:
_10
pdf = pd.DataFrame({"A": [1, 2], "B": [3, 4]})
_10
return DataFrame(pdf)

+

In the UI, connects only to DataFrameInput.

+

Primitive Types (str, int, bool)

+

Returning primitives is allowed but wrapping in Data or Message is recommended for better UI consistency.

+

_10
def compute_sum(self) -> int:
_10
return sum(self.numbers)

+

Tips for typed annotations​

+

When using typed annotations, consider the following best practices:

    -
  • Usage: Used where the user needs to select from a predefined list of options.
  • -
  • Attributes: options to define the list of selectable options.
  • -
  • Input Types: ["Text"]
  • +
  • Always Annotate Outputs: Specify return types like -> Data, -> Message, or -> DataFrame to enable proper UI color-coding and validation.
  • +
  • Wrap Raw Data: Use Data, Message, or DataFrame wrappers instead of returning plain structures.
  • +
  • Use Primitives Carefully: Direct str or int returns are fine for simple flows, but wrapping improves flexibility.
  • +
  • Annotate Helpers Too: Even if internal, typing improves maintainability and clarity.
  • +
  • Handle Edge Cases: Prefer returning structured Data with error fields when needed.
  • +
  • Stay Consistent: Use the same types across your components to make flows predictable and easier to build.
-

FileInput​

-

Represents a file input field.

-
    -
  • Usage: Used to upload files.
  • -
  • Attributes: file_types to specify the types of files that can be uploaded.
  • -
  • Input Types: ["File"]
  • -
-

Generic Input​

-
-

Langflow offers native input types, but you can use any type as long as they are properly annotated in the output methods (e.g., -> list[int]).

-

The Input class is highly customizable, allowing you to specify a wide range of attributes for each input field. It has several attributes that can be customized:

-
    -
  • field_type: Specifies the type of field (e.g., str, int). Default is str.
  • -
  • required: Boolean indicating if the field is required. Default is False.
  • -
  • placeholder: Placeholder text for the input field. Default is an empty string.
  • -
  • is_list: Boolean indicating if the field should accept a list of values. Default is False.
  • -
  • show: Boolean indicating if the field should be shown. Default is True.
  • -
  • multiline: Boolean indicating if the field should allow multi-line input. Default is False.
  • -
  • value: Default value for the input field. Default is None.
  • -
  • file_types: List of accepted file types (for file inputs). Default is an empty list.
  • -
  • file_path: File path if the field is a file input. Default is None.
  • -
  • password: Boolean indicating if the field is a password. Default is False.
  • -
  • options: List of options for the field (for dropdowns). Default is None.
  • -
  • name: Name of the input field. Default is None.
  • -
  • display_name: Display name for the input field. Default is None.
  • -
  • advanced: Boolean indicating if the field is an advanced parameter. Default is False.
  • -
  • input_types: List of accepted input types. Default is None.
  • -
  • dynamic: Boolean indicating if the field is dynamic. Default is False.
  • -
  • info: Additional information or tooltip for the input field. Default is an empty string.
  • -
  • real_time_refresh: Boolean indicating if the field should refresh in real-time. Default is None.
  • -
  • refresh_button: Boolean indicating if the field should have a refresh button. Default is None.
  • -
  • refresh_button_text: Text for the refresh button. Default is None.
  • -
  • range_spec: Range specification for numeric fields. Default is None.
  • -
  • load_from_db: Boolean indicating if the field should load from the database. Default is False.
  • -
  • title_case: Boolean indicating if the display name should be in title case. Default is True.
  • -
-

Create a Custom Component with Generic Input​

-

Here is an example of how to define inputs for a component using the Input class.

-

Copy and paste it into the Custom Component code pane and click Check & Save.

-

_76
from langflow.template import Input, Output
_76
from langflow.custom import Component
_76
from langflow.field_typing import Text
_76
from langflow.schema.message import Message
_76
from typing import Dict, Any
_76
_76
class TextAnalyzerComponent(Component):
_76
display_name = "Text Analyzer"
_76
description = "Analyzes input text and provides basic statistics."
_76
_76
inputs = [
_76
Input(
_76
name="input_text",
_76
display_name="Input Text",
_76
field_type="Message",
_76
required=True,
_76
placeholder="Enter text to analyze",
_76
multiline=True,
_76
info="The text you want to analyze.",
_76
input_types=["Text"]
_76
),
_76
Input(
_76
name="include_word_count",
_76
display_name="Include Word Count",
_76
field_type="bool",
_76
required=False,
_76
info="Whether to include word count in the analysis.",
_76
),
_76
Input(
_76
name="perform_sentiment_analysis",
_76
display_name="Perform Sentiment Analysis",
_76
field_type="bool",
_76
required=False,
_76
info="Whether to perform basic sentiment analysis.",
_76
),
_76
]
_76
_76
outputs = [
_76
Output(display_name="Analysis Results", name="results", method="analyze_text"),
_76
]
_76
_76
def analyze_text(self) -> Message:
_76
# Extract text from the Message object
_76
if isinstance(self.input_text, Message):
_76
text = self.input_text.text
_76
else:
_76
text = str(self.input_text)
_76
_76
results = {
_76
"character_count": len(text),
_76
"sentence_count": text.count('.') + text.count('!') + text.count('?')
_76
}
_76
_76
if self.include_word_count:
_76
results["word_count"] = len(text.split())
_76
_76
if self.perform_sentiment_analysis:
_76
# Basic sentiment analysis
_76
text_lower = text.lower()
_76
if "happy" in text_lower or "good" in text_lower:
_76
sentiment = "positive"
_76
elif "sad" in text_lower or "bad" in text_lower:
_76
sentiment = "negative"
_76
else:
_76
sentiment = "neutral"
_76
_76
results["sentiment"] = sentiment
_76
_76
# Convert the results dictionary to a formatted string
_76
formatted_results = "\n".join([f"{key}: {value}" for key, value in results.items()])
_76
_76
# Return a Message object
_76
return Message(text=formatted_results)
_76
_76
# Define how to use the inputs and outputs
_76
component = TextAnalyzerComponent()

-

In this custom component:

+

Enable dynamic fields​

+

In Langflow, dynamic fields allow inputs to change or appear based on user interactions. You can make an input dynamic by setting dynamic=True. +Optionally, setting real_time_refresh=True triggers the update_build_config method to adjust the input's visibility or properties in real time, creating a contextual UI that only displays relevant fields based on the user's choices.

+

In this example, the operator field triggers updates via real_time_refresh=True. +The regex_pattern field is initially hidden and controlled via dynamic=True.

+

_22
from langflow.io import DropdownInput, StrInput
_22
_22
class RegexRouter(Component):
_22
display_name = "Regex Router"
_22
description = "Demonstrates dynamic fields for regex input."
_22
_22
inputs = [
_22
DropdownInput(
_22
name="operator",
_22
display_name="Operator",
_22
options=["equals", "contains", "regex"],
_22
value="equals",
_22
real_time_refresh=True,
_22
),
_22
StrInput(
_22
name="regex_pattern",
_22
display_name="Regex Pattern",
_22
info="Used if operator='regex'",
_22
dynamic=True,
_22
show=False,
_22
),
_22
]

+

Implement update_build_config​

+

When a field with real_time_refresh=True is modified, Langflow calls the update_build_config method, passing the updated field name, value, and the component's configuration to dynamically adjust the visibility or properties of other fields based on user input.

+

This example will show or hide the regex_pattern field when the user selects a different operator.

+

_10
def update_build_config(self, build_config: dict, field_value: str, field_name: str | None = None) -> dict:
_10
if field_name == "operator":
_10
if field_value == "regex":
_10
build_config["regex_pattern"]["show"] = True
_10
else:
_10
build_config["regex_pattern"]["show"] = False
_10
return build_config

+

Additional Dynamic Field Controls​

+

You can also modify other properties within update_build_config, such as:

  • -

    The input_text input is a required multi-line text field that accepts a Message object or a string. It's used to provide the text for analysis.

    +

    required: Set build_config["some_field"]["required"] = True/False

  • -

    The include_word_count input is an optional boolean field. When set to True, it adds a word count to the analysis results.

    +

    advanced: Set build_config["some_field"]["advanced"] = True

  • -

    The perform_sentiment_analysis input is an optional boolean field. When set to True, it triggers a basic sentiment analysis of the input text.

    +

    options: Modify dynamic dropdown options.

-

The component performs basic text analysis, including character count and sentence count (based on punctuation marks). If word count is enabled, it splits the text and counts the words. If sentiment analysis is enabled, it performs a simple keyword-based sentiment classification (positive, negative, or neutral).

-

Since the component inputs and outputs a Message, you can wire the component into a chat and see how the basic custom component logic interacts with your input.

-

Create a Custom Component with Multiple Outputs​

-
-

In Langflow, custom components can have multiple outputs. Each output can be associated with a specific method in the component, allowing you to define distinct behaviors for each output path. This feature is particularly useful when you want to route data based on certain conditions or process it in multiple ways.

-
    -
  1. Definition of Outputs: Each output is defined in the outputs list of the component. Each output is associated with a display name, an internal name, and a method that gets called to generate the output.
  2. -
  3. Output Methods: The methods associated with outputs are responsible for generating the data for that particular output. These methods are called when the component is executed, and each method can independently produce its result.
  4. -
-

This example component has two outputs:

+

Tips for Managing Dynamic Fields​

+

When working with dynamic fields, consider the following best practices to ensure a smooth user experience:

    -
  • process_data: Processes the input text (e.g., converts it to uppercase) and returns it.
  • -
  • get_processing_function: Returns the process_data method itself to be reused in composition.
  • +
  • Minimize field changes: Hide only fields that are truly irrelevant to avoid confusing users.
  • +
  • Test behavior: Ensure that adding or removing fields doesn't accidentally erase user input.
  • +
  • Preserve data: Use build_config["some_field"]["show"] = False to hide fields without losing their values.
  • +
  • Clarify logic: Add info notes to explain why fields appear or disappear based on conditions.
  • +
  • Keep it manageable: If the dynamic logic becomes too complex, consider breaking it into smaller components, unless it serves a clear purpose in a single node.
-

_33
from typing import Callable
_33
from langflow.custom import Component
_33
from langflow.inputs import StrInput
_33
from langflow.template import Output
_33
from langflow.field_typing import Text
_33
_33
class DualOutputComponent(Component):
_33
display_name = "Dual Output"
_33
description = "Processes input text and returns both the result and the processing function."
_33
icon = "double-arrow"
_33
_33
inputs = [
_33
StrInput(
_33
name="input_text",
_33
display_name="Input Text",
_33
info="The text input to be processed.",
_33
),
_33
]
_33
_33
outputs = [
_33
Output(display_name="Processed Data", name="processed_data", method="process_data"),
_33
Output(display_name="Processing Function", name="processing_function", method="get_processing_function"),
_33
]
_33
_33
def process_data(self) -> Text:
_33
# Process the input text (e.g., convert to uppercase)
_33
processed = self.input_text.upper()
_33
self.status = processed
_33
return processed
_33
_33
def get_processing_function(self) -> Callable[[], Text]:
_33
# Return the processing function itself
_33
return self.process_data

-

This example shows how to define multiple outputs in a custom component. The first output returns the processed data, while the second output returns the processing function itself.

-

The processing_function output can be used in scenarios where the function itself is needed for further processing or dynamic flow control. Notice how both outputs are properly annotated with their respective types, ensuring clarity and type safety.

-

Special Operations​

-

Advanced methods and attributes offer additional control and functionality. Understanding how to leverage these can enhance your custom components' capabilities.

+

Error handling and logging​

+

In Langflow, robust error handling ensures that your components behave predictably, even when unexpected situations occur, such as invalid inputs, external API failures, or internal logic errors.

+

Error handling techniques​

    -
  • self.inputs: Access all defined inputs. Useful when an output method needs to interact with multiple inputs.
  • -
  • self.outputs: Access all defined outputs. This is particularly useful if an output function needs to trigger another output function.
  • -
  • self.status: Use this to update the component's status or intermediate results. It helps track the component's internal state or store temporary data.
  • -
  • self.graph.flow_id: Retrieve the flow ID, useful for maintaining context or debugging.
  • -
  • self.stop("output_name"): Use this method within an output function to prevent data from being sent through other components. This method stops next component execution and is particularly useful for specific operations where a component should stop from running based on specific conditions.
  • +
  • Raise Exceptions: +If a critical error occurs, you can raise standard Python exceptions such as ValueError, or specialized exceptions like ToolException. Langflow will automatically catch these and display appropriate error messages in the UI, helping users quickly identify what went wrong. +

    _10
    def compute_result(self) -> str:
    _10
    if not self.user_input:
    _10
    raise ValueError("No input provided.")
    _10
    # ...

    +
  • +
  • Return Structured Error Data: +Instead of stopping a flow abruptly, you can return a Data object containing an "error" field. This approach allows the flow to continue operating and enables downstream components to detect and handle the error gracefully. +

    _10
    def run_model(self) -> Data:
    _10
    try:
    _10
    # ...
    _10
    except Exception as e:
    _10
    return Data(data={"error": str(e)})

    +
-

Contribute Custom Components to Langflow​

-

See How to Contribute to contribute your custom component to Langflow.