diff --git a/404.html b/404.html index df076c05c9..b0bff01937 100644 --- a/404.html +++ b/404.html @@ -23,8 +23,8 @@ - - + + diff --git a/about-langflow.html b/about-langflow.html index a50b0fe1bd..9acadbaf9e 100644 --- a/about-langflow.html +++ b/about-langflow.html @@ -23,8 +23,8 @@ - - + + diff --git a/agent-tutorial.html b/agent-tutorial.html index d3b821b96a..d3d9ee4246 100644 --- a/agent-tutorial.html +++ b/agent-tutorial.html @@ -23,14 +23,14 @@ - - + + -
Skip to main content
Search
diff --git a/agents-tools.html b/agents-tools.html index 58270538e4..22c5188de1 100644 --- a/agents-tools.html +++ b/agents-tools.html @@ -23,8 +23,8 @@ - - + + diff --git a/agents.html b/agents.html index 3f6679f929..11b589f259 100644 --- a/agents.html +++ b/agents.html @@ -23,8 +23,8 @@ - - + + diff --git a/api-build.html b/api-build.html index 033e87f8fc..614e6ec506 100644 --- a/api-build.html +++ b/api-build.html @@ -23,8 +23,8 @@ - - + + diff --git a/api-files.html b/api-files.html index ad30e1ea2c..aee134180c 100644 --- a/api-files.html +++ b/api-files.html @@ -23,8 +23,8 @@ - - + + diff --git a/api-flows-run.html b/api-flows-run.html index 41c505d9bd..a1d6c5847c 100644 --- a/api-flows-run.html +++ b/api-flows-run.html @@ -23,8 +23,8 @@ - - + + diff --git a/api-flows.html b/api-flows.html index 463f648163..81d41c7a07 100644 --- a/api-flows.html +++ b/api-flows.html @@ -23,8 +23,8 @@ - - + + diff --git a/api-logs.html b/api-logs.html index 68de783319..b715f14b72 100644 --- a/api-logs.html +++ b/api-logs.html @@ -23,8 +23,8 @@ - - + + diff --git a/api-monitor.html b/api-monitor.html index cbdc349659..a2834f9b73 100644 --- a/api-monitor.html +++ b/api-monitor.html @@ -23,8 +23,8 @@ - - + + diff --git a/api-projects.html b/api-projects.html index 83bc71c5be..50621ac188 100644 --- a/api-projects.html +++ b/api-projects.html @@ -23,8 +23,8 @@ - - + + diff --git a/api-reference-api-examples.html b/api-reference-api-examples.html index 3bf32eed39..76e0c2a003 100644 --- a/api-reference-api-examples.html +++ b/api-reference-api-examples.html @@ -23,8 +23,8 @@ - - + + diff --git a/api-users.html b/api-users.html index 7dbac79380..17eaa24940 100644 --- a/api-users.html +++ b/api-users.html @@ -23,8 +23,8 @@ - - + + diff --git a/api.html b/api.html index d33e46fa70..f640993dd8 100644 --- a/api.html +++ b/api.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/add-server.html b/api/add-server.html index 52c7764560..fc00b04250 100644 --- a/api/add-server.html +++ b/api/add-server.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/add-user.html b/api/add-user.html index 0d0fa13b34..b1c3ccdd9f 100644 --- a/api/add-user.html +++ b/api/add-user.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/auto-login.html b/api/auto-login.html index b98f41e0b4..30654fd928 100644 --- a/api/auto-login.html +++ b/api/auto-login.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/build-flow.html b/api/build-flow.html index 23191a3264..b3a356fbda 100644 --- a/api/build-flow.html +++ b/api/build-flow.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/build-public-tmp.html b/api/build-public-tmp.html index e4c46eba1f..956ac3809d 100644 --- a/api/build-public-tmp.html +++ b/api/build-public-tmp.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/build-vertex-stream.html b/api/build-vertex-stream.html index 21867fc513..3237124e84 100644 --- a/api/build-vertex-stream.html +++ b/api/build-vertex-stream.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/build-vertex.html b/api/build-vertex.html index e9002e89f9..8633d8f140 100644 --- a/api/build-vertex.html +++ b/api/build-vertex.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/cancel-build.html b/api/cancel-build.html index daf84eafb5..d085699b78 100644 --- a/api/cancel-build.html +++ b/api/cancel-build.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/check-if-store-has-api-key.html b/api/check-if-store-has-api-key.html index 77af2139ab..509e00b6d8 100644 --- a/api/check-if-store-has-api-key.html +++ b/api/check-if-store-has-api-key.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/check-if-store-is-enabled.html b/api/check-if-store-is-enabled.html index 6ff9442f46..cdee48fe78 100644 --- a/api/check-if-store-is-enabled.html +++ b/api/check-if-store-is-enabled.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/check-installed-mcp-servers.html b/api/check-installed-mcp-servers.html index c43e947cf1..256ad9e37b 100644 --- a/api/check-installed-mcp-servers.html +++ b/api/check-installed-mcp-servers.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/create-api-key-route.html b/api/create-api-key-route.html index 7e6e778baa..02299f5fa0 100644 --- a/api/create-api-key-route.html +++ b/api/create-api-key-route.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/create-flow.html b/api/create-flow.html index fdf0a4c763..5aa662a2d9 100644 --- a/api/create-flow.html +++ b/api/create-flow.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/create-flows.html b/api/create-flows.html index 97bbd96c78..ff1f6f2c0c 100644 --- a/api/create-flows.html +++ b/api/create-flows.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/create-folder-redirect.html b/api/create-folder-redirect.html index fc89718519..90e9f827a9 100644 --- a/api/create-folder-redirect.html +++ b/api/create-folder-redirect.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/create-project.html b/api/create-project.html index 73df008068..fa68ecd84b 100644 --- a/api/create-project.html +++ b/api/create-project.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/create-upload-file.html b/api/create-upload-file.html index 50c3cfe41c..f932c2a144 100644 --- a/api/create-upload-file.html +++ b/api/create-upload-file.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/create-variable.html b/api/create-variable.html index 4ff8004c12..b221db1237 100644 --- a/api/create-variable.html +++ b/api/create-variable.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/custom-component-update.html b/api/custom-component-update.html index 864e092b1d..085142c2f3 100644 --- a/api/custom-component-update.html +++ b/api/custom-component-update.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/custom-component.html b/api/custom-component.html index 4095350d95..a5476eb4a3 100644 --- a/api/custom-component.html +++ b/api/custom-component.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/delete-all-files-1.html b/api/delete-all-files-1.html index ddadd2e180..b6367a49a7 100644 --- a/api/delete-all-files-1.html +++ b/api/delete-all-files-1.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/delete-all-files.html b/api/delete-all-files.html index d844358bd6..2047aa34c8 100644 --- a/api/delete-all-files.html +++ b/api/delete-all-files.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/delete-api-key-route.html b/api/delete-api-key-route.html index 436beb885d..729ca2d78a 100644 --- a/api/delete-api-key-route.html +++ b/api/delete-api-key-route.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/delete-file-1.html b/api/delete-file-1.html index 473cabfd02..14dea8a3b5 100644 --- a/api/delete-file-1.html +++ b/api/delete-file-1.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/delete-file.html b/api/delete-file.html index 825e98b007..27df72057a 100644 --- a/api/delete-file.html +++ b/api/delete-file.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/delete-files-batch.html b/api/delete-files-batch.html index adcec38038..4dabdd2003 100644 --- a/api/delete-files-batch.html +++ b/api/delete-files-batch.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/delete-flow.html b/api/delete-flow.html index 7e7dad5c71..6bc439b2e1 100644 --- a/api/delete-flow.html +++ b/api/delete-flow.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/delete-folder-redirect.html b/api/delete-folder-redirect.html index d57acd4b04..3cca0d419c 100644 --- a/api/delete-folder-redirect.html +++ b/api/delete-folder-redirect.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/delete-messages-session.html b/api/delete-messages-session.html index aa43610d00..78e356af2b 100644 --- a/api/delete-messages-session.html +++ b/api/delete-messages-session.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/delete-messages.html b/api/delete-messages.html index f0db2abb55..b7bcfed601 100644 --- a/api/delete-messages.html +++ b/api/delete-messages.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/delete-multiple-flows.html b/api/delete-multiple-flows.html index 0c3e84383e..20f1e2fa0c 100644 --- a/api/delete-multiple-flows.html +++ b/api/delete-multiple-flows.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/delete-project.html b/api/delete-project.html index d12974607e..10227bc0ea 100644 --- a/api/delete-project.html +++ b/api/delete-project.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/delete-server.html b/api/delete-server.html index ce645e2df4..f065226b0c 100644 --- a/api/delete-server.html +++ b/api/delete-server.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/delete-user.html b/api/delete-user.html index 21287eda60..0a518916f8 100644 --- a/api/delete-user.html +++ b/api/delete-user.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/delete-variable.html b/api/delete-variable.html index e51558ece6..fde5bd1954 100644 --- a/api/delete-variable.html +++ b/api/delete-variable.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/delete-vertex-builds.html b/api/delete-vertex-builds.html index 10312d3967..f4d0ebf573 100644 --- a/api/delete-vertex-builds.html +++ b/api/delete-vertex-builds.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/download-component.html b/api/download-component.html index 793074831a..0a7bab632f 100644 --- a/api/download-component.html +++ b/api/download-component.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/download-file-1.html b/api/download-file-1.html index e7cf868724..24347deb52 100644 --- a/api/download-file-1.html +++ b/api/download-file-1.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/download-file-2.html b/api/download-file-2.html index 966fef8e33..7466945fd4 100644 --- a/api/download-file-2.html +++ b/api/download-file-2.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/download-file-redirect.html b/api/download-file-redirect.html index 157ebcd4fb..aa7a7186e7 100644 --- a/api/download-file-redirect.html +++ b/api/download-file-redirect.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/download-file.html b/api/download-file.html index 5287f0f71f..c02bd3c4db 100644 --- a/api/download-file.html +++ b/api/download-file.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/download-files-batch.html b/api/download-files-batch.html index 7ac3fa35b2..9ef052229e 100644 --- a/api/download-files-batch.html +++ b/api/download-files-batch.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/download-image.html b/api/download-image.html index fa4f561959..3297602eaa 100644 --- a/api/download-image.html +++ b/api/download-image.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/download-multiple-file.html b/api/download-multiple-file.html index 353b888307..0794ae7074 100644 --- a/api/download-multiple-file.html +++ b/api/download-multiple-file.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/download-profile-picture.html b/api/download-profile-picture.html index 9d28280ea6..10ce897816 100644 --- a/api/download-profile-picture.html +++ b/api/download-profile-picture.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/edit-file-name.html b/api/edit-file-name.html index 4133600849..f3add0e34b 100644 --- a/api/edit-file-name.html +++ b/api/edit-file-name.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/experimental-run-flow.html b/api/experimental-run-flow.html index 2803085e39..e013082b53 100644 --- a/api/experimental-run-flow.html +++ b/api/experimental-run-flow.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/get-all.html b/api/get-all.html index 4994b57f88..b562e4345c 100644 --- a/api/get-all.html +++ b/api/get-all.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/get-api-keys-route.html b/api/get-api-keys-route.html index e4d7f12180..2af20eda38 100644 --- a/api/get-api-keys-route.html +++ b/api/get-api-keys-route.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/get-build-events.html b/api/get-build-events.html index 8a1e053b2b..8b75dd601e 100644 --- a/api/get-build-events.html +++ b/api/get-build-events.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/get-components.html b/api/get-components.html index e14130423a..91da0f431e 100644 --- a/api/get-components.html +++ b/api/get-components.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/get-config.html b/api/get-config.html index 4d90ebf9e9..56f6587945 100644 --- a/api/get-config.html +++ b/api/get-config.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/get-elevenlabs-voice-ids.html b/api/get-elevenlabs-voice-ids.html index f6124f557e..98c2bec642 100644 --- a/api/get-elevenlabs-voice-ids.html +++ b/api/get-elevenlabs-voice-ids.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/get-list-of-components-liked-by-user.html b/api/get-list-of-components-liked-by-user.html index f3842a8732..2e1f6e16aa 100644 --- a/api/get-list-of-components-liked-by-user.html +++ b/api/get-list-of-components-liked-by-user.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/get-message-sessions.html b/api/get-message-sessions.html index 9020638978..b997e306ee 100644 --- a/api/get-message-sessions.html +++ b/api/get-message-sessions.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/get-messages.html b/api/get-messages.html index 94767f4772..e564f18a8f 100644 --- a/api/get-messages.html +++ b/api/get-messages.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/get-server-endpoint.html b/api/get-server-endpoint.html index 1159460f1a..213968d3b3 100644 --- a/api/get-server-endpoint.html +++ b/api/get-server-endpoint.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/get-servers.html b/api/get-servers.html index 491a742db5..54649a7e58 100644 --- a/api/get-servers.html +++ b/api/get-servers.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/get-starter-projects.html b/api/get-starter-projects.html index 11c675ab93..6920215d20 100644 --- a/api/get-starter-projects.html +++ b/api/get-starter-projects.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/get-tags.html b/api/get-tags.html index a60e92146a..98f9ce2fcb 100644 --- a/api/get-tags.html +++ b/api/get-tags.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/get-task-status.html b/api/get-task-status.html index e7db1f47bd..0168fbe8df 100644 --- a/api/get-task-status.html +++ b/api/get-task-status.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/get-transactions.html b/api/get-transactions.html index 73ec96a2d8..ff68b73a52 100644 --- a/api/get-transactions.html +++ b/api/get-transactions.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/get-version.html b/api/get-version.html index 252cc7ecf6..148bb64bd3 100644 --- a/api/get-version.html +++ b/api/get-version.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/get-vertex-builds.html b/api/get-vertex-builds.html index e1fce2f561..4ac0b532c2 100644 --- a/api/get-vertex-builds.html +++ b/api/get-vertex-builds.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/handle-messages-1.html b/api/handle-messages-1.html index 2f0cb8e9ca..de383e0837 100644 --- a/api/handle-messages-1.html +++ b/api/handle-messages-1.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/handle-messages.html b/api/handle-messages.html index 17941381b3..116bbc7d25 100644 --- a/api/handle-messages.html +++ b/api/handle-messages.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/handle-project-messages-with-slash.html b/api/handle-project-messages-with-slash.html index 659fdf0ca1..72e51185e5 100644 --- a/api/handle-project-messages-with-slash.html +++ b/api/handle-project-messages-with-slash.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/handle-project-messages.html b/api/handle-project-messages.html index fa74a427f3..6ebc020609 100644 --- a/api/handle-project-messages.html +++ b/api/handle-project-messages.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/handle-project-sse.html b/api/handle-project-sse.html index 77d877ba94..9cabeb952b 100644 --- a/api/handle-project-sse.html +++ b/api/handle-project-sse.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/handle-sse-1.html b/api/handle-sse-1.html index 559bfb7b15..aa7c32a455 100644 --- a/api/handle-sse-1.html +++ b/api/handle-sse-1.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/handle-sse.html b/api/handle-sse.html index e3600d091d..c5ccaa6f45 100644 --- a/api/handle-sse.html +++ b/api/handle-sse.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/health-check.html b/api/health-check.html index 46b9769681..5edbba7f49 100644 --- a/api/health-check.html +++ b/api/health-check.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/health.html b/api/health.html index abbfeea758..410b9d954d 100644 --- a/api/health.html +++ b/api/health.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/install-mcp-config.html b/api/install-mcp-config.html index 32e44fe70d..08f200ecab 100644 --- a/api/install-mcp-config.html +++ b/api/install-mcp-config.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/like-component.html b/api/like-component.html index 184dbaabd5..1c57c44c85 100644 --- a/api/like-component.html +++ b/api/like-component.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/list-files-1.html b/api/list-files-1.html index 8d158d5c55..53df554960 100644 --- a/api/list-files-1.html +++ b/api/list-files-1.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/list-files-2.html b/api/list-files-2.html index af1ebb3943..93a6bb67ab 100644 --- a/api/list-files-2.html +++ b/api/list-files-2.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/list-files.html b/api/list-files.html index 162a4171f7..70cd46ad1f 100644 --- a/api/list-files.html +++ b/api/list-files.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/list-profile-pictures.html b/api/list-profile-pictures.html index 8438397f3b..f979fbe0d8 100644 --- a/api/list-profile-pictures.html +++ b/api/list-profile-pictures.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/list-project-tools.html b/api/list-project-tools.html index 88efd54608..7969bed442 100644 --- a/api/list-project-tools.html +++ b/api/list-project-tools.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/login-to-get-access-token.html b/api/login-to-get-access-token.html index 226cf0dd9f..fa662c1923 100644 --- a/api/login-to-get-access-token.html +++ b/api/login-to-get-access-token.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/logout.html b/api/logout.html index 61ef1084b1..3315e56f66 100644 --- a/api/logout.html +++ b/api/logout.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/logs.html b/api/logs.html index 03ecfd1885..b96bec1f83 100644 --- a/api/logs.html +++ b/api/logs.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/patch-user.html b/api/patch-user.html index 30eba6185d..07fffe549a 100644 --- a/api/patch-user.html +++ b/api/patch-user.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/post-validate-code.html b/api/post-validate-code.html index 962c6f693e..bedfc44294 100644 --- a/api/post-validate-code.html +++ b/api/post-validate-code.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/post-validate-prompt.html b/api/post-validate-prompt.html index 0c063c79d7..5662f93b6e 100644 --- a/api/post-validate-prompt.html +++ b/api/post-validate-prompt.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/process-1.html b/api/process-1.html index 8cff189a7d..b8d3e54911 100644 --- a/api/process-1.html +++ b/api/process-1.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/process.html b/api/process.html index 22b2104ead..34f3f1582b 100644 --- a/api/process.html +++ b/api/process.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/read-all-users.html b/api/read-all-users.html index e0dc5c0d2b..5ebbc5a241 100644 --- a/api/read-all-users.html +++ b/api/read-all-users.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/read-basic-examples.html b/api/read-basic-examples.html index 53839b9fe3..e162b88942 100644 --- a/api/read-basic-examples.html +++ b/api/read-basic-examples.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/read-current-user.html b/api/read-current-user.html index 225c373157..412a77f10f 100644 --- a/api/read-current-user.html +++ b/api/read-current-user.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/read-flow.html b/api/read-flow.html index d36011a78e..3f546493dc 100644 --- a/api/read-flow.html +++ b/api/read-flow.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/read-flows.html b/api/read-flows.html index 8f6f33f04d..a93629abe5 100644 --- a/api/read-flows.html +++ b/api/read-flows.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/read-folder-redirect.html b/api/read-folder-redirect.html index 072cf38249..9ff5e2c048 100644 --- a/api/read-folder-redirect.html +++ b/api/read-folder-redirect.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/read-folders-redirect.html b/api/read-folders-redirect.html index 7fce99f4cd..280964af80 100644 --- a/api/read-folders-redirect.html +++ b/api/read-folders-redirect.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/read-project.html b/api/read-project.html index 2633f3b4ed..01b9bbbe56 100644 --- a/api/read-project.html +++ b/api/read-project.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/read-projects.html b/api/read-projects.html index 4ca551b69f..8a76d836c3 100644 --- a/api/read-projects.html +++ b/api/read-projects.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/read-public-flow.html b/api/read-public-flow.html index a32b790609..b097c96d7d 100644 --- a/api/read-public-flow.html +++ b/api/read-public-flow.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/read-variables.html b/api/read-variables.html index 19159b8c55..2ec64006ba 100644 --- a/api/read-variables.html +++ b/api/read-variables.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/refresh-token.html b/api/refresh-token.html index 23dc91e5d7..e771cceeaa 100644 --- a/api/refresh-token.html +++ b/api/refresh-token.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/reset-password.html b/api/reset-password.html index 09e16b8609..8ebb69f91c 100644 --- a/api/reset-password.html +++ b/api/reset-password.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/retrieve-vertices-order.html b/api/retrieve-vertices-order.html index 749c34f404..b77e67751e 100644 --- a/api/retrieve-vertices-order.html +++ b/api/retrieve-vertices-order.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/save-store-api-key.html b/api/save-store-api-key.html index 886f086db4..c58afe5aea 100644 --- a/api/save-store-api-key.html +++ b/api/save-store-api-key.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/share-component.html b/api/share-component.html index b222581f3f..9562781a45 100644 --- a/api/share-component.html +++ b/api/share-component.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/simplified-run-flow.html b/api/simplified-run-flow.html index bf17d5fbd9..552ef152f7 100644 --- a/api/simplified-run-flow.html +++ b/api/simplified-run-flow.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/stream-logs.html b/api/stream-logs.html index 2424fa34cc..3e8154238e 100644 --- a/api/stream-logs.html +++ b/api/stream-logs.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/update-flow.html b/api/update-flow.html index d92fdf6834..5b0c0a97e5 100644 --- a/api/update-flow.html +++ b/api/update-flow.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/update-folder-redirect.html b/api/update-folder-redirect.html index 80e2bc3e98..20f3da870f 100644 --- a/api/update-folder-redirect.html +++ b/api/update-folder-redirect.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/update-message.html b/api/update-message.html index ae55739341..14ded03584 100644 --- a/api/update-message.html +++ b/api/update-message.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/update-project-mcp-settings.html b/api/update-project-mcp-settings.html index d51f2e1473..112257f54f 100644 --- a/api/update-project-mcp-settings.html +++ b/api/update-project-mcp-settings.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/update-project.html b/api/update-project.html index 14767d015d..7dd8816ded 100644 --- a/api/update-project.html +++ b/api/update-project.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/update-server-endpoint.html b/api/update-server-endpoint.html index da296930fd..c628bf8a03 100644 --- a/api/update-server-endpoint.html +++ b/api/update-server-endpoint.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/update-session-id.html b/api/update-session-id.html index 0b164924b8..2ef38c0ab0 100644 --- a/api/update-session-id.html +++ b/api/update-session-id.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/update-shared-component.html b/api/update-shared-component.html index ea642d87db..61f55e44ca 100644 --- a/api/update-shared-component.html +++ b/api/update-shared-component.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/update-variable.html b/api/update-variable.html index f8ddbeeeae..cfa8bbaccd 100644 --- a/api/update-variable.html +++ b/api/update-variable.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/upload-file-1.html b/api/upload-file-1.html index d50e4fd0ab..85ee64e1fa 100644 --- a/api/upload-file-1.html +++ b/api/upload-file-1.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/upload-file-2.html b/api/upload-file-2.html index 8e7d875e93..9c63308dd2 100644 --- a/api/upload-file-2.html +++ b/api/upload-file-2.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/upload-file-redirect.html b/api/upload-file-redirect.html index 3c639c49d8..fd909cbdf8 100644 --- a/api/upload-file-redirect.html +++ b/api/upload-file-redirect.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/upload-file.html b/api/upload-file.html index 50ce42100c..c695cb1a56 100644 --- a/api/upload-file.html +++ b/api/upload-file.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/upload-user-file-1.html b/api/upload-user-file-1.html index ebd191aa87..381d1758ed 100644 --- a/api/upload-user-file-1.html +++ b/api/upload-user-file-1.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/upload-user-file.html b/api/upload-user-file.html index 6063f81a69..933ce9f38c 100644 --- a/api/upload-user-file.html +++ b/api/upload-user-file.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/webhook-run-flow.html b/api/webhook-run-flow.html index fba6df0735..7e6fc7e92f 100644 --- a/api/webhook-run-flow.html +++ b/api/webhook-run-flow.html @@ -23,8 +23,8 @@ - - + + diff --git a/assets/images/tutorial-mcp-geolocation-b8140a46fa3a3ef20ed15dc6cf4a9060.png b/assets/images/tutorial-mcp-geolocation-b8140a46fa3a3ef20ed15dc6cf4a9060.png new file mode 100644 index 0000000000..e15c76bf8f Binary files /dev/null and b/assets/images/tutorial-mcp-geolocation-b8140a46fa3a3ef20ed15dc6cf4a9060.png differ diff --git a/assets/images/tutorial-mcp-weather-2073f7de52c423626a6ba308cd62da90.png b/assets/images/tutorial-mcp-weather-2073f7de52c423626a6ba308cd62da90.png new file mode 100644 index 0000000000..d1a4dd0ba0 Binary files /dev/null and b/assets/images/tutorial-mcp-weather-2073f7de52c423626a6ba308cd62da90.png differ diff --git a/assets/js/22dd74f7.6dc8bc0e.js b/assets/js/22dd74f7.6dc8bc0e.js new file mode 100644 index 0000000000..2d65816493 --- /dev/null +++ b/assets/js/22dd74f7.6dc8bc0e.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":"About Langflow","href":"/about-langflow","docId":"Get-Started/about-langflow","unlisted":false},{"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},{"type":"category","label":"Tutorials","items":[{"type":"link","label":"Create a vector RAG chatbot","href":"/chat-with-rag","docId":"Tutorials/chat-with-rag","unlisted":false},{"type":"link","label":"Create a chatbot that can ingest files","href":"/chat-with-files","docId":"Tutorials/chat-with-files","unlisted":false},{"type":"link","label":"Connect applications to agents","href":"/agent-tutorial","docId":"Tutorials/agent","unlisted":false},{"type":"link","label":"Connect to MCP servers from your application","href":"/mcp-tutorial","docId":"Tutorials/mcp-tutorial","unlisted":false}],"collapsed":true,"collapsible":true}],"collapsed":true,"collapsible":true},{"type":"category","label":"Templates","items":[{"type":"link","label":"Basic prompting","href":"/basic-prompting","docId":"Templates/basic-prompting","unlisted":false},{"type":"link","label":"Simple agent","href":"/simple-agent","docId":"Templates/simple-agent","unlisted":false},{"type":"link","label":"Blog writer","href":"/blog-writer","docId":"Templates/blog-writer","unlisted":false},{"type":"link","label":"Document QA","href":"/document-qa","docId":"Templates/document-qa","unlisted":false},{"type":"link","label":"Memory chatbot","href":"/memory-chatbot","docId":"Templates/memory-chatbot","unlisted":false},{"type":"link","label":"Vector store RAG","href":"/vector-store-rag","docId":"Templates/vector-store-rag","unlisted":false},{"type":"link","label":"Financial report parser","href":"/financial-report-parser","docId":"Templates/financial-report-parser","unlisted":false},{"type":"link","label":"Sequential tasks agent","href":"/sequential-agent","docId":"Templates/sequential-agent","unlisted":false},{"type":"link","label":"Travel planning agent","href":"/travel-planning-agent","docId":"Templates/travel-planning-agent","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Flows","items":[{"type":"link","label":"Use the visual editor","href":"/concepts-overview","docId":"Concepts/concepts-overview","unlisted":false},{"type":"link","label":"Build flows","href":"/concepts-flows","docId":"Concepts/concepts-flows","unlisted":false},{"type":"link","label":"Run flows","href":"/concepts-publish","docId":"Concepts/concepts-publish","unlisted":false},{"type":"link","label":"Import and export flows","href":"/concepts-flows-import","docId":"Concepts/concepts-flows-import","unlisted":false},{"type":"link","label":"Use the Playground","href":"/concepts-playground","docId":"Concepts/concepts-playground","unlisted":false},{"type":"link","label":"Use voice mode","href":"/concepts-voice-mode","docId":"Concepts/concepts-voice-mode","unlisted":false},{"type":"link","label":"Langflow objects","href":"/concepts-objects","docId":"Concepts/concepts-objects","unlisted":false},{"type":"link","label":"Manage files","href":"/concepts-file-management","docId":"Concepts/concepts-file-management","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Components","items":[{"type":"link","label":"Components overview","href":"/concepts-components","docId":"Concepts/concepts-components","unlisted":false},{"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":"Embedding models","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":"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":"Language 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":"Use Langflow Agents","href":"/agents","docId":"Agents/agents","unlisted":false},{"type":"link","label":"Configure tools for agents","href":"/agents-tools","docId":"Agents/agents-tools","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Model Context Protocol (MCP)","items":[{"type":"link","label":"Use Langflow as an MCP server","href":"/mcp-server","docId":"Concepts/mcp-server","unlisted":false},{"type":"link","label":"Use Langflow as an MCP client","href":"/mcp-client","docId":"Components/mcp-client","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},{"type":"link","label":"Telemetry","href":"/contributing-telemetry","docId":"Contributing/contributing-telemetry","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Develop","items":[{"type":"link","label":"Overview","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","href":"/memory","docId":"Develop/memory","unlisted":false},{"type":"link","label":"Session ID","href":"/session-id","docId":"Develop/session-id","unlisted":false},{"type":"link","label":"Logging","href":"/logging","docId":"Develop/logging","unlisted":false},{"type":"link","label":"Webhook","href":"/webhook","docId":"Develop/webhook","unlisted":false},{"type":"category","label":"Clients","items":[{"type":"link","label":"TypeScript Client","href":"/typescript-client","docId":"Develop/Clients/typescript-client","unlisted":false}],"collapsed":true,"collapsible":true}],"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":"link","label":"Deploy a public Langflow server","href":"/deployment-public-server","docId":"Deployment/deployment-public-server","unlisted":false},{"type":"link","label":"Deploy Langflow on a remote server","href":"/deployment-caddyfile","docId":"Deployment/deployment-caddyfile","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":"Get started with the Langflow API","href":"/api-reference-api-examples","docId":"API-Reference/api-reference-api-examples","unlisted":false},{"type":"link","label":"Flow trigger endpoints","href":"/api-flows-run","docId":"API-Reference/api-flows-run","unlisted":false},{"type":"link","label":"Flow management endpoints","href":"/api-flows","docId":"API-Reference/api-flows","unlisted":false},{"type":"link","label":"Files endpoints","href":"/api-files","docId":"API-Reference/api-files","unlisted":false},{"type":"link","label":"Projects endpoints","href":"/api-projects","docId":"API-Reference/api-projects","unlisted":false},{"type":"link","label":"Logs endpoints","href":"/api-logs","docId":"API-Reference/api-logs","unlisted":false},{"type":"link","label":"Monitor endpoints","href":"/api-monitor","docId":"API-Reference/api-monitor","unlisted":false},{"type":"link","label":"Build endpoints","href":"/api-build","docId":"API-Reference/api-build","unlisted":false},{"type":"link","label":"Users endpoints","href":"/api-users","docId":"API-Reference/api-users","unlisted":false},{"type":"link","label":"Langflow API specification","href":"/api"}],"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":"Astra DB MCP server","href":"/mcp-component-astra","docId":"Integrations/mcp-component-astra","unlisted":false},{"type":"link","label":"Cleanlab","href":"/integrations-cleanlab","docId":"Integrations/Cleanlab/integrations-cleanlab","unlisted":false},{"type":"link","label":"Composio","href":"/integrations-composio","docId":"Integrations/Composio/integrations-composio","unlisted":false},{"type":"link","label":"Docling","href":"/integrations-docling","docId":"Integrations/Docling/integrations-docling","unlisted":false},{"type":"category","label":"Google","items":[{"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},{"type":"link","label":"Integrate Google BigQuery with Langflow","href":"/integrations-google-big-query","docId":"Integrations/Google/integrations-google-big-query","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":"NVIDIA Ingest","href":"/integrations-nvidia-ingest","docId":"Integrations/Nvidia/integrations-nvidia-ingest","unlisted":false},{"type":"link","label":"NVIDIA NIM on WSL2","href":"/integrations-nvidia-ingest-wsl2","docId":"Integrations/Nvidia/integrations-nvidia-nim-wsl2","unlisted":false},{"type":"link","label":"NVIDIA G-Assist","href":"/integrations-nvidia-g-assist","docId":"Integrations/Nvidia/integrations-nvidia-g-assist","unlisted":false}],"collapsed":true,"collapsible":true}],"collapsed":true,"collapsible":true},{"type":"category","label":"Contribute","items":[{"type":"link","label":"Join the Langflow community","href":"/contributing-community","docId":"Contributing/contributing-community","unlisted":false},{"type":"link","label":"Contribute to Langflow","href":"/contributing-how-to-contribute","docId":"Contributing/contributing-how-to-contribute","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":"Contribute templates","href":"/contributing-templates","docId":"Contributing/contributing-templates","unlisted":false},{"type":"link","label":"Contribute bundles","href":"/contributing-bundles","docId":"Contributing/contributing-bundles","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Release notes","items":[{"type":"link","label":"Release notes","href":"/release-notes","docId":"Support/release-notes","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Support","items":[{"type":"link","label":"Troubleshoot","href":"/troubleshoot","docId":"Support/troubleshooting","unlisted":false},{"type":"link","label":"Get help and request enhancements","href":"/contributing-github-issues","docId":"Contributing/contributing-github-issues","unlisted":false},{"type":"link","label":"Enterprise support","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/agents":{"id":"Agents/agents","title":"Use Langflow Agents","description":"Agents use LLMs as a brain to autonomously analyze problems and select tools to solve them.","sidebar":"docs"},"Agents/agents-tools":{"id":"Agents/agents-tools","title":"Configure tools for agents","description":"Configure tools connected to agents to extend their capabilities.","sidebar":"docs"},"API-Reference/api-build":{"id":"API-Reference/api-build","title":"Build endpoints","description":"The /build endpoints are used by Langflow\'s frontend Workspace and Playground code.","sidebar":"docs"},"API-Reference/api-files":{"id":"API-Reference/api-files","title":"Files endpoints","description":"Use the /files endpoints to move files between your local machine and Langflow.","sidebar":"docs"},"API-Reference/api-flows":{"id":"API-Reference/api-flows","title":"Flow management endpoints","description":"Use the /flows endpoint to create, read, update, and delete flows.","sidebar":"docs"},"API-Reference/api-flows-run":{"id":"API-Reference/api-flows-run","title":"Flow trigger endpoints","description":"Use the /run and /webhook endpoints to run flows.","sidebar":"docs"},"API-Reference/api-logs":{"id":"API-Reference/api-logs","title":"Logs endpoints","description":"Retrieve logs for your Langflow flow.","sidebar":"docs"},"API-Reference/api-monitor":{"id":"API-Reference/api-monitor","title":"Monitor endpoints","description":"Use the /monitor endpoint to monitor and modify messages passed between Langflow components, vertex builds, and transactions.","sidebar":"docs"},"API-Reference/api-projects":{"id":"API-Reference/api-projects","title":"Projects endpoints","description":"Use the /projects endpoint to create, read, update, and delete Langflow projects.","sidebar":"docs"},"API-Reference/api-reference-api-examples":{"id":"API-Reference/api-reference-api-examples","title":"Get started with the Langflow API","description":"You can use the Langflow API for programmatic interactions with Langflow, such as the following:","sidebar":"docs"},"API-Reference/api-users":{"id":"API-Reference/api-users","title":"Users endpoints","description":"Use the /users endpoint to manage user accounts in Langflow.","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":"Bundled components are based on standard Langflow functionality, so you add them to your flows and configure them in much the same way as the standard components.","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":"Embedding models","description":"In Langflow version 1.5, the singular Embedding model component replaces many provider-specific embedding models components. Any provider-specific embedding model components that weren\'t incorporated into the singular component were moved to Bundles.","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-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":"Components in the Memories category are moved to Bundles as of Langflow 1.5.","sidebar":"docs"},"Components/components-models":{"id":"Components/components-models","title":"Language models","description":"In Langflow version 1.5, the singular Language model component replaces many provider-specific model components. Any provider-specific model components that weren\'t incorporated into the singular component were moved to Bundles.","sidebar":"docs"},"Components/components-processing":{"id":"Components/components-processing","title":"Processing","description":"Processing components process and transform data within a flow, like converting Data to text with a Parser component, filtering data with natural language with the Smart function, or saving data to your local machine with Save File.","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":"The Tools category in Langflow is removed as of Langflow 1.5.","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"},"Components/mcp-client":{"id":"Components/mcp-client","title":"Use Langflow as an MCP client","description":"Langflow integrates with the Model Context Protocol (MCP) as both an MCP server and an MCP client.","sidebar":"docs"},"Concepts/concepts-components":{"id":"Concepts/concepts-components","title":"Components overview","description":"Components are the building blocks of your flows.","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":"Build flows","description":"A flow is a functional representation of an application workflow.","sidebar":"docs"},"Concepts/concepts-flows-import":{"id":"Concepts/concepts-flows-import","title":"Import and export flows","description":"You can export flows to transfer them between Langflow instances, share them with others, or create backups.","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":"Use the visual editor","description":"You use Langflow\'s visual editor to create, test, and share flows, which are functional representations of application workflows.","sidebar":"docs"},"Concepts/concepts-playground":{"id":"Concepts/concepts-playground","title":"Use the 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":"Run flows","description":"After you build a flow, you probably want to run it within an application, such as a chatbot within a mobile app or website.","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":"Use Langflow as an 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":"You can use Langflow API keys to interact with Langflow programmatically.","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-bundles":{"id":"Contributing/contributing-bundles","title":"Contribute bundles","description":"Follow these steps to add new component bundles to the Langflow sidebar.","sidebar":"docs"},"Contributing/contributing-community":{"id":"Contributing/contributing-community","title":"Join the Langflow community","description":"There are several ways you can interact with the Langflow community and learn more about the Langflow codebase.","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 Component class.","sidebar":"docs"},"Contributing/contributing-github-issues":{"id":"Contributing/contributing-github-issues","title":"Get help and request enhancements","description":"The Langflow GitHub repository is an integral part of the Langflow community.","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"},"Contributing/contributing-templates":{"id":"Contributing/contributing-templates","title":"Contribute templates","description":"Follow these best practices when submitting a template to Langflow.","sidebar":"docs"},"Deployment/deployment-caddyfile":{"id":"Deployment/deployment-caddyfile","title":"Deploy Langflow on a remote server","description":"Learn how to deploy Langflow on your own remote server with secure web access.","sidebar":"docs"},"Deployment/deployment-docker":{"id":"Deployment/deployment-docker","title":"Deploy Langflow on Docker","description":"Running applications in Docker containers ensures consistent behavior across different systems and eliminates dependency conflicts.","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-public-server":{"id":"Deployment/deployment-public-server","title":"Deploy a public Langflow server","description":"By default, your Langflow server at http7860 isn\'t exposed to the public internet.","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/Clients/typescript-client":{"id":"Develop/Clients/typescript-client","title":"Langflow TypeScript client","description":"The Langflow TypeScript client allows your TypeScript applications to programmatically interact with the Langflow API.","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":"Langflow provides optional dependency groups and support for custom dependencies to extend Langflow functionality.","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":"You can use the Webhook component to start a flow run in response to an external event.","sidebar":"docs"},"Get-Started/about-langflow":{"id":"Get-Started/about-langflow","title":"What is Langflow?","description":"Langflow is an open-source, Python-based, customizable framework for building AI applications.","sidebar":"docs"},"Get-Started/get-started-installation":{"id":"Get-Started/get-started-installation","title":"Install Langflow","description":"Langflow can be installed in multiple ways:","sidebar":"docs"},"Get-Started/get-started-quickstart":{"id":"Get-Started/get-started-quickstart","title":"Quickstart","description":"Get started with Langflow by loading a template flow, running it, and then serving it at the /run API endpoint.","sidebar":"docs"},"Get-Started/welcome-to-langflow":{"id":"Get-Started/welcome-to-langflow","title":"Welcome to Langflow","description":"Langflow empowers developers to rapidly prototype and build AI applications with a user-friendly visual interface and support for important AI functionality like agents and the MCP.","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/Cleanlab/integrations-cleanlab":{"id":"Integrations/Cleanlab/integrations-cleanlab","title":"Integrate Cleanlab Evaluations with Langflow","description":"Unlock trustworthy Agentic, RAG, and LLM pipelines with Cleanlab\'s evaluation and remediation suite.","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/Docling/integrations-docling":{"id":"Integrations/Docling/integrations-docling","title":"Integrate Docling with Langflow","description":"Langflow integrates with Docling through a suite of components for parsing documents.","sidebar":"docs"},"Integrations/Google/integrations-google-big-query":{"id":"Integrations/Google/integrations-google-big-query","title":"Integrate Google BigQuery with Langflow","description":"Langflow integrates with Google BigQuery through the BigQuery component, allowing you to execute SQL queries and retrieve data from your BigQuery datasets.","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":"Langflow integrates with the Google Vertex AI API for authenticating the Vertex AI embeddings model and Vertex AI 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, add your LangChain API key and configuration as Langflow environment variables, and then start Langflow.","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 Tools 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-g-assist":{"id":"Integrations/Nvidia/integrations-nvidia-g-assist","title":"Integrate NVIDIA G-Assist with Langflow","description":"This component is available only for Langflow users with NVIDIA GPUs on Windows systems.","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"},"Support/luna-for-langflow":{"id":"Support/luna-for-langflow","title":"Enterprise support for Langflow","description":"With Luna for Langflow support, you can develop and deploy Langflow applications with confidence.","sidebar":"docs"},"Support/release-notes":{"id":"Support/release-notes","title":"Langflow release notes","description":"This page summarizes significant changes to Langflow in each release.","sidebar":"docs"},"Support/troubleshooting":{"id":"Support/troubleshooting","title":"Troubleshoot Langflow","description":"This page provides troubleshooting advice for issues you might encounter when using Langflow or contributing to Langflow.","sidebar":"docs"},"Templates/basic-prompting":{"id":"Templates/basic-prompting","title":"Basic prompting","description":"This flow is a starting point for understanding Langflow.","sidebar":"docs"},"Templates/blog-writer":{"id":"Templates/blog-writer","title":"Blog writer","description":"This flow demonstrates adding an additional input to the Prompt component to capture input from the URL and Parser components.","sidebar":"docs"},"Templates/document-qa":{"id":"Templates/document-qa","title":"Document QA","description":"Build a question-and-answer chatbot with document analysis capabilities using a document loaded from local memory.","sidebar":"docs"},"Templates/financial-report-parser":{"id":"Templates/financial-report-parser","title":"Financial report parser","description":"This flow demonstrates how to parse LLM responses into a structured format.","sidebar":"docs"},"Templates/memory-chatbot":{"id":"Templates/memory-chatbot","title":"Memory chatbot","description":"The Chat memory component is also known as the Message history component.","sidebar":"docs"},"Templates/sequential-agent":{"id":"Templates/sequential-agent","title":"Sequential tasks agent","description":"This flow demonstrates using multiple Agent components in a single flow.","sidebar":"docs"},"Templates/simple-agent":{"id":"Templates/simple-agent","title":"Simple agent","description":"This flow demonstrates using an Agent in a flow.","sidebar":"docs"},"Templates/travel-planning-agent":{"id":"Templates/travel-planning-agent","title":"Travel planning agent","description":"This flow demonstrates using multiple Agent components in a single flow.","sidebar":"docs"},"Templates/vector-store-rag":{"id":"Templates/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"},"Tutorials/agent":{"id":"Tutorials/agent","title":"Connect applications to agents","description":"This tutorial shows you how to connect a JavaScript application to a Langflow agent.","sidebar":"docs"},"Tutorials/chat-with-files":{"id":"Tutorials/chat-with-files","title":"Create a chatbot that can ingest files","description":"This tutorial shows you how to build a chatbot that can read and answer questions about files you upload, such as meeting notes or job applications.","sidebar":"docs"},"Tutorials/chat-with-rag":{"id":"Tutorials/chat-with-rag","title":"Create a vector RAG chatbot","description":"This tutorial demonstrates how you can use Langflow to create a chatbot application that uses Retrieval Augmented Generation (RAG) to embed your data as vectors in a vector database, and then chat with the data.","sidebar":"docs"},"Tutorials/mcp-tutorial":{"id":"Tutorials/mcp-tutorial","title":"Connect to MCP servers from your application","description":"This tutorial shows you how to connect MCP tools to your applications using Langflow\'s MCP Tools component.","sidebar":"docs"}}}}')}}]); \ No newline at end of file diff --git a/assets/js/22dd74f7.8cfb3d42.js b/assets/js/22dd74f7.8cfb3d42.js deleted file mode 100644 index de2c9eeb64..0000000000 --- a/assets/js/22dd74f7.8cfb3d42.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":"About Langflow","href":"/about-langflow","docId":"Get-Started/about-langflow","unlisted":false},{"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},{"type":"category","label":"Tutorials","items":[{"type":"link","label":"Create a vector RAG chatbot","href":"/chat-with-rag","docId":"Tutorials/chat-with-rag","unlisted":false},{"type":"link","label":"Create a chatbot that can ingest files","href":"/chat-with-files","docId":"Tutorials/chat-with-files","unlisted":false},{"type":"link","label":"Connect applications to agents","href":"/agent-tutorial","docId":"Tutorials/agent","unlisted":false}],"collapsed":true,"collapsible":true}],"collapsed":true,"collapsible":true},{"type":"category","label":"Templates","items":[{"type":"link","label":"Basic prompting","href":"/basic-prompting","docId":"Templates/basic-prompting","unlisted":false},{"type":"link","label":"Simple agent","href":"/simple-agent","docId":"Templates/simple-agent","unlisted":false},{"type":"link","label":"Blog writer","href":"/blog-writer","docId":"Templates/blog-writer","unlisted":false},{"type":"link","label":"Document QA","href":"/document-qa","docId":"Templates/document-qa","unlisted":false},{"type":"link","label":"Memory chatbot","href":"/memory-chatbot","docId":"Templates/memory-chatbot","unlisted":false},{"type":"link","label":"Vector store RAG","href":"/vector-store-rag","docId":"Templates/vector-store-rag","unlisted":false},{"type":"link","label":"Financial report parser","href":"/financial-report-parser","docId":"Templates/financial-report-parser","unlisted":false},{"type":"link","label":"Sequential tasks agent","href":"/sequential-agent","docId":"Templates/sequential-agent","unlisted":false},{"type":"link","label":"Travel planning agent","href":"/travel-planning-agent","docId":"Templates/travel-planning-agent","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Flows","items":[{"type":"link","label":"Use the visual editor","href":"/concepts-overview","docId":"Concepts/concepts-overview","unlisted":false},{"type":"link","label":"Build flows","href":"/concepts-flows","docId":"Concepts/concepts-flows","unlisted":false},{"type":"link","label":"Run flows","href":"/concepts-publish","docId":"Concepts/concepts-publish","unlisted":false},{"type":"link","label":"Import and export flows","href":"/concepts-flows-import","docId":"Concepts/concepts-flows-import","unlisted":false},{"type":"link","label":"Use the Playground","href":"/concepts-playground","docId":"Concepts/concepts-playground","unlisted":false},{"type":"link","label":"Use voice mode","href":"/concepts-voice-mode","docId":"Concepts/concepts-voice-mode","unlisted":false},{"type":"link","label":"Langflow objects","href":"/concepts-objects","docId":"Concepts/concepts-objects","unlisted":false},{"type":"link","label":"Manage files","href":"/concepts-file-management","docId":"Concepts/concepts-file-management","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Components","items":[{"type":"link","label":"Components overview","href":"/concepts-components","docId":"Concepts/concepts-components","unlisted":false},{"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":"Embedding models","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":"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":"Language 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":"Use Langflow Agents","href":"/agents","docId":"Agents/agents","unlisted":false},{"type":"link","label":"Configure tools for agents","href":"/agents-tools","docId":"Agents/agents-tools","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Model Context Protocol (MCP)","items":[{"type":"link","label":"Use Langflow as an MCP server","href":"/mcp-server","docId":"Concepts/mcp-server","unlisted":false},{"type":"link","label":"Use Langflow as an MCP client","href":"/mcp-client","docId":"Components/mcp-client","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},{"type":"link","label":"Telemetry","href":"/contributing-telemetry","docId":"Contributing/contributing-telemetry","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Develop","items":[{"type":"link","label":"Overview","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","href":"/memory","docId":"Develop/memory","unlisted":false},{"type":"link","label":"Session ID","href":"/session-id","docId":"Develop/session-id","unlisted":false},{"type":"link","label":"Logging","href":"/logging","docId":"Develop/logging","unlisted":false},{"type":"link","label":"Webhook","href":"/webhook","docId":"Develop/webhook","unlisted":false},{"type":"category","label":"Clients","items":[{"type":"link","label":"TypeScript Client","href":"/typescript-client","docId":"Develop/Clients/typescript-client","unlisted":false}],"collapsed":true,"collapsible":true}],"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":"link","label":"Deploy a public Langflow server","href":"/deployment-public-server","docId":"Deployment/deployment-public-server","unlisted":false},{"type":"link","label":"Deploy Langflow on a remote server","href":"/deployment-caddyfile","docId":"Deployment/deployment-caddyfile","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":"Get started with the Langflow API","href":"/api-reference-api-examples","docId":"API-Reference/api-reference-api-examples","unlisted":false},{"type":"link","label":"Flow trigger endpoints","href":"/api-flows-run","docId":"API-Reference/api-flows-run","unlisted":false},{"type":"link","label":"Flow management endpoints","href":"/api-flows","docId":"API-Reference/api-flows","unlisted":false},{"type":"link","label":"Files endpoints","href":"/api-files","docId":"API-Reference/api-files","unlisted":false},{"type":"link","label":"Projects endpoints","href":"/api-projects","docId":"API-Reference/api-projects","unlisted":false},{"type":"link","label":"Logs endpoints","href":"/api-logs","docId":"API-Reference/api-logs","unlisted":false},{"type":"link","label":"Monitor endpoints","href":"/api-monitor","docId":"API-Reference/api-monitor","unlisted":false},{"type":"link","label":"Build endpoints","href":"/api-build","docId":"API-Reference/api-build","unlisted":false},{"type":"link","label":"Users endpoints","href":"/api-users","docId":"API-Reference/api-users","unlisted":false},{"type":"link","label":"Langflow API specification","href":"/api"}],"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":"Astra DB MCP server","href":"/mcp-component-astra","docId":"Integrations/mcp-component-astra","unlisted":false},{"type":"link","label":"Cleanlab","href":"/integrations-cleanlab","docId":"Integrations/Cleanlab/integrations-cleanlab","unlisted":false},{"type":"link","label":"Composio","href":"/integrations-composio","docId":"Integrations/Composio/integrations-composio","unlisted":false},{"type":"link","label":"Docling","href":"/integrations-docling","docId":"Integrations/Docling/integrations-docling","unlisted":false},{"type":"category","label":"Google","items":[{"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},{"type":"link","label":"Integrate Google BigQuery with Langflow","href":"/integrations-google-big-query","docId":"Integrations/Google/integrations-google-big-query","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":"NVIDIA Ingest","href":"/integrations-nvidia-ingest","docId":"Integrations/Nvidia/integrations-nvidia-ingest","unlisted":false},{"type":"link","label":"NVIDIA NIM on WSL2","href":"/integrations-nvidia-ingest-wsl2","docId":"Integrations/Nvidia/integrations-nvidia-nim-wsl2","unlisted":false},{"type":"link","label":"NVIDIA G-Assist","href":"/integrations-nvidia-g-assist","docId":"Integrations/Nvidia/integrations-nvidia-g-assist","unlisted":false}],"collapsed":true,"collapsible":true}],"collapsed":true,"collapsible":true},{"type":"category","label":"Contribute","items":[{"type":"link","label":"Join the Langflow community","href":"/contributing-community","docId":"Contributing/contributing-community","unlisted":false},{"type":"link","label":"Contribute to Langflow","href":"/contributing-how-to-contribute","docId":"Contributing/contributing-how-to-contribute","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":"Contribute templates","href":"/contributing-templates","docId":"Contributing/contributing-templates","unlisted":false},{"type":"link","label":"Contribute bundles","href":"/contributing-bundles","docId":"Contributing/contributing-bundles","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Release notes","items":[{"type":"link","label":"Release notes","href":"/release-notes","docId":"Support/release-notes","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Support","items":[{"type":"link","label":"Troubleshoot","href":"/troubleshoot","docId":"Support/troubleshooting","unlisted":false},{"type":"link","label":"Get help and request enhancements","href":"/contributing-github-issues","docId":"Contributing/contributing-github-issues","unlisted":false},{"type":"link","label":"Enterprise support","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/agents":{"id":"Agents/agents","title":"Use Langflow Agents","description":"Agents use LLMs as a brain to autonomously analyze problems and select tools to solve them.","sidebar":"docs"},"Agents/agents-tools":{"id":"Agents/agents-tools","title":"Configure tools for agents","description":"Configure tools connected to agents to extend their capabilities.","sidebar":"docs"},"API-Reference/api-build":{"id":"API-Reference/api-build","title":"Build endpoints","description":"The /build endpoints are used by Langflow\'s frontend Workspace and Playground code.","sidebar":"docs"},"API-Reference/api-files":{"id":"API-Reference/api-files","title":"Files endpoints","description":"Use the /files endpoints to move files between your local machine and Langflow.","sidebar":"docs"},"API-Reference/api-flows":{"id":"API-Reference/api-flows","title":"Flow management endpoints","description":"Use the /flows endpoint to create, read, update, and delete flows.","sidebar":"docs"},"API-Reference/api-flows-run":{"id":"API-Reference/api-flows-run","title":"Flow trigger endpoints","description":"Use the /run and /webhook endpoints to run flows.","sidebar":"docs"},"API-Reference/api-logs":{"id":"API-Reference/api-logs","title":"Logs endpoints","description":"Retrieve logs for your Langflow flow.","sidebar":"docs"},"API-Reference/api-monitor":{"id":"API-Reference/api-monitor","title":"Monitor endpoints","description":"Use the /monitor endpoint to monitor and modify messages passed between Langflow components, vertex builds, and transactions.","sidebar":"docs"},"API-Reference/api-projects":{"id":"API-Reference/api-projects","title":"Projects endpoints","description":"Use the /projects endpoint to create, read, update, and delete Langflow projects.","sidebar":"docs"},"API-Reference/api-reference-api-examples":{"id":"API-Reference/api-reference-api-examples","title":"Get started with the Langflow API","description":"You can use the Langflow API for programmatic interactions with Langflow, such as the following:","sidebar":"docs"},"API-Reference/api-users":{"id":"API-Reference/api-users","title":"Users endpoints","description":"Use the /users endpoint to manage user accounts in Langflow.","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":"Bundled components are based on standard Langflow functionality, so you add them to your flows and configure them in much the same way as the standard components.","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":"Embedding models","description":"In Langflow version 1.5, the singular Embedding model component replaces many provider-specific embedding models components. Any provider-specific embedding model components that weren\'t incorporated into the singular component were moved to Bundles.","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-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":"Components in the Memories category are moved to Bundles as of Langflow 1.5.","sidebar":"docs"},"Components/components-models":{"id":"Components/components-models","title":"Language models","description":"In Langflow version 1.5, the singular Language model component replaces many provider-specific model components. Any provider-specific model components that weren\'t incorporated into the singular component were moved to Bundles.","sidebar":"docs"},"Components/components-processing":{"id":"Components/components-processing","title":"Processing","description":"Processing components process and transform data within a flow, like converting Data to text with a Parser component, filtering data with natural language with the Smart function, or saving data to your local machine with Save File.","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":"The Tools category in Langflow is removed as of Langflow 1.5.","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"},"Components/mcp-client":{"id":"Components/mcp-client","title":"Use Langflow as an MCP client","description":"Langflow integrates with the Model Context Protocol (MCP) as both an MCP server and an MCP client.","sidebar":"docs"},"Concepts/concepts-components":{"id":"Concepts/concepts-components","title":"Components overview","description":"Components are the building blocks of your flows.","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":"Build flows","description":"A flow is a functional representation of an application workflow.","sidebar":"docs"},"Concepts/concepts-flows-import":{"id":"Concepts/concepts-flows-import","title":"Import and export flows","description":"You can export flows to transfer them between Langflow instances, share them with others, or create backups.","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":"Use the visual editor","description":"You use Langflow\'s visual editor to create, test, and share flows, which are functional representations of application workflows.","sidebar":"docs"},"Concepts/concepts-playground":{"id":"Concepts/concepts-playground","title":"Use the 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":"Run flows","description":"After you build a flow, you probably want to run it within an application, such as a chatbot within a mobile app or website.","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":"Use Langflow as an 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":"You can use Langflow API keys to interact with Langflow programmatically.","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-bundles":{"id":"Contributing/contributing-bundles","title":"Contribute bundles","description":"Follow these steps to add new component bundles to the Langflow sidebar.","sidebar":"docs"},"Contributing/contributing-community":{"id":"Contributing/contributing-community","title":"Join the Langflow community","description":"There are several ways you can interact with the Langflow community and learn more about the Langflow codebase.","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 Component class.","sidebar":"docs"},"Contributing/contributing-github-issues":{"id":"Contributing/contributing-github-issues","title":"Get help and request enhancements","description":"The Langflow GitHub repository is an integral part of the Langflow community.","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"},"Contributing/contributing-templates":{"id":"Contributing/contributing-templates","title":"Contribute templates","description":"Follow these best practices when submitting a template to Langflow.","sidebar":"docs"},"Deployment/deployment-caddyfile":{"id":"Deployment/deployment-caddyfile","title":"Deploy Langflow on a remote server","description":"Learn how to deploy Langflow on your own remote server with secure web access.","sidebar":"docs"},"Deployment/deployment-docker":{"id":"Deployment/deployment-docker","title":"Deploy Langflow on Docker","description":"Running applications in Docker containers ensures consistent behavior across different systems and eliminates dependency conflicts.","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-public-server":{"id":"Deployment/deployment-public-server","title":"Deploy a public Langflow server","description":"By default, your Langflow server at http7860 isn\'t exposed to the public internet.","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/Clients/typescript-client":{"id":"Develop/Clients/typescript-client","title":"Langflow TypeScript client","description":"The Langflow TypeScript client allows your TypeScript applications to programmatically interact with the Langflow API.","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":"Langflow provides optional dependency groups and support for custom dependencies to extend Langflow functionality.","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":"You can use the Webhook component to start a flow run in response to an external event.","sidebar":"docs"},"Get-Started/about-langflow":{"id":"Get-Started/about-langflow","title":"What is Langflow?","description":"Langflow is an open-source, Python-based, customizable framework for building AI applications.","sidebar":"docs"},"Get-Started/get-started-installation":{"id":"Get-Started/get-started-installation","title":"Install Langflow","description":"Langflow can be installed in multiple ways:","sidebar":"docs"},"Get-Started/get-started-quickstart":{"id":"Get-Started/get-started-quickstart","title":"Quickstart","description":"Get started with Langflow by loading a template flow, running it, and then serving it at the /run API endpoint.","sidebar":"docs"},"Get-Started/welcome-to-langflow":{"id":"Get-Started/welcome-to-langflow","title":"Welcome to Langflow","description":"Langflow empowers developers to rapidly prototype and build AI applications with a user-friendly visual interface and support for important AI functionality like agents and the MCP.","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/Cleanlab/integrations-cleanlab":{"id":"Integrations/Cleanlab/integrations-cleanlab","title":"Integrate Cleanlab Evaluations with Langflow","description":"Unlock trustworthy Agentic, RAG, and LLM pipelines with Cleanlab\'s evaluation and remediation suite.","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/Docling/integrations-docling":{"id":"Integrations/Docling/integrations-docling","title":"Integrate Docling with Langflow","description":"Langflow integrates with Docling through a suite of components for parsing documents.","sidebar":"docs"},"Integrations/Google/integrations-google-big-query":{"id":"Integrations/Google/integrations-google-big-query","title":"Integrate Google BigQuery with Langflow","description":"Langflow integrates with Google BigQuery through the BigQuery component, allowing you to execute SQL queries and retrieve data from your BigQuery datasets.","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":"Langflow integrates with the Google Vertex AI API for authenticating the Vertex AI embeddings model and Vertex AI 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, add your LangChain API key and configuration as Langflow environment variables, and then start Langflow.","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 Tools 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-g-assist":{"id":"Integrations/Nvidia/integrations-nvidia-g-assist","title":"Integrate NVIDIA G-Assist with Langflow","description":"This component is available only for Langflow users with NVIDIA GPUs on Windows systems.","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"},"Support/luna-for-langflow":{"id":"Support/luna-for-langflow","title":"Enterprise support for Langflow","description":"With Luna for Langflow support, you can develop and deploy Langflow applications with confidence.","sidebar":"docs"},"Support/release-notes":{"id":"Support/release-notes","title":"Langflow release notes","description":"This page summarizes significant changes to Langflow in each release.","sidebar":"docs"},"Support/troubleshooting":{"id":"Support/troubleshooting","title":"Troubleshoot Langflow","description":"This page provides troubleshooting advice for issues you might encounter when using Langflow or contributing to Langflow.","sidebar":"docs"},"Templates/basic-prompting":{"id":"Templates/basic-prompting","title":"Basic prompting","description":"This flow is a starting point for understanding Langflow.","sidebar":"docs"},"Templates/blog-writer":{"id":"Templates/blog-writer","title":"Blog writer","description":"This flow demonstrates adding an additional input to the Prompt component to capture input from the URL and Parser components.","sidebar":"docs"},"Templates/document-qa":{"id":"Templates/document-qa","title":"Document QA","description":"Build a question-and-answer chatbot with document analysis capabilities using a document loaded from local memory.","sidebar":"docs"},"Templates/financial-report-parser":{"id":"Templates/financial-report-parser","title":"Financial report parser","description":"This flow demonstrates how to parse LLM responses into a structured format.","sidebar":"docs"},"Templates/memory-chatbot":{"id":"Templates/memory-chatbot","title":"Memory chatbot","description":"The Chat memory component is also known as the Message history component.","sidebar":"docs"},"Templates/sequential-agent":{"id":"Templates/sequential-agent","title":"Sequential tasks agent","description":"This flow demonstrates using multiple Agent components in a single flow.","sidebar":"docs"},"Templates/simple-agent":{"id":"Templates/simple-agent","title":"Simple agent","description":"This flow demonstrates using an Agent in a flow.","sidebar":"docs"},"Templates/travel-planning-agent":{"id":"Templates/travel-planning-agent","title":"Travel planning agent","description":"This flow demonstrates using multiple Agent components in a single flow.","sidebar":"docs"},"Templates/vector-store-rag":{"id":"Templates/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"},"Tutorials/agent":{"id":"Tutorials/agent","title":"Connect applications to agents","description":"This tutorial shows you how to connect a JavaScript application to a Langflow agent.","sidebar":"docs"},"Tutorials/chat-with-files":{"id":"Tutorials/chat-with-files","title":"Create a chatbot that can ingest files","description":"This tutorial shows you how to build a chatbot that can read and answer questions about files you upload, such as meeting notes or job applications.","sidebar":"docs"},"Tutorials/chat-with-rag":{"id":"Tutorials/chat-with-rag","title":"Create a vector RAG chatbot","description":"This tutorial demonstrates how you can use Langflow to create a chatbot application that uses Retrieval Augmented Generation (RAG) to embed your data as vectors in a vector database, and then chat with the data.","sidebar":"docs"}}}}')}}]); \ No newline at end of file diff --git a/assets/js/2ab0d4f5.93ab122d.js b/assets/js/2ab0d4f5.170e4a23.js similarity index 50% rename from assets/js/2ab0d4f5.93ab122d.js rename to assets/js/2ab0d4f5.170e4a23.js index a4337c56c8..6d02d90be8 100644 --- a/assets/js/2ab0d4f5.93ab122d.js +++ b/assets/js/2ab0d4f5.170e4a23.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.5.0.post1"},"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 \\"voluptate2\\": \\"\\"\\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.5.0.post1"},"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 \\"Lorem_2\\": \\"\\",\\n \\"officiac3\\": \\"\\"\\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/2fc7e024.738f39b9.js b/assets/js/2fc7e024.738f39b9.js deleted file mode 100644 index ff88a2e26f..0000000000 --- a/assets/js/2fc7e024.738f39b9.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[1408],{11470:(e,t,o)=>{o.d(t,{A:()=>C});var n=o(96540),s=o(18215),r=o(23104),l=o(56347),c=o(205),a=o(57485),i=o(31682),p=o(70679);function d(e){return n.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)})?.filter(Boolean)??[]}function h(e){const{values:t,children:o}=e;return(0,n.useMemo)(()=>{const e=t??function(e){return d(e).map(({props:{value:e,label:t,attributes:o,default:n}})=>({value:e,label:t,attributes:o,default:n}))}(o);return function(e){const t=(0,i.XI)(e,(e,t)=>e.value===t.value);if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map(e=>e.value).join(", ")}" found in . Every value needs to be unique.`)}(e),e},[t,o])}function u({value:e,tabValues:t}){return t.some(t=>t.value===e)}function y({queryString:e=!1,groupId:t}){const o=(0,l.W6)(),s=function({queryString:e=!1,groupId:t}){if("string"==typeof e)return e;if(!1===e)return null;if(!0===e&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:e,groupId:t});return[(0,a.aZ)(s),(0,n.useCallback)(e=>{if(!s)return;const t=new URLSearchParams(o.location.search);t.set(s,e),o.replace({...o.location,search:t.toString()})},[s,o])]}function f(e){const{defaultValue:t,queryString:o=!1,groupId:s}=e,r=h(e),[l,a]=(0,n.useState)(()=>function({defaultValue:e,tabValues:t}){if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(e){if(!u({value:e,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${e}" but none of its children has the corresponding value. Available values are: ${t.map(e=>e.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return e}const o=t.find(e=>e.default)??t[0];if(!o)throw new Error("Unexpected error: 0 tabValues");return o.value}({defaultValue:t,tabValues:r})),[i,d]=y({queryString:o,groupId:s}),[f,D]=function({groupId:e}){const t=function(e){return e?`docusaurus.tab.${e}`:null}(e),[o,s]=(0,p.Dv)(t);return[o,(0,n.useCallback)(e=>{t&&s.set(e)},[t,s])]}({groupId:s}),m=(()=>{const e=i??f;return u({value:e,tabValues:r})?e:null})();(0,c.A)(()=>{m&&a(m)},[m]);return{selectedValue:l,selectValue:(0,n.useCallback)(e=>{if(!u({value:e,tabValues:r}))throw new Error(`Can't select invalid tab value=${e}`);a(e),d(e),D(e)},[d,D,r]),tabValues:r}}var D=o(92303);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=o(74848);function F({className:e,block:t,selectedValue:o,selectValue:n,tabValues:l}){const c=[],{blockElementScrollPositionUntilNextRender:a}=(0,r.a_)(),i=e=>{const t=e.currentTarget,s=c.indexOf(t),r=l[s].value;r!==o&&(a(t),n(r))},p=e=>{let t=null;switch(e.key){case"Enter":i(e);break;case"ArrowRight":{const o=c.indexOf(e.currentTarget)+1;t=c[o]??c[0];break}case"ArrowLeft":{const o=c.indexOf(e.currentTarget)-1;t=c[o]??c[c.length-1];break}}t?.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":t},e),children:l.map(({value:e,label:t,attributes:n})=>(0,g.jsx)("li",{role:"tab",tabIndex:o===e?0:-1,"aria-selected":o===e,ref:e=>{c.push(e)},onKeyDown:p,onClick:i,...n,className:(0,s.A)("tabs__item",m.tabItem,n?.className,{"tabs__item--active":o===e}),children:t??e},e))})}function k({lazy:e,children:t,selectedValue:o}){const r=(Array.isArray(t)?t:[t]).filter(Boolean);if(e){const e=r.find(e=>e.props.value===o);return e?(0,n.cloneElement)(e,{className:(0,s.A)("margin-top--md",e.props.className)}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:r.map((e,t)=>(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==o}))})}function x(e){const t=f(e);return(0,g.jsxs)("div",{className:(0,s.A)("tabs-container",m.tabList),children:[(0,g.jsx)(F,{...t,...e}),(0,g.jsx)(k,{...t,...e})]})}function C(e){const t=(0,D.A)();return(0,g.jsx)(x,{...e,children:d(e.children)},String(t))}},17886:(e,t,o)=>{o.d(t,{A:()=>r});o(96540);var n=o(64058),s=o(74848);function r({name:e,...t}){const o=n[e];return o?(0,s.jsx)(o,{...t}):null}},19365:(e,t,o)=>{o.d(t,{A:()=>l});o(96540);var n=o(18215);const s={tabItem:"tabItem_Ymn6"};var r=o(74848);function l({children:e,hidden:t,className:o}){return(0,r.jsx)("div",{role:"tabpanel",className:(0,n.A)(s.tabItem,o),hidden:t,children:e})}},47617:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/tutorial-chat-file-loader-099f2f4c5e4343412557b1a78c4b9209.png"},57844:(e,t,o)=>{o.r(t),o.d(t,{CH:()=>d,assets:()=>p,chCodeConfig:()=>h,contentTitle:()=>i,default:()=>f,frontMatter:()=>a,metadata:()=>n,toc:()=>u});const n=JSON.parse('{"id":"Tutorials/chat-with-files","title":"Create a chatbot that can ingest files","description":"This tutorial shows you how to build a chatbot that can read and answer questions about files you upload, such as meeting notes or job applications.","source":"@site/docs/Tutorials/chat-with-files.mdx","sourceDirName":"Tutorials","slug":"/chat-with-files","permalink":"/chat-with-files","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Create a chatbot that can ingest files","slug":"/chat-with-files"},"sidebar":"docs","previous":{"title":"Create a vector RAG chatbot","permalink":"/chat-with-rag"},"next":{"title":"Connect applications to agents","permalink":"/agent-tutorial"}}');var s=o(74848),r=o(28453),l=o(24754),c=o(17886);o(11470),o(19365);const a={title:"Create a chatbot that can ingest files",slug:"/chat-with-files"},i=void 0,p={},d={annotations:l.hk,Code:l.Cy},h={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},u=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Create a flow that accepts file input",id:"create-a-flow-that-accepts-file-input",level:2},{value:"Send requests to your flow from a Python application",id:"send-requests-to-your-flow-from-a-python-application",level:2},{value:"Next steps",id:"next-steps",level:2}];function y(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components},{Details:n}=t;return d||D("CH",!1),d.Code||D("CH.Code",!0),n||D("Details",!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","\n",(0,s.jsx)(t.p,{children:"This tutorial shows you how to build a chatbot that can read and answer questions about files you upload, such as meeting notes or job applications."}),"\n",(0,s.jsx)(t.p,{children:"For example, you could upload a contract and ask, \u201cWhat are the termination clauses in this agreement?\u201d Or upload a resume and ask, \u201cDoes this candidate have experience with marketing analytics?\u201d"}),"\n",(0,s.jsx)(t.p,{children:"The main focus of this tutorial is to show you how to provide files as input to a Langflow flow, so your chatbot can use the content of those files in its responses."}),"\n",(0,s.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.a,{href:"/get-started-installation",children:"A running Langflow instance"})}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.a,{href:"/configuration-api-keys",children:"A Langflow API key"})}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.a,{href:"https://platform.openai.com/api-keys",children:"An OpenAI API key"})}),"\n",(0,s.jsx)(t.p,{children:"This tutorial uses an OpenAI LLM. If you want to use a different provider, you need a valid credential for that provider."}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"create-a-flow-that-accepts-file-input",children:"Create a flow that accepts file input"}),"\n",(0,s.jsxs)(t.p,{children:["To ingest files, your flow must have a ",(0,s.jsx)(t.strong,{children:"File"})," component attached to a component that receives input, such as a ",(0,s.jsx)(t.strong,{children:"Prompt"})," or ",(0,s.jsx)(t.strong,{children:"Agent"})," component."]}),"\n",(0,s.jsxs)(t.p,{children:["The following steps modify the ",(0,s.jsx)(t.a,{href:"/basic-prompting",children:(0,s.jsx)(t.strong,{children:"Basic prompting"})})," template to accept file input:"]}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["In Langflow, click ",(0,s.jsx)(t.strong,{children:"New Flow"}),", and then select the ",(0,s.jsx)(t.strong,{children:"Basic prompting"})," template."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["In the ",(0,s.jsx)(t.strong,{children:"Language Model"})," component, enter your OpenAI API key."]}),"\n",(0,s.jsxs)(t.p,{children:["If you want to use a different provider or model, edit the ",(0,s.jsx)(t.strong,{children:"Model Provider"}),", ",(0,s.jsx)(t.strong,{children:"Model Name"}),", and ",(0,s.jsx)(t.strong,{children:"API Key"})," fields accordingly."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["To verify that your API key is valid, click ",(0,s.jsx)(c.A,{name:"Play","aria-hidden":"true"})," ",(0,s.jsx)(t.strong,{children:"Playground"}),", and then ask the LLM a question.\nThe LLM should respond according to the specifications in the ",(0,s.jsx)(t.strong,{children:"Prompt"})," component's ",(0,s.jsx)(t.strong,{children:"Template"})," field."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Exit the ",(0,s.jsx)(t.strong,{children:"Playground"}),", and then modify the ",(0,s.jsx)(t.strong,{children:"Prompt"})," component to accept file input in addition to chat input.\nTo do this, edit the ",(0,s.jsx)(t.strong,{children:"Template"})," field, and then replace the default prompt with the following text:"]}),"\n",(0,s.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"ChatInput:",props:{}}]},{tokens:[{content:"{chat-input}",props:{}}]},{tokens:[{content:"File:",props:{}}]},{tokens:[{content:"{file}",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.strong,{children:"Prompt"})," component gets a new input port for each value in curly braces. At this point, your ",(0,s.jsx)(t.strong,{children:"Prompt"})," component should have ",(0,s.jsx)(t.strong,{children:"chat-input"})," and ",(0,s.jsx)(t.strong,{children:"file"})," input ports."]}),"\n",(0,s.jsx)(t.admonition,{type:"tip",children:(0,s.jsx)(t.p,{children:"Within the curly braces, you can use any port name you like. For this tutorial, the ports are named after the components that connect to them."})}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Add a ",(0,s.jsx)(t.a,{href:"/components-data#file",children:"File component"})," to the flow, and then connect the ",(0,s.jsx)(t.strong,{children:"Raw Content"})," output port to the Prompt component's ",(0,s.jsx)(t.strong,{children:"file"})," input port.\nTo connect ports, click and drag from one port to the other."]}),"\n",(0,s.jsx)(t.p,{children:"You can add files directly to the file component to pre-load input before running the flow, or you can load files at runtime. The next section of this tutorial covers runtime file uploads."}),"\n",(0,s.jsx)(t.p,{children:"At this point your flow has five components. The Chat Input and File components are connected to the Prompt component's input ports. Then, the Prompt component's output port is connected to the Language Model component's input port. Finally, the Language Model component's output port is connected to the Chat Output component, which returns the final response to the user."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"File loader chat flow",src:o(47617).A+"",width:"4000",height:"1564"})}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"send-requests-to-your-flow-from-a-python-application",children:"Send requests to your flow from a Python application"}),"\n",(0,s.jsx)(t.p,{children:"This section of the tutorial demonstrates how you can send file input to a flow from an application."}),"\n",(0,s.jsxs)(t.p,{children:["To do this, your application must send a ",(0,s.jsx)(t.code,{children:"POST /run"})," request to your Langflow server with the file you want to upload and a text prompt.\nThe result includes the outcome of the flow run and the LLM's response."]}),"\n",(0,s.jsxs)(t.p,{children:["This example uses a local Langflow instance, and it asks the LLM to evaluate a sample resume.\nIf you don't have a resume on hand, you can download ",(0,s.jsx)(t.a,{target:"_blank","data-noBrokenLinkCheck":!0,href:o(87481).A+"",children:"fake-resume.txt"}),"."]}),"\n",(0,s.jsx)(t.admonition,{type:"tip",children:(0,s.jsxs)(t.p,{children:["For help with constructing file upload requests in Python, JavaScript, and curl, see the ",(0,s.jsx)(t.a,{href:"https://langflow-file-upload-examples.onrender.com",children:"Langflow File Upload Utility"}),"."]})}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"To construct the request, gather the following information:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"LANGFLOW_SERVER_ADDRESS"}),": Your Langflow server's domain. The default value is ",(0,s.jsx)(t.code,{children:"127.0.0.1:7860"}),". You can get this value from the code snippets on your flow's ",(0,s.jsxs)(t.a,{href:"/concepts-publish#api-access",children:[(0,s.jsx)(t.strong,{children:"API access"})," pane"]}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"FLOW_ID"}),": Your flow's UUID or custom endpoint name. You can get this value from the code snippets on your flow's ",(0,s.jsxs)(t.a,{href:"/concepts-publish#api-access",children:[(0,s.jsx)(t.strong,{children:"API access"})," pane"]}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"FILE_COMPONENT_ID"}),": The UUID of the File component in your flow, such as ",(0,s.jsx)(t.code,{children:"File-KZP68"}),". To find the component ID, open your flow in Langflow, click the File component, and then click ",(0,s.jsx)(t.strong,{children:"Controls"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"CHAT_INPUT"}),": The message you want to send to the Chat Input of your flow, such as ",(0,s.jsx)(t.code,{children:"Evaluate this resume for a job opening in my Marketing department."})]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"FILE_NAME"})," and ",(0,s.jsx)(t.code,{children:"FILE_PATH"}),": The name and path to the local file that you want to send to your flow."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"LANGFLOW_API_KEY"}),": A valid Langflow API key. To create an API key, see ",(0,s.jsx)(t.a,{href:"/configuration-api-keys",children:"API keys"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"Copy the following script into a Python file, and then replace the placeholders with the information you gathered in the previous step:"}),"\n",(0,s.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"# Python example using requests",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" requests",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" json",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# 1. Set the upload URL",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"url ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"http://LANGFLOW_SERVER_ADDRESS/api/v2/files/"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# 2. Prepare the file and payload",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"payload ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"files ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" (",props:{style:{color:"#C9D1D9"}}},{content:"'file'",props:{style:{color:"#A5D6FF"}}},{content:", (",props:{style:{color:"#C9D1D9"}}},{content:"'FILE_PATH'",props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"open",props:{style:{color:"#79C0FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'FILE_NAME'",props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"'rb'",props:{style:{color:"#A5D6FF"}}},{content:"), ",props:{style:{color:"#C9D1D9"}}},{content:"'application/octet-stream'",props:{style:{color:"#A5D6FF"}}},{content:"))",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"headers ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" 'Accept'",props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"'application/json'",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" 'x-api-key'",props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"'LANGFLOW_API_KEY'",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# 3. Upload the file to Langflow",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"response ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" requests.request(",props:{style:{color:"#C9D1D9"}}},{content:'"POST"',props:{style:{color:"#A5D6FF"}}},{content:", url, ",props:{style:{color:"#C9D1D9"}}},{content:"headers",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"headers, ",props:{style:{color:"#C9D1D9"}}},{content:"data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"payload, ",props:{style:{color:"#C9D1D9"}}},{content:"files",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"files)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"print",props:{style:{color:"#79C0FF"}}},{content:"(response.text)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# 4. Get the uploaded file path from the response",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"uploaded_data ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" response.json()",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"uploaded_path ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" uploaded_data.get(",props:{style:{color:"#C9D1D9"}}},{content:"'path'",props:{style:{color:"#A5D6FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# 5. Call the Langflow run endpoint with the uploaded file path",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"run_url ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"run_payload ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "input_value"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"CHAT_INPUT"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "output_type"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"chat"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "input_type"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"chat"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "tweaks"',props:{style:{color:"#A5D6FF"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "FILE_COMPONENT_ID"',props:{style:{color:"#A5D6FF"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "path"',props:{style:{color:"#A5D6FF"}}},{content:": uploaded_path",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"run_headers ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" 'Content-Type'",props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"'application/json'",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" 'Accept'",props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"'application/json'",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" 'x-api-key'",props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"'LANGFLOW_API_KEY'",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"run_response ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" requests.post(run_url, ",props:{style:{color:"#C9D1D9"}}},{content:"headers",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"run_headers, ",props:{style:{color:"#C9D1D9"}}},{content:"data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"json.dumps(run_payload))",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"langflow_data ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" run_response.json()",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# Output only the message",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"message ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"None",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:"try",props:{style:{color:"#FF7B72"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" message ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" langflow_data[",props:{style:{color:"#C9D1D9"}}},{content:"'outputs'",props:{style:{color:"#A5D6FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:"0",props:{style:{color:"#79C0FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:"'outputs'",props:{style:{color:"#A5D6FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:"0",props:{style:{color:"#79C0FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:"'results'",props:{style:{color:"#A5D6FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:"'message'",props:{style:{color:"#A5D6FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:"'data'",props:{style:{color:"#A5D6FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:"'text'",props:{style:{color:"#A5D6FF"}}},{content:"]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"except",props:{style:{color:"#FF7B72"}}},{content:" (",props:{style:{color:"#C9D1D9"}}},{content:"KeyError",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"IndexError",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"TypeError",props:{style:{color:"#79C0FF"}}},{content:"):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" pass",props:{style:{color:"#FF7B72"}}}]},{tokens:[{content:"print",props:{style:{color:"#79C0FF"}}},{content:"(message)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(t.p,{children:"This script contains two requests."}),"\n",(0,s.jsxs)(t.p,{children:["The first request uploads a file, such as ",(0,s.jsx)(t.code,{children:"fake-resume.txt"}),", to your Langflow server at the ",(0,s.jsx)(t.code,{children:"/v2/files"})," endpoint. This request returns a file path that can be referenced in subsequent Langflow requests, such as ",(0,s.jsx)(t.code,{children:"02791d46-812f-4988-ab1c-7c430214f8d5/fake-resume.txt"})]}),"\n",(0,s.jsxs)(t.p,{children:["The second request sends a chat message to the Langflow flow at the ",(0,s.jsx)(t.code,{children:"/v1/run/"})," endpoint.\nThe ",(0,s.jsx)(t.code,{children:"tweaks"})," parameter includes the path to the uploaded file as the variable ",(0,s.jsx)(t.code,{children:"uploaded_path"}),", and sends this file directly to the File component."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"Save and run the script to send the requests and test the flow."}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Response"}),(0,s.jsx)(t.p,{children:"The following is an example of a response returned from this tutorial's flow. Due to the nature of LLMs and variations in your inputs, your response might be different."}),(0,s.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:'{"id":"793ba3d8-5e7a-4499-8b89-d9a7b6325fee","name":"fake-resume (1)","path":"02791d46-812f-4988-ab1c-7c430214f8d5/fake-resume.txt","size":1779,"provider":null}',props:{}}]},{tokens:[{content:"The resume for Emily J. Wilson presents a strong candidate for a position in your Marketing department. Here are some key points to consider:",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"### Strengths:",props:{}}]},{tokens:[{content:"1. **Experience**: With over 8 years in marketing, Emily has held progressively responsible positions, culminating in her current role as Marketing Director. This indicates a solid foundation in the field.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"2. **Quantifiable Achievements**: The resume highlights specific accomplishments, such as a 25% increase in brand recognition and a 30% sales increase after launching new product lines. These metrics demonstrate her ability to drive results.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"3. **Diverse Skill Set**: Emily's skills encompass various aspects of marketing, including strategy development, team management, social media marketing, event planning, and data analysis. This versatility can be beneficial in a dynamic marketing environment.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"4. **Educational Background**: Her MBA and a Bachelor's degree in Marketing provide a strong academic foundation, which is often valued in marketing roles.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"5. **Certifications**: The Certified Marketing Professional (CMP) and Google Analytics Certification indicate a commitment to professional development and staying current with industry standards.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"### Areas for Improvement:",props:{}}]},{tokens:[{content:"1. **Specificity in Skills**: While the skills listed are relevant, providing examples of how she has applied these skills in her previous roles could strengthen her resume further.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"2. **References**: While stating that references are available upon request is standard, including a couple of testimonials or notable endorsements could enhance credibility.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"3. **Formatting**: Ensure that the resume is visually appealing and easy to read. Clear headings and bullet points help in quickly identifying key information.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"### Conclusion:",props:{}}]},{tokens:[{content:"Overall, Emily J. Wilson's resume reflects a well-rounded marketing professional with a proven track record of success. If her experience aligns with the specific needs of your Marketing department, she could be a valuable addition to your team. Consider inviting her for an interview to further assess her fit for the role.",props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n",(0,s.jsx)(t.p,{children:"The initial output contains the JSON response object from the file upload endpoint, including the internal path where Langflow stores the file."}),"\n",(0,s.jsx)(t.p,{children:"The LLM then retrieves this file and evaluates its content, in this case the suitability of the resume for a job position."}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,s.jsx)(t.p,{children:"To process multiple files in a single flow run, add a separate File component for each file you want to ingest. Then, modify your script to upload each file, retrieve each returned file path, and then pass a unique file path to each File component ID."}),"\n",(0,s.jsxs)(t.p,{children:["For example, you can modify ",(0,s.jsx)(t.code,{children:"tweaks"})," to accept multiple file components.\nThe following code is just an example; it is not working code:"]}),"\n",(0,s.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"## set multiple file paths",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"file_paths ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" FILE_COMPONENT_1",props:{style:{color:"#79C0FF"}}},{content:": uploaded_path_1,",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" FILE_COMPONENT_2",props:{style:{color:"#79C0FF"}}},{content:": uploaded_path_2",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"chat_with_flow",props:{style:{color:"#D2A8FF"}}},{content:"(input_message, file_paths):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' """Compare the contents of these two files."""',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" run_url ",props:{style:{color:"#C9D1D9"}}},{content:"= f",props:{style:{color:"#FF7B72"}}},{content:'"',props:{style:{color:"#A5D6FF"}}},{content:"{LANGFLOW_SERVER_ADDRESS}",props:{style:{color:"#79C0FF"}}},{content:"/api/v1/run/",props:{style:{color:"#A5D6FF"}}},{content:"{FLOW_ID}",props:{style:{color:"#79C0FF"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" # Prepare tweaks with both file paths",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" tweaks ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" for",props:{style:{color:"#FF7B72"}}},{content:" component_id, file_path ",props:{style:{color:"#C9D1D9"}}},{content:"in",props:{style:{color:"#FF7B72"}}},{content:" file_paths.items():",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" tweaks[component_id] ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}},{content:'"path"',props:{style:{color:"#A5D6FF"}}},{content:": file_path}",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsxs)(t.p,{children:["To upload files from another machine that is not your local environment, your Langflow server must first be accessible over the internet. Then, authenticated users can upload files your public Langflow server's ",(0,s.jsx)(t.code,{children:"/v2/files/"})," endpoint, as shown in the tutorial. For more information, see ",(0,s.jsx)(t.a,{href:"/deployment-overview",children:"Langflow deployment overview"}),"."]})]})}function f(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(y,{...e})}):y(e)}function D(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},87481:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/files/fake-resume-fa337cbdb18306bd29e3168f73409745.txt"}}]); \ No newline at end of file diff --git a/assets/js/2fc7e024.c3e6f8b7.js b/assets/js/2fc7e024.c3e6f8b7.js new file mode 100644 index 0000000000..0d23f4900c --- /dev/null +++ b/assets/js/2fc7e024.c3e6f8b7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[1408],{11470:(e,t,o)=>{o.d(t,{A:()=>C});var n=o(96540),s=o(18215),r=o(23104),l=o(56347),c=o(205),a=o(57485),i=o(31682),p=o(70679);function d(e){return n.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)})?.filter(Boolean)??[]}function h(e){const{values:t,children:o}=e;return(0,n.useMemo)(()=>{const e=t??function(e){return d(e).map(({props:{value:e,label:t,attributes:o,default:n}})=>({value:e,label:t,attributes:o,default:n}))}(o);return function(e){const t=(0,i.XI)(e,(e,t)=>e.value===t.value);if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map(e=>e.value).join(", ")}" found in . Every value needs to be unique.`)}(e),e},[t,o])}function u({value:e,tabValues:t}){return t.some(t=>t.value===e)}function y({queryString:e=!1,groupId:t}){const o=(0,l.W6)(),s=function({queryString:e=!1,groupId:t}){if("string"==typeof e)return e;if(!1===e)return null;if(!0===e&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:e,groupId:t});return[(0,a.aZ)(s),(0,n.useCallback)(e=>{if(!s)return;const t=new URLSearchParams(o.location.search);t.set(s,e),o.replace({...o.location,search:t.toString()})},[s,o])]}function f(e){const{defaultValue:t,queryString:o=!1,groupId:s}=e,r=h(e),[l,a]=(0,n.useState)(()=>function({defaultValue:e,tabValues:t}){if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(e){if(!u({value:e,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${e}" but none of its children has the corresponding value. Available values are: ${t.map(e=>e.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return e}const o=t.find(e=>e.default)??t[0];if(!o)throw new Error("Unexpected error: 0 tabValues");return o.value}({defaultValue:t,tabValues:r})),[i,d]=y({queryString:o,groupId:s}),[f,D]=function({groupId:e}){const t=function(e){return e?`docusaurus.tab.${e}`:null}(e),[o,s]=(0,p.Dv)(t);return[o,(0,n.useCallback)(e=>{t&&s.set(e)},[t,s])]}({groupId:s}),m=(()=>{const e=i??f;return u({value:e,tabValues:r})?e:null})();(0,c.A)(()=>{m&&a(m)},[m]);return{selectedValue:l,selectValue:(0,n.useCallback)(e=>{if(!u({value:e,tabValues:r}))throw new Error(`Can't select invalid tab value=${e}`);a(e),d(e),D(e)},[d,D,r]),tabValues:r}}var D=o(92303);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=o(74848);function F({className:e,block:t,selectedValue:o,selectValue:n,tabValues:l}){const c=[],{blockElementScrollPositionUntilNextRender:a}=(0,r.a_)(),i=e=>{const t=e.currentTarget,s=c.indexOf(t),r=l[s].value;r!==o&&(a(t),n(r))},p=e=>{let t=null;switch(e.key){case"Enter":i(e);break;case"ArrowRight":{const o=c.indexOf(e.currentTarget)+1;t=c[o]??c[0];break}case"ArrowLeft":{const o=c.indexOf(e.currentTarget)-1;t=c[o]??c[c.length-1];break}}t?.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":t},e),children:l.map(({value:e,label:t,attributes:n})=>(0,g.jsx)("li",{role:"tab",tabIndex:o===e?0:-1,"aria-selected":o===e,ref:e=>{c.push(e)},onKeyDown:p,onClick:i,...n,className:(0,s.A)("tabs__item",m.tabItem,n?.className,{"tabs__item--active":o===e}),children:t??e},e))})}function k({lazy:e,children:t,selectedValue:o}){const r=(Array.isArray(t)?t:[t]).filter(Boolean);if(e){const e=r.find(e=>e.props.value===o);return e?(0,n.cloneElement)(e,{className:(0,s.A)("margin-top--md",e.props.className)}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:r.map((e,t)=>(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==o}))})}function x(e){const t=f(e);return(0,g.jsxs)("div",{className:(0,s.A)("tabs-container",m.tabList),children:[(0,g.jsx)(F,{...t,...e}),(0,g.jsx)(k,{...t,...e})]})}function C(e){const t=(0,D.A)();return(0,g.jsx)(x,{...e,children:d(e.children)},String(t))}},17886:(e,t,o)=>{o.d(t,{A:()=>r});o(96540);var n=o(64058),s=o(74848);function r({name:e,...t}){const o=n[e];return o?(0,s.jsx)(o,{...t}):null}},19365:(e,t,o)=>{o.d(t,{A:()=>l});o(96540);var n=o(18215);const s={tabItem:"tabItem_Ymn6"};var r=o(74848);function l({children:e,hidden:t,className:o}){return(0,r.jsx)("div",{role:"tabpanel",className:(0,n.A)(s.tabItem,o),hidden:t,children:e})}},47617:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/tutorial-chat-file-loader-099f2f4c5e4343412557b1a78c4b9209.png"},57844:(e,t,o)=>{o.r(t),o.d(t,{CH:()=>d,assets:()=>p,chCodeConfig:()=>h,contentTitle:()=>i,default:()=>f,frontMatter:()=>a,metadata:()=>n,toc:()=>u});const n=JSON.parse('{"id":"Tutorials/chat-with-files","title":"Create a chatbot that can ingest files","description":"This tutorial shows you how to build a chatbot that can read and answer questions about files you upload, such as meeting notes or job applications.","source":"@site/docs/Tutorials/chat-with-files.mdx","sourceDirName":"Tutorials","slug":"/chat-with-files","permalink":"/chat-with-files","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Create a chatbot that can ingest files","slug":"/chat-with-files"},"sidebar":"docs","previous":{"title":"Create a vector RAG chatbot","permalink":"/chat-with-rag"},"next":{"title":"Connect applications to agents","permalink":"/agent-tutorial"}}');var s=o(74848),r=o(28453),l=o(24754),c=o(17886);o(11470),o(19365);const a={title:"Create a chatbot that can ingest files",slug:"/chat-with-files"},i=void 0,p={},d={annotations:l.hk,Code:l.Cy},h={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},u=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Create a flow that accepts file input",id:"create-a-flow-that-accepts-file-input",level:2},{value:"Send requests to your flow from a Python application",id:"send-requests-to-your-flow-from-a-python-application",level:2},{value:"Next steps",id:"next-steps",level:2}];function y(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components},{Details:n}=t;return d||D("CH",!1),d.Code||D("CH.Code",!0),n||D("Details",!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","\n",(0,s.jsx)(t.p,{children:"This tutorial shows you how to build a chatbot that can read and answer questions about files you upload, such as meeting notes or job applications."}),"\n",(0,s.jsx)(t.p,{children:"For example, you could upload a contract and ask, \u201cWhat are the termination clauses in this agreement?\u201d Or upload a resume and ask, \u201cDoes this candidate have experience with marketing analytics?\u201d"}),"\n",(0,s.jsx)(t.p,{children:"The main focus of this tutorial is to show you how to provide files as input to a Langflow flow, so your chatbot can use the content of those files in its responses."}),"\n",(0,s.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"/get-started-installation",children:"A running Langflow instance"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"/configuration-api-keys",children:"A Langflow API key"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"https://platform.openai.com/api-keys",children:"An OpenAI API key"})}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"This tutorial uses an OpenAI LLM. If you want to use a different provider, you need a valid credential for that provider."}),"\n",(0,s.jsx)(t.h2,{id:"create-a-flow-that-accepts-file-input",children:"Create a flow that accepts file input"}),"\n",(0,s.jsxs)(t.p,{children:["To ingest files, your flow must have a ",(0,s.jsx)(t.strong,{children:"File"})," component attached to a component that receives input, such as a ",(0,s.jsx)(t.strong,{children:"Prompt"})," or ",(0,s.jsx)(t.strong,{children:"Agent"})," component."]}),"\n",(0,s.jsxs)(t.p,{children:["The following steps modify the ",(0,s.jsx)(t.a,{href:"/basic-prompting",children:(0,s.jsx)(t.strong,{children:"Basic prompting"})})," template to accept file input:"]}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["In Langflow, click ",(0,s.jsx)(t.strong,{children:"New Flow"}),", and then select the ",(0,s.jsx)(t.strong,{children:"Basic prompting"})," template."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["In the ",(0,s.jsx)(t.strong,{children:"Language Model"})," component, enter your OpenAI API key."]}),"\n",(0,s.jsxs)(t.p,{children:["If you want to use a different provider or model, edit the ",(0,s.jsx)(t.strong,{children:"Model Provider"}),", ",(0,s.jsx)(t.strong,{children:"Model Name"}),", and ",(0,s.jsx)(t.strong,{children:"API Key"})," fields accordingly."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["To verify that your API key is valid, click ",(0,s.jsx)(c.A,{name:"Play","aria-hidden":"true"})," ",(0,s.jsx)(t.strong,{children:"Playground"}),", and then ask the LLM a question.\nThe LLM should respond according to the specifications in the ",(0,s.jsx)(t.strong,{children:"Prompt"})," component's ",(0,s.jsx)(t.strong,{children:"Template"})," field."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Exit the ",(0,s.jsx)(t.strong,{children:"Playground"}),", and then modify the ",(0,s.jsx)(t.strong,{children:"Prompt"})," component to accept file input in addition to chat input.\nTo do this, edit the ",(0,s.jsx)(t.strong,{children:"Template"})," field, and then replace the default prompt with the following text:"]}),"\n",(0,s.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"ChatInput:",props:{}}]},{tokens:[{content:"{chat-input}",props:{}}]},{tokens:[{content:"File:",props:{}}]},{tokens:[{content:"{file}",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.strong,{children:"Prompt"})," component gets a new input port for each value in curly braces. At this point, your ",(0,s.jsx)(t.strong,{children:"Prompt"})," component should have ",(0,s.jsx)(t.strong,{children:"chat-input"})," and ",(0,s.jsx)(t.strong,{children:"file"})," input ports."]}),"\n",(0,s.jsx)(t.admonition,{type:"tip",children:(0,s.jsx)(t.p,{children:"Within the curly braces, you can use any port name you like. For this tutorial, the ports are named after the components that connect to them."})}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Add a ",(0,s.jsx)(t.a,{href:"/components-data#file",children:"File component"})," to the flow, and then connect the ",(0,s.jsx)(t.strong,{children:"Raw Content"})," output port to the Prompt component's ",(0,s.jsx)(t.strong,{children:"file"})," input port.\nTo connect ports, click and drag from one port to the other."]}),"\n",(0,s.jsx)(t.p,{children:"You can add files directly to the file component to pre-load input before running the flow, or you can load files at runtime. The next section of this tutorial covers runtime file uploads."}),"\n",(0,s.jsx)(t.p,{children:"At this point your flow has five components. The Chat Input and File components are connected to the Prompt component's input ports. Then, the Prompt component's output port is connected to the Language Model component's input port. Finally, the Language Model component's output port is connected to the Chat Output component, which returns the final response to the user."}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"File loader chat flow",src:o(47617).A+"",width:"4000",height:"1564"})}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"send-requests-to-your-flow-from-a-python-application",children:"Send requests to your flow from a Python application"}),"\n",(0,s.jsx)(t.p,{children:"This section of the tutorial demonstrates how you can send file input to a flow from an application."}),"\n",(0,s.jsxs)(t.p,{children:["To do this, your application must send a ",(0,s.jsx)(t.code,{children:"POST /run"})," request to your Langflow server with the file you want to upload and a text prompt.\nThe result includes the outcome of the flow run and the LLM's response."]}),"\n",(0,s.jsxs)(t.p,{children:["This example uses a local Langflow instance, and it asks the LLM to evaluate a sample resume.\nIf you don't have a resume on hand, you can download ",(0,s.jsx)(t.a,{target:"_blank","data-noBrokenLinkCheck":!0,href:o(87481).A+"",children:"fake-resume.txt"}),"."]}),"\n",(0,s.jsx)(t.admonition,{type:"tip",children:(0,s.jsxs)(t.p,{children:["For help with constructing file upload requests in Python, JavaScript, and curl, see the ",(0,s.jsx)(t.a,{href:"https://langflow-file-upload-examples.onrender.com",children:"Langflow File Upload Utility"}),"."]})}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"To construct the request, gather the following information:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"LANGFLOW_SERVER_ADDRESS"}),": Your Langflow server's domain. The default value is ",(0,s.jsx)(t.code,{children:"127.0.0.1:7860"}),". You can get this value from the code snippets on your flow's ",(0,s.jsxs)(t.a,{href:"/concepts-publish#api-access",children:[(0,s.jsx)(t.strong,{children:"API access"})," pane"]}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"FLOW_ID"}),": Your flow's UUID or custom endpoint name. You can get this value from the code snippets on your flow's ",(0,s.jsxs)(t.a,{href:"/concepts-publish#api-access",children:[(0,s.jsx)(t.strong,{children:"API access"})," pane"]}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"FILE_COMPONENT_ID"}),": The UUID of the File component in your flow, such as ",(0,s.jsx)(t.code,{children:"File-KZP68"}),". To find the component ID, open your flow in Langflow, click the File component, and then click ",(0,s.jsx)(t.strong,{children:"Controls"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"CHAT_INPUT"}),": The message you want to send to the Chat Input of your flow, such as ",(0,s.jsx)(t.code,{children:"Evaluate this resume for a job opening in my Marketing department."})]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"FILE_NAME"})," and ",(0,s.jsx)(t.code,{children:"FILE_PATH"}),": The name and path to the local file that you want to send to your flow."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"LANGFLOW_API_KEY"}),": A valid Langflow API key. To create an API key, see ",(0,s.jsx)(t.a,{href:"/configuration-api-keys",children:"API keys"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"Copy the following script into a Python file, and then replace the placeholders with the information you gathered in the previous step:"}),"\n",(0,s.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"# Python example using requests",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" requests",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" json",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# 1. Set the upload URL",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"url ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"http://LANGFLOW_SERVER_ADDRESS/api/v2/files/"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# 2. Prepare the file and payload",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"payload ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"files ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" (",props:{style:{color:"#C9D1D9"}}},{content:"'file'",props:{style:{color:"#A5D6FF"}}},{content:", (",props:{style:{color:"#C9D1D9"}}},{content:"'FILE_PATH'",props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"open",props:{style:{color:"#79C0FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'FILE_NAME'",props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"'rb'",props:{style:{color:"#A5D6FF"}}},{content:"), ",props:{style:{color:"#C9D1D9"}}},{content:"'application/octet-stream'",props:{style:{color:"#A5D6FF"}}},{content:"))",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"headers ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" 'Accept'",props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"'application/json'",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" 'x-api-key'",props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"'LANGFLOW_API_KEY'",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# 3. Upload the file to Langflow",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"response ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" requests.request(",props:{style:{color:"#C9D1D9"}}},{content:'"POST"',props:{style:{color:"#A5D6FF"}}},{content:", url, ",props:{style:{color:"#C9D1D9"}}},{content:"headers",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"headers, ",props:{style:{color:"#C9D1D9"}}},{content:"data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"payload, ",props:{style:{color:"#C9D1D9"}}},{content:"files",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"files)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"print",props:{style:{color:"#79C0FF"}}},{content:"(response.text)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# 4. Get the uploaded file path from the response",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"uploaded_data ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" response.json()",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"uploaded_path ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" uploaded_data.get(",props:{style:{color:"#C9D1D9"}}},{content:"'path'",props:{style:{color:"#A5D6FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# 5. Call the Langflow run endpoint with the uploaded file path",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"run_url ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"run_payload ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "input_value"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"CHAT_INPUT"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "output_type"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"chat"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "input_type"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"chat"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "tweaks"',props:{style:{color:"#A5D6FF"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "FILE_COMPONENT_ID"',props:{style:{color:"#A5D6FF"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "path"',props:{style:{color:"#A5D6FF"}}},{content:": uploaded_path",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"run_headers ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" 'Content-Type'",props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"'application/json'",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" 'Accept'",props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"'application/json'",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" 'x-api-key'",props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"'LANGFLOW_API_KEY'",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"run_response ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" requests.post(run_url, ",props:{style:{color:"#C9D1D9"}}},{content:"headers",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"run_headers, ",props:{style:{color:"#C9D1D9"}}},{content:"data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"json.dumps(run_payload))",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"langflow_data ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" run_response.json()",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# Output only the message",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"message ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"None",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:"try",props:{style:{color:"#FF7B72"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" message ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" langflow_data[",props:{style:{color:"#C9D1D9"}}},{content:"'outputs'",props:{style:{color:"#A5D6FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:"0",props:{style:{color:"#79C0FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:"'outputs'",props:{style:{color:"#A5D6FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:"0",props:{style:{color:"#79C0FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:"'results'",props:{style:{color:"#A5D6FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:"'message'",props:{style:{color:"#A5D6FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:"'data'",props:{style:{color:"#A5D6FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:"'text'",props:{style:{color:"#A5D6FF"}}},{content:"]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"except",props:{style:{color:"#FF7B72"}}},{content:" (",props:{style:{color:"#C9D1D9"}}},{content:"KeyError",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"IndexError",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"TypeError",props:{style:{color:"#79C0FF"}}},{content:"):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" pass",props:{style:{color:"#FF7B72"}}}]},{tokens:[{content:"print",props:{style:{color:"#79C0FF"}}},{content:"(message)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(t.p,{children:"This script contains two requests."}),"\n",(0,s.jsxs)(t.p,{children:["The first request uploads a file, such as ",(0,s.jsx)(t.code,{children:"fake-resume.txt"}),", to your Langflow server at the ",(0,s.jsx)(t.code,{children:"/v2/files"})," endpoint. This request returns a file path that can be referenced in subsequent Langflow requests, such as ",(0,s.jsx)(t.code,{children:"02791d46-812f-4988-ab1c-7c430214f8d5/fake-resume.txt"})]}),"\n",(0,s.jsxs)(t.p,{children:["The second request sends a chat message to the Langflow flow at the ",(0,s.jsx)(t.code,{children:"/v1/run/"})," endpoint.\nThe ",(0,s.jsx)(t.code,{children:"tweaks"})," parameter includes the path to the uploaded file as the variable ",(0,s.jsx)(t.code,{children:"uploaded_path"}),", and sends this file directly to the File component."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"Save and run the script to send the requests and test the flow."}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Response"}),(0,s.jsx)(t.p,{children:"The following is an example of a response returned from this tutorial's flow. Due to the nature of LLMs and variations in your inputs, your response might be different."}),(0,s.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:'{"id":"793ba3d8-5e7a-4499-8b89-d9a7b6325fee","name":"fake-resume (1)","path":"02791d46-812f-4988-ab1c-7c430214f8d5/fake-resume.txt","size":1779,"provider":null}',props:{}}]},{tokens:[{content:"The resume for Emily J. Wilson presents a strong candidate for a position in your Marketing department. Here are some key points to consider:",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"### Strengths:",props:{}}]},{tokens:[{content:"1. **Experience**: With over 8 years in marketing, Emily has held progressively responsible positions, culminating in her current role as Marketing Director. This indicates a solid foundation in the field.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"2. **Quantifiable Achievements**: The resume highlights specific accomplishments, such as a 25% increase in brand recognition and a 30% sales increase after launching new product lines. These metrics demonstrate her ability to drive results.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"3. **Diverse Skill Set**: Emily's skills encompass various aspects of marketing, including strategy development, team management, social media marketing, event planning, and data analysis. This versatility can be beneficial in a dynamic marketing environment.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"4. **Educational Background**: Her MBA and a Bachelor's degree in Marketing provide a strong academic foundation, which is often valued in marketing roles.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"5. **Certifications**: The Certified Marketing Professional (CMP) and Google Analytics Certification indicate a commitment to professional development and staying current with industry standards.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"### Areas for Improvement:",props:{}}]},{tokens:[{content:"1. **Specificity in Skills**: While the skills listed are relevant, providing examples of how she has applied these skills in her previous roles could strengthen her resume further.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"2. **References**: While stating that references are available upon request is standard, including a couple of testimonials or notable endorsements could enhance credibility.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"3. **Formatting**: Ensure that the resume is visually appealing and easy to read. Clear headings and bullet points help in quickly identifying key information.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"### Conclusion:",props:{}}]},{tokens:[{content:"Overall, Emily J. Wilson's resume reflects a well-rounded marketing professional with a proven track record of success. If her experience aligns with the specific needs of your Marketing department, she could be a valuable addition to your team. Consider inviting her for an interview to further assess her fit for the role.",props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n",(0,s.jsx)(t.p,{children:"The initial output contains the JSON response object from the file upload endpoint, including the internal path where Langflow stores the file."}),"\n",(0,s.jsx)(t.p,{children:"The LLM then retrieves this file and evaluates its content, in this case the suitability of the resume for a job position."}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,s.jsx)(t.p,{children:"To process multiple files in a single flow run, add a separate File component for each file you want to ingest. Then, modify your script to upload each file, retrieve each returned file path, and then pass a unique file path to each File component ID."}),"\n",(0,s.jsxs)(t.p,{children:["For example, you can modify ",(0,s.jsx)(t.code,{children:"tweaks"})," to accept multiple file components.\nThe following code is just an example; it is not working code:"]}),"\n",(0,s.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"## set multiple file paths",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"file_paths ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" FILE_COMPONENT_1",props:{style:{color:"#79C0FF"}}},{content:": uploaded_path_1,",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" FILE_COMPONENT_2",props:{style:{color:"#79C0FF"}}},{content:": uploaded_path_2",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"chat_with_flow",props:{style:{color:"#D2A8FF"}}},{content:"(input_message, file_paths):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' """Compare the contents of these two files."""',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" run_url ",props:{style:{color:"#C9D1D9"}}},{content:"= f",props:{style:{color:"#FF7B72"}}},{content:'"',props:{style:{color:"#A5D6FF"}}},{content:"{LANGFLOW_SERVER_ADDRESS}",props:{style:{color:"#79C0FF"}}},{content:"/api/v1/run/",props:{style:{color:"#A5D6FF"}}},{content:"{FLOW_ID}",props:{style:{color:"#79C0FF"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" # Prepare tweaks with both file paths",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" tweaks ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" for",props:{style:{color:"#FF7B72"}}},{content:" component_id, file_path ",props:{style:{color:"#C9D1D9"}}},{content:"in",props:{style:{color:"#FF7B72"}}},{content:" file_paths.items():",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" tweaks[component_id] ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}},{content:'"path"',props:{style:{color:"#A5D6FF"}}},{content:": file_path}",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsxs)(t.p,{children:["To upload files from another machine that is not your local environment, your Langflow server must first be accessible over the internet. Then, authenticated users can upload files your public Langflow server's ",(0,s.jsx)(t.code,{children:"/v2/files/"})," endpoint, as shown in the tutorial. For more information, see ",(0,s.jsx)(t.a,{href:"/deployment-overview",children:"Langflow deployment overview"}),"."]})]})}function f(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(y,{...e})}):y(e)}function D(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},87481:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/files/fake-resume-fa337cbdb18306bd29e3168f73409745.txt"}}]); \ No newline at end of file diff --git a/assets/js/6ef91a5f.00b34005.js b/assets/js/6ef91a5f.00b34005.js deleted file mode 100644 index 54eefe0d93..0000000000 --- a/assets/js/6ef91a5f.00b34005.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[4056],{17886:(e,n,t)=>{t.d(n,{A:()=>o});t(96540);var r=t(64058),i=t(74848);function o({name:e,...n}){const t=r[e];return t?(0,i.jsx)(t,{...n}):null}},57709:(e,n,t)=>{t.r(n),t.d(n,{CH:()=>h,assets:()=>l,chCodeConfig:()=>p,contentTitle:()=>d,default:()=>m,frontMatter:()=>a,metadata:()=>r,toc:()=>g});const r=JSON.parse('{"id":"Templates/basic-prompting","title":"Basic prompting","description":"This flow is a starting point for understanding Langflow.","source":"@site/docs/Templates/basic-prompting.mdx","sourceDirName":"Templates","slug":"/basic-prompting","permalink":"/basic-prompting","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Basic prompting","slug":"/basic-prompting"},"sidebar":"docs","previous":{"title":"Connect applications to agents","permalink":"/agent-tutorial"},"next":{"title":"Simple agent","permalink":"/simple-agent"}}');var i=t(74848),o=t(28453),s=t(24754),c=t(17886);const a={title:"Basic prompting",slug:"/basic-prompting"},d=void 0,l={},h={annotations:s.hk,Code:s.Cy},p={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},g=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Create the basic prompting flow",id:"create-the-basic-prompting-flow",level:2},{value:"Run the basic prompting flow",id:"run-the-basic-prompting-flow",level:2},{value:"Modify the prompt for a different result",id:"modify-the-prompt-for-a-different-result",level:2}];function u(e){const n={a:"a",code:"code",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return h||f("CH",!1),h.Code||f("CH.Code",!0),(0,i.jsxs)(i.Fragment,{children:[(0,i.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","\n",(0,i.jsx)(n.p,{children:"This flow is a starting point for understanding Langflow.\nThe flow demonstrates how to chat with an LLM, and how modifying the prompt can affect your outcomes."}),"\n",(0,i.jsx)(n.p,{children:"Prompts serve as the inputs to a large language model (LLM), acting as the interface between human instructions and computational tasks."}),"\n",(0,i.jsx)(n.p,{children:"By submitting natural language requests in a prompt to an LLM, you can obtain answers, generate text, and solve problems."}),"\n",(0,i.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/get-started-installation",children:"A running Langflow instance"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://platform.openai.com/",children:"An OpenAI API key"})}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"create-the-basic-prompting-flow",children:"Create the basic prompting flow"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["From the Langflow dashboard, click ",(0,i.jsx)(n.strong,{children:"New Flow"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Select ",(0,i.jsx)(n.strong,{children:"Basic Prompting"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.strong,{children:"Basic Prompting"})," flow is created."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Basic prompting flow",src:t(90567).A+"",width:"4000",height:"2048"})}),"\n",(0,i.jsxs)(n.p,{children:["This flow allows you to chat with the ",(0,i.jsx)(n.strong,{children:"OpenAI model"})," component.\nThe model will respond according to the prompt constructed in the ",(0,i.jsx)(n.strong,{children:"Prompt"})," component."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["To examine the ",(0,i.jsx)(n.strong,{children:"Template"}),", in the ",(0,i.jsx)(n.strong,{children:"Prompt"})," component, click the ",(0,i.jsx)(n.strong,{children:"Template"})," field."]}),"\n",(0,i.jsx)(h.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Answer the user as if you were a GenAI expert, enthusiastic about helping them get started building something fresh.",props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["To create an environment variable for the ",(0,i.jsx)(n.strong,{children:"OpenAI"})," component, in the ",(0,i.jsx)(n.strong,{children:"OpenAI API Key"})," field, click the ",(0,i.jsx)(c.A,{name:"Globe","aria-hidden":"true"})," ",(0,i.jsx)(n.strong,{children:"Globe"})," button, and then click ",(0,i.jsx)(n.strong,{children:"Add New Variable"}),"."]}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["In the ",(0,i.jsx)(n.strong,{children:"Variable Name"})," field, enter ",(0,i.jsx)(n.code,{children:"openai_api_key"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["In the ",(0,i.jsx)(n.strong,{children:"Value"})," field, paste your OpenAI API Key (",(0,i.jsx)(n.code,{children:"sk-..."}),")."]}),"\n",(0,i.jsxs)(n.li,{children:["Click ",(0,i.jsx)(n.strong,{children:"Save Variable"}),"."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"run-the-basic-prompting-flow",children:"Run the basic prompting flow"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["Click the ",(0,i.jsx)(n.strong,{children:"Playground"})," button."]}),"\n",(0,i.jsx)(n.li,{children:"Type a message and press Enter. The bot should respond in a markedly piratical manner!"}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"modify-the-prompt-for-a-different-result",children:"Modify the prompt for a different result"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["To modify your prompt results, in the ",(0,i.jsx)(n.strong,{children:"Prompt"})," component, click the ",(0,i.jsx)(n.strong,{children:"Template"})," field. The ",(0,i.jsx)(n.strong,{children:"Edit Prompt"})," window opens."]}),"\n",(0,i.jsxs)(n.li,{children:["Change the existing prompt to a different character, perhaps ",(0,i.jsx)(n.code,{children:"Answer the user as if you were Hermione Granger."})]}),"\n",(0,i.jsx)(n.li,{children:"Run the workflow again and notice how the prompt changes the model's response."}),"\n"]})]})}function m(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(u,{...e})}):u(e)}function f(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},90567:(e,n,t)=>{t.d(n,{A:()=>r});const r=t.p+"assets/images/starter-flow-basic-prompting-cb8ac9bc6fff2f00d0abef7727abf0ec.png"}}]); \ No newline at end of file diff --git a/assets/js/6ef91a5f.7b2cb763.js b/assets/js/6ef91a5f.7b2cb763.js new file mode 100644 index 0000000000..156d513b16 --- /dev/null +++ b/assets/js/6ef91a5f.7b2cb763.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[4056],{17886:(e,n,t)=>{t.d(n,{A:()=>o});t(96540);var r=t(64058),i=t(74848);function o({name:e,...n}){const t=r[e];return t?(0,i.jsx)(t,{...n}):null}},57709:(e,n,t)=>{t.r(n),t.d(n,{CH:()=>h,assets:()=>l,chCodeConfig:()=>p,contentTitle:()=>d,default:()=>m,frontMatter:()=>a,metadata:()=>r,toc:()=>g});const r=JSON.parse('{"id":"Templates/basic-prompting","title":"Basic prompting","description":"This flow is a starting point for understanding Langflow.","source":"@site/docs/Templates/basic-prompting.mdx","sourceDirName":"Templates","slug":"/basic-prompting","permalink":"/basic-prompting","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Basic prompting","slug":"/basic-prompting"},"sidebar":"docs","previous":{"title":"Connect to MCP servers from your application","permalink":"/mcp-tutorial"},"next":{"title":"Simple agent","permalink":"/simple-agent"}}');var i=t(74848),o=t(28453),s=t(24754),c=t(17886);const a={title:"Basic prompting",slug:"/basic-prompting"},d=void 0,l={},h={annotations:s.hk,Code:s.Cy},p={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},g=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Create the basic prompting flow",id:"create-the-basic-prompting-flow",level:2},{value:"Run the basic prompting flow",id:"run-the-basic-prompting-flow",level:2},{value:"Modify the prompt for a different result",id:"modify-the-prompt-for-a-different-result",level:2}];function u(e){const n={a:"a",code:"code",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return h||f("CH",!1),h.Code||f("CH.Code",!0),(0,i.jsxs)(i.Fragment,{children:[(0,i.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","\n",(0,i.jsx)(n.p,{children:"This flow is a starting point for understanding Langflow.\nThe flow demonstrates how to chat with an LLM, and how modifying the prompt can affect your outcomes."}),"\n",(0,i.jsx)(n.p,{children:"Prompts serve as the inputs to a large language model (LLM), acting as the interface between human instructions and computational tasks."}),"\n",(0,i.jsx)(n.p,{children:"By submitting natural language requests in a prompt to an LLM, you can obtain answers, generate text, and solve problems."}),"\n",(0,i.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"/get-started-installation",children:"A running Langflow instance"})}),"\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://platform.openai.com/",children:"An OpenAI API key"})}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"create-the-basic-prompting-flow",children:"Create the basic prompting flow"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["From the Langflow dashboard, click ",(0,i.jsx)(n.strong,{children:"New Flow"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Select ",(0,i.jsx)(n.strong,{children:"Basic Prompting"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.strong,{children:"Basic Prompting"})," flow is created."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"Basic prompting flow",src:t(90567).A+"",width:"4000",height:"2048"})}),"\n",(0,i.jsxs)(n.p,{children:["This flow allows you to chat with the ",(0,i.jsx)(n.strong,{children:"OpenAI model"})," component.\nThe model will respond according to the prompt constructed in the ",(0,i.jsx)(n.strong,{children:"Prompt"})," component."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["To examine the ",(0,i.jsx)(n.strong,{children:"Template"}),", in the ",(0,i.jsx)(n.strong,{children:"Prompt"})," component, click the ",(0,i.jsx)(n.strong,{children:"Template"})," field."]}),"\n",(0,i.jsx)(h.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Answer the user as if you were a GenAI expert, enthusiastic about helping them get started building something fresh.",props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["To create an environment variable for the ",(0,i.jsx)(n.strong,{children:"OpenAI"})," component, in the ",(0,i.jsx)(n.strong,{children:"OpenAI API Key"})," field, click the ",(0,i.jsx)(c.A,{name:"Globe","aria-hidden":"true"})," ",(0,i.jsx)(n.strong,{children:"Globe"})," button, and then click ",(0,i.jsx)(n.strong,{children:"Add New Variable"}),"."]}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["In the ",(0,i.jsx)(n.strong,{children:"Variable Name"})," field, enter ",(0,i.jsx)(n.code,{children:"openai_api_key"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["In the ",(0,i.jsx)(n.strong,{children:"Value"})," field, paste your OpenAI API Key (",(0,i.jsx)(n.code,{children:"sk-..."}),")."]}),"\n",(0,i.jsxs)(n.li,{children:["Click ",(0,i.jsx)(n.strong,{children:"Save Variable"}),"."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"run-the-basic-prompting-flow",children:"Run the basic prompting flow"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["Click the ",(0,i.jsx)(n.strong,{children:"Playground"})," button."]}),"\n",(0,i.jsx)(n.li,{children:"Type a message and press Enter. The bot should respond in a markedly piratical manner!"}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"modify-the-prompt-for-a-different-result",children:"Modify the prompt for a different result"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["To modify your prompt results, in the ",(0,i.jsx)(n.strong,{children:"Prompt"})," component, click the ",(0,i.jsx)(n.strong,{children:"Template"})," field. The ",(0,i.jsx)(n.strong,{children:"Edit Prompt"})," window opens."]}),"\n",(0,i.jsxs)(n.li,{children:["Change the existing prompt to a different character, perhaps ",(0,i.jsx)(n.code,{children:"Answer the user as if you were Hermione Granger."})]}),"\n",(0,i.jsx)(n.li,{children:"Run the workflow again and notice how the prompt changes the model's response."}),"\n"]})]})}function m(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(u,{...e})}):u(e)}function f(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},90567:(e,n,t)=>{t.d(n,{A:()=>r});const r=t.p+"assets/images/starter-flow-basic-prompting-cb8ac9bc6fff2f00d0abef7727abf0ec.png"}}]); \ No newline at end of file diff --git a/assets/js/b079b393.6026cd15.js b/assets/js/b079b393.6026cd15.js new file mode 100644 index 0000000000..485e6ffb8f --- /dev/null +++ b/assets/js/b079b393.6026cd15.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[3240],{11470:(o,e,t)=>{t.d(e,{A:()=>j});var n=t(96540),s=t(18215),r=t(23104),c=t(56347),l=t(205),p=t(57485),a=t(31682),i=t(70679);function d(o){return n.Children.toArray(o).filter(o=>"\n"!==o).map(o=>{if(!o||(0,n.isValidElement)(o)&&function(o){const{props:e}=o;return!!e&&"object"==typeof e&&"value"in e}(o))return o;throw new Error(`Docusaurus error: Bad child <${"string"==typeof o.type?o.type:o.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)})?.filter(Boolean)??[]}function h(o){const{values:e,children:t}=o;return(0,n.useMemo)(()=>{const o=e??function(o){return d(o).map(({props:{value:o,label:e,attributes:t,default:n}})=>({value:o,label:e,attributes:t,default:n}))}(t);return function(o){const e=(0,a.XI)(o,(o,e)=>o.value===e.value);if(e.length>0)throw new Error(`Docusaurus error: Duplicate values "${e.map(o=>o.value).join(", ")}" found in . Every value needs to be unique.`)}(o),o},[e,t])}function u({value:o,tabValues:e}){return e.some(e=>e.value===o)}function y({queryString:o=!1,groupId:e}){const t=(0,c.W6)(),s=function({queryString:o=!1,groupId:e}){if("string"==typeof o)return o;if(!1===o)return null;if(!0===o&&!e)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return e??null}({queryString:o,groupId:e});return[(0,p.aZ)(s),(0,n.useCallback)(o=>{if(!s)return;const e=new URLSearchParams(t.location.search);e.set(s,o),t.replace({...t.location,search:e.toString()})},[s,t])]}function D(o){const{defaultValue:e,queryString:t=!1,groupId:s}=o,r=h(o),[c,p]=(0,n.useState)(()=>function({defaultValue:o,tabValues:e}){if(0===e.length)throw new Error("Docusaurus error: the component requires at least one children component");if(o){if(!u({value:o,tabValues:e}))throw new Error(`Docusaurus error: The has a defaultValue "${o}" but none of its children has the corresponding value. Available values are: ${e.map(o=>o.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return o}const t=e.find(o=>o.default)??e[0];if(!t)throw new Error("Unexpected error: 0 tabValues");return t.value}({defaultValue:e,tabValues:r})),[a,d]=y({queryString:t,groupId:s}),[D,F]=function({groupId:o}){const e=function(o){return o?`docusaurus.tab.${o}`:null}(o),[t,s]=(0,i.Dv)(e);return[t,(0,n.useCallback)(o=>{e&&s.set(o)},[e,s])]}({groupId:s}),f=(()=>{const o=a??D;return u({value:o,tabValues:r})?o:null})();(0,l.A)(()=>{f&&p(f)},[f]);return{selectedValue:c,selectValue:(0,n.useCallback)(o=>{if(!u({value:o,tabValues:r}))throw new Error(`Can't select invalid tab value=${o}`);p(o),d(o),F(o)},[d,F,r]),tabValues:r}}var F=t(92303);const f={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var m=t(74848);function g({className:o,block:e,selectedValue:t,selectValue:n,tabValues:c}){const l=[],{blockElementScrollPositionUntilNextRender:p}=(0,r.a_)(),a=o=>{const e=o.currentTarget,s=l.indexOf(e),r=c[s].value;r!==t&&(p(e),n(r))},i=o=>{let e=null;switch(o.key){case"Enter":a(o);break;case"ArrowRight":{const t=l.indexOf(o.currentTarget)+1;e=l[t]??l[0];break}case"ArrowLeft":{const t=l.indexOf(o.currentTarget)-1;e=l[t]??l[l.length-1];break}}e?.focus()};return(0,m.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":e},o),children:c.map(({value:o,label:e,attributes:n})=>(0,m.jsx)("li",{role:"tab",tabIndex:t===o?0:-1,"aria-selected":t===o,ref:o=>{l.push(o)},onKeyDown:i,onClick:a,...n,className:(0,s.A)("tabs__item",f.tabItem,n?.className,{"tabs__item--active":t===o}),children:e??o},o))})}function x({lazy:o,children:e,selectedValue:t}){const r=(Array.isArray(e)?e:[e]).filter(Boolean);if(o){const o=r.find(o=>o.props.value===t);return o?(0,n.cloneElement)(o,{className:(0,s.A)("margin-top--md",o.props.className)}):null}return(0,m.jsx)("div",{className:"margin-top--md",children:r.map((o,e)=>(0,n.cloneElement)(o,{key:e,hidden:o.props.value!==t}))})}function C(o){const e=D(o);return(0,m.jsxs)("div",{className:(0,s.A)("tabs-container",f.tabList),children:[(0,m.jsx)(g,{...e,...o}),(0,m.jsx)(x,{...e,...o})]})}function j(o){const e=(0,F.A)();return(0,m.jsx)(C,{...o,children:d(o.children)},String(e))}},17886:(o,e,t)=>{t.d(e,{A:()=>r});t(96540);var n=t(64058),s=t(74848);function r({name:o,...e}){const t=n[o];return t?(0,s.jsx)(t,{...e}):null}},19365:(o,e,t)=>{t.d(e,{A:()=>c});t(96540);var n=t(18215);const s={tabItem:"tabItem_Ymn6"};var r=t(74848);function c({children:o,hidden:e,className:t}){return(0,r.jsx)("div",{role:"tabpanel",className:(0,n.A)(s.tabItem,t),hidden:e,children:o})}},33588:(o,e,t)=>{t.d(e,{A:()=>n});const n=t.p+"assets/images/tutorial-agent-with-directory-a938bd23cfaf1f0570b58b2635e699e4.png"},36557:(o,e,t)=>{t.d(e,{A:()=>n});const n=t.p+"assets/files/customer_orders-0c1c00f9ebd1f6b3c9ede72af1b67ca2.csv"},39582:(o,e,t)=>{t.r(e),t.d(e,{CH:()=>d,assets:()=>i,chCodeConfig:()=>h,contentTitle:()=>a,default:()=>D,frontMatter:()=>p,metadata:()=>n,toc:()=>u});const n=JSON.parse('{"id":"Tutorials/agent","title":"Connect applications to agents","description":"This tutorial shows you how to connect a JavaScript application to a Langflow agent.","source":"@site/docs/Tutorials/agent.mdx","sourceDirName":"Tutorials","slug":"/agent-tutorial","permalink":"/agent-tutorial","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Connect applications to agents","slug":"/agent-tutorial"},"sidebar":"docs","previous":{"title":"Create a chatbot that can ingest files","permalink":"/chat-with-files"},"next":{"title":"Connect to MCP servers from your application","permalink":"/mcp-tutorial"}}');var s=t(74848),r=t(28453),c=t(24754),l=t(17886);t(11470),t(19365);const p={title:"Connect applications to agents",slug:"/agent-tutorial"},a=void 0,i={},d={annotations:c.hk,Code:c.Cy},h={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},u=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Create an agentic flow",id:"create-an-agentic-flow",level:2},{value:"Add a prompt component to the flow",id:"add-a-prompt-component-to-the-flow",level:2},{value:"Send requests to your flow from a JavaScript application",id:"send-requests-to-your-flow-from-a-javascript-application",level:2},{value:"Next steps",id:"next-steps",level:2}];function y(o){const e={a:"a",code:"code",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...o.components},{Details:n}=e;return d||F("CH",!1),d.Code||F("CH.Code",!0),n||F("Details",!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","\n",(0,s.jsxs)(e.p,{children:["This tutorial shows you how to connect a JavaScript application to a Langflow ",(0,s.jsx)(e.a,{href:"/agents",children:"agent"}),"."]}),"\n",(0,s.jsx)(e.p,{children:"With the agent connected, your application can use any connected tools to retrieve more contextual and timely data without changing any application code. The tools are selected by the agent's internal LLM to solve problems and answer questions."}),"\n",(0,s.jsx)(e.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.a,{href:"/get-started-installation",children:"A running Langflow instance"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.a,{href:"/configuration-api-keys",children:"A Langflow API key"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.a,{href:"https://platform.openai.com/api-keys",children:"An OpenAI API key"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.a,{href:"/typescript-client",children:"Langflow JavaScript client installed"})}),"\n"]}),"\n",(0,s.jsx)(e.p,{children:"This tutorial uses an OpenAI LLM. If you want to use a different provider, you need a valid credential for that provider."}),"\n",(0,s.jsx)(e.h2,{id:"create-an-agentic-flow",children:"Create an agentic flow"}),"\n",(0,s.jsxs)(e.p,{children:["The following steps modify the ",(0,s.jsx)(e.a,{href:"/simple-agent",children:(0,s.jsx)(e.strong,{children:"Simple agent"})})," template to connect ",(0,s.jsx)(e.a,{href:"/components-data#directory",children:(0,s.jsx)(e.strong,{children:"Directory"})})," and ",(0,s.jsx)(e.a,{href:"/components-data#web-search",children:(0,s.jsx)(e.strong,{children:"Web search"})})," components as tools for an ",(0,s.jsx)(e.strong,{children:"Agent"})," component.\nThe ",(0,s.jsx)(e.strong,{children:"Directory"})," component loads all files of a given type from a target directory on your local machine, and the ",(0,s.jsx)(e.strong,{children:"Web search"})," component performs a DuckDuckGo search.\nWhen connected to an ",(0,s.jsx)(e.strong,{children:"Agent"})," component as tools, the agent has the option to use these components when handling requests."]}),"\n",(0,s.jsxs)(e.ol,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["In Langflow, click ",(0,s.jsx)(e.strong,{children:"New Flow"}),", and then select the ",(0,s.jsx)(e.strong,{children:"Simple agent"})," template."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["Remove the ",(0,s.jsx)(e.strong,{children:"URL"})," and ",(0,s.jsx)(e.strong,{children:"Calculator"})," tools, and then drag the ",(0,s.jsx)(e.a,{href:"/components-data#directory",children:(0,s.jsx)(e.strong,{children:"Directory"})})," and ",(0,s.jsx)(e.a,{href:"/components-data#web-search",children:(0,s.jsx)(e.strong,{children:"Web search"})})," components into your workspace."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["In the ",(0,s.jsx)(e.strong,{children:"Directory"})," component's ",(0,s.jsx)(e.strong,{children:"Path"})," field, enter the directory path and file types that you want to make available to the ",(0,s.jsx)(e.strong,{children:"Agent"})," component."]}),"\n",(0,s.jsxs)(e.p,{children:["In this tutorial, the agent needs access to a record of customer purchases, so the directory name is ",(0,s.jsx)(e.code,{children:"customer_orders"})," and the file type is ",(0,s.jsx)(e.code,{children:".csv"}),". Later in this tutorial, the agent will be prompted to find ",(0,s.jsx)(e.code,{children:"email"})," values in the customer data."]}),"\n",(0,s.jsxs)(e.p,{children:["You can adapt the tutorial to suit your data, or, to follow along with the tutorial, you can download ",(0,s.jsx)(e.a,{target:"_blank","data-noBrokenLinkCheck":!0,href:t(36557).A+"",children:(0,s.jsx)(e.code,{children:"customer-orders.csv"})})," and save it in a ",(0,s.jsx)(e.code,{children:"customer_orders"})," folder on your local machine."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["In the ",(0,s.jsx)(e.a,{href:"/concepts-components#component-menus",children:"component header menu"})," for the ",(0,s.jsx)(e.strong,{children:"Directory"})," and ",(0,s.jsx)(e.strong,{children:"Web search"})," components, enable ",(0,s.jsx)(e.strong,{children:"Tool Mode"})," so you can use the components with an agent."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["For both tool components, connect the ",(0,s.jsx)(e.strong,{children:"Toolset"})," port to the Agent component's ",(0,s.jsx)(e.strong,{children:"Tools"})," port."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["In the ",(0,s.jsx)(e.strong,{children:"Agent"})," component, enter your OpenAI API key."]}),"\n",(0,s.jsxs)(e.p,{children:["If you want to use a different provider or model, edit the ",(0,s.jsx)(e.strong,{children:"Model Provider"}),", ",(0,s.jsx)(e.strong,{children:"Model Name"}),", and ",(0,s.jsx)(e.strong,{children:"API Key"})," fields accordingly."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["To test the flow, click ",(0,s.jsx)(l.A,{name:"Play","aria-hidden":"true"})," ",(0,s.jsx)(e.strong,{children:"Playground"}),", and then ask the LLM a question, such as ",(0,s.jsx)(e.code,{children:"Recommend 3 used items for carol.davis@example.com, based on previous orders."})]}),"\n",(0,s.jsxs)(e.p,{children:["Given the example prompt, the LLM would respond with recommendations and web links for items based on previous orders in ",(0,s.jsx)(e.code,{children:"customer_orders.csv"}),"."]}),"\n",(0,s.jsxs)(e.p,{children:["The ",(0,s.jsx)(e.strong,{children:"Playground"})," prints the agent's chain of thought as it selects tools to use and interacts with functionality provided by those tools.\nFor example, the agent can use the ",(0,s.jsx)(e.strong,{children:"Directory"})," component's ",(0,s.jsx)(e.code,{children:"as_dataframe"})," tool to retrieve a ",(0,s.jsx)(e.a,{href:"/concepts-objects#dataframe-object",children:"DataFrame"}),", and the ",(0,s.jsx)(e.strong,{children:"Web search"})," component's ",(0,s.jsx)(e.code,{children:"perform_search"})," tool to find links to related items."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(e.h2,{id:"add-a-prompt-component-to-the-flow",children:"Add a prompt component to the flow"}),"\n",(0,s.jsx)(e.p,{children:"In this example, the application sends a customer's email address to the Langflow agent. The agent compares the customer's previous orders within the Directory component, searches the web for used versions of those items, and returns three results."}),"\n",(0,s.jsxs)(e.ol,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["To include the email address as a value in your flow, add a ",(0,s.jsx)(e.a,{href:"/components-prompts",children:"Prompt"})," component to your flow between the ",(0,s.jsx)(e.strong,{children:"Chat Input"})," and ",(0,s.jsx)(e.strong,{children:"Agent"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["In the Prompt component's ",(0,s.jsx)(e.strong,{children:"Template"})," field, enter ",(0,s.jsx)(e.code,{children:"Recommend 3 used items for {email}, based on previous orders."}),"\nAdding the ",(0,s.jsx)(e.code,{children:"{email}"})," value in curly braces creates a new input in the ",(0,s.jsx)(e.strong,{children:"Prompt"})," component, and the component connected to the ",(0,s.jsx)(e.code,{children:"{email}"})," port is supplying the value for that variable.\nThis creates a point for the user's email to enter the flow from your request.\nIf you aren't using the ",(0,s.jsx)(e.code,{children:"customer_orders.csv"})," example file, modify the input to search for a value in your dataset."]}),"\n",(0,s.jsxs)(e.p,{children:["At this point your flow has six components. The Chat Input is connected to the Prompt component's ",(0,s.jsx)(e.code,{children:"email"})," input port. Then, the Prompt component's output port is connected to the Agent component's input port. The Directory and Web search components are connected to the Agent's Tools port. Finally, the Agent component's output port is connected to the Chat Output component, which returns the final response to the application."]}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{alt:"An agent component connected to web search and directory components",src:t(33588).A+"",width:"4000",height:"2830"})}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(e.h2,{id:"send-requests-to-your-flow-from-a-javascript-application",children:"Send requests to your flow from a JavaScript application"}),"\n",(0,s.jsx)(e.p,{children:"With your flow operational, connect it to a JavaScript application to use the agent's responses."}),"\n",(0,s.jsxs)(e.ol,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsx)(e.p,{children:"To construct a JavaScript application to connect to your flow, gather the following information:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"LANGFLOW_SERVER_ADDRESS"}),": Your Langflow server's domain. The default value is ",(0,s.jsx)(e.code,{children:"127.0.0.1:7860"}),". You can get this value from the code snippets on your flow's ",(0,s.jsxs)(e.a,{href:"/concepts-publish#api-access",children:[(0,s.jsx)(e.strong,{children:"API access"})," pane"]}),"."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"FLOW_ID"}),": Your flow's UUID or custom endpoint name. You can get this value from the code snippets on your flow's ",(0,s.jsxs)(e.a,{href:"/concepts-publish#api-access",children:[(0,s.jsx)(e.strong,{children:"API access"})," pane"]}),"."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"LANGFLOW_API_KEY"}),": A valid Langflow API key. To create an API key, see ",(0,s.jsx)(e.a,{href:"/configuration-api-keys",children:"API keys"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["Copy the following script into a JavaScript file, and then replace the placeholders with the information you gathered in the previous step.\nIf you're using the ",(0,s.jsx)(e.code,{children:"customer_orders.csv"})," example file, you can run this example as-is with the example email address in the code sample.\nIf not, modify the ",(0,s.jsx)(e.code,{children:'const email = "isabella.rodriguez@example.com"'})," to search for a value in your dataset."]}),"\n",(0,s.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" { LangflowClient } ",props:{style:{color:"#C9D1D9"}}},{content:"from ",props:{style:{color:"#FF7B72"}}},{content:'"@datastax/langflow-client"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"const ",props:{style:{color:"#FF7B72"}}},{content:"LANGFLOW_SERVER_ADDRESS ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"'LANGFLOW_SERVER_ADDRESS'",props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"const ",props:{style:{color:"#FF7B72"}}},{content:"FLOW_ID ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"'FLOW_ID'",props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"const ",props:{style:{color:"#FF7B72"}}},{content:"LANGFLOW_API_KEY ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"'LANGFLOW_API_KEY'",props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"const ",props:{style:{color:"#FF7B72"}}},{content:"email ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"isabella.rodriguez@example.com"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"async function ",props:{style:{color:"#FF7B72"}}},{content:"runAgentFlow",props:{style:{color:"#D2A8FF"}}},{content:"()",props:{style:{color:"#C9D1D9"}}},{content:": ",props:{style:{color:"#FF7B72"}}},{content:"Promise",props:{style:{color:"#FFA657"}}},{content:"<",props:{style:{color:"#C9D1D9"}}},{content:"void",props:{style:{color:"#79C0FF"}}},{content:"> {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" try",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" // Initialize the Langflow client",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" const ",props:{style:{color:"#FF7B72"}}},{content:"client ",props:{style:{color:"#79C0FF"}}},{content:"= new ",props:{style:{color:"#FF7B72"}}},{content:"LangflowClient",props:{style:{color:"#D2A8FF"}}},{content:"({",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" baseUrl: ",props:{style:{color:"#C9D1D9"}}},{content:"LANGFLOW_SERVER_ADDRESS",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" apiKey: ",props:{style:{color:"#C9D1D9"}}},{content:"LANGFLOW_API_KEY",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" });",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"`Connecting to Langflow server at: ${",props:{style:{color:"#A5D6FF"}}},{content:"LANGFLOW_SERVER_ADDRESS",props:{style:{color:"#79C0FF"}}},{content:"} `",props:{style:{color:"#A5D6FF"}}},{content:");",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"`Flow ID: ${",props:{style:{color:"#A5D6FF"}}},{content:"FLOW_ID",props:{style:{color:"#79C0FF"}}},{content:"}`",props:{style:{color:"#A5D6FF"}}},{content:");",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"`Email: ${",props:{style:{color:"#A5D6FF"}}},{content:"email",props:{style:{color:"#C9D1D9"}}},{content:"}`",props:{style:{color:"#A5D6FF"}}},{content:");",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" // Get the flow instance",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" const ",props:{style:{color:"#FF7B72"}}},{content:"flow ",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" client.",props:{style:{color:"#C9D1D9"}}},{content:"flow",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"FLOW_ID",props:{style:{color:"#79C0FF"}}},{content:");",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" // Run the flow with the email as input",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:"Sending request to agent...'",props:{style:{color:"#A5D6FF"}}},{content:");",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" const ",props:{style:{color:"#FF7B72"}}},{content:"response ",props:{style:{color:"#79C0FF"}}},{content:"= await",props:{style:{color:"#FF7B72"}}},{content:" flow.",props:{style:{color:"#C9D1D9"}}},{content:"run",props:{style:{color:"#D2A8FF"}}},{content:"(email, {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" session_id: email ",props:{style:{color:"#C9D1D9"}}},{content:"// Use email as session ID for context",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" });",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:"=== Response from Langflow ==='",props:{style:{color:"#A5D6FF"}}},{content:");",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'Session ID:'",props:{style:{color:"#A5D6FF"}}},{content:", response.sessionId);",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" // Extract URLs from the chat message",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" const ",props:{style:{color:"#FF7B72"}}},{content:"chatMessage ",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" response.",props:{style:{color:"#C9D1D9"}}},{content:"chatOutputText",props:{style:{color:"#D2A8FF"}}},{content:"();",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:"=== URLs from Chat Message ==='",props:{style:{color:"#A5D6FF"}}},{content:");",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" const ",props:{style:{color:"#FF7B72"}}},{content:"messageUrls ",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" chatMessage.",props:{style:{color:"#C9D1D9"}}},{content:"match",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"/https",props:{style:{color:"#A5D6FF"}}},{content:"?",props:{style:{color:"#FF7B72"}}},{content:":",props:{style:{color:"#A5D6FF"}}},{content:"\\/\\/",props:{style:{color:"#7EE787",fontWeight:"bold"}}},{content:"[",props:{style:{color:"#79C0FF"}}},{content:"^",props:{style:{color:"#FF7B72"}}},{content:"\\s\"')",props:{style:{color:"#79C0FF"}}},{content:"\\]",props:{style:{color:"#7EE787",fontWeight:"bold"}}},{content:"]",props:{style:{color:"#79C0FF"}}},{content:"+",props:{style:{color:"#FF7B72"}}},{content:"/",props:{style:{color:"#A5D6FF"}}},{content:"g",props:{style:{color:"#FF7B72"}}},{content:") ",props:{style:{color:"#C9D1D9"}}},{content:"||",props:{style:{color:"#FF7B72"}}},{content:" [];",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" const ",props:{style:{color:"#FF7B72"}}},{content:"cleanMessageUrls ",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}},{content:"...new ",props:{style:{color:"#FF7B72"}}},{content:"Set",props:{style:{color:"#D2A8FF"}}},{content:"(messageUrls)].",props:{style:{color:"#C9D1D9"}}},{content:"map",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"url ",props:{style:{color:"#FFA657"}}},{content:"=>",props:{style:{color:"#FF7B72"}}},{content:" url.",props:{style:{color:"#C9D1D9"}}},{content:"trim",props:{style:{color:"#D2A8FF"}}},{content:"());",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'URLs from message:'",props:{style:{color:"#A5D6FF"}}},{content:");",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" cleanMessageUrls.",props:{style:{color:"#C9D1D9"}}},{content:"slice",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"0",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"3",props:{style:{color:"#79C0FF"}}},{content:").",props:{style:{color:"#C9D1D9"}}},{content:"forEach",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"url ",props:{style:{color:"#FFA657"}}},{content:"=>",props:{style:{color:"#FF7B72"}}},{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(url));",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" } ",props:{style:{color:"#C9D1D9"}}},{content:"catch",props:{style:{color:"#FF7B72"}}},{content:" (error) {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"error",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'Error running flow:'",props:{style:{color:"#A5D6FF"}}},{content:", error);",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" // Provide error messages",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" if",props:{style:{color:"#FF7B72"}}},{content:" (error ",props:{style:{color:"#C9D1D9"}}},{content:"instanceof ",props:{style:{color:"#FF7B72"}}},{content:"Error",props:{style:{color:"#FFA657"}}},{content:") {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" if",props:{style:{color:"#FF7B72"}}},{content:" (error.message.",props:{style:{color:"#C9D1D9"}}},{content:"includes",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'fetch'",props:{style:{color:"#A5D6FF"}}},{content:")) {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"error",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:"Make sure your Langflow server is running and accessible at:'",props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"LANGFLOW_SERVER_ADDRESS",props:{style:{color:"#79C0FF"}}},{content:");",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" if",props:{style:{color:"#FF7B72"}}},{content:" (error.message.",props:{style:{color:"#C9D1D9"}}},{content:"includes",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'401'",props:{style:{color:"#A5D6FF"}}},{content:") ",props:{style:{color:"#C9D1D9"}}},{content:"||",props:{style:{color:"#FF7B72"}}},{content:" error.message.",props:{style:{color:"#C9D1D9"}}},{content:"includes",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'403'",props:{style:{color:"#A5D6FF"}}},{content:")) {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"error",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:"Check your API key configuration'",props:{style:{color:"#A5D6FF"}}},{content:");",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" if",props:{style:{color:"#FF7B72"}}},{content:" (error.message.",props:{style:{color:"#C9D1D9"}}},{content:"includes",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'404'",props:{style:{color:"#A5D6FF"}}},{content:")) {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"error",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:"Check your Flow ID - make sure it exists and is correct'",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:"}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"// Run the function",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'Starting Langflow Agent...",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:"'",props:{style:{color:"#A5D6FF"}}},{content:");",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"runAgentFlow",props:{style:{color:"#D2A8FF"}}},{content:"().",props:{style:{color:"#C9D1D9"}}},{content:"catch",props:{style:{color:"#D2A8FF"}}},{content:"(console.error);",props:{style:{color:"#C9D1D9"}}}]}],lang:"js"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsx)(e.p,{children:"Save and run the script to send the request and test the flow.\nYour application receives three URLs for recommended used items based on a customer's previous orders in your local CSV, all without changing any code."}),"\n",(0,s.jsxs)(n,{closed:!0,children:[(0,s.jsx)("summary",{children:"Response"}),(0,s.jsx)(e.p,{children:"The following is an example of a response returned from this tutorial's flow. Due to the nature of LLMs and variations in your inputs, your response might be different."}),(0,s.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Starting Langflow Agent...",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"Connecting to Langflow server at: http://localhost:7860",props:{}}]},{tokens:[{content:"Flow ID: local-db-search",props:{}}]},{tokens:[{content:"Email: isabella.rodriguez@example.com",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"Sending request to agent...",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"=== Response from Langflow ===",props:{}}]},{tokens:[{content:"Session ID: isabella.rodriguez@example.com",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"URLs found:",props:{}}]},{tokens:[{content:"https://www.facebook.com/marketplace/258164108225783/electronics/",props:{}}]},{tokens:[{content:"https://www.facebook.com/marketplace/458332108944152/furniture/",props:{}}]},{tokens:[{content:"https://www.facebook.com/marketplace/613732137493719/kitchen-cabinets/",props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["To quickly check traffic to your flow, open the ",(0,s.jsx)(e.strong,{children:"Playground"}),".\nNew sessions appear named after the user's email address.\nKeeping sessions distinct helps the agent maintain context. For more on session IDs, see ",(0,s.jsx)(e.a,{href:"/session-id",children:"Session ID"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(e.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,s.jsx)(e.p,{children:"For more information on building or extending this tutorial, see the following:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.a,{href:"/mcp-server",children:"Model Context Protocol (MCP) servers"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.a,{href:"/deployment-overview",children:"Langflow deployment overview"})}),"\n"]})]})}function D(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/b079b393.b7ae34a4.js b/assets/js/b079b393.b7ae34a4.js deleted file mode 100644 index d062791e56..0000000000 --- a/assets/js/b079b393.b7ae34a4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[3240],{11470:(o,e,t)=>{t.d(e,{A:()=>j});var n=t(96540),s=t(18215),r=t(23104),c=t(56347),l=t(205),p=t(57485),a=t(31682),i=t(70679);function d(o){return n.Children.toArray(o).filter(o=>"\n"!==o).map(o=>{if(!o||(0,n.isValidElement)(o)&&function(o){const{props:e}=o;return!!e&&"object"==typeof e&&"value"in e}(o))return o;throw new Error(`Docusaurus error: Bad child <${"string"==typeof o.type?o.type:o.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)})?.filter(Boolean)??[]}function h(o){const{values:e,children:t}=o;return(0,n.useMemo)(()=>{const o=e??function(o){return d(o).map(({props:{value:o,label:e,attributes:t,default:n}})=>({value:o,label:e,attributes:t,default:n}))}(t);return function(o){const e=(0,a.XI)(o,(o,e)=>o.value===e.value);if(e.length>0)throw new Error(`Docusaurus error: Duplicate values "${e.map(o=>o.value).join(", ")}" found in . Every value needs to be unique.`)}(o),o},[e,t])}function u({value:o,tabValues:e}){return e.some(e=>e.value===o)}function y({queryString:o=!1,groupId:e}){const t=(0,c.W6)(),s=function({queryString:o=!1,groupId:e}){if("string"==typeof o)return o;if(!1===o)return null;if(!0===o&&!e)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return e??null}({queryString:o,groupId:e});return[(0,p.aZ)(s),(0,n.useCallback)(o=>{if(!s)return;const e=new URLSearchParams(t.location.search);e.set(s,o),t.replace({...t.location,search:e.toString()})},[s,t])]}function D(o){const{defaultValue:e,queryString:t=!1,groupId:s}=o,r=h(o),[c,p]=(0,n.useState)(()=>function({defaultValue:o,tabValues:e}){if(0===e.length)throw new Error("Docusaurus error: the component requires at least one children component");if(o){if(!u({value:o,tabValues:e}))throw new Error(`Docusaurus error: The has a defaultValue "${o}" but none of its children has the corresponding value. Available values are: ${e.map(o=>o.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return o}const t=e.find(o=>o.default)??e[0];if(!t)throw new Error("Unexpected error: 0 tabValues");return t.value}({defaultValue:e,tabValues:r})),[a,d]=y({queryString:t,groupId:s}),[D,F]=function({groupId:o}){const e=function(o){return o?`docusaurus.tab.${o}`:null}(o),[t,s]=(0,i.Dv)(e);return[t,(0,n.useCallback)(o=>{e&&s.set(o)},[e,s])]}({groupId:s}),f=(()=>{const o=a??D;return u({value:o,tabValues:r})?o:null})();(0,l.A)(()=>{f&&p(f)},[f]);return{selectedValue:c,selectValue:(0,n.useCallback)(o=>{if(!u({value:o,tabValues:r}))throw new Error(`Can't select invalid tab value=${o}`);p(o),d(o),F(o)},[d,F,r]),tabValues:r}}var F=t(92303);const f={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var m=t(74848);function g({className:o,block:e,selectedValue:t,selectValue:n,tabValues:c}){const l=[],{blockElementScrollPositionUntilNextRender:p}=(0,r.a_)(),a=o=>{const e=o.currentTarget,s=l.indexOf(e),r=c[s].value;r!==t&&(p(e),n(r))},i=o=>{let e=null;switch(o.key){case"Enter":a(o);break;case"ArrowRight":{const t=l.indexOf(o.currentTarget)+1;e=l[t]??l[0];break}case"ArrowLeft":{const t=l.indexOf(o.currentTarget)-1;e=l[t]??l[l.length-1];break}}e?.focus()};return(0,m.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":e},o),children:c.map(({value:o,label:e,attributes:n})=>(0,m.jsx)("li",{role:"tab",tabIndex:t===o?0:-1,"aria-selected":t===o,ref:o=>{l.push(o)},onKeyDown:i,onClick:a,...n,className:(0,s.A)("tabs__item",f.tabItem,n?.className,{"tabs__item--active":t===o}),children:e??o},o))})}function x({lazy:o,children:e,selectedValue:t}){const r=(Array.isArray(e)?e:[e]).filter(Boolean);if(o){const o=r.find(o=>o.props.value===t);return o?(0,n.cloneElement)(o,{className:(0,s.A)("margin-top--md",o.props.className)}):null}return(0,m.jsx)("div",{className:"margin-top--md",children:r.map((o,e)=>(0,n.cloneElement)(o,{key:e,hidden:o.props.value!==t}))})}function C(o){const e=D(o);return(0,m.jsxs)("div",{className:(0,s.A)("tabs-container",f.tabList),children:[(0,m.jsx)(g,{...e,...o}),(0,m.jsx)(x,{...e,...o})]})}function j(o){const e=(0,F.A)();return(0,m.jsx)(C,{...o,children:d(o.children)},String(e))}},17886:(o,e,t)=>{t.d(e,{A:()=>r});t(96540);var n=t(64058),s=t(74848);function r({name:o,...e}){const t=n[o];return t?(0,s.jsx)(t,{...e}):null}},19365:(o,e,t)=>{t.d(e,{A:()=>c});t(96540);var n=t(18215);const s={tabItem:"tabItem_Ymn6"};var r=t(74848);function c({children:o,hidden:e,className:t}){return(0,r.jsx)("div",{role:"tabpanel",className:(0,n.A)(s.tabItem,t),hidden:e,children:o})}},33588:(o,e,t)=>{t.d(e,{A:()=>n});const n=t.p+"assets/images/tutorial-agent-with-directory-a938bd23cfaf1f0570b58b2635e699e4.png"},36557:(o,e,t)=>{t.d(e,{A:()=>n});const n=t.p+"assets/files/customer_orders-0c1c00f9ebd1f6b3c9ede72af1b67ca2.csv"},39582:(o,e,t)=>{t.r(e),t.d(e,{CH:()=>d,assets:()=>i,chCodeConfig:()=>h,contentTitle:()=>a,default:()=>D,frontMatter:()=>p,metadata:()=>n,toc:()=>u});const n=JSON.parse('{"id":"Tutorials/agent","title":"Connect applications to agents","description":"This tutorial shows you how to connect a JavaScript application to a Langflow agent.","source":"@site/docs/Tutorials/agent.mdx","sourceDirName":"Tutorials","slug":"/agent-tutorial","permalink":"/agent-tutorial","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Connect applications to agents","slug":"/agent-tutorial"},"sidebar":"docs","previous":{"title":"Create a chatbot that can ingest files","permalink":"/chat-with-files"},"next":{"title":"Basic prompting","permalink":"/basic-prompting"}}');var s=t(74848),r=t(28453),c=t(24754),l=t(17886);t(11470),t(19365);const p={title:"Connect applications to agents",slug:"/agent-tutorial"},a=void 0,i={},d={annotations:c.hk,Code:c.Cy},h={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},u=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Create an agentic flow",id:"create-an-agentic-flow",level:2},{value:"Add a prompt component to the flow",id:"add-a-prompt-component-to-the-flow",level:2},{value:"Send requests to your flow from a JavaScript application",id:"send-requests-to-your-flow-from-a-javascript-application",level:2},{value:"Next steps",id:"next-steps",level:2}];function y(o){const e={a:"a",code:"code",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...o.components},{Details:n}=e;return d||F("CH",!1),d.Code||F("CH.Code",!0),n||F("Details",!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","\n",(0,s.jsxs)(e.p,{children:["This tutorial shows you how to connect a JavaScript application to a Langflow ",(0,s.jsx)(e.a,{href:"/agents",children:"agent"}),"."]}),"\n",(0,s.jsx)(e.p,{children:"With the agent connected, your application can use any connected tools to retrieve more contextual and timely data without changing any application code. The tools are selected by the agent's internal LLM to solve problems and answer questions."}),"\n",(0,s.jsx)(e.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.a,{href:"/get-started-installation",children:"A running Langflow instance"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.a,{href:"/configuration-api-keys",children:"A Langflow API key"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.a,{href:"https://platform.openai.com/api-keys",children:"An OpenAI API key"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.a,{href:"/typescript-client",children:"Langflow JavaScript client installed"})}),"\n"]}),"\n",(0,s.jsx)(e.p,{children:"This tutorial uses an OpenAI LLM. If you want to use a different provider, you need a valid credential for that provider."}),"\n",(0,s.jsx)(e.h2,{id:"create-an-agentic-flow",children:"Create an agentic flow"}),"\n",(0,s.jsxs)(e.p,{children:["The following steps modify the ",(0,s.jsx)(e.a,{href:"/simple-agent",children:(0,s.jsx)(e.strong,{children:"Simple agent"})})," template to connect ",(0,s.jsx)(e.a,{href:"/components-data#directory",children:(0,s.jsx)(e.strong,{children:"Directory"})})," and ",(0,s.jsx)(e.a,{href:"/components-data#web-search",children:(0,s.jsx)(e.strong,{children:"Web search"})})," components as tools for an ",(0,s.jsx)(e.strong,{children:"Agent"})," component.\nThe ",(0,s.jsx)(e.strong,{children:"Directory"})," component loads all files of a given type from a target directory on your local machine, and the ",(0,s.jsx)(e.strong,{children:"Web search"})," component performs a DuckDuckGo search.\nWhen connected to an ",(0,s.jsx)(e.strong,{children:"Agent"})," component as tools, the agent has the option to use these components when handling requests."]}),"\n",(0,s.jsxs)(e.ol,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["In Langflow, click ",(0,s.jsx)(e.strong,{children:"New Flow"}),", and then select the ",(0,s.jsx)(e.strong,{children:"Simple agent"})," template."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["Remove the ",(0,s.jsx)(e.strong,{children:"URL"})," and ",(0,s.jsx)(e.strong,{children:"Calculator"})," tools, and then drag the ",(0,s.jsx)(e.a,{href:"/components-data#directory",children:(0,s.jsx)(e.strong,{children:"Directory"})})," and ",(0,s.jsx)(e.a,{href:"/components-data#web-search",children:(0,s.jsx)(e.strong,{children:"Web search"})})," components into your workspace."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["In the ",(0,s.jsx)(e.strong,{children:"Directory"})," component's ",(0,s.jsx)(e.strong,{children:"Path"})," field, enter the directory path and file types that you want to make available to the ",(0,s.jsx)(e.strong,{children:"Agent"})," component."]}),"\n",(0,s.jsxs)(e.p,{children:["In this tutorial, the agent needs access to a record of customer purchases, so the directory name is ",(0,s.jsx)(e.code,{children:"customer_orders"})," and the file type is ",(0,s.jsx)(e.code,{children:".csv"}),". Later in this tutorial, the agent will be prompted to find ",(0,s.jsx)(e.code,{children:"email"})," values in the customer data."]}),"\n",(0,s.jsxs)(e.p,{children:["You can adapt the tutorial to suit your data, or, to follow along with the tutorial, you can download ",(0,s.jsx)(e.a,{target:"_blank","data-noBrokenLinkCheck":!0,href:t(36557).A+"",children:(0,s.jsx)(e.code,{children:"customer-orders.csv"})})," and save it in a ",(0,s.jsx)(e.code,{children:"customer_orders"})," folder on your local machine."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["In the ",(0,s.jsx)(e.a,{href:"/concepts-components#component-menus",children:"component header menu"})," for the ",(0,s.jsx)(e.strong,{children:"Directory"})," and ",(0,s.jsx)(e.strong,{children:"Web search"})," components, enable ",(0,s.jsx)(e.strong,{children:"Tool Mode"})," so you can use the components with an agent."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["For both tool components, connect the ",(0,s.jsx)(e.strong,{children:"Toolset"})," port to the Agent component's ",(0,s.jsx)(e.strong,{children:"Tools"})," port."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["In the ",(0,s.jsx)(e.strong,{children:"Agent"})," component, enter your OpenAI API key."]}),"\n",(0,s.jsxs)(e.p,{children:["If you want to use a different provider or model, edit the ",(0,s.jsx)(e.strong,{children:"Model Provider"}),", ",(0,s.jsx)(e.strong,{children:"Model Name"}),", and ",(0,s.jsx)(e.strong,{children:"API Key"})," fields accordingly."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["To test the flow, click ",(0,s.jsx)(l.A,{name:"Play","aria-hidden":"true"})," ",(0,s.jsx)(e.strong,{children:"Playground"}),", and then ask the LLM a question, such as ",(0,s.jsx)(e.code,{children:"Recommend 3 used items for carol.davis@example.com, based on previous orders."})]}),"\n",(0,s.jsxs)(e.p,{children:["Given the example prompt, the LLM would respond with recommendations and web links for items based on previous orders in ",(0,s.jsx)(e.code,{children:"customer_orders.csv"}),"."]}),"\n",(0,s.jsxs)(e.p,{children:["The ",(0,s.jsx)(e.strong,{children:"Playground"})," prints the agent's chain of thought as it selects tools to use and interacts with functionality provided by those tools.\nFor example, the agent can use the ",(0,s.jsx)(e.strong,{children:"Directory"})," component's ",(0,s.jsx)(e.code,{children:"as_dataframe"})," tool to retrieve a ",(0,s.jsx)(e.a,{href:"/concepts-objects#dataframe-object",children:"DataFrame"}),", and the ",(0,s.jsx)(e.strong,{children:"Web search"})," component's ",(0,s.jsx)(e.code,{children:"perform_search"})," tool to find links to related items."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(e.h2,{id:"add-a-prompt-component-to-the-flow",children:"Add a prompt component to the flow"}),"\n",(0,s.jsx)(e.p,{children:"In this example, the application sends a customer's email address to the Langflow agent. The agent compares the customer's previous orders within the Directory component, searches the web for used versions of those items, and returns three results."}),"\n",(0,s.jsxs)(e.ol,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["To include the email address as a value in your flow, add a ",(0,s.jsx)(e.a,{href:"/components-prompts",children:"Prompt"})," component to your flow between the ",(0,s.jsx)(e.strong,{children:"Chat Input"})," and ",(0,s.jsx)(e.strong,{children:"Agent"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["In the Prompt component's ",(0,s.jsx)(e.strong,{children:"Template"})," field, enter ",(0,s.jsx)(e.code,{children:"Recommend 3 used items for {email}, based on previous orders."}),"\nAdding the ",(0,s.jsx)(e.code,{children:"{email}"})," value in curly braces creates a new input in the ",(0,s.jsx)(e.strong,{children:"Prompt"})," component, and the component connected to the ",(0,s.jsx)(e.code,{children:"{email}"})," port is supplying the value for that variable.\nThis creates a point for the user's email to enter the flow from your request.\nIf you aren't using the ",(0,s.jsx)(e.code,{children:"customer_orders.csv"})," example file, modify the input to search for a value in your dataset."]}),"\n",(0,s.jsxs)(e.p,{children:["At this point your flow has six components. The Chat Input is connected to the Prompt component's ",(0,s.jsx)(e.code,{children:"email"})," input port. Then, the Prompt component's output port is connected to the Agent component's input port. The Directory and Web search components are connected to the Agent's Tools port. Finally, the Agent component's output port is connected to the Chat Output component, which returns the final response to the application."]}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{alt:"An agent component connected to web search and directory components",src:t(33588).A+"",width:"4000",height:"2830"})}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(e.h2,{id:"send-requests-to-your-flow-from-a-javascript-application",children:"Send requests to your flow from a JavaScript application"}),"\n",(0,s.jsx)(e.p,{children:"With your flow operational, connect it to a JavaScript application to use the agent's responses."}),"\n",(0,s.jsxs)(e.ol,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsx)(e.p,{children:"To construct a JavaScript application to connect to your flow, gather the following information:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"LANGFLOW_SERVER_ADDRESS"}),": Your Langflow server's domain. The default value is ",(0,s.jsx)(e.code,{children:"127.0.0.1:7860"}),". You can get this value from the code snippets on your flow's ",(0,s.jsxs)(e.a,{href:"/concepts-publish#api-access",children:[(0,s.jsx)(e.strong,{children:"API access"})," pane"]}),"."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"FLOW_ID"}),": Your flow's UUID or custom endpoint name. You can get this value from the code snippets on your flow's ",(0,s.jsxs)(e.a,{href:"/concepts-publish#api-access",children:[(0,s.jsx)(e.strong,{children:"API access"})," pane"]}),"."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"LANGFLOW_API_KEY"}),": A valid Langflow API key. To create an API key, see ",(0,s.jsx)(e.a,{href:"/configuration-api-keys",children:"API keys"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["Copy the following script into a JavaScript file, and then replace the placeholders with the information you gathered in the previous step.\nIf you're using the ",(0,s.jsx)(e.code,{children:"customer_orders.csv"})," example file, you can run this example as-is with the example email address in the code sample.\nIf not, modify the ",(0,s.jsx)(e.code,{children:'const email = "isabella.rodriguez@example.com"'})," to search for a value in your dataset."]}),"\n",(0,s.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" { LangflowClient } ",props:{style:{color:"#C9D1D9"}}},{content:"from ",props:{style:{color:"#FF7B72"}}},{content:'"@datastax/langflow-client"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"const ",props:{style:{color:"#FF7B72"}}},{content:"LANGFLOW_SERVER_ADDRESS ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"'LANGFLOW_SERVER_ADDRESS'",props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"const ",props:{style:{color:"#FF7B72"}}},{content:"FLOW_ID ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"'FLOW_ID'",props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"const ",props:{style:{color:"#FF7B72"}}},{content:"LANGFLOW_API_KEY ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"'LANGFLOW_API_KEY'",props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"const ",props:{style:{color:"#FF7B72"}}},{content:"email ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"isabella.rodriguez@example.com"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"async function ",props:{style:{color:"#FF7B72"}}},{content:"runAgentFlow",props:{style:{color:"#D2A8FF"}}},{content:"()",props:{style:{color:"#C9D1D9"}}},{content:": ",props:{style:{color:"#FF7B72"}}},{content:"Promise",props:{style:{color:"#FFA657"}}},{content:"<",props:{style:{color:"#C9D1D9"}}},{content:"void",props:{style:{color:"#79C0FF"}}},{content:"> {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" try",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" // Initialize the Langflow client",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" const ",props:{style:{color:"#FF7B72"}}},{content:"client ",props:{style:{color:"#79C0FF"}}},{content:"= new ",props:{style:{color:"#FF7B72"}}},{content:"LangflowClient",props:{style:{color:"#D2A8FF"}}},{content:"({",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" baseUrl: ",props:{style:{color:"#C9D1D9"}}},{content:"LANGFLOW_SERVER_ADDRESS",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" apiKey: ",props:{style:{color:"#C9D1D9"}}},{content:"LANGFLOW_API_KEY",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" });",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"`Connecting to Langflow server at: ${",props:{style:{color:"#A5D6FF"}}},{content:"LANGFLOW_SERVER_ADDRESS",props:{style:{color:"#79C0FF"}}},{content:"} `",props:{style:{color:"#A5D6FF"}}},{content:");",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"`Flow ID: ${",props:{style:{color:"#A5D6FF"}}},{content:"FLOW_ID",props:{style:{color:"#79C0FF"}}},{content:"}`",props:{style:{color:"#A5D6FF"}}},{content:");",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"`Email: ${",props:{style:{color:"#A5D6FF"}}},{content:"email",props:{style:{color:"#C9D1D9"}}},{content:"}`",props:{style:{color:"#A5D6FF"}}},{content:");",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" // Get the flow instance",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" const ",props:{style:{color:"#FF7B72"}}},{content:"flow ",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" client.",props:{style:{color:"#C9D1D9"}}},{content:"flow",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"FLOW_ID",props:{style:{color:"#79C0FF"}}},{content:");",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" // Run the flow with the email as input",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:"Sending request to agent...'",props:{style:{color:"#A5D6FF"}}},{content:");",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" const ",props:{style:{color:"#FF7B72"}}},{content:"response ",props:{style:{color:"#79C0FF"}}},{content:"= await",props:{style:{color:"#FF7B72"}}},{content:" flow.",props:{style:{color:"#C9D1D9"}}},{content:"run",props:{style:{color:"#D2A8FF"}}},{content:"(email, {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" session_id: email ",props:{style:{color:"#C9D1D9"}}},{content:"// Use email as session ID for context",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" });",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:"=== Response from Langflow ==='",props:{style:{color:"#A5D6FF"}}},{content:");",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'Session ID:'",props:{style:{color:"#A5D6FF"}}},{content:", response.sessionId);",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" // Extract URLs from the chat message",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" const ",props:{style:{color:"#FF7B72"}}},{content:"chatMessage ",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" response.",props:{style:{color:"#C9D1D9"}}},{content:"chatOutputText",props:{style:{color:"#D2A8FF"}}},{content:"();",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:"=== URLs from Chat Message ==='",props:{style:{color:"#A5D6FF"}}},{content:");",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" const ",props:{style:{color:"#FF7B72"}}},{content:"messageUrls ",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" chatMessage.",props:{style:{color:"#C9D1D9"}}},{content:"match",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"/https",props:{style:{color:"#A5D6FF"}}},{content:"?",props:{style:{color:"#FF7B72"}}},{content:":",props:{style:{color:"#A5D6FF"}}},{content:"\\/\\/",props:{style:{color:"#7EE787",fontWeight:"bold"}}},{content:"[",props:{style:{color:"#79C0FF"}}},{content:"^",props:{style:{color:"#FF7B72"}}},{content:"\\s\"')",props:{style:{color:"#79C0FF"}}},{content:"\\]",props:{style:{color:"#7EE787",fontWeight:"bold"}}},{content:"]",props:{style:{color:"#79C0FF"}}},{content:"+",props:{style:{color:"#FF7B72"}}},{content:"/",props:{style:{color:"#A5D6FF"}}},{content:"g",props:{style:{color:"#FF7B72"}}},{content:") ",props:{style:{color:"#C9D1D9"}}},{content:"||",props:{style:{color:"#FF7B72"}}},{content:" [];",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" const ",props:{style:{color:"#FF7B72"}}},{content:"cleanMessageUrls ",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}},{content:"...new ",props:{style:{color:"#FF7B72"}}},{content:"Set",props:{style:{color:"#D2A8FF"}}},{content:"(messageUrls)].",props:{style:{color:"#C9D1D9"}}},{content:"map",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"url ",props:{style:{color:"#FFA657"}}},{content:"=>",props:{style:{color:"#FF7B72"}}},{content:" url.",props:{style:{color:"#C9D1D9"}}},{content:"trim",props:{style:{color:"#D2A8FF"}}},{content:"());",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'URLs from message:'",props:{style:{color:"#A5D6FF"}}},{content:");",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" cleanMessageUrls.",props:{style:{color:"#C9D1D9"}}},{content:"slice",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"0",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"3",props:{style:{color:"#79C0FF"}}},{content:").",props:{style:{color:"#C9D1D9"}}},{content:"forEach",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"url ",props:{style:{color:"#FFA657"}}},{content:"=>",props:{style:{color:"#FF7B72"}}},{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(url));",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" } ",props:{style:{color:"#C9D1D9"}}},{content:"catch",props:{style:{color:"#FF7B72"}}},{content:" (error) {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"error",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'Error running flow:'",props:{style:{color:"#A5D6FF"}}},{content:", error);",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" // Provide error messages",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" if",props:{style:{color:"#FF7B72"}}},{content:" (error ",props:{style:{color:"#C9D1D9"}}},{content:"instanceof ",props:{style:{color:"#FF7B72"}}},{content:"Error",props:{style:{color:"#FFA657"}}},{content:") {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" if",props:{style:{color:"#FF7B72"}}},{content:" (error.message.",props:{style:{color:"#C9D1D9"}}},{content:"includes",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'fetch'",props:{style:{color:"#A5D6FF"}}},{content:")) {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"error",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:"Make sure your Langflow server is running and accessible at:'",props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"LANGFLOW_SERVER_ADDRESS",props:{style:{color:"#79C0FF"}}},{content:");",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" if",props:{style:{color:"#FF7B72"}}},{content:" (error.message.",props:{style:{color:"#C9D1D9"}}},{content:"includes",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'401'",props:{style:{color:"#A5D6FF"}}},{content:") ",props:{style:{color:"#C9D1D9"}}},{content:"||",props:{style:{color:"#FF7B72"}}},{content:" error.message.",props:{style:{color:"#C9D1D9"}}},{content:"includes",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'403'",props:{style:{color:"#A5D6FF"}}},{content:")) {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"error",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:"Check your API key configuration'",props:{style:{color:"#A5D6FF"}}},{content:");",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" if",props:{style:{color:"#FF7B72"}}},{content:" (error.message.",props:{style:{color:"#C9D1D9"}}},{content:"includes",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'404'",props:{style:{color:"#A5D6FF"}}},{content:")) {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"error",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:"Check your Flow ID - make sure it exists and is correct'",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:"}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"// Run the function",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'Starting Langflow Agent...",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:"'",props:{style:{color:"#A5D6FF"}}},{content:");",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"runAgentFlow",props:{style:{color:"#D2A8FF"}}},{content:"().",props:{style:{color:"#C9D1D9"}}},{content:"catch",props:{style:{color:"#D2A8FF"}}},{content:"(console.error);",props:{style:{color:"#C9D1D9"}}}]}],lang:"js"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsx)(e.p,{children:"Save and run the script to send the request and test the flow.\nYour application receives three URLs for recommended used items based on a customer's previous orders in your local CSV, all without changing any code."}),"\n",(0,s.jsxs)(n,{closed:!0,children:[(0,s.jsx)("summary",{children:"Response"}),(0,s.jsx)(e.p,{children:"The following is an example of a response returned from this tutorial's flow. Due to the nature of LLMs and variations in your inputs, your response might be different."}),(0,s.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Starting Langflow Agent...",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"Connecting to Langflow server at: http://localhost:7860",props:{}}]},{tokens:[{content:"Flow ID: local-db-search",props:{}}]},{tokens:[{content:"Email: isabella.rodriguez@example.com",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"Sending request to agent...",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"=== Response from Langflow ===",props:{}}]},{tokens:[{content:"Session ID: isabella.rodriguez@example.com",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"URLs found:",props:{}}]},{tokens:[{content:"https://www.facebook.com/marketplace/258164108225783/electronics/",props:{}}]},{tokens:[{content:"https://www.facebook.com/marketplace/458332108944152/furniture/",props:{}}]},{tokens:[{content:"https://www.facebook.com/marketplace/613732137493719/kitchen-cabinets/",props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["To quickly check traffic to your flow, open the ",(0,s.jsx)(e.strong,{children:"Playground"}),".\nNew sessions appear named after the user's email address.\nKeeping sessions distinct helps the agent maintain context. For more on session IDs, see ",(0,s.jsx)(e.a,{href:"/session-id",children:"Session ID"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(e.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,s.jsx)(e.p,{children:"For more information on building or extending this tutorial, see the following:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.a,{href:"/mcp-server",children:"Model Context Protocol (MCP) servers"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.a,{href:"/deployment-overview",children:"Langflow deployment overview"})}),"\n"]})]})}function D(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/e6c6a4d2.18a5e20e.js b/assets/js/e6c6a4d2.81a844e5.js similarity index 56% rename from assets/js/e6c6a4d2.18a5e20e.js rename to assets/js/e6c6a4d2.81a844e5.js index 17a462049b..9fe470a9e9 100644 --- a/assets/js/e6c6a4d2.18a5e20e.js +++ b/assets/js/e6c6a4d2.81a844e5.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.5.0.post1"},"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 \\"consequat75c\\": \\"\\",\\n \\"minim_d\\": \\"\\"\\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.5.0.post1"},"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 \\"nulla_d8\\": \\"\\",\\n \\"voluptate_3f3\\": \\"\\"\\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/fbcfc90d.6eaab3c4.js b/assets/js/fbcfc90d.6eaab3c4.js new file mode 100644 index 0000000000..24b2a3bc3a --- /dev/null +++ b/assets/js/fbcfc90d.6eaab3c4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[4036],{11470:(e,t,o)=>{o.d(t,{A:()=>w});var n=o(96540),s=o(18215),r=o(23104),l=o(56347),c=o(205),i=o(57485),a=o(31682),h=o(70679);function p(e){return n.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)})?.filter(Boolean)??[]}function d(e){const{values:t,children:o}=e;return(0,n.useMemo)(()=>{const e=t??function(e){return p(e).map(({props:{value:e,label:t,attributes:o,default:n}})=>({value:e,label:t,attributes:o,default:n}))}(o);return function(e){const t=(0,a.XI)(e,(e,t)=>e.value===t.value);if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map(e=>e.value).join(", ")}" found in . Every value needs to be unique.`)}(e),e},[t,o])}function u({value:e,tabValues:t}){return t.some(t=>t.value===e)}function g({queryString:e=!1,groupId:t}){const o=(0,l.W6)(),s=function({queryString:e=!1,groupId:t}){if("string"==typeof e)return e;if(!1===e)return null;if(!0===e&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:e,groupId:t});return[(0,i.aZ)(s),(0,n.useCallback)(e=>{if(!s)return;const t=new URLSearchParams(o.location.search);t.set(s,e),o.replace({...o.location,search:t.toString()})},[s,o])]}function y(e){const{defaultValue:t,queryString:o=!1,groupId:s}=e,r=d(e),[l,i]=(0,n.useState)(()=>function({defaultValue:e,tabValues:t}){if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(e){if(!u({value:e,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${e}" but none of its children has the corresponding value. Available values are: ${t.map(e=>e.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return e}const o=t.find(e=>e.default)??t[0];if(!o)throw new Error("Unexpected error: 0 tabValues");return o.value}({defaultValue:t,tabValues:r})),[a,p]=g({queryString:o,groupId:s}),[y,f]=function({groupId:e}){const t=function(e){return e?`docusaurus.tab.${e}`:null}(e),[o,s]=(0,h.Dv)(t);return[o,(0,n.useCallback)(e=>{t&&s.set(e)},[t,s])]}({groupId:s}),m=(()=>{const e=a??y;return u({value:e,tabValues:r})?e:null})();(0,c.A)(()=>{m&&i(m)},[m]);return{selectedValue:l,selectValue:(0,n.useCallback)(e=>{if(!u({value:e,tabValues:r}))throw new Error(`Can't select invalid tab value=${e}`);i(e),p(e),f(e)},[p,f,r]),tabValues:r}}var f=o(92303);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var x=o(74848);function j({className:e,block:t,selectedValue:o,selectValue:n,tabValues:l}){const c=[],{blockElementScrollPositionUntilNextRender:i}=(0,r.a_)(),a=e=>{const t=e.currentTarget,s=c.indexOf(t),r=l[s].value;r!==o&&(i(t),n(r))},h=e=>{let t=null;switch(e.key){case"Enter":a(e);break;case"ArrowRight":{const o=c.indexOf(e.currentTarget)+1;t=c[o]??c[0];break}case"ArrowLeft":{const o=c.indexOf(e.currentTarget)-1;t=c[o]??c[c.length-1];break}}t?.focus()};return(0,x.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":t},e),children:l.map(({value:e,label:t,attributes:n})=>(0,x.jsx)("li",{role:"tab",tabIndex:o===e?0:-1,"aria-selected":o===e,ref:e=>{c.push(e)},onKeyDown:h,onClick:a,...n,className:(0,s.A)("tabs__item",m.tabItem,n?.className,{"tabs__item--active":o===e}),children:t??e},e))})}function v({lazy:e,children:t,selectedValue:o}){const r=(Array.isArray(t)?t:[t]).filter(Boolean);if(e){const e=r.find(e=>e.props.value===o);return e?(0,n.cloneElement)(e,{className:(0,s.A)("margin-top--md",e.props.className)}):null}return(0,x.jsx)("div",{className:"margin-top--md",children:r.map((e,t)=>(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==o}))})}function C(e){const t=y(e);return(0,x.jsxs)("div",{className:(0,s.A)("tabs-container",m.tabList),children:[(0,x.jsx)(j,{...t,...e}),(0,x.jsx)(v,{...t,...e})]})}function w(e){const t=(0,f.A)();return(0,x.jsx)(C,{...e,children:p(e.children)},String(t))}},14075:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/tutorial-mcp-weather-2073f7de52c423626a6ba308cd62da90.png"},17886:(e,t,o)=>{o.d(t,{A:()=>r});o(96540);var n=o(64058),s=o(74848);function r({name:e,...t}){const o=n[e];return o?(0,s.jsx)(o,{...t}):null}},19365:(e,t,o)=>{o.d(t,{A:()=>l});o(96540);var n=o(18215);const s={tabItem:"tabItem_Ymn6"};var r=o(74848);function l({children:e,hidden:t,className:o}){return(0,r.jsx)("div",{role:"tabpanel",className:(0,n.A)(s.tabItem,o),hidden:t,children:e})}},28378:(e,t,o)=>{o.r(t),o.d(t,{CH:()=>u,assets:()=>d,chCodeConfig:()=>g,contentTitle:()=>p,default:()=>m,frontMatter:()=>h,metadata:()=>n,toc:()=>y});const n=JSON.parse('{"id":"Tutorials/mcp-tutorial","title":"Connect to MCP servers from your application","description":"This tutorial shows you how to connect MCP tools to your applications using Langflow\'s MCP Tools component.","source":"@site/docs/Tutorials/mcp-tutorial.mdx","sourceDirName":"Tutorials","slug":"/mcp-tutorial","permalink":"/mcp-tutorial","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Connect to MCP servers from your application","slug":"/mcp-tutorial"},"sidebar":"docs","previous":{"title":"Connect applications to agents","permalink":"/agent-tutorial"},"next":{"title":"Basic prompting","permalink":"/basic-prompting"}}');var s=o(74848),r=o(28453),l=o(24754),c=o(17886),i=o(11470),a=o(19365);const h={title:"Connect to MCP servers from your application",slug:"/mcp-tutorial"},p=void 0,d={},u={annotations:l.hk,Code:l.Cy},g={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},y=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Create an agentic flow",id:"create-an-agentic-flow",level:2},{value:"Add an MCP Tools component",id:"add-an-mcp-tools-component",level:2},{value:"Add a geolocation server",id:"add-a-geolocation-server",level:2},{value:"Create a Python application that connects to Langflow",id:"create-a-python-application-that-connects-to-langflow",level:2},{value:"Next steps",id:"next-steps",level:2}];function f(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return u||x("CH",!1),u.Code||x("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","\n",(0,s.jsxs)(t.p,{children:["This tutorial shows you how to connect MCP tools to your applications using Langflow's ",(0,s.jsx)(t.a,{href:"/mcp-client",children:(0,s.jsx)(t.strong,{children:"MCP Tools"})})," component."]}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.a,{href:"https://modelcontextprotocol.io/",children:"Model Context Protocol (MCP)"})," helps agents integrate with LLMs through ",(0,s.jsx)(t.em,{children:"MCP clients"})," and ",(0,s.jsx)(t.em,{children:"MCP servers"}),".\nSpecifically, MCP servers host tools that agents (MCP clients) use to complete specialized tasks.\nMCP servers are connected to MCP clients like Cursor.\nThen, you interact with the client, and the client uses tools from the connected servers as needed to complete your requests."]}),"\n",(0,s.jsx)(t.p,{children:"You can run Langflow as an MCP client and an MCP server:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"/mcp-client",children:"Use Langflow as an MCP client"}),": When run as an MCP client, an ",(0,s.jsx)(t.strong,{children:"Agent"})," component in a Langflow flow can use connected components as tools to handle requests.\nYou can use existing components as tools, and you can connect any MCP server to you flow to make that server's tools available to the agent."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"/mcp-server",children:"Use Langflow as an MCP server"}),": When run as an MCP server, your flows become tools that can be used by an MCP client, which could be an external client or another Langflow flow."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["In this tutorial, you will use the Langflow ",(0,s.jsx)(t.strong,{children:"MCP Tools"})," component to connect multiple MCP servers to your flow, and then you'll use a Python application to run your flow and chat with the agent programmatically."]}),"\n",(0,s.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"/get-started-installation",children:"A running Langflow instance"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"/configuration-api-keys",children:"A Langflow API key"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"https://platform.openai.com/api-keys",children:"An OpenAI API key"})}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"This tutorial uses an OpenAI LLM. If you want to use a different provider, you need a valid credential for that provider."}),"\n",(0,s.jsx)(t.h2,{id:"create-an-agentic-flow",children:"Create an agentic flow"}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["In Langflow, click ",(0,s.jsx)(t.strong,{children:"New Flow"}),", and then select the ",(0,s.jsx)(t.a,{href:"/simple-agent",children:(0,s.jsx)(t.strong,{children:"Simple agent"})})," template."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["In the ",(0,s.jsx)(t.strong,{children:"Agent"})," component, enter your OpenAI API key."]}),"\n",(0,s.jsxs)(t.p,{children:["If you want to use a different provider or model, edit the ",(0,s.jsx)(t.strong,{children:"Model Provider"}),", ",(0,s.jsx)(t.strong,{children:"Model Name"}),", and ",(0,s.jsx)(t.strong,{children:"API Key"})," fields accordingly."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["To test the flow, click ",(0,s.jsx)(c.A,{name:"Play","aria-hidden":"true"})," ",(0,s.jsx)(t.strong,{children:"Playground"}),", and then ask the LLM ",(0,s.jsx)(t.code,{children:"Is it safe to go hiking in the Adirondacks today?"})]}),"\n",(0,s.jsxs)(t.p,{children:["This query demonstrates how an LLM, by itself, might not have access to information or functions designed to address specialized queries. In this example, the default OpenAI model provides a vague response, although the agent does know the current date by using its internal ",(0,s.jsx)(t.code,{children:"get_current_date"})," function."]}),"\n",(0,s.jsx)(u.Code,{codeConfig:g,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Today is July 11, 2025.",props:{}}]},{tokens:[{content:"To determine if it's safe to go hiking in the Adirondacks today, you should check the current weather conditions, trail advisories, and any local alerts (such as bear activity or flooding).",props:{}}]},{tokens:[{content:"Would you like a detailed weather forecast or information on trail conditions for the Adirondacks today?",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsx)(t.p,{children:"To improve the response, you can connect MCP servers to your flow that provide specialized tools for the agent to use when generating responses. In the next part of this tutorial, you'll connect an MCP server that provides the agent with real-time weather information so that it can generate a more specific response."}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"add-an-mcp-tools-component",children:"Add an MCP Tools component"}),"\n",(0,s.jsx)(t.p,{children:"There are many MCP servers available online that offer different tools for different tasks.\nTo use an MCP server with an MCP client, you have to make the server available to the client.\nWith all MCP clients, there are several ways to do this:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Install the server locally."}),"\n",(0,s.jsxs)(t.li,{children:["Use ",(0,s.jsx)(t.code,{children:"uvx"})," or ",(0,s.jsx)(t.code,{children:"npx"})," to fetch and run a server package."]}),"\n",(0,s.jsx)(t.li,{children:"Call a server running remotely, like those available on Smithery."}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["This tutorial demonstrates how to install a weather server locally with ",(0,s.jsx)(t.code,{children:"uv pip install"}),", and how to use ",(0,s.jsx)(t.code,{children:"npx"})," to run the geolocation server package.\nYour particular MCP server's requirements may vary."]}),"\n",(0,s.jsxs)(t.p,{children:["In Langflow, you use the ",(0,s.jsx)(t.strong,{children:"MCP Tools"})," component to connect a specific MCP server to a flow.\nYou need one ",(0,s.jsx)(t.strong,{children:"MCP Tools"})," component for each MCP server that you want your flow to use."]}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["For this tutorial, install a ",(0,s.jsx)(t.a,{href:"https://github.com/isdaniel/mcp_weather_server",children:"weather MCP server"})," on your local machine with uv and Python:"]}),"\n",(0,s.jsx)(u.Code,{codeConfig:g,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"uv ",props:{style:{color:"#FFA657"}}},{content:"pip install mcp_weather_server",props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]}),"\n",(0,s.jsx)(t.p,{children:"Make sure you install the server in the same Python environment where Langflow is running:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:"Langflow in a virtual environment: Activate the environment before installing the server."}),"\n",(0,s.jsx)(t.li,{children:"Langflow Docker image: Install the server inside the Docker container."}),"\n",(0,s.jsx)(t.li,{children:"Langflow Desktop or system-wide Langflow OSS: Install the server globally or in the same user environment where you run Langflow."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["In your ",(0,s.jsx)(t.strong,{children:"Simple agent"})," flow, remove the ",(0,s.jsx)(t.strong,{children:"URL"})," and ",(0,s.jsx)(t.strong,{children:"Calculator"})," tools, and then add the ",(0,s.jsx)(t.a,{href:"/mcp-client",children:(0,s.jsx)(t.strong,{children:"MCP Tools"})})," component to your workspace."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Click the ",(0,s.jsx)(t.strong,{children:"MCP Tools"})," component, and then click ",(0,s.jsx)(c.A,{name:"Plus","aria-hidden":"true"})," ",(0,s.jsx)(t.strong,{children:"Add MCP Server"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["In the ",(0,s.jsx)(t.strong,{children:"Add MCP Server"})," pane, provide the server startup command and arguments to connect the weather MCP server to your flow. For this tutorial, use either the ",(0,s.jsx)(t.strong,{children:"JSON"})," or ",(0,s.jsx)(t.strong,{children:"STDIO"})," option."]}),"\n",(0,s.jsx)(t.p,{children:"Langflow runs the command to launch the server when the agent determines that it needs to use a tool provided by that server."}),"\n",(0,s.jsx)(t.p,{children:"Notice that both configurations provide the same information but in different formats.\nThis means that if your MCP server repository only provides a JSON file for the server, you can still use those values with the STDIO option."}),"\n",(0,s.jsxs)(i.A,{children:[(0,s.jsxs)(a.A,{value:"JSON",label:"JSON",default:!0,children:[(0,s.jsxs)(t.p,{children:["To provide the MCP server configuration as a JSON object, select ",(0,s.jsx)(t.strong,{children:"JSON"}),", and then paste the server configuration into the ",(0,s.jsx)(t.strong,{children:"JSON"})," field:"]}),(0,s.jsx)(u.Code,{codeConfig:g,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "mcpServers"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "weather"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "command"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"python"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "args"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "-m"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "mcp_weather_server"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "disabled"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "autoApprove"',props:{style:{color:"#7EE787"}}},{content:": []",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),(0,s.jsxs)(a.A,{value:"STDIO",label:"STDIO",children:[(0,s.jsxs)(t.p,{children:["To provide the MCP server configuration in a GUI format, select ",(0,s.jsx)(t.strong,{children:"STDIO"}),", and then enter the MCP server configuration values into the given fields:"]}),(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Name"}),": ",(0,s.jsx)(t.code,{children:"weather"})]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Command"}),": ",(0,s.jsx)(t.code,{children:"python"})]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Arguments"}),":","\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.code,{children:"-m"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.code,{children:"mcp_weather_server"})}),"\n"]}),"\n"]}),"\n"]})]})]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Click ",(0,s.jsx)(t.strong,{children:"Add Server"}),", and then wait for the ",(0,s.jsx)(t.strong,{children:"Actions"})," list to populate. This means that the MCP server successfully connected."]}),"\n",(0,s.jsxs)(t.p,{children:["With this weather server, the ",(0,s.jsx)(t.strong,{children:"MCP Tools"})," component also adds an optional ",(0,s.jsx)(t.strong,{children:"City"})," field.\nFor this tutorial, don't enter anything in this field.\nInstead, you will add a geolocation MCP server in the next step, which the agent will use to detect your location."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Click the ",(0,s.jsx)(t.strong,{children:"MCP Tools"})," component, enable ",(0,s.jsx)(t.strong,{children:"Tool Mode"})," in the component's header menu, and then connect the component's ",(0,s.jsx)(t.strong,{children:"Toolset"})," port to the ",(0,s.jsx)(t.strong,{children:"Agent"})," component's ",(0,s.jsx)(t.strong,{children:"Tools"})," port."]}),"\n",(0,s.jsx)(t.p,{children:"At this point your flow has four connected components:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["The ",(0,s.jsx)(t.strong,{children:"Chat Input"})," component is connected to the ",(0,s.jsx)(t.strong,{children:"Agent"})," component's ",(0,s.jsx)(t.strong,{children:"Input"})," port. This allows to flow to be triggered by an incoming prompt from a user or application."]}),"\n",(0,s.jsxs)(t.li,{children:["The ",(0,s.jsx)(t.strong,{children:"MCP Tools"})," component with the weather MCP server is connected to the ",(0,s.jsx)(t.strong,{children:"Agent"})," component's ",(0,s.jsx)(t.strong,{children:"Tools"})," port. The agent may not use this server for every request; the agent only uses this connection if it decides the server can help respond to the prompt."]}),"\n",(0,s.jsxs)(t.li,{children:["The ",(0,s.jsx)(t.strong,{children:"Agent"})," component's ",(0,s.jsx)(t.strong,{children:"Output"})," port is connected to the ",(0,s.jsx)(t.strong,{children:"Chat Output"})," component, which returns the final response to the user or application."]}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"An agent component connected to an MCP weather server",src:o(14075).A+"",width:"4000",height:"2282"})}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["To test the weather MCP server, click ",(0,s.jsx)(c.A,{name:"Play","aria-hidden":"true"})," ",(0,s.jsx)(t.strong,{children:"Playground"}),", and then ask the LLM ",(0,s.jsx)(t.code,{children:"Is it safe to go hiking in the Adirondacks today?"})]}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.strong,{children:"Playground"})," shows you the agent's logic as it analyzes the request and select tools to use."]}),"\n",(0,s.jsx)(t.p,{children:"Ideally, the agent's response will be more specific than the previous response because of the additional context provided by the weather MCP server.\nFor example:"}),"\n",(0,s.jsx)(u.Code,{codeConfig:g,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"The current weather in Lake Placid, a central location in the Adirondacks,",props:{}}]},{tokens:[{content:"is foggy with a temperature of 17.2\xb0C (about 63\xb0F).",props:{}}]},{tokens:[{content:"If you plan to go hiking today, be cautious as fog can reduce visibility",props:{}}]},{tokens:[{content:"on trails and make navigation more difficult.",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsx)(t.p,{children:"This is a better response, but what makes this MCP server more valuable than just calling a weather API?"}),"\n",(0,s.jsx)(t.p,{children:"First, MCP servers are often customized for specific tasks, such as highly specialized actions or chained tools for complex, multi-step problem solving.\nTypically, you would have to write a custom script for a specific task, possibly including multiple API calls in a single script, and then you would have to either execute this script outside the context of the agent or provide it to your agent in some way."}),"\n",(0,s.jsx)(t.p,{children:"Instead, the MCP ensures that all MCP servers are added to agents in the same way, without having to know each server's specific endpoint structures or write custom integrations.\nThe MCP is a standardized way to integrate many diverse tools into agentic applications.\nYou don't have to learn a new API or write custom code every time you want to use a new MCP server."}),"\n",(0,s.jsxs)(t.p,{children:["Additionally, you can attach many MCP servers to one agent, depending on the problems you want your application to solve.\nThe more servers you add, the more specialized context the agent can use in its responses.\nIn this tutorial, adding the weather MCP server already improved the quality of the LLM's response.\nIn the next section of the tutorial, you will add a ",(0,s.jsx)(t.code,{children:"ip_geolocation"})," MCP server so the agent can detect the user's location if they don't specify a location in their prompt."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"add-a-geolocation-server",children:"Add a geolocation server"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.a,{href:"https://github.com/cyanheads/toolkit-mcp-server",children:"Toolkit MCP server"})," includes multiple MCP tools for network monitoring, including IP geolocation. It isn't extremely precise, but it doesn't require an API key."]}),"\n",(0,s.jsx)(t.p,{children:"Note that this tool returns the IP geolocation of your Langflow server, so if your server is deployed remotely, consider alternative approaches for getting user-specific location data, such as browser geolocation APIs."}),"\n",(0,s.jsxs)(t.p,{children:["This MCP server can be started with one ",(0,s.jsx)(t.a,{href:"https://docs.npmjs.com/cli/v8/commands/npx",children:"npx"})," command, which downloads and runs the ",(0,s.jsx)(t.a,{href:"https://www.npmjs.com/package/@cyanheads/toolkit-mcp-server",children:"Toolkit MCP server Node registry package"})," without installing the package locally."]}),"\n",(0,s.jsx)(t.p,{children:"To add the Toolkip MCP server to your flow, do the following:"}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Add another ",(0,s.jsx)(t.strong,{children:"MCP Tools"})," component to your flow, click the component, and then click ",(0,s.jsx)(c.A,{name:"Plus","aria-hidden":"true"})," ",(0,s.jsx)(t.strong,{children:"Add MCP Server"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Select ",(0,s.jsx)(t.strong,{children:"STDIO"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["For ",(0,s.jsx)(t.strong,{children:"Name"}),", enter ",(0,s.jsx)(t.code,{children:"ip_geolocation"}),"."]}),"\n",(0,s.jsx)(t.admonition,{type:"tip",children:(0,s.jsx)(t.p,{children:"The tool name and description help the agent select tools.\nIf your agent is struggling to select tools, make sure the names and descriptions are clear and human-readable."})}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["For ",(0,s.jsx)(t.strong,{children:"Command"}),", enter ",(0,s.jsx)(t.code,{children:"npx @cyanheads/toolkit-mcp-server"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Click ",(0,s.jsx)(t.strong,{children:"Add Server"}),", and then wait for the ",(0,s.jsx)(t.strong,{children:"Actions"})," list to populate. This means that the MCP server successfully connected."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Click the ",(0,s.jsx)(t.strong,{children:"MCP Tools"})," component, enable ",(0,s.jsx)(t.strong,{children:"Tool Mode"})," in the component's header menu, and then connect the component's ",(0,s.jsx)(t.strong,{children:"Toolset"})," port to the ",(0,s.jsx)(t.strong,{children:"Agent"})," component's ",(0,s.jsx)(t.strong,{children:"Tools"})," port."]}),"\n",(0,s.jsxs)(t.p,{children:["Your flow now has an additional ",(0,s.jsx)(t.strong,{children:"MCP Tools"})," component for a total of five components."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"An agent component connected to MCP weather and geolocation servers",src:o(80821).A+"",width:"1936",height:"1410"})}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"create-a-python-application-that-connects-to-langflow",children:"Create a Python application that connects to Langflow"}),"\n",(0,s.jsxs)(t.p,{children:["At this point, you can open the ",(0,s.jsx)(t.strong,{children:"Playground"})," and ask about the weather in your current location to test the IP geolocation tool.\nHowever, geolocation tools are most useful in applications where you or your users want to ask about the weather from different places around the world."]}),"\n",(0,s.jsx)(t.p,{children:"In the last part of this tutorial, you'll learn how to use the Langflow API to run a flow in a script.\nThis could be part of a larger application, such as a mobile app where users want to know if the weather is good for a particular sport."}),"\n",(0,s.jsx)(t.p,{children:"When you use the Langflow API to run a flow, you can change some aspects of the flow without changing the code.\nFor example, you can add more MCP servers to your flow in Langflow, and then use the same script to run the flow.\nYou can use the same input or a new input that prompts the agent to use other tools."}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"For this tutorial's Python script, gather the following information:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"LANGFLOW_SERVER_ADDRESS"}),": Your Langflow server's domain. The default value is ",(0,s.jsx)(t.code,{children:"127.0.0.1:7860"}),". You can get this value from the code snippets on your flow's ",(0,s.jsxs)(t.a,{href:"/concepts-publish#api-access",children:[(0,s.jsx)(t.strong,{children:"API access"})," pane"]}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"FLOW_ID"}),": Your flow's UUID or custom endpoint name. You can get this value from the code snippets on your flow's ",(0,s.jsxs)(t.a,{href:"/concepts-publish#api-access",children:[(0,s.jsx)(t.strong,{children:"API access"})," pane"]}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"LANGFLOW_API_KEY"}),": A valid Langflow API key. To create an API key, see ",(0,s.jsx)(t.a,{href:"/configuration-api-keys",children:"API keys"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"Copy the following script into a Python file, and then replace the placeholders with the information you gathered in the previous step:"}),"\n",(0,s.jsx)(u.Code,{codeConfig:g,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" requests",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" os",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"url ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID" ',props:{style:{color:"#A5D6FF"}}},{content:"# The complete API endpoint URL for this flow",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# Request payload configuration",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"payload ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "output_type"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"chat"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "input_type"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"chat"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "input_value"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"What\'s the weather like where I am right now?"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# Request headers",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"headers ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "Content-Type"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"application/json"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "x-api-key"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"LANGFLOW_API_KEY"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"try",props:{style:{color:"#FF7B72"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" # Send API request",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" response ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" requests.request(",props:{style:{color:"#C9D1D9"}}},{content:'"POST"',props:{style:{color:"#A5D6FF"}}},{content:", url, ",props:{style:{color:"#C9D1D9"}}},{content:"json",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"payload, ",props:{style:{color:"#C9D1D9"}}},{content:"headers",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"headers)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" response.raise_for_status() ",props:{style:{color:"#C9D1D9"}}},{content:"# Raise exception for bad status codes",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" # Parse and print only the message text",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" data ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" response.json()",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" message ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" data[",props:{style:{color:"#C9D1D9"}}},{content:'"outputs"',props:{style:{color:"#A5D6FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:"0",props:{style:{color:"#79C0FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:'"outputs"',props:{style:{color:"#A5D6FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:"0",props:{style:{color:"#79C0FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:'"results"',props:{style:{color:"#A5D6FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:'"message"',props:{style:{color:"#A5D6FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:'"text"',props:{style:{color:"#A5D6FF"}}},{content:"]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" print",props:{style:{color:"#79C0FF"}}},{content:"(message)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"except",props:{style:{color:"#FF7B72"}}},{content:" requests.exceptions.RequestException ",props:{style:{color:"#C9D1D9"}}},{content:"as",props:{style:{color:"#FF7B72"}}},{content:" e:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" print",props:{style:{color:"#79C0FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"f",props:{style:{color:"#FF7B72"}}},{content:'"Error making API request: ',props:{style:{color:"#A5D6FF"}}},{content:"{",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"}}}]},{tokens:[{content:"except ",props:{style:{color:"#FF7B72"}}},{content:"ValueError ",props:{style:{color:"#79C0FF"}}},{content:"as",props:{style:{color:"#FF7B72"}}},{content:" e:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" print",props:{style:{color:"#79C0FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"f",props:{style:{color:"#FF7B72"}}},{content:'"Error parsing response: ',props:{style:{color:"#A5D6FF"}}},{content:"{",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"}}}]},{tokens:[{content:"except",props:{style:{color:"#FF7B72"}}},{content:" (",props:{style:{color:"#C9D1D9"}}},{content:"KeyError",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"IndexError",props:{style:{color:"#79C0FF"}}},{content:") ",props:{style:{color:"#C9D1D9"}}},{content:"as",props:{style:{color:"#FF7B72"}}},{content:" e:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" print",props:{style:{color:"#79C0FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"f",props:{style:{color:"#FF7B72"}}},{content:'"Error extracting message from response: ',props:{style:{color:"#A5D6FF"}}},{content:"{",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:["Notice that this script uses a different prompt than the previous ",(0,s.jsx)(t.strong,{children:"Playground"})," examples.\nIn this script, the ",(0,s.jsx)(t.code,{children:"input_value"})," asks about the weather in the user's current location without providing any hints about the user's location, such as a particular city."]}),"\n",(0,s.jsx)(t.p,{children:"Additionally, this script includes parsing code to extract the LLM's reply from the entire Langflow API response.\nYou will want to use similar extraction in your own applications because the Langflow API response includes metadata and other information that isn't relevant to the reply passed to the user."}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"Save and run the script to send the request and test the flow."}),"\n",(0,s.jsxs)(t.p,{children:["The agent uses the ",(0,s.jsx)(t.code,{children:"ip_geolocation"})," tool to detect the requester's location, and then it uses the ",(0,s.jsx)(t.code,{children:"weather"})," tool to retrieve weather information for that location.\nFor example:"]}),"\n",(0,s.jsx)(u.Code,{codeConfig:g,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"The weather in Waynesboro, Pennsylvania, is currently overcast with a temperature of 23.0\xb0C (about 73.4\xb0F).",props:{}}]},{tokens:[{content:"If you need more details or have any other questions, feel free to ask!",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsxs)(t.p,{children:["Remember, the ",(0,s.jsx)(t.code,{children:"ip_geolocation"})," tool used in this tutorial uses your Langflow server's location, which can be different from your actual location."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,s.jsx)(t.p,{children:"To continue building on the concepts introduced in this tutorial, see the following:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"/mcp-client",children:"Use Langflow as an MCP client"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"/agents",children:"Use Langflow Agents"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"/mcp-server",children:"Use Langflow as an MCP server"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"/deployment-overview",children:"Langflow deployment overview"})}),"\n"]})]})}function m(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(f,{...e})}):f(e)}function x(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},80821:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/tutorial-mcp-geolocation-b8140a46fa3a3ef20ed15dc6cf4a9060.png"}}]); \ No newline at end of file diff --git a/assets/js/main.0e1b5a24.js b/assets/js/main.0e1b5a24.js new file mode 100644 index 0000000000..c6de315c51 --- /dev/null +++ b/assets/js/main.0e1b5a24.js @@ -0,0 +1,2 @@ +/*! For license information please see main.0e1b5a24.js.LICENSE.txt */ +(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[8792],{205:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(96540);const o=n(38193).A.canUseDOM?r.useLayoutEffect:r.useEffect},641:(e,t,n)=>{"use strict";n.r(t)},1093:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var n=t.call(e),r="[object Arguments]"===n;return r||(r="[object Array]"!==n&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),r}},1189:(e,t,n)=>{"use strict";var r=Array.prototype.slice,o=n(1093),a=Object.keys,i=a?function(e){return a(e)}:n(28875),l=Object.keys;i.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return o(e)?l(r.call(e)):l(e)})}else Object.keys=i;return Object.keys||i},e.exports=i},2694:(e,t,n)=>{"use strict";var r=n(6925);function o(){}function a(){}a.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,a,i){if(i!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:o};return n.PropTypes=n,n}},2833:e=>{e.exports=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;for(var l=Object.prototype.hasOwnProperty.bind(t),s=0;s{"use strict";n.d(t,{C:()=>r});const r="default"},3918:(e,t,n)=>{"use strict";var r=n(65606);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function a(e){for(var t=1;te.length)&&(n=e.length),e.substring(n-t.length,n)===t}var w="",x="",k="",S="",E={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function _(e){var t=Object.keys(e),n=Object.create(Object.getPrototypeOf(e));return t.forEach(function(t){n[t]=e[t]}),Object.defineProperty(n,"message",{value:e.message}),n}function j(e){return b(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function O(e,t,n){var o="",a="",i=0,l="",s=!1,c=j(e),u=c.split("\n"),d=j(t).split("\n"),p=0,f="";if("strictEqual"===n&&"object"===g(e)&&"object"===g(t)&&null!==e&&null!==t&&(n="strictEqualObject"),1===u.length&&1===d.length&&u[0]!==d[0]){var m=u[0].length+d[0].length;if(m<=10){if(!("object"===g(e)&&null!==e||"object"===g(t)&&null!==t||0===e&&0===t))return"".concat(E[n],"\n\n")+"".concat(u[0]," !== ").concat(d[0],"\n")}else if("strictEqualObject"!==n){if(m<(r.stderr&&r.stderr.isTTY?r.stderr.columns:80)){for(;u[0][p]===d[0][p];)p++;p>2&&(f="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var n=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,n-e.length)}(" ",p),"^"),p=0)}}}for(var h=u[u.length-1],b=d[d.length-1];h===b&&(p++<2?l="\n ".concat(h).concat(l):o=h,u.pop(),d.pop(),0!==u.length&&0!==d.length);)h=u[u.length-1],b=d[d.length-1];var y=Math.max(u.length,d.length);if(0===y){var _=c.split("\n");if(_.length>30)for(_[26]="".concat(w,"...").concat(S);_.length>27;)_.pop();return"".concat(E.notIdentical,"\n\n").concat(_.join("\n"),"\n")}p>3&&(l="\n".concat(w,"...").concat(S).concat(l),s=!0),""!==o&&(l="\n ".concat(o).concat(l),o="");var O=0,A=E[n]+"\n".concat(x,"+ actual").concat(S," ").concat(k,"- expected").concat(S),C=" ".concat(w,"...").concat(S," Lines skipped");for(p=0;p1&&p>2&&(P>4?(a+="\n".concat(w,"...").concat(S),s=!0):P>3&&(a+="\n ".concat(d[p-2]),O++),a+="\n ".concat(d[p-1]),O++),i=p,o+="\n".concat(k,"-").concat(S," ").concat(d[p]),O++;else if(d.length1&&p>2&&(P>4?(a+="\n".concat(w,"...").concat(S),s=!0):P>3&&(a+="\n ".concat(u[p-2]),O++),a+="\n ".concat(u[p-1]),O++),i=p,a+="\n".concat(x,"+").concat(S," ").concat(u[p]),O++;else{var T=d[p],I=u[p],R=I!==T&&(!v(I,",")||I.slice(0,-1)!==T);R&&v(T,",")&&T.slice(0,-1)===I&&(R=!1,I+=","),R?(P>1&&p>2&&(P>4?(a+="\n".concat(w,"...").concat(S),s=!0):P>3&&(a+="\n ".concat(u[p-2]),O++),a+="\n ".concat(u[p-1]),O++),i=p,a+="\n".concat(x,"+").concat(S," ").concat(I),o+="\n".concat(k,"-").concat(S," ").concat(T),O+=2):(a+=o,o="",1!==P&&0!==p||(a+="\n ".concat(I),O++))}if(O>20&&p30)for(f[26]="".concat(w,"...").concat(S);f.length>27;)f.pop();t=1===f.length?p.call(this,"".concat(d," ").concat(f[0])):p.call(this,"".concat(d,"\n\n").concat(f.join("\n"),"\n"))}else{var m=j(i),h="",b=E[o];"notDeepEqual"===o||"notEqual"===o?(m="".concat(E[o],"\n\n").concat(m)).length>1024&&(m="".concat(m.slice(0,1021),"...")):(h="".concat(j(l)),m.length>512&&(m="".concat(m.slice(0,509),"...")),h.length>512&&(h="".concat(h.slice(0,509),"...")),"deepEqual"===o||"equal"===o?m="".concat(b,"\n\n").concat(m,"\n\nshould equal\n\n"):h=" ".concat(o," ").concat(h)),t=p.call(this,"".concat(m).concat(h))}return Error.stackTraceLimit=s,t.generatedMessage=!n,Object.defineProperty(u(t),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),t.code="ERR_ASSERTION",t.actual=i,t.expected=l,t.operator=o,Error.captureStackTrace&&Error.captureStackTrace(u(t),a),t.stack,t.name="AssertionError",c(t)}return i=v,(s=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(e,t){return b(this,a(a({},t),{},{customInspect:!1,depth:0}))}}])&&l(i.prototype,s),d&&l(i,d),Object.defineProperty(i,"prototype",{writable:!1}),v}(d(Error),b.custom);e.exports=A},4146:(e,t,n)=>{"use strict";var r=n(44363),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},a={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},i={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function s(e){return r.isMemo(e)?i:l[e.$$typeof]||o}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=i;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,f=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var o=f(n);o&&o!==m&&e(t,o,r)}var i=u(n);d&&(i=i.concat(d(n)));for(var l=s(t),h=s(n),g=0;g{"use strict";n.d(t,{A:()=>r});const r={title:"Langflow Documentation",tagline:"Langflow is a low-code app builder for RAG and multi-agent AI applications.",favicon:"img/favicon.ico",url:"https://docs.langflow.org",baseUrl:"/",onBrokenLinks:"throw",onBrokenMarkdownLinks:"warn",onBrokenAnchors:"warn",organizationName:"langflow-ai",projectName:"langflow",trailingSlash:!1,staticDirectories:["static"],i18n:{defaultLocale:"en",locales:["en"],path:"i18n",localeConfigs:{}},headTags:[{tagName:"link",attributes:{rel:"stylesheet",href:"https://fonts.googleapis.com/css2?family=Sora:wght@550;600&display=swap"}},{tagName:"script",attributes:{},innerHTML:'!function(){window.semaphore=window.semaphore||[],window.ketch=function(){window.semaphore.push(arguments)};var e=document.createElement("script");e.type="text/javascript",e.src="https://global.ketchcdn.com/web/v3/config/datastax/langflow_org_web/boot.js",e.defer=e.async=!0,document.getElementsByTagName("head")[0].appendChild(e)}();'},{tagName:"script",attributes:{defer:"true"},innerHTML:"\n ;(function () {\n const onKetchConsentGtagTrack = (consent) => {\n if (window.gtag &&\n consent.purposes &&\n 'analytics' in consent.purposes &&\n 'targeted_advertising' in consent.purposes\n ) {\n const analyticsString = consent.purposes.analytics === true ? 'granted' : 'denied'\n const targetedAdsString = consent.purposes.targeted_advertising === true ? 'granted' : 'denied'\n const gtagObject = {\n analytics_storage: analyticsString,\n ad_personalization: targetedAdsString,\n ad_storage: targetedAdsString,\n ad_user_data: targetedAdsString,\n }\n window.gtag('consent', 'update', gtagObject)\n }\n }\n if (window.ketch) {\n window.ketch('on', 'consent', onKetchConsentGtagTrack)\n }\n })()\n "}],presets:[["docusaurus-preset-openapi",{api:{path:"openapi.json",routeBasePath:"/api"},docs:{routeBasePath:"/",sidebarPath:"/home/runner/work/langflow/langflow/docs/sidebars.js",sidebarCollapsed:!0,beforeDefaultRemarkPlugins:[[null,{theme:"github-dark",showCopyButton:!0,lineNumbers:!0}]]},sitemap:{lastmod:"datetime",changefreq:null,priority:null,ignorePatterns:["/preferences"]},gtag:{trackingID:"G-SLQFLQ3KPT"},blog:!1,theme:{customCss:["/home/runner/work/langflow/langflow/docs/node_modules/@code-hike/mdx/dist/index.css","/home/runner/work/langflow/langflow/docs/css/custom.css","/home/runner/work/langflow/langflow/docs/css/docu-notion-styles.css","/home/runner/work/langflow/langflow/docs/css/gifplayer.css"]}}]],plugins:[["docusaurus-node-polyfills",{excludeAliases:["console"]}],"docusaurus-plugin-image-zoom",["./src/plugins/segment",{segmentPublicWriteKey:"60AfGDrVxy8nAGJngo3fCYWG4LvhMAlG",allowedInDev:!0}],["./src/plugins/scroll-tracking",{segmentPublicWriteKey:"60AfGDrVxy8nAGJngo3fCYWG4LvhMAlG",allowedInDev:!0,selectors:[{selector:"h1, h2, h3, h4, h5, h6",eventName:"Docs.langflow.org - Heading Viewed",properties:{element_type:"heading"}},{selector:".ch-codeblock",eventName:"Docs.langflow.org - Codeblock Viewed",properties:{element_type:"code",language:"helper:codeLanguage"}}]}],["@docusaurus/plugin-client-redirects",{redirects:[{to:"/",from:["/whats-new-a-new-chapter-langflow","/\ud83d\udc4b Welcome-to-Langflow","/getting-started-welcome-to-langflow","/guides-new-to-llms"]},{to:"/get-started-installation",from:["/getting-started-installation","/getting-started-common-installation-issues"]},{to:"/get-started-quickstart",from:"/getting-started-quickstart"},{to:"concepts-overview",from:["/workspace-overview","/365085a8-a90a-43f9-a779-f8769ec7eca1","/My-Collection","/workspace","/settings-project-general-settings"]},{to:"/concepts-components",from:["/components","/components-overview"]},{to:"/configuration-global-variables",from:"/settings-global-variables"},{to:"/concepts-playground",from:["/workspace-playground","/workspace-logs","/guides-chat-memory"]},{to:"/concepts-objects",from:["/guides-data-message","/configuration-objects"]},{to:"/blog-writer",from:["/starter-projects-blog-writer","/tutorials-blog-writer"]},{to:"/memory-chatbot",from:["/starter-projects-memory-chatbot","/tutorials-memory-chatbot"]},{to:"/document-qa",from:["/starter-projects-document-qa","/tutorials-document-qa"]},{to:"/simple-agent",from:["/math-agent","/starter-projects-simple-agent","/starter-projects-math-agent","/tutorials-math-agent"]},{to:"/sequential-agent",from:["/starter-projects-sequential-agent","/tutorials-sequential-agent"]},{to:"/travel-planning-agent",from:["/starter-projects-travel-planning-agent","/tutorials-travel-planning-agent","/starter-projects-dynamic-agent/"]},{to:"/components-vector-stores",from:"/components-rag"},{to:"/configuration-authentication",from:["/configuration-security-best-practices","/Configuration/configuration-security-best-practices"]},{to:"/environment-variables",from:["/configuration-auto-saving","/Configuration/configuration-auto-saving","/configuration-backend-only","/Configuration/configuration-backend-only"]},{to:"/concepts-publish",from:["/concepts-api","/workspace-api"]},{to:"/components-custom-components",from:"/components/custom"},{to:"/components-bundle-components",from:"/components-loaders"},{to:"/mcp-server",from:"/integrations-mcp"},{to:"/integrations-nvidia-g-assist",from:"/integrations-nvidia-system-assist"},{to:"/deployment-kubernetes-dev",from:"/deployment-kubernetes"},{to:"/basic-prompting",from:"/starter-projects-basic-prompting"},{to:"/vector-store-rag",from:"/starter-projects-vector-store-rag"},{to:"/contributing-github-issues",from:"/contributing-github-discussions"},{to:"/agents",from:"/agents-tool-calling-agent-component"},{to:"/concepts-publish",from:"/embedded-chat-widget"},{to:"/components-data",from:"/integrations-setup-google-oauth-langflow"}]}],null],themeConfig:{navbar:{hideOnScroll:!0,logo:{alt:"Langflow",src:"img/lf-docs-light.svg",srcDark:"img/lf-docs-dark.svg"},items:[{position:"right",href:"https://github.com/langflow-ai/langflow",className:"header-github-link",target:"_blank",rel:null,"data-event":"Docs.langflow.org - Social Clicked","data-platform":"github"},{position:"right",href:"https://twitter.com/langflow_ai",className:"header-twitter-link",target:"_blank",rel:null,"data-event":"Docs.langflow.org - Social Clicked","data-platform":"x"},{position:"right",href:"https://discord.gg/EqksyE2EX9",className:"header-discord-link",target:"_blank",rel:null,"data-event":"Docs.langflow.org - Social Clicked","data-platform":"discord"}]},colorMode:{defaultMode:"light",disableSwitch:!1,respectPrefersColorScheme:!0},prism:{theme:{plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},darkTheme:{plain:{color:"#F8F8F2",backgroundColor:"#282A36"},styles:[{types:["prolog","constant","builtin"],style:{color:"rgb(189, 147, 249)"}},{types:["inserted","function"],style:{color:"rgb(80, 250, 123)"}},{types:["deleted"],style:{color:"rgb(255, 85, 85)"}},{types:["changed"],style:{color:"rgb(255, 184, 108)"}},{types:["punctuation","symbol"],style:{color:"rgb(248, 248, 242)"}},{types:["string","char","tag","selector"],style:{color:"rgb(255, 121, 198)"}},{types:["keyword","variable"],style:{color:"rgb(189, 147, 249)",fontStyle:"italic"}},{types:["comment"],style:{color:"rgb(98, 114, 164)"}},{types:["attr-name"],style:{color:"rgb(241, 250, 140)"}}]},additionalLanguages:[],magicComments:[{className:"theme-code-block-highlighted-line",line:"highlight-next-line",block:{start:"highlight-start",end:"highlight-end"}}]},zoom:{selector:".markdown :not(a) > img:not(.no-zoom)",background:{light:"rgba(240, 240, 240, 0.9)"},config:{}},docs:{sidebar:{hideable:!1,autoCollapseCategories:!1},versionPersistence:"localStorage"},footer:{logo:{alt:"Langflow",src:"img/lf-docs-light.svg",srcDark:"img/lf-docs-dark.svg",width:160,height:40},links:[{title:null,items:[{html:''}]}],style:"light"},algolia:{appId:"UZK6BDPCVY",apiKey:"adbd7686dceb1cd510d5ce20d04bf74c",indexName:"langflow",contextualSearch:!0,searchParameters:{},searchPagePath:"search"},blog:{sidebar:{groupByYear:!0}},metadata:[],tableOfContents:{minHeadingLevel:2,maxHeadingLevel:3}},baseUrlIssueBanner:!0,future:{v4:{removeLegacyPostBuildHeadAttribute:!1,useCssCascadeLayers:!1},experimental_faster:{swcJsLoader:!1,swcJsMinimizer:!1,swcHtmlMinimizer:!1,lightningCssMinimizer:!1,mdxCrossCompilerCache:!1,rspackBundler:!1,rspackPersistentCache:!1,ssgWorkerThreads:!1},experimental_storage:{type:"localStorage",namespace:!1},experimental_router:"browser"},onDuplicateRoutes:"warn",customFields:{},themes:[],scripts:[],stylesheets:[],clientModules:[],titleDelimiter:"|",noIndex:!1,markdown:{format:"mdx",mermaid:!1,mdx1Compat:{comments:!0,admonitions:!0,headingIds:!0},anchors:{maintainCase:!1}}}},5260:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});n(96540);var r=n(80545),o=n(74848);function a(e){return(0,o.jsx)(r.mg,{...e})}},5338:(e,t,n)=>{"use strict";var r=n(40961);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},5556:(e,t,n)=>{e.exports=n(2694)()},5947:function(e,t,n){var r,o;r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'
'};function o(e,t,n){return en?n:e}function a(e){return 100*(-1+e)}function i(e,t,n){var o;return(o="translate3d"===r.positionUsing?{transform:"translate3d("+a(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+a(e)+"%,0)"}:{"margin-left":a(e)+"%"}).transition="all "+t+"ms "+n,o}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=o(e,r.minimum,1),n.status=1===e?null:e;var a=n.render(!t),c=a.querySelector(r.barSelector),u=r.speed,d=r.easing;return a.offsetWidth,l(function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),s(c,i(e,u,d)),1===e?(s(a,{transition:"none",opacity:1}),a.offsetWidth,setTimeout(function(){s(a,{transition:"all "+u+"ms linear",opacity:0}),setTimeout(function(){n.remove(),t()},u)},u)):setTimeout(t,u)}),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout(function(){n.status&&(n.trickle(),e())},r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*o(Math.random()*t,.1,.95)),t=o(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always(function(){0===--t?(e=0,n.done()):n.set((e-t)/e)}),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var o,i=t.querySelector(r.barSelector),l=e?"-100":a(n.status||0),c=document.querySelector(r.parent);return s(i,{transition:"all 0 linear",transform:"translate3d("+l+"%,0,0)"}),r.showSpinner||(o=t.querySelector(r.spinnerSelector))&&f(o),c!=document.body&&u(c,"nprogress-custom-parent"),c.appendChild(t),t},n.remove=function(){d(document.documentElement,"nprogress-busy"),d(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&f(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var l=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),s=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,function(e,t){return t.toUpperCase()})}function r(t){var n=document.body.style;if(t in n)return t;for(var r,o=e.length,a=t.charAt(0).toUpperCase()+t.slice(1);o--;)if((r=e[o]+a)in n)return r;return t}function o(e){return e=n(e),t[e]||(t[e]=r(e))}function a(e,t,n){t=o(t),e.style[t]=n}return function(e,t){var n,r,o=arguments;if(2==o.length)for(n in t)void 0!==(r=t[n])&&t.hasOwnProperty(n)&&a(e,n,r);else a(e,o[1],o[2])}}();function c(e,t){return("string"==typeof e?e:p(e)).indexOf(" "+t+" ")>=0}function u(e,t){var n=p(e),r=n+t;c(n,t)||(e.className=r.substring(1))}function d(e,t){var n,r=p(e);c(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function p(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function f(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n},void 0===(o="function"==typeof r?r.call(t,n,t,e):r)||(e.exports=o)},6125:(e,t,n)=>{"use strict";n.d(t,{o:()=>a,x:()=>i});var r=n(96540),o=n(74848);const a=r.createContext(!1);function i({children:e}){const[t,n]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{n(!0)},[]),(0,o.jsx)(a.Provider,{value:t,children:e})}},6188:e=>{"use strict";e.exports=Math.max},6342:(e,t,n)=>{"use strict";n.d(t,{p:()=>o});var r=n(44586);function o(){return(0,r.A)().siteConfig.themeConfig}},6549:e=>{"use strict";e.exports=Object.getOwnPropertyDescriptor},6925:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6969:e=>{e.exports&&(e.exports={core:{meta:{path:"components/prism-core.js",option:"mandatory"},core:"Core"},themes:{meta:{path:"themes/{id}.css",link:"index.html?theme={id}",exclusive:!0},prism:{title:"Default",option:"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{title:"Okaidia",owner:"ocodia"},"prism-twilight":{title:"Twilight",owner:"remybach"},"prism-coy":{title:"Coy",owner:"tshedor"},"prism-solarizedlight":{title:"Solarized Light",owner:"hectormatos2011 "},"prism-tomorrow":{title:"Tomorrow Night",owner:"Rosey"}},languages:{meta:{path:"components/prism-{id}",noCSS:!0,examplesPath:"examples/prism-{id}",addCheckAll:!0},markup:{title:"Markup",alias:["html","xml","svg","mathml","ssml","atom","rss"],aliasTitles:{html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML",ssml:"SSML",atom:"Atom",rss:"RSS"},option:"default"},css:{title:"CSS",option:"default",modify:"markup"},clike:{title:"C-like",option:"default"},javascript:{title:"JavaScript",require:"clike",modify:"markup",optional:"regex",alias:"js",option:"default"},abap:{title:"ABAP",owner:"dellagustin"},abnf:{title:"ABNF",owner:"RunDevelopment"},actionscript:{title:"ActionScript",require:"javascript",modify:"markup",owner:"Golmote"},ada:{title:"Ada",owner:"Lucretia"},agda:{title:"Agda",owner:"xy-ren"},al:{title:"AL",owner:"RunDevelopment"},antlr4:{title:"ANTLR4",alias:"g4",owner:"RunDevelopment"},apacheconf:{title:"Apache Configuration",owner:"GuiTeK"},apex:{title:"Apex",require:["clike","sql"],owner:"RunDevelopment"},apl:{title:"APL",owner:"ngn"},applescript:{title:"AppleScript",owner:"Golmote"},aql:{title:"AQL",owner:"RunDevelopment"},arduino:{title:"Arduino",require:"cpp",alias:"ino",owner:"dkern"},arff:{title:"ARFF",owner:"Golmote"},armasm:{title:"ARM Assembly",alias:"arm-asm",owner:"RunDevelopment"},arturo:{title:"Arturo",alias:"art",optional:["bash","css","javascript","markup","markdown","sql"],owner:"drkameleon"},asciidoc:{alias:"adoc",title:"AsciiDoc",owner:"Golmote"},aspnet:{title:"ASP.NET (C#)",require:["markup","csharp"],owner:"nauzilus"},asm6502:{title:"6502 Assembly",owner:"kzurawel"},asmatmel:{title:"Atmel AVR Assembly",owner:"cerkit"},autohotkey:{title:"AutoHotkey",owner:"aviaryan"},autoit:{title:"AutoIt",owner:"Golmote"},avisynth:{title:"AviSynth",alias:"avs",owner:"Zinfidel"},"avro-idl":{title:"Avro IDL",alias:"avdl",owner:"RunDevelopment"},awk:{title:"AWK",alias:"gawk",aliasTitles:{gawk:"GAWK"},owner:"RunDevelopment"},bash:{title:"Bash",alias:["sh","shell"],aliasTitles:{sh:"Shell",shell:"Shell"},owner:"zeitgeist87"},basic:{title:"BASIC",owner:"Golmote"},batch:{title:"Batch",owner:"Golmote"},bbcode:{title:"BBcode",alias:"shortcode",aliasTitles:{shortcode:"Shortcode"},owner:"RunDevelopment"},bbj:{title:"BBj",owner:"hyyan"},bicep:{title:"Bicep",owner:"johnnyreilly"},birb:{title:"Birb",require:"clike",owner:"Calamity210"},bison:{title:"Bison",require:"c",owner:"Golmote"},bnf:{title:"BNF",alias:"rbnf",aliasTitles:{rbnf:"RBNF"},owner:"RunDevelopment"},bqn:{title:"BQN",owner:"yewscion"},brainfuck:{title:"Brainfuck",owner:"Golmote"},brightscript:{title:"BrightScript",owner:"RunDevelopment"},bro:{title:"Bro",owner:"wayward710"},bsl:{title:"BSL (1C:Enterprise)",alias:"oscript",aliasTitles:{oscript:"OneScript"},owner:"Diversus23"},c:{title:"C",require:"clike",owner:"zeitgeist87"},csharp:{title:"C#",require:"clike",alias:["cs","dotnet"],owner:"mvalipour"},cpp:{title:"C++",require:"c",owner:"zeitgeist87"},cfscript:{title:"CFScript",require:"clike",alias:"cfc",owner:"mjclemente"},chaiscript:{title:"ChaiScript",require:["clike","cpp"],owner:"RunDevelopment"},cil:{title:"CIL",owner:"sbrl"},cilkc:{title:"Cilk/C",require:"c",alias:"cilk-c",owner:"OpenCilk"},cilkcpp:{title:"Cilk/C++",require:"cpp",alias:["cilk-cpp","cilk"],owner:"OpenCilk"},clojure:{title:"Clojure",owner:"troglotit"},cmake:{title:"CMake",owner:"mjrogozinski"},cobol:{title:"COBOL",owner:"RunDevelopment"},coffeescript:{title:"CoffeeScript",require:"javascript",alias:"coffee",owner:"R-osey"},concurnas:{title:"Concurnas",alias:"conc",owner:"jasontatton"},csp:{title:"Content-Security-Policy",owner:"ScottHelme"},cooklang:{title:"Cooklang",owner:"ahue"},coq:{title:"Coq",owner:"RunDevelopment"},crystal:{title:"Crystal",require:"ruby",owner:"MakeNowJust"},"css-extras":{title:"CSS Extras",require:"css",modify:"css",owner:"milesj"},csv:{title:"CSV",owner:"RunDevelopment"},cue:{title:"CUE",owner:"RunDevelopment"},cypher:{title:"Cypher",owner:"RunDevelopment"},d:{title:"D",require:"clike",owner:"Golmote"},dart:{title:"Dart",require:"clike",owner:"Golmote"},dataweave:{title:"DataWeave",owner:"machaval"},dax:{title:"DAX",owner:"peterbud"},dhall:{title:"Dhall",owner:"RunDevelopment"},diff:{title:"Diff",owner:"uranusjr"},django:{title:"Django/Jinja2",require:"markup-templating",alias:"jinja2",owner:"romanvm"},"dns-zone-file":{title:"DNS zone file",owner:"RunDevelopment",alias:"dns-zone"},docker:{title:"Docker",alias:"dockerfile",owner:"JustinBeckwith"},dot:{title:"DOT (Graphviz)",alias:"gv",optional:"markup",owner:"RunDevelopment"},ebnf:{title:"EBNF",owner:"RunDevelopment"},editorconfig:{title:"EditorConfig",owner:"osipxd"},eiffel:{title:"Eiffel",owner:"Conaclos"},ejs:{title:"EJS",require:["javascript","markup-templating"],owner:"RunDevelopment",alias:"eta",aliasTitles:{eta:"Eta"}},elixir:{title:"Elixir",owner:"Golmote"},elm:{title:"Elm",owner:"zwilias"},etlua:{title:"Embedded Lua templating",require:["lua","markup-templating"],owner:"RunDevelopment"},erb:{title:"ERB",require:["ruby","markup-templating"],owner:"Golmote"},erlang:{title:"Erlang",owner:"Golmote"},"excel-formula":{title:"Excel Formula",alias:["xlsx","xls"],owner:"RunDevelopment"},fsharp:{title:"F#",require:"clike",owner:"simonreynolds7"},factor:{title:"Factor",owner:"catb0t"},false:{title:"False",owner:"edukisto"},"firestore-security-rules":{title:"Firestore security rules",require:"clike",owner:"RunDevelopment"},flow:{title:"Flow",require:"javascript",owner:"Golmote"},fortran:{title:"Fortran",owner:"Golmote"},ftl:{title:"FreeMarker Template Language",require:"markup-templating",owner:"RunDevelopment"},gml:{title:"GameMaker Language",alias:"gamemakerlanguage",require:"clike",owner:"LiarOnce"},gap:{title:"GAP (CAS)",owner:"RunDevelopment"},gcode:{title:"G-code",owner:"RunDevelopment"},gdscript:{title:"GDScript",owner:"RunDevelopment"},gedcom:{title:"GEDCOM",owner:"Golmote"},gettext:{title:"gettext",alias:"po",owner:"RunDevelopment"},gherkin:{title:"Gherkin",owner:"hason"},git:{title:"Git",owner:"lgiraudel"},glsl:{title:"GLSL",require:"c",owner:"Golmote"},gn:{title:"GN",alias:"gni",owner:"RunDevelopment"},"linker-script":{title:"GNU Linker Script",alias:"ld",owner:"RunDevelopment"},go:{title:"Go",require:"clike",owner:"arnehormann"},"go-module":{title:"Go module",alias:"go-mod",owner:"RunDevelopment"},gradle:{title:"Gradle",require:"clike",owner:"zeabdelkhalek-badido18"},graphql:{title:"GraphQL",optional:"markdown",owner:"Golmote"},groovy:{title:"Groovy",require:"clike",owner:"robfletcher"},haml:{title:"Haml",require:"ruby",optional:["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],owner:"Golmote"},handlebars:{title:"Handlebars",require:"markup-templating",alias:["hbs","mustache"],aliasTitles:{mustache:"Mustache"},owner:"Golmote"},haskell:{title:"Haskell",alias:"hs",owner:"bholst"},haxe:{title:"Haxe",require:"clike",optional:"regex",owner:"Golmote"},hcl:{title:"HCL",owner:"outsideris"},hlsl:{title:"HLSL",require:"c",owner:"RunDevelopment"},hoon:{title:"Hoon",owner:"matildepark"},http:{title:"HTTP",optional:["csp","css","hpkp","hsts","javascript","json","markup","uri"],owner:"danielgtaylor"},hpkp:{title:"HTTP Public-Key-Pins",owner:"ScottHelme"},hsts:{title:"HTTP Strict-Transport-Security",owner:"ScottHelme"},ichigojam:{title:"IchigoJam",owner:"BlueCocoa"},icon:{title:"Icon",owner:"Golmote"},"icu-message-format":{title:"ICU Message Format",owner:"RunDevelopment"},idris:{title:"Idris",alias:"idr",owner:"KeenS",require:"haskell"},ignore:{title:".ignore",owner:"osipxd",alias:["gitignore","hgignore","npmignore"],aliasTitles:{gitignore:".gitignore",hgignore:".hgignore",npmignore:".npmignore"}},inform7:{title:"Inform 7",owner:"Golmote"},ini:{title:"Ini",owner:"aviaryan"},io:{title:"Io",owner:"AlesTsurko"},j:{title:"J",owner:"Golmote"},java:{title:"Java",require:"clike",owner:"sherblot"},javadoc:{title:"JavaDoc",require:["markup","java","javadoclike"],modify:"java",optional:"scala",owner:"RunDevelopment"},javadoclike:{title:"JavaDoc-like",modify:["java","javascript","php"],owner:"RunDevelopment"},javastacktrace:{title:"Java stack trace",owner:"RunDevelopment"},jexl:{title:"Jexl",owner:"czosel"},jolie:{title:"Jolie",require:"clike",owner:"thesave"},jq:{title:"JQ",owner:"RunDevelopment"},jsdoc:{title:"JSDoc",require:["javascript","javadoclike","typescript"],modify:"javascript",optional:["actionscript","coffeescript"],owner:"RunDevelopment"},"js-extras":{title:"JS Extras",require:"javascript",modify:"javascript",optional:["actionscript","coffeescript","flow","n4js","typescript"],owner:"RunDevelopment"},json:{title:"JSON",alias:"webmanifest",aliasTitles:{webmanifest:"Web App Manifest"},owner:"CupOfTea696"},json5:{title:"JSON5",require:"json",owner:"RunDevelopment"},jsonp:{title:"JSONP",require:"json",owner:"RunDevelopment"},jsstacktrace:{title:"JS stack trace",owner:"sbrl"},"js-templates":{title:"JS Templates",require:"javascript",modify:"javascript",optional:["css","css-extras","graphql","markdown","markup","sql"],owner:"RunDevelopment"},julia:{title:"Julia",owner:"cdagnino"},keepalived:{title:"Keepalived Configure",owner:"dev-itsheng"},keyman:{title:"Keyman",owner:"mcdurdin"},kotlin:{title:"Kotlin",alias:["kt","kts"],aliasTitles:{kts:"Kotlin Script"},require:"clike",owner:"Golmote"},kumir:{title:"KuMir (\u041a\u0443\u041c\u0438\u0440)",alias:"kum",owner:"edukisto"},kusto:{title:"Kusto",owner:"RunDevelopment"},latex:{title:"LaTeX",alias:["tex","context"],aliasTitles:{tex:"TeX",context:"ConTeXt"},owner:"japborst"},latte:{title:"Latte",require:["clike","markup-templating","php"],owner:"nette"},less:{title:"Less",require:"css",optional:"css-extras",owner:"Golmote"},lilypond:{title:"LilyPond",require:"scheme",alias:"ly",owner:"RunDevelopment"},liquid:{title:"Liquid",require:"markup-templating",owner:"cinhtau"},lisp:{title:"Lisp",alias:["emacs","elisp","emacs-lisp"],owner:"JuanCaicedo"},livescript:{title:"LiveScript",owner:"Golmote"},llvm:{title:"LLVM IR",owner:"porglezomp"},log:{title:"Log file",optional:"javastacktrace",owner:"RunDevelopment"},lolcode:{title:"LOLCODE",owner:"Golmote"},lua:{title:"Lua",owner:"Golmote"},magma:{title:"Magma (CAS)",owner:"RunDevelopment"},makefile:{title:"Makefile",owner:"Golmote"},markdown:{title:"Markdown",require:"markup",optional:"yaml",alias:"md",owner:"Golmote"},"markup-templating":{title:"Markup templating",require:"markup",owner:"Golmote"},mata:{title:"Mata",owner:"RunDevelopment"},matlab:{title:"MATLAB",owner:"Golmote"},maxscript:{title:"MAXScript",owner:"RunDevelopment"},mel:{title:"MEL",owner:"Golmote"},mermaid:{title:"Mermaid",owner:"RunDevelopment"},metafont:{title:"METAFONT",owner:"LaeriExNihilo"},mizar:{title:"Mizar",owner:"Golmote"},mongodb:{title:"MongoDB",owner:"airs0urce",require:"javascript"},monkey:{title:"Monkey",owner:"Golmote"},moonscript:{title:"MoonScript",alias:"moon",owner:"RunDevelopment"},n1ql:{title:"N1QL",owner:"TMWilds"},n4js:{title:"N4JS",require:"javascript",optional:"jsdoc",alias:"n4jsd",owner:"bsmith-n4"},"nand2tetris-hdl":{title:"Nand To Tetris HDL",owner:"stephanmax"},naniscript:{title:"Naninovel Script",owner:"Elringus",alias:"nani"},nasm:{title:"NASM",owner:"rbmj"},neon:{title:"NEON",owner:"nette"},nevod:{title:"Nevod",owner:"nezaboodka"},nginx:{title:"nginx",owner:"volado"},nim:{title:"Nim",owner:"Golmote"},nix:{title:"Nix",owner:"Golmote"},nsis:{title:"NSIS",owner:"idleberg"},objectivec:{title:"Objective-C",require:"c",alias:"objc",owner:"uranusjr"},ocaml:{title:"OCaml",owner:"Golmote"},odin:{title:"Odin",owner:"edukisto"},opencl:{title:"OpenCL",require:"c",modify:["c","cpp"],owner:"Milania1"},openqasm:{title:"OpenQasm",alias:"qasm",owner:"RunDevelopment"},oz:{title:"Oz",owner:"Golmote"},parigp:{title:"PARI/GP",owner:"Golmote"},parser:{title:"Parser",require:"markup",owner:"Golmote"},pascal:{title:"Pascal",alias:"objectpascal",aliasTitles:{objectpascal:"Object Pascal"},owner:"Golmote"},pascaligo:{title:"Pascaligo",owner:"DefinitelyNotAGoat"},psl:{title:"PATROL Scripting Language",owner:"bertysentry"},pcaxis:{title:"PC-Axis",alias:"px",owner:"RunDevelopment"},peoplecode:{title:"PeopleCode",alias:"pcode",owner:"RunDevelopment"},perl:{title:"Perl",owner:"Golmote"},php:{title:"PHP",require:"markup-templating",owner:"milesj"},phpdoc:{title:"PHPDoc",require:["php","javadoclike"],modify:"php",owner:"RunDevelopment"},"php-extras":{title:"PHP Extras",require:"php",modify:"php",owner:"milesj"},"plant-uml":{title:"PlantUML",alias:"plantuml",owner:"RunDevelopment"},plsql:{title:"PL/SQL",require:"sql",owner:"Golmote"},powerquery:{title:"PowerQuery",alias:["pq","mscript"],owner:"peterbud"},powershell:{title:"PowerShell",owner:"nauzilus"},processing:{title:"Processing",require:"clike",owner:"Golmote"},prolog:{title:"Prolog",owner:"Golmote"},promql:{title:"PromQL",owner:"arendjr"},properties:{title:".properties",owner:"Golmote"},protobuf:{title:"Protocol Buffers",require:"clike",owner:"just-boris"},pug:{title:"Pug",require:["markup","javascript"],optional:["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],owner:"Golmote"},puppet:{title:"Puppet",owner:"Golmote"},pure:{title:"Pure",optional:["c","cpp","fortran"],owner:"Golmote"},purebasic:{title:"PureBasic",require:"clike",alias:"pbfasm",owner:"HeX0R101"},purescript:{title:"PureScript",require:"haskell",alias:"purs",owner:"sriharshachilakapati"},python:{title:"Python",alias:"py",owner:"multipetros"},qsharp:{title:"Q#",require:"clike",alias:"qs",owner:"fedonman"},q:{title:"Q (kdb+ database)",owner:"Golmote"},qml:{title:"QML",require:"javascript",owner:"RunDevelopment"},qore:{title:"Qore",require:"clike",owner:"temnroegg"},r:{title:"R",owner:"Golmote"},racket:{title:"Racket",require:"scheme",alias:"rkt",owner:"RunDevelopment"},cshtml:{title:"Razor C#",alias:"razor",require:["markup","csharp"],optional:["css","css-extras","javascript","js-extras"],owner:"RunDevelopment"},jsx:{title:"React JSX",require:["markup","javascript"],optional:["jsdoc","js-extras","js-templates"],owner:"vkbansal"},tsx:{title:"React TSX",require:["jsx","typescript"]},reason:{title:"Reason",require:"clike",owner:"Golmote"},regex:{title:"Regex",owner:"RunDevelopment"},rego:{title:"Rego",owner:"JordanSh"},renpy:{title:"Ren'py",alias:"rpy",owner:"HyuchiaDiego"},rescript:{title:"ReScript",alias:"res",owner:"vmarcosp"},rest:{title:"reST (reStructuredText)",owner:"Golmote"},rip:{title:"Rip",owner:"ravinggenius"},roboconf:{title:"Roboconf",owner:"Golmote"},robotframework:{title:"Robot Framework",alias:"robot",owner:"RunDevelopment"},ruby:{title:"Ruby",require:"clike",alias:"rb",owner:"samflores"},rust:{title:"Rust",owner:"Golmote"},sas:{title:"SAS",optional:["groovy","lua","sql"],owner:"Golmote"},sass:{title:"Sass (Sass)",require:"css",optional:"css-extras",owner:"Golmote"},scss:{title:"Sass (SCSS)",require:"css",optional:"css-extras",owner:"MoOx"},scala:{title:"Scala",require:"java",owner:"jozic"},scheme:{title:"Scheme",owner:"bacchus123"},"shell-session":{title:"Shell session",require:"bash",alias:["sh-session","shellsession"],owner:"RunDevelopment"},smali:{title:"Smali",owner:"RunDevelopment"},smalltalk:{title:"Smalltalk",owner:"Golmote"},smarty:{title:"Smarty",require:"markup-templating",optional:"php",owner:"Golmote"},sml:{title:"SML",alias:"smlnj",aliasTitles:{smlnj:"SML/NJ"},owner:"RunDevelopment"},solidity:{title:"Solidity (Ethereum)",alias:"sol",require:"clike",owner:"glachaud"},"solution-file":{title:"Solution file",alias:"sln",owner:"RunDevelopment"},soy:{title:"Soy (Closure Template)",require:"markup-templating",owner:"Golmote"},sparql:{title:"SPARQL",require:"turtle",owner:"Triply-Dev",alias:"rq"},"splunk-spl":{title:"Splunk SPL",owner:"RunDevelopment"},sqf:{title:"SQF: Status Quo Function (Arma 3)",require:"clike",owner:"RunDevelopment"},sql:{title:"SQL",owner:"multipetros"},squirrel:{title:"Squirrel",require:"clike",owner:"RunDevelopment"},stan:{title:"Stan",owner:"RunDevelopment"},stata:{title:"Stata Ado",require:["mata","java","python"],owner:"RunDevelopment"},iecst:{title:"Structured Text (IEC 61131-3)",owner:"serhioromano"},stylus:{title:"Stylus",owner:"vkbansal"},supercollider:{title:"SuperCollider",alias:"sclang",owner:"RunDevelopment"},swift:{title:"Swift",owner:"chrischares"},systemd:{title:"Systemd configuration file",owner:"RunDevelopment"},"t4-templating":{title:"T4 templating",owner:"RunDevelopment"},"t4-cs":{title:"T4 Text Templates (C#)",require:["t4-templating","csharp"],alias:"t4",owner:"RunDevelopment"},"t4-vb":{title:"T4 Text Templates (VB)",require:["t4-templating","vbnet"],owner:"RunDevelopment"},tap:{title:"TAP",owner:"isaacs",require:"yaml"},tcl:{title:"Tcl",owner:"PeterChaplin"},tt2:{title:"Template Toolkit 2",require:["clike","markup-templating"],owner:"gflohr"},textile:{title:"Textile",require:"markup",optional:"css",owner:"Golmote"},toml:{title:"TOML",owner:"RunDevelopment"},tremor:{title:"Tremor",alias:["trickle","troy"],owner:"darach",aliasTitles:{trickle:"trickle",troy:"troy"}},turtle:{title:"Turtle",alias:"trig",aliasTitles:{trig:"TriG"},owner:"jakubklimek"},twig:{title:"Twig",require:"markup-templating",owner:"brandonkelly"},typescript:{title:"TypeScript",require:"javascript",optional:"js-templates",alias:"ts",owner:"vkbansal"},typoscript:{title:"TypoScript",alias:"tsconfig",aliasTitles:{tsconfig:"TSConfig"},owner:"dkern"},unrealscript:{title:"UnrealScript",alias:["uscript","uc"],owner:"RunDevelopment"},uorazor:{title:"UO Razor Script",owner:"jaseowns"},uri:{title:"URI",alias:"url",aliasTitles:{url:"URL"},owner:"RunDevelopment"},v:{title:"V",require:"clike",owner:"taggon"},vala:{title:"Vala",require:"clike",optional:"regex",owner:"TemplarVolk"},vbnet:{title:"VB.Net",require:"basic",owner:"Bigsby"},velocity:{title:"Velocity",require:"markup",owner:"Golmote"},verilog:{title:"Verilog",owner:"a-rey"},vhdl:{title:"VHDL",owner:"a-rey"},vim:{title:"vim",owner:"westonganger"},"visual-basic":{title:"Visual Basic",alias:["vb","vba"],aliasTitles:{vba:"VBA"},owner:"Golmote"},warpscript:{title:"WarpScript",owner:"RunDevelopment"},wasm:{title:"WebAssembly",owner:"Golmote"},"web-idl":{title:"Web IDL",alias:"webidl",owner:"RunDevelopment"},wgsl:{title:"WGSL",owner:"Dr4gonthree"},wiki:{title:"Wiki markup",require:"markup",owner:"Golmote"},wolfram:{title:"Wolfram language",alias:["mathematica","nb","wl"],aliasTitles:{mathematica:"Mathematica",nb:"Mathematica Notebook"},owner:"msollami"},wren:{title:"Wren",owner:"clsource"},xeora:{title:"Xeora",require:"markup",alias:"xeoracube",aliasTitles:{xeoracube:"XeoraCube"},owner:"freakmaxi"},"xml-doc":{title:"XML doc (.net)",require:"markup",modify:["csharp","fsharp","vbnet"],owner:"RunDevelopment"},xojo:{title:"Xojo (REALbasic)",owner:"Golmote"},xquery:{title:"XQuery",require:"markup",owner:"Golmote"},yaml:{title:"YAML",alias:"yml",owner:"hason"},yang:{title:"YANG",owner:"RunDevelopment"},zig:{title:"Zig",owner:"RunDevelopment"}},plugins:{meta:{path:"plugins/{id}/prism-{id}",link:"plugins/{id}/"},"line-highlight":{title:"Line Highlight",description:"Highlights specific lines and/or line ranges."},"line-numbers":{title:"Line Numbers",description:"Line number at the beginning of code lines.",owner:"kuba-kubula"},"show-invisibles":{title:"Show Invisibles",description:"Show hidden characters such as tabs and line breaks.",optional:["autolinker","data-uri-highlight"]},autolinker:{title:"Autolinker",description:"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},wpd:{title:"WebPlatform Docs",description:'Makes tokens link to WebPlatform.org documentation. The links open in a new tab.'},"custom-class":{title:"Custom Class",description:"This plugin allows you to prefix Prism's default classes (.comment can become .namespace--comment) or replace them with your defined ones (like .editor__comment). You can even add new classes.",owner:"dvkndn",noCSS:!0},"file-highlight":{title:"File Highlight",description:"Fetch external files and highlight them with Prism. Used on the Prism website itself.",noCSS:!0},"show-language":{title:"Show Language",description:"Display the highlighted language in code blocks (inline code does not show the label).",owner:"nauzilus",noCSS:!0,require:"toolbar"},"jsonp-highlight":{title:"JSONP Highlight",description:"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).",noCSS:!0,owner:"nauzilus"},"highlight-keywords":{title:"Highlight Keywords",description:"Adds special CSS classes for each keyword for fine-grained highlighting.",owner:"vkbansal",noCSS:!0},"remove-initial-line-feed":{title:"Remove initial line feed",description:"Removes the initial line feed in code blocks.",owner:"Golmote",noCSS:!0},"inline-color":{title:"Inline color",description:"Adds a small inline preview for colors in style sheets.",require:"css-extras",owner:"RunDevelopment"},previewers:{title:"Previewers",description:"Previewers for angles, colors, gradients, easing and time.",require:"css-extras",owner:"Golmote"},autoloader:{title:"Autoloader",description:"Automatically loads the needed languages to highlight the code blocks.",owner:"Golmote",noCSS:!0},"keep-markup":{title:"Keep Markup",description:"Prevents custom markup from being dropped out during highlighting.",owner:"Golmote",optional:"normalize-whitespace",noCSS:!0},"command-line":{title:"Command Line",description:"Display a command line with a prompt and, optionally, the output/response from the commands.",owner:"chriswells0"},"unescaped-markup":{title:"Unescaped Markup",description:"Write markup without having to escape anything."},"normalize-whitespace":{title:"Normalize Whitespace",description:"Supports multiple operations to normalize whitespace in code blocks.",owner:"zeitgeist87",optional:"unescaped-markup",noCSS:!0},"data-uri-highlight":{title:"Data-URI Highlight",description:"Highlights data-URI contents.",owner:"Golmote",noCSS:!0},toolbar:{title:"Toolbar",description:"Attach a toolbar for plugins to easily register buttons on the top of a code block.",owner:"mAAdhaTTah"},"copy-to-clipboard":{title:"Copy to Clipboard Button",description:"Add a button that copies the code block to the clipboard when clicked.",owner:"mAAdhaTTah",require:"toolbar",noCSS:!0},"download-button":{title:"Download Button",description:"A button in the toolbar of a code block adding a convenient way to download a code file.",owner:"Golmote",require:"toolbar",noCSS:!0},"match-braces":{title:"Match braces",description:"Highlights matching braces.",owner:"RunDevelopment"},"diff-highlight":{title:"Diff Highlight",description:"Highlights the code inside diff blocks.",owner:"RunDevelopment",require:"diff"},"filter-highlight-all":{title:"Filter highlightAll",description:"Filters the elements the highlightAll and highlightAllUnder methods actually highlight.",owner:"RunDevelopment",noCSS:!0},treeview:{title:"Treeview",description:"A language with special styles to highlight file system tree structures.",owner:"Golmote"}}})},7176:(e,t,n)=>{"use strict";var r,o=n(73126),a=n(75795);try{r=[].__proto__===Array.prototype}catch(c){if(!c||"object"!=typeof c||!("code"in c)||"ERR_PROTO_ACCESS"!==c.code)throw c}var i=!!r&&a&&a(Object.prototype,"__proto__"),l=Object,s=l.getPrototypeOf;e.exports=i&&"function"==typeof i.get?o([i.get]):"function"==typeof s&&function(e){return s(null==e?e:l(e))}},7463:(e,t,n)=>{"use strict";var r=n(96763);function o(e,t){var n=e.length;e.push(t);e:for(;0>>1,o=e[r];if(!(0>>1;rl(s,n))cl(u,s)?(e[r]=u,e[c]=n,r=c):(e[r]=s,e[i]=n,r=i);else{if(!(cl(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function l(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var c=Date,u=c.now();t.unstable_now=function(){return c.now()-u}}var d=[],p=[],f=1,m=null,h=3,g=!1,b=!1,y=!1,v="function"==typeof setTimeout?setTimeout:null,w="function"==typeof clearTimeout?clearTimeout:null,x="undefined"!=typeof setImmediate?setImmediate:null;function k(e){for(var t=a(p);null!==t;){if(null===t.callback)i(p);else{if(!(t.startTime<=e))break;i(p),t.sortIndex=t.expirationTime,o(d,t)}t=a(p)}}function S(e){if(y=!1,k(e),!b)if(null!==a(d))b=!0,D(E);else{var t=a(p);null!==t&&L(S,t.startTime-e)}}function E(e,n){b=!1,y&&(y=!1,w(A),A=-1),g=!0;var r=h;try{for(k(n),m=a(d);null!==m&&(!(m.expirationTime>n)||e&&!T());){var o=m.callback;if("function"==typeof o){m.callback=null,h=m.priorityLevel;var l=o(m.expirationTime<=n);n=t.unstable_now(),"function"==typeof l?m.callback=l:m===a(d)&&i(d),k(n)}else i(d);m=a(d)}if(null!==m)var s=!0;else{var c=a(p);null!==c&&L(S,c.startTime-n),s=!1}return s}finally{m=null,h=r,g=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var _,j=!1,O=null,A=-1,C=5,P=-1;function T(){return!(t.unstable_now()-Pe||125i?(e.sortIndex=r,o(p,e),null===a(d)&&e===a(p)&&(y?(w(A),A=-1):y=!0,L(S,r-i))):(e.sortIndex=l,o(d,e),b||g||(b=!0,D(E))),e},t.unstable_shouldYield=T,t.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}},8505:(e,t,n)=>{var r=n(64634);e.exports=h,e.exports.parse=a,e.exports.compile=function(e,t){return c(a(e,t),t)},e.exports.tokensToFunction=c,e.exports.tokensToRegExp=m;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function a(e,t){for(var n,r=[],a=0,l=0,s="",c=t&&t.delimiter||"/";null!=(n=o.exec(e));){var u=n[0],p=n[1],f=n.index;if(s+=e.slice(l,f),l=f+u.length,p)s+=p[1];else{var m=e[l],h=n[2],g=n[3],b=n[4],y=n[5],v=n[6],w=n[7];s&&(r.push(s),s="");var x=null!=h&&null!=m&&m!==h,k="+"===v||"*"===v,S="?"===v||"*"===v,E=h||c,_=b||y,j=h||("string"==typeof r[r.length-1]?r[r.length-1]:"");r.push({name:g||a++,prefix:h||"",delimiter:E,optional:S,repeat:k,partial:x,asterisk:!!w,pattern:_?d(_):w?".*":i(E,j)})}}return l-1?"[^"+u(e)+"]+?":u(t)+"|(?:(?!"+u(t)+")[^"+u(e)+"])+?"}function l(e){return encodeURI(e).replace(/[\/?#]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function s(e){return encodeURI(e).replace(/[?#]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function c(e,t){for(var n=new Array(e.length),o=0;o{var r=n(96763);const o=n(6969),a=n(98380),i=new Set;function l(e){void 0===e?e=Object.keys(o.languages).filter(e=>"meta"!=e):Array.isArray(e)||(e=[e]);const t=[...i,...Object.keys(Prism.languages)];a(o,e,t).load(e=>{if(!(e in o.languages))return void(l.silent||r.warn("Language does not exist: "+e));const t="./prism-"+e;delete n.c[n(63157).resolve(t)],delete Prism.languages[e],n(63157)(t),i.add(e)})}l.silent=!1,e.exports=l},9394:(e,t,n)=>{"use strict";var r=n(89211);e.exports=function(){return"function"==typeof Object.is?Object.is:r}},9957:(e,t,n)=>{"use strict";var r=Function.prototype.call,o=Object.prototype.hasOwnProperty,a=n(66743);e.exports=a.call(r,o)},10076:e=>{"use strict";e.exports=Function.prototype.call},10119:(e,t,n)=>{"use strict";n.r(t)},10487:(e,t,n)=>{"use strict";var r=n(96897),o=n(30655),a=n(73126),i=n(12205);e.exports=function(e){var t=a(arguments),n=e.length-(arguments.length-1);return r(t,1+(n>0?n:0),!0)},o?o(e.exports,"apply",{value:i}):e.exports.apply=i},11002:e=>{"use strict";e.exports=Function.prototype.apply},11514:(e,t,n)=>{"use strict";var r=n(38403);e.exports=function(){return Object.assign?function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),n={},r=0;r{"use strict";n.d(t,{A:()=>a});var r=!0,o="Invariant failed";function a(e,t){if(!e){if(r)throw new Error(o);var n="function"==typeof t?t():t,a=n?"".concat(o,": ").concat(n):o;throw new Error(a)}}},11818:(e,t,n)=>{"use strict";n.r(t)},12205:(e,t,n)=>{"use strict";var r=n(66743),o=n(11002),a=n(13144);e.exports=function(){return a(r,o,arguments)}},12838:(e,t,n)=>{"use strict";n.d(t,{A:()=>qt});var r=n(96540),o=n(18215),a=n(67489),i=n(45500),l=n(56347),s=n(21312),c=n(75062),u=n(74848);const d="__docusaurus_skipToContent_fallback";function p(e){e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")}function f(){const e=(0,r.useRef)(null),{action:t}=(0,l.W6)(),n=(0,r.useCallback)(e=>{e.preventDefault();const t=document.querySelector("main:first-of-type")??document.getElementById(d);t&&p(t)},[]);return(0,c.$)(({location:n})=>{e.current&&!n.hash&&"PUSH"===t&&p(e.current)}),{containerRef:e,onClick:n}}const m=(0,s.T)({id:"theme.common.skipToMainContent",description:"The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation",message:"Skip to main content"});function h(e){const t=e.children??m,{containerRef:n,onClick:r}=f();return(0,u.jsx)("div",{ref:n,role:"region","aria-label":m,children:(0,u.jsx)("a",{...e,href:`#${d}`,onClick:r,children:t})})}var g=n(17559),b=n(14090);const y={skipToContent:"skipToContent_fXgn"};function v(){return(0,u.jsx)(h,{className:y.skipToContent})}var w=n(6342),x=n(65041);function k({width:e=21,height:t=21,color:n="currentColor",strokeWidth:r=1.2,className:o,...a}){return(0,u.jsx)("svg",{viewBox:"0 0 15 15",width:e,height:t,...a,children:(0,u.jsx)("g",{stroke:n,strokeWidth:r,children:(0,u.jsx)("path",{d:"M.75.75l13.5 13.5M14.25.75L.75 14.25"})})})}const S={closeButton:"closeButton_CVFx"};function E(e){return(0,u.jsx)("button",{type:"button","aria-label":(0,s.T)({id:"theme.AnnouncementBar.closeButtonAriaLabel",message:"Close",description:"The ARIA label for close button of announcement bar"}),...e,className:(0,o.A)("clean-btn close",S.closeButton,e.className),children:(0,u.jsx)(k,{width:14,height:14,strokeWidth:3.1})})}const _={content:"content_knG7"};function j(e){const{announcementBar:t}=(0,w.p)(),{content:n}=t;return(0,u.jsx)("div",{...e,className:(0,o.A)(_.content,e.className),dangerouslySetInnerHTML:{__html:n}})}const O={announcementBar:"announcementBar_mb4j",announcementBarPlaceholder:"announcementBarPlaceholder_vyr4",announcementBarClose:"announcementBarClose_gvF7",announcementBarContent:"announcementBarContent_xLdY"};function A(){const{announcementBar:e}=(0,w.p)(),{isActive:t,close:n}=(0,x.M)();if(!t)return null;const{backgroundColor:r,textColor:a,isCloseable:i}=e;return(0,u.jsxs)("div",{className:(0,o.A)(g.G.announcementBar.container,O.announcementBar),style:{backgroundColor:r,color:a},role:"banner",children:[i&&(0,u.jsx)("div",{className:O.announcementBarPlaceholder}),(0,u.jsx)(j,{className:O.announcementBarContent}),i&&(0,u.jsx)(E,{onClick:n,className:O.announcementBarClose})]})}var C=n(22069),P=n(23104);var T=n(89532),I=n(75600);const R=r.createContext(null);function N({children:e}){const t=function(){const e=(0,C.M)(),t=(0,I.YL)(),[n,o]=(0,r.useState)(!1),a=null!==t.component,i=(0,T.ZC)(a);return(0,r.useEffect)(()=>{a&&!i&&o(!0)},[a,i]),(0,r.useEffect)(()=>{a?e.shown||o(!0):o(!1)},[e.shown,a]),(0,r.useMemo)(()=>[n,o],[n])}();return(0,u.jsx)(R.Provider,{value:t,children:e})}function D(e){if(e.component){const t=e.component;return(0,u.jsx)(t,{...e.props})}}function L(){const e=(0,r.useContext)(R);if(!e)throw new T.dV("NavbarSecondaryMenuDisplayProvider");const[t,n]=e,o=(0,r.useCallback)(()=>n(!1),[n]),a=(0,I.YL)();return(0,r.useMemo)(()=>({shown:t,hide:o,content:D(a)}),[o,a,t])}function M(e){return parseInt(r.version.split(".")[0],10)<19?{inert:e?"":void 0}:{inert:e}}function F({children:e,inert:t}){return(0,u.jsx)("div",{className:(0,o.A)(g.G.layout.navbar.mobileSidebar.panel,"navbar-sidebar__item menu"),...M(t),children:e})}function z({header:e,primaryMenu:t,secondaryMenu:n}){const{shown:r}=L();return(0,u.jsxs)("div",{className:(0,o.A)(g.G.layout.navbar.mobileSidebar.container,"navbar-sidebar"),children:[e,(0,u.jsxs)("div",{className:(0,o.A)("navbar-sidebar__items",{"navbar-sidebar__items--show-secondary":r}),children:[(0,u.jsx)(F,{inert:r,children:t}),(0,u.jsx)(F,{inert:!r,children:n})]})]})}var B=n(95293),U=n(92303);function q(e){return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,...e,children:(0,u.jsx)("path",{fill:"currentColor",d:"M12,9c1.65,0,3,1.35,3,3s-1.35,3-3,3s-3-1.35-3-3S10.35,9,12,9 M12,7c-2.76,0-5,2.24-5,5s2.24,5,5,5s5-2.24,5-5 S14.76,7,12,7L12,7z M2,13l2,0c0.55,0,1-0.45,1-1s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S1.45,13,2,13z M20,13l2,0c0.55,0,1-0.45,1-1 s-0.45-1-1-1l-2,0c-0.55,0-1,0.45-1,1S19.45,13,20,13z M11,2v2c0,0.55,0.45,1,1,1s1-0.45,1-1V2c0-0.55-0.45-1-1-1S11,1.45,11,2z M11,20v2c0,0.55,0.45,1,1,1s1-0.45,1-1v-2c0-0.55-0.45-1-1-1C11.45,19,11,19.45,11,20z M5.99,4.58c-0.39-0.39-1.03-0.39-1.41,0 c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0s0.39-1.03,0-1.41L5.99,4.58z M18.36,16.95 c-0.39-0.39-1.03-0.39-1.41,0c-0.39,0.39-0.39,1.03,0,1.41l1.06,1.06c0.39,0.39,1.03,0.39,1.41,0c0.39-0.39,0.39-1.03,0-1.41 L18.36,16.95z M19.42,5.99c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06c-0.39,0.39-0.39,1.03,0,1.41 s1.03,0.39,1.41,0L19.42,5.99z M7.05,18.36c0.39-0.39,0.39-1.03,0-1.41c-0.39-0.39-1.03-0.39-1.41,0l-1.06,1.06 c-0.39,0.39-0.39,1.03,0,1.41s1.03,0.39,1.41,0L7.05,18.36z"})})}function $(e){return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,...e,children:(0,u.jsx)("path",{fill:"currentColor",d:"M9.37,5.51C9.19,6.15,9.1,6.82,9.1,7.5c0,4.08,3.32,7.4,7.4,7.4c0.68,0,1.35-0.09,1.99-0.27C17.45,17.19,14.93,19,12,19 c-3.86,0-7-3.14-7-7C5,9.07,6.81,6.55,9.37,5.51z M12,3c-4.97,0-9,4.03-9,9s4.03,9,9,9s9-4.03,9-9c0-0.46-0.04-0.92-0.1-1.36 c-0.98,1.37-2.58,2.26-4.4,2.26c-2.98,0-5.4-2.42-5.4-5.4c0-1.81,0.89-3.42,2.26-4.4C12.92,3.04,12.46,3,12,3L12,3z"})})}function H(e){return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:24,height:24,...e,children:(0,u.jsx)("path",{fill:"currentColor",d:"m12 21c4.971 0 9-4.029 9-9s-4.029-9-9-9-9 4.029-9 9 4.029 9 9 9zm4.95-13.95c1.313 1.313 2.05 3.093 2.05 4.95s-0.738 3.637-2.05 4.95c-1.313 1.313-3.093 2.05-4.95 2.05v-14c1.857 0 3.637 0.737 4.95 2.05z"})})}const G="toggle_vylO",V="toggleButton_gllP",W="toggleIcon_g3eP",K="systemToggleIcon_QzmC",Q="lightToggleIcon_pyhR",Y="darkToggleIcon_wfgR",J="toggleButtonDisabled_aARS";function Z(e){switch(e){case null:return(0,s.T)({message:"system mode",id:"theme.colorToggle.ariaLabel.mode.system",description:"The name for the system color mode"});case"light":return(0,s.T)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"});case"dark":return(0,s.T)({message:"dark mode",id:"theme.colorToggle.ariaLabel.mode.dark",description:"The name for the dark color mode"});default:throw new Error(`unexpected color mode ${e}`)}}function X(e){return(0,s.T)({message:"Switch between dark and light mode (currently {mode})",id:"theme.colorToggle.ariaLabel",description:"The ARIA label for the color mode toggle"},{mode:Z(e)})}function ee(){return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(q,{"aria-hidden":!0,className:(0,o.A)(W,Q)}),(0,u.jsx)($,{"aria-hidden":!0,className:(0,o.A)(W,Y)}),(0,u.jsx)(H,{"aria-hidden":!0,className:(0,o.A)(W,K)})]})}function te({className:e,buttonClassName:t,respectPrefersColorScheme:n,value:r,onChange:a}){const i=(0,U.A)();return(0,u.jsx)("div",{className:(0,o.A)(G,e),children:(0,u.jsx)("button",{className:(0,o.A)("clean-btn",V,!i&&J,t),type:"button",onClick:()=>a(function(e,t){if(!t)return"dark"===e?"light":"dark";switch(e){case null:return"light";case"light":return"dark";case"dark":return null;default:throw new Error(`unexpected color mode ${e}`)}}(r,n)),disabled:!i,title:Z(r),"aria-label":X(r),children:(0,u.jsx)(ee,{})})})}const ne=r.memo(te),re={darkNavbarColorModeToggle:"darkNavbarColorModeToggle_X3D1"};function oe({className:e}){const t=(0,w.p)().navbar.style,{disableSwitch:n,respectPrefersColorScheme:r}=(0,w.p)().colorMode,{colorModeChoice:o,setColorMode:a}=(0,B.G)();return n?null:(0,u.jsx)(ne,{className:e,buttonClassName:"dark"===t?re.darkNavbarColorModeToggle:void 0,respectPrefersColorScheme:r,value:o,onChange:a})}var ae=n(23465);function ie(){return(0,u.jsx)(ae.A,{className:"navbar__brand",imageClassName:"navbar__logo",titleClassName:"navbar__title text--truncate"})}function le(){const e=(0,C.M)();return(0,u.jsx)("button",{type:"button","aria-label":(0,s.T)({id:"theme.docs.sidebar.closeSidebarButtonAriaLabel",message:"Close navigation bar",description:"The ARIA label for close button of mobile sidebar"}),className:"clean-btn navbar-sidebar__close",onClick:()=>e.toggle(),children:(0,u.jsx)(k,{color:"var(--ifm-color-emphasis-600)"})})}function se(){return(0,u.jsxs)("div",{className:"navbar-sidebar__brand",children:[(0,u.jsx)(ie,{}),(0,u.jsx)(oe,{className:"margin-right--md"}),(0,u.jsx)(le,{})]})}var ce=n(28774),ue=n(86025),de=n(16654),pe=n(91252),fe=n(43186);function me({activeBasePath:e,activeBaseRegex:t,to:n,href:r,label:o,html:a,isDropdownLink:i,prependBaseUrlToHref:l,...s}){const c=(0,ue.Ay)(n),d=(0,ue.Ay)(e),p=(0,ue.Ay)(r,{forcePrependBaseUrl:!0}),f=o&&r&&!(0,de.A)(r),m=a?{dangerouslySetInnerHTML:{__html:a}}:{children:(0,u.jsxs)(u.Fragment,{children:[o,f&&(0,u.jsx)(fe.A,{...i&&{width:12,height:12}})]})};return r?(0,u.jsx)(ce.A,{href:l?p:r,...s,...m}):(0,u.jsx)(ce.A,{to:c,isNavLink:!0,...(e||t)&&{isActive:(e,n)=>t?(0,pe.G)(t,n.pathname):n.pathname.startsWith(d)},...s,...m})}function he({className:e,isDropdownItem:t,...n}){return(0,u.jsx)("li",{className:"menu__list-item",children:(0,u.jsx)(me,{className:(0,o.A)("menu__link",e),...n})})}function ge({className:e,isDropdownItem:t=!1,...n}){const r=(0,u.jsx)(me,{className:(0,o.A)(t?"dropdown__link":"navbar__item navbar__link",e),isDropdownLink:t,...n});return t?(0,u.jsx)("li",{children:r}):r}function be({mobile:e=!1,position:t,...n}){const r=e?he:ge;return(0,u.jsx)(r,{...n,activeClassName:n.activeClassName??(e?"menu__link--active":"navbar__link--active")})}var ye=n(41422),ve=n(99169),we=n(44586);const xe="dropdownNavbarItemMobile_J0Sd";function ke(e,t){return e.some(e=>function(e,t){return!!(0,ve.ys)(e.to,t)||!!(0,pe.G)(e.activeBaseRegex,t)||!(!e.activeBasePath||!t.startsWith(e.activeBasePath))}(e,t))}function Se({collapsed:e,onClick:t}){return(0,u.jsx)("button",{"aria-label":e?(0,s.T)({id:"theme.navbar.mobileDropdown.collapseButton.expandAriaLabel",message:"Expand the dropdown",description:"The ARIA label of the button to expand the mobile dropdown navbar item"}):(0,s.T)({id:"theme.navbar.mobileDropdown.collapseButton.collapseAriaLabel",message:"Collapse the dropdown",description:"The ARIA label of the button to collapse the mobile dropdown navbar item"}),"aria-expanded":!e,type:"button",className:"clean-btn menu__caret",onClick:t})}function Ee({items:e,className:t,position:n,onClick:a,...i}){const s=function(){const{siteConfig:{baseUrl:e}}=(0,we.A)(),{pathname:t}=(0,l.zy)();return t.replace(e,"/")}(),c=(0,ve.ys)(i.to,s),d=ke(e,s),{collapsed:p,toggleCollapsed:f}=function({active:e}){const{collapsed:t,toggleCollapsed:n,setCollapsed:o}=(0,ye.u)({initialState:()=>!e});return(0,r.useEffect)(()=>{e&&o(!1)},[e,o]),{collapsed:t,toggleCollapsed:n}}({active:c||d}),m=i.to?void 0:"#";return(0,u.jsxs)("li",{className:(0,o.A)("menu__list-item",{"menu__list-item--collapsed":p}),children:[(0,u.jsxs)("div",{className:(0,o.A)("menu__list-item-collapsible",{"menu__list-item-collapsible--active":c}),children:[(0,u.jsx)(me,{role:"button",className:(0,o.A)(xe,"menu__link menu__link--sublist",t),href:m,...i,onClick:e=>{"#"===m&&e.preventDefault(),f()},children:i.children??i.label}),(0,u.jsx)(Se,{collapsed:p,onClick:e=>{e.preventDefault(),f()}})]}),(0,u.jsx)(ye.N,{lazy:!0,as:"ul",className:"menu__list",collapsed:p,children:e.map((e,t)=>(0,r.createElement)(Xe,{mobile:!0,isDropdownItem:!0,onClick:a,activeClassName:"menu__link--active",...e,key:t}))})]})}function _e({items:e,position:t,className:n,onClick:a,...i}){const l=(0,r.useRef)(null),[s,c]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{const e=e=>{l.current&&!l.current.contains(e.target)&&c(!1)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),document.addEventListener("focusin",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e),document.removeEventListener("focusin",e)}},[l]),(0,u.jsxs)("div",{ref:l,className:(0,o.A)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===t,"dropdown--show":s}),children:[(0,u.jsx)(me,{"aria-haspopup":"true","aria-expanded":s,role:"button",href:i.to?void 0:"#",className:(0,o.A)("navbar__link",n),...i,onClick:i.to?void 0:e=>e.preventDefault(),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),c(!s))},children:i.children??i.label}),(0,u.jsx)("ul",{className:"dropdown__menu",children:e.map((e,t)=>(0,r.createElement)(Xe,{isDropdownItem:!0,activeClassName:"dropdown__link--active",...e,key:t}))})]})}function je({mobile:e=!1,...t}){const n=e?Ee:_e;return(0,u.jsx)(n,{...t})}var Oe=n(32131);function Ae({width:e=20,height:t=20,...n}){return(0,u.jsx)("svg",{viewBox:"0 0 24 24",width:e,height:t,"aria-hidden":!0,...n,children:(0,u.jsx)("path",{fill:"currentColor",d:"M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z"})})}const Ce="iconLanguage_nlXk";var Pe=n(40961),Te=n(55600),Ie=n(5260),Re=n(24255),Ne=n(51062),De=n(2967),Le=n(82565);function Me(){return[`language:${(0,we.A)().i18n.currentLocale}`,function(){const e=(0,Le.v)();return[De.C,...e]}().map(e=>`docusaurus_tag:${e}`)]}const Fe={button:{buttonText:(0,s.T)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"}),buttonAriaLabel:(0,s.T)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"})},modal:{searchBox:{resetButtonTitle:(0,s.T)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),resetButtonAriaLabel:(0,s.T)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),cancelButtonText:(0,s.T)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"}),cancelButtonAriaLabel:(0,s.T)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"})},startScreen:{recentSearchesTitle:(0,s.T)({id:"theme.SearchModal.startScreen.recentSearchesTitle",message:"Recent",description:"The title for recent searches"}),noRecentSearchesText:(0,s.T)({id:"theme.SearchModal.startScreen.noRecentSearchesText",message:"No recent searches",description:"The text when no recent searches"}),saveRecentSearchButtonTitle:(0,s.T)({id:"theme.SearchModal.startScreen.saveRecentSearchButtonTitle",message:"Save this search",description:"The label for save recent search button"}),removeRecentSearchButtonTitle:(0,s.T)({id:"theme.SearchModal.startScreen.removeRecentSearchButtonTitle",message:"Remove this search from history",description:"The label for remove recent search button"}),favoriteSearchesTitle:(0,s.T)({id:"theme.SearchModal.startScreen.favoriteSearchesTitle",message:"Favorite",description:"The title for favorite searches"}),removeFavoriteSearchButtonTitle:(0,s.T)({id:"theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle",message:"Remove this search from favorites",description:"The label for remove favorite search button"})},errorScreen:{titleText:(0,s.T)({id:"theme.SearchModal.errorScreen.titleText",message:"Unable to fetch results",description:"The title for error screen of search modal"}),helpText:(0,s.T)({id:"theme.SearchModal.errorScreen.helpText",message:"You might want to check your network connection.",description:"The help text for error screen of search modal"})},footer:{selectText:(0,s.T)({id:"theme.SearchModal.footer.selectText",message:"to select",description:"The explanatory text of the action for the enter key"}),selectKeyAriaLabel:(0,s.T)({id:"theme.SearchModal.footer.selectKeyAriaLabel",message:"Enter key",description:"The ARIA label for the Enter key button that makes the selection"}),navigateText:(0,s.T)({id:"theme.SearchModal.footer.navigateText",message:"to navigate",description:"The explanatory text of the action for the Arrow up and Arrow down key"}),navigateUpKeyAriaLabel:(0,s.T)({id:"theme.SearchModal.footer.navigateUpKeyAriaLabel",message:"Arrow up",description:"The ARIA label for the Arrow up key button that makes the navigation"}),navigateDownKeyAriaLabel:(0,s.T)({id:"theme.SearchModal.footer.navigateDownKeyAriaLabel",message:"Arrow down",description:"The ARIA label for the Arrow down key button that makes the navigation"}),closeText:(0,s.T)({id:"theme.SearchModal.footer.closeText",message:"to close",description:"The explanatory text of the action for Escape key"}),closeKeyAriaLabel:(0,s.T)({id:"theme.SearchModal.footer.closeKeyAriaLabel",message:"Escape key",description:"The ARIA label for the Escape key button that close the modal"}),searchByText:(0,s.T)({id:"theme.SearchModal.footer.searchByText",message:"Search by",description:"The text explain that the search is making by Algolia"})},noResultsScreen:{noResultsText:(0,s.T)({id:"theme.SearchModal.noResultsScreen.noResultsText",message:"No results for",description:"The text explains that there are no results for the following search"}),suggestedQueryText:(0,s.T)({id:"theme.SearchModal.noResultsScreen.suggestedQueryText",message:"Try searching for",description:"The text for the suggested query when no results are found for the following search"}),reportMissingResultsText:(0,s.T)({id:"theme.SearchModal.noResultsScreen.reportMissingResultsText",message:"Believe this query should return results?",description:"The text for the question where the user thinks there are missing results"}),reportMissingResultsLinkText:(0,s.T)({id:"theme.SearchModal.noResultsScreen.reportMissingResultsLinkText",message:"Let us know.",description:"The text for the link to report missing results"})}},placeholder:(0,s.T)({id:"theme.SearchModal.placeholder",message:"Search docs",description:"The placeholder of the input of the DocSearch pop-up modal"})};let ze=null;function Be(){return ze?Promise.resolve():Promise.all([n.e(8158).then(n.bind(n,48158)),Promise.all([n.e(1869),n.e(8913)]).then(n.bind(n,58913)),Promise.all([n.e(1869),n.e(8035)]).then(n.bind(n,90416))]).then(([{DocSearchModal:e}])=>{ze=e})}function Ue({hit:e,children:t}){return(0,u.jsx)(ce.A,{to:e.url,children:t})}function qe({state:e,onClose:t}){const n=(0,Re.w)();return(0,u.jsx)(ce.A,{to:n(e.query),onClick:t,children:(0,u.jsx)(s.A,{id:"theme.SearchBar.seeAll",values:{count:e.context.nbHits},children:"See all {count} results"})})}function $e({externalUrlRegex:e,...t}){const n=function({externalUrlRegex:e}){const t=(0,l.W6)(),[n]=(0,r.useState)(()=>({navigate(n){(0,pe.G)(e,n.itemUrl)?window.location.href=n.itemUrl:t.push(n.itemUrl)}}));return n}({externalUrlRegex:e}),o=function({contextualSearch:e,...t}){const n=Me(),r=t.searchParameters?.facetFilters??[],o=e?function(e,t){const n=e=>"string"==typeof e?[e]:e;return[...n(e),...n(t)]}(n,r):r;return{...t.searchParameters,facetFilters:o}}({...t}),a=function(e){const t=(0,Ne.C)(),[n]=(0,r.useState)(()=>n=>e.transformItems?e.transformItems(n):n.map(e=>({...e,url:t(e.url)})));return n}(t),i=function(){const{siteMetadata:{docusaurusVersion:e}}=(0,we.A)();return(0,r.useCallback)(t=>(t.addAlgoliaAgent("docusaurus",e),t),[e])}(),s=(0,r.useRef)(null),c=(0,r.useRef)(null),[d,p]=(0,r.useState)(!1),[f,m]=(0,r.useState)(void 0),h=(0,r.useCallback)(()=>{if(!s.current){const e=document.createElement("div");s.current=e,document.body.insertBefore(e,document.body.firstChild)}},[]),g=(0,r.useCallback)(()=>{h(),Be().then(()=>p(!0))},[h]),b=(0,r.useCallback)(()=>{p(!1),c.current?.focus(),m(void 0)},[]),y=(0,r.useCallback)(e=>{"f"===e.key&&(e.metaKey||e.ctrlKey)||(e.preventDefault(),m(e.key),g())},[g]),v=function({closeModal:e}){return(0,r.useMemo)(()=>({state:t})=>(0,u.jsx)(qe,{state:t,onClose:e}),[e])}({closeModal:b});return(0,Te.E8)({isOpen:d,onOpen:g,onClose:b,onInput:y,searchButtonRef:c}),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(Ie.A,{children:(0,u.jsx)("link",{rel:"preconnect",href:`https://${t.appId}-dsn.algolia.net`,crossOrigin:"anonymous"})}),(0,u.jsx)(Te.Bc,{onTouchStart:Be,onFocus:Be,onMouseOver:Be,onClick:g,ref:c,translations:t.translations?.button??Fe.button}),d&&ze&&s.current&&(0,Pe.createPortal)((0,u.jsx)(ze,{onClose:b,initialScrollY:window.scrollY,initialQuery:f,navigator:n,transformItems:a,hitComponent:Ue,transformSearchClient:i,...t.searchPagePath&&{resultsFooterComponent:v},placeholder:Fe.placeholder,...t,translations:t.translations?.modal??Fe.modal,searchParameters:o}),s.current)]})}function He(){const{siteConfig:e}=(0,we.A)();return(0,u.jsx)($e,{...e.themeConfig.algolia})}const Ge={navbarSearchContainer:"navbarSearchContainer_Bca1"};function Ve({children:e,className:t}){return(0,u.jsx)("div",{className:(0,o.A)(t,Ge.navbarSearchContainer),children:e})}var We=n(44070),Ke=n(26972);var Qe=n(53886);function Ye({docsPluginId:e,configs:t}){return function(e,t){if(t){const n=new Map(e.map(e=>[e.name,e])),r=(t,r)=>{const o=n.get(t);if(!o)throw new Error(`No docs version exist for name '${t}', please verify your 'docsVersionDropdown' navbar item versions config.\nAvailable version names:\n- ${e.map(e=>`${e.name}`).join("\n- ")}`);return{version:o,label:r?.label??o.label}};return Array.isArray(t)?t.map(e=>r(e,void 0)):Object.entries(t).map(([e,t])=>r(e,t))}return e.map(e=>({version:e,label:e.label}))}((0,We.jh)(e),t)}function Je(e,t){return t.alternateDocVersions[e.name]??function(e){return e.docs.find(t=>t.id===e.mainDocId)}(e)}const Ze={default:be,localeDropdown:function({mobile:e,dropdownItemsBefore:t,dropdownItemsAfter:n,queryString:r="",...o}){const{i18n:{currentLocale:a,locales:i,localeConfigs:c}}=(0,we.A)(),d=(0,Oe.o)(),{search:p,hash:f}=(0,l.zy)(),m=[...t,...i.map(t=>{const n=`${`pathname://${d.createUrl({locale:t,fullyQualified:!1})}`}${p}${f}${r}`;return{label:c[t].label,lang:c[t].htmlLang,to:n,target:"_self",autoAddBaseUrl:!1,className:t===a?e?"menu__link--active":"dropdown__link--active":""}}),...n],h=e?(0,s.T)({message:"Languages",id:"theme.navbar.mobileLanguageDropdown.label",description:"The label for the mobile language switcher dropdown"}):c[a].label;return(0,u.jsx)(je,{...o,mobile:e,label:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(Ae,{className:Ce}),h]}),items:m})},search:function({mobile:e,className:t}){return e?null:(0,u.jsx)(Ve,{className:t,children:(0,u.jsx)(He,{})})},dropdown:je,html:function({value:e,className:t,mobile:n=!1,isDropdownItem:r=!1}){const a=r?"li":"div";return(0,u.jsx)(a,{className:(0,o.A)({navbar__item:!n&&!r,"menu__list-item":n},t),dangerouslySetInnerHTML:{__html:e}})},doc:function({docId:e,label:t,docsPluginId:n,...r}){const{activeDoc:o}=(0,We.zK)(n),a=(0,Ke.QB)(e,n),i=o?.path===a?.path;return null===a||a.unlisted&&!i?null:(0,u.jsx)(be,{exact:!0,...r,isActive:()=>i||!!o?.sidebar&&o.sidebar===a.sidebar,label:t??a.id,to:a.path})},docSidebar:function({sidebarId:e,label:t,docsPluginId:n,...r}){const{activeDoc:o}=(0,We.zK)(n),a=(0,Ke.fW)(e,n).link;if(!a)throw new Error(`DocSidebarNavbarItem: Sidebar with ID "${e}" doesn't have anything to be linked to.`);return(0,u.jsx)(be,{exact:!0,...r,isActive:()=>o?.sidebar===e,label:t??a.label,to:a.path})},docsVersion:function({label:e,to:t,docsPluginId:n,...r}){const o=(0,Ke.Vd)(n)[0],a=e??o.label,i=t??(e=>e.docs.find(t=>t.id===e.mainDocId))(o).path;return(0,u.jsx)(be,{...r,label:a,to:i})},docsVersionDropdown:function({mobile:e,docsPluginId:t,dropdownActiveClassDisabled:n,dropdownItemsBefore:r,dropdownItemsAfter:o,versions:a,...i}){const{search:c,hash:d}=(0,l.zy)(),p=(0,We.zK)(t),{savePreferredVersionName:f}=(0,Qe.g1)(t),m=Ye({docsPluginId:t,configs:a}),h=function({docsPluginId:e,versionItems:t}){return(0,Ke.Vd)(e).map(e=>t.find(t=>t.version===e)).filter(e=>void 0!==e)[0]??t[0]}({docsPluginId:t,versionItems:m}),g=[...r,...m.map(function({version:e,label:t}){return{label:t,to:`${Je(e,p).path}${c}${d}`,isActive:()=>e===p.activeVersion,onClick:()=>f(e.name)}}),...o],b=e&&g.length>1?(0,s.T)({id:"theme.navbar.mobileVersionsDropdown.label",message:"Versions",description:"The label for the navbar versions dropdown on mobile view"}):h.label,y=e&&g.length>1?void 0:Je(h.version,p).path;return g.length<=1?(0,u.jsx)(be,{...i,mobile:e,label:b,to:y,isActive:n?()=>!1:void 0}):(0,u.jsx)(je,{...i,mobile:e,label:b,to:y,items:g,isActive:n?()=>!1:void 0})}};function Xe({type:e,...t}){const n=function(e,t){return e&&"default"!==e?e:"items"in t?"dropdown":"default"}(e,t),r=Ze[n];if(!r)throw new Error(`No NavbarItem component found for type "${e}".`);return(0,u.jsx)(r,{...t})}function et(){const e=(0,C.M)(),t=(0,w.p)().navbar.items;return(0,u.jsx)("ul",{className:"menu__list",children:t.map((t,n)=>(0,r.createElement)(Xe,{mobile:!0,...t,onClick:()=>e.toggle(),key:n}))})}function tt(e){return(0,u.jsx)("button",{...e,type:"button",className:"clean-btn navbar-sidebar__back",children:(0,u.jsx)(s.A,{id:"theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel",description:"The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)",children:"\u2190 Back to main menu"})})}function nt(){const e=0===(0,w.p)().navbar.items.length,t=L();return(0,u.jsxs)(u.Fragment,{children:[!e&&(0,u.jsx)(tt,{onClick:()=>t.hide()}),t.content]})}function rt(){const e=(0,C.M)();return function(e=!0){(0,r.useEffect)(()=>(document.body.style.overflow=e?"hidden":"visible",()=>{document.body.style.overflow="visible"}),[e])}(e.shown),e.shouldRender?(0,u.jsx)(z,{header:(0,u.jsx)(se,{}),primaryMenu:(0,u.jsx)(et,{}),secondaryMenu:(0,u.jsx)(nt,{})}):null}const ot={navbarHideable:"navbarHideable_m1mJ",navbarHidden:"navbarHidden_jGov"};function at(e){return(0,u.jsx)("div",{role:"presentation",...e,className:(0,o.A)("navbar-sidebar__backdrop",e.className)})}function it({children:e}){const{navbar:{hideOnScroll:t,style:n}}=(0,w.p)(),a=(0,C.M)(),{navbarRef:i,isNavbarVisible:l}=function(e){const[t,n]=(0,r.useState)(e),o=(0,r.useRef)(!1),a=(0,r.useRef)(0),i=(0,r.useCallback)(e=>{null!==e&&(a.current=e.getBoundingClientRect().height)},[]);return(0,P.Mq)(({scrollY:t},r)=>{if(!e)return;if(t=i?n(!1):t+s{if(!e)return;const r=t.location.hash;if(r?document.getElementById(r.substring(1)):void 0)return o.current=!0,void n(!1);n(!0)}),{navbarRef:i,isNavbarVisible:t}}(t);return(0,u.jsxs)("nav",{ref:i,"aria-label":(0,s.T)({id:"theme.NavBar.navAriaLabel",message:"Main",description:"The ARIA label for the main navigation"}),className:(0,o.A)(g.G.layout.navbar.container,"navbar","navbar--fixed-top",t&&[ot.navbarHideable,!l&&ot.navbarHidden],{"navbar--dark":"dark"===n,"navbar--primary":"primary"===n,"navbar-sidebar--show":a.shown}),children:[e,(0,u.jsx)(at,{onClick:a.toggle}),(0,u.jsx)(rt,{})]})}var lt=n(70440);const st={errorBoundaryError:"errorBoundaryError_a6uf",errorBoundaryFallback:"errorBoundaryFallback_VBag"};function ct(e){return(0,u.jsx)("button",{type:"button",...e,children:(0,u.jsx)(s.A,{id:"theme.ErrorPageContent.tryAgain",description:"The label of the button to try again rendering when the React error boundary captures an error",children:"Try again"})})}function ut({error:e}){const t=(0,lt.rA)(e).map(e=>e.message).join("\n\nCause:\n");return(0,u.jsx)("p",{className:st.errorBoundaryError,children:t})}class dt extends r.Component{componentDidCatch(e,t){throw this.props.onError(e,t)}render(){return this.props.children}}const pt="right";function ft({width:e=30,height:t=30,className:n,...r}){return(0,u.jsx)("svg",{className:n,width:e,height:t,viewBox:"0 0 30 30","aria-hidden":"true",...r,children:(0,u.jsx)("path",{stroke:"currentColor",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"2",d:"M4 7h22M4 15h22M4 23h22"})})}function mt(){const{toggle:e,shown:t}=(0,C.M)();return(0,u.jsx)("button",{onClick:e,"aria-label":(0,s.T)({id:"theme.docs.sidebar.toggleSidebarButtonAriaLabel",message:"Toggle navigation bar",description:"The ARIA label for hamburger menu button of mobile navigation"}),"aria-expanded":t,className:"navbar__toggle clean-btn",type:"button",children:(0,u.jsx)(ft,{})})}const ht={colorModeToggle:"colorModeToggle_DEke"};function gt({items:e}){return(0,u.jsx)(u.Fragment,{children:e.map((e,t)=>(0,u.jsx)(dt,{onError:t=>new Error(`A theme navbar item failed to render.\nPlease double-check the following navbar item (themeConfig.navbar.items) of your Docusaurus config:\n${JSON.stringify(e,null,2)}`,{cause:t}),children:(0,u.jsx)(Xe,{...e})},t))})}function bt({left:e,right:t}){return(0,u.jsxs)("div",{className:"navbar__inner",children:[(0,u.jsx)("div",{className:(0,o.A)(g.G.layout.navbar.containerLeft,"navbar__items"),children:e}),(0,u.jsx)("div",{className:(0,o.A)(g.G.layout.navbar.containerRight,"navbar__items navbar__items--right"),children:t})]})}function yt(){const e=(0,C.M)(),t=(0,w.p)().navbar.items,[n,r]=function(e){function t(e){return"left"===(e.position??pt)}return[e.filter(t),e.filter(e=>!t(e))]}(t),o=t.find(e=>"search"===e.type);return(0,u.jsx)(bt,{left:(0,u.jsxs)(u.Fragment,{children:[!e.disabled&&(0,u.jsx)(mt,{}),(0,u.jsx)(ie,{}),(0,u.jsx)(gt,{items:n})]}),right:(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(gt,{items:r}),(0,u.jsx)(oe,{className:ht.colorModeToggle}),!o&&(0,u.jsx)(Ve,{children:(0,u.jsx)(He,{})})]})})}function vt(){return(0,u.jsx)(it,{children:(0,u.jsx)(yt,{})})}function wt({item:e}){const{to:t,href:n,label:r,prependBaseUrlToHref:a,className:i,...l}=e,s=(0,ue.Ay)(t),c=(0,ue.Ay)(n,{forcePrependBaseUrl:!0});return(0,u.jsxs)(ce.A,{className:(0,o.A)("footer__link-item",i),...n?{href:a?c:n}:{to:s},...l,children:[r,n&&!(0,de.A)(n)&&(0,u.jsx)(fe.A,{})]})}function xt({item:e}){return e.html?(0,u.jsx)("li",{className:(0,o.A)("footer__item",e.className),dangerouslySetInnerHTML:{__html:e.html}}):(0,u.jsx)("li",{className:"footer__item",children:(0,u.jsx)(wt,{item:e})},e.href??e.to)}function kt({column:e}){return(0,u.jsxs)("div",{className:(0,o.A)(g.G.layout.footer.column,"col footer__col",e.className),children:[(0,u.jsx)("div",{className:"footer__title",children:e.title}),(0,u.jsx)("ul",{className:"footer__items clean-list",children:e.items.map((e,t)=>(0,u.jsx)(xt,{item:e},t))})]})}function St({columns:e}){return(0,u.jsx)("div",{className:"row footer__links",children:e.map((e,t)=>(0,u.jsx)(kt,{column:e},t))})}function Et(){return(0,u.jsx)("span",{className:"footer__link-separator",children:"\xb7"})}function _t({item:e}){return e.html?(0,u.jsx)("span",{className:(0,o.A)("footer__link-item",e.className),dangerouslySetInnerHTML:{__html:e.html}}):(0,u.jsx)(wt,{item:e})}function jt({links:e}){return(0,u.jsx)("div",{className:"footer__links text--center",children:(0,u.jsx)("div",{className:"footer__links",children:e.map((t,n)=>(0,u.jsxs)(r.Fragment,{children:[(0,u.jsx)(_t,{item:t}),e.length!==n+1&&(0,u.jsx)(Et,{})]},n))})})}function Ot({links:e}){return function(e){return"title"in e[0]}(e)?(0,u.jsx)(St,{columns:e}):(0,u.jsx)(jt,{links:e})}var At=n(21122);const Ct="footerLogoLink_BH7S";function Pt({logo:e}){const{withBaseUrl:t}=(0,ue.hH)(),n={light:t(e.src),dark:t(e.srcDark??e.src)};return(0,u.jsx)(At.A,{className:(0,o.A)("footer__logo",e.className),alt:e.alt,sources:n,width:e.width,height:e.height,style:e.style})}function Tt({logo:e}){return e.href?(0,u.jsx)(ce.A,{href:e.href,className:Ct,target:e.target,children:(0,u.jsx)(Pt,{logo:e})}):(0,u.jsx)(Pt,{logo:e})}function It({copyright:e}){return(0,u.jsx)("div",{className:"footer__copyright",dangerouslySetInnerHTML:{__html:e}})}function Rt({style:e,links:t,logo:n,copyright:r}){return(0,u.jsx)("footer",{className:(0,o.A)(g.G.layout.footer.container,"footer",{"footer--dark":"dark"===e}),children:(0,u.jsxs)("div",{className:"container container-fluid",children:[t,(n||r)&&(0,u.jsxs)("div",{className:"footer__bottom text--center",children:[n&&(0,u.jsx)("div",{className:"margin-bottom--sm",children:n}),r]})]})})}function Nt(){const{footer:e}=(0,w.p)();if(!e)return null;const{copyright:t,links:n,logo:r,style:o}=e;return(0,u.jsx)(Rt,{style:o,links:n&&n.length>0&&(0,u.jsx)(Ot,{links:n}),logo:r&&(0,u.jsx)(Tt,{logo:r}),copyright:t&&(0,u.jsx)(It,{copyright:t})})}const Dt=r.memo(Nt);function Lt(e){const[t,n]=(0,r.useState)(!1),o=r.useRef(null);(0,Te.E8)({isOpen:!1,onOpen:()=>{o.current?.click()}});const a=(0,u.jsxs)("div",{ref:o,onClick:()=>{document.querySelector(".DocSearch-Button")?.click()},onMouseEnter:()=>n(!0),onMouseLeave:()=>n(!1),style:{position:"fixed",right:"20px",bottom:"20px",zIndex:100,display:"flex",alignItems:"center",gap:"10px",cursor:"pointer"},children:[t&&(0,u.jsx)("div",{style:{backgroundColor:"#f6f6f6",padding:"8px 16px",borderRadius:"20px",color:"#000",fontSize:"14px",boxShadow:"0 2px 4px rgba(0,0,0,0.1)"},children:"Hi, how can I help you?"}),(0,u.jsx)("div",{style:{backgroundColor:"#f6f6f6",borderRadius:"50%",width:"48px",height:"48px",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 2px 4px rgba(0,0,0,0.1)"},children:(0,u.jsx)("img",{src:"/img/langflow-icon-black-transparent.svg",style:{width:"40px"},alt:"Search"})})]});return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(Dt,{...e}),a]})}const Mt=(0,T.fM)([B.a,x.o,P.Tv,Qe.VQ,i.Jx,function({children:e}){return(0,u.jsx)(I.y_,{children:(0,u.jsx)(C.e,{children:(0,u.jsx)(N,{children:e})})})}]);function Ft({children:e}){return(0,u.jsx)(Mt,{children:e})}var zt=n(51107);function Bt({error:e,tryAgain:t}){return(0,u.jsx)("main",{className:"container margin-vert--xl",children:(0,u.jsx)("div",{className:"row",children:(0,u.jsxs)("div",{className:"col col--6 col--offset-3",children:[(0,u.jsx)(zt.A,{as:"h1",className:"hero__title",children:(0,u.jsx)(s.A,{id:"theme.ErrorPageContent.title",description:"The title of the fallback page when the page crashed",children:"This page crashed."})}),(0,u.jsx)("div",{className:"margin-vert--lg",children:(0,u.jsx)(ct,{onClick:t,className:"button button--primary shadow--lw"})}),(0,u.jsx)("hr",{}),(0,u.jsx)("div",{className:"margin-vert--md",children:(0,u.jsx)(ut,{error:e})})]})})})}const Ut={mainWrapper:"mainWrapper_z2l0"};function qt(e){const{children:t,noFooter:n,wrapperClassName:r,title:l,description:s}=e;return(0,b.J)(),(0,u.jsxs)(Ft,{children:[(0,u.jsx)(i.be,{title:l,description:s}),(0,u.jsx)(v,{}),(0,u.jsx)(A,{}),(0,u.jsx)(vt,{}),(0,u.jsx)("div",{id:d,className:(0,o.A)(g.G.layout.main.container,g.G.wrapper.main,Ut.mainWrapper,r),children:(0,u.jsx)(a.A,{fallback:e=>(0,u.jsx)(Bt,{...e}),children:t})}),!n&&(0,u.jsx)(Lt,{})]})}},12983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addTrailingSlash=o,t.default=function(e,t){const{trailingSlash:n,baseUrl:r}=t;if(e.startsWith("#"))return e;if(void 0===n)return e;const[i]=e.split(/[#?]/),l="/"===i||i===r?i:(s=i,c=n,c?o(s):a(s));var s,c;return e.replace(i,l)},t.addLeadingSlash=function(e){return(0,r.addPrefix)(e,"/")},t.removeTrailingSlash=a;const r=n(42566);function o(e){return e.endsWith("/")?e:`${e}/`}function a(e){return(0,r.removeSuffix)(e,"/")}},13003:e=>{"use strict";e.exports=function(e){return e!=e}},13144:(e,t,n)=>{"use strict";var r=n(66743),o=n(11002),a=n(10076),i=n(47119);e.exports=i||r.call(a,o)},14035:(e,t,n)=>{"use strict";var r,o=n(36556),a=n(49092)(),i=n(9957),l=n(75795);if(a){var s=o("RegExp.prototype.exec"),c={},u=function(){throw c},d={toString:u,valueOf:u};"symbol"==typeof Symbol.toPrimitive&&(d[Symbol.toPrimitive]=u),r=function(e){if(!e||"object"!=typeof e)return!1;var t=l(e,"lastIndex");if(!(t&&i(t,"value")))return!1;try{s(e,d)}catch(n){return n===c}}}else{var p=o("Object.prototype.toString");r=function(e){return!(!e||"object"!=typeof e&&"function"!=typeof e)&&"[object RegExp]"===p(e)}}e.exports=r},14090:(e,t,n)=>{"use strict";n.d(t,{w:()=>o,J:()=>a});var r=n(96540);const o="navigation-with-keyboard";function a(){(0,r.useEffect)(()=>{function e(e){"keydown"===e.type&&"Tab"===e.key&&document.body.classList.add(o),"mousedown"===e.type&&document.body.classList.remove(o)}return document.addEventListener("keydown",e),document.addEventListener("mousedown",e),()=>{document.body.classList.remove(o),document.removeEventListener("keydown",e),document.removeEventListener("mousedown",e)}},[])}},14563:(e,t,n)=>{"use strict";n.d(t,{AL:()=>u,s$:()=>d});var r=n(96540),o=n(44586),a=n(36803),i=n(89532),l=n(74848);const s=({title:e,siteTitle:t,titleDelimiter:n})=>{const r=e?.trim();return r&&r!==t?`${r} ${n} ${t}`:t},c=(0,r.createContext)(null);function u({formatter:e,children:t}){return(0,l.jsx)(c.Provider,{value:e,children:t})}function d(){const e=function(){const e=(0,r.useContext)(c);if(null===e)throw new i.dV("TitleFormatterProvider");return e}(),{siteConfig:t}=(0,o.A)(),{title:n,titleDelimiter:l}=t,{plugin:u}=(0,a.A)();return{format:t=>e({title:t,siteTitle:n,titleDelimiter:l,plugin:u,defaultFormatter:s})}}},14875:(e,t,n)=>{"use strict";n.r(t),n.d(t,{onRouteDidUpdate:()=>d});var r=n(38193),o=n(96763);let a=!1;const i={codeLanguage:e=>{const t=e.querySelector("[data-ch-lang]")||e.closest("[data-ch-lang]");if(t){const e=t.getAttribute("data-ch-lang");if(e&&"text"!==e)return e}const n=e.closest(".theme-code-block")||e.parentElement?.closest('[class*="code"]')||e.parentElement;if(n){const e=n.querySelector('li[role="tab"][aria-selected="true"]');if(e){const t=e.textContent?.trim();if(t&&"text"!==t.toLowerCase())return t.toLowerCase()}}if(n){const e=n.querySelector('li[role="tab"]');if(e){const t=e.textContent?.trim();if(t&&"text"!==t.toLowerCase())return t.toLowerCase()}}return null}},l={selectors:[{selector:"h1, h2, h3, h4, h5, h6",eventName:"Scroll - Heading Viewed",properties:{element_type:"heading"}}]};function s(e,t={}){const n={};return Object.keys(t).forEach(r=>{const a=t[r];if("function"==typeof a)try{const t=a(e);null!=t&&(n[r]=t)}catch(l){o.warn(`Scroll tracking: Error executing function for property "${r}":`,l)}else if("string"==typeof a&&a.startsWith("helper:")){const t=a.replace("helper:","");if(i[t])try{const o=i[t](e);null!=o&&(n[r]=o)}catch(l){o.warn(`Scroll tracking: Error executing helper "${t}" for property "${r}":`,l)}else o.warn(`Scroll tracking: Unknown helper function "${t}"`)}else n[r]=a}),n.page_path=window.location.pathname,n.page_url=window.location.href,n.scroll_depth=function(){const e=window.pageYOffset||document.documentElement.scrollTop,t=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)-window.innerHeight;return t<=0?100:Math.min(100,Math.round(e/t*100))}(),e.tagName&&(n.tag_name=e.tagName.toLowerCase()),e.id&&(n.element_id=e.id),e.className&&(n.element_class=e.className),e.tagName&&e.tagName.match(/^H[1-6]$/)&&(n.heading_level=e.tagName.toLowerCase(),n.heading_text=e.textContent?.trim().substring(0,200),n.text=e.textContent?.trim().substring(0,200)),n}function c(e={}){if(!r.A.canUseDOM||a)return;const t=window.__SCROLL_TRACKING_CONFIG__||{},n=function(e){if(!window.IntersectionObserver)return void o.warn("IntersectionObserver not supported, element tracking disabled");const t=new IntersectionObserver(t=>{t.forEach(t=>{if(t.isIntersecting){const n=e.selectors.find(e=>t.target.matches(e.selector));if(n){const e=window.innerWidth<=768,r=t.target.matches(".ch-codeblock");setTimeout(()=>{const e=s(t.target,n.properties||{});window.analytics&&"function"==typeof window.analytics.track&&window.analytics.track(n.eventName,e)},e&&r?100:0)}}})},{threshold:.1,rootMargin:"0px"}),n=e=>{document.querySelectorAll(e.selector).forEach(e=>{e._scrollTrackingObserved||(t.observe(e),e._scrollTrackingObserved=!0)})};if(e.selectors.forEach(n),setTimeout(()=>{e.selectors.forEach(n)},1e3),window.MutationObserver){const n=new MutationObserver(n=>{n.forEach(n=>{n.addedNodes.forEach(n=>{n.nodeType===Node.ELEMENT_NODE&&e.selectors.forEach(e=>{n.matches&&n.matches(e.selector)&&(n._scrollTrackingObserved||(t.observe(n),n._scrollTrackingObserved=!0)),(n.querySelectorAll?n.querySelectorAll(e.selector):[]).forEach(e=>{e._scrollTrackingObserved||(t.observe(e),e._scrollTrackingObserved=!0)})})})})});n.observe(document.body,{childList:!0,subtree:!0}),t._mutationObserver=n}return t}({...l,...t,...e});a=!0,window._scrollTrackingObserver=n}function u(){window._scrollTrackingObserver&&(window._scrollTrackingObserver._mutationObserver&&window._scrollTrackingObserver._mutationObserver.disconnect(),window._scrollTrackingObserver.disconnect(),window._scrollTrackingObserver=null),document.querySelectorAll("[data-scroll-tracked]").forEach(e=>{delete e._scrollTrackingObserved,e.removeAttribute("data-scroll-tracked")}),a=!1}if(r.A.canUseDOM){const e=()=>{setTimeout(()=>{c()},250)};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",e):"interactive"===document.readyState?setTimeout(e,100):e(),window.addEventListener("popstate",()=>{u(),setTimeout(()=>c(),100)})}function d({location:e,previousLocation:t}){r.A.canUseDOM&&t&&e.pathname!==t.pathname&&(u(),setTimeout(()=>c(),100))}},15066:(e,t,n)=>{"use strict";function r(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;to});const o=function(){for(var e,t,n=0,o="",a=arguments.length;n{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.iterator;var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function b(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}function y(){}function v(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}b.prototype.isReactComponent={},b.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},b.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=b.prototype;var w=v.prototype=new y;w.constructor=v,h(w,b.prototype),w.isPureReactComponent=!0;var x=Array.isArray,k=Object.prototype.hasOwnProperty,S={current:null},E={key:!0,ref:!0,__self:!0,__source:!0};function _(e,t,r){var o,a={},i=null,l=null;if(null!=t)for(o in void 0!==t.ref&&(l=t.ref),void 0!==t.key&&(i=""+t.key),t)k.call(t,o)&&!E.hasOwnProperty(o)&&(a[o]=t[o]);var s=arguments.length-2;if(1===s)a.children=r;else if(1{"use strict";function r(e){return/^(?:\w*:|\/\/)/.test(e)}function o(e){return void 0!==e&&!r(e)}n.d(t,{A:()=>o,z:()=>r})},17065:(e,t,n)=>{"use strict";n.d(t,{W:()=>r});const r="default"},17559:(e,t,n)=>{"use strict";n.d(t,{G:()=>r});const r={page:{blogListPage:"blog-list-page",blogPostPage:"blog-post-page",blogTagsListPage:"blog-tags-list-page",blogTagPostListPage:"blog-tags-post-list-page",blogAuthorsListPage:"blog-authors-list-page",blogAuthorsPostsPage:"blog-authors-posts-page",docsDocPage:"docs-doc-page",docsTagsListPage:"docs-tags-list-page",docsTagDocListPage:"docs-tags-doc-list-page",mdxPage:"mdx-page"},wrapper:{main:"main-wrapper",blogPages:"blog-wrapper",docsPages:"docs-wrapper",mdxPages:"mdx-wrapper"},common:{editThisPage:"theme-edit-this-page",lastUpdated:"theme-last-updated",backToTopButton:"theme-back-to-top-button",codeBlock:"theme-code-block",admonition:"theme-admonition",unlistedBanner:"theme-unlisted-banner",draftBanner:"theme-draft-banner",admonitionType:e=>`theme-admonition-${e}`},announcementBar:{container:"theme-announcement-bar"},layout:{navbar:{container:"theme-layout-navbar",containerLeft:"theme-layout-navbar-left",containerRight:"theme-layout-navbar-right",mobileSidebar:{container:"theme-layout-navbar-sidebar",panel:"theme-layout-navbar-sidebar-panel"}},main:{container:"theme-layout-main"},footer:{container:"theme-layout-footer",column:"theme-layout-footer-column"}},docs:{docVersionBanner:"theme-doc-version-banner",docVersionBadge:"theme-doc-version-badge",docBreadcrumbs:"theme-doc-breadcrumbs",docMarkdown:"theme-doc-markdown",docTocMobile:"theme-doc-toc-mobile",docTocDesktop:"theme-doc-toc-desktop",docFooter:"theme-doc-footer",docFooterTagsRow:"theme-doc-footer-tags-row",docFooterEditMetaRow:"theme-doc-footer-edit-meta-row",docSidebarContainer:"theme-doc-sidebar-container",docSidebarMenu:"theme-doc-sidebar-menu",docSidebarItemCategory:"theme-doc-sidebar-item-category",docSidebarItemLink:"theme-doc-sidebar-item-link",docSidebarItemCategoryLevel:e=>`theme-doc-sidebar-item-category-level-${e}`,docSidebarItemLinkLevel:e=>`theme-doc-sidebar-item-link-level-${e}`},blog:{blogFooterTagsRow:"theme-blog-footer-tags-row",blogFooterEditMetaRow:"theme-blog-footer-edit-meta-row"},pages:{pageFooterEditMetaRow:"theme-pages-footer-edit-meta-row"}}},18215:(e,t,n)=>{"use strict";function r(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;to});const o=function(){for(var e,t,n=0,o="",a=arguments.length;n{var r={"./":8722};function o(e){var t=a(e);return n(t)}function a(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=a,e.exports=o,o.id=18692},19700:()=>{!function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,o,a){if(n.language===r){var i=n.tokenStack=[];n.code=n.code.replace(o,function(e){if("function"==typeof a&&!a(e))return e;for(var o,l=i.length;-1!==n.code.indexOf(o=t(r,l));)++l;return i[l]=e,o}),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var o=0,a=Object.keys(n.tokenStack);!function i(l){for(var s=0;s=a.length);s++){var c=l[s];if("string"==typeof c||c.content&&"string"==typeof c.content){var u=a[o],d=n.tokenStack[u],p="string"==typeof c?c:c.content,f=t(r,u),m=p.indexOf(f);if(m>-1){++o;var h=p.substring(0,m),g=new e.Token(r,e.tokenize(d,n.grammar),"language-"+r,d),b=p.substring(m+f.length),y=[];h&&y.push.apply(y,i([h])),y.push(g),b&&y.push.apply(y,i([b])),"string"==typeof c?l.splice.apply(l,[s,1].concat(y)):c.content=y}}else c.content&&i(c.content)}return l}(n.tokens)}}}})}(Prism)},20311:e=>{"use strict";e.exports=function(e,t,n,r,o,a,i,l){if(!e){var s;if(void 0===t)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,r,o,a,i,l],u=0;(s=new Error(t.replace(/%s/g,function(){return c[u++]}))).name="Invariant Violation"}throw s.framesToPop=1,s}}},21020:(e,t,n)=>{"use strict";var r=n(96540),o=Symbol.for("react.element"),a=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,l=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,a={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)i.call(t,r)&&!s.hasOwnProperty(r)&&(a[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===a[r]&&(a[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:a,_owner:l.current}}t.Fragment=a,t.jsx=c,t.jsxs=c},21122:(e,t,n)=>{"use strict";n.d(t,{A:()=>u});var r=n(96540),o=n(15066),a=n(92303),i=n(95293);const l={themedComponent:"themedComponent_mlkZ","themedComponent--light":"themedComponent--light_NVdE","themedComponent--dark":"themedComponent--dark_xIcU"};var s=n(74848);function c({className:e,children:t}){const n=(0,a.A)(),{colorMode:c}=(0,i.G)();return(0,s.jsx)(s.Fragment,{children:(n?"dark"===c?["dark"]:["light"]:["light","dark"]).map(n=>{const a=t({theme:n,className:(0,o.A)(e,l.themedComponent,l[`themedComponent--${n}`])});return(0,s.jsx)(r.Fragment,{children:a},n)})})}function u(e){const{sources:t,className:n,alt:r,...o}=e;return(0,s.jsx)(c,{className:n,children:({theme:e,className:n})=>(0,s.jsx)("img",{src:t[e],alt:r,className:n,...o})})}},21312:(e,t,n)=>{"use strict";n.d(t,{A:()=>u,T:()=>c});var r=n(96540),o=n(74848);function a(e,t){const n=e.split(/(\{\w+\})/).map((e,n)=>{if(n%2==1){const n=t?.[e.slice(1,-1)];if(void 0!==n)return n}return e});return n.some(e=>(0,r.isValidElement)(e))?n.map((e,t)=>(0,r.isValidElement)(e)?r.cloneElement(e,{key:t}):e).filter(e=>""!==e):n.join("")}var i=n(22654),l=n(96763);function s({id:e,message:t}){if(void 0===e&&void 0===t)throw new Error("Docusaurus translation declarations must have at least a translation id or a default translation message");return i[e??t]??t??e}function c({message:e,id:t},n){return a(s({message:e,id:t}),n)}function u({children:e,id:t,values:n}){if(e&&"string"!=typeof e)throw l.warn("Illegal children",e),new Error("The Docusaurus component only accept simple string values");const r=s({message:e,id:t});return(0,o.jsx)(o.Fragment,{children:a(r,n)})}},21798:(e,t,n)=>{"use strict";n.r(t)},22067:(e,t,n)=>{"use strict";var r=n(96540),o=n(5338),a=n(80545),i=n(54625),l=n(4784),s=n(38193);const c=[n(31911),n(10119),n(26134),n(76294),n(641),n(21798),n(68665),n(11818),n(73796),n(29492),n(88135),n(14875)];var u=n(35947),d=n(56347),p=n(22831),f=n(74848);function m({children:e}){return(0,f.jsx)(f.Fragment,{children:e})}var h=n(14563);const g=e=>e.defaultFormatter(e);function b({children:e}){return(0,f.jsx)(h.AL,{formatter:g,children:e})}function y({children:e}){return(0,f.jsx)(b,{children:e})}var v=n(5260),w=n(44586),x=n(86025),k=n(6342),S=n(45500),E=n(32131),_=n(14090),j=n(2967),O=n(70440),A=n(41463);function C(){const{i18n:{currentLocale:e,defaultLocale:t,localeConfigs:n}}=(0,w.A)(),r=(0,E.o)(),o=n[e].htmlLang,a=e=>e.replace("-","_");return(0,f.jsxs)(v.A,{children:[Object.entries(n).map(([e,{htmlLang:t}])=>(0,f.jsx)("link",{rel:"alternate",href:r.createUrl({locale:e,fullyQualified:!0}),hrefLang:t},e)),(0,f.jsx)("link",{rel:"alternate",href:r.createUrl({locale:t,fullyQualified:!0}),hrefLang:"x-default"}),(0,f.jsx)("meta",{property:"og:locale",content:a(o)}),Object.values(n).filter(e=>o!==e.htmlLang).map(e=>(0,f.jsx)("meta",{property:"og:locale:alternate",content:a(e.htmlLang)},`meta-og-${e.htmlLang}`))]})}function P({permalink:e}){const{siteConfig:{url:t}}=(0,w.A)(),n=function(){const{siteConfig:{url:e,baseUrl:t,trailingSlash:n}}=(0,w.A)(),{pathname:r}=(0,d.zy)();return e+(0,O.Ks)((0,x.Ay)(r),{trailingSlash:n,baseUrl:t})}(),r=e?`${t}${e}`:n;return(0,f.jsxs)(v.A,{children:[(0,f.jsx)("meta",{property:"og:url",content:r}),(0,f.jsx)("link",{rel:"canonical",href:r})]})}function T(){const{i18n:{currentLocale:e}}=(0,w.A)(),{metadata:t,image:n}=(0,k.p)();return(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(v.A,{children:[(0,f.jsx)("meta",{name:"twitter:card",content:"summary_large_image"}),(0,f.jsx)("body",{className:_.w})]}),n&&(0,f.jsx)(S.be,{image:n}),(0,f.jsx)(P,{}),(0,f.jsx)(C,{}),(0,f.jsx)(A.A,{tag:j.C,locale:e}),(0,f.jsx)(v.A,{children:t.map((e,t)=>(0,f.jsx)("meta",{...e},t))})]})}const I=new Map;var R=n(6125),N=n(26988),D=n(205);function L(e,...t){const n=c.map(n=>{const r=n.default?.[e]??n[e];return r?.(...t)});return()=>n.forEach(e=>e?.())}const M=function({children:e,location:t,previousLocation:n}){return(0,D.A)(()=>{n!==t&&(!function({location:e,previousLocation:t}){if(!t)return;const n=e.pathname===t.pathname,r=e.hash===t.hash,o=e.search===t.search;if(n&&r&&!o)return;const{hash:a}=e;if(a){const e=decodeURIComponent(a.substring(1)),t=document.getElementById(e);t?.scrollIntoView()}else window.scrollTo(0,0)}({location:t,previousLocation:n}),L("onRouteDidUpdate",{previousLocation:n,location:t}))},[n,t]),e};function F(e){const t=Array.from(new Set([e,decodeURI(e)])).map(e=>(0,p.u)(u.A,e)).flat();return Promise.all(t.map(e=>e.route.component.preload?.()))}var z=n(96763);class B extends r.Component{previousLocation;routeUpdateCleanupCb;constructor(e){super(e),this.previousLocation=null,this.routeUpdateCleanupCb=s.A.canUseDOM?L("onRouteUpdate",{previousLocation:null,location:this.props.location}):()=>{},this.state={nextRouteHasLoaded:!0}}shouldComponentUpdate(e,t){if(e.location===this.props.location)return t.nextRouteHasLoaded;const n=e.location;return this.previousLocation=this.props.location,this.setState({nextRouteHasLoaded:!1}),this.routeUpdateCleanupCb=L("onRouteUpdate",{previousLocation:this.previousLocation,location:n}),F(n.pathname).then(()=>{this.routeUpdateCleanupCb(),this.setState({nextRouteHasLoaded:!0})}).catch(e=>{z.warn(e),window.location.reload()}),!1}render(){const{children:e,location:t}=this.props;return(0,f.jsx)(M,{previousLocation:this.previousLocation,location:t,children:(0,f.jsx)(d.qh,{location:t,render:()=>e})})}}const U=B,q="__docusaurus-base-url-issue-banner-suggestion-container";function $(e){return`\ndocument.addEventListener('DOMContentLoaded', function maybeInsertBanner() {\n var shouldInsert = typeof window['docusaurus'] === 'undefined';\n shouldInsert && insertBanner();\n});\n\nfunction insertBanner() {\n var bannerContainer = document.createElement('div');\n bannerContainer.id = '__docusaurus-base-url-issue-banner-container';\n var bannerHtml = ${JSON.stringify(function(e){return`\n
\n

Your Docusaurus site did not load properly.

\n

A very common reason is a wrong site baseUrl configuration.

\n

Current configured baseUrl = ${e} ${"/"===e?" (default value)":""}

\n

We suggest trying baseUrl =

\n
\n`}(e)).replace(/!0===e.exact))return I.set(e.pathname,e.pathname),e;const t=e.pathname.trim().replace(/(?:\/index)?\.html$/,"")||"/";return I.set(e.pathname,t),{...e,pathname:t}}((0,d.zy)());return(0,f.jsx)(U,{location:e,children:Y})}function Z(){return(0,f.jsx)(W.A,{children:(0,f.jsx)(N.l,{children:(0,f.jsxs)(R.x,{children:[(0,f.jsx)(m,{children:(0,f.jsxs)(y,{children:[(0,f.jsx)(V,{}),(0,f.jsx)(T,{}),(0,f.jsx)(G,{}),(0,f.jsx)(J,{})]})}),(0,f.jsx)(Q,{})]})})})}var X=n(84054);const ee=function(e){try{return document.createElement("link").relList.supports(e)}catch{return!1}}("prefetch")?function(e){return new Promise((t,n)=>{if("undefined"==typeof document)return void n();const r=document.createElement("link");r.setAttribute("rel","prefetch"),r.setAttribute("href",e),r.onload=()=>t(),r.onerror=()=>n();const o=document.getElementsByTagName("head")[0]??document.getElementsByName("script")[0]?.parentNode;o?.appendChild(r)})}:function(e){return new Promise((t,n)=>{const r=new XMLHttpRequest;r.open("GET",e,!0),r.withCredentials=!0,r.onload=()=>{200===r.status?t():n()},r.send(null)})};var te=n(86921);const ne=new Set,re=new Set,oe=()=>navigator.connection?.effectiveType.includes("2g")||navigator.connection?.saveData,ae={prefetch:e=>{if(!(e=>!oe()&&!re.has(e)&&!ne.has(e))(e))return!1;ne.add(e);const t=(0,p.u)(u.A,e).flatMap(e=>{return t=e.route.path,Object.entries(X).filter(([e])=>e.replace(/-[^-]+$/,"")===t).flatMap(([,e])=>Object.values((0,te.A)(e)));var t});return Promise.all(t.map(e=>{const t=n.gca(e);return t&&!t.includes("undefined")?ee(t).catch(()=>{}):Promise.resolve()}))},preload:e=>!!(e=>!oe()&&!re.has(e))(e)&&(re.add(e),F(e))},ie=Object.freeze(ae);var le=n(96763);function se({children:e}){return"hash"===l.A.future.experimental_router?(0,f.jsx)(i.I9,{children:e}):(0,f.jsx)(i.Kd,{children:e})}const ce=Boolean(!0);if(s.A.canUseDOM){window.docusaurus=ie;const e=document.getElementById("__docusaurus"),t=(0,f.jsx)(a.vd,{children:(0,f.jsx)(se,{children:(0,f.jsx)(Z,{})})}),n=(e,t)=>{le.error("Docusaurus React Root onRecoverableError:",e,t)},i=()=>{if(window.docusaurusRoot)window.docusaurusRoot.render(t);else if(ce)window.docusaurusRoot=o.hydrateRoot(e,t,{onRecoverableError:n});else{const r=o.createRoot(e,{onRecoverableError:n});r.render(t),window.docusaurusRoot=r}};F(window.location.pathname).then(()=>{(0,r.startTransition)(i)})}},22069:(e,t,n)=>{"use strict";n.d(t,{M:()=>m,e:()=>f});var r=n(96540),o=n(75600),a=n(24581),i=n(57485),l=n(6342),s=n(89532),c=n(74848);const u=r.createContext(void 0);function d(){const e=function(){const e=(0,o.YL)(),{items:t}=(0,l.p)().navbar;return 0===t.length&&!e.component}(),t=(0,a.l)(),n=!e&&"mobile"===t,[i,s]=(0,r.useState)(!1),c=(0,r.useCallback)(()=>{s(e=>!e)},[]);return(0,r.useEffect)(()=>{"desktop"===t&&s(!1)},[t]),(0,r.useMemo)(()=>({disabled:e,shouldRender:n,toggle:c,shown:i}),[e,n,c,i])}function p({handler:e}){return(0,i.$Z)(e),null}function f({children:e}){const t=d();return(0,c.jsxs)(c.Fragment,{children:[t.shown&&(0,c.jsx)(p,{handler:()=>(t.toggle(),!1)}),(0,c.jsx)(u.Provider,{value:t,children:e})]})}function m(){const e=r.useContext(u);if(void 0===e)throw new s.dV("NavbarMobileSidebarProvider");return e}},22551:(e,t,n)=>{"use strict";var r=n(96763),o=n(96540),a=n(69982);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n