From 857bb65fbada55a7c0c5747d40f236d55bdac87b Mon Sep 17 00:00:00 2001 From: "github-merge-queue[bot]" Date: Thu, 17 Jul 2025 16:44:24 +0000 Subject: [PATCH] deploy: 607cadfe171281f39a75eb55c4dd2ed8668e2aac --- 404.html | 4 +- about-langflow.html | 4 +- agent-tutorial.html | 6 +- agents-tools.html | 4 +- agents.html | 4 +- api-build.html | 4 +- api-files.html | 4 +- api-flows-run.html | 4 +- api-flows.html | 4 +- api-logs.html | 4 +- api-monitor.html | 4 +- api-projects.html | 4 +- api-reference-api-examples.html | 4 +- api-users.html | 4 +- api.html | 4 +- api/add-server.html | 4 +- api/add-user.html | 4 +- api/auto-login.html | 4 +- api/build-flow.html | 4 +- api/build-public-tmp.html | 4 +- api/build-vertex-stream.html | 4 +- api/build-vertex.html | 4 +- api/cancel-build.html | 4 +- api/check-if-store-has-api-key.html | 4 +- api/check-if-store-is-enabled.html | 4 +- api/check-installed-mcp-servers.html | 4 +- api/create-api-key-route.html | 4 +- api/create-flow.html | 4 +- api/create-flows.html | 4 +- api/create-folder-redirect.html | 4 +- api/create-project.html | 4 +- api/create-upload-file.html | 4 +- api/create-variable.html | 4 +- api/custom-component-update.html | 4 +- api/custom-component.html | 4 +- api/delete-all-files-1.html | 4 +- api/delete-all-files.html | 4 +- api/delete-api-key-route.html | 4 +- api/delete-file-1.html | 4 +- api/delete-file.html | 4 +- api/delete-files-batch.html | 4 +- api/delete-flow.html | 4 +- api/delete-folder-redirect.html | 4 +- api/delete-messages-session.html | 4 +- api/delete-messages.html | 4 +- api/delete-multiple-flows.html | 4 +- api/delete-project.html | 4 +- api/delete-server.html | 4 +- api/delete-user.html | 4 +- api/delete-variable.html | 4 +- api/delete-vertex-builds.html | 4 +- api/download-component.html | 4 +- api/download-file-1.html | 4 +- api/download-file-2.html | 4 +- api/download-file-redirect.html | 4 +- api/download-file.html | 4 +- api/download-files-batch.html | 4 +- api/download-image.html | 4 +- api/download-multiple-file.html | 4 +- api/download-profile-picture.html | 4 +- api/edit-file-name.html | 4 +- api/experimental-run-flow.html | 4 +- api/get-all.html | 4 +- api/get-api-keys-route.html | 4 +- api/get-build-events.html | 4 +- api/get-components.html | 4 +- api/get-config.html | 4 +- api/get-elevenlabs-voice-ids.html | 4 +- api/get-list-of-components-liked-by-user.html | 4 +- api/get-message-sessions.html | 4 +- api/get-messages.html | 4 +- api/get-server-endpoint.html | 4 +- api/get-servers.html | 4 +- api/get-starter-projects.html | 4 +- api/get-tags.html | 4 +- api/get-task-status.html | 4 +- api/get-transactions.html | 4 +- api/get-version.html | 4 +- api/get-vertex-builds.html | 4 +- api/handle-messages-1.html | 4 +- api/handle-messages.html | 4 +- api/handle-project-messages-with-slash.html | 4 +- api/handle-project-messages.html | 4 +- api/handle-project-sse.html | 4 +- api/handle-sse-1.html | 4 +- api/handle-sse.html | 4 +- api/health-check.html | 4 +- api/health.html | 4 +- api/install-mcp-config.html | 4 +- api/like-component.html | 4 +- api/list-files-1.html | 4 +- api/list-files-2.html | 4 +- api/list-files.html | 4 +- api/list-profile-pictures.html | 4 +- api/list-project-tools.html | 4 +- api/login-to-get-access-token.html | 4 +- api/logout.html | 4 +- api/logs.html | 4 +- api/patch-user.html | 4 +- api/post-validate-code.html | 4 +- api/post-validate-prompt.html | 4 +- api/process-1.html | 4 +- api/process.html | 4 +- api/read-all-users.html | 4 +- api/read-basic-examples.html | 4 +- api/read-current-user.html | 4 +- api/read-flow.html | 4 +- api/read-flows.html | 4 +- api/read-folder-redirect.html | 4 +- api/read-folders-redirect.html | 4 +- api/read-project.html | 4 +- api/read-projects.html | 4 +- api/read-public-flow.html | 4 +- api/read-variables.html | 4 +- api/refresh-token.html | 4 +- api/reset-password.html | 4 +- api/retrieve-vertices-order.html | 4 +- api/save-store-api-key.html | 4 +- api/share-component.html | 4 +- api/simplified-run-flow.html | 4 +- api/stream-logs.html | 4 +- api/update-flow.html | 4 +- api/update-folder-redirect.html | 4 +- api/update-message.html | 4 +- api/update-project-mcp-settings.html | 4 +- api/update-project.html | 4 +- api/update-server-endpoint.html | 4 +- api/update-session-id.html | 4 +- api/update-shared-component.html | 4 +- api/update-variable.html | 4 +- api/upload-file-1.html | 4 +- api/upload-file-2.html | 4 +- api/upload-file-redirect.html | 4 +- api/upload-file.html | 4 +- api/upload-user-file-1.html | 4 +- api/upload-user-file.html | 4 +- api/webhook-run-flow.html | 4 +- assets/js/0132780e.735c4ee0.js | 1 + assets/js/0132780e.9f0ba5b8.js | 1 - assets/js/22dd74f7.0ea76a21.js | 1 + assets/js/22dd74f7.6dc8bc0e.js | 1 - ...0d4f5.170e4a23.js => 2ab0d4f5.98c966ea.js} | 2 +- assets/js/37f47bc1.5e5eb18e.js | 1 + assets/js/37f47bc1.da086e2a.js | 1 - assets/js/464a5f06.2353c667.js | 1 + assets/js/464a5f06.bd423937.js | 1 - assets/js/46d346a5.9e23adf1.js | 1 + assets/js/47e58a89.a2ce610e.js | 1 - assets/js/47e58a89.dabdb5a5.js | 1 + assets/js/4a8d85c6.f9349d6b.js | 1 - ...6251d.2849ad5f.js => 4e56251d.14eef125.js} | 2 +- ...9ded8.e9cf9e31.js => 5f59ded8.39f9122c.js} | 2 +- ...ef3f1.518ac522.js => 6ffef3f1.59f19c41.js} | 2 +- assets/js/709203b3.0f0620dc.js | 1 - assets/js/709203b3.9a1f4656.js | 1 + assets/js/7819cc1c.3ffd2d35.js | 1 - assets/js/7819cc1c.60de8093.js | 1 + assets/js/7f193c41.824df9c5.js | 1 + assets/js/7f193c41.cb9bad9f.js | 1 - assets/js/7f7a8893.3754e235.js | 1 + assets/js/7f7a8893.83a64abb.js | 1 - assets/js/8bd4a540.21b739ff.js | 1 + assets/js/8bd4a540.ef87eb43.js | 1 - assets/js/b079b393.2cba11aa.js | 1 + assets/js/b079b393.6026cd15.js | 1 - ...2a150.e036d526.js => ccb2a150.1a59d9e7.js} | 2 +- assets/js/d5bb0e16.6d8af6b8.js | 1 - assets/js/d5bb0e16.e29d0b76.js | 1 + ...6a4d2.81a844e5.js => e6c6a4d2.25926483.js} | 2 +- assets/js/f01590dc.6a7eeda6.js | 1 - assets/js/f01590dc.7fbbd871.js | 1 + assets/js/f735f5f3.6791a1bf.js | 1 + assets/js/f735f5f3.f96e130e.js | 1 - assets/js/main.0e1b5a24.js | 2 - assets/js/main.5570ad66.js | 2 + ...CENSE.txt => main.5570ad66.js.LICENSE.txt} | 0 assets/js/runtime~main.416f77d8.js | 1 - assets/js/runtime~main.b5204e6b.js | 1 + basic-prompting.html | 4 +- blog-writer.html | 4 +- chat-with-files.html | 4 +- chat-with-rag.html | 4 +- components-agents.html | 4 +- components-bundle-components.html | 4 +- components-custom-components.html | 4 +- components-data.html | 24 +-- components-embedding-models.html | 4 +- components-helpers.html | 4 +- components-io.html | 18 +- components-logic.html | 6 +- components-memories.html | 6 +- components-models.html | 4 +- components-processing.html | 62 +++---- components-prompts.html | 4 +- components-tools.html | 10 +- components-vector-stores.html | 48 ++--- concepts-components.html | 22 ++- concepts-file-management.html | 8 +- concepts-flows-import.html | 6 +- concepts-flows.html | 6 +- concepts-objects.html | 132 ------------- concepts-objects/index.html | 11 ++ concepts-overview.html | 6 +- concepts-playground.html | 6 +- concepts-publish.html | 6 +- concepts-voice-mode.html | 8 +- configuration-api-keys.html | 4 +- configuration-authentication.html | 4 +- configuration-cli.html | 4 +- configuration-custom-database.html | 4 +- configuration-global-variables.html | 4 +- configuration-objects/index.html | 6 +- contributing-bundles.html | 4 +- contributing-community.html | 4 +- contributing-component-tests.html | 4 +- contributing-components.html | 4 +- contributing-github-issues.html | 4 +- contributing-how-to-contribute.html | 4 +- contributing-telemetry.html | 4 +- contributing-templates.html | 4 +- data-types.html | 174 ++++++++++++++++++ deployment-caddyfile.html | 4 +- deployment-docker.html | 4 +- deployment-gcp.html | 4 +- deployment-hugging-face-spaces.html | 4 +- deployment-kubernetes-dev.html | 4 +- deployment-kubernetes-prod.html | 4 +- deployment-overview.html | 4 +- deployment-prod-best-practices.html | 4 +- deployment-public-server.html | 4 +- deployment-railway.html | 4 +- deployment-render.html | 4 +- develop-application.html | 4 +- develop-overview.html | 4 +- document-qa.html | 4 +- environment-variables.html | 4 +- financial-report-parser.html | 6 +- get-started-installation.html | 4 +- get-started-quickstart.html | 4 +- guides-data-message/index.html | 6 +- index.html | 4 +- install-custom-dependencies.html | 4 +- integrations-apify.html | 4 +- integrations-arize.html | 4 +- integrations-assemblyai.html | 4 +- integrations-cleanlab.html | 4 +- integrations-composio.html | 4 +- integrations-docling.html | 6 +- integrations-google-big-query.html | 4 +- integrations-langfuse.html | 4 +- integrations-langsmith.html | 4 +- integrations-langwatch.html | 4 +- integrations-nvidia-g-assist.html | 8 +- integrations-nvidia-ingest-wsl2.html | 4 +- integrations-nvidia-ingest.html | 8 +- integrations-opik.html | 4 +- ...setup-google-cloud-vertex-ai-langflow.html | 4 +- .../notion/notion-agent-conversational.html | 4 +- .../notion/notion-agent-meeting-notes.html | 4 +- integrations/notion/setup.html | 4 +- logging.html | 4 +- luna-for-langflow.html | 4 +- mcp-client.html | 4 +- mcp-component-astra.html | 4 +- mcp-server.html | 4 +- mcp-tutorial.html | 4 +- memory-chatbot.html | 4 +- memory.html | 6 +- release-notes.html | 4 +- search.html | 4 +- sequential-agent.html | 4 +- session-id.html | 4 +- simple-agent.html | 6 +- sitemap.xml | 2 +- travel-planning-agent.html | 4 +- troubleshoot.html | 4 +- typescript-client.html | 4 +- vector-store-rag.html | 4 +- webhook.html | 4 +- 279 files changed, 783 insertions(+), 724 deletions(-) create mode 100644 assets/js/0132780e.735c4ee0.js delete mode 100644 assets/js/0132780e.9f0ba5b8.js create mode 100644 assets/js/22dd74f7.0ea76a21.js delete mode 100644 assets/js/22dd74f7.6dc8bc0e.js rename assets/js/{2ab0d4f5.170e4a23.js => 2ab0d4f5.98c966ea.js} (53%) create mode 100644 assets/js/37f47bc1.5e5eb18e.js delete mode 100644 assets/js/37f47bc1.da086e2a.js create mode 100644 assets/js/464a5f06.2353c667.js delete mode 100644 assets/js/464a5f06.bd423937.js create mode 100644 assets/js/46d346a5.9e23adf1.js delete mode 100644 assets/js/47e58a89.a2ce610e.js create mode 100644 assets/js/47e58a89.dabdb5a5.js delete mode 100644 assets/js/4a8d85c6.f9349d6b.js rename assets/js/{4e56251d.2849ad5f.js => 4e56251d.14eef125.js} (88%) rename assets/js/{5f59ded8.e9cf9e31.js => 5f59ded8.39f9122c.js} (71%) rename assets/js/{6ffef3f1.518ac522.js => 6ffef3f1.59f19c41.js} (78%) delete mode 100644 assets/js/709203b3.0f0620dc.js create mode 100644 assets/js/709203b3.9a1f4656.js delete mode 100644 assets/js/7819cc1c.3ffd2d35.js create mode 100644 assets/js/7819cc1c.60de8093.js create mode 100644 assets/js/7f193c41.824df9c5.js delete mode 100644 assets/js/7f193c41.cb9bad9f.js create mode 100644 assets/js/7f7a8893.3754e235.js delete mode 100644 assets/js/7f7a8893.83a64abb.js create mode 100644 assets/js/8bd4a540.21b739ff.js delete mode 100644 assets/js/8bd4a540.ef87eb43.js create mode 100644 assets/js/b079b393.2cba11aa.js delete mode 100644 assets/js/b079b393.6026cd15.js rename assets/js/{ccb2a150.e036d526.js => ccb2a150.1a59d9e7.js} (77%) delete mode 100644 assets/js/d5bb0e16.6d8af6b8.js create mode 100644 assets/js/d5bb0e16.e29d0b76.js rename assets/js/{e6c6a4d2.81a844e5.js => e6c6a4d2.25926483.js} (55%) delete mode 100644 assets/js/f01590dc.6a7eeda6.js create mode 100644 assets/js/f01590dc.7fbbd871.js create mode 100644 assets/js/f735f5f3.6791a1bf.js delete mode 100644 assets/js/f735f5f3.f96e130e.js delete mode 100644 assets/js/main.0e1b5a24.js create mode 100644 assets/js/main.5570ad66.js rename assets/js/{main.0e1b5a24.js.LICENSE.txt => main.5570ad66.js.LICENSE.txt} (100%) delete mode 100644 assets/js/runtime~main.416f77d8.js create mode 100644 assets/js/runtime~main.b5204e6b.js delete mode 100644 concepts-objects.html create mode 100644 concepts-objects/index.html create mode 100644 data-types.html diff --git a/404.html b/404.html index b0bff01937..8f785e57d2 100644 --- a/404.html +++ b/404.html @@ -23,8 +23,8 @@ - - + + diff --git a/about-langflow.html b/about-langflow.html index 9acadbaf9e..32423d553b 100644 --- a/about-langflow.html +++ b/about-langflow.html @@ -23,8 +23,8 @@ - - + + diff --git a/agent-tutorial.html b/agent-tutorial.html index d3d9ee4246..36e761cacd 100644 --- a/agent-tutorial.html +++ b/agent-tutorial.html @@ -23,8 +23,8 @@ - - + + @@ -80,7 +80,7 @@ When connected to an Agent component as tools, the agent has th

To test the flow, click Playground, and then ask the LLM a question, such as Recommend 3 used items for carol.davis@example.com, based on previous orders.

Given the example prompt, the LLM would respond with recommendations and web links for items based on previous orders in customer_orders.csv.

The Playground prints the agent's chain of thought as it selects tools to use and interacts with functionality provided by those tools. -For example, the agent can use the Directory component's as_dataframe tool to retrieve a DataFrame, and the Web search component's perform_search tool to find links to related items.

+For example, the agent can use the Directory component's as_dataframe tool to retrieve a DataFrame, and the Web search component's perform_search tool to find links to related items.

Add a prompt component to the flow

diff --git a/agents-tools.html b/agents-tools.html index 22c5188de1..55b8618c33 100644 --- a/agents-tools.html +++ b/agents-tools.html @@ -23,8 +23,8 @@ - - + + diff --git a/agents.html b/agents.html index 11b589f259..e9a6492ca2 100644 --- a/agents.html +++ b/agents.html @@ -23,8 +23,8 @@ - - + + diff --git a/api-build.html b/api-build.html index 614e6ec506..ff3ed2111c 100644 --- a/api-build.html +++ b/api-build.html @@ -23,8 +23,8 @@ - - + + diff --git a/api-files.html b/api-files.html index aee134180c..6ce16f3044 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 a1d6c5847c..6f1d398103 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 81d41c7a07..8eb2fd0ffc 100644 --- a/api-flows.html +++ b/api-flows.html @@ -23,8 +23,8 @@ - - + + diff --git a/api-logs.html b/api-logs.html index b715f14b72..365d4dea71 100644 --- a/api-logs.html +++ b/api-logs.html @@ -23,8 +23,8 @@ - - + + diff --git a/api-monitor.html b/api-monitor.html index a2834f9b73..2cce074f8e 100644 --- a/api-monitor.html +++ b/api-monitor.html @@ -23,8 +23,8 @@ - - + + diff --git a/api-projects.html b/api-projects.html index 50621ac188..cf1f11fe65 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 76e0c2a003..b5272a54af 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 17eaa24940..857c40ee53 100644 --- a/api-users.html +++ b/api-users.html @@ -23,8 +23,8 @@ - - + + diff --git a/api.html b/api.html index f640993dd8..a2b79995da 100644 --- a/api.html +++ b/api.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/add-server.html b/api/add-server.html index fc00b04250..24059d708f 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 b1c3ccdd9f..2704852ee9 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 30654fd928..7291926594 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 b3a356fbda..dc7e59cd77 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 956ac3809d..8eb4a19df5 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 3237124e84..5378195582 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 8633d8f140..d72ec0daf2 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 d085699b78..100ff9e934 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 509e00b6d8..84bffdf553 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 cdee48fe78..a478d17c8c 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 256ad9e37b..870e893851 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 02299f5fa0..1cee242e9d 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 5aa662a2d9..ca00b8cad1 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 ff1f6f2c0c..c18e51e5f8 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 90e9f827a9..93fdd6051f 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 fa68ecd84b..de71e5041e 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 f932c2a144..530a49c3b8 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 b221db1237..3f0f6d918b 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 085142c2f3..e34fbe5a52 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 a5476eb4a3..59ddfa5e37 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 b6367a49a7..f967209f74 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 2047aa34c8..30a1d81937 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 729ca2d78a..1dd8e6c261 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 14dea8a3b5..e24ca14fa2 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 27df72057a..3952de2001 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 4dabdd2003..abfb8fa274 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 6bc439b2e1..bde63a8b67 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 3cca0d419c..3f89a3e8ab 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 78e356af2b..b1c770b430 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 b7bcfed601..67aace903b 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 20f1e2fa0c..30f76c628f 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 10227bc0ea..b88def2e78 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 f065226b0c..cca7590a83 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 0a518916f8..4474999ecc 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 fde5bd1954..d9a6cc7b9c 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 f4d0ebf573..06d381c441 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 0a7bab632f..867f4567eb 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 24347deb52..761ef4a787 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 7466945fd4..e2ff5ba3e5 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 aa7a7186e7..849bed7da7 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 c02bd3c4db..0caeb56515 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 9ef052229e..e52e48c300 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 3297602eaa..9da6904f7b 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 0794ae7074..de243bb6e4 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 10ce897816..346a2fd000 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 f3add0e34b..fddf0cd6e1 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 e013082b53..e09b6af84a 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 b562e4345c..77a1a95968 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 2af20eda38..37ee6cd7d8 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 8b75dd601e..e85fae7d1a 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 91da0f431e..d5d6881975 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 56f6587945..956e13ac5d 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 98c2bec642..438d805324 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 2e1f6e16aa..0dd152268d 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 b997e306ee..c8f885ffb6 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 e564f18a8f..d4b6ef6de3 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 213968d3b3..6942933b1d 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 54649a7e58..61d6cccb75 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 6920215d20..612932e3f7 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 98f9ce2fcb..1d03d4e3fe 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 0168fbe8df..60201b1d9a 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 ff68b73a52..b3a9962cf8 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 148bb64bd3..87cc27648d 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 4ac0b532c2..b9395ca9df 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 de383e0837..0810845117 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 116bbc7d25..4883517147 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 72e51185e5..8a2d3d5c1e 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 6ebc020609..9df3d60876 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 9cabeb952b..7ef136ee98 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 aa7c32a455..b91013f212 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 c5ccaa6f45..77dcc1e57c 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 5edbba7f49..d9443b844b 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 410b9d954d..c77f16e673 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 08f200ecab..6465befa4b 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 1c57c44c85..ac4481031b 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 53df554960..b87d89711c 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 93a6bb67ab..61922d2c09 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 70cd46ad1f..536513b107 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 f979fbe0d8..9078c671c9 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 7969bed442..9ad75b4516 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 fa662c1923..3684985250 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 3315e56f66..516ca47806 100644 --- a/api/logout.html +++ b/api/logout.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/logs.html b/api/logs.html index b96bec1f83..33890af9d6 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 07fffe549a..f39ce0059d 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 bedfc44294..45d3b3b620 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 5662f93b6e..e75addad59 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 b8d3e54911..ccf132fc26 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 34f3f1582b..2339f432bd 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 5ebbc5a241..9761fa771c 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 e162b88942..45aa39424e 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 412a77f10f..0d2c3a5ca6 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 3f546493dc..b11d307d91 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 a93629abe5..307b4ccc14 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 9ff5e2c048..85b8c8b1c9 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 280964af80..a7b528d052 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 01b9bbbe56..5307e57258 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 8a76d836c3..970938f225 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 b097c96d7d..73e45ffdcf 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 2ec64006ba..c100853687 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 e771cceeaa..c74ff60845 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 8ebb69f91c..72e5776e71 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 b77e67751e..bfe962bb99 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 c58afe5aea..b0f5b7fce8 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 9562781a45..a474088889 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 552ef152f7..7ce091625f 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 3e8154238e..1884231404 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 5b0c0a97e5..c0297bd8a0 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 20f3da870f..7f337b588f 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 14ded03584..9774ba2b60 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 112257f54f..f6b7fd0d52 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 7dd8816ded..ee6795305b 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 c628bf8a03..38900c5baf 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 2ef38c0ab0..d04ceade4e 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 61f55e44ca..3886c5c857 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 cfa8bbaccd..1cd6c1fabc 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 85ee64e1fa..6f80dff3aa 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 9c63308dd2..2abe78246e 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 fd909cbdf8..4cafbc6800 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 c695cb1a56..12a1c5548c 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 381d1758ed..a6c6768ef7 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 933ce9f38c..9ee4d1bbfd 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 7e6fc7e92f..d8bf58b640 100644 --- a/api/webhook-run-flow.html +++ b/api/webhook-run-flow.html @@ -23,8 +23,8 @@ - - + + diff --git a/assets/js/0132780e.735c4ee0.js b/assets/js/0132780e.735c4ee0.js new file mode 100644 index 0000000000..bf3e8bd3cf --- /dev/null +++ b/assets/js/0132780e.735c4ee0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[7841],{18111:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/component-run-flow-3a79d9fadad06bda1889374c1c9c9754.png"},57373:(e,n,t)=>{t.r(n),t.d(n,{CH:()=>h,assets:()=>c,chCodeConfig:()=>a,contentTitle:()=>l,default:()=>p,frontMatter:()=>d,metadata:()=>s,toc:()=>x});const s=JSON.parse('{"id":"Components/components-logic","title":"Logic","description":"Logic components provide functionalities for routing, conditional processing, and flow management.","source":"@site/docs/Components/components-logic.mdx","sourceDirName":"Components","slug":"/components-logic","permalink":"/components-logic","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Logic","slug":"/components-logic"},"sidebar":"docs","previous":{"title":"Inputs and outputs","permalink":"/components-io"},"next":{"title":"Memories","permalink":"/components-memories"}}');var o=t(74848),r=t(28453),i=t(24754);const d={title:"Logic",slug:"/components-logic"},l="Logic components in Langflow",c={},h={annotations:i.hk,Code:i.Cy},a={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},x=[{value:"Conditional router (If-Else component)",id:"conditional-router-if-else-component",level:2},{value:"Operator Behavior",id:"operator-behavior",level:3},{value:"Loop",id:"loop",level:2},{value:"Run flow",id:"run-flow",level:2},{value:"Legacy components",id:"legacy-components",level:2},{value:"Data Conditional Router",id:"data-conditional-router",level:3},{value:"Inputs",id:"inputs",level:4},{value:"Outputs",id:"outputs",level:4},{value:"Operator behavior",id:"operator-behavior-1",level:4},{value:"List processing",id:"list-processing",level:4},{value:"Pass",id:"pass",level:3},{value:"Deprecated components",id:"deprecated-components",level:2},{value:"Flow as tool",id:"flow-as-tool",level:3},{value:"Inputs",id:"inputs-1",level:4},{value:"Outputs",id:"outputs-1",level:4},{value:"Sub flow",id:"sub-flow",level:3},{value:"Inputs",id:"inputs-2",level:4},{value:"Outputs",id:"outputs-2",level:4}];function j(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components},{Details:s}=n;return h||u("CH",!1),h.Code||u("CH.Code",!0),s||u("Details",!0),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n",(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"logic-components-in-langflow",children:"Logic components in Langflow"})}),"\n",(0,o.jsx)(n.p,{children:"Logic components provide functionalities for routing, conditional processing, and flow management."}),"\n",(0,o.jsx)(n.h2,{id:"conditional-router-if-else-component",children:"Conditional router (If-Else component)"}),"\n",(0,o.jsxs)(n.p,{children:["This component routes messages by comparing two strings.\nIt evaluates a condition by comparing two text inputs using the specified operator and routes the message to ",(0,o.jsx)(n.code,{children:"true_result"})," or ",(0,o.jsx)(n.code,{children:"false_result"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["The operator looks for single strings based on your defined ",(0,o.jsx)(n.a,{href:"#operator-behavior",children:"operator behavior"}),", but it can also search for multiple words by regex matching."]}),"\n",(0,o.jsxs)(n.p,{children:["To use the ",(0,o.jsx)(n.strong,{children:"Conditional router"})," component to check incoming messages with regex matching, do the following:"]}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["Connect the ",(0,o.jsx)(n.strong,{children:"If-Else"})," component's ",(0,o.jsx)(n.strong,{children:"Text Input"})," port to a ",(0,o.jsx)(n.strong,{children:"Chat Input"})," component."]}),"\n",(0,o.jsx)(n.li,{children:"In the If-Else component, enter the following values."}),"\n"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["In the ",(0,o.jsx)(n.strong,{children:"Match Text"})," field, enter ",(0,o.jsx)(n.code,{children:".*(urgent|warning|caution).*"}),". The component looks for these values. The regex match is case sensitive, so to look for all permutations of ",(0,o.jsx)(n.code,{children:"warning"}),", enter ",(0,o.jsx)(n.code,{children:"warning|Warning|WARNING"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["In the ",(0,o.jsx)(n.strong,{children:"Operator"})," field, enter ",(0,o.jsx)(n.code,{children:"regex"}),". The component looks for the strings ",(0,o.jsx)(n.code,{children:"urgent"}),", ",(0,o.jsx)(n.code,{children:"warning"}),", and ",(0,o.jsx)(n.code,{children:"caution"}),". For more operators, see ",(0,o.jsx)(n.a,{href:"#operator-behavior",children:"Operator behavior"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["In the ",(0,o.jsx)(n.strong,{children:"Message"})," field, enter ",(0,o.jsx)(n.code,{children:"New Message Detected"}),". This field is optional. The message is sent to both the ",(0,o.jsx)(n.strong,{children:"True"})," and ",(0,o.jsx)(n.strong,{children:"False"})," ports.\nThe component is now set up to send a ",(0,o.jsx)(n.code,{children:"New Message Detected"})," message out of its ",(0,o.jsx)(n.strong,{children:"True"})," port if it matches any of the strings.\nIf no strings are detected, it sends a message out of the ",(0,o.jsx)(n.strong,{children:"False"})," port."]}),"\n"]}),"\n",(0,o.jsxs)(n.ol,{start:"3",children:["\n",(0,o.jsxs)(n.li,{children:["Create two identical flows to process the messages. Connect an ",(0,o.jsx)(n.strong,{children:"Open AI"})," component, a ",(0,o.jsx)(n.strong,{children:"Prompt"}),", and a ",(0,o.jsx)(n.strong,{children:"Chat Output"})," component together."]}),"\n",(0,o.jsxs)(n.li,{children:["Connect one chain to the ",(0,o.jsx)(n.strong,{children:"If-Else"})," component's ",(0,o.jsx)(n.strong,{children:"True"})," port, and one chain to the ",(0,o.jsx)(n.strong,{children:"False"})," port."]}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:"The flow looks like this:"}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"A conditional router connected to two OpenAI components",src:t(89329).A+"",width:"3532",height:"3044"})}),"\n",(0,o.jsxs)(n.ol,{start:"5",children:["\n",(0,o.jsxs)(n.li,{children:["Add your ",(0,o.jsx)(n.strong,{children:"OpenAI API key"})," to both ",(0,o.jsx)(n.strong,{children:"OpenAI"})," components."]}),"\n",(0,o.jsxs)(n.li,{children:["In both ",(0,o.jsx)(n.strong,{children:"Prompt"})," components, enter the behavior you want each route to take.\nWhen a match is found:"]}),"\n"]}),"\n",(0,o.jsx)(h.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Send a message that a new message has been received and added to the Urgent queue.",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,o.jsx)(n.p,{children:"When a match is not found:"}),"\n",(0,o.jsx)(h.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Send a message that a new message has been received and added to the backlog.",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,o.jsxs)(n.ol,{start:"7",children:["\n",(0,o.jsxs)(n.li,{children:["Open the ",(0,o.jsx)(n.strong,{children:"Playground"}),"."]}),"\n",(0,o.jsx)(n.li,{children:"Send the flow some messages. Your messages route differently based on the if-else component's evaluation."}),"\n"]}),"\n",(0,o.jsx)(h.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"User",props:{}}]},{tokens:[{content:"A new user was created.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"AI",props:{}}]},{tokens:[{content:"A new message has been received and added to the backlog.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"User",props:{}}]},{tokens:[{content:"Sign-in warning: new user locked out.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"AI",props:{}}]},{tokens:[{content:"A new message has been received and added to the Urgent queue. Please review it at your earliest convenience.",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,o.jsxs)(s,{children:[(0,o.jsx)("summary",{children:"Parameters"}),(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Inputs"})}),(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Name"}),(0,o.jsx)(n.th,{children:"Type"}),(0,o.jsx)(n.th,{children:"Description"})]})}),(0,o.jsxs)(n.tbody,{children:[(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"input_text"}),(0,o.jsx)(n.td,{children:"String"}),(0,o.jsx)(n.td,{children:"The primary text input for the operation."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"match_text"}),(0,o.jsx)(n.td,{children:"String"}),(0,o.jsx)(n.td,{children:"The text to compare against."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"operator"}),(0,o.jsx)(n.td,{children:"Dropdown"}),(0,o.jsx)(n.td,{children:"The operator used to compare texts. Options include equals, not equals, contains, starts with, ends with, and regex. The default is equals."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"case_sensitive"}),(0,o.jsx)(n.td,{children:"Boolean"}),(0,o.jsx)(n.td,{children:"When set to true, the comparison is case sensitive. This setting does not apply to regex comparison. The default is false."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"message"}),(0,o.jsx)(n.td,{children:"Message"}),(0,o.jsx)(n.td,{children:"The message to pass through either route."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"max_iterations"}),(0,o.jsx)(n.td,{children:"Integer"}),(0,o.jsx)(n.td,{children:"The maximum number of iterations allowed for the conditional router. The default is 10."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"default_route"}),(0,o.jsx)(n.td,{children:"Dropdown"}),(0,o.jsx)(n.td,{children:"The route to take when max iterations are reached. Options include true_result or false_result. The default is false_result."})]})]})]}),(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Outputs"})}),(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Name"}),(0,o.jsx)(n.th,{children:"Type"}),(0,o.jsx)(n.th,{children:"Description"})]})}),(0,o.jsxs)(n.tbody,{children:[(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"true_result"}),(0,o.jsx)(n.td,{children:"Message"}),(0,o.jsx)(n.td,{children:"The output produced when the condition is true."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"false_result"}),(0,o.jsx)(n.td,{children:"Message"}),(0,o.jsx)(n.td,{children:"The output produced when the condition is false."})]})]})]})]}),"\n",(0,o.jsx)(n.h3,{id:"operator-behavior",children:"Operator Behavior"}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.strong,{children:"If-else"})," component includes a comparison operator to compare the values in ",(0,o.jsx)(n.code,{children:"input_text"})," and ",(0,o.jsx)(n.code,{children:"match_text"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["All options respect the ",(0,o.jsx)(n.code,{children:"case_sensitive"})," setting except ",(0,o.jsx)(n.strong,{children:"regex"}),"."]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"equals"}),": Exact match comparison."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"not equals"}),": Inverse of exact match."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"contains"}),": Checks if match_text is found within input_text."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"starts with"}),": Checks if input_text begins with match_text."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"ends with"}),": Checks if input_text ends with match_text."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"regex"}),": Performs regular expression matching. It is always case sensitive and ignores the case_sensitive setting."]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"loop",children:"Loop"}),"\n",(0,o.jsx)(n.admonition,{type:"tip",children:(0,o.jsxs)(n.p,{children:["For another ",(0,o.jsx)(n.strong,{children:"Loop"})," component example, see the ",(0,o.jsx)(n.strong,{children:"Research Translation Loop"})," template."]})}),"\n",(0,o.jsxs)(n.p,{children:["This component iterates over a list of ",(0,o.jsx)(n.a,{href:"/data-types#data",children:"Data"})," objects, outputting one item at a time and aggregating results from loop inputs."]}),"\n",(0,o.jsxs)(n.p,{children:["In this example, the ",(0,o.jsx)(n.strong,{children:"Loop"})," component iterates over a CSV file through the ",(0,o.jsx)(n.strong,{children:"Item"})," port until there are no rows left to process. Then, the ",(0,o.jsx)(n.strong,{children:"Loop"})," component performs the actions connected to the ",(0,o.jsx)(n.strong,{children:"Done"})," port, which in this case is loading the structured data into ",(0,o.jsx)(n.strong,{children:"Chroma DB"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["Think of it this way: the ",(0,o.jsx)(n.strong,{children:"Item"}),' port forms the "main" loop that repeats until a "complete" condition is reached.']}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.strong,{children:"Loop"})," component accepts ",(0,o.jsx)(n.strong,{children:"Data"})," from the ",(0,o.jsx)(n.strong,{children:"Load CSV"})," component, and outputs the data from the ",(0,o.jsx)(n.strong,{children:"Item"})," port."]}),"\n",(0,o.jsxs)(n.li,{children:["Each CSV row is converted to a ",(0,o.jsx)(n.strong,{children:"Message"})," and processed into structured data with the ",(0,o.jsx)(n.strong,{children:"Structured Output"})," component.\nThe dotted line connected from the ",(0,o.jsx)(n.strong,{children:"Structured Output"})," component's ",(0,o.jsx)(n.strong,{children:"Looping"})," port tells you where the loop begins again."]}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.strong,{children:"Loop"})," component repeatedly extracts rows by ",(0,o.jsx)(n.strong,{children:"Text Key"})," until there are no more rows to extract."]}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["Once all items are processed, the action connected to the ",(0,o.jsx)(n.strong,{children:"Done"})," port is performed.\nIn this example, the data is loaded into ",(0,o.jsx)(n.strong,{children:"Chroma DB"}),"."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"Loop CSV parser",src:t(91110).A+"",width:"3876",height:"3300"})}),"\n",(0,o.jsxs)(n.p,{children:["Follow along with this step-by-step video guide for creating this flow and adding agentic RAG: ",(0,o.jsx)(n.a,{href:"https://www.youtube.com/watch?v=9Wx7WODSKTo",children:"Mastering the Loop Component & Agentic RAG in Langflow"}),"."]}),"\n",(0,o.jsxs)(s,{children:[(0,o.jsx)("summary",{children:"Parameters"}),(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Inputs"})}),(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Name"}),(0,o.jsx)(n.th,{children:"Type"}),(0,o.jsx)(n.th,{children:"Description"})]})}),(0,o.jsx)(n.tbody,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"data"}),(0,o.jsx)(n.td,{children:"Data/List"}),(0,o.jsx)(n.td,{children:"The initial list of Data objects to process."})]})})]}),(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Outputs"})}),(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Name"}),(0,o.jsx)(n.th,{children:"Type"}),(0,o.jsx)(n.th,{children:"Description"})]})}),(0,o.jsxs)(n.tbody,{children:[(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"item"}),(0,o.jsx)(n.td,{children:"Data"}),(0,o.jsx)(n.td,{children:"The current item being processed from the data list."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"done"}),(0,o.jsx)(n.td,{children:"Data"}),(0,o.jsx)(n.td,{children:"The aggregated results after all items are processed."})]})]})]})]}),"\n",(0,o.jsx)(n.h2,{id:"run-flow",children:"Run flow"}),"\n",(0,o.jsx)(n.p,{children:"This component allows you to run any flow stored in your Langflow database without opening the flow editor."}),"\n",(0,o.jsxs)(n.p,{children:["The Run Flow component can also be used as a tool when connected to an ",(0,o.jsx)(n.a,{href:"/components-agents",children:"Agent"}),". The ",(0,o.jsx)(n.code,{children:"name"})," and ",(0,o.jsx)(n.code,{children:"description"})," metadata that the Agent uses to register the tool are created automatically."]}),"\n",(0,o.jsx)(n.p,{children:"When you select a flow, the component fetches the flow's graph structure and uses it to generate the inputs and outputs for the Run Flow component."}),"\n",(0,o.jsx)(n.p,{children:"To use the Run Flow component as a tool, do the following:"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["Add the ",(0,o.jsx)(n.strong,{children:"Run Flow"})," component to the ",(0,o.jsx)(n.a,{href:"/simple-agent",children:"Simple Agent"})," flow."]}),"\n",(0,o.jsxs)(n.li,{children:["In the ",(0,o.jsx)(n.strong,{children:"Flow Name"})," menu, select the sub-flow you want to run.\nThe appearance of the ",(0,o.jsx)(n.strong,{children:"Run Flow"})," component changes to reflect the inputs and outputs of the selected flow."]}),"\n",(0,o.jsxs)(n.li,{children:["On the ",(0,o.jsx)(n.strong,{children:"Run Flow"})," component, enable ",(0,o.jsx)(n.strong,{children:"Tool Mode"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["Connect the ",(0,o.jsx)(n.strong,{children:"Run Flow"})," component to the ",(0,o.jsx)(n.strong,{children:"Toolset"})," input of the Agent.\nYour flow should now look like this:\n",(0,o.jsx)(n.img,{alt:"Run Flow component",src:t(18111).A+"",width:"4000",height:"2366"})]}),"\n",(0,o.jsx)(n.li,{children:"Run the flow. The Agent uses the Run Flow component as a tool to run the selected sub-flow."}),"\n"]}),"\n",(0,o.jsxs)(s,{children:[(0,o.jsx)("summary",{children:"Parameters"}),(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Inputs"})}),(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Name"}),(0,o.jsx)(n.th,{children:"Type"}),(0,o.jsx)(n.th,{children:"Description"})]})}),(0,o.jsxs)(n.tbody,{children:[(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"flow_name_selected"}),(0,o.jsx)(n.td,{children:"Dropdown"}),(0,o.jsx)(n.td,{children:"The name of the flow to run."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"flow_tweak_data"}),(0,o.jsx)(n.td,{children:"Dict"}),(0,o.jsx)(n.td,{children:"Dictionary of tweaks to customize the flow's behavior."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"dynamic inputs"}),(0,o.jsx)(n.td,{children:"Various"}),(0,o.jsx)(n.td,{children:"Additional inputs that are generated based on the selected flow."})]})]})]}),(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Outputs"})}),(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Name"}),(0,o.jsx)(n.th,{children:"Type"}),(0,o.jsx)(n.th,{children:"Description"})]})}),(0,o.jsx)(n.tbody,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"run_outputs"}),(0,o.jsxs)(n.td,{children:["A ",(0,o.jsx)(n.code,{children:"List"})," of types ",(0,o.jsx)(n.code,{children:"Data"}),", ",(0,o.jsx)(n.code,{children:"Message,"})," or ",(0,o.jsx)(n.code,{children:"DataFrame"})]}),(0,o.jsx)(n.td,{children:"All outputs are generated from running the flow."})]})})]})]}),"\n",(0,o.jsx)(n.h2,{id:"legacy-components",children:"Legacy components"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Legacy"})," components are available for use but are no longer supported."]}),"\n",(0,o.jsx)(n.h3,{id:"data-conditional-router",children:"Data Conditional Router"}),"\n",(0,o.jsx)(n.admonition,{type:"important",children:(0,o.jsxs)(n.p,{children:["This component is in ",(0,o.jsx)(n.strong,{children:"Legacy"}),", which means it is no longer in active development as of Langflow version 1.3."]})}),"\n",(0,o.jsxs)(n.p,{children:["This component routes ",(0,o.jsx)(n.code,{children:"Data"})," objects based on a condition applied to a specified key, including boolean validation. It can process either a single Data object or a list of Data objects."]}),"\n",(0,o.jsx)(n.p,{children:"This component is particularly useful in workflows that require conditional routing of complex data structures, enabling dynamic decision-making based on data content."}),"\n",(0,o.jsx)(n.h4,{id:"inputs",children:"Inputs"}),"\n",(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Name"}),(0,o.jsx)(n.th,{children:"Type"}),(0,o.jsx)(n.th,{children:"Description"})]})}),(0,o.jsxs)(n.tbody,{children:[(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"data_input"}),(0,o.jsx)(n.td,{children:"Data"}),(0,o.jsx)(n.td,{children:"The Data object or list of Data objects to process. This input can handle both single items and lists."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"key_name"}),(0,o.jsx)(n.td,{children:"String"}),(0,o.jsx)(n.td,{children:"The name of the key in the Data object to check."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"operator"}),(0,o.jsx)(n.td,{children:"Dropdown"}),(0,o.jsx)(n.td,{children:'The operator to apply. Options: "equals", "not equals", "contains", "starts with", "ends with", "boolean validator". Default: "equals".'})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"compare_value"}),(0,o.jsx)(n.td,{children:"String"}),(0,o.jsx)(n.td,{children:'The value to compare against. Not shown/used when operator is "boolean validator".'})]})]})]}),"\n",(0,o.jsx)(n.h4,{id:"outputs",children:"Outputs"}),"\n",(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Name"}),(0,o.jsx)(n.th,{children:"Type"}),(0,o.jsx)(n.th,{children:"Description"})]})}),(0,o.jsxs)(n.tbody,{children:[(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"true_output"}),(0,o.jsx)(n.td,{children:"Data/List"}),(0,o.jsx)(n.td,{children:"Output when the condition is met."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"false_output"}),(0,o.jsx)(n.td,{children:"Data/List"}),(0,o.jsx)(n.td,{children:"Output when the condition is not met."})]})]})]}),"\n",(0,o.jsx)(n.h4,{id:"operator-behavior-1",children:"Operator behavior"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"equals"}),": Exact match comparison between the key's value and compare_value."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"not equals"}),": Inverse of exact match."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"contains"}),": Checks if compare_value is found within the key's value."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"starts with"}),": Checks if the key's value begins with compare_value."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"ends with"}),": Checks if the key's value ends with compare_value."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"boolean validator"}),": Treats the key's value as a boolean. The following values are considered true:","\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["Boolean ",(0,o.jsx)(n.code,{children:"true"}),"."]}),"\n",(0,o.jsx)(n.li,{children:'Strings: "true", "1", "yes", "y", "on" (case-insensitive).'}),"\n",(0,o.jsxs)(n.li,{children:["Any other value is converted using Python's ",(0,o.jsx)(n.code,{children:"bool()"})," function."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"list-processing",children:"List processing"}),"\n",(0,o.jsx)(n.p,{children:"The following actions occur when processing a list of Data objects:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"Each object in the list is evaluated individually"}),"\n",(0,o.jsx)(n.li,{children:"Objects meeting the condition go to true_output"}),"\n",(0,o.jsx)(n.li,{children:"Objects not meeting the condition go to false_output"}),"\n",(0,o.jsx)(n.li,{children:"If all objects go to one output, the other output is empty"}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"pass",children:"Pass"}),"\n",(0,o.jsx)(n.admonition,{type:"important",children:(0,o.jsxs)(n.p,{children:["This component is in ",(0,o.jsx)(n.strong,{children:"Legacy"}),", which means it is available for use but no longer in active development."]})}),"\n",(0,o.jsx)(n.p,{children:"This component forwards the input message, unchanged."}),"\n",(0,o.jsxs)(s,{children:[(0,o.jsx)("summary",{children:"Parameters"}),(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Inputs"})}),(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Name"}),(0,o.jsx)(n.th,{children:"Display Name"}),(0,o.jsx)(n.th,{children:"Info"})]})}),(0,o.jsxs)(n.tbody,{children:[(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"input_message"}),(0,o.jsx)(n.td,{children:"Input Message"}),(0,o.jsx)(n.td,{children:"The message to forward."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"ignored_message"}),(0,o.jsx)(n.td,{children:"Ignored Message"}),(0,o.jsx)(n.td,{children:"A second message that is ignored. Used as a workaround for continuity."})]})]})]}),(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Outputs"})}),(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Name"}),(0,o.jsx)(n.th,{children:"Display Name"}),(0,o.jsx)(n.th,{children:"Info"})]})}),(0,o.jsx)(n.tbody,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"output_message"}),(0,o.jsx)(n.td,{children:"Output Message"}),(0,o.jsx)(n.td,{children:"The forwarded message from the input."})]})})]})]}),"\n",(0,o.jsx)(n.h2,{id:"deprecated-components",children:"Deprecated components"}),"\n",(0,o.jsx)(n.p,{children:"Deprecated components have been replaced by newer alternatives and should not be used in new projects."}),"\n",(0,o.jsx)(n.h3,{id:"flow-as-tool",children:"Flow as tool"}),"\n",(0,o.jsx)(n.admonition,{type:"important",children:(0,o.jsxs)(n.p,{children:["This component is deprecated as of Langflow version 1.1.2.\nInstead, use the ",(0,o.jsx)(n.a,{href:"/components-logic#run-flow",children:"Run flow component"})]})}),"\n",(0,o.jsx)(n.p,{children:"This component constructs a tool from a function that runs a loaded flow."}),"\n",(0,o.jsx)(n.h4,{id:"inputs-1",children:"Inputs"}),"\n",(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Name"}),(0,o.jsx)(n.th,{children:"Type"}),(0,o.jsx)(n.th,{children:"Description"})]})}),(0,o.jsxs)(n.tbody,{children:[(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"flow_name"}),(0,o.jsx)(n.td,{children:"Dropdown"}),(0,o.jsx)(n.td,{children:"The name of the flow to run."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"tool_name"}),(0,o.jsx)(n.td,{children:"String"}),(0,o.jsx)(n.td,{children:"The name of the tool."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"tool_description"}),(0,o.jsx)(n.td,{children:"String"}),(0,o.jsx)(n.td,{children:"The description of the tool."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"return_direct"}),(0,o.jsx)(n.td,{children:"Boolean"}),(0,o.jsx)(n.td,{children:"If true, returns the result directly from the tool."})]})]})]}),"\n",(0,o.jsx)(n.h4,{id:"outputs-1",children:"Outputs"}),"\n",(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Name"}),(0,o.jsx)(n.th,{children:"Type"}),(0,o.jsx)(n.th,{children:"Description"})]})}),(0,o.jsx)(n.tbody,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"api_build_tool"}),(0,o.jsx)(n.td,{children:"Tool"}),(0,o.jsx)(n.td,{children:"The constructed tool from the flow."})]})})]}),"\n",(0,o.jsx)(n.h3,{id:"sub-flow",children:"Sub flow"}),"\n",(0,o.jsx)(n.admonition,{type:"important",children:(0,o.jsxs)(n.p,{children:["This component is deprecated as of Langflow version 1.1.2.\nInstead, use the ",(0,o.jsx)(n.a,{href:"/components-logic#run-flow",children:"Run flow component"})]})}),"\n",(0,o.jsxs)(n.p,{children:["This ",(0,o.jsx)(n.code,{children:"SubFlowComponent"})," generates a component from a flow with all of its inputs and outputs."]}),"\n",(0,o.jsx)(n.p,{children:"This component can integrate entire flows as components within a larger workflow. It dynamically generates inputs based on the selected flow and executes the flow with provided parameters."}),"\n",(0,o.jsx)(n.h4,{id:"inputs-2",children:"Inputs"}),"\n",(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Name"}),(0,o.jsx)(n.th,{children:"Type"}),(0,o.jsx)(n.th,{children:"Description"})]})}),(0,o.jsx)(n.tbody,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"flow_name"}),(0,o.jsx)(n.td,{children:"Dropdown"}),(0,o.jsx)(n.td,{children:"The name of the flow to run."})]})})]}),"\n",(0,o.jsx)(n.h4,{id:"outputs-2",children:"Outputs"}),"\n",(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Name"}),(0,o.jsx)(n.th,{children:"Type"}),(0,o.jsx)(n.th,{children:"Description"})]})}),(0,o.jsx)(n.tbody,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"flow_outputs"}),(0,o.jsx)(n.td,{children:"List[Data]"}),(0,o.jsx)(n.td,{children:"The outputs generated from the flow."})]})})]})]})}function p(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(j,{...e})}):j(e)}function u(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},89329:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/component-conditional-router-1fb27526613395545592fc9166c75c27.png"},91110:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/component-loop-csv-66c1b53f0722b36a900632806cb32d78.png"}}]); \ No newline at end of file diff --git a/assets/js/0132780e.9f0ba5b8.js b/assets/js/0132780e.9f0ba5b8.js deleted file mode 100644 index 569803df5f..0000000000 --- a/assets/js/0132780e.9f0ba5b8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[7841],{18111:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/component-run-flow-3a79d9fadad06bda1889374c1c9c9754.png"},57373:(e,n,t)=>{t.r(n),t.d(n,{CH:()=>h,assets:()=>c,chCodeConfig:()=>a,contentTitle:()=>l,default:()=>p,frontMatter:()=>d,metadata:()=>s,toc:()=>x});const s=JSON.parse('{"id":"Components/components-logic","title":"Logic","description":"Logic components provide functionalities for routing, conditional processing, and flow management.","source":"@site/docs/Components/components-logic.mdx","sourceDirName":"Components","slug":"/components-logic","permalink":"/components-logic","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Logic","slug":"/components-logic"},"sidebar":"docs","previous":{"title":"Inputs and outputs","permalink":"/components-io"},"next":{"title":"Memories","permalink":"/components-memories"}}');var o=t(74848),r=t(28453),i=t(24754);const d={title:"Logic",slug:"/components-logic"},l="Logic components in Langflow",c={},h={annotations:i.hk,Code:i.Cy},a={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},x=[{value:"Conditional router (If-Else component)",id:"conditional-router-if-else-component",level:2},{value:"Operator Behavior",id:"operator-behavior",level:3},{value:"Loop",id:"loop",level:2},{value:"Run flow",id:"run-flow",level:2},{value:"Legacy components",id:"legacy-components",level:2},{value:"Data Conditional Router",id:"data-conditional-router",level:3},{value:"Inputs",id:"inputs",level:4},{value:"Outputs",id:"outputs",level:4},{value:"Operator behavior",id:"operator-behavior-1",level:4},{value:"List processing",id:"list-processing",level:4},{value:"Pass",id:"pass",level:3},{value:"Deprecated components",id:"deprecated-components",level:2},{value:"Flow as tool",id:"flow-as-tool",level:3},{value:"Inputs",id:"inputs-1",level:4},{value:"Outputs",id:"outputs-1",level:4},{value:"Sub flow",id:"sub-flow",level:3},{value:"Inputs",id:"inputs-2",level:4},{value:"Outputs",id:"outputs-2",level:4}];function j(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",h4:"h4",header:"header",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components},{Details:s}=n;return h||u("CH",!1),h.Code||u("CH.Code",!0),s||u("Details",!0),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n",(0,o.jsx)(n.header,{children:(0,o.jsx)(n.h1,{id:"logic-components-in-langflow",children:"Logic components in Langflow"})}),"\n",(0,o.jsx)(n.p,{children:"Logic components provide functionalities for routing, conditional processing, and flow management."}),"\n",(0,o.jsx)(n.h2,{id:"conditional-router-if-else-component",children:"Conditional router (If-Else component)"}),"\n",(0,o.jsxs)(n.p,{children:["This component routes messages by comparing two strings.\nIt evaluates a condition by comparing two text inputs using the specified operator and routes the message to ",(0,o.jsx)(n.code,{children:"true_result"})," or ",(0,o.jsx)(n.code,{children:"false_result"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["The operator looks for single strings based on your defined ",(0,o.jsx)(n.a,{href:"#operator-behavior",children:"operator behavior"}),", but it can also search for multiple words by regex matching."]}),"\n",(0,o.jsxs)(n.p,{children:["To use the ",(0,o.jsx)(n.strong,{children:"Conditional router"})," component to check incoming messages with regex matching, do the following:"]}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["Connect the ",(0,o.jsx)(n.strong,{children:"If-Else"})," component's ",(0,o.jsx)(n.strong,{children:"Text Input"})," port to a ",(0,o.jsx)(n.strong,{children:"Chat Input"})," component."]}),"\n",(0,o.jsx)(n.li,{children:"In the If-Else component, enter the following values."}),"\n"]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["In the ",(0,o.jsx)(n.strong,{children:"Match Text"})," field, enter ",(0,o.jsx)(n.code,{children:".*(urgent|warning|caution).*"}),". The component looks for these values. The regex match is case sensitive, so to look for all permutations of ",(0,o.jsx)(n.code,{children:"warning"}),", enter ",(0,o.jsx)(n.code,{children:"warning|Warning|WARNING"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["In the ",(0,o.jsx)(n.strong,{children:"Operator"})," field, enter ",(0,o.jsx)(n.code,{children:"regex"}),". The component looks for the strings ",(0,o.jsx)(n.code,{children:"urgent"}),", ",(0,o.jsx)(n.code,{children:"warning"}),", and ",(0,o.jsx)(n.code,{children:"caution"}),". For more operators, see ",(0,o.jsx)(n.a,{href:"#operator-behavior",children:"Operator behavior"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["In the ",(0,o.jsx)(n.strong,{children:"Message"})," field, enter ",(0,o.jsx)(n.code,{children:"New Message Detected"}),". This field is optional. The message is sent to both the ",(0,o.jsx)(n.strong,{children:"True"})," and ",(0,o.jsx)(n.strong,{children:"False"})," ports.\nThe component is now set up to send a ",(0,o.jsx)(n.code,{children:"New Message Detected"})," message out of its ",(0,o.jsx)(n.strong,{children:"True"})," port if it matches any of the strings.\nIf no strings are detected, it sends a message out of the ",(0,o.jsx)(n.strong,{children:"False"})," port."]}),"\n"]}),"\n",(0,o.jsxs)(n.ol,{start:"3",children:["\n",(0,o.jsxs)(n.li,{children:["Create two identical flows to process the messages. Connect an ",(0,o.jsx)(n.strong,{children:"Open AI"})," component, a ",(0,o.jsx)(n.strong,{children:"Prompt"}),", and a ",(0,o.jsx)(n.strong,{children:"Chat Output"})," component together."]}),"\n",(0,o.jsxs)(n.li,{children:["Connect one chain to the ",(0,o.jsx)(n.strong,{children:"If-Else"})," component's ",(0,o.jsx)(n.strong,{children:"True"})," port, and one chain to the ",(0,o.jsx)(n.strong,{children:"False"})," port."]}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:"The flow looks like this:"}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"A conditional router connected to two OpenAI components",src:t(89329).A+"",width:"3532",height:"3044"})}),"\n",(0,o.jsxs)(n.ol,{start:"5",children:["\n",(0,o.jsxs)(n.li,{children:["Add your ",(0,o.jsx)(n.strong,{children:"OpenAI API key"})," to both ",(0,o.jsx)(n.strong,{children:"OpenAI"})," components."]}),"\n",(0,o.jsxs)(n.li,{children:["In both ",(0,o.jsx)(n.strong,{children:"Prompt"})," components, enter the behavior you want each route to take.\nWhen a match is found:"]}),"\n"]}),"\n",(0,o.jsx)(h.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Send a message that a new message has been received and added to the Urgent queue.",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,o.jsx)(n.p,{children:"When a match is not found:"}),"\n",(0,o.jsx)(h.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Send a message that a new message has been received and added to the backlog.",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,o.jsxs)(n.ol,{start:"7",children:["\n",(0,o.jsxs)(n.li,{children:["Open the ",(0,o.jsx)(n.strong,{children:"Playground"}),"."]}),"\n",(0,o.jsx)(n.li,{children:"Send the flow some messages. Your messages route differently based on the if-else component's evaluation."}),"\n"]}),"\n",(0,o.jsx)(h.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"User",props:{}}]},{tokens:[{content:"A new user was created.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"AI",props:{}}]},{tokens:[{content:"A new message has been received and added to the backlog.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"User",props:{}}]},{tokens:[{content:"Sign-in warning: new user locked out.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"AI",props:{}}]},{tokens:[{content:"A new message has been received and added to the Urgent queue. Please review it at your earliest convenience.",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,o.jsxs)(s,{children:[(0,o.jsx)("summary",{children:"Parameters"}),(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Inputs"})}),(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Name"}),(0,o.jsx)(n.th,{children:"Type"}),(0,o.jsx)(n.th,{children:"Description"})]})}),(0,o.jsxs)(n.tbody,{children:[(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"input_text"}),(0,o.jsx)(n.td,{children:"String"}),(0,o.jsx)(n.td,{children:"The primary text input for the operation."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"match_text"}),(0,o.jsx)(n.td,{children:"String"}),(0,o.jsx)(n.td,{children:"The text to compare against."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"operator"}),(0,o.jsx)(n.td,{children:"Dropdown"}),(0,o.jsx)(n.td,{children:"The operator used to compare texts. Options include equals, not equals, contains, starts with, ends with, and regex. The default is equals."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"case_sensitive"}),(0,o.jsx)(n.td,{children:"Boolean"}),(0,o.jsx)(n.td,{children:"When set to true, the comparison is case sensitive. This setting does not apply to regex comparison. The default is false."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"message"}),(0,o.jsx)(n.td,{children:"Message"}),(0,o.jsx)(n.td,{children:"The message to pass through either route."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"max_iterations"}),(0,o.jsx)(n.td,{children:"Integer"}),(0,o.jsx)(n.td,{children:"The maximum number of iterations allowed for the conditional router. The default is 10."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"default_route"}),(0,o.jsx)(n.td,{children:"Dropdown"}),(0,o.jsx)(n.td,{children:"The route to take when max iterations are reached. Options include true_result or false_result. The default is false_result."})]})]})]}),(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Outputs"})}),(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Name"}),(0,o.jsx)(n.th,{children:"Type"}),(0,o.jsx)(n.th,{children:"Description"})]})}),(0,o.jsxs)(n.tbody,{children:[(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"true_result"}),(0,o.jsx)(n.td,{children:"Message"}),(0,o.jsx)(n.td,{children:"The output produced when the condition is true."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"false_result"}),(0,o.jsx)(n.td,{children:"Message"}),(0,o.jsx)(n.td,{children:"The output produced when the condition is false."})]})]})]})]}),"\n",(0,o.jsx)(n.h3,{id:"operator-behavior",children:"Operator Behavior"}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.strong,{children:"If-else"})," component includes a comparison operator to compare the values in ",(0,o.jsx)(n.code,{children:"input_text"})," and ",(0,o.jsx)(n.code,{children:"match_text"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["All options respect the ",(0,o.jsx)(n.code,{children:"case_sensitive"})," setting except ",(0,o.jsx)(n.strong,{children:"regex"}),"."]}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"equals"}),": Exact match comparison."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"not equals"}),": Inverse of exact match."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"contains"}),": Checks if match_text is found within input_text."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"starts with"}),": Checks if input_text begins with match_text."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"ends with"}),": Checks if input_text ends with match_text."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"regex"}),": Performs regular expression matching. It is always case sensitive and ignores the case_sensitive setting."]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"loop",children:"Loop"}),"\n",(0,o.jsx)(n.admonition,{type:"tip",children:(0,o.jsxs)(n.p,{children:["For another ",(0,o.jsx)(n.strong,{children:"Loop"})," component example, see the ",(0,o.jsx)(n.strong,{children:"Research Translation Loop"})," template."]})}),"\n",(0,o.jsxs)(n.p,{children:["This component iterates over a list of ",(0,o.jsx)(n.a,{href:"/concepts-objects#data-object",children:"Data"})," objects, outputting one item at a time and aggregating results from loop inputs."]}),"\n",(0,o.jsxs)(n.p,{children:["In this example, the ",(0,o.jsx)(n.strong,{children:"Loop"})," component iterates over a CSV file through the ",(0,o.jsx)(n.strong,{children:"Item"})," port until there are no rows left to process. Then, the ",(0,o.jsx)(n.strong,{children:"Loop"})," component performs the actions connected to the ",(0,o.jsx)(n.strong,{children:"Done"})," port, which in this case is loading the structured data into ",(0,o.jsx)(n.strong,{children:"Chroma DB"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["Think of it this way: the ",(0,o.jsx)(n.strong,{children:"Item"}),' port forms the "main" loop that repeats until a "complete" condition is reached.']}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.strong,{children:"Loop"})," component accepts ",(0,o.jsx)(n.strong,{children:"Data"})," from the ",(0,o.jsx)(n.strong,{children:"Load CSV"})," component, and outputs the data from the ",(0,o.jsx)(n.strong,{children:"Item"})," port."]}),"\n",(0,o.jsxs)(n.li,{children:["Each CSV row is converted to a ",(0,o.jsx)(n.strong,{children:"Message"})," and processed into structured data with the ",(0,o.jsx)(n.strong,{children:"Structured Output"})," component.\nThe dotted line connected from the ",(0,o.jsx)(n.strong,{children:"Structured Output"})," component's ",(0,o.jsx)(n.strong,{children:"Looping"})," port tells you where the loop begins again."]}),"\n",(0,o.jsxs)(n.li,{children:["The ",(0,o.jsx)(n.strong,{children:"Loop"})," component repeatedly extracts rows by ",(0,o.jsx)(n.strong,{children:"Text Key"})," until there are no more rows to extract."]}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["Once all items are processed, the action connected to the ",(0,o.jsx)(n.strong,{children:"Done"})," port is performed.\nIn this example, the data is loaded into ",(0,o.jsx)(n.strong,{children:"Chroma DB"}),"."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"Loop CSV parser",src:t(91110).A+"",width:"3876",height:"3300"})}),"\n",(0,o.jsxs)(n.p,{children:["Follow along with this step-by-step video guide for creating this flow and adding agentic RAG: ",(0,o.jsx)(n.a,{href:"https://www.youtube.com/watch?v=9Wx7WODSKTo",children:"Mastering the Loop Component & Agentic RAG in Langflow"}),"."]}),"\n",(0,o.jsxs)(s,{children:[(0,o.jsx)("summary",{children:"Parameters"}),(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Inputs"})}),(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Name"}),(0,o.jsx)(n.th,{children:"Type"}),(0,o.jsx)(n.th,{children:"Description"})]})}),(0,o.jsx)(n.tbody,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"data"}),(0,o.jsx)(n.td,{children:"Data/List"}),(0,o.jsx)(n.td,{children:"The initial list of Data objects to process."})]})})]}),(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Outputs"})}),(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Name"}),(0,o.jsx)(n.th,{children:"Type"}),(0,o.jsx)(n.th,{children:"Description"})]})}),(0,o.jsxs)(n.tbody,{children:[(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"item"}),(0,o.jsx)(n.td,{children:"Data"}),(0,o.jsx)(n.td,{children:"The current item being processed from the data list."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"done"}),(0,o.jsx)(n.td,{children:"Data"}),(0,o.jsx)(n.td,{children:"The aggregated results after all items are processed."})]})]})]})]}),"\n",(0,o.jsx)(n.h2,{id:"run-flow",children:"Run flow"}),"\n",(0,o.jsx)(n.p,{children:"This component allows you to run any flow stored in your Langflow database without opening the flow editor."}),"\n",(0,o.jsxs)(n.p,{children:["The Run Flow component can also be used as a tool when connected to an ",(0,o.jsx)(n.a,{href:"/components-agents",children:"Agent"}),". The ",(0,o.jsx)(n.code,{children:"name"})," and ",(0,o.jsx)(n.code,{children:"description"})," metadata that the Agent uses to register the tool are created automatically."]}),"\n",(0,o.jsx)(n.p,{children:"When you select a flow, the component fetches the flow's graph structure and uses it to generate the inputs and outputs for the Run Flow component."}),"\n",(0,o.jsx)(n.p,{children:"To use the Run Flow component as a tool, do the following:"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["Add the ",(0,o.jsx)(n.strong,{children:"Run Flow"})," component to the ",(0,o.jsx)(n.a,{href:"/simple-agent",children:"Simple Agent"})," flow."]}),"\n",(0,o.jsxs)(n.li,{children:["In the ",(0,o.jsx)(n.strong,{children:"Flow Name"})," menu, select the sub-flow you want to run.\nThe appearance of the ",(0,o.jsx)(n.strong,{children:"Run Flow"})," component changes to reflect the inputs and outputs of the selected flow."]}),"\n",(0,o.jsxs)(n.li,{children:["On the ",(0,o.jsx)(n.strong,{children:"Run Flow"})," component, enable ",(0,o.jsx)(n.strong,{children:"Tool Mode"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["Connect the ",(0,o.jsx)(n.strong,{children:"Run Flow"})," component to the ",(0,o.jsx)(n.strong,{children:"Toolset"})," input of the Agent.\nYour flow should now look like this:\n",(0,o.jsx)(n.img,{alt:"Run Flow component",src:t(18111).A+"",width:"4000",height:"2366"})]}),"\n",(0,o.jsx)(n.li,{children:"Run the flow. The Agent uses the Run Flow component as a tool to run the selected sub-flow."}),"\n"]}),"\n",(0,o.jsxs)(s,{children:[(0,o.jsx)("summary",{children:"Parameters"}),(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Inputs"})}),(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Name"}),(0,o.jsx)(n.th,{children:"Type"}),(0,o.jsx)(n.th,{children:"Description"})]})}),(0,o.jsxs)(n.tbody,{children:[(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"flow_name_selected"}),(0,o.jsx)(n.td,{children:"Dropdown"}),(0,o.jsx)(n.td,{children:"The name of the flow to run."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"flow_tweak_data"}),(0,o.jsx)(n.td,{children:"Dict"}),(0,o.jsx)(n.td,{children:"Dictionary of tweaks to customize the flow's behavior."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"dynamic inputs"}),(0,o.jsx)(n.td,{children:"Various"}),(0,o.jsx)(n.td,{children:"Additional inputs that are generated based on the selected flow."})]})]})]}),(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Outputs"})}),(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Name"}),(0,o.jsx)(n.th,{children:"Type"}),(0,o.jsx)(n.th,{children:"Description"})]})}),(0,o.jsx)(n.tbody,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"run_outputs"}),(0,o.jsxs)(n.td,{children:["A ",(0,o.jsx)(n.code,{children:"List"})," of types ",(0,o.jsx)(n.code,{children:"Data"}),", ",(0,o.jsx)(n.code,{children:"Message,"})," or ",(0,o.jsx)(n.code,{children:"DataFrame"})]}),(0,o.jsx)(n.td,{children:"All outputs are generated from running the flow."})]})})]})]}),"\n",(0,o.jsx)(n.h2,{id:"legacy-components",children:"Legacy components"}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Legacy"})," components are available for use but are no longer supported."]}),"\n",(0,o.jsx)(n.h3,{id:"data-conditional-router",children:"Data Conditional Router"}),"\n",(0,o.jsx)(n.admonition,{type:"important",children:(0,o.jsxs)(n.p,{children:["This component is in ",(0,o.jsx)(n.strong,{children:"Legacy"}),", which means it is no longer in active development as of Langflow version 1.3."]})}),"\n",(0,o.jsxs)(n.p,{children:["This component routes ",(0,o.jsx)(n.code,{children:"Data"})," objects based on a condition applied to a specified key, including boolean validation. It can process either a single Data object or a list of Data objects."]}),"\n",(0,o.jsx)(n.p,{children:"This component is particularly useful in workflows that require conditional routing of complex data structures, enabling dynamic decision-making based on data content."}),"\n",(0,o.jsx)(n.h4,{id:"inputs",children:"Inputs"}),"\n",(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Name"}),(0,o.jsx)(n.th,{children:"Type"}),(0,o.jsx)(n.th,{children:"Description"})]})}),(0,o.jsxs)(n.tbody,{children:[(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"data_input"}),(0,o.jsx)(n.td,{children:"Data"}),(0,o.jsx)(n.td,{children:"The Data object or list of Data objects to process. This input can handle both single items and lists."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"key_name"}),(0,o.jsx)(n.td,{children:"String"}),(0,o.jsx)(n.td,{children:"The name of the key in the Data object to check."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"operator"}),(0,o.jsx)(n.td,{children:"Dropdown"}),(0,o.jsx)(n.td,{children:'The operator to apply. Options: "equals", "not equals", "contains", "starts with", "ends with", "boolean validator". Default: "equals".'})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"compare_value"}),(0,o.jsx)(n.td,{children:"String"}),(0,o.jsx)(n.td,{children:'The value to compare against. Not shown/used when operator is "boolean validator".'})]})]})]}),"\n",(0,o.jsx)(n.h4,{id:"outputs",children:"Outputs"}),"\n",(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Name"}),(0,o.jsx)(n.th,{children:"Type"}),(0,o.jsx)(n.th,{children:"Description"})]})}),(0,o.jsxs)(n.tbody,{children:[(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"true_output"}),(0,o.jsx)(n.td,{children:"Data/List"}),(0,o.jsx)(n.td,{children:"Output when the condition is met."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"false_output"}),(0,o.jsx)(n.td,{children:"Data/List"}),(0,o.jsx)(n.td,{children:"Output when the condition is not met."})]})]})]}),"\n",(0,o.jsx)(n.h4,{id:"operator-behavior-1",children:"Operator behavior"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"equals"}),": Exact match comparison between the key's value and compare_value."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"not equals"}),": Inverse of exact match."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"contains"}),": Checks if compare_value is found within the key's value."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"starts with"}),": Checks if the key's value begins with compare_value."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"ends with"}),": Checks if the key's value ends with compare_value."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"boolean validator"}),": Treats the key's value as a boolean. The following values are considered true:","\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["Boolean ",(0,o.jsx)(n.code,{children:"true"}),"."]}),"\n",(0,o.jsx)(n.li,{children:'Strings: "true", "1", "yes", "y", "on" (case-insensitive).'}),"\n",(0,o.jsxs)(n.li,{children:["Any other value is converted using Python's ",(0,o.jsx)(n.code,{children:"bool()"})," function."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.h4,{id:"list-processing",children:"List processing"}),"\n",(0,o.jsx)(n.p,{children:"The following actions occur when processing a list of Data objects:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"Each object in the list is evaluated individually"}),"\n",(0,o.jsx)(n.li,{children:"Objects meeting the condition go to true_output"}),"\n",(0,o.jsx)(n.li,{children:"Objects not meeting the condition go to false_output"}),"\n",(0,o.jsx)(n.li,{children:"If all objects go to one output, the other output is empty"}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"pass",children:"Pass"}),"\n",(0,o.jsx)(n.admonition,{type:"important",children:(0,o.jsxs)(n.p,{children:["This component is in ",(0,o.jsx)(n.strong,{children:"Legacy"}),", which means it is available for use but no longer in active development."]})}),"\n",(0,o.jsx)(n.p,{children:"This component forwards the input message, unchanged."}),"\n",(0,o.jsxs)(s,{children:[(0,o.jsx)("summary",{children:"Parameters"}),(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Inputs"})}),(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Name"}),(0,o.jsx)(n.th,{children:"Display Name"}),(0,o.jsx)(n.th,{children:"Info"})]})}),(0,o.jsxs)(n.tbody,{children:[(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"input_message"}),(0,o.jsx)(n.td,{children:"Input Message"}),(0,o.jsx)(n.td,{children:"The message to forward."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"ignored_message"}),(0,o.jsx)(n.td,{children:"Ignored Message"}),(0,o.jsx)(n.td,{children:"A second message that is ignored. Used as a workaround for continuity."})]})]})]}),(0,o.jsx)(n.p,{children:(0,o.jsx)(n.strong,{children:"Outputs"})}),(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Name"}),(0,o.jsx)(n.th,{children:"Display Name"}),(0,o.jsx)(n.th,{children:"Info"})]})}),(0,o.jsx)(n.tbody,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"output_message"}),(0,o.jsx)(n.td,{children:"Output Message"}),(0,o.jsx)(n.td,{children:"The forwarded message from the input."})]})})]})]}),"\n",(0,o.jsx)(n.h2,{id:"deprecated-components",children:"Deprecated components"}),"\n",(0,o.jsx)(n.p,{children:"Deprecated components have been replaced by newer alternatives and should not be used in new projects."}),"\n",(0,o.jsx)(n.h3,{id:"flow-as-tool",children:"Flow as tool"}),"\n",(0,o.jsx)(n.admonition,{type:"important",children:(0,o.jsxs)(n.p,{children:["This component is deprecated as of Langflow version 1.1.2.\nInstead, use the ",(0,o.jsx)(n.a,{href:"/components-logic#run-flow",children:"Run flow component"})]})}),"\n",(0,o.jsx)(n.p,{children:"This component constructs a tool from a function that runs a loaded flow."}),"\n",(0,o.jsx)(n.h4,{id:"inputs-1",children:"Inputs"}),"\n",(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Name"}),(0,o.jsx)(n.th,{children:"Type"}),(0,o.jsx)(n.th,{children:"Description"})]})}),(0,o.jsxs)(n.tbody,{children:[(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"flow_name"}),(0,o.jsx)(n.td,{children:"Dropdown"}),(0,o.jsx)(n.td,{children:"The name of the flow to run."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"tool_name"}),(0,o.jsx)(n.td,{children:"String"}),(0,o.jsx)(n.td,{children:"The name of the tool."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"tool_description"}),(0,o.jsx)(n.td,{children:"String"}),(0,o.jsx)(n.td,{children:"The description of the tool."})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"return_direct"}),(0,o.jsx)(n.td,{children:"Boolean"}),(0,o.jsx)(n.td,{children:"If true, returns the result directly from the tool."})]})]})]}),"\n",(0,o.jsx)(n.h4,{id:"outputs-1",children:"Outputs"}),"\n",(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Name"}),(0,o.jsx)(n.th,{children:"Type"}),(0,o.jsx)(n.th,{children:"Description"})]})}),(0,o.jsx)(n.tbody,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"api_build_tool"}),(0,o.jsx)(n.td,{children:"Tool"}),(0,o.jsx)(n.td,{children:"The constructed tool from the flow."})]})})]}),"\n",(0,o.jsx)(n.h3,{id:"sub-flow",children:"Sub flow"}),"\n",(0,o.jsx)(n.admonition,{type:"important",children:(0,o.jsxs)(n.p,{children:["This component is deprecated as of Langflow version 1.1.2.\nInstead, use the ",(0,o.jsx)(n.a,{href:"/components-logic#run-flow",children:"Run flow component"})]})}),"\n",(0,o.jsxs)(n.p,{children:["This ",(0,o.jsx)(n.code,{children:"SubFlowComponent"})," generates a component from a flow with all of its inputs and outputs."]}),"\n",(0,o.jsx)(n.p,{children:"This component can integrate entire flows as components within a larger workflow. It dynamically generates inputs based on the selected flow and executes the flow with provided parameters."}),"\n",(0,o.jsx)(n.h4,{id:"inputs-2",children:"Inputs"}),"\n",(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Name"}),(0,o.jsx)(n.th,{children:"Type"}),(0,o.jsx)(n.th,{children:"Description"})]})}),(0,o.jsx)(n.tbody,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"flow_name"}),(0,o.jsx)(n.td,{children:"Dropdown"}),(0,o.jsx)(n.td,{children:"The name of the flow to run."})]})})]}),"\n",(0,o.jsx)(n.h4,{id:"outputs-2",children:"Outputs"}),"\n",(0,o.jsxs)(n.table,{children:[(0,o.jsx)(n.thead,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.th,{children:"Name"}),(0,o.jsx)(n.th,{children:"Type"}),(0,o.jsx)(n.th,{children:"Description"})]})}),(0,o.jsx)(n.tbody,{children:(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"flow_outputs"}),(0,o.jsx)(n.td,{children:"List[Data]"}),(0,o.jsx)(n.td,{children:"The outputs generated from the flow."})]})})]})]})}function p(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(j,{...e})}):j(e)}function u(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},89329:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/component-conditional-router-1fb27526613395545592fc9166c75c27.png"},91110:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/component-loop-csv-66c1b53f0722b36a900632806cb32d78.png"}}]); \ No newline at end of file diff --git a/assets/js/22dd74f7.0ea76a21.js b/assets/js/22dd74f7.0ea76a21.js new file mode 100644 index 0000000000..ebb2ed26ad --- /dev/null +++ b/assets/js/22dd74f7.0ea76a21.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 data types","href":"/data-types","docId":"Concepts/data-types","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-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/data-types":{"id":"Concepts/data-types","title":"Langflow data types","description":"Langflow components are designed to accept and produce specific types of inputs and outputs.","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.6dc8bc0e.js b/assets/js/22dd74f7.6dc8bc0e.js deleted file mode 100644 index 2d65816493..0000000000 --- a/assets/js/22dd74f7.6dc8bc0e.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},{"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/2ab0d4f5.170e4a23.js b/assets/js/2ab0d4f5.98c966ea.js similarity index 53% rename from assets/js/2ab0d4f5.170e4a23.js rename to assets/js/2ab0d4f5.98c966ea.js index 6d02d90be8..2294984916 100644 --- a/assets/js/2ab0d4f5.170e4a23.js +++ b/assets/js/2ab0d4f5.98c966ea.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 \\"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 +"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 \\"minime62\\": \\"\\",\\n \\"nisi33d\\": \\"\\"\\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/37f47bc1.5e5eb18e.js b/assets/js/37f47bc1.5e5eb18e.js new file mode 100644 index 0000000000..b35d7fa6c8 --- /dev/null +++ b/assets/js/37f47bc1.5e5eb18e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[548],{17886:(e,n,o)=>{o.d(n,{A:()=>t});o(96540);var s=o(64058),i=o(74848);function t({name:e,...n}){const o=s[e];return o?(0,i.jsx)(o,{...n}):null}},28453:(e,n,o)=>{o.d(n,{R:()=>r,x:()=>l});var s=o(96540);const i={},t=s.createContext(i);function r(e){const n=s.useContext(t);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(t.Provider,{value:n},e.children)}},38223:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>p,frontMatter:()=>l,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"Concepts/concepts-voice-mode","title":"Voice mode","description":"The Langflow Playground supports voice mode for interacting with your applications through a microphone.","source":"@site/docs/Concepts/concepts-voice-mode.mdx","sourceDirName":"Concepts","slug":"/concepts-voice-mode","permalink":"/concepts-voice-mode","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Voice mode","slug":"/concepts-voice-mode"},"sidebar":"docs","previous":{"title":"Use the Playground","permalink":"/concepts-playground"},"next":{"title":"Langflow data types","permalink":"/data-types"}}');var i=o(74848),t=o(28453),r=o(17886);const l={title:"Voice mode",slug:"/concepts-voice-mode"},c=void 0,a={},d=[{value:"Prerequisite",id:"prerequisite",level:2},{value:"Use voice mode in the Langflow Playground",id:"use-voice-mode-in-the-langflow-playground",level:2},{value:"Langflow voice mode endpoints",id:"langflow-voice-mode-endpoints",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.p,{children:["The Langflow ",(0,i.jsx)(n.strong,{children:"Playground"})," supports ",(0,i.jsx)(n.strong,{children:"voice mode"})," for interacting with your applications through a microphone."]}),"\n",(0,i.jsxs)(n.p,{children:["An ",(0,i.jsx)(n.a,{href:"https://platform.openai.com/",children:"OpenAI API key"})," is required to use ",(0,i.jsx)(n.strong,{children:"voice mode"}),". An ",(0,i.jsx)(n.a,{href:"https://elevenlabs.io",children:"ElevenLabs"})," API key enables more voices in the chat, but is optional."]}),"\n",(0,i.jsxs)(n.p,{children:["Your flow must have a ",(0,i.jsx)(n.a,{href:"/components-io#chat-input",children:"Chat input"})," component to interact with the ",(0,i.jsx)(n.strong,{children:"Playground"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"prerequisite",children:"Prerequisite"}),"\n",(0,i.jsxs)(n.ul,{children:["\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:"use-voice-mode-in-the-langflow-playground",children:"Use voice mode in the Langflow Playground"}),"\n",(0,i.jsxs)(n.p,{children:["Chat with an agent in the ",(0,i.jsx)(n.strong,{children:"Playground"}),", and get more recent results by asking the agent to use tools."]}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["Create a ",(0,i.jsx)(n.a,{href:"/simple-agent",children:"Simple agent starter project"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["Add your ",(0,i.jsx)(n.strong,{children:"OpenAI API key"})," credentials to the ",(0,i.jsx)(n.strong,{children:"Agent"})," component."]}),"\n",(0,i.jsxs)(n.li,{children:["To start a chat session, click ",(0,i.jsx)(n.strong,{children:"Playground"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["To enable voice mode, click the ",(0,i.jsx)(r.A,{name:"Mic","aria-hidden":"true"})," ",(0,i.jsx)(n.strong,{children:"Microphone"})," icon.\nThe ",(0,i.jsx)(n.strong,{children:"Voice mode"})," pane opens."]}),"\n",(0,i.jsxs)(n.li,{children:["In the ",(0,i.jsx)(n.strong,{children:"OpenAI API Key"})," field, add your ",(0,i.jsx)(n.strong,{children:"OpenAI API key"})," credentials.\nThis key is saved as a ",(0,i.jsx)(n.a,{href:"/configuration-global-variables",children:"global variable"})," in Langflow and is accessible from any component or flow."]}),"\n",(0,i.jsxs)(n.li,{children:["Your browser may prompt you for microphone access.\nBrowser access is ",(0,i.jsx)(n.strong,{children:"required"})," to use voice mode.\nTo continue, allow microphone access in your browser."]}),"\n",(0,i.jsxs)(n.li,{children:["In the ",(0,i.jsx)(n.strong,{children:"Audio Input"})," menu, select the input device to use with voice mode."]}),"\n"]}),"\n",(0,i.jsx)(n.admonition,{type:"tip",children:(0,i.jsx)(n.p,{children:"A higher quality microphone improves OpenAI's voice chat comprehension."})}),"\n",(0,i.jsxs)(n.ol,{start:"8",children:["\n",(0,i.jsxs)(n.li,{children:["Optionally, add your ",(0,i.jsx)(n.strong,{children:"ElevenLabs API key"})," in the ",(0,i.jsx)(n.strong,{children:"ElevenLabs API Key"})," field.\nThis makes more voices available for your AI responses.\nThis key is saved as a ",(0,i.jsx)(n.a,{href:"/configuration-global-variables",children:"global variable"})," in Langflow and is accessible from any component or flow."]}),"\n",(0,i.jsxs)(n.li,{children:["In the ",(0,i.jsx)(n.strong,{children:"Preferred Language"})," menu, select your language for conversing with Langflow.\nThis option changes both the spoken conversation and the chat responses in the ",(0,i.jsx)(n.strong,{children:"Playground"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["Talk into your microphone.\nThe waveform in the voice mode pane should register your input, and the agent should respond in voice and in the ",(0,i.jsx)(n.strong,{children:"Playground"}),"."]}),"\n",(0,i.jsx)(n.li,{children:"Ask the agent to use the tools available to find recent news about a subject."}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["The agent describes its search process, including accessing the ",(0,i.jsx)(n.strong,{children:"URL"})," tool to fetch recent news.\nThe agent summarizes the recent news in speech and in the ",(0,i.jsx)(n.strong,{children:"Playground"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"Be aware of the following considerations when using voice mode:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Name and describe your tools accurately, so the ",(0,i.jsx)(n.strong,{children:"Agent"})," chooses tools correctly."]}),"\n",(0,i.jsxs)(n.li,{children:["Voice mode does not use the instructions in the Agent component's ",(0,i.jsx)(n.strong,{children:"Agent Instructions"})," field, because your spoken instructions override this value."]}),"\n",(0,i.jsxs)(n.li,{children:["Voice mode only maintains context within the conversation session you are currently in.\nIf you exit a conversation and close the ",(0,i.jsx)(n.strong,{children:"Playground"}),", your conversational context is not available in the next chat session."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"langflow-voice-mode-endpoints",children:"Langflow voice mode endpoints"}),"\n",(0,i.jsxs)(n.p,{children:["Langflow exposes OpenAI Realtime API-compatible websocket endpoints for your flows. You can build voice applications against these endpoints the same way you would build against ",(0,i.jsx)(n.a,{href:"https://platform.openai.com/docs/guides/realtime#connect-with-websockets",children:"OpenAI Realtime API websockets"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["The WebSockets endpoints require an ",(0,i.jsx)(n.a,{href:"https://platform.openai.com/docs/overview",children:"OpenAI API key"})," for authentication, and they support an optional ",(0,i.jsx)(n.a,{href:"https://elevenlabs.io",children:"ElevenLabs"})," integration."]}),"\n",(0,i.jsx)(n.p,{children:"Langflow exposes two WebSockets endpoints:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"/ws/flow_as_tool/{flow_id}"})," or ",(0,i.jsx)(n.code,{children:"/ws/flow_as_tool/{flow_id}/{session_id}"}),": Establishes a connection to OpenAI Realtime voice, and then invokes flows as tools by the ",(0,i.jsx)(n.a,{href:"https://platform.openai.com/docs/guides/realtime-conversations#handling-audio-with-websockets",children:"OpenAI Realtime model"}),".\nThis approach is ideal for low latency applications, but it is less deterministic since the OpenAI voice-to-voice model determines when to call your flow."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"/ws/flow_tts/{flow_id}"})," or ",(0,i.jsx)(n.code,{children:"/ws/flow_tts/{flow_id}/{session_id}"}),": Converts audio to text using ",(0,i.jsx)(n.a,{href:"https://platform.openai.com/docs/guides/realtime-transcription",children:"OpenAI Realtime voice transcription"}),", and then each flow is invoked directly for each transcript.\nThis approach is more deterministic but has higher latency.\nThis is the mode used in the Langflow Playground."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Path parameters:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"flow_id"}),": Required path parameter. The ID of the flow to be used as a tool."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"session_id"}),": Optional path parameter. A unique identifier for the conversation session. If not provided, one is automatically generated."]}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}}}]); \ No newline at end of file diff --git a/assets/js/37f47bc1.da086e2a.js b/assets/js/37f47bc1.da086e2a.js deleted file mode 100644 index c92bd0001e..0000000000 --- a/assets/js/37f47bc1.da086e2a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[548],{17886:(e,n,o)=>{o.d(n,{A:()=>t});o(96540);var s=o(64058),i=o(74848);function t({name:e,...n}){const o=s[e];return o?(0,i.jsx)(o,{...n}):null}},28453:(e,n,o)=>{o.d(n,{R:()=>r,x:()=>l});var s=o(96540);const i={},t=s.createContext(i);function r(e){const n=s.useContext(t);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:r(e.components),s.createElement(t.Provider,{value:n},e.children)}},38223:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>p,frontMatter:()=>l,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"Concepts/concepts-voice-mode","title":"Voice mode","description":"The Langflow Playground supports voice mode for interacting with your applications through a microphone.","source":"@site/docs/Concepts/concepts-voice-mode.mdx","sourceDirName":"Concepts","slug":"/concepts-voice-mode","permalink":"/concepts-voice-mode","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Voice mode","slug":"/concepts-voice-mode"},"sidebar":"docs","previous":{"title":"Use the Playground","permalink":"/concepts-playground"},"next":{"title":"Langflow objects","permalink":"/concepts-objects"}}');var i=o(74848),t=o(28453),r=o(17886);const l={title:"Voice mode",slug:"/concepts-voice-mode"},c=void 0,a={},d=[{value:"Prerequisite",id:"prerequisite",level:2},{value:"Use voice mode in the Langflow Playground",id:"use-voice-mode-in-the-langflow-playground",level:2},{value:"Langflow voice mode endpoints",id:"langflow-voice-mode-endpoints",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.p,{children:["The Langflow ",(0,i.jsx)(n.strong,{children:"Playground"})," supports ",(0,i.jsx)(n.strong,{children:"voice mode"})," for interacting with your applications through a microphone."]}),"\n",(0,i.jsxs)(n.p,{children:["An ",(0,i.jsx)(n.a,{href:"https://platform.openai.com/",children:"OpenAI API key"})," is required to use ",(0,i.jsx)(n.strong,{children:"voice mode"}),". An ",(0,i.jsx)(n.a,{href:"https://elevenlabs.io",children:"ElevenLabs"})," API key enables more voices in the chat, but is optional."]}),"\n",(0,i.jsxs)(n.p,{children:["Your flow must have a ",(0,i.jsx)(n.a,{href:"/components-io#chat-input",children:"Chat input"})," component to interact with the ",(0,i.jsx)(n.strong,{children:"Playground"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"prerequisite",children:"Prerequisite"}),"\n",(0,i.jsxs)(n.ul,{children:["\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:"use-voice-mode-in-the-langflow-playground",children:"Use voice mode in the Langflow Playground"}),"\n",(0,i.jsxs)(n.p,{children:["Chat with an agent in the ",(0,i.jsx)(n.strong,{children:"Playground"}),", and get more recent results by asking the agent to use tools."]}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["Create a ",(0,i.jsx)(n.a,{href:"/simple-agent",children:"Simple agent starter project"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["Add your ",(0,i.jsx)(n.strong,{children:"OpenAI API key"})," credentials to the ",(0,i.jsx)(n.strong,{children:"Agent"})," component."]}),"\n",(0,i.jsxs)(n.li,{children:["To start a chat session, click ",(0,i.jsx)(n.strong,{children:"Playground"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["To enable voice mode, click the ",(0,i.jsx)(r.A,{name:"Mic","aria-hidden":"true"})," ",(0,i.jsx)(n.strong,{children:"Microphone"})," icon.\nThe ",(0,i.jsx)(n.strong,{children:"Voice mode"})," pane opens."]}),"\n",(0,i.jsxs)(n.li,{children:["In the ",(0,i.jsx)(n.strong,{children:"OpenAI API Key"})," field, add your ",(0,i.jsx)(n.strong,{children:"OpenAI API key"})," credentials.\nThis key is saved as a ",(0,i.jsx)(n.a,{href:"/configuration-global-variables",children:"global variable"})," in Langflow and is accessible from any component or flow."]}),"\n",(0,i.jsxs)(n.li,{children:["Your browser may prompt you for microphone access.\nBrowser access is ",(0,i.jsx)(n.strong,{children:"required"})," to use voice mode.\nTo continue, allow microphone access in your browser."]}),"\n",(0,i.jsxs)(n.li,{children:["In the ",(0,i.jsx)(n.strong,{children:"Audio Input"})," menu, select the input device to use with voice mode."]}),"\n"]}),"\n",(0,i.jsx)(n.admonition,{type:"tip",children:(0,i.jsx)(n.p,{children:"A higher quality microphone improves OpenAI's voice chat comprehension."})}),"\n",(0,i.jsxs)(n.ol,{start:"8",children:["\n",(0,i.jsxs)(n.li,{children:["Optionally, add your ",(0,i.jsx)(n.strong,{children:"ElevenLabs API key"})," in the ",(0,i.jsx)(n.strong,{children:"ElevenLabs API Key"})," field.\nThis makes more voices available for your AI responses.\nThis key is saved as a ",(0,i.jsx)(n.a,{href:"/configuration-global-variables",children:"global variable"})," in Langflow and is accessible from any component or flow."]}),"\n",(0,i.jsxs)(n.li,{children:["In the ",(0,i.jsx)(n.strong,{children:"Preferred Language"})," menu, select your language for conversing with Langflow.\nThis option changes both the spoken conversation and the chat responses in the ",(0,i.jsx)(n.strong,{children:"Playground"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["Talk into your microphone.\nThe waveform in the voice mode pane should register your input, and the agent should respond in voice and in the ",(0,i.jsx)(n.strong,{children:"Playground"}),"."]}),"\n",(0,i.jsx)(n.li,{children:"Ask the agent to use the tools available to find recent news about a subject."}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["The agent describes its search process, including accessing the ",(0,i.jsx)(n.strong,{children:"URL"})," tool to fetch recent news.\nThe agent summarizes the recent news in speech and in the ",(0,i.jsx)(n.strong,{children:"Playground"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"Be aware of the following considerations when using voice mode:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Name and describe your tools accurately, so the ",(0,i.jsx)(n.strong,{children:"Agent"})," chooses tools correctly."]}),"\n",(0,i.jsxs)(n.li,{children:["Voice mode does not use the instructions in the Agent component's ",(0,i.jsx)(n.strong,{children:"Agent Instructions"})," field, because your spoken instructions override this value."]}),"\n",(0,i.jsxs)(n.li,{children:["Voice mode only maintains context within the conversation session you are currently in.\nIf you exit a conversation and close the ",(0,i.jsx)(n.strong,{children:"Playground"}),", your conversational context is not available in the next chat session."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"langflow-voice-mode-endpoints",children:"Langflow voice mode endpoints"}),"\n",(0,i.jsxs)(n.p,{children:["Langflow exposes OpenAI Realtime API-compatible websocket endpoints for your flows. You can build voice applications against these endpoints the same way you would build against ",(0,i.jsx)(n.a,{href:"https://platform.openai.com/docs/guides/realtime#connect-with-websockets",children:"OpenAI Realtime API websockets"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["The WebSockets endpoints require an ",(0,i.jsx)(n.a,{href:"https://platform.openai.com/docs/overview",children:"OpenAI API key"})," for authentication, and they support an optional ",(0,i.jsx)(n.a,{href:"https://elevenlabs.io",children:"ElevenLabs"})," integration."]}),"\n",(0,i.jsx)(n.p,{children:"Langflow exposes two WebSockets endpoints:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"/ws/flow_as_tool/{flow_id}"})," or ",(0,i.jsx)(n.code,{children:"/ws/flow_as_tool/{flow_id}/{session_id}"}),": Establishes a connection to OpenAI Realtime voice, and then invokes flows as tools by the ",(0,i.jsx)(n.a,{href:"https://platform.openai.com/docs/guides/realtime-conversations#handling-audio-with-websockets",children:"OpenAI Realtime model"}),".\nThis approach is ideal for low latency applications, but it is less deterministic since the OpenAI voice-to-voice model determines when to call your flow."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.code,{children:"/ws/flow_tts/{flow_id}"})," or ",(0,i.jsx)(n.code,{children:"/ws/flow_tts/{flow_id}/{session_id}"}),": Converts audio to text using ",(0,i.jsx)(n.a,{href:"https://platform.openai.com/docs/guides/realtime-transcription",children:"OpenAI Realtime voice transcription"}),", and then each flow is invoked directly for each transcript.\nThis approach is more deterministic but has higher latency.\nThis is the mode used in the Langflow Playground."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Path parameters:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"flow_id"}),": Required path parameter. The ID of the flow to be used as a tool."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"session_id"}),": Optional path parameter. A unique identifier for the conversation session. If not provided, one is automatically generated."]}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}}}]); \ No newline at end of file diff --git a/assets/js/464a5f06.2353c667.js b/assets/js/464a5f06.2353c667.js new file mode 100644 index 0000000000..ca6bebfc90 --- /dev/null +++ b/assets/js/464a5f06.2353c667.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[6063],{1422:(e,n,t)=>{t.d(n,{A:()=>r});const r=t.p+"assets/images/integrations-docling-split-text-7dfa4c618be68f4559ce6247630dbdf1.png"},11470:(e,n,t)=>{t.d(n,{A:()=>w});var r=t(96540),s=t(18215),i=t(23104),l=t(56347),o=t(205),c=t(57485),d=t(31682),a=t(70679);function h(e){return r.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(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 u(e){const{values:n,children:t}=e;return(0,r.useMemo)(()=>{const e=n??function(e){return h(e).map(({props:{value:e,label:n,attributes:t,default:r}})=>({value:e,label:n,attributes:t,default:r}))}(t);return function(e){const n=(0,d.XI)(e,(e,n)=>e.value===n.value);if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map(e=>e.value).join(", ")}" found in . Every value needs to be unique.`)}(e),e},[n,t])}function x({value:e,tabValues:n}){return n.some(n=>n.value===e)}function j({queryString:e=!1,groupId:n}){const t=(0,l.W6)(),s=function({queryString:e=!1,groupId:n}){if("string"==typeof e)return e;if(!1===e)return null;if(!0===e&&!n)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 n??null}({queryString:e,groupId:n});return[(0,c.aZ)(s),(0,r.useCallback)(e=>{if(!s)return;const n=new URLSearchParams(t.location.search);n.set(s,e),t.replace({...t.location,search:n.toString()})},[s,t])]}function p(e){const{defaultValue:n,queryString:t=!1,groupId:s}=e,i=u(e),[l,c]=(0,r.useState)(()=>function({defaultValue:e,tabValues:n}){if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(e){if(!x({value:e,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${e}" but none of its children has the corresponding value. Available values are: ${n.map(e=>e.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return e}const t=n.find(e=>e.default)??n[0];if(!t)throw new Error("Unexpected error: 0 tabValues");return t.value}({defaultValue:n,tabValues:i})),[d,h]=j({queryString:t,groupId:s}),[p,g]=function({groupId:e}){const n=function(e){return e?`docusaurus.tab.${e}`:null}(e),[t,s]=(0,a.Dv)(n);return[t,(0,r.useCallback)(e=>{n&&s.set(e)},[n,s])]}({groupId:s}),m=(()=>{const e=d??p;return x({value:e,tabValues:i})?e:null})();(0,o.A)(()=>{m&&c(m)},[m]);return{selectedValue:l,selectValue:(0,r.useCallback)(e=>{if(!x({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);c(e),h(e),g(e)},[h,g,i]),tabValues:i}}var g=t(92303);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var f=t(74848);function b({className:e,block:n,selectedValue:t,selectValue:r,tabValues:l}){const o=[],{blockElementScrollPositionUntilNextRender:c}=(0,i.a_)(),d=e=>{const n=e.currentTarget,s=o.indexOf(n),i=l[s].value;i!==t&&(c(n),r(i))},a=e=>{let n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const t=o.indexOf(e.currentTarget)+1;n=o[t]??o[0];break}case"ArrowLeft":{const t=o.indexOf(e.currentTarget)-1;n=o[t]??o[o.length-1];break}}n?.focus()};return(0,f.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":n},e),children:l.map(({value:e,label:n,attributes:r})=>(0,f.jsx)("li",{role:"tab",tabIndex:t===e?0:-1,"aria-selected":t===e,ref:e=>{o.push(e)},onKeyDown:a,onClick:d,...r,className:(0,s.A)("tabs__item",m.tabItem,r?.className,{"tabs__item--active":t===e}),children:n??e},e))})}function D({lazy:e,children:n,selectedValue:t}){const i=(Array.isArray(n)?n:[n]).filter(Boolean);if(e){const e=i.find(e=>e.props.value===t);return e?(0,r.cloneElement)(e,{className:(0,s.A)("margin-top--md",e.props.className)}):null}return(0,f.jsx)("div",{className:"margin-top--md",children:i.map((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==t}))})}function v(e){const n=p(e);return(0,f.jsxs)("div",{className:(0,s.A)("tabs-container",m.tabList),children:[(0,f.jsx)(b,{...n,...e}),(0,f.jsx)(D,{...n,...e})]})}function w(e){const n=(0,g.A)();return(0,f.jsx)(v,{...e,children:h(e.children)},String(n))}},17886:(e,n,t)=>{t.d(n,{A:()=>i});t(96540);var r=t(64058),s=t(74848);function i({name:e,...n}){const t=r[e];return t?(0,s.jsx)(t,{...n}):null}},19365:(e,n,t)=>{t.d(n,{A:()=>l});t(96540);var r=t(18215);const s={tabItem:"tabItem_Ymn6"};var i=t(74848);function l({children:e,hidden:n,className:t}){return(0,i.jsx)("div",{role:"tabpanel",className:(0,r.A)(s.tabItem,t),hidden:n,children:e})}},28453:(e,n,t)=>{t.d(n,{R:()=>l,x:()=>o});var r=t(96540);const s={},i=r.createContext(s);function l(e){const n=r.useContext(i);return r.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:l(e.components),r.createElement(i.Provider,{value:n},e.children)}},94617:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>c,default:()=>u,frontMatter:()=>o,metadata:()=>r,toc:()=>a});const r=JSON.parse('{"id":"Integrations/Docling/integrations-docling","title":"Integrate Docling with Langflow","description":"Langflow integrates with Docling through a suite of components for parsing documents.","source":"@site/docs/Integrations/Docling/integrations-docling.mdx","sourceDirName":"Integrations/Docling","slug":"/integrations-docling","permalink":"/integrations-docling","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Integrate Docling with Langflow","slug":"/integrations-docling"},"sidebar":"docs","previous":{"title":"Composio","permalink":"/integrations-composio"},"next":{"title":"Integrate Google Cloud Vertex AI with Langflow","permalink":"/integrations-setup-google-cloud-vertex-ai-langflow"}}');var s=t(74848),i=t(28453),l=(t(11470),t(19365),t(17886));const o={title:"Integrate Docling with Langflow",slug:"/integrations-docling"},c=void 0,d={},a=[{value:"Install Docling dependency",id:"install-docling-dependency",level:2},{value:"Use Docling components in a flow",id:"use-docling-components-in-a-flow",level:2},{value:"Docling components",id:"docling-components",level:2},{value:"Docling",id:"docling",level:3},{value:"Docling Serve",id:"docling-serve",level:3},{value:"Chunk DoclingDocument",id:"chunk-doclingdocument",level:3},{value:"Export DoclingDocument",id:"export-doclingdocument",level:3},{value:"Docling video tutorial",id:"docling-video-tutorial",level:2}];function h(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components},{Details:r}=n;return r||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:["Langflow integrates with ",(0,s.jsx)(n.a,{href:"https://docling-project.github.io/docling/",children:"Docling"})," through a suite of components for parsing documents."]}),"\n",(0,s.jsx)(n.h2,{id:"install-docling-dependency",children:"Install Docling dependency"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Install the Docling extra in Langflow OSS with ",(0,s.jsx)(n.code,{children:"uv pip install langflow[docling]"})," or ",(0,s.jsx)(n.code,{children:"uv pip install docling"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["To add a dependency to Langflow Desktop, add an entry for Docling to the application's ",(0,s.jsx)(n.code,{children:"requirements.txt"})," file.\nFor more information, see ",(0,s.jsx)(n.a,{href:"/install-custom-dependencies#langflow-desktop",children:"Install custom dependencies in Langflow Desktop"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"use-docling-components-in-a-flow",children:"Use Docling components in a flow"}),"\n",(0,s.jsx)(n.p,{children:"This example demonstrates how to use Docling components to split a PDF in a flow:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Connect a ",(0,s.jsx)(n.strong,{children:"Docling"})," and an ",(0,s.jsx)(n.strong,{children:"ExportDoclingDocument"})," component to a ",(0,s.jsx)(n.a,{href:"/components-processing#split-text",children:(0,s.jsx)(n.strong,{children:"Split Text"})})," component.\nThe ",(0,s.jsx)(n.strong,{children:"Docling"})," component loads the document, and the ",(0,s.jsx)(n.strong,{children:"ExportDoclingDocument"})," component converts the DoclingDocument into the format you select. This example converts the document to Markdown, with images represented as placeholders.\nThe ",(0,s.jsx)(n.strong,{children:"Split Text"})," component will split the Markdown into chunks for the vector database to store in the next part of the flow."]}),"\n",(0,s.jsxs)(n.li,{children:["Connect a ",(0,s.jsx)(n.a,{href:"/components-vector-stores#chroma-db",children:(0,s.jsx)(n.strong,{children:"Chroma DB"})})," component to the ",(0,s.jsx)(n.strong,{children:"Split text"})," component's ",(0,s.jsx)(n.strong,{children:"Chunks"})," output."]}),"\n",(0,s.jsxs)(n.li,{children:["Connect an ",(0,s.jsx)(n.a,{href:"/components-embedding-models",children:(0,s.jsx)(n.strong,{children:"Embedding Model"})})," to Chroma's ",(0,s.jsx)(n.strong,{children:"Embedding"})," port, and a ",(0,s.jsx)(n.strong,{children:"Chat Output"})," component to view the extracted ",(0,s.jsx)(n.a,{href:"/data-types#dataframe",children:"DataFrame"}),"."]}),"\n",(0,s.jsx)(n.li,{children:"Add your OpenAI API key to the Embedding Model."}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"The flow looks like this:"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Docling and ExportDoclingDocument extracting and splitting text to vector database",src:t(1422).A+"",width:"4000",height:"2060"})}),"\n",(0,s.jsxs)(n.ol,{start:"5",children:["\n",(0,s.jsxs)(n.li,{children:["Add a file to the ",(0,s.jsx)(n.strong,{children:"Docling"})," component."]}),"\n",(0,s.jsxs)(n.li,{children:["To run the flow, click ",(0,s.jsx)(l.A,{name:"Play","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Playground"}),".\nThe chunked document is loaded as vectors into your vector database."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"docling-components",children:"Docling components"}),"\n",(0,s.jsx)(n.p,{children:"The following sections describe the purpose and configuration options for each component in the Docling bundle."}),"\n",(0,s.jsx)(n.h3,{id:"docling",children:"Docling"}),"\n",(0,s.jsx)(n.p,{children:"This component uses Docling to process input documents running the Docling models locally."}),"\n",(0,s.jsxs)(r,{children:[(0,s.jsx)("summary",{children:"Parameters"}),(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Inputs"})}),(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Name"}),(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"files"}),(0,s.jsx)(n.td,{children:"File"}),(0,s.jsx)(n.td,{children:"The files to process."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"pipeline"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Docling pipeline to use (standard, vlm)."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"ocr_engine"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"OCR engine to use (easyocr, tesserocr, rapidocr, ocrmac)."})]})]})]}),(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Outputs"})}),(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Name"}),(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsx)(n.tbody,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"files"}),(0,s.jsx)(n.td,{children:"File"}),(0,s.jsx)(n.td,{children:"The processed files with DoclingDocument data."})]})})]})]}),"\n",(0,s.jsx)(n.h3,{id:"docling-serve",children:"Docling Serve"}),"\n",(0,s.jsx)(n.p,{children:"This component uses Docling to process input documents connecting to your instance of Docling Serve."}),"\n",(0,s.jsxs)(r,{children:[(0,s.jsx)("summary",{children:"Parameters"}),(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Inputs"})}),(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Name"}),(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"files"}),(0,s.jsx)(n.td,{children:"File"}),(0,s.jsx)(n.td,{children:"The files to process."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"api_url"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"URL of the Docling Serve instance."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"max_concurrency"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsx)(n.td,{children:"Maximum number of concurrent requests for the server."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"max_poll_timeout"}),(0,s.jsx)(n.td,{children:"Float"}),(0,s.jsx)(n.td,{children:"Maximum waiting time for the document conversion to complete."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"api_headers"}),(0,s.jsx)(n.td,{children:"Dict"}),(0,s.jsx)(n.td,{children:"Optional dictionary of additional headers required for connecting to Docling Serve."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"docling_serve_opts"}),(0,s.jsx)(n.td,{children:"Dict"}),(0,s.jsx)(n.td,{children:"Optional dictionary of additional options for Docling Serve."})]})]})]}),(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Outputs"})}),(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Name"}),(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsx)(n.tbody,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"files"}),(0,s.jsx)(n.td,{children:"File"}),(0,s.jsx)(n.td,{children:"The processed files with DoclingDocument data."})]})})]})]}),"\n",(0,s.jsx)(n.h3,{id:"chunk-doclingdocument",children:"Chunk DoclingDocument"}),"\n",(0,s.jsx)(n.p,{children:"This component uses the DoclingDocument chunkers to split a document into chunks."}),"\n",(0,s.jsxs)(r,{children:[(0,s.jsx)("summary",{children:"Parameters"}),(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Inputs"})}),(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Name"}),(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"data_inputs"}),(0,s.jsx)(n.td,{children:"Data/DataFrame"}),(0,s.jsx)(n.td,{children:"The data with documents to split in chunks."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"chunker"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Which chunker to use (HybridChunker, HierarchicalChunker)."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"provider"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Which tokenizer provider (Hugging Face, OpenAI)."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"hf_model_name"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Model name of the tokenizer to use with the HybridChunker when Hugging Face is chosen."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"openai_model_name"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Model name of the tokenizer to use with the HybridChunker when OpenAI is chosen."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"max_tokens"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsx)(n.td,{children:"Maximum number of tokens for the HybridChunker."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"doc_key"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"The key to use for the DoclingDocument column."})]})]})]}),(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Outputs"})}),(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Name"}),(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsx)(n.tbody,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"dataframe"}),(0,s.jsx)(n.td,{children:"DataFrame"}),(0,s.jsx)(n.td,{children:"The chunked documents as a DataFrame."})]})})]})]}),"\n",(0,s.jsx)(n.h3,{id:"export-doclingdocument",children:"Export DoclingDocument"}),"\n",(0,s.jsx)(n.p,{children:"This component exports DoclingDocument to Markdown, HTML, and other formats."}),"\n",(0,s.jsxs)(r,{children:[(0,s.jsx)("summary",{children:"Parameters"}),(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Inputs"})}),(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Name"}),(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"data_inputs"}),(0,s.jsx)(n.td,{children:"Data/DataFrame"}),(0,s.jsx)(n.td,{children:"The data with documents to export."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"export_format"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Select the export format to convert the input (Markdown, HTML, Plaintext, DocTags)."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"image_mode"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Specify how images are exported in the output (placeholder, embedded)."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"md_image_placeholder"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Specify the image placeholder for markdown exports."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"md_page_break_placeholder"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Add this placeholder between pages in the markdown output."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"doc_key"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"The key to use for the DoclingDocument column."})]})]})]}),(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Outputs"})}),(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Name"}),(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"data"}),(0,s.jsx)(n.td,{children:"Data"}),(0,s.jsx)(n.td,{children:"The exported data."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"dataframe"}),(0,s.jsx)(n.td,{children:"DataFrame"}),(0,s.jsx)(n.td,{children:"The exported data as a DataFrame."})]})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"docling-video-tutorial",children:"Docling video tutorial"}),"\n",(0,s.jsxs)(n.p,{children:["To learn more about content extraction with Docling, see the video tutorial ",(0,s.jsx)(n.a,{href:"https://www.youtube.com/watch?v=5DuS6uRI5OM",children:"Docling + Langflow: Document Processing for AI Workflows"}),"."]})]})}function u(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}}}]); \ No newline at end of file diff --git a/assets/js/464a5f06.bd423937.js b/assets/js/464a5f06.bd423937.js deleted file mode 100644 index 02a123871b..0000000000 --- a/assets/js/464a5f06.bd423937.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[6063],{1422:(e,n,t)=>{t.d(n,{A:()=>r});const r=t.p+"assets/images/integrations-docling-split-text-7dfa4c618be68f4559ce6247630dbdf1.png"},11470:(e,n,t)=>{t.d(n,{A:()=>w});var r=t(96540),s=t(18215),i=t(23104),o=t(56347),l=t(205),c=t(57485),d=t(31682),a=t(70679);function h(e){return r.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,r.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(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 u(e){const{values:n,children:t}=e;return(0,r.useMemo)(()=>{const e=n??function(e){return h(e).map(({props:{value:e,label:n,attributes:t,default:r}})=>({value:e,label:n,attributes:t,default:r}))}(t);return function(e){const n=(0,d.XI)(e,(e,n)=>e.value===n.value);if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map(e=>e.value).join(", ")}" found in . Every value needs to be unique.`)}(e),e},[n,t])}function x({value:e,tabValues:n}){return n.some(n=>n.value===e)}function j({queryString:e=!1,groupId:n}){const t=(0,o.W6)(),s=function({queryString:e=!1,groupId:n}){if("string"==typeof e)return e;if(!1===e)return null;if(!0===e&&!n)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 n??null}({queryString:e,groupId:n});return[(0,c.aZ)(s),(0,r.useCallback)(e=>{if(!s)return;const n=new URLSearchParams(t.location.search);n.set(s,e),t.replace({...t.location,search:n.toString()})},[s,t])]}function p(e){const{defaultValue:n,queryString:t=!1,groupId:s}=e,i=u(e),[o,c]=(0,r.useState)(()=>function({defaultValue:e,tabValues:n}){if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(e){if(!x({value:e,tabValues:n}))throw new Error(`Docusaurus error: The has a defaultValue "${e}" but none of its children has the corresponding value. Available values are: ${n.map(e=>e.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return e}const t=n.find(e=>e.default)??n[0];if(!t)throw new Error("Unexpected error: 0 tabValues");return t.value}({defaultValue:n,tabValues:i})),[d,h]=j({queryString:t,groupId:s}),[p,g]=function({groupId:e}){const n=function(e){return e?`docusaurus.tab.${e}`:null}(e),[t,s]=(0,a.Dv)(n);return[t,(0,r.useCallback)(e=>{n&&s.set(e)},[n,s])]}({groupId:s}),m=(()=>{const e=d??p;return x({value:e,tabValues:i})?e:null})();(0,l.A)(()=>{m&&c(m)},[m]);return{selectedValue:o,selectValue:(0,r.useCallback)(e=>{if(!x({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);c(e),h(e),g(e)},[h,g,i]),tabValues:i}}var g=t(92303);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var f=t(74848);function b({className:e,block:n,selectedValue:t,selectValue:r,tabValues:o}){const l=[],{blockElementScrollPositionUntilNextRender:c}=(0,i.a_)(),d=e=>{const n=e.currentTarget,s=l.indexOf(n),i=o[s].value;i!==t&&(c(n),r(i))},a=e=>{let n=null;switch(e.key){case"Enter":d(e);break;case"ArrowRight":{const t=l.indexOf(e.currentTarget)+1;n=l[t]??l[0];break}case"ArrowLeft":{const t=l.indexOf(e.currentTarget)-1;n=l[t]??l[l.length-1];break}}n?.focus()};return(0,f.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":n},e),children:o.map(({value:e,label:n,attributes:r})=>(0,f.jsx)("li",{role:"tab",tabIndex:t===e?0:-1,"aria-selected":t===e,ref:e=>{l.push(e)},onKeyDown:a,onClick:d,...r,className:(0,s.A)("tabs__item",m.tabItem,r?.className,{"tabs__item--active":t===e}),children:n??e},e))})}function D({lazy:e,children:n,selectedValue:t}){const i=(Array.isArray(n)?n:[n]).filter(Boolean);if(e){const e=i.find(e=>e.props.value===t);return e?(0,r.cloneElement)(e,{className:(0,s.A)("margin-top--md",e.props.className)}):null}return(0,f.jsx)("div",{className:"margin-top--md",children:i.map((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==t}))})}function v(e){const n=p(e);return(0,f.jsxs)("div",{className:(0,s.A)("tabs-container",m.tabList),children:[(0,f.jsx)(b,{...n,...e}),(0,f.jsx)(D,{...n,...e})]})}function w(e){const n=(0,g.A)();return(0,f.jsx)(v,{...e,children:h(e.children)},String(n))}},17886:(e,n,t)=>{t.d(n,{A:()=>i});t(96540);var r=t(64058),s=t(74848);function i({name:e,...n}){const t=r[e];return t?(0,s.jsx)(t,{...n}):null}},19365:(e,n,t)=>{t.d(n,{A:()=>o});t(96540);var r=t(18215);const s={tabItem:"tabItem_Ymn6"};var i=t(74848);function o({children:e,hidden:n,className:t}){return(0,i.jsx)("div",{role:"tabpanel",className:(0,r.A)(s.tabItem,t),hidden:n,children:e})}},28453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>l});var r=t(96540);const s={},i=r.createContext(s);function o(e){const n=r.useContext(i);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:o(e.components),r.createElement(i.Provider,{value:n},e.children)}},94617:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>c,default:()=>u,frontMatter:()=>l,metadata:()=>r,toc:()=>a});const r=JSON.parse('{"id":"Integrations/Docling/integrations-docling","title":"Integrate Docling with Langflow","description":"Langflow integrates with Docling through a suite of components for parsing documents.","source":"@site/docs/Integrations/Docling/integrations-docling.mdx","sourceDirName":"Integrations/Docling","slug":"/integrations-docling","permalink":"/integrations-docling","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Integrate Docling with Langflow","slug":"/integrations-docling"},"sidebar":"docs","previous":{"title":"Composio","permalink":"/integrations-composio"},"next":{"title":"Integrate Google Cloud Vertex AI with Langflow","permalink":"/integrations-setup-google-cloud-vertex-ai-langflow"}}');var s=t(74848),i=t(28453),o=(t(11470),t(19365),t(17886));const l={title:"Integrate Docling with Langflow",slug:"/integrations-docling"},c=void 0,d={},a=[{value:"Install Docling dependency",id:"install-docling-dependency",level:2},{value:"Use Docling components in a flow",id:"use-docling-components-in-a-flow",level:2},{value:"Docling components",id:"docling-components",level:2},{value:"Docling",id:"docling",level:3},{value:"Docling Serve",id:"docling-serve",level:3},{value:"Chunk DoclingDocument",id:"chunk-doclingdocument",level:3},{value:"Export DoclingDocument",id:"export-doclingdocument",level:3},{value:"Docling video tutorial",id:"docling-video-tutorial",level:2}];function h(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components},{Details:r}=n;return r||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:["Langflow integrates with ",(0,s.jsx)(n.a,{href:"https://docling-project.github.io/docling/",children:"Docling"})," through a suite of components for parsing documents."]}),"\n",(0,s.jsx)(n.h2,{id:"install-docling-dependency",children:"Install Docling dependency"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Install the Docling extra in Langflow OSS with ",(0,s.jsx)(n.code,{children:"uv pip install langflow[docling]"})," or ",(0,s.jsx)(n.code,{children:"uv pip install docling"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["To add a dependency to Langflow Desktop, add an entry for Docling to the application's ",(0,s.jsx)(n.code,{children:"requirements.txt"})," file.\nFor more information, see ",(0,s.jsx)(n.a,{href:"/install-custom-dependencies#langflow-desktop",children:"Install custom dependencies in Langflow Desktop"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"use-docling-components-in-a-flow",children:"Use Docling components in a flow"}),"\n",(0,s.jsx)(n.p,{children:"This example demonstrates how to use Docling components to split a PDF in a flow:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Connect a ",(0,s.jsx)(n.strong,{children:"Docling"})," and an ",(0,s.jsx)(n.strong,{children:"ExportDoclingDocument"})," component to a ",(0,s.jsx)(n.a,{href:"/components-processing#split-text",children:(0,s.jsx)(n.strong,{children:"Split Text"})})," component.\nThe ",(0,s.jsx)(n.strong,{children:"Docling"})," component loads the document, and the ",(0,s.jsx)(n.strong,{children:"ExportDoclingDocument"})," component converts the DoclingDocument into the format you select. This example converts the document to Markdown, with images represented as placeholders.\nThe ",(0,s.jsx)(n.strong,{children:"Split Text"})," component will split the Markdown into chunks for the vector database to store in the next part of the flow."]}),"\n",(0,s.jsxs)(n.li,{children:["Connect a ",(0,s.jsx)(n.a,{href:"/components-vector-stores#chroma-db",children:(0,s.jsx)(n.strong,{children:"Chroma DB"})})," component to the ",(0,s.jsx)(n.strong,{children:"Split text"})," component's ",(0,s.jsx)(n.strong,{children:"Chunks"})," output."]}),"\n",(0,s.jsxs)(n.li,{children:["Connect an ",(0,s.jsx)(n.a,{href:"/components-embedding-models",children:(0,s.jsx)(n.strong,{children:"Embedding Model"})})," to Chroma's ",(0,s.jsx)(n.strong,{children:"Embedding"})," port, and a ",(0,s.jsx)(n.strong,{children:"Chat Output"})," component to view the extracted ",(0,s.jsx)(n.a,{href:"/concepts-objects#dataframe-object",children:"DataFrame"}),"."]}),"\n",(0,s.jsx)(n.li,{children:"Add your OpenAI API key to the Embedding Model."}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"The flow looks like this:"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Docling and ExportDoclingDocument extracting and splitting text to vector database",src:t(1422).A+"",width:"4000",height:"2060"})}),"\n",(0,s.jsxs)(n.ol,{start:"5",children:["\n",(0,s.jsxs)(n.li,{children:["Add a file to the ",(0,s.jsx)(n.strong,{children:"Docling"})," component."]}),"\n",(0,s.jsxs)(n.li,{children:["To run the flow, click ",(0,s.jsx)(o.A,{name:"Play","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Playground"}),".\nThe chunked document is loaded as vectors into your vector database."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"docling-components",children:"Docling components"}),"\n",(0,s.jsx)(n.p,{children:"The following sections describe the purpose and configuration options for each component in the Docling bundle."}),"\n",(0,s.jsx)(n.h3,{id:"docling",children:"Docling"}),"\n",(0,s.jsx)(n.p,{children:"This component uses Docling to process input documents running the Docling models locally."}),"\n",(0,s.jsxs)(r,{children:[(0,s.jsx)("summary",{children:"Parameters"}),(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Inputs"})}),(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Name"}),(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"files"}),(0,s.jsx)(n.td,{children:"File"}),(0,s.jsx)(n.td,{children:"The files to process."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"pipeline"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Docling pipeline to use (standard, vlm)."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"ocr_engine"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"OCR engine to use (easyocr, tesserocr, rapidocr, ocrmac)."})]})]})]}),(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Outputs"})}),(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Name"}),(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsx)(n.tbody,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"files"}),(0,s.jsx)(n.td,{children:"File"}),(0,s.jsx)(n.td,{children:"The processed files with DoclingDocument data."})]})})]})]}),"\n",(0,s.jsx)(n.h3,{id:"docling-serve",children:"Docling Serve"}),"\n",(0,s.jsx)(n.p,{children:"This component uses Docling to process input documents connecting to your instance of Docling Serve."}),"\n",(0,s.jsxs)(r,{children:[(0,s.jsx)("summary",{children:"Parameters"}),(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Inputs"})}),(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Name"}),(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"files"}),(0,s.jsx)(n.td,{children:"File"}),(0,s.jsx)(n.td,{children:"The files to process."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"api_url"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"URL of the Docling Serve instance."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"max_concurrency"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsx)(n.td,{children:"Maximum number of concurrent requests for the server."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"max_poll_timeout"}),(0,s.jsx)(n.td,{children:"Float"}),(0,s.jsx)(n.td,{children:"Maximum waiting time for the document conversion to complete."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"api_headers"}),(0,s.jsx)(n.td,{children:"Dict"}),(0,s.jsx)(n.td,{children:"Optional dictionary of additional headers required for connecting to Docling Serve."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"docling_serve_opts"}),(0,s.jsx)(n.td,{children:"Dict"}),(0,s.jsx)(n.td,{children:"Optional dictionary of additional options for Docling Serve."})]})]})]}),(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Outputs"})}),(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Name"}),(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsx)(n.tbody,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"files"}),(0,s.jsx)(n.td,{children:"File"}),(0,s.jsx)(n.td,{children:"The processed files with DoclingDocument data."})]})})]})]}),"\n",(0,s.jsx)(n.h3,{id:"chunk-doclingdocument",children:"Chunk DoclingDocument"}),"\n",(0,s.jsx)(n.p,{children:"This component uses the DoclingDocument chunkers to split a document into chunks."}),"\n",(0,s.jsxs)(r,{children:[(0,s.jsx)("summary",{children:"Parameters"}),(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Inputs"})}),(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Name"}),(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"data_inputs"}),(0,s.jsx)(n.td,{children:"Data/DataFrame"}),(0,s.jsx)(n.td,{children:"The data with documents to split in chunks."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"chunker"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Which chunker to use (HybridChunker, HierarchicalChunker)."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"provider"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Which tokenizer provider (Hugging Face, OpenAI)."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"hf_model_name"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Model name of the tokenizer to use with the HybridChunker when Hugging Face is chosen."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"openai_model_name"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Model name of the tokenizer to use with the HybridChunker when OpenAI is chosen."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"max_tokens"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsx)(n.td,{children:"Maximum number of tokens for the HybridChunker."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"doc_key"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"The key to use for the DoclingDocument column."})]})]})]}),(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Outputs"})}),(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Name"}),(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsx)(n.tbody,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"dataframe"}),(0,s.jsx)(n.td,{children:"DataFrame"}),(0,s.jsx)(n.td,{children:"The chunked documents as a DataFrame."})]})})]})]}),"\n",(0,s.jsx)(n.h3,{id:"export-doclingdocument",children:"Export DoclingDocument"}),"\n",(0,s.jsx)(n.p,{children:"This component exports DoclingDocument to Markdown, HTML, and other formats."}),"\n",(0,s.jsxs)(r,{children:[(0,s.jsx)("summary",{children:"Parameters"}),(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Inputs"})}),(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Name"}),(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"data_inputs"}),(0,s.jsx)(n.td,{children:"Data/DataFrame"}),(0,s.jsx)(n.td,{children:"The data with documents to export."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"export_format"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Select the export format to convert the input (Markdown, HTML, Plaintext, DocTags)."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"image_mode"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Specify how images are exported in the output (placeholder, embedded)."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"md_image_placeholder"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Specify the image placeholder for markdown exports."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"md_page_break_placeholder"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Add this placeholder between pages in the markdown output."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"doc_key"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"The key to use for the DoclingDocument column."})]})]})]}),(0,s.jsx)(n.p,{children:(0,s.jsx)(n.strong,{children:"Outputs"})}),(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Name"}),(0,s.jsx)(n.th,{children:"Type"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"data"}),(0,s.jsx)(n.td,{children:"Data"}),(0,s.jsx)(n.td,{children:"The exported data."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"dataframe"}),(0,s.jsx)(n.td,{children:"DataFrame"}),(0,s.jsx)(n.td,{children:"The exported data as a DataFrame."})]})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"docling-video-tutorial",children:"Docling video tutorial"}),"\n",(0,s.jsxs)(n.p,{children:["To learn more about content extraction with Docling, see the video tutorial ",(0,s.jsx)(n.a,{href:"https://www.youtube.com/watch?v=5DuS6uRI5OM",children:"Docling + Langflow: Document Processing for AI Workflows"}),"."]})]})}function u(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}}}]); \ No newline at end of file diff --git a/assets/js/46d346a5.9e23adf1.js b/assets/js/46d346a5.9e23adf1.js new file mode 100644 index 0000000000..c13b97edaf --- /dev/null +++ b/assets/js/46d346a5.9e23adf1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[3094],{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 m(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}),[m,x]=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}),D=(()=>{const e=i??m;return u({value:e,tabValues:r})?e:null})();(0,c.A)(()=>{D&&a(D)},[D]);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),x(e)},[d,x,r]),tabValues:r}}var x=o(92303);const D={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",D.tabItem,n?.className,{"tabs__item--active":o===e}),children:t??e},e))})}function j({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 b(e){const t=m(e);return(0,g.jsxs)("div",{className:(0,s.A)("tabs-container",D.tabList),children:[(0,g.jsx)(f,{...t,...e}),(0,g.jsx)(j,{...t,...e})]})}function C(e){const t=(0,x.A)();return(0,g.jsx)(b,{...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})}},20892:(e,t,o)=>{o.r(t),o.d(t,{CH:()=>u,assets:()=>h,chCodeConfig:()=>y,contentTitle:()=>d,default:()=>D,frontMatter:()=>p,metadata:()=>n,toc:()=>m});const n=JSON.parse('{"id":"Concepts/data-types","title":"Langflow data types","description":"Langflow components are designed to accept and produce specific types of inputs and outputs.","source":"@site/docs/Concepts/data-types.mdx","sourceDirName":"Concepts","slug":"/data-types","permalink":"/data-types","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Langflow data types","slug":"/data-types"},"sidebar":"docs","previous":{"title":"Use voice mode","permalink":"/concepts-voice-mode"},"next":{"title":"Manage files","permalink":"/concepts-file-management"}}');var s=o(74848),r=o(28453),l=o(24754),c=o(11470),a=o(19365),i=o(17886);const p={title:"Langflow data types",slug:"/data-types"},d=void 0,h={},u={annotations:l.hk,Code:l.Cy},y={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},m=[{value:"Data",id:"data",level:2},{value:"Schema and attributes",id:"schema-and-attributes",level:3},{value:"Data structure",id:"data-structure",level:3},{value:"DataFrame",id:"dataframe",level:2},{value:"Schema and attributes",id:"schema-and-attributes-1",level:3},{value:"DataFrame structure",id:"dataframe-structure",level:3},{value:"Embeddings",id:"embeddings",level:2},{value:"LanguageModel",id:"languagemodel",level:2},{value:"Memory",id:"memory",level:2},{value:"Message",id:"message",level:2},{value:"Schema and attributes",id:"schema-and-attributes-2",level:3},{value:"Message structure",id:"message-structure",level:3},{value:"Text I/O components don't treat Message data as conversations",id:"text-io-components-dont-treat-message-data-as-conversations",level:3},{value:"Tool",id:"tool",level:2},{value:"Unknown or multiple types",id:"unknown-or-multiple-types",level:2},{value:"View data types in flows",id:"view-data-types-in-flows",level:2},{value:"See also",id:"see-also",level:2}];function x(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return u||g("CH",!1),u.Code||g("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.jsx)(t.p,{children:"Langflow components are designed to accept and produce specific types of inputs and outputs.\nInput and output data types define the structure and flow of information between components.\nUnderstanding these structures helps you build applications that provide valid input and correctly anticipate the output format."}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"/concepts-components#component-ports",children:"Component ports"})," represent the data types that each component can send and receive.\nSome data types are self-evident from the fields they are attached to; for example, a ",(0,s.jsx)(t.strong,{children:"System Message"})," field accepts ",(0,s.jsx)(t.a,{href:"#message",children:"message data"}),".\n",(0,s.jsx)(t.a,{href:"/concepts-components#port-colors",children:"Port colors"})," also indicate the port's data type.\nFor example ",(0,s.jsx)(t.strong,{children:"Data"})," ports, represented by ",(0,s.jsx)(i.A,{name:"Circle",size:"16","aria-label":"Red data port",style:{color:"#dc2626",fill:"#dc2626"}}),", either accept or emit ",(0,s.jsx)(t.a,{href:"#data",children:"structured data objects"}),"."]}),"\n",(0,s.jsx)(t.p,{children:"When building flows, connect output ports to input ports of the same type (color) to transfer that type of data between two components."}),"\n",(0,s.jsx)(t.admonition,{type:"tip",children:(0,s.jsx)(t.p,{children:"In the visual editor, hover over a port to see connection details for that port."})}),"\n",(0,s.jsx)(t.h2,{id:"data",children:"Data"}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Data"})," ports ",(0,s.jsx)(i.A,{name:"Circle",size:"16","aria-label":"Red data port",style:{color:"#dc2626",fill:"#dc2626"}})," accept or produce the ",(0,s.jsx)(t.code,{children:"Data"})," type, which is a structured data object, like a JSON payload that you might send to an API.\nThis data type is used to pass key-value pairs between components, such as user profiles, settings, or other structured information."]}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.code,{children:"Data"})," objects include a primary text field, indicated by a ",(0,s.jsx)(t.code,{children:"text_key"}),", and additional metadata."]}),"\n",(0,s.jsx)(t.h3,{id:"schema-and-attributes",children:"Schema and attributes"}),"\n",(0,s.jsxs)(t.p,{children:["The schema is defined in ",(0,s.jsx)(t.a,{href:"https://github.com/langflow-ai/langflow/blob/main/src/backend/base/langflow/schema/data.py",children:(0,s.jsx)(t.code,{children:"data.py"})}),"."]}),"\n",(0,s.jsx)(t.p,{children:"The following attributes are available:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"data"}),": A dictionary that stores key-value pairs."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"text_key"}),": The key in ",(0,s.jsx)(t.code,{children:"data"})," that is considered the primary text value."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"default_value"}),": Fallback if ",(0,s.jsx)(t.code,{children:"text_key"})," is missing. The default ",(0,s.jsx)(t.code,{children:"text_key"})," is ",(0,s.jsx)(t.code,{children:'"text"'}),"."]}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"data-structure",children:"Data structure"}),"\n",(0,s.jsxs)(t.p,{children:["A ",(0,s.jsx)(t.code,{children:"Data"})," object stores key-value pairs within the ",(0,s.jsx)(t.code,{children:".data"})," attribute, where each key is a field name and its value can be any supported data type. ",(0,s.jsx)(t.code,{children:"text_key"})," tells Langflow which key in the data dictionary is the primary text value for that object."]}),"\n",(0,s.jsx)(u.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"data_obj ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" Data(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" text_key",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"text"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"# Field 1",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"{ ",props:{style:{color:"#C9D1D9"}}},{content:"# Field 2 (the actual dict)",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:' "text"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Hello world"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "name"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Charlie"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "age"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"28",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" default_value",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"" ',props:{style:{color:"#A5D6FF"}}},{content:"# Field 3",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:")",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.code,{children:"Data"})," objects can be serialized to JSON, created from JSON, or created from other dictionary data.\nHowever, the resulting ",(0,s.jsx)(t.code,{children:"Data"})," object is a structured object with validation and methods, not a plain dictionary."]}),"\n",(0,s.jsx)(t.p,{children:"For example, when serialized into JSON, the previous example becomes the following JSON object:"}),"\n",(0,s.jsx)(u.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text_key"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"text"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "data"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"User Profile"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Charlie Lastname"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "age"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"28",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "email"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"charlie.lastname@example.com"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "default_value"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'""',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]}),"\n",(0,s.jsx)(t.h2,{id:"dataframe",children:"DataFrame"}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"DataFrame"})," ports ",(0,s.jsx)(i.A,{name:"Circle",size:"16","aria-label":"Pink dataframe port",style:{color:"#ec4899",fill:"#ec4899"}})," accept or produce ",(0,s.jsx)(t.a,{href:"https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html",children:"pandas DataFrames"}),", which are similar to the tabular CSV data."]}),"\n",(0,s.jsxs)(t.p,{children:["Use the ",(0,s.jsx)(t.code,{children:"DataFrame"})," type to work with data containing multiple rows or records."]}),"\n",(0,s.jsx)(t.h3,{id:"schema-and-attributes-1",children:"Schema and attributes"}),"\n",(0,s.jsxs)(t.p,{children:["The schema is defined in ",(0,s.jsx)(t.a,{href:"https://github.com/langflow-ai/langflow/blob/main/src/backend/base/langflow/schema/dataframe.py",children:(0,s.jsx)(t.code,{children:"dataframe.py"})}),"."]}),"\n",(0,s.jsx)(t.p,{children:"The following attributes are available:"}),"\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.strong,{children:"Full pandas compatibility"}),": All pandas DataFrame methods and functionality are supported"]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Langflow integration"}),": Accepts lists of ",(0,s.jsxs)(t.a,{href:"#data",children:[(0,s.jsx)(t.code,{children:"Data"})," objects"]}),", dictionaries, or existing DataFrames."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Convenience methods"}),":"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.code,{children:"to_data_list()"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.code,{children:"add_row()"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.code,{children:"add_rows()"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.code,{children:"to_lc_documents()"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.code,{children:"to_data()"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.code,{children:"to_message()"})}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Text key support"}),": Maintains ",(0,s.jsx)(t.code,{children:"text_key"})," and ",(0,s.jsx)(t.code,{children:"default_value"})," attributes for ",(0,s.jsxs)(t.a,{href:"#data",children:[(0,s.jsx)(t.code,{children:"Data"})," object"]})," compatibility."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"dataframe-structure",children:"DataFrame structure"}),"\n",(0,s.jsx)(t.p,{children:"A DataFrame has a tabular data structure with rows and columns.\nKeys are columns, and each object in the array is a row."}),"\n",(0,s.jsx)(u.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"[",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Charlie Lastname"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "age"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"28",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "email"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"charlie.lastname@example.com"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Alexandra Example"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "age"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"34",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "email"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"alexandra@example.com"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]}),"\n",(0,s.jsx)(t.p,{children:"When represented as tabular data, the preceding DataFrame object is structured as follows:"}),"\n",(0,s.jsx)(u.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"| name | age | email |",props:{}}]},{tokens:[{content:"|------|-----|-------|",props:{}}]},{tokens:[{content:"| Charlie Lastname | 28 | charlie.lastname@example.com |",props:{}}]},{tokens:[{content:"| Alexandra Example | 34 | alexandra@example.com |",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsx)(t.h2,{id:"embeddings",children:"Embeddings"}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Embeddings"})," ports ",(0,s.jsx)(i.A,{name:"Circle",size:"16","aria-label":"Emerald embeddings port",style:{color:"#10b981",fill:"#10b981"}})," handle vector embeddings to support functions like similarity search."]}),"\n",(0,s.jsxs)(t.p,{children:["For example, the ",(0,s.jsx)(t.strong,{children:"Embedding Model"})," component outputs ",(0,s.jsx)(t.code,{children:"embeddings"})," data that you can connect to an ",(0,s.jsx)(t.strong,{children:"Embedding"})," input port on a vector store component."]}),"\n",(0,s.jsx)(t.h2,{id:"languagemodel",children:"LanguageModel"}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.code,{children:"LanguageModel"})," output is a specific type of output that can be produced by ",(0,s.jsx)(t.strong,{children:"Language Model"})," components.\nWhen enabled, the component's output port changes from a ",(0,s.jsx)(t.strong,{children:"Message"})," port to a ",(0,s.jsx)(t.strong,{children:"Language Model"})," port ",(0,s.jsx)(i.A,{name:"Circle",size:"16","aria-label":"Fuchsia language model port",style:{color:"#c026d3",fill:"#c026d3"}}),"\nFor more information, see ",(0,s.jsx)(t.a,{href:"/components-models#use-the-languagemodel-output",children:"Use the LanguageModel output"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"memory",children:"Memory"}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Memory"})," ports ",(0,s.jsx)(i.A,{name:"Circle",size:"16","aria-label":"Orange memory port",style:{color:"#f97316",fill:"#f97316"}})," are available for components that store or retrieve chat memory."]}),"\n",(0,s.jsx)(t.h2,{id:"message",children:"Message"}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Message"})," ports ",(0,s.jsx)(i.A,{name:"Circle",size:"16","aria-label":"Indigo message port",style:{color:"#4f46e5",fill:"#4f46e5"}})," accept or produce ",(0,s.jsx)(t.code,{children:"Message"})," data, which extends the ",(0,s.jsxs)(t.a,{href:"#data",children:[(0,s.jsx)(t.code,{children:"Data"})," type"]})," with additional fields and methods for text input typically used in chat flows."]}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"Message"})," data type provides a consistent structure for chat interactions, and it is ideal for flows like chatbots, conversational analysis, and other LLM input and output."]}),"\n",(0,s.jsx)(t.h3,{id:"schema-and-attributes-2",children:"Schema and attributes"}),"\n",(0,s.jsxs)(t.p,{children:["The schema is defined in ",(0,s.jsx)(t.a,{href:"https://github.com/langflow-ai/langflow/blob/main/src/backend/base/langflow/schema/message.py",children:(0,s.jsx)(t.code,{children:"message.py"})}),"."]}),"\n",(0,s.jsx)(t.p,{children:"The following attributes are available:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"text"}),": Main message content"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"sender"}),": ",(0,s.jsx)(t.code,{children:'"User"'})," or ",(0,s.jsx)(t.code,{children:'"AI"'})]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"sender_name"}),": Display name for sender"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"session_id"}),": Chat session identifier"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"timestamp"}),": UTC timestamp of the message"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"files"}),": List of file paths or images included with the message"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"content_blocks"}),": Handles rich content input, such as text, media, or code"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"category"}),": ",(0,s.jsx)(t.code,{children:'"message"'}),", ",(0,s.jsx)(t.code,{children:'"error"'}),", ",(0,s.jsx)(t.code,{children:'"warning"'}),", or ",(0,s.jsx)(t.code,{children:'"info"'}),"."]}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"message-structure",children:"Message structure"}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.code,{children:"Message"})," content appears in Langflow logs, GUI outputs, and the ",(0,s.jsx)(t.strong,{children:"Playground"})," as the ",(0,s.jsx)(t.code,{children:"text"})," string alone, but this text is actually extracted from the complete structured ",(0,s.jsx)(t.code,{children:"Message"})," object."]}),"\n",(0,s.jsxs)(t.p,{children:["For example, the output string ",(0,s.jsx)(t.code,{children:'"Name: Charlie Lastname, Age: 28, Email: charlie.lastname@example.com"'})," is extracted from the following ",(0,s.jsx)(t.code,{children:"Message"})," object:"]}),"\n",(0,s.jsx)(u.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Name: Charlie Lastname, Age: 28, Email: charlie.lastname@example.com"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"User"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Charlie Lastname"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "session_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"some-session-id"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timestamp"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2024-06-01T12:00:00Z"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "files"',props:{style:{color:"#7EE787"}}},{content:": [],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "content_blocks"',props:{style:{color:"#7EE787"}}},{content:": [],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "category"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"message"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]}),"\n",(0,s.jsx)(t.h3,{id:"text-io-components-dont-treat-message-data-as-conversations",children:"Text I/O components don't treat Message data as conversations"}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"/components-io#text-input",children:(0,s.jsx)(t.strong,{children:"Text Input"})})," and ",(0,s.jsx)(t.a,{href:"/components-io#text-output",children:(0,s.jsx)(t.strong,{children:"Text Output"})})," components have ",(0,s.jsx)(t.code,{children:"Message"})," ports, but they ",(0,s.jsx)(t.em,{children:"don't"})," support conversational chat in the same way as ",(0,s.jsx)(t.strong,{children:"Chat Input"})," components."]}),"\n",(0,s.jsxs)(t.p,{children:["When a ",(0,s.jsx)(t.strong,{children:"Text Input"})," component receives ",(0,s.jsx)(t.code,{children:"Message"})," data, the input isn't handled in the same way that it is when passed to a ",(0,s.jsx)(t.strong,{children:"Chat Input"})," component in a chat flow.\nInstead, the text is treated as a static string input, not as part of an ongoing conversation."]}),"\n",(0,s.jsxs)(t.p,{children:["The same is true for the ",(0,s.jsx)(t.strong,{children:"Text Output"})," component, which produces simple string output, rather than a response to a conversation."]}),"\n",(0,s.jsx)(t.h2,{id:"tool",children:"Tool"}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.strong,{children:"Tool"})," ports ",(0,s.jsx)(i.A,{name:"Circle",size:"16","aria-label":"Cyan tool port",style:{color:"#06b6d4",fill:"#06b6d4"}})," connect tools to an ",(0,s.jsx)(t.strong,{children:"Agent"})," component."]}),"\n",(0,s.jsxs)(t.p,{children:["Tools can be other components where you enabled ",(0,s.jsx)(t.strong,{children:"Tool Mode"})," or they can be the dedicated ",(0,s.jsx)(t.strong,{children:"MCP Tools"})," component."]}),"\n",(0,s.jsxs)(t.p,{children:["For more information, see ",(0,s.jsx)(t.a,{href:"/agents-tools",children:"Configure tools for agents"})," and ",(0,s.jsx)(t.a,{href:"/mcp-client",children:"Use Langflow as an MCP client"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"unknown-or-multiple-types",children:"Unknown or multiple types"}),"\n",(0,s.jsxs)(t.p,{children:["If a port can accept or produce multiple data types, it is represented by the gray port icon ",(0,s.jsx)(i.A,{name:"Circle",size:"16","aria-label":"Gray unknown port",style:{color:"#9CA3AF",fill:"#9CA3AF"}}),"."]}),"\n",(0,s.jsx)(t.p,{children:"Hover over the port to see the accepted or produced data types."}),"\n",(0,s.jsx)(t.h2,{id:"view-data-types-in-flows",children:"View data types in flows"}),"\n",(0,s.jsxs)(t.p,{children:["In Langflow, you can use ",(0,s.jsx)(i.A,{name:"TextSearch","aria-hidden":"True"})," ",(0,s.jsx)(t.strong,{children:"Inspect output"})," to view the output of individual components.\nThis can help you learn about the different data type and debug problems with invalid or malformed inputs and output."]}),"\n",(0,s.jsxs)(t.p,{children:["The following example shows how to inspect the output of a ",(0,s.jsx)(t.strong,{children:"Type Convert"})," component, which can convert ",(0,s.jsx)(t.code,{children:"Message"}),", ",(0,s.jsx)(t.code,{children:"Data"}),", or ",(0,s.jsx)(t.code,{children:"DataFrame"})," input into ",(0,s.jsx)(t.code,{children:"Message"}),", ",(0,s.jsx)(t.code,{children:"Data"}),", or ",(0,s.jsx)(t.code,{children:"DataFrame"})," output:"]}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Create a flow, and then connect a ",(0,s.jsx)(t.strong,{children:"Chat Input"})," component to a ",(0,s.jsx)(t.strong,{children:"Type Convert"})," component."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["In the ",(0,s.jsx)(t.strong,{children:"Chat Input"})," component, enter some text for the type converter to process."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["On the ",(0,s.jsx)(t.strong,{children:"Type Convert"})," component, click ",(0,s.jsx)(i.A,{name:"Play","aria-hidden":"true"})," ",(0,s.jsx)(t.strong,{children:"Run component"}),", and then click ",(0,s.jsx)(i.A,{name:"TextSearch","aria-hidden":"True"})," ",(0,s.jsx)(t.strong,{children:"Inspect output"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["The default output is ",(0,s.jsx)(t.code,{children:"Message"})," data, which is the same as the input coming from the ",(0,s.jsx)(t.strong,{children:"Chat Input"})," component.\nTo see the ",(0,s.jsx)(t.code,{children:"Message"})," data converted to ",(0,s.jsx)(t.code,{children:"Data"})," or ",(0,s.jsx)(t.code,{children:"DataFrame"}),", change the ",(0,s.jsx)(t.strong,{children:"Output Type"})," on the ",(0,s.jsx)(t.strong,{children:"Type Convert"})," component, and then rerun the component."]}),"\n",(0,s.jsxs)(c.A,{groupId:"Data type",children:[(0,s.jsx)(a.A,{value:"Message",label:"Message",default:!0,children:(0,s.jsx)(u.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Input text",props:{}}]}],lang:"text"},annotations:[]}]})}),(0,s.jsx)(a.A,{value:"Data",label:"Data",children:(0,s.jsx)(u.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timestamp"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-07-15 20:56:20 UTC"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"User"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"User"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "session_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"a0c7e888-4fd6-4242-b8c8-e761ad690aeb"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'""',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "files"',props:{style:{color:"#7EE787"}}},{content:": [],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "error"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "edit"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "properties"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text_color"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'""',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "background_color"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'""',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "edited"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "source"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "display_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "source"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "icon"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'""',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "allow_markdown"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "positive_feedback"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "state"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"complete"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "targets"',props:{style:{color:"#7EE787"}}},{content:": []",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "category"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"message"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "content_blocks"',props:{style:{color:"#7EE787"}}},{content:": [],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"9da72da2-efbb-4ccd-90ad-b32429b0418e"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"a0c7e888-4fd6-4242-b8c8-e761ad690aeb"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "duration"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})}),(0,s.jsx)(a.A,{value:"DataFrame",label:"DataFrame",children:(0,s.jsx)(u.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"| Field | Value |",props:{}}]},{tokens:[{content:"|-------|-------|",props:{}}]},{tokens:[{content:"| timestamp | 2025-07-15 20:56:11 UTC |",props:{}}]},{tokens:[{content:"| sender | User |",props:{}}]},{tokens:[{content:"| sender_name | User |",props:{}}]},{tokens:[{content:"| session_id | a0c7e888-4fd6-4242-b8c8-e761ad690aeb |",props:{}}]},{tokens:[{content:"| text | (empty) |",props:{}}]},{tokens:[{content:"| files | [] |",props:{}}]},{tokens:[{content:"| error | False |",props:{}}]},{tokens:[{content:"| edit | False |",props:{}}]},{tokens:[{content:"| properties | text_color: '', background_color: '', edited: False, source: {id: None, display_name: None, source: None}, icon: '', allow_markdown: False, positive_feedback: None, state: 'complete', targets: [] |",props:{}}]},{tokens:[{content:"| category | message |",props:{}}]},{tokens:[{content:"| content_blocks | [] |",props:{}}]},{tokens:[{content:"| id | 341686eb-7a39-4b80-a90a-d8bf267815ef |",props:{}}]},{tokens:[{content:"| flow_id | a0c7e888-4fd6-4242-b8c8-e761ad690aeb |",props:{}}]},{tokens:[{content:"| duration | (empty) |",props:{}}]}],lang:"text"},annotations:[]}]})})]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"see-also",children:"See also"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"/components-custom-components",children:"Custom Components"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"https://docs.pydantic.dev/latest/api/base_model/",children:"Pydantic Models"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html",children:"pandas.DataFrame"})}),"\n"]})]})}function D(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(x,{...e})}):x(e)}function g(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}}}]); \ No newline at end of file diff --git a/assets/js/47e58a89.a2ce610e.js b/assets/js/47e58a89.a2ce610e.js deleted file mode 100644 index a14c5fd7c1..0000000000 --- a/assets/js/47e58a89.a2ce610e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[1006],{33354:(e,o,n)=>{n.r(o),n.d(o,{CH:()=>d,assets:()=>l,chCodeConfig:()=>h,contentTitle:()=>c,default:()=>f,frontMatter:()=>i,metadata:()=>r,toc:()=>m});const r=JSON.parse('{"id":"Develop/memory","title":"Memory management options","description":"Langflow provides flexible memory management options for storage and retrieval.","source":"@site/docs/Develop/memory.mdx","sourceDirName":"Develop","slug":"/memory","permalink":"/memory","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Memory management options","slug":"/memory"},"sidebar":"docs","previous":{"title":"Install custom dependencies","permalink":"/install-custom-dependencies"},"next":{"title":"Session ID","permalink":"/session-id"}}');var t=n(74848),s=n(28453),a=n(24754);const i={title:"Memory management options",slug:"/memory"},c=void 0,l={},d={annotations:a.hk,Code:a.Cy},h={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},m=[{value:"Local Langflow database tables",id:"local-langflow-database-tables",level:2},{value:"Store messages in local memory",id:"store-messages-in-local-memory",level:2},{value:"Configure external memory",id:"configure-external-memory",level:2},{value:"Configure the external database connection",id:"configure-the-external-database-connection",level:2},{value:"Configure cache memory",id:"configure-cache-memory",level:2}];function g(e){const o={a:"a",code:"code",h2:"h2",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return d||u("CH",!1),d.Code||u("CH.Code",!0),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n",(0,t.jsx)(o.p,{children:"Langflow provides flexible memory management options for storage and retrieval."}),"\n",(0,t.jsx)(o.p,{children:"This page details the following memory configuration options in Langflow."}),"\n",(0,t.jsxs)(o.ul,{children:["\n",(0,t.jsx)(o.li,{children:(0,t.jsx)(o.a,{href:"#local-langflow-database-tables",children:"Local Langflow database tables"})}),"\n",(0,t.jsx)(o.li,{children:(0,t.jsx)(o.a,{href:"#store-messages-in-local-memory",children:"Store messages in local memory"})}),"\n",(0,t.jsx)(o.li,{children:(0,t.jsx)(o.a,{href:"#configure-external-memory",children:"Configure external memory"})}),"\n",(0,t.jsx)(o.li,{children:(0,t.jsx)(o.a,{href:"#configure-the-external-database-connection",children:"Configure the external database connection"})}),"\n",(0,t.jsx)(o.li,{children:(0,t.jsx)(o.a,{href:"#configure-cache-memory",children:"Configure cache memory"})}),"\n"]}),"\n",(0,t.jsx)(o.h2,{id:"local-langflow-database-tables",children:"Local Langflow database tables"}),"\n",(0,t.jsxs)(o.p,{children:["The default storage option in Langflow is a ",(0,t.jsx)(o.a,{href:"https://www.sqlite.org/",children:"SQLite"})," database stored in your system's cache directory:"]}),"\n",(0,t.jsxs)(o.ul,{children:["\n",(0,t.jsxs)(o.li,{children:["Linux/WSL: ",(0,t.jsx)(o.code,{children:"~/.cache/langflow/langflow.db"})]}),"\n",(0,t.jsxs)(o.li,{children:["macOS: ",(0,t.jsx)(o.code,{children:"/Users//Library/Caches/langflow/langflow.db"})]}),"\n",(0,t.jsxs)(o.li,{children:["Windows: ",(0,t.jsx)(o.code,{children:"%LOCALAPPDATA%\\langflow\\langflow\\Cache\\langflow.db"})]}),"\n"]}),"\n",(0,t.jsxs)(o.p,{children:["The following tables are stored in ",(0,t.jsx)(o.code,{children:"langflow.db"}),":"]}),"\n",(0,t.jsxs)(o.p,{children:["\u2022 ",(0,t.jsx)(o.strong,{children:"User"})," - Stores user account information including credentials, permissions, and profiles. For more information, see ",(0,t.jsx)(o.a,{href:"/configuration-authentication",children:"Authentication"}),"."]}),"\n",(0,t.jsxs)(o.p,{children:["\u2022 ",(0,t.jsx)(o.strong,{children:"Flow"})," - Contains flow configurations. For more information, see ",(0,t.jsx)(o.a,{href:"/concepts-flows",children:"Build flows"}),"."]}),"\n",(0,t.jsxs)(o.p,{children:["\u2022 ",(0,t.jsx)(o.strong,{children:"Message"})," - Stores chat messages and interactions that occur between components. For more information, see ",(0,t.jsx)(o.a,{href:"/concepts-objects#message-object",children:"Message objects"}),"."]}),"\n",(0,t.jsxs)(o.p,{children:["\u2022 ",(0,t.jsx)(o.strong,{children:"Transaction"})," - Records execution history and results of flow runs. This information is used for ",(0,t.jsx)(o.a,{href:"/logging",children:"logging"}),"."]}),"\n",(0,t.jsxs)(o.p,{children:["\u2022 ",(0,t.jsx)(o.strong,{children:"ApiKey"})," - Manages API authentication keys for users. For more information, see ",(0,t.jsx)(o.a,{href:"/configuration-api-keys",children:"API keys"}),"."]}),"\n",(0,t.jsxs)(o.p,{children:["\u2022 ",(0,t.jsx)(o.strong,{children:"Project"})," - Provides a structure for flow storage. For more information, see ",(0,t.jsx)(o.a,{href:"/concepts-flows#projects",children:"Projects"}),"."]}),"\n",(0,t.jsxs)(o.p,{children:["\u2022 ",(0,t.jsx)(o.strong,{children:"Variables"})," - Stores global encrypted values and credentials. For more information, see ",(0,t.jsx)(o.a,{href:"/configuration-global-variables",children:"Global variables"}),"."]}),"\n",(0,t.jsxs)(o.p,{children:["\u2022 ",(0,t.jsx)(o.strong,{children:"VertexBuild"})," - Tracks the build status of individual nodes within flows. For more information, see ",(0,t.jsx)(o.a,{href:"/concepts-playground",children:"Run a flow in the Playground"}),"."]}),"\n",(0,t.jsxs)(o.p,{children:["For more information, see the database models in the ",(0,t.jsx)(o.a,{href:"https://github.com/langflow-ai/langflow/tree/main/src/backend/base/langflow/services/database/models",children:"source code"}),"."]}),"\n",(0,t.jsx)(o.h2,{id:"store-messages-in-local-memory",children:"Store messages in local memory"}),"\n",(0,t.jsxs)(o.p,{children:["To store and retrieve messages in local Langflow memory, add a ",(0,t.jsx)(o.a,{href:"/components-helpers#message-history",children:"Message history"})," component to your flow."]}),"\n",(0,t.jsxs)(o.p,{children:["To store or retrieve chat messages from external memory, connect the ",(0,t.jsx)(o.strong,{children:"External memory"})," port of the ",(0,t.jsx)(o.strong,{children:"Message history"})," component to a ",(0,t.jsx)(o.strong,{children:"Memory"})," component.\nAn example flow looks like this:"]}),"\n",(0,t.jsx)(o.p,{children:(0,t.jsx)(o.img,{alt:"Sample Flow storing Chat Memory in Redit",src:n(96841).A+"",width:"4000",height:"1768"})}),"\n",(0,t.jsx)(o.p,{children:"If external storage is connected to a memory helper component, no chat messages are stored in local Langflow memory."}),"\n",(0,t.jsxs)(o.p,{children:["For an example of using local chat memory, see the ",(0,t.jsx)(o.a,{href:"/memory-chatbot",children:"Memory chatbot"})," starter flow."]}),"\n",(0,t.jsx)(o.h2,{id:"configure-external-memory",children:"Configure external memory"}),"\n",(0,t.jsxs)(o.p,{children:["To replace the default Langflow SQLite database with another database, modify the ",(0,t.jsx)(o.code,{children:"LANGFLOW_DATABASE_URL"})," and start Langflow with this value."]}),"\n",(0,t.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"LANGFLOW_DATABASE_URL=postgresql://user:password@localhost:5432/langflow",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,t.jsxs)(o.p,{children:["For an example, see ",(0,t.jsx)(o.a,{href:"/configuration-custom-database",children:"Configure an external PostgreSQL database"}),"."]}),"\n",(0,t.jsx)(o.h2,{id:"configure-the-external-database-connection",children:"Configure the external database connection"}),"\n",(0,t.jsx)(o.p,{children:"The following settings allow you to fine-tune your database connection pool and timeout settings:"}),"\n",(0,t.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:'LANGFLOW_DB_CONNECTION_SETTINGS=\'{"pool_size": 20, "max_overflow": 30, "pool_timeout": 30, "pool_pre_ping": true, "pool_recycle": 1800, "echo": false}\'',props:{}}]},{tokens:[{content:"LANGFLOW_DB_CONNECT_TIMEOUT=20",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,t.jsxs)(o.ul,{children:["\n",(0,t.jsxs)(o.li,{children:[(0,t.jsx)(o.code,{children:"pool_size"}),": Maximum number of database connections to keep in the pool (default: 20)"]}),"\n",(0,t.jsxs)(o.li,{children:[(0,t.jsx)(o.code,{children:"max_overflow"}),": Maximum number of connections that can be created beyond the pool_size (default: 30)"]}),"\n",(0,t.jsxs)(o.li,{children:[(0,t.jsx)(o.code,{children:"pool_timeout"}),": Number of seconds to wait before timing out on getting a connection from the pool (default: 30)"]}),"\n",(0,t.jsxs)(o.li,{children:[(0,t.jsx)(o.code,{children:"pool_pre_ping"}),": If true, the pool tests connections for liveness upon each checkout (default: true)"]}),"\n",(0,t.jsxs)(o.li,{children:[(0,t.jsx)(o.code,{children:"pool_recycle"}),": Number of seconds after which a connection is automatically recycled (default: 1800, or 30 minutes)"]}),"\n",(0,t.jsxs)(o.li,{children:[(0,t.jsx)(o.code,{children:"echo"}),": If true, SQL queries are logged for debugging purposes (default: false)"]}),"\n",(0,t.jsxs)(o.li,{children:[(0,t.jsx)(o.code,{children:"LANGFLOW_DB_CONNECT_TIMEOUT"}),": Maximum number of seconds to wait when establishing a new database connection (default: 20)"]}),"\n"]}),"\n",(0,t.jsx)(o.h2,{id:"configure-cache-memory",children:"Configure cache memory"}),"\n",(0,t.jsx)(o.p,{children:"The default Langflow caching behavior is an asynchronous, in-memory cache."}),"\n",(0,t.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"LANGFLOW_LANGCHAIN_CACHE=InMemoryCache",props:{}}]},{tokens:[{content:"LANGFLOW_CACHE_TYPE=Async",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,t.jsx)(o.p,{children:"Alternative caching options can be configured, but options other than the default asynchronous, in-memory cache are not supported.\nThe default behavior is suitable for most use cases."})]})}function f(e={}){const{wrapper:o}={...(0,s.R)(),...e.components};return o?(0,t.jsx)(o,{...e,children:(0,t.jsx)(g,{...e})}):g(e)}function u(e,o){throw new Error("Expected "+(o?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},96841:(e,o,n)=>{n.d(o,{A:()=>r});const r=n.p+"assets/images/component-message-history-external-memory-7e32402d0b6e819f5539adfbfbd3620f.png"}}]); \ No newline at end of file diff --git a/assets/js/47e58a89.dabdb5a5.js b/assets/js/47e58a89.dabdb5a5.js new file mode 100644 index 0000000000..8a01a2bdc9 --- /dev/null +++ b/assets/js/47e58a89.dabdb5a5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[1006],{33354:(e,o,n)=>{n.r(o),n.d(o,{CH:()=>d,assets:()=>c,chCodeConfig:()=>h,contentTitle:()=>l,default:()=>f,frontMatter:()=>i,metadata:()=>r,toc:()=>m});const r=JSON.parse('{"id":"Develop/memory","title":"Memory management options","description":"Langflow provides flexible memory management options for storage and retrieval.","source":"@site/docs/Develop/memory.mdx","sourceDirName":"Develop","slug":"/memory","permalink":"/memory","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Memory management options","slug":"/memory"},"sidebar":"docs","previous":{"title":"Install custom dependencies","permalink":"/install-custom-dependencies"},"next":{"title":"Session ID","permalink":"/session-id"}}');var t=n(74848),s=n(28453),a=n(24754);const i={title:"Memory management options",slug:"/memory"},l=void 0,c={},d={annotations:a.hk,Code:a.Cy},h={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},m=[{value:"Local Langflow database tables",id:"local-langflow-database-tables",level:2},{value:"Store messages in local memory",id:"store-messages-in-local-memory",level:2},{value:"Configure external memory",id:"configure-external-memory",level:2},{value:"Configure the external database connection",id:"configure-the-external-database-connection",level:2},{value:"Configure cache memory",id:"configure-cache-memory",level:2}];function g(e){const o={a:"a",code:"code",h2:"h2",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return d||u("CH",!1),d.Code||u("CH.Code",!0),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n",(0,t.jsx)(o.p,{children:"Langflow provides flexible memory management options for storage and retrieval."}),"\n",(0,t.jsx)(o.p,{children:"This page details the following memory configuration options in Langflow."}),"\n",(0,t.jsxs)(o.ul,{children:["\n",(0,t.jsx)(o.li,{children:(0,t.jsx)(o.a,{href:"#local-langflow-database-tables",children:"Local Langflow database tables"})}),"\n",(0,t.jsx)(o.li,{children:(0,t.jsx)(o.a,{href:"#store-messages-in-local-memory",children:"Store messages in local memory"})}),"\n",(0,t.jsx)(o.li,{children:(0,t.jsx)(o.a,{href:"#configure-external-memory",children:"Configure external memory"})}),"\n",(0,t.jsx)(o.li,{children:(0,t.jsx)(o.a,{href:"#configure-the-external-database-connection",children:"Configure the external database connection"})}),"\n",(0,t.jsx)(o.li,{children:(0,t.jsx)(o.a,{href:"#configure-cache-memory",children:"Configure cache memory"})}),"\n"]}),"\n",(0,t.jsx)(o.h2,{id:"local-langflow-database-tables",children:"Local Langflow database tables"}),"\n",(0,t.jsxs)(o.p,{children:["The default storage option in Langflow is a ",(0,t.jsx)(o.a,{href:"https://www.sqlite.org/",children:"SQLite"})," database stored in your system's cache directory:"]}),"\n",(0,t.jsxs)(o.ul,{children:["\n",(0,t.jsxs)(o.li,{children:["Linux/WSL: ",(0,t.jsx)(o.code,{children:"~/.cache/langflow/langflow.db"})]}),"\n",(0,t.jsxs)(o.li,{children:["macOS: ",(0,t.jsx)(o.code,{children:"/Users//Library/Caches/langflow/langflow.db"})]}),"\n",(0,t.jsxs)(o.li,{children:["Windows: ",(0,t.jsx)(o.code,{children:"%LOCALAPPDATA%\\langflow\\langflow\\Cache\\langflow.db"})]}),"\n"]}),"\n",(0,t.jsxs)(o.p,{children:["The following tables are stored in ",(0,t.jsx)(o.code,{children:"langflow.db"}),":"]}),"\n",(0,t.jsxs)(o.p,{children:["\u2022 ",(0,t.jsx)(o.strong,{children:"User"})," - Stores user account information including credentials, permissions, and profiles. For more information, see ",(0,t.jsx)(o.a,{href:"/configuration-authentication",children:"Authentication"}),"."]}),"\n",(0,t.jsxs)(o.p,{children:["\u2022 ",(0,t.jsx)(o.strong,{children:"Flow"})," - Contains flow configurations. For more information, see ",(0,t.jsx)(o.a,{href:"/concepts-flows",children:"Build flows"}),"."]}),"\n",(0,t.jsxs)(o.p,{children:["\u2022 ",(0,t.jsx)(o.strong,{children:"Message"})," - Stores chat messages and interactions that occur between components. For more information, see ",(0,t.jsx)(o.a,{href:"/data-types#message",children:"Message objects"}),"."]}),"\n",(0,t.jsxs)(o.p,{children:["\u2022 ",(0,t.jsx)(o.strong,{children:"Transaction"})," - Records execution history and results of flow runs. This information is used for ",(0,t.jsx)(o.a,{href:"/logging",children:"logging"}),"."]}),"\n",(0,t.jsxs)(o.p,{children:["\u2022 ",(0,t.jsx)(o.strong,{children:"ApiKey"})," - Manages API authentication keys for users. For more information, see ",(0,t.jsx)(o.a,{href:"/configuration-api-keys",children:"API keys"}),"."]}),"\n",(0,t.jsxs)(o.p,{children:["\u2022 ",(0,t.jsx)(o.strong,{children:"Project"})," - Provides a structure for flow storage. For more information, see ",(0,t.jsx)(o.a,{href:"/concepts-flows#projects",children:"Projects"}),"."]}),"\n",(0,t.jsxs)(o.p,{children:["\u2022 ",(0,t.jsx)(o.strong,{children:"Variables"})," - Stores global encrypted values and credentials. For more information, see ",(0,t.jsx)(o.a,{href:"/configuration-global-variables",children:"Global variables"}),"."]}),"\n",(0,t.jsxs)(o.p,{children:["\u2022 ",(0,t.jsx)(o.strong,{children:"VertexBuild"})," - Tracks the build status of individual nodes within flows. For more information, see ",(0,t.jsx)(o.a,{href:"/concepts-playground",children:"Run a flow in the Playground"}),"."]}),"\n",(0,t.jsxs)(o.p,{children:["For more information, see the database models in the ",(0,t.jsx)(o.a,{href:"https://github.com/langflow-ai/langflow/tree/main/src/backend/base/langflow/services/database/models",children:"source code"}),"."]}),"\n",(0,t.jsx)(o.h2,{id:"store-messages-in-local-memory",children:"Store messages in local memory"}),"\n",(0,t.jsxs)(o.p,{children:["To store and retrieve messages in local Langflow memory, add a ",(0,t.jsx)(o.a,{href:"/components-helpers#message-history",children:"Message history"})," component to your flow."]}),"\n",(0,t.jsxs)(o.p,{children:["To store or retrieve chat messages from external memory, connect the ",(0,t.jsx)(o.strong,{children:"External memory"})," port of the ",(0,t.jsx)(o.strong,{children:"Message history"})," component to a ",(0,t.jsx)(o.strong,{children:"Memory"})," component.\nAn example flow looks like this:"]}),"\n",(0,t.jsx)(o.p,{children:(0,t.jsx)(o.img,{alt:"Sample Flow storing Chat Memory in Redit",src:n(96841).A+"",width:"4000",height:"1768"})}),"\n",(0,t.jsx)(o.p,{children:"If external storage is connected to a memory helper component, no chat messages are stored in local Langflow memory."}),"\n",(0,t.jsxs)(o.p,{children:["For an example of using local chat memory, see the ",(0,t.jsx)(o.a,{href:"/memory-chatbot",children:"Memory chatbot"})," starter flow."]}),"\n",(0,t.jsx)(o.h2,{id:"configure-external-memory",children:"Configure external memory"}),"\n",(0,t.jsxs)(o.p,{children:["To replace the default Langflow SQLite database with another database, modify the ",(0,t.jsx)(o.code,{children:"LANGFLOW_DATABASE_URL"})," and start Langflow with this value."]}),"\n",(0,t.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"LANGFLOW_DATABASE_URL=postgresql://user:password@localhost:5432/langflow",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,t.jsxs)(o.p,{children:["For an example, see ",(0,t.jsx)(o.a,{href:"/configuration-custom-database",children:"Configure an external PostgreSQL database"}),"."]}),"\n",(0,t.jsx)(o.h2,{id:"configure-the-external-database-connection",children:"Configure the external database connection"}),"\n",(0,t.jsx)(o.p,{children:"The following settings allow you to fine-tune your database connection pool and timeout settings:"}),"\n",(0,t.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:'LANGFLOW_DB_CONNECTION_SETTINGS=\'{"pool_size": 20, "max_overflow": 30, "pool_timeout": 30, "pool_pre_ping": true, "pool_recycle": 1800, "echo": false}\'',props:{}}]},{tokens:[{content:"LANGFLOW_DB_CONNECT_TIMEOUT=20",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,t.jsxs)(o.ul,{children:["\n",(0,t.jsxs)(o.li,{children:[(0,t.jsx)(o.code,{children:"pool_size"}),": Maximum number of database connections to keep in the pool (default: 20)"]}),"\n",(0,t.jsxs)(o.li,{children:[(0,t.jsx)(o.code,{children:"max_overflow"}),": Maximum number of connections that can be created beyond the pool_size (default: 30)"]}),"\n",(0,t.jsxs)(o.li,{children:[(0,t.jsx)(o.code,{children:"pool_timeout"}),": Number of seconds to wait before timing out on getting a connection from the pool (default: 30)"]}),"\n",(0,t.jsxs)(o.li,{children:[(0,t.jsx)(o.code,{children:"pool_pre_ping"}),": If true, the pool tests connections for liveness upon each checkout (default: true)"]}),"\n",(0,t.jsxs)(o.li,{children:[(0,t.jsx)(o.code,{children:"pool_recycle"}),": Number of seconds after which a connection is automatically recycled (default: 1800, or 30 minutes)"]}),"\n",(0,t.jsxs)(o.li,{children:[(0,t.jsx)(o.code,{children:"echo"}),": If true, SQL queries are logged for debugging purposes (default: false)"]}),"\n",(0,t.jsxs)(o.li,{children:[(0,t.jsx)(o.code,{children:"LANGFLOW_DB_CONNECT_TIMEOUT"}),": Maximum number of seconds to wait when establishing a new database connection (default: 20)"]}),"\n"]}),"\n",(0,t.jsx)(o.h2,{id:"configure-cache-memory",children:"Configure cache memory"}),"\n",(0,t.jsx)(o.p,{children:"The default Langflow caching behavior is an asynchronous, in-memory cache."}),"\n",(0,t.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"LANGFLOW_LANGCHAIN_CACHE=InMemoryCache",props:{}}]},{tokens:[{content:"LANGFLOW_CACHE_TYPE=Async",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,t.jsx)(o.p,{children:"Alternative caching options can be configured, but options other than the default asynchronous, in-memory cache are not supported.\nThe default behavior is suitable for most use cases."})]})}function f(e={}){const{wrapper:o}={...(0,s.R)(),...e.components};return o?(0,t.jsx)(o,{...e,children:(0,t.jsx)(g,{...e})}):g(e)}function u(e,o){throw new Error("Expected "+(o?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},96841:(e,o,n)=>{n.d(o,{A:()=>r});const r=n.p+"assets/images/component-message-history-external-memory-7e32402d0b6e819f5539adfbfbd3620f.png"}}]); \ No newline at end of file diff --git a/assets/js/4a8d85c6.f9349d6b.js b/assets/js/4a8d85c6.f9349d6b.js deleted file mode 100644 index 9c9ca2a4b3..0000000000 --- a/assets/js/4a8d85c6.f9349d6b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[24],{6364:(o,t,e)=>{e.r(t),e.d(t,{CH:()=>i,assets:()=>a,chCodeConfig:()=>d,contentTitle:()=>p,default:()=>F,frontMatter:()=>l,metadata:()=>n,toc:()=>y});const n=JSON.parse('{"id":"Concepts/concepts-objects","title":"Langflow objects","description":"In Langflow, objects are Pydantic models that serve as structured, functional representations of data.","source":"@site/docs/Concepts/concepts-objects.mdx","sourceDirName":"Concepts","slug":"/concepts-objects","permalink":"/concepts-objects","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Langflow objects","slug":"/concepts-objects"},"sidebar":"docs","previous":{"title":"Use voice mode","permalink":"/concepts-voice-mode"},"next":{"title":"Manage files","permalink":"/concepts-file-management"}}');var s=e(74848),c=e(28453),r=e(24754);const l={title:"Langflow objects",slug:"/concepts-objects"},p=void 0,a={},i={annotations:r.hk,Code:r.Cy},d={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},y=[{value:"Data object",id:"data-object",level:2},{value:"Create a Data Object",id:"create-a-data-object",level:3},{value:"Message object",id:"message-object",level:2},{value:"Create a Message object",id:"create-a-message-object",level:3},{value:"ContentBlock object",id:"contentblock-object",level:2},{value:"Create a ContentBlock object",id:"create-a-contentblock-object",level:3},{value:"Add ContentBlocks objects to a message",id:"add-contentblocks-objects-to-a-message",level:3},{value:"DataFrame object",id:"dataframe-object",level:2},{value:"Create a DataFrame object",id:"create-a-dataframe-object",level:3},{value:"See also",id:"see-also",level:2}];function D(o){const t={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...(0,c.R)(),...o.components};return i||h("CH",!1),i.Code||h("CH.Code",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n",(0,s.jsxs)(t.p,{children:["In Langflow, objects are ",(0,s.jsx)(t.a,{href:"https://docs.pydantic.dev/latest/api/base_model/",children:"Pydantic"})," models that serve as structured, functional representations of data."]}),"\n",(0,s.jsx)(t.h2,{id:"data-object",children:"Data object"}),"\n",(0,s.jsxs)(t.p,{children:["The\xa0",(0,s.jsx)(t.code,{children:"Data"}),"\xa0object is a ",(0,s.jsx)(t.a,{href:"https://docs.pydantic.dev/latest/api/base_model/",children:"Pydantic"})," model that serves as a container for storing and manipulating data. It carries\xa0",(0,s.jsx)(t.code,{children:"data"}),"\u2014a dictionary that can be accessed as attributes\u2014and uses\xa0",(0,s.jsx)(t.code,{children:"text_key"}),"\xa0to specify which key in the dictionary should be considered the primary text content."]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.strong,{children:"Main Attributes:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"text_key"}),": Specifies the key to retrieve the primary text data."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"data"}),": A dictionary to store additional data."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"default_value"}),": default value when the\xa0",(0,s.jsx)(t.code,{children:"text_key"}),"\xa0is not present in the\xa0",(0,s.jsx)(t.code,{children:"data"}),"\xa0dictionary."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"create-a-data-object",children:"Create a Data Object"}),"\n",(0,s.jsxs)(t.p,{children:["Create a\xa0",(0,s.jsx)(t.code,{children:"Data"}),"\xa0object by directly assigning key-value pairs to it. For example:"]}),"\n",(0,s.jsx)(i.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.schema ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Data",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# Creating a Data object with specified key-value pairs",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"data ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" Data(",props:{style:{color:"#C9D1D9"}}},{content:"text",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"my_string"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"bar",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"3",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"foo",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"another_string"',props:{style:{color:"#A5D6FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# Outputs:",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"print",props:{style:{color:"#79C0FF"}}},{content:"(data.text) ",props:{style:{color:"#C9D1D9"}}},{content:'# Outputs: "my_string"',props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"print",props:{style:{color:"#79C0FF"}}},{content:"(data.bar) ",props:{style:{color:"#C9D1D9"}}},{content:"# Outputs: 3",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"print",props:{style:{color:"#79C0FF"}}},{content:"(data.foo) ",props:{style:{color:"#C9D1D9"}}},{content:'# Outputs: "another_string"',props:{style:{color:"#8B949E"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsxs)(t.p,{children:["The\xa0",(0,s.jsx)(t.code,{children:"text_key"}),"\xa0specifies which key in the\xa0",(0,s.jsx)(t.code,{children:"data"}),"\xa0dictionary should be considered the primary text content. The\xa0",(0,s.jsx)(t.code,{children:"default_value"}),"\xa0provides a fallback if the\xa0",(0,s.jsx)(t.code,{children:"text_key"}),"\xa0is not present."]}),"\n",(0,s.jsx)(i.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"# Creating a Data object with a specific text_key and default_value",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"data ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" Data(",props:{style:{color:"#C9D1D9"}}},{content:"data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"{",props:{style:{color:"#C9D1D9"}}},{content:'"title"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Hello, World!"',props:{style:{color:"#A5D6FF"}}},{content:"}, ",props:{style:{color:"#C9D1D9"}}},{content:"text_key",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"content"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"default_value",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"No content available"',props:{style:{color:"#A5D6FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# Accessing the primary text using text_key and default_value",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"print",props:{style:{color:"#79C0FF"}}},{content:"(data.get_text()) ",props:{style:{color:"#C9D1D9"}}},{content:'# Outputs: "No content available" because "content" key is not in the data dictionary',props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# Accessing data keys by calling the attribute directly",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"print",props:{style:{color:"#79C0FF"}}},{content:"(data.title) ",props:{style:{color:"#C9D1D9"}}},{content:'# Outputs: "Hello, World!" because "title" key is in the data dictionary',props:{style:{color:"#8B949E"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"Data"})," object is also convenient for visualization of outputs, since the output preview has visual elements to inspect data as a table and its cells as pop ups for basic types. The idea is to create a unified way to work and visualize complex information in Langflow."]}),"\n",(0,s.jsxs)(t.p,{children:["To receive ",(0,s.jsx)(t.code,{children:"Data"})," objects in a component input, use the ",(0,s.jsx)(t.code,{children:"DataInput"})," input type."]}),"\n",(0,s.jsx)(i.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"inputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" DataInput(",props:{style:{color:"#C9D1D9"}}},{content:"name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"data"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Data"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"info",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Helpful info about the incoming data object."',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"is_list",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"True",props:{style:{color:"#79C0FF"}}},{content:"),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(t.h2,{id:"message-object",children:"Message object"}),"\n",(0,s.jsxs)(t.p,{children:["The\xa0",(0,s.jsx)(t.code,{children:"Message"}),"\xa0object extends the functionality of\xa0",(0,s.jsx)(t.code,{children:"Data"}),"\xa0and includes additional attributes and methods for chat interactions."]}),"\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.strong,{children:"Core message data:"})}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"text"}),": The main text content of the message"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"sender"}),': Identifier for the sender ("User" or "AI")']}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"sender_name"}),": Name of the sender"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"session_id"}),": Identifier for the chat session (",(0,s.jsx)(t.code,{children:"string"})," or ",(0,s.jsx)(t.code,{children:"UUID"}),")"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"timestamp"}),": Timestamp when the message was created (UTC)"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"flow_id"}),": Identifier for the flow (",(0,s.jsx)(t.code,{children:"string"})," or ",(0,s.jsx)(t.code,{children:"UUID"}),")"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"id"}),": Unique identifier for the message"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Content and files:"})}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"files"}),": List of files or images associated with the message"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"content_blocks"}),": List of structured content block objects"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"properties"}),": Additional properties including visual styling and source information"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.strong,{children:"Message state:"})}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"error"}),": Boolean indicating if there was an error"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"edit"}),": Boolean indicating if the message was edited"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"category"}),': Message category ("message", "error", "warning", "info")']}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["The\xa0",(0,s.jsx)(t.code,{children:"Message"}),"\xa0object can be used to send, store, and manipulate chat messages within Langflow."]}),"\n",(0,s.jsx)(t.h3,{id:"create-a-message-object",children:"Create a Message object"}),"\n",(0,s.jsxs)(t.p,{children:["You can create a\xa0",(0,s.jsx)(t.code,{children:"Message"}),"\xa0object by directly assigning key-value pairs to it. For example:"]}),"\n",(0,s.jsx)(i.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.schema.message ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Message",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"message ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" Message(",props:{style:{color:"#C9D1D9"}}},{content:"text",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Hello, AI!"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"sender",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"User"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"sender_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"John Doe"',props:{style:{color:"#A5D6FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsxs)(t.p,{children:["To receive ",(0,s.jsx)(t.code,{children:"Message"})," objects in a component input, you can use the ",(0,s.jsx)(t.code,{children:"MessageInput"})," input type or ",(0,s.jsx)(t.code,{children:"MessageTextInput"})," when the goal is to extract just the ",(0,s.jsx)(t.code,{children:"text"})," field of the ",(0,s.jsx)(t.code,{children:"Message"})," object."]}),"\n",(0,s.jsx)(t.h2,{id:"contentblock-object",children:"ContentBlock object"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"ContentBlock"})," object is a list of multiple ",(0,s.jsx)(t.code,{children:"ContentTypes"}),". It allows you to include multiple types of content within a single ",(0,s.jsx)(t.code,{children:"Message"}),", including images, videos, and text."]}),"\n",(0,s.jsxs)(t.p,{children:["Content types are Pydantic base classes constructed from the types in ",(0,s.jsx)(t.a,{href:"https://github.com/langflow-ai/langflow/blob/main/src/backend/base/langflow/schema/content_types.py",children:"content_types.py"}),"."]}),"\n",(0,s.jsx)(t.p,{children:"Each content type has specific fields related to its data type. For example:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"TextContent"})," has a ",(0,s.jsx)(t.code,{children:"text"})," field for storing strings of text"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"MediaContent"})," has a ",(0,s.jsx)(t.code,{children:"urls"})," field for storing media file URLs"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"CodeContent"})," has ",(0,s.jsx)(t.code,{children:"code"})," and ",(0,s.jsx)(t.code,{children:"language"})," fields for code snippets"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"JSONContent"})," has a ",(0,s.jsx)(t.code,{children:"data"})," field for storing arbitrary JSON data"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"ToolContent"})," has a ",(0,s.jsx)(t.code,{children:"tool_input"})," field for storing input parameters for the tool"]}),"\n"]}),"\n",(0,s.jsx)(t.h3,{id:"create-a-contentblock-object",children:"Create a ContentBlock object"}),"\n",(0,s.jsxs)(t.p,{children:["Create a ",(0,s.jsx)(t.code,{children:"ContentBlock"})," object with a list of different content types."]}),"\n",(0,s.jsx)(i.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"content_block ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" ContentBlock(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" title",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Mixed Content Example"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" contents",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"[",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" TextContent(",props:{style:{color:"#C9D1D9"}}},{content:"text",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"This is a text content"',props:{style:{color:"#A5D6FF"}}},{content:"),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" MediaContent(",props:{style:{color:"#C9D1D9"}}},{content:"urls",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"[",props:{style:{color:"#C9D1D9"}}},{content:'"http://example.com/image.jpg"',props:{style:{color:"#A5D6FF"}}},{content:"]),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" JSONContent(",props:{style:{color:"#C9D1D9"}}},{content:"data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"{",props:{style:{color:"#C9D1D9"}}},{content:'"key"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"value"',props:{style:{color:"#A5D6FF"}}},{content:"}),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" CodeContent(",props:{style:{color:"#C9D1D9"}}},{content:"code",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"\"print('Hello')\"",props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"language",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"python"',props:{style:{color:"#A5D6FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" media_url",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"[",props:{style:{color:"#C9D1D9"}}},{content:'"http://example.com/additional_image.jpg"',props:{style:{color:"#A5D6FF"}}},{content:"]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:")",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(t.h3,{id:"add-contentblocks-objects-to-a-message",children:"Add ContentBlocks objects to a message"}),"\n",(0,s.jsxs)(t.p,{children:["In this example, a text and a media ",(0,s.jsx)(t.code,{children:"ContentBlock"})," are added to a message."]}),"\n",(0,s.jsx)(i.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.schema.message ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Message",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.schema.content_block ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" ContentBlock",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.schema.content_types ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" TextContent, MediaContent",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"message ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" Message(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" text",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Main message text"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" sender",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"User"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" sender_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"John Doe"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" content_blocks",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"[",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ContentBlock(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" title",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Text Block"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" contents",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"[",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" TextContent(",props:{style:{color:"#C9D1D9"}}},{content:"type",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"text"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"text",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"This is some text content"',props:{style:{color:"#A5D6FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ContentBlock(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" title",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Media Block"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" contents",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"[",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" MediaContent(",props:{style:{color:"#C9D1D9"}}},{content:"type",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"media"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"urls",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"[",props:{style:{color:"#C9D1D9"}}},{content:'"http://example.com/image.jpg"',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"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(t.h2,{id:"dataframe-object",children:"DataFrame object"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"DataFrame"})," class is a custom extension of the Pandas ",(0,s.jsx)(t.a,{href:"https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html",children:"DataFrame"})," class, specifically designed to work seamlessly with Langflow's ",(0,s.jsx)(t.code,{children:"Data"})," objects. The class includes methods for converting between ",(0,s.jsx)(t.code,{children:"DataFrame"})," and lists of ",(0,s.jsx)(t.code,{children:"Data"})," objects."]}),"\n",(0,s.jsxs)(t.p,{children:["A ",(0,s.jsx)(t.code,{children:"DataFrame"})," object accepts various input formats, including lists of ",(0,s.jsx)(t.code,{children:"Data"})," objects, dictionaries, and existing ",(0,s.jsx)(t.code,{children:"DataFrames"}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"create-a-dataframe-object",children:"Create a DataFrame object"}),"\n",(0,s.jsx)(t.p,{children:"You can create a DataFrame object using different data formats:"}),"\n",(0,s.jsx)(i.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.schema ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Data",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.schema.data ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" DataFrame",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# From a list of Data objects",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"data_list ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [Data(",props:{style:{color:"#C9D1D9"}}},{content:"data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"{",props:{style:{color:"#C9D1D9"}}},{content:'"name"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"John"',props:{style:{color:"#A5D6FF"}}},{content:"}), Data(",props:{style:{color:"#C9D1D9"}}},{content:"data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"{",props:{style:{color:"#C9D1D9"}}},{content:'"name"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Jane"',props:{style:{color:"#A5D6FF"}}},{content:"})]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"df ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" DataFrame(data_list)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# From a list of dictionaries",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"dict_list ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [{",props:{style:{color:"#C9D1D9"}}},{content:'"name"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"John"',props:{style:{color:"#A5D6FF"}}},{content:"}, {",props:{style:{color:"#C9D1D9"}}},{content:'"name"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Jane"',props:{style:{color:"#A5D6FF"}}},{content:"}]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"df ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" DataFrame(dict_list)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# From a dictionary of lists",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"data_dict ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}},{content:'"name"',props:{style:{color:"#A5D6FF"}}},{content:": [",props:{style:{color:"#C9D1D9"}}},{content:'"John"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"Jane"',props:{style:{color:"#A5D6FF"}}},{content:"], ",props:{style:{color:"#C9D1D9"}}},{content:'"age"',props:{style:{color:"#A5D6FF"}}},{content:": [",props:{style:{color:"#C9D1D9"}}},{content:"30",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"25",props:{style:{color:"#79C0FF"}}},{content:"]}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"df ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" DataFrame(data_dict)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"Key Methods",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"to_data_list(): Converts the DataFrame back to a ",props:{style:{color:"#C9D1D9"}}},{content:"list",props:{style:{color:"#79C0FF"}}},{content:" of Data objects.",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"add_row(data): Adds a single row (either a Data ",props:{style:{color:"#C9D1D9"}}},{content:"object ",props:{style:{color:"#79C0FF"}}},{content:"or",props:{style:{color:"#FF7B72"}}},{content:" a dictionary) to the DataFrame.",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"add_rows(data): Adds multiple rows (",props:{style:{color:"#C9D1D9"}}},{content:"list",props:{style:{color:"#79C0FF"}}},{content:" of Data objects ",props:{style:{color:"#C9D1D9"}}},{content:"or",props:{style:{color:"#FF7B72"}}},{content:" dictionaries) to the DataFrame.",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"Usage Example",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"python",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# Create a DataFrame",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"df ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" DataFrame([Data(",props:{style:{color:"#C9D1D9"}}},{content:"data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"{",props:{style:{color:"#C9D1D9"}}},{content:'"name"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"John"',props:{style:{color:"#A5D6FF"}}},{content:"}), Data(",props:{style:{color:"#C9D1D9"}}},{content:"data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"{",props:{style:{color:"#C9D1D9"}}},{content:'"name"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Jane"',props:{style:{color:"#A5D6FF"}}},{content:"})])",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# Add a new row",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"df ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" df.add_row({",props:{style:{color:"#C9D1D9"}}},{content:'"name"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Alice"',props:{style:{color:"#A5D6FF"}}},{content:"})",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# Convert back to a list of Data objects",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"data_list ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" df.to_data_list()",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# Use pandas functionality",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"filtered_df ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" df[df[",props:{style:{color:"#C9D1D9"}}},{content:'"name"',props:{style:{color:"#A5D6FF"}}},{content:"].str.startswith(",props:{style:{color:"#C9D1D9"}}},{content:'"J"',props:{style:{color:"#A5D6FF"}}},{content:")]",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(t.p,{children:"To use DataFrame objects in a component input,use the DataFrameInput input type."}),"\n",(0,s.jsx)(i.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"DataFrameInput(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"dataframe_input"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"DataFrame Input"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"info",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Input for DataFrame objects."',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"tool_mode",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"True",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:"),",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(t.h2,{id:"see-also",children:"See also"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"/session-id",children:"Session ID"})}),"\n"]})]})}function F(o={}){const{wrapper:t}={...(0,c.R)(),...o.components};return t?(0,s.jsx)(t,{...o,children:(0,s.jsx)(D,{...o})}):D(o)}function h(o,t){throw new Error("Expected "+(t?"component":"object")+" `"+o+"` to be defined: you likely forgot to import, pass, or provide it.")}}}]); \ No newline at end of file diff --git a/assets/js/4e56251d.2849ad5f.js b/assets/js/4e56251d.14eef125.js similarity index 88% rename from assets/js/4e56251d.2849ad5f.js rename to assets/js/4e56251d.14eef125.js index 5a0199886e..34accf8489 100644 --- a/assets/js/4e56251d.2849ad5f.js +++ b/assets/js/4e56251d.14eef125.js @@ -1 +1 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[3147],{28453:(s,n,e)=>{e.d(n,{R:()=>r,x:()=>a});var t=e(96540);const i={},o=t.createContext(i);function r(s){const n=t.useContext(o);return t.useMemo(function(){return"function"==typeof s?s(n):{...n,...s}},[n,s])}function a(s){let n;return n=s.disableParentContext?"function"==typeof s.components?s.components(i):s.components||i:r(s.components),t.createElement(o.Provider,{value:n},s.children)}},70723:(s,n,e)=>{e.r(n),e.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>r,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"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.","source":"@site/docs/Integrations/Nvidia/integrations-nvidia-g-assist.mdx","sourceDirName":"Integrations/Nvidia","slug":"/integrations-nvidia-g-assist","permalink":"/integrations-nvidia-g-assist","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Integrate NVIDIA G-Assist with Langflow","slug":"/integrations-nvidia-g-assist"},"sidebar":"docs","previous":{"title":"NVIDIA NIM on WSL2","permalink":"/integrations-nvidia-ingest-wsl2"},"next":{"title":"Join the Langflow community","permalink":"/contributing-community"}}');var i=e(74848),o=e(28453);const r={title:"Integrate NVIDIA G-Assist with Langflow",slug:"/integrations-nvidia-g-assist"},a=void 0,l={},c=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Use the G-Assist component in a flow",id:"use-the-g-assist-component-in-a-flow",level:2},{value:"Inputs",id:"inputs",level:3},{value:"Outputs",id:"outputs",level:3}];function d(s){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...s.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.admonition,{type:"important",children:(0,i.jsx)(n.p,{children:"This component is available only for Langflow users with NVIDIA GPUs on Windows systems."})}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.strong,{children:"NVIDIA G-Assist"})," component enables interaction with NVIDIA GPU drivers through natural language prompts."]}),"\n",(0,i.jsxs)(n.p,{children:["For example, prompt G-Assist with ",(0,i.jsx)(n.code,{children:'"What is my current GPU temperature?"'})," or ",(0,i.jsx)(n.code,{children:'"Show me the available GPU memory"'})," to get information, and then tell G-Assist to modify your GPU settings."]}),"\n",(0,i.jsxs)(n.p,{children:["For more information, see the ",(0,i.jsx)(n.a,{href:"https://github.com/NVIDIA/g-assist",children:"NVIDIA G-assist project repository"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Windows operating system"}),"\n",(0,i.jsx)(n.li,{children:"NVIDIA GPU"}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"gassist.rise"})," package installed. This package is already installed with Langflow."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"use-the-g-assist-component-in-a-flow",children:"Use the G-Assist component in a flow"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["Create a flow with a ",(0,i.jsx)(n.strong,{children:"Chat input"})," component, a ",(0,i.jsx)(n.strong,{children:"G-Assist"})," component, and a ",(0,i.jsx)(n.strong,{children:"Chat output"})," component."]}),"\n",(0,i.jsxs)(n.li,{children:["Connect the ",(0,i.jsx)(n.strong,{children:"Chat input"})," component to the ",(0,i.jsx)(n.strong,{children:"G-Assist"})," component's ",(0,i.jsx)(n.strong,{children:"Prompt"})," input, and then connect the ",(0,i.jsx)(n.strong,{children:"G-Assist"})," component's output to the ",(0,i.jsx)(n.strong,{children:"Chat output"})," component."]}),"\n",(0,i.jsxs)(n.li,{children:["Open the ",(0,i.jsx)(n.strong,{children:"Playground"}),', and then ask a question about your GPU. For example, "What is my current GPU temperature?".\nThe ',(0,i.jsx)(n.strong,{children:"G-Assist"})," component queries your GPU, and the response appears in the ",(0,i.jsx)(n.strong,{children:"Playground"}),"."]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"inputs",children:"Inputs"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.strong,{children:"NVIDIA G-Assist"})," component accepts a single input:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"prompt"}),": A human-readable prompt processed by NVIDIA G-Assist."]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"outputs",children:"Outputs"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.strong,{children:"NVIDIA G-Assist"})," component outputs a ",(0,i.jsx)(n.a,{href:"/concepts-objects#message-object",children:"Message"})," object that contains:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"text"}),": The response from NVIDIA G-Assist containing the completed operation result."]}),"\n",(0,i.jsxs)(n.li,{children:["The NVIDIA G-Assist message response is wrapped in a Langflow ",(0,i.jsx)(n.a,{href:"/concepts-objects#message-object",children:"Message"})," object."]}),"\n"]})]})}function h(s={}){const{wrapper:n}={...(0,o.R)(),...s.components};return n?(0,i.jsx)(n,{...s,children:(0,i.jsx)(d,{...s})}):d(s)}}}]); \ No newline at end of file +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[3147],{28453:(s,n,e)=>{e.d(n,{R:()=>r,x:()=>a});var t=e(96540);const i={},o=t.createContext(i);function r(s){const n=t.useContext(o);return t.useMemo(function(){return"function"==typeof s?s(n):{...n,...s}},[n,s])}function a(s){let n;return n=s.disableParentContext?"function"==typeof s.components?s.components(i):s.components||i:r(s.components),t.createElement(o.Provider,{value:n},s.children)}},70723:(s,n,e)=>{e.r(n),e.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>r,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"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.","source":"@site/docs/Integrations/Nvidia/integrations-nvidia-g-assist.mdx","sourceDirName":"Integrations/Nvidia","slug":"/integrations-nvidia-g-assist","permalink":"/integrations-nvidia-g-assist","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Integrate NVIDIA G-Assist with Langflow","slug":"/integrations-nvidia-g-assist"},"sidebar":"docs","previous":{"title":"NVIDIA NIM on WSL2","permalink":"/integrations-nvidia-ingest-wsl2"},"next":{"title":"Join the Langflow community","permalink":"/contributing-community"}}');var i=e(74848),o=e(28453);const r={title:"Integrate NVIDIA G-Assist with Langflow",slug:"/integrations-nvidia-g-assist"},a=void 0,l={},c=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Use the G-Assist component in a flow",id:"use-the-g-assist-component-in-a-flow",level:2},{value:"Inputs",id:"inputs",level:3},{value:"Outputs",id:"outputs",level:3}];function d(s){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...s.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.admonition,{type:"important",children:(0,i.jsx)(n.p,{children:"This component is available only for Langflow users with NVIDIA GPUs on Windows systems."})}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.strong,{children:"NVIDIA G-Assist"})," component enables interaction with NVIDIA GPU drivers through natural language prompts."]}),"\n",(0,i.jsxs)(n.p,{children:["For example, prompt G-Assist with ",(0,i.jsx)(n.code,{children:'"What is my current GPU temperature?"'})," or ",(0,i.jsx)(n.code,{children:'"Show me the available GPU memory"'})," to get information, and then tell G-Assist to modify your GPU settings."]}),"\n",(0,i.jsxs)(n.p,{children:["For more information, see the ",(0,i.jsx)(n.a,{href:"https://github.com/NVIDIA/g-assist",children:"NVIDIA G-assist project repository"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Windows operating system"}),"\n",(0,i.jsx)(n.li,{children:"NVIDIA GPU"}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"gassist.rise"})," package installed. This package is already installed with Langflow."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"use-the-g-assist-component-in-a-flow",children:"Use the G-Assist component in a flow"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["Create a flow with a ",(0,i.jsx)(n.strong,{children:"Chat input"})," component, a ",(0,i.jsx)(n.strong,{children:"G-Assist"})," component, and a ",(0,i.jsx)(n.strong,{children:"Chat output"})," component."]}),"\n",(0,i.jsxs)(n.li,{children:["Connect the ",(0,i.jsx)(n.strong,{children:"Chat input"})," component to the ",(0,i.jsx)(n.strong,{children:"G-Assist"})," component's ",(0,i.jsx)(n.strong,{children:"Prompt"})," input, and then connect the ",(0,i.jsx)(n.strong,{children:"G-Assist"})," component's output to the ",(0,i.jsx)(n.strong,{children:"Chat output"})," component."]}),"\n",(0,i.jsxs)(n.li,{children:["Open the ",(0,i.jsx)(n.strong,{children:"Playground"}),', and then ask a question about your GPU. For example, "What is my current GPU temperature?".\nThe ',(0,i.jsx)(n.strong,{children:"G-Assist"})," component queries your GPU, and the response appears in the ",(0,i.jsx)(n.strong,{children:"Playground"}),"."]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"inputs",children:"Inputs"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.strong,{children:"NVIDIA G-Assist"})," component accepts a single input:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"prompt"}),": A human-readable prompt processed by NVIDIA G-Assist."]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"outputs",children:"Outputs"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.strong,{children:"NVIDIA G-Assist"})," component outputs a ",(0,i.jsx)(n.a,{href:"/data-types#message",children:"Message"})," object that contains:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"text"}),": The response from NVIDIA G-Assist containing the completed operation result."]}),"\n",(0,i.jsxs)(n.li,{children:["The NVIDIA G-Assist message response is wrapped in a Langflow ",(0,i.jsx)(n.a,{href:"/data-types#message",children:"Message"})," object."]}),"\n"]})]})}function h(s={}){const{wrapper:n}={...(0,o.R)(),...s.components};return n?(0,i.jsx)(n,{...s,children:(0,i.jsx)(d,{...s})}):d(s)}}}]); \ No newline at end of file diff --git a/assets/js/5f59ded8.e9cf9e31.js b/assets/js/5f59ded8.39f9122c.js similarity index 71% rename from assets/js/5f59ded8.e9cf9e31.js rename to assets/js/5f59ded8.39f9122c.js index f30c32b468..0590a35a9f 100644 --- a/assets/js/5f59ded8.e9cf9e31.js +++ b/assets/js/5f59ded8.39f9122c.js @@ -1 +1 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[785],{28453:(e,n,o)=>{o.d(n,{R:()=>c,x:()=>i});var s=o(96540);const t={},r=s.createContext(t);function c(e){const n=s.useContext(r);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:c(e.components),s.createElement(r.Provider,{value:n},e.children)}},45950:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>a,contentTitle:()=>i,default:()=>d,frontMatter:()=>c,metadata:()=>s,toc:()=>m});const s=JSON.parse('{"id":"Components/components-memories","title":"Memories","description":"Components in the Memories category are moved to Bundles as of Langflow 1.5.","source":"@site/docs/Components/components-memories.mdx","sourceDirName":"Components","slug":"/components-memories","permalink":"/components-memories","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Memories","slug":"/components-memories"},"sidebar":"docs","previous":{"title":"Logic","permalink":"/components-logic"},"next":{"title":"Language models","permalink":"/components-models"}}');var t=o(74848),r=o(28453);const c={title:"Memories",slug:"/components-memories"},i="Memory components in Langflow",a={},m=[{value:"Use a memory component in a flow",id:"use-a-memory-component-in-a-flow",level:2}];function l(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",img:"img",p:"p",strong:"strong",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"memory-components-in-langflow",children:"Memory components in Langflow"})}),"\n",(0,t.jsxs)(n.p,{children:["Components in the ",(0,t.jsx)(n.strong,{children:"Memories"})," category are moved to ",(0,t.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," as of Langflow 1.5."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Bundles"})," are third-party components grouped by provider."]}),"\n",(0,t.jsx)(n.p,{children:"For more information on bundled components, see the component provider's documentation."}),"\n",(0,t.jsx)(n.h2,{id:"use-a-memory-component-in-a-flow",children:"Use a memory component in a flow"}),"\n",(0,t.jsxs)(n.p,{children:["Memory components store and retrieve chat messages by ",(0,t.jsx)(n.code,{children:"session_id"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"They are distinct from vector store components, because they are built specifically for storing and retrieving chat messages from external databases."}),"\n",(0,t.jsxs)(n.p,{children:["Memory components provide access to their respective external databases ",(0,t.jsx)(n.strong,{children:"as memory"}),". This allows Large Language Models (LLMs) or ",(0,t.jsx)(n.a,{href:"/components-agents",children:"agents"})," to access external memory for persistence and context retention."]}),"\n",(0,t.jsxs)(n.p,{children:["This example flow stores and retrieves chat history with an ",(0,t.jsx)(n.strong,{children:"Redis Chat Memory"})," component connected to ",(0,t.jsx)(n.strong,{children:"Store Message"})," and ",(0,t.jsx)(n.strong,{children:"Message history"})," components."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.strong,{children:"Store Message"})," helper component stores chat memories as ",(0,t.jsx)(n.a,{href:"/concepts-objects",children:"Data"})," objects, and the ",(0,t.jsx)(n.strong,{children:"Message History"})," helper component retrieves chat messages as ",(0,t.jsx)(n.a,{href:"/concepts-objects",children:"Data"})," objects or strings."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"Sample Flow storing Message history in Redis",src:o(96841).A+"",width:"4000",height:"1768"})})]})}function d(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}},96841:(e,n,o)=>{o.d(n,{A:()=>s});const s=o.p+"assets/images/component-message-history-external-memory-7e32402d0b6e819f5539adfbfbd3620f.png"}}]); \ No newline at end of file +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[785],{28453:(e,n,o)=>{o.d(n,{R:()=>a,x:()=>i});var s=o(96540);const t={},r=s.createContext(t);function a(e){const n=s.useContext(r);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),s.createElement(r.Provider,{value:n},e.children)}},45950:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>l,frontMatter:()=>a,metadata:()=>s,toc:()=>m});const s=JSON.parse('{"id":"Components/components-memories","title":"Memories","description":"Components in the Memories category are moved to Bundles as of Langflow 1.5.","source":"@site/docs/Components/components-memories.mdx","sourceDirName":"Components","slug":"/components-memories","permalink":"/components-memories","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Memories","slug":"/components-memories"},"sidebar":"docs","previous":{"title":"Logic","permalink":"/components-logic"},"next":{"title":"Language models","permalink":"/components-models"}}');var t=o(74848),r=o(28453);const a={title:"Memories",slug:"/components-memories"},i="Memory components in Langflow",c={},m=[{value:"Use a memory component in a flow",id:"use-a-memory-component-in-a-flow",level:2}];function d(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",header:"header",img:"img",p:"p",strong:"strong",...(0,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.header,{children:(0,t.jsx)(n.h1,{id:"memory-components-in-langflow",children:"Memory components in Langflow"})}),"\n",(0,t.jsxs)(n.p,{children:["Components in the ",(0,t.jsx)(n.strong,{children:"Memories"})," category are moved to ",(0,t.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," as of Langflow 1.5."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Bundles"})," are third-party components grouped by provider."]}),"\n",(0,t.jsx)(n.p,{children:"For more information on bundled components, see the component provider's documentation."}),"\n",(0,t.jsx)(n.h2,{id:"use-a-memory-component-in-a-flow",children:"Use a memory component in a flow"}),"\n",(0,t.jsxs)(n.p,{children:["Memory components store and retrieve chat messages by ",(0,t.jsx)(n.code,{children:"session_id"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"They are distinct from vector store components, because they are built specifically for storing and retrieving chat messages from external databases."}),"\n",(0,t.jsxs)(n.p,{children:["Memory components provide access to their respective external databases ",(0,t.jsx)(n.strong,{children:"as memory"}),". This allows Large Language Models (LLMs) or ",(0,t.jsx)(n.a,{href:"/components-agents",children:"agents"})," to access external memory for persistence and context retention."]}),"\n",(0,t.jsxs)(n.p,{children:["This example flow stores and retrieves chat history with an ",(0,t.jsx)(n.strong,{children:"Redis Chat Memory"})," component connected to ",(0,t.jsx)(n.strong,{children:"Store Message"})," and ",(0,t.jsx)(n.strong,{children:"Message history"})," components."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.strong,{children:"Store Message"})," helper component stores chat memories as ",(0,t.jsx)(n.a,{href:"/data-types#data",children:"Data"})," objects, and the ",(0,t.jsx)(n.strong,{children:"Message History"})," helper component retrieves chat messages as ",(0,t.jsx)(n.a,{href:"/data-types#data",children:"Data"})," objects or strings."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"Sample Flow storing Message history in Redis",src:o(96841).A+"",width:"4000",height:"1768"})})]})}function l(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},96841:(e,n,o)=>{o.d(n,{A:()=>s});const s=o.p+"assets/images/component-message-history-external-memory-7e32402d0b6e819f5539adfbfbd3620f.png"}}]); \ No newline at end of file diff --git a/assets/js/6ffef3f1.518ac522.js b/assets/js/6ffef3f1.59f19c41.js similarity index 78% rename from assets/js/6ffef3f1.518ac522.js rename to assets/js/6ffef3f1.59f19c41.js index c85cfe411d..04d9869cbb 100644 --- a/assets/js/6ffef3f1.518ac522.js +++ b/assets/js/6ffef3f1.59f19c41.js @@ -1 +1 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[1954],{17886:(e,n,t)=>{t.d(n,{A:()=>i});t(96540);var r=t(64058),o=t(74848);function i({name:e,...n}){const t=r[e];return t?(0,o.jsx)(t,{...n}):null}},44250:(e,n,t)=>{t.r(n),t.d(n,{CH:()=>h,assets:()=>d,chCodeConfig:()=>p,contentTitle:()=>l,default:()=>g,frontMatter:()=>c,metadata:()=>r,toc:()=>u});const r=JSON.parse('{"id":"Templates/financial-report-parser","title":"Financial report parser","description":"This flow demonstrates how to parse LLM responses into a structured format.","source":"@site/docs/Templates/financial-report-parser.mdx","sourceDirName":"Templates","slug":"/financial-report-parser","permalink":"/financial-report-parser","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Financial report parser","slug":"/financial-report-parser"},"sidebar":"docs","previous":{"title":"Vector store RAG","permalink":"/vector-store-rag"},"next":{"title":"Sequential tasks agent","permalink":"/sequential-agent"}}');var o=t(74848),i=t(28453),s=t(24754),a=t(17886);const c={title:"Financial report parser",slug:"/financial-report-parser"},l=void 0,d={},h={annotations:s.hk,Code:s.Cy},p={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},u=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Create the financial report parser flow",id:"create-the-financial-report-parser-flow",level:2},{value:"Run the financial report parser flow",id:"run-the-financial-report-parser-flow",level:2}];function f(e){const n={a:"a",code:"code",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return h||x("CH",!1),h.Code||x("CH.Code",!0),(0,o.jsxs)(o.Fragment,{children:[(0,o.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,o.jsx)(n.p,{children:"This flow demonstrates how to parse LLM responses into a structured format."}),"\n",(0,o.jsxs)(n.p,{children:["In this example, the ",(0,o.jsx)(n.a,{href:"/components-io#chat-input",children:"Chat Input"})," component is pre-loaded with a sample financial report to demonstrate extracting ",(0,o.jsx)(n.code,{children:"Gross Profit"}),", ",(0,o.jsx)(n.code,{children:"EBITDA"}),", and ",(0,o.jsx)(n.code,{children:"Net Income"}),".\nThe ",(0,o.jsx)(n.a,{href:"/components-processing#structured-output",children:"Structured output"})," component is used to extract the financial data from the report, and the ",(0,o.jsx)(n.a,{href:"/components-processing#parser",children:"Parser"})," component is used to convert the extracted data into a structured format."]}),"\n",(0,o.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/get-started-installation",children:"A running Langflow instance"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"https://platform.openai.com/",children:"An OpenAI API key"})}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"create-the-financial-report-parser-flow",children:"Create the financial report parser flow"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["From the Langflow dashboard, click ",(0,o.jsx)(n.strong,{children:"New Flow"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["Select ",(0,o.jsx)(n.strong,{children:"Financial Report Parser"}),"."]}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.strong,{children:"Financial Report Parser"})," flow is created."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"Financial report parser flow",src:t(56308).A+"",width:"4000",height:"2038"})}),"\n",(0,o.jsx)(n.h2,{id:"run-the-financial-report-parser-flow",children:"Run the financial report parser flow"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Add your ",(0,o.jsx)(n.strong,{children:"OpenAI API key"})," to the ",(0,o.jsx)(n.strong,{children:"Language model"})," model component.\nOptionally, create a ",(0,o.jsx)(n.a,{href:"/configuration-global-variables",children:"global variable"})," for the\xa0",(0,o.jsx)(n.strong,{children:"OpenAI API key"}),"."]}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["In the\xa0",(0,o.jsx)(n.strong,{children:"OpenAI API Key"}),"\xa0field, click ",(0,o.jsx)(a.A,{name:"Globe","aria-hidden":"True"})," ",(0,o.jsx)(n.strong,{children:"Globe"}),", and then click\xa0",(0,o.jsx)(n.strong,{children:"Add New Variable"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["In the\xa0",(0,o.jsx)(n.strong,{children:"Variable Name"}),"\xa0field, enter\xa0",(0,o.jsx)(n.code,{children:"openai_api_key"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["In the\xa0",(0,o.jsx)(n.strong,{children:"Value"}),"\xa0field, paste your OpenAI API Key (",(0,o.jsx)(n.code,{children:"sk-..."}),")."]}),"\n",(0,o.jsxs)(n.li,{children:["Click\xa0",(0,o.jsx)(n.strong,{children:"Save Variable"}),"."]}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["To run the flow, click\xa0",(0,o.jsx)(a.A,{name:"Play","aria-hidden":"true"})," ",(0,o.jsx)(n.strong,{children:"Playground"}),", and then click ",(0,o.jsx)(n.strong,{children:"Send"}),".\nThe ",(0,o.jsx)(n.strong,{children:"Chat Input"})," component is pre-loaded with a sample financial report for demonstration purposes.\nThe ",(0,o.jsx)(n.strong,{children:"Playground"})," returns a structured response:"]}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(h.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"EBITDA: $900 million , Net Income: $500 million , GROSS_PROFIT: $1.2 billion",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,o.jsx)(n.p,{children:"Inspect the flow to understand how this information was extracted."}),"\n",(0,o.jsxs)(n.ol,{start:"3",children:["\n",(0,o.jsxs)(n.li,{children:["To inspect the output schema table, in the ",(0,o.jsx)(n.strong,{children:"Structured Output"})," component, click ",(0,o.jsx)(n.strong,{children:"Open table"}),".\nThe ",(0,o.jsx)(n.strong,{children:"Structured Output"})," component uses the attached ",(0,o.jsx)(n.strong,{children:"OpenAI"}),' model component as its "brain" to extract financial data into a ',(0,o.jsx)(n.a,{href:"/concepts-objects#dataframe-object",children:"DataFrame"})," with this defined schema."]}),"\n"]}),"\n",(0,o.jsx)(h.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"| Name | Description | Type | Multiple |",props:{}}]},{tokens:[{content:"|--------------|-----------------------|------|----------|",props:{}}]},{tokens:[{content:"| EBITDA | description of field | text | False |",props:{}}]},{tokens:[{content:"| NET_INCOME | description of field | text | False |",props:{}}]},{tokens:[{content:"| GROSS_PROFIT | description of field | text | False |",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,o.jsxs)(n.ol,{start:"4",children:["\n",(0,o.jsxs)(n.li,{children:["To inspect the template that contains the extracted data, in the ",(0,o.jsx)(n.strong,{children:"Parser"})," component, click ",(0,o.jsx)(a.A,{name:"Scan","aria-hidden":"true"})," ",(0,o.jsx)(n.strong,{children:"Scan"})," in the ",(0,o.jsx)(n.strong,{children:"Template"})," field.\nThe ",(0,o.jsx)(n.strong,{children:"Parser"})," component converts the extracted data into formatted messages for chat consumption.\nEach variable receives its value from the structured outputs."]}),"\n"]}),"\n",(0,o.jsx)(h.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"EBITDA: {EBITDA} , Net Income: {NET_INCOME} , GROSS_PROFIT: {GROSS_PROFIT}",props:{}}]}],lang:"text"},annotations:[]}]})]})}function g(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(f,{...e})}):f(e)}function x(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},56308:(e,n,t)=>{t.d(n,{A:()=>r});const r=t.p+"assets/images/starter-flow-financial-report-parser-5e11513e6ca4d6e4c0429e176e97fe90.png"}}]); \ No newline at end of file +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[1954],{17886:(e,n,t)=>{t.d(n,{A:()=>i});t(96540);var r=t(64058),o=t(74848);function i({name:e,...n}){const t=r[e];return t?(0,o.jsx)(t,{...n}):null}},44250:(e,n,t)=>{t.r(n),t.d(n,{CH:()=>h,assets:()=>d,chCodeConfig:()=>p,contentTitle:()=>l,default:()=>g,frontMatter:()=>c,metadata:()=>r,toc:()=>u});const r=JSON.parse('{"id":"Templates/financial-report-parser","title":"Financial report parser","description":"This flow demonstrates how to parse LLM responses into a structured format.","source":"@site/docs/Templates/financial-report-parser.mdx","sourceDirName":"Templates","slug":"/financial-report-parser","permalink":"/financial-report-parser","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Financial report parser","slug":"/financial-report-parser"},"sidebar":"docs","previous":{"title":"Vector store RAG","permalink":"/vector-store-rag"},"next":{"title":"Sequential tasks agent","permalink":"/sequential-agent"}}');var o=t(74848),i=t(28453),s=t(24754),a=t(17886);const c={title:"Financial report parser",slug:"/financial-report-parser"},l=void 0,d={},h={annotations:s.hk,Code:s.Cy},p={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},u=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Create the financial report parser flow",id:"create-the-financial-report-parser-flow",level:2},{value:"Run the financial report parser flow",id:"run-the-financial-report-parser-flow",level:2}];function f(e){const n={a:"a",code:"code",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return h||x("CH",!1),h.Code||x("CH.Code",!0),(0,o.jsxs)(o.Fragment,{children:[(0,o.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,o.jsx)(n.p,{children:"This flow demonstrates how to parse LLM responses into a structured format."}),"\n",(0,o.jsxs)(n.p,{children:["In this example, the ",(0,o.jsx)(n.a,{href:"/components-io#chat-input",children:"Chat Input"})," component is pre-loaded with a sample financial report to demonstrate extracting ",(0,o.jsx)(n.code,{children:"Gross Profit"}),", ",(0,o.jsx)(n.code,{children:"EBITDA"}),", and ",(0,o.jsx)(n.code,{children:"Net Income"}),".\nThe ",(0,o.jsx)(n.a,{href:"/components-processing#structured-output",children:"Structured output"})," component is used to extract the financial data from the report, and the ",(0,o.jsx)(n.a,{href:"/components-processing#parser",children:"Parser"})," component is used to convert the extracted data into a structured format."]}),"\n",(0,o.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/get-started-installation",children:"A running Langflow instance"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"https://platform.openai.com/",children:"An OpenAI API key"})}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"create-the-financial-report-parser-flow",children:"Create the financial report parser flow"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["From the Langflow dashboard, click ",(0,o.jsx)(n.strong,{children:"New Flow"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["Select ",(0,o.jsx)(n.strong,{children:"Financial Report Parser"}),"."]}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.strong,{children:"Financial Report Parser"})," flow is created."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"Financial report parser flow",src:t(56308).A+"",width:"4000",height:"2038"})}),"\n",(0,o.jsx)(n.h2,{id:"run-the-financial-report-parser-flow",children:"Run the financial report parser flow"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Add your ",(0,o.jsx)(n.strong,{children:"OpenAI API key"})," to the ",(0,o.jsx)(n.strong,{children:"Language model"})," model component.\nOptionally, create a ",(0,o.jsx)(n.a,{href:"/configuration-global-variables",children:"global variable"})," for the\xa0",(0,o.jsx)(n.strong,{children:"OpenAI API key"}),"."]}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["In the\xa0",(0,o.jsx)(n.strong,{children:"OpenAI API Key"}),"\xa0field, click ",(0,o.jsx)(a.A,{name:"Globe","aria-hidden":"True"})," ",(0,o.jsx)(n.strong,{children:"Globe"}),", and then click\xa0",(0,o.jsx)(n.strong,{children:"Add New Variable"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["In the\xa0",(0,o.jsx)(n.strong,{children:"Variable Name"}),"\xa0field, enter\xa0",(0,o.jsx)(n.code,{children:"openai_api_key"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["In the\xa0",(0,o.jsx)(n.strong,{children:"Value"}),"\xa0field, paste your OpenAI API Key (",(0,o.jsx)(n.code,{children:"sk-..."}),")."]}),"\n",(0,o.jsxs)(n.li,{children:["Click\xa0",(0,o.jsx)(n.strong,{children:"Save Variable"}),"."]}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["To run the flow, click\xa0",(0,o.jsx)(a.A,{name:"Play","aria-hidden":"true"})," ",(0,o.jsx)(n.strong,{children:"Playground"}),", and then click ",(0,o.jsx)(n.strong,{children:"Send"}),".\nThe ",(0,o.jsx)(n.strong,{children:"Chat Input"})," component is pre-loaded with a sample financial report for demonstration purposes.\nThe ",(0,o.jsx)(n.strong,{children:"Playground"})," returns a structured response:"]}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(h.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"EBITDA: $900 million , Net Income: $500 million , GROSS_PROFIT: $1.2 billion",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,o.jsx)(n.p,{children:"Inspect the flow to understand how this information was extracted."}),"\n",(0,o.jsxs)(n.ol,{start:"3",children:["\n",(0,o.jsxs)(n.li,{children:["To inspect the output schema table, in the ",(0,o.jsx)(n.strong,{children:"Structured Output"})," component, click ",(0,o.jsx)(n.strong,{children:"Open table"}),".\nThe ",(0,o.jsx)(n.strong,{children:"Structured Output"})," component uses the attached ",(0,o.jsx)(n.strong,{children:"OpenAI"}),' model component as its "brain" to extract financial data into a ',(0,o.jsx)(n.a,{href:"/data-types#dataframe",children:"DataFrame"})," with this defined schema."]}),"\n"]}),"\n",(0,o.jsx)(h.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"| Name | Description | Type | Multiple |",props:{}}]},{tokens:[{content:"|--------------|-----------------------|------|----------|",props:{}}]},{tokens:[{content:"| EBITDA | description of field | text | False |",props:{}}]},{tokens:[{content:"| NET_INCOME | description of field | text | False |",props:{}}]},{tokens:[{content:"| GROSS_PROFIT | description of field | text | False |",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,o.jsxs)(n.ol,{start:"4",children:["\n",(0,o.jsxs)(n.li,{children:["To inspect the template that contains the extracted data, in the ",(0,o.jsx)(n.strong,{children:"Parser"})," component, click ",(0,o.jsx)(a.A,{name:"Scan","aria-hidden":"true"})," ",(0,o.jsx)(n.strong,{children:"Scan"})," in the ",(0,o.jsx)(n.strong,{children:"Template"})," field.\nThe ",(0,o.jsx)(n.strong,{children:"Parser"})," component converts the extracted data into formatted messages for chat consumption.\nEach variable receives its value from the structured outputs."]}),"\n"]}),"\n",(0,o.jsx)(h.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"EBITDA: {EBITDA} , Net Income: {NET_INCOME} , GROSS_PROFIT: {GROSS_PROFIT}",props:{}}]}],lang:"text"},annotations:[]}]})]})}function g(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(f,{...e})}):f(e)}function x(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},56308:(e,n,t)=>{t.d(n,{A:()=>r});const r=t.p+"assets/images/starter-flow-financial-report-parser-5e11513e6ca4d6e4c0429e176e97fe90.png"}}]); \ No newline at end of file diff --git a/assets/js/709203b3.0f0620dc.js b/assets/js/709203b3.0f0620dc.js deleted file mode 100644 index 1a3bc4149f..0000000000 --- a/assets/js/709203b3.0f0620dc.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[7253],{17886:(e,n,o)=>{o.d(n,{A:()=>r});o(96540);var t=o(64058),s=o(74848);function r({name:e,...n}){const o=t[e];return o?(0,s.jsx)(o,{...n}):null}},17901:(e,n,o)=>{o.d(n,{A:()=>t});const t=o.p+"assets/images/prompt-component-with-multiple-inputs-6e43783422ff57a873929aa2c97f43f0.png"},27389:(e,n,o)=>{o.d(n,{A:()=>t});const t=o.p+"assets/images/prompt-component-4917278161834031f30525642b4fd87e.png"},32662:(e,n,o)=>{o.r(n),o.d(n,{CH:()=>d,assets:()=>a,chCodeConfig:()=>h,contentTitle:()=>p,default:()=>x,frontMatter:()=>i,metadata:()=>t,toc:()=>u});const t=JSON.parse('{"id":"Concepts/concepts-components","title":"Components overview","description":"Components are the building blocks of your flows.","source":"@site/docs/Concepts/concepts-components.mdx","sourceDirName":"Concepts","slug":"/concepts-components","permalink":"/concepts-components","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Components overview","slug":"/concepts-components"},"sidebar":"docs","previous":{"title":"Manage files","permalink":"/concepts-file-management"},"next":{"title":"Agents","permalink":"/components-agents"}}');var s=o(74848),r=o(28453),c=o(24754),l=o(17886);const i={title:"Components overview",slug:"/concepts-components"},p=void 0,a={},d={annotations:c.hk,Code:c.Cy},h={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},u=[{value:"Add a component to a flow",id:"component-menus",level:2},{value:"Configure a component",id:"configure-a-component",level:3},{value:"Rename a component",id:"rename-a-component",level:3},{value:"Run a component",id:"run-a-component",level:3},{value:"Inspect component output and logs",id:"inspect-component-output-and-logs",level:3},{value:"Freeze a component",id:"freeze-a-component",level:3},{value:"Component ports",id:"component-ports",level:2},{value:"Dynamic ports",id:"dynamic-ports",level:3},{value:"Output type selection",id:"output-type-selection",level:3},{value:"Port colors",id:"port-colors",level:3},{value:"Component code",id:"component-code",level:2},{value:"Component versions",id:"component-versions",level:2},{value:"Update component versions",id:"update-component-versions",level:3},{value:"Group components",id:"group-components",level:2}];function m(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return d||g("CH",!1),d.Code||g("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.jsx)(n.p,{children:"Components are the building blocks of your flows.\nLike classes in an application, each component is designed for a specific use case or integration."}),"\n",(0,s.jsxs)(n.admonition,{type:"tip",children:[(0,s.jsxs)(n.p,{children:["Langflow provides keyboard shortcuts for the ",(0,s.jsx)(n.strong,{children:"Workspace"}),"."]}),(0,s.jsxs)(n.p,{children:["In the Langflow header, click your profile icon, select ",(0,s.jsx)(n.strong,{children:"Settings"}),", and then click ",(0,s.jsx)(n.strong,{children:"Shortcuts"})," to view the available shortcuts."]})]}),"\n",(0,s.jsx)(n.h2,{id:"component-menus",children:"Add a component to a flow"}),"\n",(0,s.jsxs)(n.p,{children:["To add a component to a flow, drag the component from the ",(0,s.jsx)(n.strong,{children:"Components"})," menu to the ",(0,s.jsx)(n.a,{href:"/concepts-overview",children:(0,s.jsx)(n.strong,{children:"Workspace"})}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Components"})," menu is organized by component type, and some components are hidden by default:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Beta components"}),": These are Langflow's core components. They are grouped by purpose, such as ",(0,s.jsx)(n.strong,{children:"Inputs"})," or ",(0,s.jsx)(n.strong,{children:"Data"}),". Be aware that these components are in beta and not suitable for production workloads."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Legacy components"}),": You can still use these components, but they are no longer supported. Legacy components are hidden by default; click ",(0,s.jsx)(l.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Component settings"})," to expose legacy components."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Bundles"}),": These components support specific integrations, and they are grouped by provider."]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"configure-a-component",children:"Configure a component"}),"\n",(0,s.jsx)(n.p,{children:"After adding a component to a flow, configure the component's parameters and connect it to the other components in your flows."}),"\n",(0,s.jsx)(n.p,{children:"Each component has inputs, outputs, parameters, and controls related to the component's purpose.\nBy default, components show only required and common options.\nTo access additional settings and controls, including meta settings, use the component's header menu."}),"\n",(0,s.jsxs)(n.p,{children:["To access a component's header menu, click the component in your ",(0,s.jsx)(n.strong,{children:"Workspace"}),"."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Agent component",src:o(58876).A+"",width:"1948",height:"3344"})}),"\n",(0,s.jsx)(n.p,{children:"A few options are available directly on the header menu.\nFor example:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Code"}),": Modify component settings by directly editing the component's Python code."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Controls"}),": Adjust all component parameters, including optional settings that are hidden by default."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Tool Mode"}),": Enable this option when combining a component with an ",(0,s.jsx)(n.strong,{children:"Agent"})," component."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["For all other options, including ",(0,s.jsx)(n.strong,{children:"Delete"})," and ",(0,s.jsx)(n.strong,{children:"Duplicate"})," controls, click ",(0,s.jsx)(l.A,{name:"Ellipsis","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Show More"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"rename-a-component",children:"Rename a component"}),"\n",(0,s.jsxs)(n.p,{children:["To modify a component's name or description, click the component in the ",(0,s.jsx)(n.strong,{children:"Workspace"}),", and then click ",(0,s.jsx)(l.A,{name:"PencilLine","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Edit"}),".\nComponent descriptions accept Markdown syntax."]}),"\n",(0,s.jsx)(n.h3,{id:"run-a-component",children:"Run a component"}),"\n",(0,s.jsxs)(n.p,{children:["To run a single component, click ",(0,s.jsx)(l.A,{name:"Play","aria-label":"Play button"})," ",(0,s.jsx)(n.strong,{children:"Run component"}),".\nA ",(0,s.jsx)(n.strong,{children:"Last Run"})," value indicates that the component ran successfully."]}),"\n",(0,s.jsxs)(n.p,{children:["Running a single component is different from running an entire flow. In a single component run, the ",(0,s.jsx)(n.code,{children:"build_vertex"})," function is called, which builds and runs only the single component with direct inputs provided through the UI (the ",(0,s.jsx)(n.code,{children:"inputs_dict"})," parameter). The ",(0,s.jsx)(n.code,{children:"VertexBuildResult"})," data is passed to the ",(0,s.jsx)(n.code,{children:"build_and_run"})," method that calls the component's ",(0,s.jsx)(n.code,{children:"build"})," method and runs it. Unlike running an entire flow, running a single component doesn't automatically execute its upstream dependencies."]}),"\n",(0,s.jsx)(n.h3,{id:"inspect-component-output-and-logs",children:"Inspect component output and logs"}),"\n",(0,s.jsxs)(n.p,{children:["To view the output and logs for a single component, click ",(0,s.jsx)(l.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Inspect"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"freeze-a-component",children:"Freeze a component"}),"\n",(0,s.jsx)(n.admonition,{type:"important",children:(0,s.jsx)(n.p,{children:"Freezing a component also freezes all components upstream of the selected component."})}),"\n",(0,s.jsxs)(n.p,{children:["Use the freeze option if you expect consistent output from a component ",(0,s.jsx)(n.em,{children:"and all upstream components"}),", and you only need to run those components once."]}),"\n",(0,s.jsx)(n.p,{children:"Freezing a component prevents that component and all upstream components from re-running, and it preserves the last output state for those components.\nAny future flow runs use the preserved output."}),"\n",(0,s.jsxs)(n.p,{children:["To freeze a component, click the component in the ",(0,s.jsx)(n.strong,{children:"Workspace"})," to expose the component's header menu, click ",(0,s.jsx)(l.A,{name:"Ellipsis","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Show More"}),", and then select ",(0,s.jsx)(n.strong,{children:"Freeze"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"component-ports",children:"Component ports"}),"\n",(0,s.jsxs)(n.p,{children:["Circular port icons (",(0,s.jsx)(l.A,{name:"Circle",size:"16","aria-label":"Circular component port icon",style:{color:"#4f46e5",fill:"#4f46e5"}}),") on the border of a component indicate the types of inputs and outputs that can be connected to the component at that port."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Prompt component with multiple inputs",src:o(27389).A+"",width:"2600",height:"3020"})}),"\n",(0,s.jsx)(n.h3,{id:"dynamic-ports",children:"Dynamic ports"}),"\n",(0,s.jsxs)(n.p,{children:["Some components have ports that are dynamically added or removed.\nFor example, the ",(0,s.jsx)(n.strong,{children:"Prompt"})," component accepts inputs within curly braces, and new ports are opened when a value within curly braces is detected in the ",(0,s.jsx)(n.strong,{children:"Template"})," field."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Prompt component with multiple inputs",src:o(17901).A+"",width:"2104",height:"2928"})}),"\n",(0,s.jsx)(n.h3,{id:"output-type-selection",children:"Output type selection"}),"\n",(0,s.jsx)(n.p,{children:"Some components include dropdown menus to select the type of output sent to the next component."}),"\n",(0,s.jsxs)(n.p,{children:["For example, the ",(0,s.jsx)(n.strong,{children:"Language Model"})," component includes ",(0,s.jsx)(n.strong,{children:"Model Response"})," or ",(0,s.jsx)(n.strong,{children:"Language Model"})," outputs.\nThe ",(0,s.jsx)(n.strong,{children:"Model Response"})," output sends a ",(0,s.jsx)(n.a,{href:"/concepts-objects#message-object",children:"Message"})," output on to another Message port.\nThe ",(0,s.jsx)(n.strong,{children:"Language Model"})," output can be connected to components like ",(0,s.jsx)(n.a,{href:"/components-processing#structured-output",children:"Structured output"})," to use the LLM to power the component's reasoning."]}),"\n",(0,s.jsxs)(n.p,{children:["In the component code, ",(0,s.jsx)(n.code,{children:"group_outputs"})," is set to ",(0,s.jsx)(n.code,{children:"False"})," by default, which forces the outputs into the same dropdown menu, and only allows one output to be selected.\nWhen ",(0,s.jsx)(n.code,{children:"group_outputs=True"}),", outputs are displayed individually."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Output type selection in the Language Model component",src:o(64599).A+"",width:"280",height:"446"})}),"\n",(0,s.jsx)(n.h3,{id:"port-colors",children:"Port colors"}),"\n",(0,s.jsx)(n.p,{children:"Component port colors indicate the data type ingested or emitted by the port.\nFor example, a text port either accepts or emits text data."}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsx)(n.p,{children:"Hover over a port to see connection details for that port."})}),"\n",(0,s.jsx)(n.p,{children:"The following table lists the component port colors and their corresponding input types:"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Data type"}),(0,s.jsx)(n.th,{children:"Port color"}),(0,s.jsx)(n.th,{children:"Port icon example"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Data"}),(0,s.jsx)(n.td,{children:"Red"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(l.A,{name:"Circle",size:"16","aria-label":"Circular component port icon",style:{color:"#dc2626",fill:"#dc2626"}})})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"DataFrame"}),(0,s.jsx)(n.td,{children:"Pink"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(l.A,{name:"Circle",size:"16","aria-label":"Circular component port icon",style:{color:"#ec4899",fill:"#ec4899"}})})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Embeddings"}),(0,s.jsx)(n.td,{children:"Emerald"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(l.A,{name:"Circle",size:"16","aria-label":"Circular component port icon",style:{color:"#10b981",fill:"#10b981"}})})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"LanguageModel"}),(0,s.jsx)(n.td,{children:"Fuchsia"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(l.A,{name:"Circle",size:"16","aria-label":"Circular component port icon",style:{color:"#c026d3",fill:"#c026d3"}})})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Memory"}),(0,s.jsx)(n.td,{children:"Orange"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(l.A,{name:"Circle",size:"16","aria-label":"Circular component port icon",style:{color:"#f97316",fill:"#f97316"}})})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Message"}),(0,s.jsx)(n.td,{children:"Indigo"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(l.A,{name:"Circle",size:"16","aria-label":"Circular component port icon",style:{color:"#4f46e5",fill:"#4f46e5"}})})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Text"}),(0,s.jsx)(n.td,{children:"Indigo"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(l.A,{name:"Circle",size:"16","aria-label":"Circular component port icon",style:{color:"#4f46e5",fill:"#4f46e5"}})})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Tool"}),(0,s.jsx)(n.td,{children:"Cyan"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(l.A,{name:"Circle",size:"16","aria-label":"Circular component port icon",style:{color:"#06b6d4",fill:"#06b6d4"}})})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Unknown"}),(0,s.jsx)(n.td,{children:"Gray"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(l.A,{name:"Circle",size:"16","aria-label":"Circular component port icon",style:{color:"#9CA3AF",fill:"#9CA3AF"}})})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"component-code",children:"Component code"}),"\n",(0,s.jsxs)(n.p,{children:["You can edit components in the visual editor and in code. When editing a flow, select a component, and then click ",(0,s.jsx)(l.A,{name:"Code","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Code"})," to see and edit the component's underlying Python code."]}),"\n",(0,s.jsx)(n.p,{children:"All components have underlying code that determines how you configure them and what actions they can perform.\nIn the context of creating and running flows, component code does the following:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Determines what configuration options to show in the Langflow UI."}),"\n",(0,s.jsx)(n.li,{children:"Validates inputs based on the component's defined input types."}),"\n",(0,s.jsx)(n.li,{children:"Processes data using the configured parameters, methods, and functions."}),"\n",(0,s.jsx)(n.li,{children:"Passes results to the next component in the flow."}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["All components inherit from a base ",(0,s.jsx)(n.code,{children:"Component"})," class that defines the component's interface and behavior.\nFor example, the ",(0,s.jsx)(n.a,{href:"https://github.com/langflow-ai/langflow/blob/main/src/backend/base/langflow/components/langchain_utilities/recursive_character.py",children:"Recursive character text splitter"})," is a child of the ",(0,s.jsx)(n.a,{href:"https://github.com/langflow-ai/langflow/blob/main/src/backend/base/langflow/base/textsplitters/model.py",children:"LCTextSplitterComponent"})," class."]}),"\n",(0,s.jsxs)(n.p,{children:["Each component's code includes definitions for inputs and outputs, which are represented in the ",(0,s.jsx)(n.strong,{children:"Workspace"})," as ",(0,s.jsx)(n.a,{href:"/concepts-components#component-ports",children:"component ports"}),".\nFor example, the ",(0,s.jsx)(n.code,{children:"RecursiveCharacterTextSplitter"})," has four inputs. Each input definition specifies the input type, such as ",(0,s.jsx)(n.code,{children:"IntInput"}),", as well as the encoded name, display name, description, and other parameters for that specific input.\nThese values determine the component settings, such as display names and tooltips in the Langflow UI."]}),"\n",(0,s.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:" inputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" IntInput(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"chunk_size"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Chunk Size"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" info",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"The maximum length of each chunk."',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" value",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"1000",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" IntInput(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"chunk_overlap"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Chunk Overlap"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" info",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"The amount of overlap between chunks."',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" value",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"200",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" DataInput(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"data_input"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Input"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" info",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"The texts to split."',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" input_types",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"[",props:{style:{color:"#C9D1D9"}}},{content:'"Document"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"Data"',props:{style:{color:"#A5D6FF"}}},{content:"],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" MessageTextInput(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"separators"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Separators"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" info",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"'The characters to split on.",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:'If left empty defaults to ["',props:{style:{color:"#A5D6FF"}}},{content:"\\\\",props:{style:{color:"#79C0FF"}}},{content:"n",props:{style:{color:"#A5D6FF"}}},{content:"\\\\",props:{style:{color:"#79C0FF"}}},{content:'n", "',props:{style:{color:"#A5D6FF"}}},{content:"\\\\",props:{style:{color:"#79C0FF"}}},{content:'n", " ", ""].\'',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" is_list",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"True",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ]",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsxs)(n.p,{children:["Additionally, components have methods or functions that handle their functionality.\nFor example, the ",(0,s.jsx)(n.code,{children:"RecursiveCharacterTextSplitter"})," has two methods:"]}),"\n",(0,s.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:" def ",props:{style:{color:"#FF7B72"}}},{content:"get_data_input",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> Any:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return ",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".data_input",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" def ",props:{style:{color:"#FF7B72"}}},{content:"build_text_splitter",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> TextSplitter:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" if not ",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".separators:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" separators: list[",props:{style:{color:"#C9D1D9"}}},{content:"str",props:{style:{color:"#79C0FF"}}},{content:"] ",props:{style:{color:"#C9D1D9"}}},{content:"| ",props:{style:{color:"#FF7B72"}}},{content:"None ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"None",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" else",props:{style:{color:"#FF7B72"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" # check if the separators list has escaped characters",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" # if there are escaped characters, unescape them",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" separators ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [unescape_string(x) ",props:{style:{color:"#C9D1D9"}}},{content:"for",props:{style:{color:"#FF7B72"}}},{content:" x ",props:{style:{color:"#C9D1D9"}}},{content:"in ",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".separators]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" RecursiveCharacterTextSplitter(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" separators",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"separators,",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" chunk_size",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".chunk_size,",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" chunk_overlap",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".chunk_overlap,",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" )",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"get_data_input"})," method retrieves the text data to be split from the component's input, which makes the data available to the class.\nThe ",(0,s.jsx)(n.code,{children:"build_text_splitter"})," method creates a ",(0,s.jsx)(n.code,{children:"RecursiveCharacterTextSplitter"})," object by calling its parent class's ",(0,s.jsx)(n.code,{children:"build"})," method. Then, the text is split with the created splitter and passed to the next component."]}),"\n",(0,s.jsx)(n.h2,{id:"component-versions",children:"Component versions"}),"\n",(0,s.jsx)(n.p,{children:"Component versions and states are stored in an internal Langflow database. When you add a component to a flow, you create a detached copy of the component based on the information in the Langflow database.\nThese copies are detached from the primary Langflow database, and they don't synchronize with any updates that can occur when you upgrade your Langflow version."}),"\n",(0,s.jsxs)(n.p,{children:["In other words, an individual instance of a component retains the version number and state from the moment you add it to a specific flow. For example, if a component is at version 1.0 when you add it to a flow, it remains at version 1.0 ",(0,s.jsx)(n.em,{children:"in that flow"})," unless you update it."]}),"\n",(0,s.jsx)(n.h3,{id:"update-component-versions",children:"Update component versions"}),"\n",(0,s.jsxs)(n.p,{children:["When editing a flow in the ",(0,s.jsx)(n.strong,{children:"Workspace"}),", Langflow notifies you if a component's workspace version is behind the database version so you can update the component's workspace version:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Update ready"}),": This notification means the component update contains no breaking changes."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Update available"}),": This notification means the component update might contain breaking changes."]}),"\n",(0,s.jsx)(n.p,{children:"Breaking changes modify component inputs and outputs, causing the components to be disconnected and break the flow. After updating the component, you might need to edit the component settings or reconnect component ports."}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"There are two ways to update components:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Click ",(0,s.jsx)(n.strong,{children:"Update"})," to update a single component. This is recommended for updates without breaking changes."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Click ",(0,s.jsx)(n.strong,{children:"Review"})," to view all available updates and create a snapshot before updating. This is recommended for updates with breaking changes."]}),"\n",(0,s.jsxs)(n.p,{children:["To save a snapshot of your flow before updating the components, enable ",(0,s.jsx)(n.strong,{children:"Create backup flow before updating"}),". Backup flows are stored in the same project folder as the original flow with the suffix ",(0,s.jsx)(n.code,{children:"(backup)"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["To update specific components, select the components you want to update, and then click ",(0,s.jsx)(n.strong,{children:"Update Components"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Components are updated to the latest available version, based on the version of Langflow you are running."}),"\n",(0,s.jsx)(n.h2,{id:"group-components",children:"Group components"}),"\n",(0,s.jsxs)(n.p,{children:["Multiple components can be grouped into a single component for reuse. This is useful for organizing large flows by combining related components together, such as a RAG ",(0,s.jsx)(n.strong,{children:"Agent"})," component and an associated vector database component."]}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Hold ",(0,s.jsx)("kbd",{children:"Shift"}),", and then click and drag to highlight all components you want to merge. Components must be completely within the selection area to be merged."]}),"\n",(0,s.jsxs)(n.p,{children:["Alternatively, to select components for merging one by one, hold ",(0,s.jsx)("kbd",{children:"Ctrl"})," on Windows or ",(0,s.jsx)("kbd",{children:"Cmd"})," on Mac, and then click each component to add them to the group."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Release the mouse and keyboard, and then click ",(0,s.jsx)(n.strong,{children:"Group"})," to merge the components into a single, group component."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Grouped components are configured and managed as a single component, including the component name, code, and settings."}),"\n",(0,s.jsxs)(n.p,{children:["To ungroup the components, click the component in the ",(0,s.jsx)(n.strong,{children:"Workspace"})," to expose the component's header menu, click ",(0,s.jsx)(l.A,{name:"Ellipsis","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Show More"}),", and then select ",(0,s.jsx)(n.strong,{children:"Ungroup"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["If you want to reuse this grouping in other flows, click the component in the ",(0,s.jsx)(n.strong,{children:"Workspace"})," to expose the component's header menu, click ",(0,s.jsx)(l.A,{name:"Ellipsis","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Show More"}),", and then select ",(0,s.jsx)(n.strong,{children:"Save"})," to save the component to the ",(0,s.jsx)(n.strong,{children:"Components"})," menu."]})]})}function x(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(m,{...e})}):m(e)}function g(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},58876:(e,n,o)=>{o.d(n,{A:()=>t});const t=o.p+"assets/images/agent-component-4c496697124cfebd3883ee9ade19ca5c.png"},64599:(e,n,o)=>{o.d(n,{A:()=>t});const t=o.p+"assets/images/select-output-f7d64629d278098e3fba32fe79f79ed6.png"}}]); \ No newline at end of file diff --git a/assets/js/709203b3.9a1f4656.js b/assets/js/709203b3.9a1f4656.js new file mode 100644 index 0000000000..182b88b98a --- /dev/null +++ b/assets/js/709203b3.9a1f4656.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[7253],{17886:(e,n,o)=>{o.d(n,{A:()=>r});o(96540);var t=o(64058),s=o(74848);function r({name:e,...n}){const o=t[e];return o?(0,s.jsx)(o,{...n}):null}},17901:(e,n,o)=>{o.d(n,{A:()=>t});const t=o.p+"assets/images/prompt-component-with-multiple-inputs-6e43783422ff57a873929aa2c97f43f0.png"},27389:(e,n,o)=>{o.d(n,{A:()=>t});const t=o.p+"assets/images/prompt-component-4917278161834031f30525642b4fd87e.png"},32662:(e,n,o)=>{o.r(n),o.d(n,{CH:()=>d,assets:()=>a,chCodeConfig:()=>h,contentTitle:()=>p,default:()=>g,frontMatter:()=>i,metadata:()=>t,toc:()=>u});const t=JSON.parse('{"id":"Concepts/concepts-components","title":"Components overview","description":"Components are the building blocks of your flows.","source":"@site/docs/Concepts/concepts-components.mdx","sourceDirName":"Concepts","slug":"/concepts-components","permalink":"/concepts-components","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Components overview","slug":"/concepts-components"},"sidebar":"docs","previous":{"title":"Manage files","permalink":"/concepts-file-management"},"next":{"title":"Agents","permalink":"/components-agents"}}');var s=o(74848),r=o(28453),c=o(24754),l=o(17886);const i={title:"Components overview",slug:"/concepts-components"},p=void 0,a={},d={annotations:c.hk,Code:c.Cy},h={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},u=[{value:"Add a component to a flow",id:"component-menus",level:2},{value:"Configure a component",id:"configure-a-component",level:3},{value:"Rename a component",id:"rename-a-component",level:3},{value:"Run a component",id:"run-a-component",level:3},{value:"Inspect component output and logs",id:"inspect-component-output-and-logs",level:3},{value:"Freeze a component",id:"freeze-a-component",level:3},{value:"Component ports",id:"component-ports",level:2},{value:"Dynamic ports",id:"dynamic-ports",level:3},{value:"Output type selection",id:"output-type-selection",level:3},{value:"Port colors",id:"port-colors",level:3},{value:"Component code",id:"component-code",level:2},{value:"Component versions",id:"component-versions",level:2},{value:"Update component versions",id:"update-component-versions",level:3},{value:"Group components",id:"group-components",level:2}];function m(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return d||x("CH",!1),d.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.jsx)(n.p,{children:"Components are the building blocks of your flows.\nLike classes in an application, each component is designed for a specific use case or integration."}),"\n",(0,s.jsxs)(n.admonition,{type:"tip",children:[(0,s.jsxs)(n.p,{children:["Langflow provides keyboard shortcuts for the ",(0,s.jsx)(n.strong,{children:"Workspace"}),"."]}),(0,s.jsxs)(n.p,{children:["In the Langflow header, click your profile icon, select ",(0,s.jsx)(n.strong,{children:"Settings"}),", and then click ",(0,s.jsx)(n.strong,{children:"Shortcuts"})," to view the available shortcuts."]})]}),"\n",(0,s.jsx)(n.h2,{id:"component-menus",children:"Add a component to a flow"}),"\n",(0,s.jsxs)(n.p,{children:["To add a component to a flow, drag the component from the ",(0,s.jsx)(n.strong,{children:"Components"})," menu to the ",(0,s.jsx)(n.a,{href:"/concepts-overview",children:(0,s.jsx)(n.strong,{children:"Workspace"})}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Components"})," menu is organized by component type, and some components are hidden by default:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Beta components"}),": These are Langflow's core components. They are grouped by purpose, such as ",(0,s.jsx)(n.strong,{children:"Inputs"})," or ",(0,s.jsx)(n.strong,{children:"Data"}),". Be aware that these components are in beta and not suitable for production workloads."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Legacy components"}),": You can still use these components, but they are no longer supported. Legacy components are hidden by default; click ",(0,s.jsx)(l.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Component settings"})," to expose legacy components."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Bundles"}),": These components support specific integrations, and they are grouped by provider."]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"configure-a-component",children:"Configure a component"}),"\n",(0,s.jsx)(n.p,{children:"After adding a component to a flow, configure the component's parameters and connect it to the other components in your flows."}),"\n",(0,s.jsx)(n.p,{children:"Each component has inputs, outputs, parameters, and controls related to the component's purpose.\nBy default, components show only required and common options.\nTo access additional settings and controls, including meta settings, use the component's header menu."}),"\n",(0,s.jsxs)(n.p,{children:["To access a component's header menu, click the component in your ",(0,s.jsx)(n.strong,{children:"Workspace"}),"."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Agent component",src:o(58876).A+"",width:"1948",height:"3344"})}),"\n",(0,s.jsx)(n.p,{children:"A few options are available directly on the header menu.\nFor example:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Code"}),": Modify component settings by directly editing the component's Python code."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Controls"}),": Adjust all component parameters, including optional settings that are hidden by default."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Tool Mode"}),": Enable this option when combining a component with an ",(0,s.jsx)(n.strong,{children:"Agent"})," component."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["For all other options, including ",(0,s.jsx)(n.strong,{children:"Delete"})," and ",(0,s.jsx)(n.strong,{children:"Duplicate"})," controls, click ",(0,s.jsx)(l.A,{name:"Ellipsis","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Show More"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"rename-a-component",children:"Rename a component"}),"\n",(0,s.jsxs)(n.p,{children:["To modify a component's name or description, click the component in the ",(0,s.jsx)(n.strong,{children:"Workspace"}),", and then click ",(0,s.jsx)(l.A,{name:"PencilLine","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Edit"}),".\nComponent descriptions accept Markdown syntax."]}),"\n",(0,s.jsx)(n.h3,{id:"run-a-component",children:"Run a component"}),"\n",(0,s.jsxs)(n.p,{children:["To run a single component, click ",(0,s.jsx)(l.A,{name:"Play","aria-label":"Play button"})," ",(0,s.jsx)(n.strong,{children:"Run component"}),".\nA ",(0,s.jsx)(n.strong,{children:"Last Run"})," value indicates that the component ran successfully."]}),"\n",(0,s.jsxs)(n.p,{children:["Running a single component is different from running an entire flow. In a single component run, the ",(0,s.jsx)(n.code,{children:"build_vertex"})," function is called, which builds and runs only the single component with direct inputs provided through the UI (the ",(0,s.jsx)(n.code,{children:"inputs_dict"})," parameter). The ",(0,s.jsx)(n.code,{children:"VertexBuildResult"})," data is passed to the ",(0,s.jsx)(n.code,{children:"build_and_run"})," method that calls the component's ",(0,s.jsx)(n.code,{children:"build"})," method and runs it. Unlike running an entire flow, running a single component doesn't automatically execute its upstream dependencies."]}),"\n",(0,s.jsx)(n.h3,{id:"inspect-component-output-and-logs",children:"Inspect component output and logs"}),"\n",(0,s.jsxs)(n.p,{children:["To view the output and logs for a single component, click ",(0,s.jsx)(l.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Inspect"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"freeze-a-component",children:"Freeze a component"}),"\n",(0,s.jsx)(n.admonition,{type:"important",children:(0,s.jsx)(n.p,{children:"Freezing a component also freezes all components upstream of the selected component."})}),"\n",(0,s.jsxs)(n.p,{children:["Use the freeze option if you expect consistent output from a component ",(0,s.jsx)(n.em,{children:"and all upstream components"}),", and you only need to run those components once."]}),"\n",(0,s.jsx)(n.p,{children:"Freezing a component prevents that component and all upstream components from re-running, and it preserves the last output state for those components.\nAny future flow runs use the preserved output."}),"\n",(0,s.jsxs)(n.p,{children:["To freeze a component, click the component in the ",(0,s.jsx)(n.strong,{children:"Workspace"})," to expose the component's header menu, click ",(0,s.jsx)(l.A,{name:"Ellipsis","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Show More"}),", and then select ",(0,s.jsx)(n.strong,{children:"Freeze"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"component-ports",children:"Component ports"}),"\n",(0,s.jsxs)(n.p,{children:["Around the border of each component, there are circular port icons like ",(0,s.jsx)(l.A,{name:"Circle",size:"16","aria-label":"Indigo message port",style:{color:"#4f46e5",fill:"#4f46e5"}}),".\nThese indicate a component ",(0,s.jsx)(n.em,{children:"connection point"})," or ",(0,s.jsx)(n.em,{children:"port"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["Ports either accept input or produce output of a specific data type.\nYou can infer the data type from the field the port is attached to or from the ",(0,s.jsx)(n.a,{href:"#port-colors",children:"port's color"}),".\nFor example, the ",(0,s.jsx)(n.strong,{children:"System Message"})," field accepts ",(0,s.jsx)(n.a,{href:"#message",children:"message data"}),", as illustrated by the blue port icon: ",(0,s.jsx)(l.A,{name:"Circle",size:"16","aria-label":"Indigo message port",style:{color:"#4f46e5",fill:"#4f46e5"}}),"."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Prompt component with multiple inputs",src:o(27389).A+"",width:"2600",height:"3020"})}),"\n",(0,s.jsxs)(n.p,{children:["When building flows, connect output ports to input ports of the same type (color) to transfer that type of data between two components.\nFor information about the programmatic representation of each data type, see ",(0,s.jsx)(n.a,{href:"/data-types",children:"Langflow data types"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"dynamic-ports",children:"Dynamic ports"}),"\n",(0,s.jsxs)(n.p,{children:["Some components have ports that are dynamically added or removed.\nFor example, the ",(0,s.jsx)(n.strong,{children:"Prompt"})," component accepts inputs within curly braces, and new ports are opened when a value within curly braces is detected in the ",(0,s.jsx)(n.strong,{children:"Template"})," field."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Prompt component with multiple inputs",src:o(17901).A+"",width:"2104",height:"2928"})}),"\n",(0,s.jsx)(n.h3,{id:"output-type-selection",children:"Output type selection"}),"\n",(0,s.jsx)(n.p,{children:"Some components include dropdown menus to select the type of output sent to the next component."}),"\n",(0,s.jsxs)(n.p,{children:["For example, the ",(0,s.jsx)(n.strong,{children:"Language Model"})," component includes ",(0,s.jsx)(n.strong,{children:"Model Response"})," or ",(0,s.jsx)(n.strong,{children:"Language Model"})," outputs.\nThe ",(0,s.jsx)(n.strong,{children:"Model Response"})," output sends a ",(0,s.jsx)(n.a,{href:"/data-types#message",children:"Message"})," output on to another Message port.\nThe ",(0,s.jsx)(n.strong,{children:"Language Model"})," output can be connected to components like ",(0,s.jsx)(n.a,{href:"/components-processing#structured-output",children:"Structured output"})," to use the LLM to power the component's reasoning."]}),"\n",(0,s.jsxs)(n.p,{children:["In the component code, ",(0,s.jsx)(n.code,{children:"group_outputs"})," is set to ",(0,s.jsx)(n.code,{children:"False"})," by default, which forces the outputs into the same dropdown menu, and only allows one output to be selected.\nWhen ",(0,s.jsx)(n.code,{children:"group_outputs=True"}),", outputs are displayed individually."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Output type selection in the Language Model component",src:o(64599).A+"",width:"280",height:"446"})}),"\n",(0,s.jsx)(n.h3,{id:"port-colors",children:"Port colors"}),"\n",(0,s.jsxs)(n.p,{children:["Component port colors indicate the data type ingested or emitted by the port.\nFor example, a ",(0,s.jsx)(n.strong,{children:"Message"})," port either accepts or emits ",(0,s.jsx)(n.code,{children:"message"})," data."]}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsx)(n.p,{children:"Hover over a port to see connection details for that port."})}),"\n",(0,s.jsx)(n.p,{children:"The following table lists the component data types and their corresponding port colors:"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Data type"}),(0,s.jsx)(n.th,{children:"Port color"}),(0,s.jsx)(n.th,{children:"Port icon example"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Data"}),(0,s.jsx)(n.td,{children:"Red"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(l.A,{name:"Circle",size:"16","aria-label":"Red data port",style:{color:"#dc2626",fill:"#dc2626"}})})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"DataFrame"}),(0,s.jsx)(n.td,{children:"Pink"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(l.A,{name:"Circle",size:"16","aria-label":"Pink dataframe port",style:{color:"#ec4899",fill:"#ec4899"}})})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Embeddings"}),(0,s.jsx)(n.td,{children:"Emerald"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(l.A,{name:"Circle",size:"16","aria-label":"Emerald embeddings port",style:{color:"#10b981",fill:"#10b981"}})})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"LanguageModel"}),(0,s.jsx)(n.td,{children:"Fuchsia"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(l.A,{name:"Circle",size:"16","aria-label":"Fuchsia language model port",style:{color:"#c026d3",fill:"#c026d3"}})})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Memory"}),(0,s.jsx)(n.td,{children:"Orange"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(l.A,{name:"Circle",size:"16","aria-label":"Orange memory port",style:{color:"#f97316",fill:"#f97316"}})})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Message"}),(0,s.jsx)(n.td,{children:"Indigo"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(l.A,{name:"Circle",size:"16","aria-label":"Indigo message port",style:{color:"#4f46e5",fill:"#4f46e5"}})})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Tool"}),(0,s.jsx)(n.td,{children:"Cyan"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(l.A,{name:"Circle",size:"16","aria-label":"Cyan tool port",style:{color:"#06b6d4",fill:"#06b6d4"}})})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Unknown or multiple types"}),(0,s.jsx)(n.td,{children:"Gray"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(l.A,{name:"Circle",size:"16","aria-label":"Gray unknown port",style:{color:"#9CA3AF",fill:"#9CA3AF"}})})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"component-code",children:"Component code"}),"\n",(0,s.jsxs)(n.p,{children:["You can edit components in the visual editor and in code. When editing a flow, select a component, and then click ",(0,s.jsx)(l.A,{name:"Code","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Code"})," to see and edit the component's underlying Python code."]}),"\n",(0,s.jsx)(n.p,{children:"All components have underlying code that determines how you configure them and what actions they can perform.\nIn the context of creating and running flows, component code does the following:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Determines what configuration options to show in the Langflow UI."}),"\n",(0,s.jsx)(n.li,{children:"Validates inputs based on the component's defined input types."}),"\n",(0,s.jsx)(n.li,{children:"Processes data using the configured parameters, methods, and functions."}),"\n",(0,s.jsx)(n.li,{children:"Passes results to the next component in the flow."}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["All components inherit from a base ",(0,s.jsx)(n.code,{children:"Component"})," class that defines the component's interface and behavior.\nFor example, the ",(0,s.jsx)(n.a,{href:"https://github.com/langflow-ai/langflow/blob/main/src/backend/base/langflow/components/langchain_utilities/recursive_character.py",children:"Recursive character text splitter"})," is a child of the ",(0,s.jsx)(n.a,{href:"https://github.com/langflow-ai/langflow/blob/main/src/backend/base/langflow/base/textsplitters/model.py",children:"LCTextSplitterComponent"})," class."]}),"\n",(0,s.jsxs)(n.p,{children:["Each component's code includes definitions for inputs and outputs, which are represented in the ",(0,s.jsx)(n.strong,{children:"Workspace"})," as ",(0,s.jsx)(n.a,{href:"/concepts-components#component-ports",children:"component ports"}),".\nFor example, the ",(0,s.jsx)(n.code,{children:"RecursiveCharacterTextSplitter"})," has four inputs. Each input definition specifies the input type, such as ",(0,s.jsx)(n.code,{children:"IntInput"}),", as well as the encoded name, display name, description, and other parameters for that specific input.\nThese values determine the component settings, such as display names and tooltips in the Langflow UI."]}),"\n",(0,s.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:" inputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" IntInput(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"chunk_size"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Chunk Size"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" info",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"The maximum length of each chunk."',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" value",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"1000",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" IntInput(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"chunk_overlap"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Chunk Overlap"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" info",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"The amount of overlap between chunks."',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" value",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"200",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" DataInput(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"data_input"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Input"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" info",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"The texts to split."',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" input_types",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"[",props:{style:{color:"#C9D1D9"}}},{content:'"Document"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"Data"',props:{style:{color:"#A5D6FF"}}},{content:"],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" MessageTextInput(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"separators"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Separators"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" info",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"'The characters to split on.",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:'If left empty defaults to ["',props:{style:{color:"#A5D6FF"}}},{content:"\\\\",props:{style:{color:"#79C0FF"}}},{content:"n",props:{style:{color:"#A5D6FF"}}},{content:"\\\\",props:{style:{color:"#79C0FF"}}},{content:'n", "',props:{style:{color:"#A5D6FF"}}},{content:"\\\\",props:{style:{color:"#79C0FF"}}},{content:'n", " ", ""].\'',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" is_list",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"True",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ]",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsxs)(n.p,{children:["Additionally, components have methods or functions that handle their functionality.\nFor example, the ",(0,s.jsx)(n.code,{children:"RecursiveCharacterTextSplitter"})," has two methods:"]}),"\n",(0,s.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:" def ",props:{style:{color:"#FF7B72"}}},{content:"get_data_input",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> Any:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return ",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".data_input",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" def ",props:{style:{color:"#FF7B72"}}},{content:"build_text_splitter",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> TextSplitter:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" if not ",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".separators:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" separators: list[",props:{style:{color:"#C9D1D9"}}},{content:"str",props:{style:{color:"#79C0FF"}}},{content:"] ",props:{style:{color:"#C9D1D9"}}},{content:"| ",props:{style:{color:"#FF7B72"}}},{content:"None ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"None",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" else",props:{style:{color:"#FF7B72"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" # check if the separators list has escaped characters",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" # if there are escaped characters, unescape them",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" separators ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [unescape_string(x) ",props:{style:{color:"#C9D1D9"}}},{content:"for",props:{style:{color:"#FF7B72"}}},{content:" x ",props:{style:{color:"#C9D1D9"}}},{content:"in ",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".separators]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" RecursiveCharacterTextSplitter(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" separators",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"separators,",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" chunk_size",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".chunk_size,",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" chunk_overlap",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".chunk_overlap,",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" )",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"get_data_input"})," method retrieves the text to be split from the component's input, which makes the data available to the class.\nThe ",(0,s.jsx)(n.code,{children:"build_text_splitter"})," method creates a ",(0,s.jsx)(n.code,{children:"RecursiveCharacterTextSplitter"})," object by calling its parent class's ",(0,s.jsx)(n.code,{children:"build"})," method. Then, the text is split with the created splitter and passed to the next component."]}),"\n",(0,s.jsx)(n.h2,{id:"component-versions",children:"Component versions"}),"\n",(0,s.jsx)(n.p,{children:"Component versions and states are stored in an internal Langflow database. When you add a component to a flow, you create a detached copy of the component based on the information in the Langflow database.\nThese copies are detached from the primary Langflow database, and they don't synchronize with any updates that can occur when you upgrade your Langflow version."}),"\n",(0,s.jsxs)(n.p,{children:["In other words, an individual instance of a component retains the version number and state from the moment you add it to a specific flow. For example, if a component is at version 1.0 when you add it to a flow, it remains at version 1.0 ",(0,s.jsx)(n.em,{children:"in that flow"})," unless you update it."]}),"\n",(0,s.jsx)(n.h3,{id:"update-component-versions",children:"Update component versions"}),"\n",(0,s.jsxs)(n.p,{children:["When editing a flow in the ",(0,s.jsx)(n.strong,{children:"Workspace"}),", Langflow notifies you if a component's workspace version is behind the database version so you can update the component's workspace version:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Update ready"}),": This notification means the component update contains no breaking changes."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Update available"}),": This notification means the component update might contain breaking changes."]}),"\n",(0,s.jsx)(n.p,{children:"Breaking changes modify component inputs and outputs, causing the components to be disconnected and break the flow. After updating the component, you might need to edit the component settings or reconnect component ports."}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"There are two ways to update components:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Click ",(0,s.jsx)(n.strong,{children:"Update"})," to update a single component. This is recommended for updates without breaking changes."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Click ",(0,s.jsx)(n.strong,{children:"Review"})," to view all available updates and create a snapshot before updating. This is recommended for updates with breaking changes."]}),"\n",(0,s.jsxs)(n.p,{children:["To save a snapshot of your flow before updating the components, enable ",(0,s.jsx)(n.strong,{children:"Create backup flow before updating"}),". Backup flows are stored in the same project folder as the original flow with the suffix ",(0,s.jsx)(n.code,{children:"(backup)"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["To update specific components, select the components you want to update, and then click ",(0,s.jsx)(n.strong,{children:"Update Components"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Components are updated to the latest available version, based on the version of Langflow you are running."}),"\n",(0,s.jsx)(n.h2,{id:"group-components",children:"Group components"}),"\n",(0,s.jsxs)(n.p,{children:["Multiple components can be grouped into a single component for reuse. This is useful for organizing large flows by combining related components together, such as a RAG ",(0,s.jsx)(n.strong,{children:"Agent"})," component and an associated vector database component."]}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Hold ",(0,s.jsx)("kbd",{children:"Shift"}),", and then click and drag to highlight all components you want to merge. Components must be completely within the selection area to be merged."]}),"\n",(0,s.jsxs)(n.p,{children:["Alternatively, to select components for merging one by one, hold ",(0,s.jsx)("kbd",{children:"Ctrl"})," on Windows or ",(0,s.jsx)("kbd",{children:"Cmd"})," on Mac, and then click each component to add them to the group."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Release the mouse and keyboard, and then click ",(0,s.jsx)(n.strong,{children:"Group"})," to merge the components into a single, group component."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Grouped components are configured and managed as a single component, including the component name, code, and settings."}),"\n",(0,s.jsxs)(n.p,{children:["To ungroup the components, click the component in the ",(0,s.jsx)(n.strong,{children:"Workspace"})," to expose the component's header menu, click ",(0,s.jsx)(l.A,{name:"Ellipsis","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Show More"}),", and then select ",(0,s.jsx)(n.strong,{children:"Ungroup"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["If you want to reuse this grouping in other flows, click the component in the ",(0,s.jsx)(n.strong,{children:"Workspace"})," to expose the component's header menu, click ",(0,s.jsx)(l.A,{name:"Ellipsis","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Show More"}),", and then select ",(0,s.jsx)(n.strong,{children:"Save"})," to save the component to the ",(0,s.jsx)(n.strong,{children:"Components"})," menu."]})]})}function g(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(m,{...e})}):m(e)}function x(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},58876:(e,n,o)=>{o.d(n,{A:()=>t});const t=o.p+"assets/images/agent-component-4c496697124cfebd3883ee9ade19ca5c.png"},64599:(e,n,o)=>{o.d(n,{A:()=>t});const t=o.p+"assets/images/select-output-f7d64629d278098e3fba32fe79f79ed6.png"}}]); \ No newline at end of file diff --git a/assets/js/7819cc1c.3ffd2d35.js b/assets/js/7819cc1c.3ffd2d35.js deleted file mode 100644 index b67c8ebb45..0000000000 --- a/assets/js/7819cc1c.3ffd2d35.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[6006],{9898:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/component-llm-router-1b417082a0208a70065bc177a78fab67.png"},13533:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/component-dataframe-operations-031488ccf4e3d3378f8842f0ea10682c.png"},17886:(e,t,n)=>{n.d(t,{A:()=>o});n(96540);var s=n(64058),r=n(74848);function o({name:e,...t}){const n=s[e];return n?(0,r.jsx)(n,{...t}):null}},35073:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/component-save-to-file-67ebbb733732670897bedd9fd1b87583.png"},40966:(e,t,n)=>{n.r(t),n.d(t,{CH:()=>h,assets:()=>a,chCodeConfig:()=>x,contentTitle:()=>d,default:()=>m,frontMatter:()=>l,metadata:()=>s,toc:()=>p});const s=JSON.parse('{"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.","source":"@site/docs/Components/components-processing.mdx","sourceDirName":"Components","slug":"/components-processing","permalink":"/components-processing","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Processing","slug":"/components-processing"},"sidebar":"docs","previous":{"title":"Language models","permalink":"/components-models"},"next":{"title":"Prompts","permalink":"/components-prompts"}}');var r=n(74848),o=n(28453),i=n(24754),c=n(17886);const l={title:"Processing",slug:"/components-processing"},d=void 0,a={},h={annotations:i.hk,Code:i.Cy},x={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},p=[{value:"Batch Run",id:"batch-run",level:2},{value:"Data operations",id:"data-operations",level:2},{value:"Operations",id:"operations",level:3},{value:"DataFrame operations",id:"dataframe-operations",level:2},{value:"Operations",id:"operations-1",level:3},{value:"LLM router",id:"llm-router",level:2},{value:"Parser",id:"parser",level:2},{value:"Python interpreter",id:"python-interpreter",level:2},{value:"Save file",id:"save-file",level:2},{value:"File input format options",id:"file-input-format-options",level:3},{value:"Smart function",id:"smart-function",level:2},{value:"Split text",id:"split-text",level:2},{value:"Structured output",id:"structured-output",level:2},{value:"Type convert",id:"type-convert",level:2},{value:"Legacy components",id:"legacy-components",level:2},{value:"Alter metadata",id:"alter-metadata",level:3},{value:"Combine data",id:"combine-data",level:3},{value:"Combine text",id:"combine-text",level:3},{value:"Create data",id:"create-data",level:3},{value:"Data to DataFrame",id:"data-to-dataframe",level:3},{value:"Filter data",id:"filter-data",level:3},{value:"Filter values",id:"filter-values",level:3},{value:"JSON cleaner",id:"json-cleaner",level:3},{value:"Message to data",id:"message-to-data",level:3},{value:"Parse DataFrame",id:"parse-dataframe",level:3},{value:"Parse JSON",id:"parse-json",level:3},{value:"Regex extractor",id:"regex-extractor",level:3},{value:"Select data",id:"select-data",level:3},{value:"Update data",id:"update-data",level:3}];function j(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,o.R)(),...e.components},{Details:s}=t;return h||u("CH",!1),h.Code||u("CH.Code",!0),s||u("Details",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.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,r.jsxs)(t.p,{children:["Processing components process and transform data within a flow, like converting ",(0,r.jsx)(t.code,{children:"Data"})," to text with a ",(0,r.jsx)(t.a,{href:"#parser",children:"Parser"})," component, filtering data with natural language with the ",(0,r.jsx)(t.a,{href:"#smart-function",children:"Smart function"}),", or saving data to your local machine with ",(0,r.jsx)(t.a,{href:"#save-file",children:"Save File"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"batch-run",children:"Batch Run"}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Batch Run"})," component runs a language model over ",(0,r.jsx)(t.strong,{children:"each row"})," of a ",(0,r.jsx)(t.a,{href:"/concepts-objects#dataframe-object",children:"DataFrame"})," text column and returns a new DataFrame with the original text and an LLM response."]}),"\n",(0,r.jsx)(t.p,{children:"The response contains the following columns:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"text_input"}),": The original text from the input DataFrame."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"model_response"}),": The model's response for each input."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"batch_index"}),": The processing order, with a ",(0,r.jsx)(t.code,{children:"0"}),"-based index."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"metadata"})," (optional): Additional information about the processing."]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["These columns, when connected to a ",(0,r.jsx)(t.strong,{children:"Parser"})," component, can be used as variables within curly braces."]}),"\n",(0,r.jsxs)(t.p,{children:["To use the Batch Run component with a ",(0,r.jsx)(t.strong,{children:"Parser"})," component, do the following:"]}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["Connect a ",(0,r.jsx)(t.strong,{children:"Model"})," component to the ",(0,r.jsx)(t.strong,{children:"Batch Run"})," component's ",(0,r.jsx)(t.strong,{children:"Language model"})," port."]}),"\n",(0,r.jsxs)(t.li,{children:["Connect a component that outputs DataFrame, like ",(0,r.jsx)(t.strong,{children:"File"})," component, to the ",(0,r.jsx)(t.strong,{children:"Batch Run"})," component's ",(0,r.jsx)(t.strong,{children:"DataFrame"})," input."]}),"\n",(0,r.jsxs)(t.li,{children:["Connect the ",(0,r.jsx)(t.strong,{children:"Batch Run"})," component's ",(0,r.jsx)(t.strong,{children:"Batch Results"})," output to a ",(0,r.jsx)(t.strong,{children:"Parser"})," component's ",(0,r.jsx)(t.strong,{children:"DataFrame"})," input.\nThe flow looks like this:"]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"A batch run component connected to OpenAI and a Parser",src:n(88103).A+"",width:"4000",height:"2728"})}),"\n",(0,r.jsxs)(t.ol,{start:"4",children:["\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Column Name"})," field of the ",(0,r.jsx)(t.strong,{children:"Batch Run"})," component, enter a column name based on the data you're loading from the ",(0,r.jsx)(t.strong,{children:"File"})," loader. For example, to process a column of ",(0,r.jsx)(t.code,{children:"name"}),", enter ",(0,r.jsx)(t.code,{children:"name"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Optionally, in the ",(0,r.jsx)(t.strong,{children:"System Message"})," field of the ",(0,r.jsx)(t.strong,{children:"Batch Run"})," component, enter a ",(0,r.jsx)(t.strong,{children:"System Message"})," to instruct the connected LLM on how to process your file. For example, ",(0,r.jsx)(t.code,{children:"Create a business card for each name."})]}),"\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Template"})," field of the ",(0,r.jsx)(t.strong,{children:"Parser"})," component, enter a template for using the ",(0,r.jsx)(t.strong,{children:"Batch Run"})," component's new DataFrame columns.\nTo use all three columns from the ",(0,r.jsx)(t.strong,{children:"Batch Run"})," component, include them like this:"]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"record_number: {batch_index}, name: {text_input}, summary: {model_response}",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(t.ol,{start:"7",children:["\n",(0,r.jsxs)(t.li,{children:["To run the flow, in the ",(0,r.jsx)(t.strong,{children:"Parser"})," component, click ",(0,r.jsx)(c.A,{name:"Play","aria-hidden":"True"})," ",(0,r.jsx)(t.strong,{children:"Run component"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["To view your created DataFrame, in the ",(0,r.jsx)(t.strong,{children:"Parser"})," component, click ",(0,r.jsx)(c.A,{name:"TextSearch","aria-hidden":"True"})," ",(0,r.jsx)(t.strong,{children:"Inspect output"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Optionally, connect a ",(0,r.jsx)(t.strong,{children:"Chat Output"})," component, and open the ",(0,r.jsx)(t.strong,{children:"Playground"})," to see the output."]}),"\n"]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"model"}),(0,r.jsx)(t.td,{children:"HandleInput"}),(0,r.jsx)(t.td,{children:"Connect the 'Language Model' output from your LLM component here. Required."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"system_message"}),(0,r.jsx)(t.td,{children:"MultilineInput"}),(0,r.jsx)(t.td,{children:"A multi-line system instruction for all rows in the DataFrame."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"df"}),(0,r.jsx)(t.td,{children:"DataFrameInput"}),(0,r.jsx)(t.td,{children:"The DataFrame whose column is treated as text messages, as specified by 'column_name'. Required."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"column_name"}),(0,r.jsx)(t.td,{children:"MessageTextInput"}),(0,r.jsx)(t.td,{children:"The name of the DataFrame column to treat as text messages. If empty, all columns are formatted in TOML."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"output_column_name"}),(0,r.jsx)(t.td,{children:"MessageTextInput"}),(0,r.jsxs)(t.td,{children:["Name of the column where the model's response is stored. Default=",(0,r.jsx)(t.code,{children:"model_response"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"enable_metadata"}),(0,r.jsx)(t.td,{children:"BoolInput"}),(0,r.jsx)(t.td,{children:"If True, add metadata to the output DataFrame."})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"batch_results"}),(0,r.jsx)(t.td,{children:"DataFrame"}),(0,r.jsx)(t.td,{children:"A DataFrame with all original columns plus the model's response column."})]})})]})]}),"\n",(0,r.jsx)(t.h2,{id:"data-operations",children:"Data operations"}),"\n",(0,r.jsxs)(t.p,{children:["This component performs operations on ",(0,r.jsx)(t.a,{href:"/concepts-objects#data-object",children:"Data"})," objects, including selecting keys, evaluating literals, combining data, filtering values, appending/updating data, removing keys, and renaming keys."]}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["To use this component in a flow, connect a component that outputs ",(0,r.jsx)(t.a,{href:"/concepts-objects#data-object",children:"Data"})," to the ",(0,r.jsx)(t.strong,{children:"Data Operations"})," component's input.\nAll operations in the component require at least one ",(0,r.jsx)(t.a,{href:"/concepts-objects#data-object",children:"Data"})," input."]}),"\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Operations"})," field, select the operation you want to perform.\nFor example, send this request to the ",(0,r.jsx)(t.strong,{children:"Webhook"})," component.\nReplace ",(0,r.jsx)(t.code,{children:"FLOW_ID"})," and ",(0,r.jsx)(t.code,{children:"LANGFLOW_API_KEY"})," with the values from your deployment."]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:'POST "http://localhost:7860/api/v1/webhook/FLOW_ID" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:"-H ",props:{style:{color:"#C9D1D9"}}},{content:"'Content-Type: application/json' ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:"-H ",props:{style:{color:"#C9D1D9"}}},{content:"'x-api-key: LANGFLOW_API_KEY' ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:"-d ",props:{style:{color:"#C9D1D9"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "id": 1,',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "name": "Leanne Graham",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "username": "Bret",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "email": "Sincere@april.biz",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "address": {',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "street": "Kulas Light",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "suite": "Apt. 556",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "city": "Gwenborough",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "zipcode": "92998-3874",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "geo": {',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "lat": "-37.3159",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "lng": "81.1496"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "phone": "1-770-736-8031 x56442",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "website": "hildegard.org",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "company": {',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "name": "Romaguera-Crona",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "catchPhrase": "Multi-layered client-server neural-net",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "bs": "harness real-time e-markets"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,r.jsxs)(t.ol,{start:"3",children:["\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Data Operations"})," component, select the ",(0,r.jsx)(t.strong,{children:"Select Keys"})," operation to extract specific user information.\nTo add additional keys, click ",(0,r.jsx)(c.A,{name:"Plus","aria-hidden":"True"})," ",(0,r.jsx)(t.strong,{children:"Add more"}),".\n",(0,r.jsx)(t.img,{alt:"A webhook and data operations component",src:n(46445).A+"",width:"4000",height:"1920"})]}),"\n",(0,r.jsxs)(t.li,{children:["Filter by ",(0,r.jsx)(t.code,{children:"name"}),", ",(0,r.jsx)(t.code,{children:"username"}),", and ",(0,r.jsx)(t.code,{children:"email"})," to select the values from the request.","\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Leanne Graham"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "username"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Bret"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "email"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Sincere@april.biz"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(t.h3,{id:"operations",children:"Operations"}),"\n",(0,r.jsxs)(t.p,{children:["The component supports the following operations.\nAll operations in the ",(0,r.jsx)(t.strong,{children:"Data operations"})," component require at least one ",(0,r.jsx)(t.a,{href:"/concepts-objects#data-object",children:"Data"})," input."]}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Operation"}),(0,r.jsx)(t.th,{children:"Required Inputs"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Select Keys"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"select_keys_input"})}),(0,r.jsx)(t.td,{children:"Selects specific keys from the data."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Literal Eval"}),(0,r.jsx)(t.td,{children:"None"}),(0,r.jsx)(t.td,{children:"Evaluates string values as Python literals."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Combine"}),(0,r.jsx)(t.td,{children:"None"}),(0,r.jsx)(t.td,{children:"Combines multiple data objects into one."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Filter Values"}),(0,r.jsxs)(t.td,{children:[(0,r.jsx)(t.code,{children:"filter_key"}),", ",(0,r.jsx)(t.code,{children:"filter_values"}),", ",(0,r.jsx)(t.code,{children:"operator"})]}),(0,r.jsx)(t.td,{children:"Filters data based on key-value pair."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Append or Update"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"append_update_data"})}),(0,r.jsx)(t.td,{children:"Adds or updates key-value pairs."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Remove Keys"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"remove_keys_input"})}),(0,r.jsx)(t.td,{children:"Removes specified keys from the data."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Rename Keys"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"rename_keys_input"})}),(0,r.jsx)(t.td,{children:"Renames keys in the data."})]})]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"data"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsxs)(t.td,{children:["The ",(0,r.jsx)(t.a,{href:"/concepts-objects#data-object",children:"Data"})," object to operate on."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"operations"}),(0,r.jsx)(t.td,{children:"Operations"}),(0,r.jsx)(t.td,{children:"The operation to perform on the data."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"select_keys_input"}),(0,r.jsx)(t.td,{children:"Select Keys"}),(0,r.jsx)(t.td,{children:"A list of keys to select from the data."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"filter_key"}),(0,r.jsx)(t.td,{children:"Filter Key"}),(0,r.jsx)(t.td,{children:"The key to filter by."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"operator"}),(0,r.jsx)(t.td,{children:"Comparison Operator"}),(0,r.jsx)(t.td,{children:"The operator to apply for comparing values."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"filter_values"}),(0,r.jsx)(t.td,{children:"Filter Values"}),(0,r.jsx)(t.td,{children:"A list of values to filter by."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"append_update_data"}),(0,r.jsx)(t.td,{children:"Append or Update"}),(0,r.jsx)(t.td,{children:"The data to append or update the existing data with."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"remove_keys_input"}),(0,r.jsx)(t.td,{children:"Remove Keys"}),(0,r.jsx)(t.td,{children:"A list of keys to remove from the data."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"rename_keys_input"}),(0,r.jsx)(t.td,{children:"Rename Keys"}),(0,r.jsx)(t.td,{children:"A list of keys to rename in the data."})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"data_output"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsx)(t.td,{children:"The resulting Data object after the operation."})]})})]})]}),"\n",(0,r.jsx)(t.h2,{id:"dataframe-operations",children:"DataFrame operations"}),"\n",(0,r.jsxs)(t.p,{children:["This component performs operations on ",(0,r.jsx)(t.a,{href:"https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html",children:"DataFrame"})," rows and columns."]}),"\n",(0,r.jsxs)(t.p,{children:["To use this component in a flow, connect a component that outputs ",(0,r.jsx)(t.a,{href:"/concepts-objects#dataframe-object",children:"DataFrame"})," to the ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component."]}),"\n",(0,r.jsxs)(t.p,{children:["This example fetches JSON data from an API. The ",(0,r.jsx)(t.strong,{children:"Smart Filter"})," component extracts and flattens the results into a tabular DataFrame. The ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component can then work with the retrieved data."]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"Dataframe operations with flattened dataframe",src:n(13533).A+"",width:"4000",height:"2120"})}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["The ",(0,r.jsx)(t.strong,{children:"API Request"})," component retrieves data with only ",(0,r.jsx)(t.code,{children:"source"})," and ",(0,r.jsx)(t.code,{children:"result"})," fields.\nFor this example, the desired data is nested within the ",(0,r.jsx)(t.code,{children:"result"})," field."]}),"\n",(0,r.jsxs)(t.li,{children:["Connect a ",(0,r.jsx)(t.strong,{children:"Smart Filter"})," to the API request component, and a ",(0,r.jsx)(t.strong,{children:"Language model"})," to the ",(0,r.jsx)(t.strong,{children:"Smart Filter"}),". This example connects a ",(0,r.jsx)(t.strong,{children:"Groq"})," model component."]}),"\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Groq"})," model component, add your ",(0,r.jsx)(t.strong,{children:"Groq"})," API key."]}),"\n",(0,r.jsxs)(t.li,{children:["To filter the data, in the ",(0,r.jsx)(t.strong,{children:"Smart filter"})," component, in the ",(0,r.jsx)(t.strong,{children:"Instructions"})," field, use natural language to describe how the data should be filtered.\nFor this example, enter:"]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"I want to explode the result column out into a Data object",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsxs)(t.p,{children:["Avoid punctuation in the ",(0,r.jsx)(t.strong,{children:"Instructions"})," field, as it can cause errors."]})}),"\n",(0,r.jsxs)(t.ol,{start:"5",children:["\n",(0,r.jsxs)(t.li,{children:["To run the flow, in the ",(0,r.jsx)(t.strong,{children:"Smart Filter"})," component, click ",(0,r.jsx)(c.A,{name:"Play","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Run component"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["To inspect the filtered data, in the ",(0,r.jsx)(t.strong,{children:"Smart Filter"})," component, click ",(0,r.jsx)(c.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Inspect output"}),".\nThe result is a structured DataFrame."]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"id | name | company | username | email | address | zip",props:{}}]},{tokens:[{content:"---|------------------|----------------------|-----------------|------------------------------------|-------------------|-------",props:{}}]},{tokens:[{content:"1 | Emily Johnson | ABC Corporation | emily_johnson | emily.johnson@abccorporation.com | 123 Main St | 12345",props:{}}]},{tokens:[{content:"2 | Michael Williams | XYZ Corp | michael_williams| michael.williams@xyzcorp.com | 456 Elm Ave | 67890",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(t.ol,{start:"7",children:["\n",(0,r.jsxs)(t.li,{children:["Add the ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component, and a ",(0,r.jsx)(t.strong,{children:"Chat Output"})," component to the flow."]}),"\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component, in the ",(0,r.jsx)(t.strong,{children:"Operation"})," field, select ",(0,r.jsx)(t.strong,{children:"Filter"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["To apply a filter, in the ",(0,r.jsx)(t.strong,{children:"Column Name"})," field, enter a column to filter on. This example filters by ",(0,r.jsx)(t.code,{children:"name"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Click ",(0,r.jsx)(t.strong,{children:"Playground"}),", and then click ",(0,r.jsx)(t.strong,{children:"Run Flow"}),".\nThe flow extracts the values from the ",(0,r.jsx)(t.code,{children:"name"})," column."]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"name",props:{}}]},{tokens:[{content:"Emily Johnson",props:{}}]},{tokens:[{content:"Michael Williams",props:{}}]},{tokens:[{content:"John Smith",props:{}}]},{tokens:[{content:"...",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsx)(t.h3,{id:"operations-1",children:"Operations"}),"\n",(0,r.jsxs)(t.p,{children:["This component can perform the following operations on Pandas ",(0,r.jsx)(t.a,{href:"https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html",children:"DataFrame"}),"."]}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Operation"}),(0,r.jsx)(t.th,{children:"Required Inputs"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Add Column"}),(0,r.jsx)(t.td,{children:"new_column_name, new_column_value"}),(0,r.jsx)(t.td,{children:"Adds a new column with a constant value."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Drop Column"}),(0,r.jsx)(t.td,{children:"column_name"}),(0,r.jsx)(t.td,{children:"Removes a specified column."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Filter"}),(0,r.jsx)(t.td,{children:"column_name, filter_value"}),(0,r.jsx)(t.td,{children:"Filters rows based on column value."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Head"}),(0,r.jsx)(t.td,{children:"num_rows"}),(0,r.jsxs)(t.td,{children:["Returns first ",(0,r.jsx)(t.code,{children:"n"})," rows."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Rename Column"}),(0,r.jsx)(t.td,{children:"column_name, new_column_name"}),(0,r.jsx)(t.td,{children:"Renames an existing column."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Replace Value"}),(0,r.jsx)(t.td,{children:"column_name, replace_value, replacement_value"}),(0,r.jsx)(t.td,{children:"Replaces values in a column."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Select Columns"}),(0,r.jsx)(t.td,{children:"columns_to_select"}),(0,r.jsx)(t.td,{children:"Selects specific columns."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Sort"}),(0,r.jsx)(t.td,{children:"column_name, ascending"}),(0,r.jsx)(t.td,{children:"Sorts DataFrame by column."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Tail"}),(0,r.jsx)(t.td,{children:"num_rows"}),(0,r.jsxs)(t.td,{children:["Returns last ",(0,r.jsx)(t.code,{children:"n"})," rows."]})]})]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"df"}),(0,r.jsx)(t.td,{children:"DataFrame"}),(0,r.jsx)(t.td,{children:"The input DataFrame to operate on."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"operation"}),(0,r.jsx)(t.td,{children:"Operation"}),(0,r.jsx)(t.td,{children:"The DataFrame operation to perform. Options include Add Column, Drop Column, Filter, Head, Rename Column, Replace Value, Select Columns, Sort, and Tail."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"column_name"}),(0,r.jsx)(t.td,{children:"Column Name"}),(0,r.jsx)(t.td,{children:"The column name to use for the operation."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"filter_value"}),(0,r.jsx)(t.td,{children:"Filter Value"}),(0,r.jsx)(t.td,{children:"The value to filter rows by."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"ascending"}),(0,r.jsx)(t.td,{children:"Sort Ascending"}),(0,r.jsx)(t.td,{children:"Whether to sort in ascending order."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"new_column_name"}),(0,r.jsx)(t.td,{children:"New Column Name"}),(0,r.jsx)(t.td,{children:"The new column name when renaming or adding a column."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"new_column_value"}),(0,r.jsx)(t.td,{children:"New Column Value"}),(0,r.jsx)(t.td,{children:"The value to populate the new column with."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"columns_to_select"}),(0,r.jsx)(t.td,{children:"Columns to Select"}),(0,r.jsx)(t.td,{children:"A list of column names to select."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"num_rows"}),(0,r.jsx)(t.td,{children:"Number of Rows"}),(0,r.jsx)(t.td,{children:"The number of rows to return for head/tail operations. The default is 5."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"replace_value"}),(0,r.jsx)(t.td,{children:"Value to Replace"}),(0,r.jsx)(t.td,{children:"The value to replace in the column."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"replacement_value"}),(0,r.jsx)(t.td,{children:"Replacement Value"}),(0,r.jsx)(t.td,{children:"The value to replace with."})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"output"}),(0,r.jsx)(t.td,{children:"DataFrame"}),(0,r.jsx)(t.td,{children:"The resulting DataFrame after the operation."})]})})]})]}),"\n",(0,r.jsx)(t.h2,{id:"llm-router",children:"LLM router"}),"\n",(0,r.jsxs)(t.p,{children:["This component routes requests to the most appropriate LLM based on ",(0,r.jsx)(t.a,{href:"https://openrouter.ai/docs/quickstart",children:"OpenRouter"})," model specifications."]}),"\n",(0,r.jsx)(t.p,{children:"The judge LLM analyzed your input message to understand the evaluation context, and then selects the most appropriate model from your LLM pool."}),"\n",(0,r.jsx)(t.p,{children:"The selected model processes your input and returns the response."}),"\n",(0,r.jsxs)(t.p,{children:["To use the ",(0,r.jsx)(t.strong,{children:"LLM Router"})," component in a flow, do the following:"]}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Connect multiple ",(0,r.jsx)(t.strong,{children:"Language Model"})," components to the ",(0,r.jsx)(t.strong,{children:"LLM Router"}),"'s ",(0,r.jsx)(t.strong,{children:"Language Models"})," input."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Connect a ",(0,r.jsx)(t.strong,{children:"Judge LLM"})," component to the ",(0,r.jsx)(t.strong,{children:"Judge LLM"})," input."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Connect ",(0,r.jsx)(t.strong,{children:"Chat Input"})," and ",(0,r.jsx)(t.strong,{children:"Chat Output"})," components to the ",(0,r.jsx)(t.strong,{children:"LLM Router"}),".\nThe flow looks like this:"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"LLM router component",src:n(9898).A+"",width:"3316",height:"2492"})}),"\n",(0,r.jsxs)(t.ol,{start:"4",children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["In the LLM Router component, set your ",(0,r.jsx)(t.strong,{children:"Optimization"})," preference:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Quality"}),": Prioritizes the highest quality response."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Speed"}),": Prioritizes the fastest response time."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Cost"}),": Prioritizes the most cost-effective option."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Balanced"}),": Strikes a balance between quality, speed, and cost."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Run the flow.\nYour input is the task that the LLM router evaluates the models against, such as ",(0,r.jsx)(t.code,{children:"Write a story about horses"})," or ",(0,r.jsx)(t.code,{children:"How do I parse data objects out of JSON?"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["In the LLM Router component, select the ",(0,r.jsx)(t.strong,{children:"Model Selection Decision"})," output to view the router's reasoning."]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Model Selection Decision:",props:{}}]},{tokens:[{content:"- Selected Model Index: 0",props:{}}]},{tokens:[{content:"- Selected Langflow Model Name: gpt-4o-mini",props:{}}]},{tokens:[{content:"- Selected API Model ID (if resolved): openai/gpt-4o-mini",props:{}}]},{tokens:[{content:"- Optimization Preference: cost",props:{}}]},{tokens:[{content:"- Input Query Length: 27 characters (~5 tokens)",props:{}}]},{tokens:[{content:"- Number of Models Considered: 2",props:{}}]},{tokens:[{content:"- Specifications Source: OpenRouter API",props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"models"}),(0,r.jsx)(t.td,{children:"Language Models"}),(0,r.jsx)(t.td,{children:"A list of LLMs to route between."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"input_value"}),(0,r.jsx)(t.td,{children:"Input"}),(0,r.jsx)(t.td,{children:"The input message to be routed."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"judge_llm"}),(0,r.jsx)(t.td,{children:"Judge LLM"}),(0,r.jsx)(t.td,{children:"The LLM that evaluates and selects the most appropriate model."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"optimization"}),(0,r.jsx)(t.td,{children:"Optimization"}),(0,r.jsx)(t.td,{children:"The optimization preference between quality, speed, cost, or balanced."})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"output"}),(0,r.jsx)(t.td,{children:"Output"}),(0,r.jsx)(t.td,{children:"The response from the selected model."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"selected_model"}),(0,r.jsx)(t.td,{children:"Selected Model"}),(0,r.jsx)(t.td,{children:"The name of the chosen model."})]})]})]})]}),"\n",(0,r.jsx)(t.h2,{id:"parser",children:"Parser"}),"\n",(0,r.jsxs)(t.p,{children:["This component formats ",(0,r.jsx)(t.code,{children:"DataFrame"})," or ",(0,r.jsx)(t.code,{children:"Data"})," objects into text using templates, with an option to convert inputs directly to strings using ",(0,r.jsx)(t.code,{children:"stringify"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["To use this component, create variables for values in the ",(0,r.jsx)(t.code,{children:"template"})," the same way you would in a ",(0,r.jsx)(t.a,{href:"/components-prompts",children:"Prompt"})," component. For ",(0,r.jsx)(t.code,{children:"DataFrames"}),", use column names, for example ",(0,r.jsx)(t.code,{children:"Name: {Name}"}),". For ",(0,r.jsx)(t.code,{children:"Data"})," objects, use ",(0,r.jsx)(t.code,{children:"{text}"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["To use the ",(0,r.jsx)(t.strong,{children:"Parser"})," component with a ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component, do the following:"]}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["Connect a ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component's ",(0,r.jsx)(t.strong,{children:"DataFrame"})," output to the ",(0,r.jsx)(t.strong,{children:"Parser"})," component's ",(0,r.jsx)(t.strong,{children:"DataFrame"})," input."]}),"\n",(0,r.jsxs)(t.li,{children:["Connect the ",(0,r.jsx)(t.strong,{children:"File"})," component to the ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component's ",(0,r.jsx)(t.strong,{children:"Message"})," input."]}),"\n",(0,r.jsxs)(t.li,{children:["Connect the ",(0,r.jsx)(t.strong,{children:"OpenAI"})," model component's ",(0,r.jsx)(t.strong,{children:"Language Model"})," output to the ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component's ",(0,r.jsx)(t.strong,{children:"Language Model"})," input."]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:"The flow looks like this:"}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"A parser component connected to OpenAI and structured output",src:n(96218).A+"",width:"4000",height:"2202"})}),"\n",(0,r.jsxs)(t.ol,{start:"4",children:["\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component, click ",(0,r.jsx)(t.strong,{children:"Open Table"}),".\nThis opens a pane for structuring your table.\nThe table contains the rows ",(0,r.jsx)(t.strong,{children:"Name"}),", ",(0,r.jsx)(t.strong,{children:"Description"}),", ",(0,r.jsx)(t.strong,{children:"Type"}),", and ",(0,r.jsx)(t.strong,{children:"Multiple"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Create a table that maps to the data you're loading from the ",(0,r.jsx)(t.strong,{children:"File"})," loader.\nFor example, to create a table for employees, you might have the rows ",(0,r.jsx)(t.code,{children:"id"}),", ",(0,r.jsx)(t.code,{children:"name"}),", and ",(0,r.jsx)(t.code,{children:"email"}),", all of type ",(0,r.jsx)(t.code,{children:"string"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Template"})," field of the ",(0,r.jsx)(t.strong,{children:"Parser"})," component, enter a template for parsing the ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component's DataFrame output into structured text.\nCreate variables for values in the ",(0,r.jsx)(t.code,{children:"template"})," the same way you would in a ",(0,r.jsx)(t.a,{href:"/components-prompts",children:"Prompt"})," component.\nFor example, to present a table of employees in Markdown:"]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"# Employee Profile",props:{}}]},{tokens:[{content:"## Personal Information",props:{}}]},{tokens:[{content:"- **Name:** {name}",props:{}}]},{tokens:[{content:"- **ID:** {id}",props:{}}]},{tokens:[{content:"- **Email:** {email}",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(t.ol,{start:"7",children:["\n",(0,r.jsxs)(t.li,{children:["To run the flow, in the ",(0,r.jsx)(t.strong,{children:"Parser"})," component, click ",(0,r.jsx)(c.A,{name:"Play","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Run component"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["To view your parsed text, in the ",(0,r.jsx)(t.strong,{children:"Parser"})," component, click ",(0,r.jsx)(c.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Inspect output"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Optionally, connect a ",(0,r.jsx)(t.strong,{children:"Chat Output"})," component, and open the ",(0,r.jsx)(t.strong,{children:"Playground"})," to see the output."]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["For an additional example of using the ",(0,r.jsx)(t.strong,{children:"Parser"})," component to format a DataFrame from a ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component, see the ",(0,r.jsx)(t.strong,{children:"Market Research"})," template flow."]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"mode"}),(0,r.jsx)(t.td,{children:"Mode"}),(0,r.jsx)(t.td,{children:'The tab selection between "Parser" and "Stringify" modes. "Stringify" converts input to a string instead of using a template.'})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"pattern"}),(0,r.jsx)(t.td,{children:"Template"}),(0,r.jsxs)(t.td,{children:["The template for formatting using variables in curly brackets. For DataFrames, use column names, such as ",(0,r.jsx)(t.code,{children:"Name: {Name}"}),". For Data objects, use ",(0,r.jsx)(t.code,{children:"{text}"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"input_data"}),(0,r.jsx)(t.td,{children:"Data or DataFrame"}),(0,r.jsx)(t.td,{children:"The input to parse. Accepts either a DataFrame or Data object."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"sep"}),(0,r.jsx)(t.td,{children:"Separator"}),(0,r.jsx)(t.td,{children:"The string used to separate rows or items. The default is a newline."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"clean_data"}),(0,r.jsx)(t.td,{children:"Clean Data"}),(0,r.jsx)(t.td,{children:"When stringify is enabled, this option cleans data by removing empty rows and lines."})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"parsed_text"}),(0,r.jsx)(t.td,{children:"Parsed Text"}),(0,r.jsxs)(t.td,{children:["The resulting formatted text as a ",(0,r.jsx)(t.a,{href:"/concepts-objects#message-object",children:"Message"})," object."]})]})})]})]}),"\n",(0,r.jsx)(t.h2,{id:"python-interpreter",children:"Python interpreter"}),"\n",(0,r.jsx)(t.p,{children:"This component allows you to execute Python code with imported packages."}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["To use this component in a flow,in the ",(0,r.jsx)(t.strong,{children:"Global Imports"})," field, add the packages you want to import as a comma-separated list, such as ",(0,r.jsx)(t.code,{children:"math,pandas"}),".\nAt least one import is required."]}),"\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Python Code"})," field, enter the Python code you want to execute. Use ",(0,r.jsx)(t.code,{children:"print()"})," to see the output."]}),"\n",(0,r.jsxs)(t.li,{children:["Optionally, enable ",(0,r.jsx)(t.strong,{children:"Tool Mode"})," and connect the interpreter to an ",(0,r.jsx)(t.strong,{children:"Agent"})," as a tool.\nFor example, connect a ",(0,r.jsx)(t.strong,{children:"Python Interpreter"})," and a ",(0,r.jsx)(t.a,{href:"/components-helpers#calculator",children:"Calculator"})," as tools for an Agent, and test how it chooses different tools to solve math problems.\nThe flow looks like this:\n",(0,r.jsx)(t.img,{alt:"Python Interpreter and calculator connected to Agent",src:n(99e3).A+"",width:"3988",height:"2928"})]}),"\n",(0,r.jsxs)(t.li,{children:["Ask the agent an easier math question.\nThe ",(0,r.jsx)(t.strong,{children:"Calculator"})," tool can add, subtract, multiple, divide, or perform exponentiation.\nThe agent executes the ",(0,r.jsx)(t.code,{children:"evaluate_expression"})," tool to correctly answer the question."]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:"Result:"}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Executed evaluate_expression",props:{}}]},{tokens:[{content:"Input:",props:{}}]},{tokens:[{content:"{",props:{}}]},{tokens:[{content:' "expression": "2+5"',props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Output:",props:{}}]},{tokens:[{content:"{",props:{}}]},{tokens:[{content:' "result": "7"',props:{}}]},{tokens:[{content:"}",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(t.ol,{start:"5",children:["\n",(0,r.jsxs)(t.li,{children:["Give the agent complete Python code.\nThis example creates a Pandas DataFrame table with the imported ",(0,r.jsx)(t.code,{children:"pandas"})," packages, and returns the square root of the mean squares."]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" pandas ",props:{style:{color:"#C9D1D9"}}},{content:"as",props:{style:{color:"#FF7B72"}}},{content:" pd",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" math",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# Create a simple DataFrame",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"df ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" pd.DataFrame({",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" 'numbers'",props:{style:{color:"#A5D6FF"}}},{content:": [",props:{style:{color:"#C9D1D9"}}},{content:"1",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"2",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"3",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"4",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"5",props:{style:{color:"#79C0FF"}}},{content:"],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" 'squares'",props:{style:{color:"#A5D6FF"}}},{content:": [x",props:{style:{color:"#C9D1D9"}}},{content:"**",props:{style:{color:"#FF7B72"}}},{content:"2 ",props:{style:{color:"#79C0FF"}}},{content:"for",props:{style:{color:"#FF7B72"}}},{content:" x ",props:{style:{color:"#C9D1D9"}}},{content:"in ",props:{style:{color:"#FF7B72"}}},{content:"range",props:{style:{color:"#79C0FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"1",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"6",props:{style:{color:"#79C0FF"}}},{content:")]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"})",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# Calculate the square root of the mean",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"result ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" math.sqrt(df[",props:{style:{color:"#C9D1D9"}}},{content:"'squares'",props:{style:{color:"#A5D6FF"}}},{content:"].mean())",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"print",props:{style:{color:"#79C0FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"f",props:{style:{color:"#FF7B72"}}},{content:'"Square root of mean squares: ',props:{style:{color:"#A5D6FF"}}},{content:"{",props:{style:{color:"#79C0FF"}}},{content:"result",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:'"',props:{style:{color:"#A5D6FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,r.jsxs)(t.p,{children:["The Agent correctly chooses the ",(0,r.jsx)(t.code,{children:"run_python_repl"})," tool to solve the problem."]}),"\n",(0,r.jsx)(t.p,{children:"Result:"}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Executed run_python_repl",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"Input:",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"{",props:{}}]},{tokens:[{content:" \"python_code\": \"import pandas as pd\\nimport math\\n\\n# Create a simple DataFrame\\ndf = pd.DataFrame({\\n 'numbers': [1, 2, 3, 4, 5],\\n 'squares': [x**2 for x in range(1, 6)]\\n})\\n\\n# Calculate the square root of the mean\\nresult = math.sqrt(df['squares'].mean())\\nprint(f\\\"Square root of mean squares: {result}\\\")\"",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Output:",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"{",props:{}}]},{tokens:[{content:' "result": "Square root of mean squares: 3.3166247903554"',props:{}}]},{tokens:[{content:"}",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(t.p,{children:["If you don't include the package imports in the chat, the Agent can still create the table using ",(0,r.jsx)(t.code,{children:"pd.DataFrame"}),", because the ",(0,r.jsx)(t.code,{children:"pandas"})," package is imported globally by the Python interpreter component in the ",(0,r.jsx)(t.strong,{children:"Global Imports"})," field."]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"global_imports"}),(0,r.jsx)(t.td,{children:"String"}),(0,r.jsxs)(t.td,{children:["A comma-separated list of modules to import globally, such as ",(0,r.jsx)(t.code,{children:"math,pandas,numpy"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"python_code"}),(0,r.jsx)(t.td,{children:"Code"}),(0,r.jsx)(t.td,{children:"The Python code to execute. Only modules specified in Global Imports can be used."})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"results"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsx)(t.td,{children:"The output of the executed Python code, including any printed results or errors."})]})})]})]}),"\n",(0,r.jsx)(t.h2,{id:"save-file",children:"Save file"}),"\n",(0,r.jsxs)(t.p,{children:["This component saves ",(0,r.jsx)(t.a,{href:"/concepts-objects",children:"DataFrames, Data, or Messages"})," to various file formats."]}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["To use this component in a flow, connect a component that outputs ",(0,r.jsx)(t.a,{href:"/concepts-objects",children:"DataFrames, Data, or Messages"})," to the ",(0,r.jsx)(t.strong,{children:"Save to File"})," component's input.\nThe following example connects a ",(0,r.jsx)(t.strong,{children:"Webhook"})," component to two ",(0,r.jsx)(t.strong,{children:"Save to File"})," components to demonstrate the different outputs."]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"Two Save-to File components connected to a webhook",src:n(35073).A+"",width:"1458",height:"1732"})}),"\n",(0,r.jsxs)(t.ol,{start:"2",children:["\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Save to File"})," component's ",(0,r.jsx)(t.strong,{children:"Input Type"})," field, select the expected input type.\nThis example expects ",(0,r.jsx)(t.strong,{children:"Data"})," from the ",(0,r.jsx)(t.strong,{children:"Webhook"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"File Format"})," field, select the file type for your saved file.\nThis example uses ",(0,r.jsx)(t.code,{children:".md"})," in one ",(0,r.jsx)(t.strong,{children:"Save to File"})," component, and ",(0,r.jsx)(t.code,{children:".xlsx"})," in another."]}),"\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"File Path"})," field, enter the path for your saved file.\nThis example uses ",(0,r.jsx)(t.code,{children:"./output/employees.xlsx"})," and ",(0,r.jsx)(t.code,{children:"./output/employees.md"})," to save the files in a directory relative to where Langflow is running.\nThe component accepts both relative and absolute paths, and creates any necessary directories if they don't exist."]}),"\n"]}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsxs)(t.p,{children:["If you enter a format in the ",(0,r.jsx)(t.code,{children:"file_path"})," that is not accepted, the component appends the proper format to the file.\nFor example, if the selected ",(0,r.jsx)(t.code,{children:"file_format"})," is ",(0,r.jsx)(t.code,{children:"csv"}),", and you enter ",(0,r.jsx)(t.code,{children:"file_path"})," as ",(0,r.jsx)(t.code,{children:"./output/test.txt"}),", the file is saved as ",(0,r.jsx)(t.code,{children:"./output/test.txt.csv"})," so the file is not corrupted."]})}),"\n",(0,r.jsxs)(t.ol,{start:"5",children:["\n",(0,r.jsxs)(t.li,{children:["Send a POST request to the ",(0,r.jsx)(t.strong,{children:"Webhook"})," containing your JSON data.\nReplace ",(0,r.jsx)(t.code,{children:"YOUR_FLOW_ID"})," with your flow ID.\nThis example uses the default Langflow server address."]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:'curl -X POST "http://127.0.0.1:7860/api/v1/webhook/YOUR_FLOW_ID" \\',props:{}}]},{tokens:[{content:"-H 'Content-Type: application/json' \\",props:{}}]},{tokens:[{content:"-H 'x-api-key: LANGFLOW_API_KEY' \\",props:{}}]},{tokens:[{content:"-d '{",props:{}}]},{tokens:[{content:' "Name": ["Alex Cruz", "Kalani Smith", "Noam Johnson"],',props:{}}]},{tokens:[{content:' "Role": ["Developer", "Designer", "Manager"],',props:{}}]},{tokens:[{content:' "Department": ["Engineering", "Design", "Management"]',props:{}}]},{tokens:[{content:"}'",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(t.ol,{start:"6",children:["\n",(0,r.jsxs)(t.li,{children:["In your local filesystem, open the ",(0,r.jsx)(t.code,{children:"outputs"})," directory.\nYou should see two files created from the data you've sent: one in ",(0,r.jsx)(t.code,{children:".xlsx"})," for structured spreadsheets, and one in Markdown."]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"| Name | Role | Department |",props:{}}]},{tokens:[{content:"|:-------------|:----------|:-------------|",props:{}}]},{tokens:[{content:"| Alex Cruz | Developer | Engineering |",props:{}}]},{tokens:[{content:"| Kalani Smith | Designer | Design |",props:{}}]},{tokens:[{content:"| Noam Johnson | Manager | Management |",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsx)(t.h3,{id:"file-input-format-options",children:"File input format options"}),"\n",(0,r.jsxs)(t.p,{children:["For ",(0,r.jsx)(t.code,{children:"DataFrame"})," and ",(0,r.jsx)(t.code,{children:"Data"})," inputs, the component can create:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.code,{children:"csv"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.code,{children:"excel"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.code,{children:"json"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.code,{children:"markdown"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.code,{children:"pdf"})}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["For ",(0,r.jsx)(t.code,{children:"Message"})," inputs, the component can create:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.code,{children:"txt"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.code,{children:"json"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.code,{children:"markdown"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.code,{children:"pdf"})}),"\n"]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"input_text"}),(0,r.jsx)(t.td,{children:"Input Text"}),(0,r.jsx)(t.td,{children:"The text to analyze and extract patterns from."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"pattern"}),(0,r.jsx)(t.td,{children:"Regex Pattern"}),(0,r.jsx)(t.td,{children:"The regular expression pattern to match in the text."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"input_type"}),(0,r.jsx)(t.td,{children:"Input Type"}),(0,r.jsx)(t.td,{children:"The type of input to save."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"df"}),(0,r.jsx)(t.td,{children:"DataFrame"}),(0,r.jsx)(t.td,{children:"The DataFrame to save."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"data"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsx)(t.td,{children:"The Data object to save."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"message"}),(0,r.jsx)(t.td,{children:"Message"}),(0,r.jsx)(t.td,{children:"The Message to save."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"file_format"}),(0,r.jsx)(t.td,{children:"File Format"}),(0,r.jsx)(t.td,{children:"The file format to save the input in."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"file_path"}),(0,r.jsx)(t.td,{children:"File Path"}),(0,r.jsx)(t.td,{children:"The full file path including filename and extension."})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"data"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsx)(t.td,{children:"A list of extracted matches as Data objects."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"text"}),(0,r.jsx)(t.td,{children:"Message"}),(0,r.jsx)(t.td,{children:"The extracted matches formatted as a Message object."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"confirmation"}),(0,r.jsx)(t.td,{children:"Confirmation"}),(0,r.jsx)(t.td,{children:"The confirmation message after saving the file."})]})]})]})]}),"\n",(0,r.jsx)(t.h2,{id:"smart-function",children:"Smart function"}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsx)(t.p,{children:"Prior to Langflow 1.5, this component was named the Lambda filter."})}),"\n",(0,r.jsx)(t.p,{children:"This component uses an LLM to generate a function for filtering or transforming structured data."}),"\n",(0,r.jsxs)(t.p,{children:["To use the ",(0,r.jsx)(t.strong,{children:"Smart function"})," component, you must connect it to a ",(0,r.jsx)(t.a,{href:"/components-models",children:"Language Model"})," component, which the component uses to generate a function based on the natural language instructions in the ",(0,r.jsx)(t.strong,{children:"Instructions"})," field."]}),"\n",(0,r.jsxs)(t.p,{children:["This example gets JSON data from the ",(0,r.jsx)(t.code,{children:"https://jsonplaceholder.typicode.com/users"})," API endpoint.\nThe ",(0,r.jsx)(t.strong,{children:"Instructions"})," field in the ",(0,r.jsx)(t.strong,{children:"Smart function"})," component specifies the task ",(0,r.jsx)(t.code,{children:"extract emails"}),".\nThe connected LLM creates a filter based on the instructions, and successfully extracts a list of email addresses from the JSON data."]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"Smart function connected to an LLM",src:n(66539).A+"",width:"4000",height:"1796"})}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"data"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsx)(t.td,{children:"The structured data to filter or transform using a Lambda function."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"llm"}),(0,r.jsx)(t.td,{children:"Language Model"}),(0,r.jsxs)(t.td,{children:["The connection port for a ",(0,r.jsx)(t.a,{href:"/components-models",children:"Model"})," component."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"filter_instruction"}),(0,r.jsx)(t.td,{children:"Instructions"}),(0,r.jsxs)(t.td,{children:["The natural language instructions for how to filter or transform the data using a Lambda function, such as ",(0,r.jsx)(t.code,{children:"Filter the data to only include items where the 'status' is 'active'"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"sample_size"}),(0,r.jsx)(t.td,{children:"Sample Size"}),(0,r.jsx)(t.td,{children:"For large datasets, the number of characters to sample from the dataset head and tail."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"max_size"}),(0,r.jsx)(t.td,{children:"Max Size"}),(0,r.jsxs)(t.td,{children:['The number of characters for the data to be considered "large", which triggers sampling by the ',(0,r.jsx)(t.code,{children:"sample_size"})," value."]})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"filtered_data"}),(0,r.jsx)(t.td,{children:"Filtered Data"}),(0,r.jsxs)(t.td,{children:["The filtered or transformed ",(0,r.jsx)(t.a,{href:"/concepts-objects#data-object",children:"Data object"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"dataframe"}),(0,r.jsx)(t.td,{children:"DataFrame"}),(0,r.jsxs)(t.td,{children:["The filtered data as a ",(0,r.jsx)(t.a,{href:"/concepts-objects#dataframe-object",children:"DataFrame"}),"."]})]})]})]})]}),"\n",(0,r.jsx)(t.h2,{id:"split-text",children:"Split text"}),"\n",(0,r.jsx)(t.p,{children:"This component splits text into chunks based on specified criteria. It's ideal for chunking data to be tokenized and embedded into vector databases."}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Split Text"})," component outputs ",(0,r.jsx)(t.strong,{children:"Chunks"})," or ",(0,r.jsx)(t.strong,{children:"DataFrame"}),".\nThe ",(0,r.jsx)(t.strong,{children:"Chunks"})," output returns a list of individual text chunks.\nThe ",(0,r.jsx)(t.strong,{children:"DataFrame"})," output returns a structured data format, with additional ",(0,r.jsx)(t.code,{children:"text"})," and ",(0,r.jsx)(t.code,{children:"metadata"})," columns applied."]}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["To use this component in a flow, connect a component that outputs ",(0,r.jsx)(t.a,{href:"/concepts-objects",children:"Data or DataFrame"})," to the ",(0,r.jsx)(t.strong,{children:"Split Text"})," component's ",(0,r.jsx)(t.strong,{children:"Data"})," port.\nThis example uses the ",(0,r.jsx)(t.strong,{children:"URL"})," component, which is fetching JSON placeholder data."]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"Split text component and chroma-db",src:n(49823).A+"",width:"4000",height:"2766"})}),"\n",(0,r.jsxs)(t.ol,{start:"2",children:["\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Split Text"})," component, define your data splitting parameters."]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["This example splits incoming JSON data at the separator ",(0,r.jsx)(t.code,{children:"},"}),", so each chunk contains one JSON object."]}),"\n",(0,r.jsxs)(t.p,{children:["The order of precedence is ",(0,r.jsx)(t.strong,{children:"Separator"}),", then ",(0,r.jsx)(t.strong,{children:"Chunk Size"}),", and then ",(0,r.jsx)(t.strong,{children:"Chunk Overlap"}),".\nIf any segment after separator splitting is longer than ",(0,r.jsx)(t.code,{children:"chunk_size"}),", it is split again to fit within ",(0,r.jsx)(t.code,{children:"chunk_size"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["After ",(0,r.jsx)(t.code,{children:"chunk_size"}),", ",(0,r.jsx)(t.strong,{children:"Chunk Overlap"})," is applied between chunks to maintain context."]}),"\n",(0,r.jsxs)(t.ol,{start:"3",children:["\n",(0,r.jsxs)(t.li,{children:["Connect a ",(0,r.jsx)(t.strong,{children:"Chat Output"})," component to the ",(0,r.jsx)(t.strong,{children:"Split Text"})," component's ",(0,r.jsx)(t.strong,{children:"DataFrame"})," output to view its output."]}),"\n",(0,r.jsxs)(t.li,{children:["Click ",(0,r.jsx)(t.strong,{children:"Playground"}),", and then click ",(0,r.jsx)(t.strong,{children:"Run Flow"}),".\nThe output contains a table of JSON objects split at ",(0,r.jsx)(t.code,{children:"},"}),"."]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{}}]},{tokens:[{content:'"userId": 1,',props:{}}]},{tokens:[{content:'"id": 1,',props:{}}]},{tokens:[{content:'"title": "Introduction to Artificial Intelligence",',props:{}}]},{tokens:[{content:'"body": "Learn the basics of Artificial Intelligence and its applications in various industries.",',props:{}}]},{tokens:[{content:'"link": "https://example.com/article1",',props:{}}]},{tokens:[{content:'"comment_count": 8',props:{}}]},{tokens:[{content:"},",props:{}}]},{tokens:[{content:"{",props:{}}]},{tokens:[{content:'"userId": 2,',props:{}}]},{tokens:[{content:'"id": 2,',props:{}}]},{tokens:[{content:'"title": "Web Development with React",',props:{}}]},{tokens:[{content:'"body": "Build modern web applications using React.js and explore its powerful features.",',props:{}}]},{tokens:[{content:'"link": "https://example.com/article2",',props:{}}]},{tokens:[{content:'"comment_count": 12',props:{}}]},{tokens:[{content:"},",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(t.ol,{start:"5",children:["\n",(0,r.jsxs)(t.li,{children:["Clear the ",(0,r.jsx)(t.strong,{children:"Separator"})," field, and then run the flow again.\nInstead of JSON objects, the output contains 50-character lines of text with 10 characters of overlap."]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:'First chunk: "title": "Introduction to Artificial Intelligence""',props:{}}]},{tokens:[{content:'Second chunk: "elligence", "body": "Learn the basics of Artif"',props:{}}]},{tokens:[{content:'Third chunk: "s of Artificial Intelligence and its applications"',props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"data_inputs"}),(0,r.jsx)(t.td,{children:"Input Documents"}),(0,r.jsxs)(t.td,{children:["The data to split. The component accepts ",(0,r.jsx)(t.a,{href:"/concepts-objects#data-object",children:"Data"})," or ",(0,r.jsx)(t.a,{href:"/concepts-objects#dataframe-object",children:"DataFrame"})," objects."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"chunk_overlap"}),(0,r.jsx)(t.td,{children:"Chunk Overlap"}),(0,r.jsxs)(t.td,{children:["The number of characters to overlap between chunks. Default: ",(0,r.jsx)(t.code,{children:"200"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"chunk_size"}),(0,r.jsx)(t.td,{children:"Chunk Size"}),(0,r.jsxs)(t.td,{children:["The maximum number of characters in each chunk. Default: ",(0,r.jsx)(t.code,{children:"1000"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"separator"}),(0,r.jsx)(t.td,{children:"Separator"}),(0,r.jsxs)(t.td,{children:["The character to split on. Default: ",(0,r.jsx)(t.code,{children:"newline"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"text_key"}),(0,r.jsx)(t.td,{children:"Text Key"}),(0,r.jsxs)(t.td,{children:["The key to use for the text column. Default: ",(0,r.jsx)(t.code,{children:"text"}),"."]})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"chunks"}),(0,r.jsx)(t.td,{children:"Chunks"}),(0,r.jsxs)(t.td,{children:["A list of split text chunks as ",(0,r.jsx)(t.a,{href:"/concepts-objects#data-object",children:"Data"})," objects."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"dataframe"}),(0,r.jsx)(t.td,{children:"DataFrame"}),(0,r.jsxs)(t.td,{children:["A list of split text chunks as ",(0,r.jsx)(t.a,{href:"/concepts-objects#dataframe-object",children:"DataFrame"})," objects."]})]})]})]})]}),"\n",(0,r.jsx)(t.h2,{id:"structured-output",children:"Structured output"}),"\n",(0,r.jsx)(t.p,{children:"This component transforms LLM responses into structured data formats."}),"\n",(0,r.jsxs)(t.p,{children:["In this example from the ",(0,r.jsx)(t.strong,{children:"Financial Support Parser"})," template, the ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component transforms unstructured financial reports into structured data."]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"Structured output example",src:n(82798).A+"",width:"4000",height:"1724"})}),"\n",(0,r.jsxs)(t.p,{children:["The connected LLM model is prompted by the ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component's ",(0,r.jsx)(t.code,{children:"Format Instructions"})," parameter to extract structured output from the unstructured text. ",(0,r.jsx)(t.code,{children:"Format Instructions"})," is utilized as the system prompt for the ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component."]}),"\n",(0,r.jsxs)(t.p,{children:["In the ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component, click the ",(0,r.jsx)(t.strong,{children:"Open table"})," button to view the ",(0,r.jsx)(t.code,{children:"Output Schema"})," table.\nThe ",(0,r.jsx)(t.code,{children:"Output Schema"})," parameter defines the structure and data types for the model's output using a table with the following fields:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Name"}),": The name of the output field."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Description"}),": The purpose of the output field."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Type"}),": The data type of the output field. The available types are ",(0,r.jsx)(t.code,{children:"str"}),", ",(0,r.jsx)(t.code,{children:"int"}),", ",(0,r.jsx)(t.code,{children:"float"}),", ",(0,r.jsx)(t.code,{children:"bool"}),", ",(0,r.jsx)(t.code,{children:"list"}),", or ",(0,r.jsx)(t.code,{children:"dict"}),". The default is ",(0,r.jsx)(t.code,{children:"text"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Multiple"}),": This feature is deprecated. Currently, it is set to ",(0,r.jsx)(t.code,{children:"True"})," by default if you expect multiple values for a single field. For example, a ",(0,r.jsx)(t.code,{children:"list"})," of ",(0,r.jsx)(t.code,{children:"features"})," is set to ",(0,r.jsx)(t.code,{children:"True"})," to contain multiple values, such as ",(0,r.jsx)(t.code,{children:'["waterproof", "durable", "lightweight"]'}),". Default: ",(0,r.jsx)(t.code,{children:"True"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Parse DataFrame"})," component parses the structured output into a template for orderly presentation in chat output. The template receives the values from the ",(0,r.jsx)(t.code,{children:"output_schema"})," table with curly braces."]}),"\n",(0,r.jsxs)(t.p,{children:["For example, the template ",(0,r.jsx)(t.code,{children:"EBITDA: {EBITDA} , Net Income: {NET_INCOME} , GROSS_PROFIT: {GROSS_PROFIT}"})," presents the extracted values in the ",(0,r.jsx)(t.strong,{children:"Playground"})," as ",(0,r.jsx)(t.code,{children:"EBITDA: 900 million , Net Income: 500 million , GROSS_PROFIT: 1.2 billion"}),"."]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"llm"}),(0,r.jsx)(t.td,{children:"LanguageModel"}),(0,r.jsx)(t.td,{children:"The language model to use to generate the structured output."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"input_value"}),(0,r.jsx)(t.td,{children:"String"}),(0,r.jsx)(t.td,{children:"The input message to the language model."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"system_prompt"}),(0,r.jsx)(t.td,{children:"String"}),(0,r.jsx)(t.td,{children:"The instructions to the language model for formatting the output."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"schema_name"}),(0,r.jsx)(t.td,{children:"String"}),(0,r.jsx)(t.td,{children:"The name for the output data schema."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"output_schema"}),(0,r.jsx)(t.td,{children:"Table"}),(0,r.jsx)(t.td,{children:"The structure and data types for the model's output."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"multiple"}),(0,r.jsx)(t.td,{children:"Boolean"}),(0,r.jsxs)(t.td,{children:["[Deprecated] Always set to ",(0,r.jsx)(t.code,{children:"True"}),"."]})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"structured_output"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsx)(t.td,{children:"The structured output is a Data object based on the defined schema."})]})})]})]}),"\n",(0,r.jsx)(t.h2,{id:"type-convert",children:"Type convert"}),"\n",(0,r.jsxs)(t.p,{children:["This component converts data types between different formats. It can transform data between ",(0,r.jsx)(t.a,{href:"/concepts-objects#data-object",children:"Data"}),", ",(0,r.jsx)(t.a,{href:"/concepts-objects#dataframe-object",children:"DataFrame"}),", and ",(0,r.jsx)(t.a,{href:"/concepts-objects#message-object",children:"Message"})," objects."]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Data"}),": A structured object that contains both text and metadata."]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"User Profile"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "data"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"John Smith"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "age"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"30",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "email"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"john@example.com"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"DataFrame"}),": A tabular data structure with rows and columns.\nKeys are columns, and each dictionary (a collection of key-value pairs) in the list is a row."]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"[",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"John Smith"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "age"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"30",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "email"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"john@example.com"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Jane Doe"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "age"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"25",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "email"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"jane@example.com"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Message"}),": A string, such as",(0,r.jsx)(t.code,{children:'"Name: John Smith, Age: 30, Email: john@example.com"'}),"."]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:"To use this component in a flow, do the following:"}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["Add the ",(0,r.jsx)(t.strong,{children:"Web search"})," component to the ",(0,r.jsx)(t.a,{href:"/basic-prompting",children:"Basic prompting"})," flow. In the ",(0,r.jsx)(t.strong,{children:"Search Query"})," field, enter a query, such as ",(0,r.jsx)(t.code,{children:"environmental news"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Connect the ",(0,r.jsx)(t.strong,{children:"Web search"})," component's output to a component that accepts the DataFrame input.\nThis example uses a ",(0,r.jsx)(t.strong,{children:"Prompt"})," component to give the chatbot context, so you must convert the ",(0,r.jsx)(t.strong,{children:"Web search"})," component's DataFrame output to a Message type."]}),"\n",(0,r.jsxs)(t.li,{children:["Connect a ",(0,r.jsx)(t.strong,{children:"Type Convert"})," component to convert the DataFrame to a Message."]}),"\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Type Convert"})," component, in the ",(0,r.jsx)(t.strong,{children:"Output Type"})," field, select ",(0,r.jsx)(t.strong,{children:"Message"}),".\nYour flow looks like this:"]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"Type convert web search output to chat",src:n(42547).A+"",width:"4000",height:"1826"})}),"\n",(0,r.jsxs)(t.ol,{start:"5",children:["\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Language Model"})," component, in the ",(0,r.jsx)(t.strong,{children:"OpenAI API Key"})," field, add your OpenAI API key."]}),"\n",(0,r.jsxs)(t.li,{children:["Click ",(0,r.jsx)(t.strong,{children:"Playground"}),", and then ask about ",(0,r.jsx)(t.code,{children:"latest news"}),"."]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:"The search results are returned to the Playground as a message."}),"\n",(0,r.jsx)(t.p,{children:"Result:"}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Latest news",props:{}}]},{tokens:[{content:"AI",props:{}}]},{tokens:[{content:"gpt-4o-mini",props:{}}]},{tokens:[{content:"Here are some of the latest news articles related to the environment:",props:{}}]},{tokens:[{content:"Ozone Pollution and Global Warming: A recent study highlights that ozone pollution is a significant global environmental concern, threatening human health and crop production while exacerbating global warming. Read more",props:{}}]},{tokens:[{content:"...",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"input_data"}),(0,r.jsx)(t.td,{children:"Input Data"}),(0,r.jsx)(t.td,{children:"The data to convert. Accepts Data, DataFrame, or Message objects."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"output_type"}),(0,r.jsx)(t.td,{children:"Output Type"}),(0,r.jsx)(t.td,{children:"The desired output type. Options: Data, DataFrame, or Message."})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"output"}),(0,r.jsx)(t.td,{children:"Output"}),(0,r.jsx)(t.td,{children:"The converted data in the specified format."})]})})]})]}),"\n",(0,r.jsx)(t.h2,{id:"legacy-components",children:"Legacy components"}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Legacy"})," components are available for use but are no longer supported."]}),"\n",(0,r.jsx)(t.h3,{id:"alter-metadata",children:"Alter metadata"}),"\n",(0,r.jsx)(t.admonition,{type:"important",children:(0,r.jsxs)(t.p,{children:["This component is in ",(0,r.jsx)(t.strong,{children:"Legacy"}),", which means it is available for use but no longer in active development.\nInstead, use the ",(0,r.jsx)(t.a,{href:"#data-operations",children:"Data operations"})," component."]})}),"\n",(0,r.jsxs)(t.p,{children:["This component modifies metadata of input objects. It can add new metadata, update existing metadata, and remove specified metadata fields. The component works with both ",(0,r.jsx)(t.a,{href:"/concepts-objects#message-object",children:"Message"})," and ",(0,r.jsx)(t.a,{href:"/concepts-objects#data-object",children:"Data"})," objects, and can also create a new Data object from user-provided text."]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"input_value"}),(0,r.jsx)(t.td,{children:"Input"}),(0,r.jsx)(t.td,{children:"Objects to which Metadata should be added."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"text_in"}),(0,r.jsx)(t.td,{children:"User Text"}),(0,r.jsxs)(t.td,{children:["Text input; the value is contained in the 'text' attribute of the ",(0,r.jsx)(t.a,{href:"/concepts-objects#data-object",children:"Data"})," object. Empty text entries are ignored."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"metadata"}),(0,r.jsx)(t.td,{children:"Metadata"}),(0,r.jsx)(t.td,{children:"Metadata to add to each object."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"remove_fields"}),(0,r.jsx)(t.td,{children:"Fields to Remove"}),(0,r.jsx)(t.td,{children:"Metadata fields to remove."})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"data"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsx)(t.td,{children:"List of Input objects, each with added metadata."})]})})]})]}),"\n",(0,r.jsx)(t.h3,{id:"combine-data",children:"Combine data"}),"\n",(0,r.jsx)(t.admonition,{type:"important",children:(0,r.jsxs)(t.p,{children:["This component is in ",(0,r.jsx)(t.strong,{children:"Legacy"}),", which means it is available for use but no longer in active development.\nPrior to Langflow version 1.1.3, this component was named ",(0,r.jsx)(t.strong,{children:"Merge Data"}),"."]})}),"\n",(0,r.jsxs)(t.p,{children:["This component combines multiple data sources into a single unified ",(0,r.jsx)(t.a,{href:"/concepts-objects#data-object",children:"Data"})," object."]}),"\n",(0,r.jsx)(t.p,{children:"The component iterates through the input list of data objects, merging them into a single data object. If the input list is empty, it returns an empty data object. If there's only one input data object, it returns that object unchanged. The merging process uses the addition operator to combine data objects."}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"data"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsx)(t.td,{children:"A list of data objects to be merged."})]})})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"merged_data"}),(0,r.jsx)(t.td,{children:"Merged Data"}),(0,r.jsxs)(t.td,{children:["A single ",(0,r.jsx)(t.a,{href:"/concepts-objects#data-object",children:"Data"})," object containing the combined information from all input data objects."]})]})})]})]}),"\n",(0,r.jsx)(t.h3,{id:"combine-text",children:"Combine text"}),"\n",(0,r.jsx)(t.admonition,{type:"important",children:(0,r.jsxs)(t.p,{children:["This component is in ",(0,r.jsx)(t.strong,{children:"Legacy"}),", which means it is available for use but no longer in active development."]})}),"\n",(0,r.jsx)(t.p,{children:"This component concatenates two text sources into a single text chunk using a specified delimiter."}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["To use this component in a flow, connect two components that output ",(0,r.jsx)(t.a,{href:"/concepts-objects#message-object",children:"Messages"})," to the ",(0,r.jsx)(t.strong,{children:"Combine Text"})," component's ",(0,r.jsx)(t.strong,{children:"First Text"})," and ",(0,r.jsx)(t.strong,{children:"Second Text"})," inputs.\nThis example uses two ",(0,r.jsx)(t.strong,{children:"Text Input"})," components."]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"Combine text component",src:n(41502).A+"",width:"1148",height:"675"})}),"\n",(0,r.jsxs)(t.ol,{start:"2",children:["\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Combine Text"})," component, in the ",(0,r.jsx)(t.strong,{children:"Text"})," fields of both ",(0,r.jsx)(t.strong,{children:"Text Input"})," components, enter some text to combine."]}),"\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Combine Text"})," component, enter an optional ",(0,r.jsx)(t.strong,{children:"Delimiter"})," value.\nThe delimiter character separates the combined texts.\nThis example uses ",(0,r.jsx)(t.code,{children:"\\n\\n **end first text** \\n\\n **start second text** \\n\\n"})," to label the texts and create newlines between them."]}),"\n",(0,r.jsxs)(t.li,{children:["Connect a ",(0,r.jsx)(t.strong,{children:"Chat Output"})," component to view the text combination."]}),"\n",(0,r.jsxs)(t.li,{children:["Click ",(0,r.jsx)(t.strong,{children:"Playground"}),", and then click ",(0,r.jsx)(t.strong,{children:"Run Flow"}),".\nThe combined text appears in the ",(0,r.jsx)(t.strong,{children:"Playground"}),"."]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"This is the first text. Let's combine text!",props:{}}]},{tokens:[{content:"end first text",props:{}}]},{tokens:[{content:"start second text",props:{}}]},{tokens:[{content:"Here's the second part. We'll see how combining text works.",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"first_text"}),(0,r.jsx)(t.td,{children:"First Text"}),(0,r.jsx)(t.td,{children:"The first text input to concatenate."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"second_text"}),(0,r.jsx)(t.td,{children:"Second Text"}),(0,r.jsx)(t.td,{children:"The second text input to concatenate."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"delimiter"}),(0,r.jsx)(t.td,{children:"Delimiter"}),(0,r.jsx)(t.td,{children:"A string used to separate the two text inputs. The default is a space."})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"message"}),(0,r.jsx)(t.td,{children:"Message"}),(0,r.jsx)(t.td,{children:"A Message object containing the combined text."})]})})]})]}),"\n",(0,r.jsx)(t.h3,{id:"create-data",children:"Create data"}),"\n",(0,r.jsx)(t.admonition,{type:"important",children:(0,r.jsxs)(t.p,{children:["This component is in ",(0,r.jsx)(t.strong,{children:"Legacy"}),", which means it is available for use but no longer in active development."]})}),"\n",(0,r.jsxs)(t.p,{children:["This component dynamically creates a ",(0,r.jsx)(t.a,{href:"/concepts-objects#data-object",children:"Data"})," object with a specified number of fields."]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"number_of_fields"}),(0,r.jsx)(t.td,{children:"Number of Fields"}),(0,r.jsx)(t.td,{children:"The number of fields to be added to the record."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"text_key"}),(0,r.jsx)(t.td,{children:"Text Key"}),(0,r.jsx)(t.td,{children:"Key that identifies the field to be used as the text content."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"text_key_validator"}),(0,r.jsx)(t.td,{children:"Text Key Validator"}),(0,r.jsxs)(t.td,{children:["If enabled, checks if the given ",(0,r.jsx)(t.code,{children:"Text Key"})," is present in the given ",(0,r.jsx)(t.code,{children:"Data"}),"."]})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"data"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsxs)(t.td,{children:["A ",(0,r.jsx)(t.a,{href:"/concepts-objects#data-object",children:"Data"})," object created with the specified fields and text key."]})]})})]})]}),"\n",(0,r.jsx)(t.h3,{id:"data-to-dataframe",children:"Data to DataFrame"}),"\n",(0,r.jsx)(t.admonition,{type:"important",children:(0,r.jsxs)(t.p,{children:["This component is in ",(0,r.jsx)(t.strong,{children:"Legacy"}),", which means it is available for use but no longer in active development."]})}),"\n",(0,r.jsxs)(t.p,{children:["This component converts one or multiple ",(0,r.jsx)(t.a,{href:"/concepts-objects#data-object",children:"Data"})," objects into a ",(0,r.jsx)(t.a,{href:"/concepts-objects#dataframe-object",children:"DataFrame"}),". Each Data object corresponds to one row in the resulting DataFrame. Fields from the ",(0,r.jsx)(t.code,{children:".data"})," attribute become columns, and the ",(0,r.jsx)(t.code,{children:".text"})," field (if present) is placed in a 'text' column."]}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["To use this component in a flow, connect a component that outputs ",(0,r.jsx)(t.a,{href:"/concepts-objects#data-object",children:"Data"})," to the ",(0,r.jsx)(t.strong,{children:"Data to Dataframe"})," component's input.\nThis example connects a ",(0,r.jsx)(t.strong,{children:"Webhook"})," component to convert ",(0,r.jsx)(t.code,{children:"text"})," and ",(0,r.jsx)(t.code,{children:"data"})," into a DataFrame."]}),"\n",(0,r.jsxs)(t.li,{children:["To view the flow's output, connect a ",(0,r.jsx)(t.strong,{children:"Chat Output"})," component to the ",(0,r.jsx)(t.strong,{children:"Data to Dataframe"})," component."]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"A webhook and data to dataframe",src:n(45709).A+"",width:"1221",height:"468"})}),"\n",(0,r.jsxs)(t.ol,{start:"3",children:["\n",(0,r.jsxs)(t.li,{children:["Send a POST request to the ",(0,r.jsx)(t.strong,{children:"Webhook"})," containing your JSON data.\nReplace ",(0,r.jsx)(t.code,{children:"YOUR_FLOW_ID"})," with your flow ID.\nThis example uses the default Langflow server address."]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:'curl -X POST "http://127.0.0.1:7860/api/v1/webhook/YOUR_FLOW_ID" \\',props:{}}]},{tokens:[{content:"-H 'Content-Type: application/json' \\",props:{}}]},{tokens:[{content:"-d '{",props:{}}]},{tokens:[{content:' "text": "Alex Cruz - Employee Profile",',props:{}}]},{tokens:[{content:' "data": {',props:{}}]},{tokens:[{content:' "Name": "Alex Cruz",',props:{}}]},{tokens:[{content:' "Role": "Developer",',props:{}}]},{tokens:[{content:' "Department": "Engineering"',props:{}}]},{tokens:[{content:" }",props:{}}]},{tokens:[{content:"}'",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(t.ol,{start:"4",children:["\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Playground"}),", view the output of your flow.\nThe ",(0,r.jsx)(t.strong,{children:"Data to DataFrame"})," component converts the webhook request into a ",(0,r.jsx)(t.code,{children:"DataFrame"}),", with ",(0,r.jsx)(t.code,{children:"text"})," and ",(0,r.jsx)(t.code,{children:"data"})," fields as columns."]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"| text | data |",props:{}}]},{tokens:[{content:"|:-----------------------------|:------------------------------------------------------------------------|",props:{}}]},{tokens:[{content:"| Alex Cruz - Employee Profile | {'Name': 'Alex Cruz', 'Role': 'Developer', 'Department': 'Engineering'} |",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(t.ol,{start:"5",children:["\n",(0,r.jsx)(t.li,{children:"Send another employee data object."}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:'curl -X POST "http://127.0.0.1:7860/api/v1/webhook/YOUR_FLOW_ID" \\',props:{}}]},{tokens:[{content:"-H 'Content-Type: application/json' \\",props:{}}]},{tokens:[{content:"-d '{",props:{}}]},{tokens:[{content:' "text": "Kalani Smith - Employee Profile",',props:{}}]},{tokens:[{content:' "data": {',props:{}}]},{tokens:[{content:' "Name": "Kalani Smith",',props:{}}]},{tokens:[{content:' "Role": "Designer",',props:{}}]},{tokens:[{content:' "Department": "Design"',props:{}}]},{tokens:[{content:" }",props:{}}]},{tokens:[{content:"}'",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(t.ol,{start:"6",children:["\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Playground"}),", this request is also converted to ",(0,r.jsx)(t.code,{children:"DataFrame"}),"."]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"| text | data |",props:{}}]},{tokens:[{content:"|:--------------------------------|:---------------------------------------------------------------------|",props:{}}]},{tokens:[{content:"| Kalani Smith - Employee Profile | {'Name': 'Kalani Smith', 'Role': 'Designer', 'Department': 'Design'} |",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"data_list"}),(0,r.jsx)(t.td,{children:"Data or Data List"}),(0,r.jsx)(t.td,{children:"One or multiple Data objects to transform into a DataFrame."})]})})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"dataframe"}),(0,r.jsx)(t.td,{children:"DataFrame"}),(0,r.jsx)(t.td,{children:"A DataFrame built from each Data object's fields plus a text column."})]})})]})]}),"\n",(0,r.jsx)(t.h3,{id:"filter-data",children:"Filter data"}),"\n",(0,r.jsx)(t.admonition,{type:"important",children:(0,r.jsxs)(t.p,{children:["This component is in ",(0,r.jsx)(t.strong,{children:"Legacy"}),", which means it is available for use but no longer in active development.\nInstead, use the ",(0,r.jsx)(t.a,{href:"#data-operations",children:"Data operations"})," component."]})}),"\n",(0,r.jsxs)(t.p,{children:["This component filters a ",(0,r.jsx)(t.a,{href:"/concepts-objects#data-object",children:"Data"})," object based on a list of keys."]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"data"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsx)(t.td,{children:"The Data object to filter."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"filter_criteria"}),(0,r.jsx)(t.td,{children:"Filter Criteria"}),(0,r.jsx)(t.td,{children:"A list of keys to filter by."})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"filtered_data"}),(0,r.jsx)(t.td,{children:"Filtered Data"}),(0,r.jsx)(t.td,{children:"A new Data object containing only the key-value pairs that match the filter criteria."})]})})]})]}),"\n",(0,r.jsx)(t.h3,{id:"filter-values",children:"Filter values"}),"\n",(0,r.jsx)(t.admonition,{type:"important",children:(0,r.jsxs)(t.p,{children:["This component is in ",(0,r.jsx)(t.strong,{children:"Legacy"}),", which means it is available for use but no longer in active development.\nInstead, use the ",(0,r.jsx)(t.a,{href:"#data-operations",children:"Data operations"})," component."]})}),"\n",(0,r.jsx)(t.p,{children:"The Filter values component filters a list of data items based on a specified key, filter value, and comparison operator."}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"input_data"}),(0,r.jsx)(t.td,{children:"Input data"}),(0,r.jsx)(t.td,{children:"The list of data items to filter."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"filter_key"}),(0,r.jsx)(t.td,{children:"Filter Key"}),(0,r.jsx)(t.td,{children:"The key to filter on."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"filter_value"}),(0,r.jsx)(t.td,{children:"Filter Value"}),(0,r.jsx)(t.td,{children:"The value to filter by."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"operator"}),(0,r.jsx)(t.td,{children:"Comparison Operator"}),(0,r.jsx)(t.td,{children:"The operator to apply for comparing the values."})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"filtered_data"}),(0,r.jsx)(t.td,{children:"Filtered data"}),(0,r.jsx)(t.td,{children:"The resulting list of filtered data items."})]})})]})]}),"\n",(0,r.jsx)(t.h3,{id:"json-cleaner",children:"JSON cleaner"}),"\n",(0,r.jsx)(t.admonition,{type:"important",children:(0,r.jsxs)(t.p,{children:["This component is in ",(0,r.jsx)(t.strong,{children:"Legacy"}),", which means it is available for use but no longer in active development."]})}),"\n",(0,r.jsx)(t.p,{children:"The JSON cleaner component cleans JSON strings to ensure they are fully compliant with the JSON specification."}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"json_str"}),(0,r.jsx)(t.td,{children:"JSON String"}),(0,r.jsx)(t.td,{children:"The JSON string to be cleaned. This can be a raw, potentially malformed JSON string produced by language models or other sources that may not fully comply with JSON specifications."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"remove_control_chars"}),(0,r.jsx)(t.td,{children:"Remove Control Characters"}),(0,r.jsx)(t.td,{children:"If set to True, this option removes control characters (ASCII characters 0-31 and 127) from the JSON string. This can help eliminate invisible characters that might cause parsing issues or make the JSON invalid."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"normalize_unicode"}),(0,r.jsx)(t.td,{children:"Normalize Unicode"}),(0,r.jsx)(t.td,{children:"When enabled, this option normalizes Unicode characters in the JSON string to their canonical composition form (NFC). This ensures consistent representation of Unicode characters across different systems and prevents potential issues with character encoding."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"validate_json"}),(0,r.jsx)(t.td,{children:"Validate JSON"}),(0,r.jsx)(t.td,{children:"If set to True, this option attempts to parse the JSON string to ensure it is well-formed before applying the final repair operation. It raises a ValueError if the JSON is invalid, allowing for early detection of major structural issues in the JSON."})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"output"}),(0,r.jsx)(t.td,{children:"Cleaned JSON String"}),(0,r.jsx)(t.td,{children:"The resulting cleaned, repaired, and validated JSON string that fully complies with the JSON specification."})]})})]})]}),"\n",(0,r.jsx)(t.h3,{id:"message-to-data",children:"Message to data"}),"\n",(0,r.jsxs)(t.p,{children:["This component converts ",(0,r.jsx)(t.a,{href:"/concepts-objects#message-object",children:"Message"})," objects to ",(0,r.jsx)(t.a,{href:"/concepts-objects#data-object",children:"Data"})," objects."]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"message"}),(0,r.jsx)(t.td,{children:"Message"}),(0,r.jsx)(t.td,{children:"The Message object to convert to a Data object."})]})})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"data"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsx)(t.td,{children:"The converted Data object."})]})})]})]}),"\n",(0,r.jsx)(t.h3,{id:"parse-dataframe",children:"Parse DataFrame"}),"\n",(0,r.jsx)(t.admonition,{type:"important",children:(0,r.jsxs)(t.p,{children:["This component is in ",(0,r.jsx)(t.strong,{children:"Legacy"}),", which means it is available for use but no longer in active development.\nInstead, use the ",(0,r.jsx)(t.a,{href:"#parser",children:"Parser"})," component."]})}),"\n",(0,r.jsx)(t.p,{children:"This component converts DataFrames into plain text using templates."}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"df"}),(0,r.jsx)(t.td,{children:"DataFrame"}),(0,r.jsx)(t.td,{children:"The DataFrame to convert to text rows."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"template"}),(0,r.jsx)(t.td,{children:"Template"}),(0,r.jsxs)(t.td,{children:["Template for formatting (use ",(0,r.jsx)(t.code,{children:"{column_name}"})," placeholders)."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"sep"}),(0,r.jsx)(t.td,{children:"Separator"}),(0,r.jsx)(t.td,{children:"String to join rows in output."})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"text"}),(0,r.jsx)(t.td,{children:"Text"}),(0,r.jsx)(t.td,{children:"All rows combined into single text."})]})})]})]}),"\n",(0,r.jsx)(t.h3,{id:"parse-json",children:"Parse JSON"}),"\n",(0,r.jsx)(t.admonition,{type:"important",children:(0,r.jsxs)(t.p,{children:["This component is in ",(0,r.jsx)(t.strong,{children:"Legacy"}),", which means it is available for use but no longer in active development."]})}),"\n",(0,r.jsx)(t.p,{children:"This component converts and extracts JSON fields using JQ queries."}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"input_value"}),(0,r.jsx)(t.td,{children:"Input"}),(0,r.jsxs)(t.td,{children:["Data object to filter (",(0,r.jsx)(t.a,{href:"/concepts-objects#message-object",children:"Message"})," or ",(0,r.jsx)(t.a,{href:"/concepts-objects#data-object",children:"Data"}),")."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"query"}),(0,r.jsx)(t.td,{children:"JQ Query"}),(0,r.jsx)(t.td,{children:"JQ Query to filter the data"})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"filtered_data"}),(0,r.jsx)(t.td,{children:"Filtered Data"}),(0,r.jsxs)(t.td,{children:["Filtered data as list of ",(0,r.jsx)(t.a,{href:"/concepts-objects#data-object",children:"Data"})," objects."]})]})})]})]}),"\n",(0,r.jsx)(t.h3,{id:"regex-extractor",children:"Regex extractor"}),"\n",(0,r.jsx)(t.admonition,{type:"important",children:(0,r.jsxs)(t.p,{children:["This component is in ",(0,r.jsx)(t.strong,{children:"Legacy"}),", which means it is available for use but no longer in active development."]})}),"\n",(0,r.jsx)(t.p,{children:"This component extracts patterns from text using regular expressions. It can be used to find and extract specific patterns or information from text data."}),"\n",(0,r.jsx)(t.p,{children:"To use this component in a flow:"}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Connect the ",(0,r.jsx)(t.strong,{children:"Regex Extractor"})," to a ",(0,r.jsx)(t.strong,{children:"URL"})," component and a ",(0,r.jsx)(t.strong,{children:"Chat Output"})," component."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["In the ",(0,r.jsx)(t.strong,{children:"Regex Extractor"})," tool, enter a pattern to extract text from the ",(0,r.jsx)(t.strong,{children:"URL"}),' component\'s raw output.\nThis example extracts the first paragraph from the "In the News" section of ',(0,r.jsx)(t.code,{children:"https://en.wikipedia.org/wiki/Main_Page"}),":"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"In the news\\s*\\n(.*?)(?=\\n\\n)",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsx)(t.p,{children:"Result:"}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Peruvian writer and Nobel Prize in Literature laureate Mario Vargas Llosa (pictured) dies at the age of 89.",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsx)(t.h3,{id:"select-data",children:"Select data"}),"\n",(0,r.jsx)(t.admonition,{type:"important",children:(0,r.jsxs)(t.p,{children:["This component is in ",(0,r.jsx)(t.strong,{children:"Legacy"}),", which means it is available for use but no longer in active development."]})}),"\n",(0,r.jsxs)(t.p,{children:["This component selects a single ",(0,r.jsx)(t.a,{href:"/concepts-objects#data-object",children:"Data"})," item from a list."]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"data_list"}),(0,r.jsx)(t.td,{children:"Data List"}),(0,r.jsx)(t.td,{children:"List of data to select from"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"data_index"}),(0,r.jsx)(t.td,{children:"Data Index"}),(0,r.jsx)(t.td,{children:"Index of the data to select"})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"selected_data"}),(0,r.jsx)(t.td,{children:"Selected Data"}),(0,r.jsxs)(t.td,{children:["The selected ",(0,r.jsx)(t.a,{href:"/concepts-objects#data-object",children:"Data"})," object."]})]})})]})]}),"\n",(0,r.jsx)(t.h3,{id:"update-data",children:"Update data"}),"\n",(0,r.jsx)(t.admonition,{type:"important",children:(0,r.jsxs)(t.p,{children:["This component is in ",(0,r.jsx)(t.strong,{children:"Legacy"}),", which means it is available for use but no longer in active development."]})}),"\n",(0,r.jsx)(t.p,{children:"This component dynamically updates or appends data with specified fields."}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"old_data"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsx)(t.td,{children:"The records to update."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"number_of_fields"}),(0,r.jsx)(t.td,{children:"Number of Fields"}),(0,r.jsx)(t.td,{children:"The number of fields to add. The maximum is 15."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"text_key"}),(0,r.jsx)(t.td,{children:"Text Key"}),(0,r.jsx)(t.td,{children:"The key for text content."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"text_key_validator"}),(0,r.jsx)(t.td,{children:"Text Key Validator"}),(0,r.jsx)(t.td,{children:"Validates the text key presence."})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"data"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsx)(t.td,{children:"The updated Data objects."})]})})]})]})]})}function m(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(j,{...e})}):j(e)}function u(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},41502:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/component-combine-text-a73b71c22cc8099bf2a9ba22170ea701.png"},42547:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/component-type-convert-and-web-search-1eef7b9a7c1a243f4a08d9717728d0e1.png"},45709:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/component-data-to-dataframe-3e921379e4e86fedf0e34e3ffae46b51.png"},46445:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/component-data-operations-select-key-80bade862d29f2851b01ee26413d495f.png"},49823:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/component-split-text-fec2b1abb28e0852c8a172bbeb164b2c.png"},66539:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/component-lambda-filter-76cd345c52fa41a59dcfac0205dc3068.png"},82798:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/component-structured-output-23458b0d29eed6d092b557c7aaf6ab2c.png"},88103:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/component-batch-run-19c94fbb0646b2731b37013b84dff1f6.png"},96218:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/component-parser-1d1d72593f02991e5b14b6b1c112a744.png"},99e3:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/component-python-interpreter-1ef9e7dec643a216fd5e83c2139d09c9.png"}}]); \ No newline at end of file diff --git a/assets/js/7819cc1c.60de8093.js b/assets/js/7819cc1c.60de8093.js new file mode 100644 index 0000000000..be7eba2c81 --- /dev/null +++ b/assets/js/7819cc1c.60de8093.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[6006],{9898:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/component-llm-router-1b417082a0208a70065bc177a78fab67.png"},13533:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/component-dataframe-operations-031488ccf4e3d3378f8842f0ea10682c.png"},17886:(e,t,n)=>{n.d(t,{A:()=>o});n(96540);var s=n(64058),r=n(74848);function o({name:e,...t}){const n=s[e];return n?(0,r.jsx)(n,{...t}):null}},35073:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/component-save-to-file-67ebbb733732670897bedd9fd1b87583.png"},40966:(e,t,n)=>{n.r(t),n.d(t,{CH:()=>h,assets:()=>a,chCodeConfig:()=>x,contentTitle:()=>d,default:()=>m,frontMatter:()=>c,metadata:()=>s,toc:()=>p});const s=JSON.parse('{"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.","source":"@site/docs/Components/components-processing.mdx","sourceDirName":"Components","slug":"/components-processing","permalink":"/components-processing","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Processing","slug":"/components-processing"},"sidebar":"docs","previous":{"title":"Language models","permalink":"/components-models"},"next":{"title":"Prompts","permalink":"/components-prompts"}}');var r=n(74848),o=n(28453),i=n(24754),l=n(17886);const c={title:"Processing",slug:"/components-processing"},d=void 0,a={},h={annotations:i.hk,Code:i.Cy},x={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},p=[{value:"Batch Run",id:"batch-run",level:2},{value:"Data operations",id:"data-operations",level:2},{value:"Operations",id:"operations",level:3},{value:"DataFrame operations",id:"dataframe-operations",level:2},{value:"Operations",id:"operations-1",level:3},{value:"LLM router",id:"llm-router",level:2},{value:"Parser",id:"parser",level:2},{value:"Python interpreter",id:"python-interpreter",level:2},{value:"Save file",id:"save-file",level:2},{value:"File input format options",id:"file-input-format-options",level:3},{value:"Smart function",id:"smart-function",level:2},{value:"Split text",id:"split-text",level:2},{value:"Structured output",id:"structured-output",level:2},{value:"Type convert",id:"type-convert",level:2},{value:"Legacy components",id:"legacy-components",level:2},{value:"Alter metadata",id:"alter-metadata",level:3},{value:"Combine data",id:"combine-data",level:3},{value:"Combine text",id:"combine-text",level:3},{value:"Create data",id:"create-data",level:3},{value:"Data to DataFrame",id:"data-to-dataframe",level:3},{value:"Filter data",id:"filter-data",level:3},{value:"Filter values",id:"filter-values",level:3},{value:"JSON cleaner",id:"json-cleaner",level:3},{value:"Message to data",id:"message-to-data",level:3},{value:"Parse DataFrame",id:"parse-dataframe",level:3},{value:"Parse JSON",id:"parse-json",level:3},{value:"Regex extractor",id:"regex-extractor",level:3},{value:"Select data",id:"select-data",level:3},{value:"Update data",id:"update-data",level:3}];function j(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,o.R)(),...e.components},{Details:s}=t;return h||u("CH",!1),h.Code||u("CH.Code",!0),s||u("Details",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.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,r.jsxs)(t.p,{children:["Processing components process and transform data within a flow, like converting ",(0,r.jsx)(t.code,{children:"Data"})," to text with a ",(0,r.jsx)(t.a,{href:"#parser",children:"Parser"})," component, filtering data with natural language with the ",(0,r.jsx)(t.a,{href:"#smart-function",children:"Smart function"}),", or saving data to your local machine with ",(0,r.jsx)(t.a,{href:"#save-file",children:"Save File"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"batch-run",children:"Batch Run"}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Batch Run"})," component runs a language model over ",(0,r.jsx)(t.strong,{children:"each row"})," of a ",(0,r.jsx)(t.a,{href:"/data-types#dataframe",children:"DataFrame"})," text column and returns a new DataFrame with the original text and an LLM response."]}),"\n",(0,r.jsx)(t.p,{children:"The response contains the following columns:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"text_input"}),": The original text from the input DataFrame."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"model_response"}),": The model's response for each input."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"batch_index"}),": The processing order, with a ",(0,r.jsx)(t.code,{children:"0"}),"-based index."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"metadata"})," (optional): Additional information about the processing."]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["These columns, when connected to a ",(0,r.jsx)(t.strong,{children:"Parser"})," component, can be used as variables within curly braces."]}),"\n",(0,r.jsxs)(t.p,{children:["To use the Batch Run component with a ",(0,r.jsx)(t.strong,{children:"Parser"})," component, do the following:"]}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["Connect a ",(0,r.jsx)(t.strong,{children:"Model"})," component to the ",(0,r.jsx)(t.strong,{children:"Batch Run"})," component's ",(0,r.jsx)(t.strong,{children:"Language model"})," port."]}),"\n",(0,r.jsxs)(t.li,{children:["Connect a component that outputs DataFrame, like ",(0,r.jsx)(t.strong,{children:"File"})," component, to the ",(0,r.jsx)(t.strong,{children:"Batch Run"})," component's ",(0,r.jsx)(t.strong,{children:"DataFrame"})," input."]}),"\n",(0,r.jsxs)(t.li,{children:["Connect the ",(0,r.jsx)(t.strong,{children:"Batch Run"})," component's ",(0,r.jsx)(t.strong,{children:"Batch Results"})," output to a ",(0,r.jsx)(t.strong,{children:"Parser"})," component's ",(0,r.jsx)(t.strong,{children:"DataFrame"})," input.\nThe flow looks like this:"]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"A batch run component connected to OpenAI and a Parser",src:n(88103).A+"",width:"4000",height:"2728"})}),"\n",(0,r.jsxs)(t.ol,{start:"4",children:["\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Column Name"})," field of the ",(0,r.jsx)(t.strong,{children:"Batch Run"})," component, enter a column name based on the data you're loading from the ",(0,r.jsx)(t.strong,{children:"File"})," loader. For example, to process a column of ",(0,r.jsx)(t.code,{children:"name"}),", enter ",(0,r.jsx)(t.code,{children:"name"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Optionally, in the ",(0,r.jsx)(t.strong,{children:"System Message"})," field of the ",(0,r.jsx)(t.strong,{children:"Batch Run"})," component, enter a ",(0,r.jsx)(t.strong,{children:"System Message"})," to instruct the connected LLM on how to process your file. For example, ",(0,r.jsx)(t.code,{children:"Create a business card for each name."})]}),"\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Template"})," field of the ",(0,r.jsx)(t.strong,{children:"Parser"})," component, enter a template for using the ",(0,r.jsx)(t.strong,{children:"Batch Run"})," component's new DataFrame columns.\nTo use all three columns from the ",(0,r.jsx)(t.strong,{children:"Batch Run"})," component, include them like this:"]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"record_number: {batch_index}, name: {text_input}, summary: {model_response}",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(t.ol,{start:"7",children:["\n",(0,r.jsxs)(t.li,{children:["To run the flow, in the ",(0,r.jsx)(t.strong,{children:"Parser"})," component, click ",(0,r.jsx)(l.A,{name:"Play","aria-hidden":"True"})," ",(0,r.jsx)(t.strong,{children:"Run component"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["To view your created DataFrame, in the ",(0,r.jsx)(t.strong,{children:"Parser"})," component, click ",(0,r.jsx)(l.A,{name:"TextSearch","aria-hidden":"True"})," ",(0,r.jsx)(t.strong,{children:"Inspect output"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Optionally, connect a ",(0,r.jsx)(t.strong,{children:"Chat Output"})," component, and open the ",(0,r.jsx)(t.strong,{children:"Playground"})," to see the output."]}),"\n"]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"model"}),(0,r.jsx)(t.td,{children:"HandleInput"}),(0,r.jsx)(t.td,{children:"Connect the 'Language Model' output from your LLM component here. Required."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"system_message"}),(0,r.jsx)(t.td,{children:"MultilineInput"}),(0,r.jsx)(t.td,{children:"A multi-line system instruction for all rows in the DataFrame."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"df"}),(0,r.jsx)(t.td,{children:"DataFrameInput"}),(0,r.jsx)(t.td,{children:"The DataFrame whose column is treated as text messages, as specified by 'column_name'. Required."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"column_name"}),(0,r.jsx)(t.td,{children:"MessageTextInput"}),(0,r.jsx)(t.td,{children:"The name of the DataFrame column to treat as text messages. If empty, all columns are formatted in TOML."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"output_column_name"}),(0,r.jsx)(t.td,{children:"MessageTextInput"}),(0,r.jsxs)(t.td,{children:["Name of the column where the model's response is stored. Default=",(0,r.jsx)(t.code,{children:"model_response"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"enable_metadata"}),(0,r.jsx)(t.td,{children:"BoolInput"}),(0,r.jsx)(t.td,{children:"If True, add metadata to the output DataFrame."})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"batch_results"}),(0,r.jsx)(t.td,{children:"DataFrame"}),(0,r.jsx)(t.td,{children:"A DataFrame with all original columns plus the model's response column."})]})})]})]}),"\n",(0,r.jsx)(t.h2,{id:"data-operations",children:"Data operations"}),"\n",(0,r.jsxs)(t.p,{children:["This component performs operations on ",(0,r.jsx)(t.a,{href:"/data-types#data",children:"Data"})," objects, including selecting keys, evaluating literals, combining data, filtering values, appending/updating data, removing keys, and renaming keys."]}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["To use this component in a flow, connect a component that outputs ",(0,r.jsx)(t.a,{href:"/data-types#data",children:"Data"})," to the ",(0,r.jsx)(t.strong,{children:"Data Operations"})," component's input.\nAll operations in the component require at least one ",(0,r.jsx)(t.a,{href:"/data-types#data",children:"Data"})," input."]}),"\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Operations"})," field, select the operation you want to perform.\nFor example, send this request to the ",(0,r.jsx)(t.strong,{children:"Webhook"})," component.\nReplace ",(0,r.jsx)(t.code,{children:"FLOW_ID"})," and ",(0,r.jsx)(t.code,{children:"LANGFLOW_API_KEY"})," with the values from your deployment."]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:'POST "http://localhost:7860/api/v1/webhook/FLOW_ID" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:"-H ",props:{style:{color:"#C9D1D9"}}},{content:"'Content-Type: application/json' ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:"-H ",props:{style:{color:"#C9D1D9"}}},{content:"'x-api-key: LANGFLOW_API_KEY' ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:"-d ",props:{style:{color:"#C9D1D9"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "id": 1,',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "name": "Leanne Graham",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "username": "Bret",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "email": "Sincere@april.biz",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "address": {',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "street": "Kulas Light",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "suite": "Apt. 556",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "city": "Gwenborough",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "zipcode": "92998-3874",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "geo": {',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "lat": "-37.3159",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "lng": "81.1496"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "phone": "1-770-736-8031 x56442",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "website": "hildegard.org",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "company": {',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "name": "Romaguera-Crona",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "catchPhrase": "Multi-layered client-server neural-net",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "bs": "harness real-time e-markets"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,r.jsxs)(t.ol,{start:"3",children:["\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Data Operations"})," component, select the ",(0,r.jsx)(t.strong,{children:"Select Keys"})," operation to extract specific user information.\nTo add additional keys, click ",(0,r.jsx)(l.A,{name:"Plus","aria-hidden":"True"})," ",(0,r.jsx)(t.strong,{children:"Add more"}),".\n",(0,r.jsx)(t.img,{alt:"A webhook and data operations component",src:n(46445).A+"",width:"4000",height:"1920"})]}),"\n",(0,r.jsxs)(t.li,{children:["Filter by ",(0,r.jsx)(t.code,{children:"name"}),", ",(0,r.jsx)(t.code,{children:"username"}),", and ",(0,r.jsx)(t.code,{children:"email"})," to select the values from the request.","\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Leanne Graham"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "username"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Bret"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "email"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Sincere@april.biz"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(t.h3,{id:"operations",children:"Operations"}),"\n",(0,r.jsxs)(t.p,{children:["The component supports the following operations.\nAll operations in the ",(0,r.jsx)(t.strong,{children:"Data operations"})," component require at least one ",(0,r.jsx)(t.a,{href:"/data-types#data",children:"Data"})," input."]}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Operation"}),(0,r.jsx)(t.th,{children:"Required Inputs"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Select Keys"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"select_keys_input"})}),(0,r.jsx)(t.td,{children:"Selects specific keys from the data."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Literal Eval"}),(0,r.jsx)(t.td,{children:"None"}),(0,r.jsx)(t.td,{children:"Evaluates string values as Python literals."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Combine"}),(0,r.jsx)(t.td,{children:"None"}),(0,r.jsx)(t.td,{children:"Combines multiple data objects into one."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Filter Values"}),(0,r.jsxs)(t.td,{children:[(0,r.jsx)(t.code,{children:"filter_key"}),", ",(0,r.jsx)(t.code,{children:"filter_values"}),", ",(0,r.jsx)(t.code,{children:"operator"})]}),(0,r.jsx)(t.td,{children:"Filters data based on key-value pair."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Append or Update"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"append_update_data"})}),(0,r.jsx)(t.td,{children:"Adds or updates key-value pairs."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Remove Keys"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"remove_keys_input"})}),(0,r.jsx)(t.td,{children:"Removes specified keys from the data."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Rename Keys"}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"rename_keys_input"})}),(0,r.jsx)(t.td,{children:"Renames keys in the data."})]})]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"data"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsxs)(t.td,{children:["The ",(0,r.jsx)(t.a,{href:"/data-types#data",children:"Data"})," object to operate on."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"operations"}),(0,r.jsx)(t.td,{children:"Operations"}),(0,r.jsx)(t.td,{children:"The operation to perform on the data."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"select_keys_input"}),(0,r.jsx)(t.td,{children:"Select Keys"}),(0,r.jsx)(t.td,{children:"A list of keys to select from the data."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"filter_key"}),(0,r.jsx)(t.td,{children:"Filter Key"}),(0,r.jsx)(t.td,{children:"The key to filter by."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"operator"}),(0,r.jsx)(t.td,{children:"Comparison Operator"}),(0,r.jsx)(t.td,{children:"The operator to apply for comparing values."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"filter_values"}),(0,r.jsx)(t.td,{children:"Filter Values"}),(0,r.jsx)(t.td,{children:"A list of values to filter by."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"append_update_data"}),(0,r.jsx)(t.td,{children:"Append or Update"}),(0,r.jsx)(t.td,{children:"The data to append or update the existing data with."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"remove_keys_input"}),(0,r.jsx)(t.td,{children:"Remove Keys"}),(0,r.jsx)(t.td,{children:"A list of keys to remove from the data."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"rename_keys_input"}),(0,r.jsx)(t.td,{children:"Rename Keys"}),(0,r.jsx)(t.td,{children:"A list of keys to rename in the data."})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"data_output"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsx)(t.td,{children:"The resulting Data object after the operation."})]})})]})]}),"\n",(0,r.jsx)(t.h2,{id:"dataframe-operations",children:"DataFrame operations"}),"\n",(0,r.jsxs)(t.p,{children:["This component performs operations on ",(0,r.jsx)(t.a,{href:"https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html",children:"DataFrame"})," rows and columns."]}),"\n",(0,r.jsxs)(t.p,{children:["To use this component in a flow, connect a component that outputs ",(0,r.jsx)(t.a,{href:"/data-types#dataframe",children:"DataFrame"})," to the ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component."]}),"\n",(0,r.jsxs)(t.p,{children:["This example fetches JSON data from an API. The ",(0,r.jsx)(t.strong,{children:"Smart Filter"})," component extracts and flattens the results into a tabular DataFrame. The ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component can then work with the retrieved data."]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"Dataframe operations with flattened dataframe",src:n(13533).A+"",width:"4000",height:"2120"})}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["The ",(0,r.jsx)(t.strong,{children:"API Request"})," component retrieves data with only ",(0,r.jsx)(t.code,{children:"source"})," and ",(0,r.jsx)(t.code,{children:"result"})," fields.\nFor this example, the desired data is nested within the ",(0,r.jsx)(t.code,{children:"result"})," field."]}),"\n",(0,r.jsxs)(t.li,{children:["Connect a ",(0,r.jsx)(t.strong,{children:"Smart Filter"})," to the API request component, and a ",(0,r.jsx)(t.strong,{children:"Language model"})," to the ",(0,r.jsx)(t.strong,{children:"Smart Filter"}),". This example connects a ",(0,r.jsx)(t.strong,{children:"Groq"})," model component."]}),"\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Groq"})," model component, add your ",(0,r.jsx)(t.strong,{children:"Groq"})," API key."]}),"\n",(0,r.jsxs)(t.li,{children:["To filter the data, in the ",(0,r.jsx)(t.strong,{children:"Smart filter"})," component, in the ",(0,r.jsx)(t.strong,{children:"Instructions"})," field, use natural language to describe how the data should be filtered.\nFor this example, enter:"]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"I want to explode the result column out into a Data object",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsxs)(t.p,{children:["Avoid punctuation in the ",(0,r.jsx)(t.strong,{children:"Instructions"})," field, as it can cause errors."]})}),"\n",(0,r.jsxs)(t.ol,{start:"5",children:["\n",(0,r.jsxs)(t.li,{children:["To run the flow, in the ",(0,r.jsx)(t.strong,{children:"Smart Filter"})," component, click ",(0,r.jsx)(l.A,{name:"Play","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Run component"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["To inspect the filtered data, in the ",(0,r.jsx)(t.strong,{children:"Smart Filter"})," component, click ",(0,r.jsx)(l.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Inspect output"}),".\nThe result is a structured DataFrame."]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"id | name | company | username | email | address | zip",props:{}}]},{tokens:[{content:"---|------------------|----------------------|-----------------|------------------------------------|-------------------|-------",props:{}}]},{tokens:[{content:"1 | Emily Johnson | ABC Corporation | emily_johnson | emily.johnson@abccorporation.com | 123 Main St | 12345",props:{}}]},{tokens:[{content:"2 | Michael Williams | XYZ Corp | michael_williams| michael.williams@xyzcorp.com | 456 Elm Ave | 67890",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(t.ol,{start:"7",children:["\n",(0,r.jsxs)(t.li,{children:["Add the ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component, and a ",(0,r.jsx)(t.strong,{children:"Chat Output"})," component to the flow."]}),"\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component, in the ",(0,r.jsx)(t.strong,{children:"Operation"})," field, select ",(0,r.jsx)(t.strong,{children:"Filter"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["To apply a filter, in the ",(0,r.jsx)(t.strong,{children:"Column Name"})," field, enter a column to filter on. This example filters by ",(0,r.jsx)(t.code,{children:"name"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Click ",(0,r.jsx)(t.strong,{children:"Playground"}),", and then click ",(0,r.jsx)(t.strong,{children:"Run Flow"}),".\nThe flow extracts the values from the ",(0,r.jsx)(t.code,{children:"name"})," column."]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"name",props:{}}]},{tokens:[{content:"Emily Johnson",props:{}}]},{tokens:[{content:"Michael Williams",props:{}}]},{tokens:[{content:"John Smith",props:{}}]},{tokens:[{content:"...",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsx)(t.h3,{id:"operations-1",children:"Operations"}),"\n",(0,r.jsxs)(t.p,{children:["This component can perform the following operations on Pandas ",(0,r.jsx)(t.a,{href:"https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html",children:"DataFrame"}),"."]}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Operation"}),(0,r.jsx)(t.th,{children:"Required Inputs"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Add Column"}),(0,r.jsx)(t.td,{children:"new_column_name, new_column_value"}),(0,r.jsx)(t.td,{children:"Adds a new column with a constant value."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Drop Column"}),(0,r.jsx)(t.td,{children:"column_name"}),(0,r.jsx)(t.td,{children:"Removes a specified column."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Filter"}),(0,r.jsx)(t.td,{children:"column_name, filter_value"}),(0,r.jsx)(t.td,{children:"Filters rows based on column value."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Head"}),(0,r.jsx)(t.td,{children:"num_rows"}),(0,r.jsxs)(t.td,{children:["Returns first ",(0,r.jsx)(t.code,{children:"n"})," rows."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Rename Column"}),(0,r.jsx)(t.td,{children:"column_name, new_column_name"}),(0,r.jsx)(t.td,{children:"Renames an existing column."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Replace Value"}),(0,r.jsx)(t.td,{children:"column_name, replace_value, replacement_value"}),(0,r.jsx)(t.td,{children:"Replaces values in a column."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Select Columns"}),(0,r.jsx)(t.td,{children:"columns_to_select"}),(0,r.jsx)(t.td,{children:"Selects specific columns."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Sort"}),(0,r.jsx)(t.td,{children:"column_name, ascending"}),(0,r.jsx)(t.td,{children:"Sorts DataFrame by column."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"Tail"}),(0,r.jsx)(t.td,{children:"num_rows"}),(0,r.jsxs)(t.td,{children:["Returns last ",(0,r.jsx)(t.code,{children:"n"})," rows."]})]})]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"df"}),(0,r.jsx)(t.td,{children:"DataFrame"}),(0,r.jsx)(t.td,{children:"The input DataFrame to operate on."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"operation"}),(0,r.jsx)(t.td,{children:"Operation"}),(0,r.jsx)(t.td,{children:"The DataFrame operation to perform. Options include Add Column, Drop Column, Filter, Head, Rename Column, Replace Value, Select Columns, Sort, and Tail."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"column_name"}),(0,r.jsx)(t.td,{children:"Column Name"}),(0,r.jsx)(t.td,{children:"The column name to use for the operation."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"filter_value"}),(0,r.jsx)(t.td,{children:"Filter Value"}),(0,r.jsx)(t.td,{children:"The value to filter rows by."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"ascending"}),(0,r.jsx)(t.td,{children:"Sort Ascending"}),(0,r.jsx)(t.td,{children:"Whether to sort in ascending order."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"new_column_name"}),(0,r.jsx)(t.td,{children:"New Column Name"}),(0,r.jsx)(t.td,{children:"The new column name when renaming or adding a column."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"new_column_value"}),(0,r.jsx)(t.td,{children:"New Column Value"}),(0,r.jsx)(t.td,{children:"The value to populate the new column with."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"columns_to_select"}),(0,r.jsx)(t.td,{children:"Columns to Select"}),(0,r.jsx)(t.td,{children:"A list of column names to select."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"num_rows"}),(0,r.jsx)(t.td,{children:"Number of Rows"}),(0,r.jsx)(t.td,{children:"The number of rows to return for head/tail operations. The default is 5."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"replace_value"}),(0,r.jsx)(t.td,{children:"Value to Replace"}),(0,r.jsx)(t.td,{children:"The value to replace in the column."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"replacement_value"}),(0,r.jsx)(t.td,{children:"Replacement Value"}),(0,r.jsx)(t.td,{children:"The value to replace with."})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"output"}),(0,r.jsx)(t.td,{children:"DataFrame"}),(0,r.jsx)(t.td,{children:"The resulting DataFrame after the operation."})]})})]})]}),"\n",(0,r.jsx)(t.h2,{id:"llm-router",children:"LLM router"}),"\n",(0,r.jsxs)(t.p,{children:["This component routes requests to the most appropriate LLM based on ",(0,r.jsx)(t.a,{href:"https://openrouter.ai/docs/quickstart",children:"OpenRouter"})," model specifications."]}),"\n",(0,r.jsx)(t.p,{children:"The judge LLM analyzed your input message to understand the evaluation context, and then selects the most appropriate model from your LLM pool."}),"\n",(0,r.jsx)(t.p,{children:"The selected model processes your input and returns the response."}),"\n",(0,r.jsxs)(t.p,{children:["To use the ",(0,r.jsx)(t.strong,{children:"LLM Router"})," component in a flow, do the following:"]}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Connect multiple ",(0,r.jsx)(t.strong,{children:"Language Model"})," components to the ",(0,r.jsx)(t.strong,{children:"LLM Router"}),"'s ",(0,r.jsx)(t.strong,{children:"Language Models"})," input."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Connect a ",(0,r.jsx)(t.strong,{children:"Judge LLM"})," component to the ",(0,r.jsx)(t.strong,{children:"Judge LLM"})," input."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Connect ",(0,r.jsx)(t.strong,{children:"Chat Input"})," and ",(0,r.jsx)(t.strong,{children:"Chat Output"})," components to the ",(0,r.jsx)(t.strong,{children:"LLM Router"}),".\nThe flow looks like this:"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"LLM router component",src:n(9898).A+"",width:"3316",height:"2492"})}),"\n",(0,r.jsxs)(t.ol,{start:"4",children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["In the LLM Router component, set your ",(0,r.jsx)(t.strong,{children:"Optimization"})," preference:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Quality"}),": Prioritizes the highest quality response."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Speed"}),": Prioritizes the fastest response time."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Cost"}),": Prioritizes the most cost-effective option."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Balanced"}),": Strikes a balance between quality, speed, and cost."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Run the flow.\nYour input is the task that the LLM router evaluates the models against, such as ",(0,r.jsx)(t.code,{children:"Write a story about horses"})," or ",(0,r.jsx)(t.code,{children:"How do I parse data objects out of JSON?"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["In the LLM Router component, select the ",(0,r.jsx)(t.strong,{children:"Model Selection Decision"})," output to view the router's reasoning."]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Model Selection Decision:",props:{}}]},{tokens:[{content:"- Selected Model Index: 0",props:{}}]},{tokens:[{content:"- Selected Langflow Model Name: gpt-4o-mini",props:{}}]},{tokens:[{content:"- Selected API Model ID (if resolved): openai/gpt-4o-mini",props:{}}]},{tokens:[{content:"- Optimization Preference: cost",props:{}}]},{tokens:[{content:"- Input Query Length: 27 characters (~5 tokens)",props:{}}]},{tokens:[{content:"- Number of Models Considered: 2",props:{}}]},{tokens:[{content:"- Specifications Source: OpenRouter API",props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"models"}),(0,r.jsx)(t.td,{children:"Language Models"}),(0,r.jsx)(t.td,{children:"A list of LLMs to route between."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"input_value"}),(0,r.jsx)(t.td,{children:"Input"}),(0,r.jsx)(t.td,{children:"The input message to be routed."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"judge_llm"}),(0,r.jsx)(t.td,{children:"Judge LLM"}),(0,r.jsx)(t.td,{children:"The LLM that evaluates and selects the most appropriate model."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"optimization"}),(0,r.jsx)(t.td,{children:"Optimization"}),(0,r.jsx)(t.td,{children:"The optimization preference between quality, speed, cost, or balanced."})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"output"}),(0,r.jsx)(t.td,{children:"Output"}),(0,r.jsx)(t.td,{children:"The response from the selected model."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"selected_model"}),(0,r.jsx)(t.td,{children:"Selected Model"}),(0,r.jsx)(t.td,{children:"The name of the chosen model."})]})]})]})]}),"\n",(0,r.jsx)(t.h2,{id:"parser",children:"Parser"}),"\n",(0,r.jsxs)(t.p,{children:["This component formats ",(0,r.jsx)(t.code,{children:"DataFrame"})," or ",(0,r.jsx)(t.code,{children:"Data"})," objects into text using templates, with an option to convert inputs directly to strings using ",(0,r.jsx)(t.code,{children:"stringify"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["To use this component, create variables for values in the ",(0,r.jsx)(t.code,{children:"template"})," the same way you would in a ",(0,r.jsx)(t.a,{href:"/components-prompts",children:"Prompt"})," component. For ",(0,r.jsx)(t.code,{children:"DataFrames"}),", use column names, for example ",(0,r.jsx)(t.code,{children:"Name: {Name}"}),". For ",(0,r.jsx)(t.code,{children:"Data"})," objects, use ",(0,r.jsx)(t.code,{children:"{text}"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["To use the ",(0,r.jsx)(t.strong,{children:"Parser"})," component with a ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component, do the following:"]}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["Connect a ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component's ",(0,r.jsx)(t.strong,{children:"DataFrame"})," output to the ",(0,r.jsx)(t.strong,{children:"Parser"})," component's ",(0,r.jsx)(t.strong,{children:"DataFrame"})," input."]}),"\n",(0,r.jsxs)(t.li,{children:["Connect the ",(0,r.jsx)(t.strong,{children:"File"})," component to the ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component's ",(0,r.jsx)(t.strong,{children:"Message"})," input."]}),"\n",(0,r.jsxs)(t.li,{children:["Connect the ",(0,r.jsx)(t.strong,{children:"OpenAI"})," model component's ",(0,r.jsx)(t.strong,{children:"Language Model"})," output to the ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component's ",(0,r.jsx)(t.strong,{children:"Language Model"})," input."]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:"The flow looks like this:"}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"A parser component connected to OpenAI and structured output",src:n(96218).A+"",width:"4000",height:"2202"})}),"\n",(0,r.jsxs)(t.ol,{start:"4",children:["\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component, click ",(0,r.jsx)(t.strong,{children:"Open Table"}),".\nThis opens a pane for structuring your table.\nThe table contains the rows ",(0,r.jsx)(t.strong,{children:"Name"}),", ",(0,r.jsx)(t.strong,{children:"Description"}),", ",(0,r.jsx)(t.strong,{children:"Type"}),", and ",(0,r.jsx)(t.strong,{children:"Multiple"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Create a table that maps to the data you're loading from the ",(0,r.jsx)(t.strong,{children:"File"})," loader.\nFor example, to create a table for employees, you might have the rows ",(0,r.jsx)(t.code,{children:"id"}),", ",(0,r.jsx)(t.code,{children:"name"}),", and ",(0,r.jsx)(t.code,{children:"email"}),", all of type ",(0,r.jsx)(t.code,{children:"string"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Template"})," field of the ",(0,r.jsx)(t.strong,{children:"Parser"})," component, enter a template for parsing the ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component's DataFrame output into structured text.\nCreate variables for values in the ",(0,r.jsx)(t.code,{children:"template"})," the same way you would in a ",(0,r.jsx)(t.a,{href:"/components-prompts",children:"Prompt"})," component.\nFor example, to present a table of employees in Markdown:"]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"# Employee Profile",props:{}}]},{tokens:[{content:"## Personal Information",props:{}}]},{tokens:[{content:"- **Name:** {name}",props:{}}]},{tokens:[{content:"- **ID:** {id}",props:{}}]},{tokens:[{content:"- **Email:** {email}",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(t.ol,{start:"7",children:["\n",(0,r.jsxs)(t.li,{children:["To run the flow, in the ",(0,r.jsx)(t.strong,{children:"Parser"})," component, click ",(0,r.jsx)(l.A,{name:"Play","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Run component"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["To view your parsed text, in the ",(0,r.jsx)(t.strong,{children:"Parser"})," component, click ",(0,r.jsx)(l.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Inspect output"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Optionally, connect a ",(0,r.jsx)(t.strong,{children:"Chat Output"})," component, and open the ",(0,r.jsx)(t.strong,{children:"Playground"})," to see the output."]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["For an additional example of using the ",(0,r.jsx)(t.strong,{children:"Parser"})," component to format a DataFrame from a ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component, see the ",(0,r.jsx)(t.strong,{children:"Market Research"})," template flow."]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"mode"}),(0,r.jsx)(t.td,{children:"Mode"}),(0,r.jsx)(t.td,{children:'The tab selection between "Parser" and "Stringify" modes. "Stringify" converts input to a string instead of using a template.'})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"pattern"}),(0,r.jsx)(t.td,{children:"Template"}),(0,r.jsxs)(t.td,{children:["The template for formatting using variables in curly brackets. For DataFrames, use column names, such as ",(0,r.jsx)(t.code,{children:"Name: {Name}"}),". For Data objects, use ",(0,r.jsx)(t.code,{children:"{text}"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"input_data"}),(0,r.jsx)(t.td,{children:"Data or DataFrame"}),(0,r.jsx)(t.td,{children:"The input to parse. Accepts either a DataFrame or Data object."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"sep"}),(0,r.jsx)(t.td,{children:"Separator"}),(0,r.jsx)(t.td,{children:"The string used to separate rows or items. The default is a newline."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"clean_data"}),(0,r.jsx)(t.td,{children:"Clean Data"}),(0,r.jsx)(t.td,{children:"When stringify is enabled, this option cleans data by removing empty rows and lines."})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"parsed_text"}),(0,r.jsx)(t.td,{children:"Parsed Text"}),(0,r.jsxs)(t.td,{children:["The resulting formatted text as a ",(0,r.jsx)(t.a,{href:"/data-types#message",children:"Message"})," object."]})]})})]})]}),"\n",(0,r.jsx)(t.h2,{id:"python-interpreter",children:"Python interpreter"}),"\n",(0,r.jsx)(t.p,{children:"This component allows you to execute Python code with imported packages."}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["To use this component in a flow,in the ",(0,r.jsx)(t.strong,{children:"Global Imports"})," field, add the packages you want to import as a comma-separated list, such as ",(0,r.jsx)(t.code,{children:"math,pandas"}),".\nAt least one import is required."]}),"\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Python Code"})," field, enter the Python code you want to execute. Use ",(0,r.jsx)(t.code,{children:"print()"})," to see the output."]}),"\n",(0,r.jsxs)(t.li,{children:["Optionally, enable ",(0,r.jsx)(t.strong,{children:"Tool Mode"})," and connect the interpreter to an ",(0,r.jsx)(t.strong,{children:"Agent"})," as a tool.\nFor example, connect a ",(0,r.jsx)(t.strong,{children:"Python Interpreter"})," and a ",(0,r.jsx)(t.a,{href:"/components-helpers#calculator",children:"Calculator"})," as tools for an Agent, and test how it chooses different tools to solve math problems.\nThe flow looks like this:\n",(0,r.jsx)(t.img,{alt:"Python Interpreter and calculator connected to Agent",src:n(99e3).A+"",width:"3988",height:"2928"})]}),"\n",(0,r.jsxs)(t.li,{children:["Ask the agent an easier math question.\nThe ",(0,r.jsx)(t.strong,{children:"Calculator"})," tool can add, subtract, multiple, divide, or perform exponentiation.\nThe agent executes the ",(0,r.jsx)(t.code,{children:"evaluate_expression"})," tool to correctly answer the question."]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:"Result:"}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Executed evaluate_expression",props:{}}]},{tokens:[{content:"Input:",props:{}}]},{tokens:[{content:"{",props:{}}]},{tokens:[{content:' "expression": "2+5"',props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Output:",props:{}}]},{tokens:[{content:"{",props:{}}]},{tokens:[{content:' "result": "7"',props:{}}]},{tokens:[{content:"}",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(t.ol,{start:"5",children:["\n",(0,r.jsxs)(t.li,{children:["Give the agent complete Python code.\nThis example creates a Pandas DataFrame table with the imported ",(0,r.jsx)(t.code,{children:"pandas"})," packages, and returns the square root of the mean squares."]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" pandas ",props:{style:{color:"#C9D1D9"}}},{content:"as",props:{style:{color:"#FF7B72"}}},{content:" pd",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" math",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# Create a simple DataFrame",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"df ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" pd.DataFrame({",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" 'numbers'",props:{style:{color:"#A5D6FF"}}},{content:": [",props:{style:{color:"#C9D1D9"}}},{content:"1",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"2",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"3",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"4",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"5",props:{style:{color:"#79C0FF"}}},{content:"],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" 'squares'",props:{style:{color:"#A5D6FF"}}},{content:": [x",props:{style:{color:"#C9D1D9"}}},{content:"**",props:{style:{color:"#FF7B72"}}},{content:"2 ",props:{style:{color:"#79C0FF"}}},{content:"for",props:{style:{color:"#FF7B72"}}},{content:" x ",props:{style:{color:"#C9D1D9"}}},{content:"in ",props:{style:{color:"#FF7B72"}}},{content:"range",props:{style:{color:"#79C0FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"1",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"6",props:{style:{color:"#79C0FF"}}},{content:")]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"})",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# Calculate the square root of the mean",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"result ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" math.sqrt(df[",props:{style:{color:"#C9D1D9"}}},{content:"'squares'",props:{style:{color:"#A5D6FF"}}},{content:"].mean())",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"print",props:{style:{color:"#79C0FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"f",props:{style:{color:"#FF7B72"}}},{content:'"Square root of mean squares: ',props:{style:{color:"#A5D6FF"}}},{content:"{",props:{style:{color:"#79C0FF"}}},{content:"result",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:'"',props:{style:{color:"#A5D6FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,r.jsxs)(t.p,{children:["The Agent correctly chooses the ",(0,r.jsx)(t.code,{children:"run_python_repl"})," tool to solve the problem."]}),"\n",(0,r.jsx)(t.p,{children:"Result:"}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Executed run_python_repl",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"Input:",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"{",props:{}}]},{tokens:[{content:" \"python_code\": \"import pandas as pd\\nimport math\\n\\n# Create a simple DataFrame\\ndf = pd.DataFrame({\\n 'numbers': [1, 2, 3, 4, 5],\\n 'squares': [x**2 for x in range(1, 6)]\\n})\\n\\n# Calculate the square root of the mean\\nresult = math.sqrt(df['squares'].mean())\\nprint(f\\\"Square root of mean squares: {result}\\\")\"",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Output:",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"{",props:{}}]},{tokens:[{content:' "result": "Square root of mean squares: 3.3166247903554"',props:{}}]},{tokens:[{content:"}",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(t.p,{children:["If you don't include the package imports in the chat, the Agent can still create the table using ",(0,r.jsx)(t.code,{children:"pd.DataFrame"}),", because the ",(0,r.jsx)(t.code,{children:"pandas"})," package is imported globally by the Python interpreter component in the ",(0,r.jsx)(t.strong,{children:"Global Imports"})," field."]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"global_imports"}),(0,r.jsx)(t.td,{children:"String"}),(0,r.jsxs)(t.td,{children:["A comma-separated list of modules to import globally, such as ",(0,r.jsx)(t.code,{children:"math,pandas,numpy"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"python_code"}),(0,r.jsx)(t.td,{children:"Code"}),(0,r.jsx)(t.td,{children:"The Python code to execute. Only modules specified in Global Imports can be used."})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"results"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsx)(t.td,{children:"The output of the executed Python code, including any printed results or errors."})]})})]})]}),"\n",(0,r.jsx)(t.h2,{id:"save-file",children:"Save file"}),"\n",(0,r.jsxs)(t.p,{children:["This component saves ",(0,r.jsx)(t.a,{href:"/data-types#data",children:"DataFrames, Data, or Messages"})," to various file formats."]}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["To use this component in a flow, connect a component that outputs ",(0,r.jsx)(t.a,{href:"/data-types#data",children:"DataFrames, Data, or Messages"})," to the ",(0,r.jsx)(t.strong,{children:"Save to File"})," component's input.\nThe following example connects a ",(0,r.jsx)(t.strong,{children:"Webhook"})," component to two ",(0,r.jsx)(t.strong,{children:"Save to File"})," components to demonstrate the different outputs."]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"Two Save-to File components connected to a webhook",src:n(35073).A+"",width:"1458",height:"1732"})}),"\n",(0,r.jsxs)(t.ol,{start:"2",children:["\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Save to File"})," component's ",(0,r.jsx)(t.strong,{children:"Input Type"})," field, select the expected input type.\nThis example expects ",(0,r.jsx)(t.strong,{children:"Data"})," from the ",(0,r.jsx)(t.strong,{children:"Webhook"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"File Format"})," field, select the file type for your saved file.\nThis example uses ",(0,r.jsx)(t.code,{children:".md"})," in one ",(0,r.jsx)(t.strong,{children:"Save to File"})," component, and ",(0,r.jsx)(t.code,{children:".xlsx"})," in another."]}),"\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"File Path"})," field, enter the path for your saved file.\nThis example uses ",(0,r.jsx)(t.code,{children:"./output/employees.xlsx"})," and ",(0,r.jsx)(t.code,{children:"./output/employees.md"})," to save the files in a directory relative to where Langflow is running.\nThe component accepts both relative and absolute paths, and creates any necessary directories if they don't exist."]}),"\n"]}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsxs)(t.p,{children:["If you enter a format in the ",(0,r.jsx)(t.code,{children:"file_path"})," that is not accepted, the component appends the proper format to the file.\nFor example, if the selected ",(0,r.jsx)(t.code,{children:"file_format"})," is ",(0,r.jsx)(t.code,{children:"csv"}),", and you enter ",(0,r.jsx)(t.code,{children:"file_path"})," as ",(0,r.jsx)(t.code,{children:"./output/test.txt"}),", the file is saved as ",(0,r.jsx)(t.code,{children:"./output/test.txt.csv"})," so the file is not corrupted."]})}),"\n",(0,r.jsxs)(t.ol,{start:"5",children:["\n",(0,r.jsxs)(t.li,{children:["Send a POST request to the ",(0,r.jsx)(t.strong,{children:"Webhook"})," containing your JSON data.\nReplace ",(0,r.jsx)(t.code,{children:"YOUR_FLOW_ID"})," with your flow ID.\nThis example uses the default Langflow server address."]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:'curl -X POST "http://127.0.0.1:7860/api/v1/webhook/YOUR_FLOW_ID" \\',props:{}}]},{tokens:[{content:"-H 'Content-Type: application/json' \\",props:{}}]},{tokens:[{content:"-H 'x-api-key: LANGFLOW_API_KEY' \\",props:{}}]},{tokens:[{content:"-d '{",props:{}}]},{tokens:[{content:' "Name": ["Alex Cruz", "Kalani Smith", "Noam Johnson"],',props:{}}]},{tokens:[{content:' "Role": ["Developer", "Designer", "Manager"],',props:{}}]},{tokens:[{content:' "Department": ["Engineering", "Design", "Management"]',props:{}}]},{tokens:[{content:"}'",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(t.ol,{start:"6",children:["\n",(0,r.jsxs)(t.li,{children:["In your local filesystem, open the ",(0,r.jsx)(t.code,{children:"outputs"})," directory.\nYou should see two files created from the data you've sent: one in ",(0,r.jsx)(t.code,{children:".xlsx"})," for structured spreadsheets, and one in Markdown."]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"| Name | Role | Department |",props:{}}]},{tokens:[{content:"|:-------------|:----------|:-------------|",props:{}}]},{tokens:[{content:"| Alex Cruz | Developer | Engineering |",props:{}}]},{tokens:[{content:"| Kalani Smith | Designer | Design |",props:{}}]},{tokens:[{content:"| Noam Johnson | Manager | Management |",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsx)(t.h3,{id:"file-input-format-options",children:"File input format options"}),"\n",(0,r.jsxs)(t.p,{children:["For ",(0,r.jsx)(t.code,{children:"DataFrame"})," and ",(0,r.jsx)(t.code,{children:"Data"})," inputs, the component can create:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.code,{children:"csv"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.code,{children:"excel"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.code,{children:"json"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.code,{children:"markdown"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.code,{children:"pdf"})}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["For ",(0,r.jsx)(t.code,{children:"Message"})," inputs, the component can create:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.code,{children:"txt"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.code,{children:"json"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.code,{children:"markdown"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.code,{children:"pdf"})}),"\n"]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"input_text"}),(0,r.jsx)(t.td,{children:"Input Text"}),(0,r.jsx)(t.td,{children:"The text to analyze and extract patterns from."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"pattern"}),(0,r.jsx)(t.td,{children:"Regex Pattern"}),(0,r.jsx)(t.td,{children:"The regular expression pattern to match in the text."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"input_type"}),(0,r.jsx)(t.td,{children:"Input Type"}),(0,r.jsx)(t.td,{children:"The type of input to save."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"df"}),(0,r.jsx)(t.td,{children:"DataFrame"}),(0,r.jsx)(t.td,{children:"The DataFrame to save."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"data"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsx)(t.td,{children:"The Data object to save."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"message"}),(0,r.jsx)(t.td,{children:"Message"}),(0,r.jsx)(t.td,{children:"The Message to save."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"file_format"}),(0,r.jsx)(t.td,{children:"File Format"}),(0,r.jsx)(t.td,{children:"The file format to save the input in."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"file_path"}),(0,r.jsx)(t.td,{children:"File Path"}),(0,r.jsx)(t.td,{children:"The full file path including filename and extension."})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"data"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsx)(t.td,{children:"A list of extracted matches as Data objects."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"text"}),(0,r.jsx)(t.td,{children:"Message"}),(0,r.jsx)(t.td,{children:"The extracted matches formatted as a Message object."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"confirmation"}),(0,r.jsx)(t.td,{children:"Confirmation"}),(0,r.jsx)(t.td,{children:"The confirmation message after saving the file."})]})]})]})]}),"\n",(0,r.jsx)(t.h2,{id:"smart-function",children:"Smart function"}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsx)(t.p,{children:"Prior to Langflow 1.5, this component was named the Lambda filter."})}),"\n",(0,r.jsx)(t.p,{children:"This component uses an LLM to generate a function for filtering or transforming structured data."}),"\n",(0,r.jsxs)(t.p,{children:["To use the ",(0,r.jsx)(t.strong,{children:"Smart function"})," component, you must connect it to a ",(0,r.jsx)(t.a,{href:"/components-models",children:"Language Model"})," component, which the component uses to generate a function based on the natural language instructions in the ",(0,r.jsx)(t.strong,{children:"Instructions"})," field."]}),"\n",(0,r.jsxs)(t.p,{children:["This example gets JSON data from the ",(0,r.jsx)(t.code,{children:"https://jsonplaceholder.typicode.com/users"})," API endpoint.\nThe ",(0,r.jsx)(t.strong,{children:"Instructions"})," field in the ",(0,r.jsx)(t.strong,{children:"Smart function"})," component specifies the task ",(0,r.jsx)(t.code,{children:"extract emails"}),".\nThe connected LLM creates a filter based on the instructions, and successfully extracts a list of email addresses from the JSON data."]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"Smart function connected to an LLM",src:n(66539).A+"",width:"4000",height:"1796"})}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"data"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsx)(t.td,{children:"The structured data to filter or transform using a Lambda function."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"llm"}),(0,r.jsx)(t.td,{children:"Language Model"}),(0,r.jsxs)(t.td,{children:["The connection port for a ",(0,r.jsx)(t.a,{href:"/components-models",children:"Model"})," component."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"filter_instruction"}),(0,r.jsx)(t.td,{children:"Instructions"}),(0,r.jsxs)(t.td,{children:["The natural language instructions for how to filter or transform the data using a Lambda function, such as ",(0,r.jsx)(t.code,{children:"Filter the data to only include items where the 'status' is 'active'"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"sample_size"}),(0,r.jsx)(t.td,{children:"Sample Size"}),(0,r.jsx)(t.td,{children:"For large datasets, the number of characters to sample from the dataset head and tail."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"max_size"}),(0,r.jsx)(t.td,{children:"Max Size"}),(0,r.jsxs)(t.td,{children:['The number of characters for the data to be considered "large", which triggers sampling by the ',(0,r.jsx)(t.code,{children:"sample_size"})," value."]})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"filtered_data"}),(0,r.jsx)(t.td,{children:"Filtered Data"}),(0,r.jsxs)(t.td,{children:["The filtered or transformed ",(0,r.jsx)(t.a,{href:"/data-types#data",children:"Data object"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"dataframe"}),(0,r.jsx)(t.td,{children:"DataFrame"}),(0,r.jsxs)(t.td,{children:["The filtered data as a ",(0,r.jsx)(t.a,{href:"/data-types#dataframe",children:"DataFrame"}),"."]})]})]})]})]}),"\n",(0,r.jsx)(t.h2,{id:"split-text",children:"Split text"}),"\n",(0,r.jsx)(t.p,{children:"This component splits text into chunks based on specified criteria. It's ideal for chunking data to be tokenized and embedded into vector databases."}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Split Text"})," component outputs ",(0,r.jsx)(t.strong,{children:"Chunks"})," or ",(0,r.jsx)(t.strong,{children:"DataFrame"}),".\nThe ",(0,r.jsx)(t.strong,{children:"Chunks"})," output returns a list of individual text chunks.\nThe ",(0,r.jsx)(t.strong,{children:"DataFrame"})," output returns a structured data format, with additional ",(0,r.jsx)(t.code,{children:"text"})," and ",(0,r.jsx)(t.code,{children:"metadata"})," columns applied."]}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["To use this component in a flow, connect a component that outputs ",(0,r.jsx)(t.a,{href:"/data-types#data",children:"Data or DataFrame"})," to the ",(0,r.jsx)(t.strong,{children:"Split Text"})," component's ",(0,r.jsx)(t.strong,{children:"Data"})," port.\nThis example uses the ",(0,r.jsx)(t.strong,{children:"URL"})," component, which is fetching JSON placeholder data."]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"Split text component and chroma-db",src:n(49823).A+"",width:"4000",height:"2766"})}),"\n",(0,r.jsxs)(t.ol,{start:"2",children:["\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Split Text"})," component, define your data splitting parameters."]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["This example splits incoming JSON data at the separator ",(0,r.jsx)(t.code,{children:"},"}),", so each chunk contains one JSON object."]}),"\n",(0,r.jsxs)(t.p,{children:["The order of precedence is ",(0,r.jsx)(t.strong,{children:"Separator"}),", then ",(0,r.jsx)(t.strong,{children:"Chunk Size"}),", and then ",(0,r.jsx)(t.strong,{children:"Chunk Overlap"}),".\nIf any segment after separator splitting is longer than ",(0,r.jsx)(t.code,{children:"chunk_size"}),", it is split again to fit within ",(0,r.jsx)(t.code,{children:"chunk_size"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["After ",(0,r.jsx)(t.code,{children:"chunk_size"}),", ",(0,r.jsx)(t.strong,{children:"Chunk Overlap"})," is applied between chunks to maintain context."]}),"\n",(0,r.jsxs)(t.ol,{start:"3",children:["\n",(0,r.jsxs)(t.li,{children:["Connect a ",(0,r.jsx)(t.strong,{children:"Chat Output"})," component to the ",(0,r.jsx)(t.strong,{children:"Split Text"})," component's ",(0,r.jsx)(t.strong,{children:"DataFrame"})," output to view its output."]}),"\n",(0,r.jsxs)(t.li,{children:["Click ",(0,r.jsx)(t.strong,{children:"Playground"}),", and then click ",(0,r.jsx)(t.strong,{children:"Run Flow"}),".\nThe output contains a table of JSON objects split at ",(0,r.jsx)(t.code,{children:"},"}),"."]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{}}]},{tokens:[{content:'"userId": 1,',props:{}}]},{tokens:[{content:'"id": 1,',props:{}}]},{tokens:[{content:'"title": "Introduction to Artificial Intelligence",',props:{}}]},{tokens:[{content:'"body": "Learn the basics of Artificial Intelligence and its applications in various industries.",',props:{}}]},{tokens:[{content:'"link": "https://example.com/article1",',props:{}}]},{tokens:[{content:'"comment_count": 8',props:{}}]},{tokens:[{content:"},",props:{}}]},{tokens:[{content:"{",props:{}}]},{tokens:[{content:'"userId": 2,',props:{}}]},{tokens:[{content:'"id": 2,',props:{}}]},{tokens:[{content:'"title": "Web Development with React",',props:{}}]},{tokens:[{content:'"body": "Build modern web applications using React.js and explore its powerful features.",',props:{}}]},{tokens:[{content:'"link": "https://example.com/article2",',props:{}}]},{tokens:[{content:'"comment_count": 12',props:{}}]},{tokens:[{content:"},",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(t.ol,{start:"5",children:["\n",(0,r.jsxs)(t.li,{children:["Clear the ",(0,r.jsx)(t.strong,{children:"Separator"})," field, and then run the flow again.\nInstead of JSON objects, the output contains 50-character lines of text with 10 characters of overlap."]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:'First chunk: "title": "Introduction to Artificial Intelligence""',props:{}}]},{tokens:[{content:'Second chunk: "elligence", "body": "Learn the basics of Artif"',props:{}}]},{tokens:[{content:'Third chunk: "s of Artificial Intelligence and its applications"',props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"data_inputs"}),(0,r.jsx)(t.td,{children:"Input Documents"}),(0,r.jsxs)(t.td,{children:["The data to split. The component accepts ",(0,r.jsx)(t.a,{href:"/data-types#data",children:"Data"})," or ",(0,r.jsx)(t.a,{href:"/data-types#dataframe",children:"DataFrame"})," objects."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"chunk_overlap"}),(0,r.jsx)(t.td,{children:"Chunk Overlap"}),(0,r.jsxs)(t.td,{children:["The number of characters to overlap between chunks. Default: ",(0,r.jsx)(t.code,{children:"200"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"chunk_size"}),(0,r.jsx)(t.td,{children:"Chunk Size"}),(0,r.jsxs)(t.td,{children:["The maximum number of characters in each chunk. Default: ",(0,r.jsx)(t.code,{children:"1000"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"separator"}),(0,r.jsx)(t.td,{children:"Separator"}),(0,r.jsxs)(t.td,{children:["The character to split on. Default: ",(0,r.jsx)(t.code,{children:"newline"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"text_key"}),(0,r.jsx)(t.td,{children:"Text Key"}),(0,r.jsxs)(t.td,{children:["The key to use for the text column. Default: ",(0,r.jsx)(t.code,{children:"text"}),"."]})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"chunks"}),(0,r.jsx)(t.td,{children:"Chunks"}),(0,r.jsxs)(t.td,{children:["A list of split text chunks as ",(0,r.jsx)(t.a,{href:"/data-types#data",children:"Data"})," objects."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"dataframe"}),(0,r.jsx)(t.td,{children:"DataFrame"}),(0,r.jsxs)(t.td,{children:["A list of split text chunks as ",(0,r.jsx)(t.a,{href:"/data-types#dataframe",children:"DataFrame"})," objects."]})]})]})]})]}),"\n",(0,r.jsx)(t.h2,{id:"structured-output",children:"Structured output"}),"\n",(0,r.jsx)(t.p,{children:"This component transforms LLM responses into structured data formats."}),"\n",(0,r.jsxs)(t.p,{children:["In this example from the ",(0,r.jsx)(t.strong,{children:"Financial Support Parser"})," template, the ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component transforms unstructured financial reports into structured data."]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"Structured output example",src:n(82798).A+"",width:"4000",height:"1724"})}),"\n",(0,r.jsxs)(t.p,{children:["The connected LLM model is prompted by the ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component's ",(0,r.jsx)(t.code,{children:"Format Instructions"})," parameter to extract structured output from the unstructured text. ",(0,r.jsx)(t.code,{children:"Format Instructions"})," is utilized as the system prompt for the ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component."]}),"\n",(0,r.jsxs)(t.p,{children:["In the ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component, click the ",(0,r.jsx)(t.strong,{children:"Open table"})," button to view the ",(0,r.jsx)(t.code,{children:"Output Schema"})," table.\nThe ",(0,r.jsx)(t.code,{children:"Output Schema"})," parameter defines the structure and data types for the model's output using a table with the following fields:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Name"}),": The name of the output field."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Description"}),": The purpose of the output field."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Type"}),": The data type of the output field. The available types are ",(0,r.jsx)(t.code,{children:"str"}),", ",(0,r.jsx)(t.code,{children:"int"}),", ",(0,r.jsx)(t.code,{children:"float"}),", ",(0,r.jsx)(t.code,{children:"bool"}),", ",(0,r.jsx)(t.code,{children:"list"}),", or ",(0,r.jsx)(t.code,{children:"dict"}),". The default is ",(0,r.jsx)(t.code,{children:"text"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Multiple"}),": This feature is deprecated. Currently, it is set to ",(0,r.jsx)(t.code,{children:"True"})," by default if you expect multiple values for a single field. For example, a ",(0,r.jsx)(t.code,{children:"list"})," of ",(0,r.jsx)(t.code,{children:"features"})," is set to ",(0,r.jsx)(t.code,{children:"True"})," to contain multiple values, such as ",(0,r.jsx)(t.code,{children:'["waterproof", "durable", "lightweight"]'}),". Default: ",(0,r.jsx)(t.code,{children:"True"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Parse DataFrame"})," component parses the structured output into a template for orderly presentation in chat output. The template receives the values from the ",(0,r.jsx)(t.code,{children:"output_schema"})," table with curly braces."]}),"\n",(0,r.jsxs)(t.p,{children:["For example, the template ",(0,r.jsx)(t.code,{children:"EBITDA: {EBITDA} , Net Income: {NET_INCOME} , GROSS_PROFIT: {GROSS_PROFIT}"})," presents the extracted values in the ",(0,r.jsx)(t.strong,{children:"Playground"})," as ",(0,r.jsx)(t.code,{children:"EBITDA: 900 million , Net Income: 500 million , GROSS_PROFIT: 1.2 billion"}),"."]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"llm"}),(0,r.jsx)(t.td,{children:"LanguageModel"}),(0,r.jsx)(t.td,{children:"The language model to use to generate the structured output."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"input_value"}),(0,r.jsx)(t.td,{children:"String"}),(0,r.jsx)(t.td,{children:"The input message to the language model."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"system_prompt"}),(0,r.jsx)(t.td,{children:"String"}),(0,r.jsx)(t.td,{children:"The instructions to the language model for formatting the output."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"schema_name"}),(0,r.jsx)(t.td,{children:"String"}),(0,r.jsx)(t.td,{children:"The name for the output data schema."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"output_schema"}),(0,r.jsx)(t.td,{children:"Table"}),(0,r.jsx)(t.td,{children:"The structure and data types for the model's output."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"multiple"}),(0,r.jsx)(t.td,{children:"Boolean"}),(0,r.jsxs)(t.td,{children:["[Deprecated] Always set to ",(0,r.jsx)(t.code,{children:"True"}),"."]})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"structured_output"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsx)(t.td,{children:"The structured output is a Data object based on the defined schema."})]})})]})]}),"\n",(0,r.jsx)(t.h2,{id:"type-convert",children:"Type convert"}),"\n",(0,r.jsxs)(t.p,{children:["This component converts data types between different formats. It can transform data between ",(0,r.jsx)(t.a,{href:"/data-types#data",children:"Data"}),", ",(0,r.jsx)(t.a,{href:"/data-types#dataframe",children:"DataFrame"}),", and ",(0,r.jsx)(t.a,{href:"/data-types#message",children:"Message"})," objects."]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Data"}),": A structured object that contains both text and metadata."]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"User Profile"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "data"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"John Smith"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "age"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"30",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "email"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"john@example.com"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"DataFrame"}),": A tabular data structure with rows and columns.\nKeys are columns, and each dictionary (a collection of key-value pairs) in the list is a row."]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"[",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"John Smith"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "age"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"30",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "email"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"john@example.com"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Jane Doe"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "age"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"25",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "email"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"jane@example.com"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Message"}),": A string, such as",(0,r.jsx)(t.code,{children:'"Name: John Smith, Age: 30, Email: john@example.com"'}),"."]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:"To use this component in a flow, do the following:"}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["Add the ",(0,r.jsx)(t.strong,{children:"Web search"})," component to the ",(0,r.jsx)(t.a,{href:"/basic-prompting",children:"Basic prompting"})," flow. In the ",(0,r.jsx)(t.strong,{children:"Search Query"})," field, enter a query, such as ",(0,r.jsx)(t.code,{children:"environmental news"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Connect the ",(0,r.jsx)(t.strong,{children:"Web search"})," component's output to a component that accepts the DataFrame input.\nThis example uses a ",(0,r.jsx)(t.strong,{children:"Prompt"})," component to give the chatbot context, so you must convert the ",(0,r.jsx)(t.strong,{children:"Web search"})," component's DataFrame output to a Message type."]}),"\n",(0,r.jsxs)(t.li,{children:["Connect a ",(0,r.jsx)(t.strong,{children:"Type Convert"})," component to convert the DataFrame to a Message."]}),"\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Type Convert"})," component, in the ",(0,r.jsx)(t.strong,{children:"Output Type"})," field, select ",(0,r.jsx)(t.strong,{children:"Message"}),".\nYour flow looks like this:"]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"Type convert web search output to chat",src:n(42547).A+"",width:"4000",height:"1826"})}),"\n",(0,r.jsxs)(t.ol,{start:"5",children:["\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Language Model"})," component, in the ",(0,r.jsx)(t.strong,{children:"OpenAI API Key"})," field, add your OpenAI API key."]}),"\n",(0,r.jsxs)(t.li,{children:["Click ",(0,r.jsx)(t.strong,{children:"Playground"}),", and then ask about ",(0,r.jsx)(t.code,{children:"latest news"}),"."]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:"The search results are returned to the Playground as a message."}),"\n",(0,r.jsx)(t.p,{children:"Result:"}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Latest news",props:{}}]},{tokens:[{content:"AI",props:{}}]},{tokens:[{content:"gpt-4o-mini",props:{}}]},{tokens:[{content:"Here are some of the latest news articles related to the environment:",props:{}}]},{tokens:[{content:"Ozone Pollution and Global Warming: A recent study highlights that ozone pollution is a significant global environmental concern, threatening human health and crop production while exacerbating global warming. Read more",props:{}}]},{tokens:[{content:"...",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"input_data"}),(0,r.jsx)(t.td,{children:"Input Data"}),(0,r.jsx)(t.td,{children:"The data to convert. Accepts Data, DataFrame, or Message objects."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"output_type"}),(0,r.jsx)(t.td,{children:"Output Type"}),(0,r.jsx)(t.td,{children:"The desired output type. Options: Data, DataFrame, or Message."})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"output"}),(0,r.jsx)(t.td,{children:"Output"}),(0,r.jsx)(t.td,{children:"The converted data in the specified format."})]})})]})]}),"\n",(0,r.jsx)(t.h2,{id:"legacy-components",children:"Legacy components"}),"\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Legacy"})," components are available for use but are no longer supported."]}),"\n",(0,r.jsx)(t.h3,{id:"alter-metadata",children:"Alter metadata"}),"\n",(0,r.jsx)(t.admonition,{type:"important",children:(0,r.jsxs)(t.p,{children:["This component is in ",(0,r.jsx)(t.strong,{children:"Legacy"}),", which means it is available for use but no longer in active development.\nInstead, use the ",(0,r.jsx)(t.a,{href:"#data-operations",children:"Data operations"})," component."]})}),"\n",(0,r.jsxs)(t.p,{children:["This component modifies metadata of input objects. It can add new metadata, update existing metadata, and remove specified metadata fields. The component works with both ",(0,r.jsx)(t.a,{href:"/data-types#message",children:"Message"})," and ",(0,r.jsx)(t.a,{href:"/data-types#data",children:"Data"})," objects, and can also create a new Data object from user-provided text."]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"input_value"}),(0,r.jsx)(t.td,{children:"Input"}),(0,r.jsx)(t.td,{children:"Objects to which Metadata should be added."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"text_in"}),(0,r.jsx)(t.td,{children:"User Text"}),(0,r.jsxs)(t.td,{children:["Text input; the value is contained in the 'text' attribute of the ",(0,r.jsx)(t.a,{href:"/data-types#data",children:"Data"})," object. Empty text entries are ignored."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"metadata"}),(0,r.jsx)(t.td,{children:"Metadata"}),(0,r.jsx)(t.td,{children:"Metadata to add to each object."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"remove_fields"}),(0,r.jsx)(t.td,{children:"Fields to Remove"}),(0,r.jsx)(t.td,{children:"Metadata fields to remove."})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"data"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsx)(t.td,{children:"List of Input objects, each with added metadata."})]})})]})]}),"\n",(0,r.jsx)(t.h3,{id:"combine-data",children:"Combine data"}),"\n",(0,r.jsx)(t.admonition,{type:"important",children:(0,r.jsxs)(t.p,{children:["This component is in ",(0,r.jsx)(t.strong,{children:"Legacy"}),", which means it is available for use but no longer in active development.\nPrior to Langflow version 1.1.3, this component was named ",(0,r.jsx)(t.strong,{children:"Merge Data"}),"."]})}),"\n",(0,r.jsxs)(t.p,{children:["This component combines multiple data sources into a single unified ",(0,r.jsx)(t.a,{href:"/data-types#data",children:"Data"})," object."]}),"\n",(0,r.jsx)(t.p,{children:"The component iterates through the input list of data objects, merging them into a single data object. If the input list is empty, it returns an empty data object. If there's only one input data object, it returns that object unchanged. The merging process uses the addition operator to combine data objects."}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"data"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsx)(t.td,{children:"A list of data objects to be merged."})]})})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"merged_data"}),(0,r.jsx)(t.td,{children:"Merged Data"}),(0,r.jsxs)(t.td,{children:["A single ",(0,r.jsx)(t.a,{href:"/data-types#data",children:"Data"})," object containing the combined information from all input data objects."]})]})})]})]}),"\n",(0,r.jsx)(t.h3,{id:"combine-text",children:"Combine text"}),"\n",(0,r.jsx)(t.admonition,{type:"important",children:(0,r.jsxs)(t.p,{children:["This component is in ",(0,r.jsx)(t.strong,{children:"Legacy"}),", which means it is available for use but no longer in active development."]})}),"\n",(0,r.jsx)(t.p,{children:"This component concatenates two text sources into a single text chunk using a specified delimiter."}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["To use this component in a flow, connect two components that output ",(0,r.jsx)(t.a,{href:"/data-types#message",children:"Messages"})," to the ",(0,r.jsx)(t.strong,{children:"Combine Text"})," component's ",(0,r.jsx)(t.strong,{children:"First Text"})," and ",(0,r.jsx)(t.strong,{children:"Second Text"})," inputs.\nThis example uses two ",(0,r.jsx)(t.strong,{children:"Text Input"})," components."]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"Combine text component",src:n(41502).A+"",width:"1148",height:"675"})}),"\n",(0,r.jsxs)(t.ol,{start:"2",children:["\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Combine Text"})," component, in the ",(0,r.jsx)(t.strong,{children:"Text"})," fields of both ",(0,r.jsx)(t.strong,{children:"Text Input"})," components, enter some text to combine."]}),"\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Combine Text"})," component, enter an optional ",(0,r.jsx)(t.strong,{children:"Delimiter"})," value.\nThe delimiter character separates the combined texts.\nThis example uses ",(0,r.jsx)(t.code,{children:"\\n\\n **end first text** \\n\\n **start second text** \\n\\n"})," to label the texts and create newlines between them."]}),"\n",(0,r.jsxs)(t.li,{children:["Connect a ",(0,r.jsx)(t.strong,{children:"Chat Output"})," component to view the text combination."]}),"\n",(0,r.jsxs)(t.li,{children:["Click ",(0,r.jsx)(t.strong,{children:"Playground"}),", and then click ",(0,r.jsx)(t.strong,{children:"Run Flow"}),".\nThe combined text appears in the ",(0,r.jsx)(t.strong,{children:"Playground"}),"."]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"This is the first text. Let's combine text!",props:{}}]},{tokens:[{content:"end first text",props:{}}]},{tokens:[{content:"start second text",props:{}}]},{tokens:[{content:"Here's the second part. We'll see how combining text works.",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"first_text"}),(0,r.jsx)(t.td,{children:"First Text"}),(0,r.jsx)(t.td,{children:"The first text input to concatenate."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"second_text"}),(0,r.jsx)(t.td,{children:"Second Text"}),(0,r.jsx)(t.td,{children:"The second text input to concatenate."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"delimiter"}),(0,r.jsx)(t.td,{children:"Delimiter"}),(0,r.jsx)(t.td,{children:"A string used to separate the two text inputs. The default is a space."})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"message"}),(0,r.jsx)(t.td,{children:"Message"}),(0,r.jsx)(t.td,{children:"A Message object containing the combined text."})]})})]})]}),"\n",(0,r.jsx)(t.h3,{id:"create-data",children:"Create data"}),"\n",(0,r.jsx)(t.admonition,{type:"important",children:(0,r.jsxs)(t.p,{children:["This component is in ",(0,r.jsx)(t.strong,{children:"Legacy"}),", which means it is available for use but no longer in active development."]})}),"\n",(0,r.jsxs)(t.p,{children:["This component dynamically creates a ",(0,r.jsx)(t.a,{href:"/data-types#data",children:"Data"})," object with a specified number of fields."]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"number_of_fields"}),(0,r.jsx)(t.td,{children:"Number of Fields"}),(0,r.jsx)(t.td,{children:"The number of fields to be added to the record."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"text_key"}),(0,r.jsx)(t.td,{children:"Text Key"}),(0,r.jsx)(t.td,{children:"Key that identifies the field to be used as the text content."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"text_key_validator"}),(0,r.jsx)(t.td,{children:"Text Key Validator"}),(0,r.jsxs)(t.td,{children:["If enabled, checks if the given ",(0,r.jsx)(t.code,{children:"Text Key"})," is present in the given ",(0,r.jsx)(t.code,{children:"Data"}),"."]})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"data"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsxs)(t.td,{children:["A ",(0,r.jsx)(t.a,{href:"/data-types#data",children:"Data"})," object created with the specified fields and text key."]})]})})]})]}),"\n",(0,r.jsx)(t.h3,{id:"data-to-dataframe",children:"Data to DataFrame"}),"\n",(0,r.jsx)(t.admonition,{type:"important",children:(0,r.jsxs)(t.p,{children:["This component is in ",(0,r.jsx)(t.strong,{children:"Legacy"}),", which means it is available for use but no longer in active development."]})}),"\n",(0,r.jsxs)(t.p,{children:["This component converts one or multiple ",(0,r.jsx)(t.a,{href:"/data-types#data",children:"Data"})," objects into a ",(0,r.jsx)(t.a,{href:"/data-types#dataframe",children:"DataFrame"}),". Each Data object corresponds to one row in the resulting DataFrame. Fields from the ",(0,r.jsx)(t.code,{children:".data"})," attribute become columns, and the ",(0,r.jsx)(t.code,{children:".text"})," field (if present) is placed in a 'text' column."]}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["To use this component in a flow, connect a component that outputs ",(0,r.jsx)(t.a,{href:"/data-types#data",children:"Data"})," to the ",(0,r.jsx)(t.strong,{children:"Data to Dataframe"})," component's input.\nThis example connects a ",(0,r.jsx)(t.strong,{children:"Webhook"})," component to convert ",(0,r.jsx)(t.code,{children:"text"})," and ",(0,r.jsx)(t.code,{children:"data"})," into a DataFrame."]}),"\n",(0,r.jsxs)(t.li,{children:["To view the flow's output, connect a ",(0,r.jsx)(t.strong,{children:"Chat Output"})," component to the ",(0,r.jsx)(t.strong,{children:"Data to Dataframe"})," component."]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"A webhook and data to dataframe",src:n(45709).A+"",width:"1221",height:"468"})}),"\n",(0,r.jsxs)(t.ol,{start:"3",children:["\n",(0,r.jsxs)(t.li,{children:["Send a POST request to the ",(0,r.jsx)(t.strong,{children:"Webhook"})," containing your JSON data.\nReplace ",(0,r.jsx)(t.code,{children:"YOUR_FLOW_ID"})," with your flow ID.\nThis example uses the default Langflow server address."]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:'curl -X POST "http://127.0.0.1:7860/api/v1/webhook/YOUR_FLOW_ID" \\',props:{}}]},{tokens:[{content:"-H 'Content-Type: application/json' \\",props:{}}]},{tokens:[{content:"-d '{",props:{}}]},{tokens:[{content:' "text": "Alex Cruz - Employee Profile",',props:{}}]},{tokens:[{content:' "data": {',props:{}}]},{tokens:[{content:' "Name": "Alex Cruz",',props:{}}]},{tokens:[{content:' "Role": "Developer",',props:{}}]},{tokens:[{content:' "Department": "Engineering"',props:{}}]},{tokens:[{content:" }",props:{}}]},{tokens:[{content:"}'",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(t.ol,{start:"4",children:["\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Playground"}),", view the output of your flow.\nThe ",(0,r.jsx)(t.strong,{children:"Data to DataFrame"})," component converts the webhook request into a ",(0,r.jsx)(t.code,{children:"DataFrame"}),", with ",(0,r.jsx)(t.code,{children:"text"})," and ",(0,r.jsx)(t.code,{children:"data"})," fields as columns."]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"| text | data |",props:{}}]},{tokens:[{content:"|:-----------------------------|:------------------------------------------------------------------------|",props:{}}]},{tokens:[{content:"| Alex Cruz - Employee Profile | {'Name': 'Alex Cruz', 'Role': 'Developer', 'Department': 'Engineering'} |",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(t.ol,{start:"5",children:["\n",(0,r.jsx)(t.li,{children:"Send another employee data object."}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:'curl -X POST "http://127.0.0.1:7860/api/v1/webhook/YOUR_FLOW_ID" \\',props:{}}]},{tokens:[{content:"-H 'Content-Type: application/json' \\",props:{}}]},{tokens:[{content:"-d '{",props:{}}]},{tokens:[{content:' "text": "Kalani Smith - Employee Profile",',props:{}}]},{tokens:[{content:' "data": {',props:{}}]},{tokens:[{content:' "Name": "Kalani Smith",',props:{}}]},{tokens:[{content:' "Role": "Designer",',props:{}}]},{tokens:[{content:' "Department": "Design"',props:{}}]},{tokens:[{content:" }",props:{}}]},{tokens:[{content:"}'",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(t.ol,{start:"6",children:["\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Playground"}),", this request is also converted to ",(0,r.jsx)(t.code,{children:"DataFrame"}),"."]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"| text | data |",props:{}}]},{tokens:[{content:"|:--------------------------------|:---------------------------------------------------------------------|",props:{}}]},{tokens:[{content:"| Kalani Smith - Employee Profile | {'Name': 'Kalani Smith', 'Role': 'Designer', 'Department': 'Design'} |",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"data_list"}),(0,r.jsx)(t.td,{children:"Data or Data List"}),(0,r.jsx)(t.td,{children:"One or multiple Data objects to transform into a DataFrame."})]})})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"dataframe"}),(0,r.jsx)(t.td,{children:"DataFrame"}),(0,r.jsx)(t.td,{children:"A DataFrame built from each Data object's fields plus a text column."})]})})]})]}),"\n",(0,r.jsx)(t.h3,{id:"filter-data",children:"Filter data"}),"\n",(0,r.jsx)(t.admonition,{type:"important",children:(0,r.jsxs)(t.p,{children:["This component is in ",(0,r.jsx)(t.strong,{children:"Legacy"}),", which means it is available for use but no longer in active development.\nInstead, use the ",(0,r.jsx)(t.a,{href:"#data-operations",children:"Data operations"})," component."]})}),"\n",(0,r.jsxs)(t.p,{children:["This component filters a ",(0,r.jsx)(t.a,{href:"/data-types#data",children:"Data"})," object based on a list of keys."]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"data"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsx)(t.td,{children:"The Data object to filter."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"filter_criteria"}),(0,r.jsx)(t.td,{children:"Filter Criteria"}),(0,r.jsx)(t.td,{children:"A list of keys to filter by."})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"filtered_data"}),(0,r.jsx)(t.td,{children:"Filtered Data"}),(0,r.jsx)(t.td,{children:"A new Data object containing only the key-value pairs that match the filter criteria."})]})})]})]}),"\n",(0,r.jsx)(t.h3,{id:"filter-values",children:"Filter values"}),"\n",(0,r.jsx)(t.admonition,{type:"important",children:(0,r.jsxs)(t.p,{children:["This component is in ",(0,r.jsx)(t.strong,{children:"Legacy"}),", which means it is available for use but no longer in active development.\nInstead, use the ",(0,r.jsx)(t.a,{href:"#data-operations",children:"Data operations"})," component."]})}),"\n",(0,r.jsx)(t.p,{children:"The Filter values component filters a list of data items based on a specified key, filter value, and comparison operator."}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"input_data"}),(0,r.jsx)(t.td,{children:"Input data"}),(0,r.jsx)(t.td,{children:"The list of data items to filter."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"filter_key"}),(0,r.jsx)(t.td,{children:"Filter Key"}),(0,r.jsx)(t.td,{children:"The key to filter on."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"filter_value"}),(0,r.jsx)(t.td,{children:"Filter Value"}),(0,r.jsx)(t.td,{children:"The value to filter by."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"operator"}),(0,r.jsx)(t.td,{children:"Comparison Operator"}),(0,r.jsx)(t.td,{children:"The operator to apply for comparing the values."})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"filtered_data"}),(0,r.jsx)(t.td,{children:"Filtered data"}),(0,r.jsx)(t.td,{children:"The resulting list of filtered data items."})]})})]})]}),"\n",(0,r.jsx)(t.h3,{id:"json-cleaner",children:"JSON cleaner"}),"\n",(0,r.jsx)(t.admonition,{type:"important",children:(0,r.jsxs)(t.p,{children:["This component is in ",(0,r.jsx)(t.strong,{children:"Legacy"}),", which means it is available for use but no longer in active development."]})}),"\n",(0,r.jsx)(t.p,{children:"The JSON cleaner component cleans JSON strings to ensure they are fully compliant with the JSON specification."}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"json_str"}),(0,r.jsx)(t.td,{children:"JSON String"}),(0,r.jsx)(t.td,{children:"The JSON string to be cleaned. This can be a raw, potentially malformed JSON string produced by language models or other sources that may not fully comply with JSON specifications."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"remove_control_chars"}),(0,r.jsx)(t.td,{children:"Remove Control Characters"}),(0,r.jsx)(t.td,{children:"If set to True, this option removes control characters (ASCII characters 0-31 and 127) from the JSON string. This can help eliminate invisible characters that might cause parsing issues or make the JSON invalid."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"normalize_unicode"}),(0,r.jsx)(t.td,{children:"Normalize Unicode"}),(0,r.jsx)(t.td,{children:"When enabled, this option normalizes Unicode characters in the JSON string to their canonical composition form (NFC). This ensures consistent representation of Unicode characters across different systems and prevents potential issues with character encoding."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"validate_json"}),(0,r.jsx)(t.td,{children:"Validate JSON"}),(0,r.jsx)(t.td,{children:"If set to True, this option attempts to parse the JSON string to ensure it is well-formed before applying the final repair operation. It raises a ValueError if the JSON is invalid, allowing for early detection of major structural issues in the JSON."})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"output"}),(0,r.jsx)(t.td,{children:"Cleaned JSON String"}),(0,r.jsx)(t.td,{children:"The resulting cleaned, repaired, and validated JSON string that fully complies with the JSON specification."})]})})]})]}),"\n",(0,r.jsx)(t.h3,{id:"message-to-data",children:"Message to data"}),"\n",(0,r.jsxs)(t.p,{children:["This component converts ",(0,r.jsx)(t.a,{href:"/data-types#message",children:"Message"})," objects to ",(0,r.jsx)(t.a,{href:"/data-types#data",children:"Data"})," objects."]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"message"}),(0,r.jsx)(t.td,{children:"Message"}),(0,r.jsx)(t.td,{children:"The Message object to convert to a Data object."})]})})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"data"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsx)(t.td,{children:"The converted Data object."})]})})]})]}),"\n",(0,r.jsx)(t.h3,{id:"parse-dataframe",children:"Parse DataFrame"}),"\n",(0,r.jsx)(t.admonition,{type:"important",children:(0,r.jsxs)(t.p,{children:["This component is in ",(0,r.jsx)(t.strong,{children:"Legacy"}),", which means it is available for use but no longer in active development.\nInstead, use the ",(0,r.jsx)(t.a,{href:"#parser",children:"Parser"})," component."]})}),"\n",(0,r.jsx)(t.p,{children:"This component converts DataFrames into plain text using templates."}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"df"}),(0,r.jsx)(t.td,{children:"DataFrame"}),(0,r.jsx)(t.td,{children:"The DataFrame to convert to text rows."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"template"}),(0,r.jsx)(t.td,{children:"Template"}),(0,r.jsxs)(t.td,{children:["Template for formatting (use ",(0,r.jsx)(t.code,{children:"{column_name}"})," placeholders)."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"sep"}),(0,r.jsx)(t.td,{children:"Separator"}),(0,r.jsx)(t.td,{children:"String to join rows in output."})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"text"}),(0,r.jsx)(t.td,{children:"Text"}),(0,r.jsx)(t.td,{children:"All rows combined into single text."})]})})]})]}),"\n",(0,r.jsx)(t.h3,{id:"parse-json",children:"Parse JSON"}),"\n",(0,r.jsx)(t.admonition,{type:"important",children:(0,r.jsxs)(t.p,{children:["This component is in ",(0,r.jsx)(t.strong,{children:"Legacy"}),", which means it is available for use but no longer in active development."]})}),"\n",(0,r.jsx)(t.p,{children:"This component converts and extracts JSON fields using JQ queries."}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"input_value"}),(0,r.jsx)(t.td,{children:"Input"}),(0,r.jsxs)(t.td,{children:["Data object to filter (",(0,r.jsx)(t.a,{href:"/data-types#message",children:"Message"})," or ",(0,r.jsx)(t.a,{href:"/data-types#data",children:"Data"}),")."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"query"}),(0,r.jsx)(t.td,{children:"JQ Query"}),(0,r.jsx)(t.td,{children:"JQ Query to filter the data"})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"filtered_data"}),(0,r.jsx)(t.td,{children:"Filtered Data"}),(0,r.jsxs)(t.td,{children:["Filtered data as list of ",(0,r.jsx)(t.a,{href:"/data-types#data",children:"Data"})," objects."]})]})})]})]}),"\n",(0,r.jsx)(t.h3,{id:"regex-extractor",children:"Regex extractor"}),"\n",(0,r.jsx)(t.admonition,{type:"important",children:(0,r.jsxs)(t.p,{children:["This component is in ",(0,r.jsx)(t.strong,{children:"Legacy"}),", which means it is available for use but no longer in active development."]})}),"\n",(0,r.jsx)(t.p,{children:"This component extracts patterns in text using regular expressions. It can be used to find and extract specific patterns or information in text."}),"\n",(0,r.jsx)(t.p,{children:"To use this component in a flow:"}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Connect the ",(0,r.jsx)(t.strong,{children:"Regex Extractor"})," to a ",(0,r.jsx)(t.strong,{children:"URL"})," component and a ",(0,r.jsx)(t.strong,{children:"Chat Output"})," component."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["In the ",(0,r.jsx)(t.strong,{children:"Regex Extractor"})," tool, enter a pattern to extract text from the ",(0,r.jsx)(t.strong,{children:"URL"}),' component\'s raw output.\nThis example extracts the first paragraph from the "In the News" section of ',(0,r.jsx)(t.code,{children:"https://en.wikipedia.org/wiki/Main_Page"}),":"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"In the news\\s*\\n(.*?)(?=\\n\\n)",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsx)(t.p,{children:"Result:"}),"\n",(0,r.jsx)(h.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Peruvian writer and Nobel Prize in Literature laureate Mario Vargas Llosa (pictured) dies at the age of 89.",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsx)(t.h3,{id:"select-data",children:"Select data"}),"\n",(0,r.jsx)(t.admonition,{type:"important",children:(0,r.jsxs)(t.p,{children:["This component is in ",(0,r.jsx)(t.strong,{children:"Legacy"}),", which means it is available for use but no longer in active development."]})}),"\n",(0,r.jsxs)(t.p,{children:["This component selects a single ",(0,r.jsx)(t.a,{href:"/data-types#data",children:"Data"})," item from a list."]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"data_list"}),(0,r.jsx)(t.td,{children:"Data List"}),(0,r.jsx)(t.td,{children:"List of data to select from"})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"data_index"}),(0,r.jsx)(t.td,{children:"Data Index"}),(0,r.jsx)(t.td,{children:"Index of the data to select"})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"selected_data"}),(0,r.jsx)(t.td,{children:"Selected Data"}),(0,r.jsxs)(t.td,{children:["The selected ",(0,r.jsx)(t.a,{href:"/data-types#data",children:"Data"})," object."]})]})})]})]}),"\n",(0,r.jsx)(t.h3,{id:"update-data",children:"Update data"}),"\n",(0,r.jsx)(t.admonition,{type:"important",children:(0,r.jsxs)(t.p,{children:["This component is in ",(0,r.jsx)(t.strong,{children:"Legacy"}),", which means it is available for use but no longer in active development."]})}),"\n",(0,r.jsx)(t.p,{children:"This component dynamically updates or appends data with specified fields."}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Inputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"old_data"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsx)(t.td,{children:"The records to update."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"number_of_fields"}),(0,r.jsx)(t.td,{children:"Number of Fields"}),(0,r.jsx)(t.td,{children:"The number of fields to add. The maximum is 15."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"text_key"}),(0,r.jsx)(t.td,{children:"Text Key"}),(0,r.jsx)(t.td,{children:"The key for text content."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"text_key_validator"}),(0,r.jsx)(t.td,{children:"Text Key Validator"}),(0,r.jsx)(t.td,{children:"Validates the text key presence."})]})]})]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.strong,{children:"Outputs"})}),(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsx)(t.tbody,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"data"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsx)(t.td,{children:"The updated Data objects."})]})})]})]})]})}function m(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(j,{...e})}):j(e)}function u(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},41502:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/component-combine-text-a73b71c22cc8099bf2a9ba22170ea701.png"},42547:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/component-type-convert-and-web-search-1eef7b9a7c1a243f4a08d9717728d0e1.png"},45709:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/component-data-to-dataframe-3e921379e4e86fedf0e34e3ffae46b51.png"},46445:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/component-data-operations-select-key-80bade862d29f2851b01ee26413d495f.png"},49823:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/component-split-text-fec2b1abb28e0852c8a172bbeb164b2c.png"},66539:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/component-lambda-filter-76cd345c52fa41a59dcfac0205dc3068.png"},82798:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/component-structured-output-23458b0d29eed6d092b557c7aaf6ab2c.png"},88103:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/component-batch-run-19c94fbb0646b2731b37013b84dff1f6.png"},96218:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/component-parser-1d1d72593f02991e5b14b6b1c112a744.png"},99e3:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/component-python-interpreter-1ef9e7dec643a216fd5e83c2139d09c9.png"}}]); \ No newline at end of file diff --git a/assets/js/7f193c41.824df9c5.js b/assets/js/7f193c41.824df9c5.js new file mode 100644 index 0000000000..b05615d53f --- /dev/null +++ b/assets/js/7f193c41.824df9c5.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[5761],{14876:(e,n,s)=>{s.r(n),s.d(n,{CH:()=>a,assets:()=>h,chCodeConfig:()=>x,contentTitle:()=>c,default:()=>u,frontMatter:()=>l,metadata:()=>t,toc:()=>j});const t=JSON.parse('{"id":"Components/components-data","title":"Data","description":"Data components load data from a source into your flow.","source":"@site/docs/Components/components-data.mdx","sourceDirName":"Components","slug":"/components-data","permalink":"/components-data","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Data","slug":"/components-data"},"sidebar":"docs","previous":{"title":"Create custom Python components","permalink":"/components-custom-components"},"next":{"title":"Embedding models","permalink":"/components-embedding-models"}}');var r=s(74848),d=s(28453),i=s(24754),o=s(17886);const l={title:"Data",slug:"/components-data"},c="Data components in Langflow",h={},a={annotations:i.hk,Code:i.Cy},x={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},j=[{value:"Use data components in a flow",id:"use-data-components-in-a-flow",level:2},{value:"API Request",id:"api-request",level:2},{value:"Directory",id:"directory",level:2},{value:"File",id:"file",level:2},{value:"Supported File Types",id:"supported-file-types",level:3},{value:"News search",id:"news-search",level:2},{value:"RSS Reader",id:"rss-reader",level:2},{value:"SQL database",id:"sql-database",level:2},{value:"Web search",id:"web-search",level:2},{value:"URL",id:"url",level:2},{value:"Webhook",id:"webhook",level:2},{value:"Legacy components",id:"legacy-components",level:2},{value:"Gmail Loader",id:"gmail-loader",level:3},{value:"Google Drive Loader",id:"google-drive-loader",level:3},{value:"Google Drive Search",id:"google-drive-search",level:3}];function p(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,d.R)(),...e.components},{Details:t}=n;return a||m("CH",!1),a.Code||m("CH.Code",!0),t||m("Details",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.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,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"data-components-in-langflow",children:"Data components in Langflow"})}),"\n",(0,r.jsx)(n.p,{children:"Data components load data from a source into your flow."}),"\n",(0,r.jsx)(n.p,{children:"They may perform some processing or type checking, like converting raw HTML data into text, or ensuring your loaded file is of an acceptable type."}),"\n",(0,r.jsx)(n.h2,{id:"use-data-components-in-a-flow",children:"Use data components in a flow"}),"\n",(0,r.jsxs)(n.p,{children:["Components like ",(0,r.jsx)(n.a,{href:"#news-search",children:"News search"}),", ",(0,r.jsx)(n.a,{href:"#rss-reader",children:"RSS reader"}),", and ",(0,r.jsx)(n.a,{href:"#web-search",children:"Web search"})," all fetch data into Langflow, and connect to Langflow in the same way. They can output the retrieved data in ",(0,r.jsx)(n.a,{href:"/data-types#dataframe",children:"DataFrame"})," format, or can be connected to an ",(0,r.jsx)(n.strong,{children:"Agent"})," component to be used as tools."]}),"\n",(0,r.jsx)(n.p,{children:"For example, to connect all three components to an Agent component, do the following:"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["Create the ",(0,r.jsx)(n.a,{href:"/simple-agent",children:"Simple Agent starter flow"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["In the ",(0,r.jsx)(n.strong,{children:"Agent"})," component, in the ",(0,r.jsx)(n.strong,{children:"OpenAI API Key"})," field, add your OpenAI API key."]}),"\n",(0,r.jsxs)(n.li,{children:["Add the ",(0,r.jsx)(n.strong,{children:"News search"}),", ",(0,r.jsx)(n.strong,{children:"RSS reader"}),", and ",(0,r.jsx)(n.strong,{children:"Web Search"})," components to your flow."]}),"\n",(0,r.jsxs)(n.li,{children:["In all three components, enable ",(0,r.jsx)(n.strong,{children:"Tool Mode"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["Connect the three components to the ",(0,r.jsx)(n.strong,{children:"Agent"})," component's ",(0,r.jsx)(n.strong,{children:"Tools"})," port.\nThe flow looks like the following:"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"Data components connected to agent",src:s(84987).A+"",width:"4000",height:"3028"})}),"\n",(0,r.jsxs)(n.ol,{start:"6",children:["\n",(0,r.jsxs)(n.li,{children:["Open the ",(0,r.jsx)(n.strong,{children:"Playground"})," and enter ",(0,r.jsx)(n.code,{children:"Use the websearch component to get me an RSS feed of the latest news."}),"\nThe Agent uses the ",(0,r.jsx)(n.code,{children:"perform_search"})," tool to return a list of RSS feeds."]}),"\n",(0,r.jsxs)(n.li,{children:["Enter the name of an RSS feed that interests you.\nThe Agent uses the ",(0,r.jsx)(n.code,{children:"read_rss"})," tool to fetch and summarize the latest RSS feed."]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"api-request",children:"API Request"}),"\n",(0,r.jsx)(n.p,{children:"This component makes HTTP requests using URLs or cURL commands."}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["To use this component in a flow, connect the ",(0,r.jsx)(n.strong,{children:"Data"})," output to a component that accepts the input.\nFor example, connect the ",(0,r.jsx)(n.strong,{children:"API Request"})," component to a ",(0,r.jsx)(n.strong,{children:"Chat Output"})," component."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["In the API component's ",(0,r.jsx)(n.strong,{children:"URLs"})," field, enter the endpoint for your request.\nThis example uses ",(0,r.jsx)(n.code,{children:"https://dummy-json.mock.beeceptor.com/posts"}),", which is a list of technology blog posts."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["In the ",(0,r.jsx)(n.strong,{children:"Method"})," field, enter the type of request.\nThis example uses GET to retrieve a list of blog posts.\nThe component also supports POST, PATCH, PUT, and DELETE."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Optionally, enable the ",(0,r.jsx)(n.strong,{children:"Use cURL"})," button to create a field for pasting curl requests.\nThe equivalent call in this example is ",(0,r.jsx)(n.code,{children:"curl -v https://dummy-json.mock.beeceptor.com/posts"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Click ",(0,r.jsx)(n.strong,{children:"Playground"}),", and then click ",(0,r.jsx)(n.strong,{children:"Run Flow"}),".\nYour request returns a list of blog posts in the ",(0,r.jsx)(n.code,{children:"result"})," field."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Inputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Name"}),(0,r.jsx)(n.th,{children:"Display Name"}),(0,r.jsx)(n.th,{children:"Info"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"urls"}),(0,r.jsx)(n.td,{children:"URLs"}),(0,r.jsx)(n.td,{children:"Enter one or more URLs, separated by commas."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"curl"}),(0,r.jsx)(n.td,{children:"cURL"}),(0,r.jsx)(n.td,{children:"Paste a curl command to populate the dictionary fields for headers and body."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"method"}),(0,r.jsx)(n.td,{children:"Method"}),(0,r.jsx)(n.td,{children:"The HTTP method to use."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"use_curl"}),(0,r.jsx)(n.td,{children:"Use cURL"}),(0,r.jsx)(n.td,{children:"Enable cURL mode to populate fields from a cURL command."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"query_params"}),(0,r.jsx)(n.td,{children:"Query Parameters"}),(0,r.jsx)(n.td,{children:"The query parameters to append to the URL."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"body"}),(0,r.jsx)(n.td,{children:"Body"}),(0,r.jsxs)(n.td,{children:["The body to send with the request as a dictionary (for ",(0,r.jsx)(n.code,{children:"POST"}),", ",(0,r.jsx)(n.code,{children:"PATCH"}),", ",(0,r.jsx)(n.code,{children:"PUT"}),")."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"headers"}),(0,r.jsx)(n.td,{children:"Headers"}),(0,r.jsx)(n.td,{children:"The headers to send with the request as a dictionary."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"timeout"}),(0,r.jsx)(n.td,{children:"Timeout"}),(0,r.jsx)(n.td,{children:"The timeout to use for the request."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"follow_redirects"}),(0,r.jsx)(n.td,{children:"Follow Redirects"}),(0,r.jsx)(n.td,{children:"Whether to follow http redirects."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"save_to_file"}),(0,r.jsx)(n.td,{children:"Save to File"}),(0,r.jsx)(n.td,{children:"Save the API response to a temporary file."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"include_httpx_metadata"}),(0,r.jsx)(n.td,{children:"Include HTTPx Metadata"}),(0,r.jsxs)(n.td,{children:["Include properties such as ",(0,r.jsx)(n.code,{children:"headers"}),", ",(0,r.jsx)(n.code,{children:"status_code"}),", ",(0,r.jsx)(n.code,{children:"response_headers"}),", and ",(0,r.jsx)(n.code,{children:"redirection_history"})," in the output."]})]})]})]}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Outputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Name"}),(0,r.jsx)(n.th,{children:"Display Name"}),(0,r.jsx)(n.th,{children:"Info"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"data"}),(0,r.jsx)(n.td,{children:"Data"}),(0,r.jsx)(n.td,{children:"The result of the API requests. Returns a Data object containing source URL and results."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"dataframe"}),(0,r.jsx)(n.td,{children:"DataFrame"}),(0,r.jsx)(n.td,{children:"Converts the API response data into a tabular DataFrame format."})]})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"directory",children:"Directory"}),"\n",(0,r.jsx)(n.p,{children:"This component recursively loads files from a directory, with options for file types, depth, and concurrency."}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Inputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Input"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"path"}),(0,r.jsx)(n.td,{children:"MessageTextInput"}),(0,r.jsx)(n.td,{children:"The path to the directory to load files from."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"types"}),(0,r.jsx)(n.td,{children:"MessageTextInput"}),(0,r.jsx)(n.td,{children:"The file types to load (leave empty to load all types)."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"depth"}),(0,r.jsx)(n.td,{children:"IntInput"}),(0,r.jsx)(n.td,{children:"The depth to search for files."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"max_concurrency"}),(0,r.jsx)(n.td,{children:"IntInput"}),(0,r.jsx)(n.td,{children:"The maximum concurrency for loading files."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"load_hidden"}),(0,r.jsx)(n.td,{children:"BoolInput"}),(0,r.jsx)(n.td,{children:"If true, hidden files are loaded."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"recursive"}),(0,r.jsx)(n.td,{children:"BoolInput"}),(0,r.jsx)(n.td,{children:"If true, the search is recursive."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"silent_errors"}),(0,r.jsx)(n.td,{children:"BoolInput"}),(0,r.jsx)(n.td,{children:"If true, errors do not raise an exception."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"use_multithreading"}),(0,r.jsx)(n.td,{children:"BoolInput"}),(0,r.jsx)(n.td,{children:"If true, multithreading is used."})]})]})]}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Outputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Output"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"data"}),(0,r.jsx)(n.td,{children:"List[Data]"}),(0,r.jsx)(n.td,{children:"The loaded file data from the directory."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"dataframe"}),(0,r.jsx)(n.td,{children:"DataFrame"}),(0,r.jsx)(n.td,{children:"The loaded file data in tabular DataFrame format."})]})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"file",children:"File"}),"\n",(0,r.jsxs)(n.p,{children:["This component loads and parses files of various supported formats and converts the content into a ",(0,r.jsx)(n.a,{href:"/data-types#data",children:"Data"})," object. It supports multiple file types and provides options for parallel processing and error handling."]}),"\n",(0,r.jsx)(n.p,{children:"To load a document, follow these steps:"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["Click the ",(0,r.jsx)(n.strong,{children:"Select files"})," button."]}),"\n",(0,r.jsxs)(n.li,{children:["Select a local file or a file loaded with ",(0,r.jsx)(n.a,{href:"/concepts-file-management",children:"File management"}),", and then click ",(0,r.jsx)(n.strong,{children:"Select file"}),"."]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"The loaded file name appears in the component."}),"\n",(0,r.jsxs)(n.p,{children:["The default maximum supported file size is 100 MB.\nTo modify this value, see ",(0,r.jsx)(n.a,{href:"/environment-variables#LANGFLOW_MAX_FILE_SIZE_UPLOAD",children:"--max-file-size-upload"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"File"})," component\u2019s outputs change dynamically based on the number and type of files you select.\nFor more information, expand the following ",(0,r.jsx)(n.strong,{children:"Parameters"})," section, and then review the ",(0,r.jsx)(n.strong,{children:"Outputs"})," parameters."]}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Inputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Name"}),(0,r.jsx)(n.th,{children:"Display Name"}),(0,r.jsx)(n.th,{children:"Info"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"path"}),(0,r.jsx)(n.td,{children:"Files"}),(0,r.jsx)(n.td,{children:"The path to files to load. Supports individual files or bundled archives."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"file_path"}),(0,r.jsx)(n.td,{children:"Server File Path"}),(0,r.jsxs)(n.td,{children:["A Data object with a ",(0,r.jsx)(n.code,{children:"file_path"})," property pointing to the server file or a Message object with a path to the file. Supersedes 'Path' but supports the same file types."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"separator"}),(0,r.jsx)(n.td,{children:"Separator"}),(0,r.jsx)(n.td,{children:"The separator to use between multiple outputs in Message format."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"silent_errors"}),(0,r.jsx)(n.td,{children:"Silent Errors"}),(0,r.jsx)(n.td,{children:"If true, errors do not raise an exception."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"delete_server_file_after_processing"}),(0,r.jsx)(n.td,{children:"Delete Server File After Processing"}),(0,r.jsx)(n.td,{children:"If true, the Server File Path is deleted after processing."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"ignore_unsupported_extensions"}),(0,r.jsx)(n.td,{children:"Ignore Unsupported Extensions"}),(0,r.jsx)(n.td,{children:"If true, files with unsupported extensions are not processed."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"ignore_unspecified_files"}),(0,r.jsx)(n.td,{children:"Ignore Unspecified Files"}),(0,r.jsxs)(n.td,{children:["If true, ",(0,r.jsx)(n.code,{children:"Data"})," with no ",(0,r.jsx)(n.code,{children:"file_path"})," property is ignored."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"use_multithreading"}),(0,r.jsx)(n.td,{children:"[Deprecated] Use Multithreading"}),(0,r.jsxs)(n.td,{children:["Set 'Processing Concurrency' greater than ",(0,r.jsx)(n.code,{children:"1"})," to enable multithreading. This option is deprecated."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"concurrency_multithreading"}),(0,r.jsx)(n.td,{children:"Processing Concurrency"}),(0,r.jsx)(n.td,{children:"When multiple files are being processed, the number of files to process concurrently. Default is 1. Values greater than 1 enable parallel processing for 2 or more files."})]})]})]}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Outputs"})}),(0,r.jsx)(n.p,{children:"The outputs change dynamically based on the number and type of files selected."}),(0,r.jsx)(n.p,{children:"If a single file is selected:"}),(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Structured Content"})," ",(0,r.jsx)(n.a,{href:"/data-types#dataframe",children:"DataFrame"}),": If a CSV or Excel file is selected, the component outputs tabular data."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Structured Content"})," ",(0,r.jsx)(n.a,{href:"/data-types#data",children:"Data"}),": If a JSON file is selected, the component outputs parsed JSON data."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Raw Content"})," ",(0,r.jsx)(n.a,{href:"/data-types#message",children:"Message"}),": Outputs the file's raw text content."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"File Path"})," ",(0,r.jsx)(n.a,{href:"/data-types#message",children:"Message"}),": Outputs the path to the file on the Langflow server."]}),"\n"]}),(0,r.jsx)(n.p,{children:"If multiple files are selected:"}),(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Files"})," ",(0,r.jsx)(n.a,{href:"/data-types#dataframe",children:"DataFrame"}),": A table containing the content and metadata of all selected files."]}),"\n"]}),(0,r.jsx)(n.p,{children:"If no files are selected:"}),(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"No outputs are displayed."}),"\n"]})]}),"\n",(0,r.jsx)(n.h3,{id:"supported-file-types",children:"Supported File Types"}),"\n",(0,r.jsx)(n.p,{children:"Text files:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".txt"})," - Text files"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".md"}),", ",(0,r.jsx)(n.code,{children:".mdx"})," - Markdown files"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".csv"})," - CSV files"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".json"})," - JSON files"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".yaml"}),", ",(0,r.jsx)(n.code,{children:".yml"})," - YAML files"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".xml"})," - XML files"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".html"}),", ",(0,r.jsx)(n.code,{children:".htm"})," - HTML files"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".pdf"})," - PDF files"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".docx"})," - Word documents"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".py"})," - Python files"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".sh"})," - Shell scripts"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".sql"})," - SQL files"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".js"})," - JavaScript files"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".ts"}),", ",(0,r.jsx)(n.code,{children:".tsx"})," - TypeScript files"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Archive formats (for bundling multiple files):"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".zip"})," - ZIP archives"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".tar"})," - TAR archives"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".tgz"})," - Gzipped TAR archives"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".bz2"})," - Bzip2 compressed files"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".gz"})," - Gzip compressed files"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"news-search",children:"News search"}),"\n",(0,r.jsxs)(n.p,{children:["This component searches Google News with RSS and returns clean article data. The ",(0,r.jsx)(n.code,{children:"clean_html"})," method parses the HTML content with the BeautifulSoup library, and then removes HTML markup and strips whitespace so the output data is clean."]}),"\n",(0,r.jsxs)(n.p,{children:["It returns news content as a DataFrame containing article titles, links, publication dates, and summaries. The component can also be used in ",(0,r.jsx)(n.strong,{children:"Tool Mode"})," with a connected ",(0,r.jsx)(n.strong,{children:"Agent"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["To use this component in a flow, connect the ",(0,r.jsx)(n.strong,{children:"News Search"})," output to a component that accepts the DataFrame input.\nFor example, connect the ",(0,r.jsx)(n.strong,{children:"News Search"})," component to a ",(0,r.jsx)(n.strong,{children:"Chat Output"})," component. Enter a search query, open the Playground, and click ",(0,r.jsx)(n.strong,{children:"Run Flow"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["The latest content is returned in a structured DataFrame, with the key columns ",(0,r.jsx)(n.code,{children:"title"}),", ",(0,r.jsx)(n.code,{children:"link"}),", ",(0,r.jsx)(n.code,{children:"published"})," and ",(0,r.jsx)(n.code,{children:"summary"}),"."]}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Inputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Name"}),(0,r.jsx)(n.th,{children:"Display Name"}),(0,r.jsx)(n.th,{children:"Info"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"query"}),(0,r.jsx)(n.td,{children:"Search Query"}),(0,r.jsx)(n.td,{children:"Search keywords for news articles."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"hl"}),(0,r.jsx)(n.td,{children:"Language (hl)"}),(0,r.jsxs)(n.td,{children:["Language code, such as en-US, fr, de. Default: ",(0,r.jsx)(n.code,{children:"en-US"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"gl"}),(0,r.jsx)(n.td,{children:"Country (gl)"}),(0,r.jsxs)(n.td,{children:["Country code, such as US, FR, DE. Default: ",(0,r.jsx)(n.code,{children:"US"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"ceid"}),(0,r.jsxs)(n.td,{children:["Country",":Language"," (ceid)"]}),(0,r.jsxs)(n.td,{children:["Language, such as US",":en",", FR",":fr",". Default: ",(0,r.jsx)(n.code,{children:"US:en"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"topic"}),(0,r.jsx)(n.td,{children:"Topic"}),(0,r.jsx)(n.td,{children:"One of: WORLD, NATION, BUSINESS, TECHNOLOGY, ENTERTAINMENT, SCIENCE, SPORTS, HEALTH."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"location"}),(0,r.jsx)(n.td,{children:"Location (Geo)"}),(0,r.jsx)(n.td,{children:"City, state, or country for location-based news. Leave blank for keyword search."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"timeout"}),(0,r.jsx)(n.td,{children:"Timeout"}),(0,r.jsx)(n.td,{children:"Timeout for the request in seconds."})]})]})]}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Outputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Name"}),(0,r.jsx)(n.th,{children:"Display Name"}),(0,r.jsx)(n.th,{children:"Info"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"articles"}),(0,r.jsx)(n.td,{children:"News Articles"}),(0,r.jsx)(n.td,{children:"A DataFrame containing article titles, links, publication dates, and summaries."})]})})]})]}),"\n",(0,r.jsx)(n.h2,{id:"rss-reader",children:"RSS Reader"}),"\n",(0,r.jsxs)(n.p,{children:["This component fetches and parses RSS feeds from any valid RSS feed URL. It returns the feed content as a DataFrame containing article titles, links, publication dates, and summaries. The component can also be used in ",(0,r.jsx)(n.strong,{children:"Tool Mode"})," with a connected ",(0,r.jsx)(n.strong,{children:"Agent"}),"."]}),"\n",(0,r.jsx)(n.p,{children:"To use this component in a flow, do the following:"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["Connect the ",(0,r.jsx)(n.strong,{children:"RSS reader"})," output to a component that accepts the DataFrame input, such as a ",(0,r.jsx)(n.strong,{children:"Chat Output"})," component."]}),"\n",(0,r.jsxs)(n.li,{children:["In the ",(0,r.jsx)(n.strong,{children:"RSS Feed URL"})," field, enter an RSS feed, such as ",(0,r.jsx)(n.code,{children:"https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml"})," for the New York Times."]}),"\n",(0,r.jsxs)(n.li,{children:["Open the ",(0,r.jsx)(n.strong,{children:"Playground"}),", and then click ",(0,r.jsx)(n.strong,{children:"Run Flow"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["The latest content is returned in a structured DataFrame, with the key columns ",(0,r.jsx)(n.code,{children:"title"}),", ",(0,r.jsx)(n.code,{children:"link"}),", ",(0,r.jsx)(n.code,{children:"published"})," and ",(0,r.jsx)(n.code,{children:"summary"}),"."]}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Inputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Name"}),(0,r.jsx)(n.th,{children:"Display Name"}),(0,r.jsx)(n.th,{children:"Info"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"rss_url"}),(0,r.jsx)(n.td,{children:"RSS Feed URL"}),(0,r.jsx)(n.td,{children:"URL of the RSS feed to parse."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"timeout"}),(0,r.jsx)(n.td,{children:"Timeout"}),(0,r.jsxs)(n.td,{children:["Timeout for the RSS feed request in seconds. Default: ",(0,r.jsx)(n.code,{children:"5"}),"."]})]})]})]}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Outputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Name"}),(0,r.jsx)(n.th,{children:"Display Name"}),(0,r.jsx)(n.th,{children:"Info"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"articles"}),(0,r.jsx)(n.td,{children:"Articles"}),(0,r.jsx)(n.td,{children:"A DataFrame containing article titles, links, publication dates, and summaries."})]})})]})]}),"\n",(0,r.jsx)(n.h2,{id:"sql-database",children:"SQL database"}),"\n",(0,r.jsxs)(n.p,{children:["This component executes SQL queries on ",(0,r.jsx)(n.a,{href:"https://docs.sqlalchemy.org/en/20/",children:"SQLAlchemy-compatible databases"}),".\nIt supports any SQLAlchemy-compatible database, including PostgreSQL, MySQL, SQLite, and others."]}),"\n",(0,r.jsx)(n.p,{children:"To use this component in a flow, do the following:"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["Create a test database called ",(0,r.jsx)(n.code,{children:"test.db"}),"."]}),"\n"]}),"\n",(0,r.jsx)(a.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"sqlite3 ",props:{style:{color:"#FFA657"}}},{content:"test.db",props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]}),"\n",(0,r.jsxs)(n.ol,{start:"2",children:["\n",(0,r.jsx)(n.li,{children:"Add values to the test database."}),"\n"]}),"\n",(0,r.jsx)(a.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"sqlite3 ",props:{style:{color:"#FFA657"}}},{content:"test.db \"CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT, email TEXT, age INTEGER); INSERT INTO users (name, email, age) VALUES ('John Doe', 'john@example.com', 30), ('Jane Smith', 'jane@example.com', 25), ('Bob Johnson', 'bob@example.com', 35);\"",props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]}),"\n",(0,r.jsxs)(n.ol,{start:"3",children:["\n",(0,r.jsxs)(n.li,{children:["Verify that ",(0,r.jsx)(n.code,{children:"test.db"})," has been created and contains your data."]}),"\n"]}),"\n",(0,r.jsx)(a.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"sqlite3 ",props:{style:{color:"#FFA657"}}},{content:'test.db "SELECT * FROM users;"',props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]}),"\n",(0,r.jsx)(n.p,{children:"Result:"}),"\n",(0,r.jsx)(a.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"1",props:{style:{color:"#FFA657"}}},{content:"|",props:{style:{color:"#FF7B72"}}},{content:"John ",props:{style:{color:"#FFA657"}}},{content:"Doe",props:{style:{color:"#A5D6FF"}}},{content:"|",props:{style:{color:"#FF7B72"}}},{content:"john@example.com",props:{style:{color:"#FFA657"}}}]},{tokens:[{content:"2",props:{style:{color:"#FFA657"}}},{content:"|",props:{style:{color:"#FF7B72"}}},{content:"Jane ",props:{style:{color:"#FFA657"}}},{content:"Smith",props:{style:{color:"#A5D6FF"}}},{content:"|",props:{style:{color:"#FF7B72"}}},{content:"jane@example.com",props:{style:{color:"#FFA657"}}}]},{tokens:[{content:"3",props:{style:{color:"#FFA657"}}},{content:"|",props:{style:{color:"#FF7B72"}}},{content:"John ",props:{style:{color:"#FFA657"}}},{content:"Doe",props:{style:{color:"#A5D6FF"}}},{content:"|",props:{style:{color:"#FF7B72"}}},{content:"john@example.com",props:{style:{color:"#FFA657"}}}]},{tokens:[{content:"4",props:{style:{color:"#FFA657"}}},{content:"|",props:{style:{color:"#FF7B72"}}},{content:"Jane ",props:{style:{color:"#FFA657"}}},{content:"Smith",props:{style:{color:"#A5D6FF"}}},{content:"|",props:{style:{color:"#FF7B72"}}},{content:"jane@example.com",props:{style:{color:"#FFA657"}}}]}],lang:"shell"},annotations:[]}]}),"\n",(0,r.jsxs)(n.ol,{start:"4",children:["\n",(0,r.jsxs)(n.li,{children:["In the ",(0,r.jsx)(n.strong,{children:"SQL Database"})," component's ",(0,r.jsx)(n.strong,{children:"Database URL"})," field, add the connection string for ",(0,r.jsx)(n.code,{children:"test.db"}),", such as ",(0,r.jsx)(n.code,{children:"sqlite:///test.db"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["With this connection established, the ",(0,r.jsx)(n.strong,{children:"SQL Query"})," field now accepts SQL queries.\nInstead of manually entering SQL queries, connect this database to an agent as a ",(0,r.jsx)(n.strong,{children:"Tool"})," to query it with natural language."]}),"\n",(0,r.jsxs)(n.ol,{start:"5",children:["\n",(0,r.jsxs)(n.li,{children:["In the ",(0,r.jsx)(n.strong,{children:"SQL Database"})," component, enable ",(0,r.jsx)(n.strong,{children:"Tool Mode"}),", and then connect it to an ",(0,r.jsx)(n.strong,{children:"Agent"})," component.\nThe flow looks like the following:"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"SQL database connected to agent",src:s(52189).A+"",width:"4000",height:"2400"})}),"\n",(0,r.jsxs)(n.ol,{start:"6",children:["\n",(0,r.jsxs)(n.li,{children:["In the ",(0,r.jsx)(n.strong,{children:"Agent"})," component, in the ",(0,r.jsx)(n.strong,{children:"OpenAI API Key"})," field, add your OpenAI API key."]}),"\n",(0,r.jsxs)(n.li,{children:["Open the ",(0,r.jsx)(n.strong,{children:"Playground"})," and ask ",(0,r.jsx)(n.code,{children:"What users are in my database?"}),"\nThe Agent uses the ",(0,r.jsx)(n.code,{children:"run_sql_query"})," tool to retrieve the information, and additionally identifies the duplicate ",(0,r.jsx)(n.code,{children:"users"})," entries."]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Result:"}),"\n",(0,r.jsx)(a.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Here are the users in your database:",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"1. **John Doe** - Email: john@example.com",props:{}}]},{tokens:[{content:"2. **Jane Smith** - Email: jane@example.com",props:{}}]},{tokens:[{content:"3. **John Doe** - Email: john@example.com",props:{}}]},{tokens:[{content:"4. **Jane Smith** - Email: jane@example.com",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"It seems there are duplicate entries for the users.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"> Finished chain.",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Inputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Name"}),(0,r.jsx)(n.th,{children:"Display Name"}),(0,r.jsx)(n.th,{children:"Info"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"database_url"}),(0,r.jsx)(n.td,{children:"Database URL"}),(0,r.jsx)(n.td,{children:"The SQLAlchemy-compatible database connection URL."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"query"}),(0,r.jsx)(n.td,{children:"SQL Query"}),(0,r.jsx)(n.td,{children:"The SQL query to execute."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"include_columns"}),(0,r.jsx)(n.td,{children:"Include Columns"}),(0,r.jsxs)(n.td,{children:["If enabled, includes column names in the result. Default: ",(0,r.jsx)(n.code,{children:"true"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"add_error"}),(0,r.jsx)(n.td,{children:"Add Error"}),(0,r.jsxs)(n.td,{children:["If enabled, adds any error messages to the result. Default: ",(0,r.jsx)(n.code,{children:"false"}),"."]})]})]})]}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Outputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Name"}),(0,r.jsx)(n.th,{children:"Display Name"}),(0,r.jsx)(n.th,{children:"Info"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"run_sql_query"}),(0,r.jsx)(n.td,{children:"Result Table"}),(0,r.jsx)(n.td,{children:"The query results as a DataFrame."})]})})]})]}),"\n",(0,r.jsx)(n.h2,{id:"web-search",children:"Web search"}),"\n",(0,r.jsxs)(n.p,{children:["This component performs web searches using DuckDuckGo's HTML interface, and returns the search results as a ",(0,r.jsx)(n.a,{href:"/data-types#dataframe",children:"DataFrame"})," containing the key columns ",(0,r.jsx)(n.code,{children:"title"}),", ",(0,r.jsx)(n.code,{children:"links"}),", and ",(0,r.jsx)(n.code,{children:"snippets"}),". The component can also be used in ",(0,r.jsx)(n.strong,{children:"Tool Mode"})," with a connected ",(0,r.jsx)(n.strong,{children:"Agent"}),"."]}),"\n",(0,r.jsx)(n.p,{children:"To use this component in a flow, do the following:"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["Add the ",(0,r.jsx)(n.strong,{children:"Web search"})," component to the ",(0,r.jsx)(n.a,{href:"/basic-prompting",children:"Basic prompting"})," flow. In the ",(0,r.jsx)(n.strong,{children:"Search Query"})," field, enter a query, such as ",(0,r.jsx)(n.code,{children:"environmental news"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["Connect the ",(0,r.jsx)(n.strong,{children:"Web search"})," component's output to a component that accepts the DataFrame input."]}),"\n",(0,r.jsxs)(n.li,{children:["Connect a ",(0,r.jsx)(n.strong,{children:"Type Convert"})," component to convert the DataFrame to a Message."]}),"\n",(0,r.jsxs)(n.li,{children:["In the ",(0,r.jsx)(n.strong,{children:"Type Convert"})," component, in the ",(0,r.jsx)(n.strong,{children:"Output Type"})," field, select ",(0,r.jsx)(n.strong,{children:"Message"}),".\nYour flow looks like the following:"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"Type convert web search output to chat",src:s(42547).A+"",width:"4000",height:"1826"})}),"\n",(0,r.jsxs)(n.ol,{start:"5",children:["\n",(0,r.jsxs)(n.li,{children:["In the ",(0,r.jsx)(n.strong,{children:"Language Model"})," component, in the ",(0,r.jsx)(n.strong,{children:"OpenAI API Key"})," field, add your OpenAI API key."]}),"\n",(0,r.jsxs)(n.li,{children:["Click ",(0,r.jsx)(n.strong,{children:"Playground"}),", and then ask about ",(0,r.jsx)(n.code,{children:"latest news"}),"."]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"The search results are returned to the Playground as a message."}),"\n",(0,r.jsx)(n.p,{children:"Result:"}),"\n",(0,r.jsx)(a.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Latest news",props:{}}]},{tokens:[{content:"AI",props:{}}]},{tokens:[{content:"gpt-4o-mini",props:{}}]},{tokens:[{content:"Here are some of the latest news articles related to the environment:",props:{}}]},{tokens:[{content:"Ozone Pollution and Global Warming: A recent study highlights that ozone pollution is a significant global environmental concern, threatening human health and crop production while exacerbating global warming. Read more",props:{}}]},{tokens:[{content:"...",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsx)(n.admonition,{type:"note",children:(0,r.jsx)(n.p,{children:"This component uses web scraping and may be subject to rate limits. For production use, consider using an official search API."})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Inputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Name"}),(0,r.jsx)(n.th,{children:"Display Name"}),(0,r.jsx)(n.th,{children:"Info"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"query"}),(0,r.jsx)(n.td,{children:"Search Query"}),(0,r.jsx)(n.td,{children:"Keywords to search for."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"timeout"}),(0,r.jsx)(n.td,{children:"Timeout"}),(0,r.jsxs)(n.td,{children:["Timeout for the web search request in seconds. Default: ",(0,r.jsx)(n.code,{children:"5"}),"."]})]})]})]}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Outputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Name"}),(0,r.jsx)(n.th,{children:"Display Name"}),(0,r.jsx)(n.th,{children:"Info"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"results"}),(0,r.jsx)(n.td,{children:"Search Results"}),(0,r.jsx)(n.td,{children:"A DataFrame containing search results with titles, links, and snippets."})]})})]})]}),"\n",(0,r.jsx)(n.h2,{id:"url",children:"URL"}),"\n",(0,r.jsx)(n.p,{children:"This component fetches content from one or more URLs, processes the content, and returns it in various formats. It supports output in plain text or raw HTML."}),"\n",(0,r.jsxs)(n.p,{children:["In the component's ",(0,r.jsx)(n.strong,{children:"URLs"})," field, enter the URL you want to load. To add multiple URL fields, click ",(0,r.jsx)(o.A,{name:"Plus","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Add URL"}),"."]}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["To use this component in a flow, connect the ",(0,r.jsx)(n.strong,{children:"DataFrame"})," output to a component that accepts the input.\nFor example, connect the ",(0,r.jsx)(n.strong,{children:"URL"})," component to a ",(0,r.jsx)(n.strong,{children:"Chat Output"})," component."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["In the URL component's ",(0,r.jsx)(n.strong,{children:"URLs"})," field, enter the URL for your request.\nThis example uses ",(0,r.jsx)(n.code,{children:"langflow.org"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Optionally, in the ",(0,r.jsx)(n.strong,{children:"Max Depth"})," field, enter how many pages away from the initial URL you want to crawl.\nSelect ",(0,r.jsx)(n.code,{children:"1"})," to crawl only the page specified in the ",(0,r.jsx)(n.strong,{children:"URLs"})," field.\nSelect ",(0,r.jsx)(n.code,{children:"2"})," to crawl all pages linked from that page.\nThe component crawls by link traversal, not by URL path depth."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Click ",(0,r.jsx)(n.strong,{children:"Playground"}),", and then click ",(0,r.jsx)(n.strong,{children:"Run Flow"}),".\nThe text contents of the URL are returned to the Playground as a structured DataFrame."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["In the ",(0,r.jsx)(n.strong,{children:"URL"})," component, change the output port to ",(0,r.jsx)(n.strong,{children:"Message"}),", and then run the flow again.\nThe text contents of the URL are returned as unstructured raw text, which you can extract patterns with the ",(0,r.jsx)(n.a,{href:"/components-processing#parser",children:"Parser"})," component."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Inputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Name"}),(0,r.jsx)(n.th,{children:"Display Name"}),(0,r.jsx)(n.th,{children:"Info"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"urls"}),(0,r.jsx)(n.td,{children:"URLs"}),(0,r.jsx)(n.td,{children:"Click the '+' button to enter one or more URLs to crawl recursively."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"max_depth"}),(0,r.jsx)(n.td,{children:"Max Depth"}),(0,r.jsx)(n.td,{children:"Controls how many 'clicks' away from the initial page the crawler will go."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"prevent_outside"}),(0,r.jsx)(n.td,{children:"Prevent Outside"}),(0,r.jsx)(n.td,{children:"If enabled, only crawls URLs within the same domain as the root URL."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"use_async"}),(0,r.jsx)(n.td,{children:"Use Async"}),(0,r.jsx)(n.td,{children:"If enabled, uses asynchronous loading which can be significantly faster but might use more system resources."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"format"}),(0,r.jsx)(n.td,{children:"Output Format"}),(0,r.jsxs)(n.td,{children:["Output Format. Use ",(0,r.jsx)(n.code,{children:"Text"})," to extract the text from the HTML or ",(0,r.jsx)(n.code,{children:"HTML"})," for the raw HTML content."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"timeout"}),(0,r.jsx)(n.td,{children:"Timeout"}),(0,r.jsx)(n.td,{children:"Timeout for the request in seconds."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"headers"}),(0,r.jsx)(n.td,{children:"Headers"}),(0,r.jsx)(n.td,{children:"The headers to send with the request."})]})]})]}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Outputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Name"}),(0,r.jsx)(n.th,{children:"Display Name"}),(0,r.jsx)(n.th,{children:"Info"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"data"}),(0,r.jsx)(n.td,{children:"Data"}),(0,r.jsxs)(n.td,{children:["A list of ",(0,r.jsx)(n.a,{href:"/data-types#data",children:"Data"})," objects containing fetched content and metadata."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"text"}),(0,r.jsx)(n.td,{children:"Message"}),(0,r.jsx)(n.td,{children:"The fetched content as formatted text."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"dataframe"}),(0,r.jsx)(n.td,{children:"DataFrame"}),(0,r.jsxs)(n.td,{children:["The content formatted as a ",(0,r.jsx)(n.a,{href:"/data-types#dataframe",children:"DataFrame"})," object."]})]})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"webhook",children:"Webhook"}),"\n",(0,r.jsx)(n.p,{children:"This component defines a webhook trigger that runs a flow when it receives an HTTP POST request."}),"\n",(0,r.jsxs)(n.p,{children:["If the input is not valid JSON, the component wraps it in a ",(0,r.jsx)(n.code,{children:"payload"})," object so that it can be processed and still trigger the flow."]}),"\n",(0,r.jsxs)(n.p,{children:["When a ",(0,r.jsx)(n.strong,{children:"Webhook"})," component is added to the workspace, a new ",(0,r.jsx)(n.strong,{children:"Webhook cURL"})," tab becomes available in the ",(0,r.jsx)(n.strong,{children:"API"})," pane that contains an HTTP POST request for triggering the webhook component. For example:\nReplace ",(0,r.jsx)(n.code,{children:"LANGFLOW_SERVER_ADDRESS"}),", ",(0,r.jsx)(n.code,{children:"FLOW_ID"}),", and ",(0,r.jsx)(n.code,{children:"LANGFLOW_API_KEY"})," with the values from your Langflow deployment."]}),"\n",(0,r.jsx)(a.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"POST ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "http://LANGFLOW_SERVER_ADDRESS/api/v1/webhook/FLOW_ID" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:"'Content-Type: application/json' ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:"'x-api-key: LANGFLOW_API_KEY' ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:'\'{"any": "data"}\'',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Webhook"})," component is often paired with a ",(0,r.jsxs)(n.a,{href:"/components-processing#parser",children:[(0,r.jsx)(n.strong,{children:"Parser"})," component"]})," to extract relevant data from the raw payload.\nFor more information, see ",(0,r.jsx)(n.a,{href:"/webhook",children:"Trigger flows with webhooks"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["To troubleshoot a flow with a ",(0,r.jsx)(n.strong,{children:"Webhook"})," component and verify that the component is receiving data, you can create a small flow that outputs only the parsed payload:"]}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Create a flow with ",(0,r.jsx)(n.strong,{children:"Webhook"}),", ",(0,r.jsx)(n.strong,{children:"Parser"}),", and ",(0,r.jsx)(n.strong,{children:"Chat Output"})," components."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Connect the Webhook component's ",(0,r.jsx)(n.strong,{children:"Data"})," output to the Parser component's ",(0,r.jsx)(n.strong,{children:"Data"})," input."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Connect the Parser component's ",(0,r.jsx)(n.strong,{children:"Parsed Text"})," output to the Chat Output component's ",(0,r.jsx)(n.strong,{children:"Text"})," input."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Edit the ",(0,r.jsx)(n.strong,{children:"Parser"})," component to set ",(0,r.jsx)(n.strong,{children:"Mode"})," to ",(0,r.jsx)(n.strong,{children:"Stringify"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["This mode passes the data received by the Webhook component as a string that is printed by the ",(0,r.jsx)(n.strong,{children:"Chat Output"})," component."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Click ",(0,r.jsx)(n.strong,{children:"Share"}),", select ",(0,r.jsx)(n.strong,{children:"API access"}),", and then copy the ",(0,r.jsx)(n.strong,{children:"Webhook cURL"})," code snippet."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Optional: Edit the ",(0,r.jsx)(n.code,{children:"data"})," in the code snippet if you want to pass a different payload."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Send the POST request to trigger the flow."}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Click ",(0,r.jsx)(n.strong,{children:"Playground"})," to verify that the ",(0,r.jsx)(n.strong,{children:"Chat Output"})," component printed the JSON data from your POST request."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["For more information, see ",(0,r.jsx)(n.a,{href:"/webhook",children:"Trigger flows with webhooks"}),"."]}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Inputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Name"}),(0,r.jsx)(n.th,{children:"Display Name"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"data"}),(0,r.jsx)(n.td,{children:"Payload"}),(0,r.jsx)(n.td,{children:"Receives a payload from external systems through HTTP POST requests."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"curl"}),(0,r.jsx)(n.td,{children:"cURL"}),(0,r.jsx)(n.td,{children:"The cURL command template for making requests to this webhook."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"endpoint"}),(0,r.jsx)(n.td,{children:"Endpoint"}),(0,r.jsx)(n.td,{children:"The endpoint URL where this webhook receives requests."})]})]})]}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Outputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Name"}),(0,r.jsx)(n.th,{children:"Display Name"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"output_data"}),(0,r.jsx)(n.td,{children:"Data"}),(0,r.jsxs)(n.td,{children:["Outputs processed data from the webhook input, and returns an empty ",(0,r.jsx)(n.a,{href:"/data-types#data",children:"Data"})," object if no input is provided. If the input is not valid JSON, the component wraps it in a ",(0,r.jsx)(n.code,{children:"payload"})," object."]})]})})]})]}),"\n",(0,r.jsx)(n.h2,{id:"legacy-components",children:"Legacy components"}),"\n",(0,r.jsx)(n.p,{children:"Legacy components are available for use but are no longer supported."}),"\n",(0,r.jsx)(n.h3,{id:"gmail-loader",children:"Gmail Loader"}),"\n",(0,r.jsx)(n.admonition,{title:"Legacy Google OAuth Components",type:"warning",children:(0,r.jsxs)(n.p,{children:["Google OAuth Components are in ",(0,r.jsx)(n.strong,{children:"Legacy"}),", which means they are available for use but no longer in active development as of Langflow 1.4.0.\nThey may not work in newer versions of Langflow.\nTo connect your flows to Google OAuth services, use ",(0,r.jsx)(n.a,{href:"/integrations-composio",children:"Composio"}),"."]})}),"\n",(0,r.jsx)(n.p,{children:"This component loads emails from Gmail using provided credentials and filters."}),"\n",(0,r.jsxs)(n.p,{children:["For more information about creating a service account JSON, see ",(0,r.jsx)(n.a,{href:"https://developers.google.com/identity/protocols/oauth2/service-account",children:"Service Account JSON"}),"."]}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Inputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Input"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"json_string"}),(0,r.jsx)(n.td,{children:"SecretStrInput"}),(0,r.jsx)(n.td,{children:"A JSON string containing OAuth 2.0 access token information for service account access."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"label_ids"}),(0,r.jsx)(n.td,{children:"MessageTextInput"}),(0,r.jsx)(n.td,{children:"A comma-separated list of label IDs to filter emails."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"max_results"}),(0,r.jsx)(n.td,{children:"MessageTextInput"}),(0,r.jsx)(n.td,{children:"The maximum number of emails to load."})]})]})]}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Outputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Output"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"data"}),(0,r.jsx)(n.td,{children:"Data"}),(0,r.jsx)(n.td,{children:"The loaded email data."})]})})]})]}),"\n",(0,r.jsx)(n.h3,{id:"google-drive-loader",children:"Google Drive Loader"}),"\n",(0,r.jsx)(n.admonition,{title:"Legacy Google OAuth Components",type:"warning",children:(0,r.jsxs)(n.p,{children:["Google OAuth Components are in ",(0,r.jsx)(n.strong,{children:"Legacy"}),", which means they are available for use but no longer in active development as of Langflow 1.4.0.\nThey may not work in newer versions of Langflow.\nTo connect your flows to Google OAuth services, use ",(0,r.jsx)(n.a,{href:"/integrations-composio",children:"Composio"}),"."]})}),"\n",(0,r.jsxs)(n.p,{children:["For more information about creating a service account JSON, see ",(0,r.jsx)(n.a,{href:"https://developers.google.com/identity/protocols/oauth2/service-account",children:"Service Account JSON"}),"."]}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Inputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Input"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"json_string"}),(0,r.jsx)(n.td,{children:"SecretStrInput"}),(0,r.jsx)(n.td,{children:"A JSON string containing OAuth 2.0 access token information for service account access."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"document_id"}),(0,r.jsx)(n.td,{children:"MessageTextInput"}),(0,r.jsx)(n.td,{children:"A single Google Drive document ID."})]})]})]}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Outputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Output"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"docs"}),(0,r.jsx)(n.td,{children:"Data"}),(0,r.jsx)(n.td,{children:"The loaded document data."})]})})]})]}),"\n",(0,r.jsx)(n.h3,{id:"google-drive-search",children:"Google Drive Search"}),"\n",(0,r.jsx)(n.admonition,{title:"Legacy Google OAuth Components",type:"warning",children:(0,r.jsxs)(n.p,{children:["Google OAuth Components are in ",(0,r.jsx)(n.strong,{children:"Legacy"}),", which means they are available for use but no longer in active development as of Langflow 1.4.0.\nThey may not work in newer versions of Langflow.\nTo connect your flows to Google OAuth services, use ",(0,r.jsx)(n.a,{href:"/integrations-composio",children:"Composio"}),"."]})}),"\n",(0,r.jsx)(n.p,{children:"This component searches Google Drive files using provided credentials and query parameters."}),"\n",(0,r.jsxs)(n.p,{children:["For more information about creating a service account JSON, see ",(0,r.jsx)(n.a,{href:"https://developers.google.com/identity/protocols/oauth2/service-account",children:"Service Account JSON"}),"."]}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Inputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Input"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"token_string"}),(0,r.jsx)(n.td,{children:"SecretStrInput"}),(0,r.jsx)(n.td,{children:"A JSON string containing OAuth 2.0 access token information for service account access."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"query_item"}),(0,r.jsx)(n.td,{children:"DropdownInput"}),(0,r.jsx)(n.td,{children:"The field to query."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"valid_operator"}),(0,r.jsx)(n.td,{children:"DropdownInput"}),(0,r.jsx)(n.td,{children:"The operator to use in the query."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"search_term"}),(0,r.jsx)(n.td,{children:"MessageTextInput"}),(0,r.jsx)(n.td,{children:"The value to search for in the specified query item."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"query_string"}),(0,r.jsx)(n.td,{children:"MessageTextInput"}),(0,r.jsx)(n.td,{children:"The query string used for searching."})]})]})]}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Outputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Output"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"doc_urls"}),(0,r.jsx)(n.td,{children:"List[str]"}),(0,r.jsx)(n.td,{children:"The URLs of the found documents."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"doc_ids"}),(0,r.jsx)(n.td,{children:"List[str]"}),(0,r.jsx)(n.td,{children:"The IDs of the found documents."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"doc_titles"}),(0,r.jsx)(n.td,{children:"List[str]"}),(0,r.jsx)(n.td,{children:"The titles of the found documents."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Data"}),(0,r.jsx)(n.td,{children:"Data"}),(0,r.jsx)(n.td,{children:"The document titles and URLs in a structured format."})]})]})]})]})]})}function u(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}function m(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},17886:(e,n,s)=>{s.d(n,{A:()=>d});s(96540);var t=s(64058),r=s(74848);function d({name:e,...n}){const s=t[e];return s?(0,r.jsx)(s,{...n}):null}},42547:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/component-type-convert-and-web-search-1eef7b9a7c1a243f4a08d9717728d0e1.png"},52189:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/component-sql-database-3d2c985aee2dd9970874cb85e1d2b570.png"},84987:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/connect-data-components-to-agent-a8cd8c94d0474ae434aeb5d507a803e8.png"}}]); \ No newline at end of file diff --git a/assets/js/7f193c41.cb9bad9f.js b/assets/js/7f193c41.cb9bad9f.js deleted file mode 100644 index 592de23a03..0000000000 --- a/assets/js/7f193c41.cb9bad9f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[5761],{14876:(e,n,s)=>{s.r(n),s.d(n,{CH:()=>a,assets:()=>h,chCodeConfig:()=>x,contentTitle:()=>l,default:()=>u,frontMatter:()=>c,metadata:()=>t,toc:()=>j});const t=JSON.parse('{"id":"Components/components-data","title":"Data","description":"Data components load data from a source into your flow.","source":"@site/docs/Components/components-data.mdx","sourceDirName":"Components","slug":"/components-data","permalink":"/components-data","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Data","slug":"/components-data"},"sidebar":"docs","previous":{"title":"Create custom Python components","permalink":"/components-custom-components"},"next":{"title":"Embedding models","permalink":"/components-embedding-models"}}');var r=s(74848),o=s(28453),i=s(24754),d=s(17886);const c={title:"Data",slug:"/components-data"},l="Data components in Langflow",h={},a={annotations:i.hk,Code:i.Cy},x={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},j=[{value:"Use data components in a flow",id:"use-data-components-in-a-flow",level:2},{value:"API Request",id:"api-request",level:2},{value:"Directory",id:"directory",level:2},{value:"File",id:"file",level:2},{value:"Supported File Types",id:"supported-file-types",level:3},{value:"News search",id:"news-search",level:2},{value:"RSS Reader",id:"rss-reader",level:2},{value:"SQL database",id:"sql-database",level:2},{value:"Web search",id:"web-search",level:2},{value:"URL",id:"url",level:2},{value:"Webhook",id:"webhook",level:2},{value:"Legacy components",id:"legacy-components",level:2},{value:"Gmail Loader",id:"gmail-loader",level:3},{value:"Google Drive Loader",id:"google-drive-loader",level:3},{value:"Google Drive Search",id:"google-drive-search",level:3}];function p(e){const n={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,o.R)(),...e.components},{Details:t}=n;return a||m("CH",!1),a.Code||m("CH.Code",!0),t||m("Details",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.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,r.jsx)(n.header,{children:(0,r.jsx)(n.h1,{id:"data-components-in-langflow",children:"Data components in Langflow"})}),"\n",(0,r.jsx)(n.p,{children:"Data components load data from a source into your flow."}),"\n",(0,r.jsx)(n.p,{children:"They may perform some processing or type checking, like converting raw HTML data into text, or ensuring your loaded file is of an acceptable type."}),"\n",(0,r.jsx)(n.h2,{id:"use-data-components-in-a-flow",children:"Use data components in a flow"}),"\n",(0,r.jsxs)(n.p,{children:["Components like ",(0,r.jsx)(n.a,{href:"#news-search",children:"News search"}),", ",(0,r.jsx)(n.a,{href:"#rss-reader",children:"RSS reader"}),", and ",(0,r.jsx)(n.a,{href:"#web-search",children:"Web search"})," all fetch data into Langflow, and connect to Langflow in the same way. They can output the retrieved data in ",(0,r.jsx)(n.a,{href:"/concepts-objects#dataframe-object",children:"DataFrame"})," format, or can be connected to an ",(0,r.jsx)(n.strong,{children:"Agent"})," component to be used as tools."]}),"\n",(0,r.jsx)(n.p,{children:"For example, to connect all three components to an Agent component, do the following:"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["Create the ",(0,r.jsx)(n.a,{href:"/simple-agent",children:"Simple Agent starter flow"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["In the ",(0,r.jsx)(n.strong,{children:"Agent"})," component, in the ",(0,r.jsx)(n.strong,{children:"OpenAI API Key"})," field, add your OpenAI API key."]}),"\n",(0,r.jsxs)(n.li,{children:["Add the ",(0,r.jsx)(n.strong,{children:"News search"}),", ",(0,r.jsx)(n.strong,{children:"RSS reader"}),", and ",(0,r.jsx)(n.strong,{children:"Web Search"})," components to your flow."]}),"\n",(0,r.jsxs)(n.li,{children:["In all three components, enable ",(0,r.jsx)(n.strong,{children:"Tool Mode"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["Connect the three components to the ",(0,r.jsx)(n.strong,{children:"Agent"})," component's ",(0,r.jsx)(n.strong,{children:"Tools"})," port.\nThe flow looks like the following:"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"Data components connected to agent",src:s(84987).A+"",width:"4000",height:"3028"})}),"\n",(0,r.jsxs)(n.ol,{start:"6",children:["\n",(0,r.jsxs)(n.li,{children:["Open the ",(0,r.jsx)(n.strong,{children:"Playground"})," and enter ",(0,r.jsx)(n.code,{children:"Use the websearch component to get me an RSS feed of the latest news."}),"\nThe Agent uses the ",(0,r.jsx)(n.code,{children:"perform_search"})," tool to return a list of RSS feeds."]}),"\n",(0,r.jsxs)(n.li,{children:["Enter the name of an RSS feed that interests you.\nThe Agent uses the ",(0,r.jsx)(n.code,{children:"read_rss"})," tool to fetch and summarize the latest RSS feed."]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"api-request",children:"API Request"}),"\n",(0,r.jsx)(n.p,{children:"This component makes HTTP requests using URLs or cURL commands."}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["To use this component in a flow, connect the ",(0,r.jsx)(n.strong,{children:"Data"})," output to a component that accepts the input.\nFor example, connect the ",(0,r.jsx)(n.strong,{children:"API Request"})," component to a ",(0,r.jsx)(n.strong,{children:"Chat Output"})," component."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["In the API component's ",(0,r.jsx)(n.strong,{children:"URLs"})," field, enter the endpoint for your request.\nThis example uses ",(0,r.jsx)(n.code,{children:"https://dummy-json.mock.beeceptor.com/posts"}),", which is a list of technology blog posts."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["In the ",(0,r.jsx)(n.strong,{children:"Method"})," field, enter the type of request.\nThis example uses GET to retrieve a list of blog posts.\nThe component also supports POST, PATCH, PUT, and DELETE."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Optionally, enable the ",(0,r.jsx)(n.strong,{children:"Use cURL"})," button to create a field for pasting curl requests.\nThe equivalent call in this example is ",(0,r.jsx)(n.code,{children:"curl -v https://dummy-json.mock.beeceptor.com/posts"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Click ",(0,r.jsx)(n.strong,{children:"Playground"}),", and then click ",(0,r.jsx)(n.strong,{children:"Run Flow"}),".\nYour request returns a list of blog posts in the ",(0,r.jsx)(n.code,{children:"result"})," field."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Inputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Name"}),(0,r.jsx)(n.th,{children:"Display Name"}),(0,r.jsx)(n.th,{children:"Info"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"urls"}),(0,r.jsx)(n.td,{children:"URLs"}),(0,r.jsx)(n.td,{children:"Enter one or more URLs, separated by commas."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"curl"}),(0,r.jsx)(n.td,{children:"cURL"}),(0,r.jsx)(n.td,{children:"Paste a curl command to populate the dictionary fields for headers and body."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"method"}),(0,r.jsx)(n.td,{children:"Method"}),(0,r.jsx)(n.td,{children:"The HTTP method to use."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"use_curl"}),(0,r.jsx)(n.td,{children:"Use cURL"}),(0,r.jsx)(n.td,{children:"Enable cURL mode to populate fields from a cURL command."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"query_params"}),(0,r.jsx)(n.td,{children:"Query Parameters"}),(0,r.jsx)(n.td,{children:"The query parameters to append to the URL."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"body"}),(0,r.jsx)(n.td,{children:"Body"}),(0,r.jsxs)(n.td,{children:["The body to send with the request as a dictionary (for ",(0,r.jsx)(n.code,{children:"POST"}),", ",(0,r.jsx)(n.code,{children:"PATCH"}),", ",(0,r.jsx)(n.code,{children:"PUT"}),")."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"headers"}),(0,r.jsx)(n.td,{children:"Headers"}),(0,r.jsx)(n.td,{children:"The headers to send with the request as a dictionary."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"timeout"}),(0,r.jsx)(n.td,{children:"Timeout"}),(0,r.jsx)(n.td,{children:"The timeout to use for the request."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"follow_redirects"}),(0,r.jsx)(n.td,{children:"Follow Redirects"}),(0,r.jsx)(n.td,{children:"Whether to follow http redirects."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"save_to_file"}),(0,r.jsx)(n.td,{children:"Save to File"}),(0,r.jsx)(n.td,{children:"Save the API response to a temporary file."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"include_httpx_metadata"}),(0,r.jsx)(n.td,{children:"Include HTTPx Metadata"}),(0,r.jsxs)(n.td,{children:["Include properties such as ",(0,r.jsx)(n.code,{children:"headers"}),", ",(0,r.jsx)(n.code,{children:"status_code"}),", ",(0,r.jsx)(n.code,{children:"response_headers"}),", and ",(0,r.jsx)(n.code,{children:"redirection_history"})," in the output."]})]})]})]}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Outputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Name"}),(0,r.jsx)(n.th,{children:"Display Name"}),(0,r.jsx)(n.th,{children:"Info"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"data"}),(0,r.jsx)(n.td,{children:"Data"}),(0,r.jsx)(n.td,{children:"The result of the API requests. Returns a Data object containing source URL and results."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"dataframe"}),(0,r.jsx)(n.td,{children:"DataFrame"}),(0,r.jsx)(n.td,{children:"Converts the API response data into a tabular DataFrame format."})]})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"directory",children:"Directory"}),"\n",(0,r.jsx)(n.p,{children:"This component recursively loads files from a directory, with options for file types, depth, and concurrency."}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Inputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Input"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"path"}),(0,r.jsx)(n.td,{children:"MessageTextInput"}),(0,r.jsx)(n.td,{children:"The path to the directory to load files from."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"types"}),(0,r.jsx)(n.td,{children:"MessageTextInput"}),(0,r.jsx)(n.td,{children:"The file types to load (leave empty to load all types)."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"depth"}),(0,r.jsx)(n.td,{children:"IntInput"}),(0,r.jsx)(n.td,{children:"The depth to search for files."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"max_concurrency"}),(0,r.jsx)(n.td,{children:"IntInput"}),(0,r.jsx)(n.td,{children:"The maximum concurrency for loading files."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"load_hidden"}),(0,r.jsx)(n.td,{children:"BoolInput"}),(0,r.jsx)(n.td,{children:"If true, hidden files are loaded."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"recursive"}),(0,r.jsx)(n.td,{children:"BoolInput"}),(0,r.jsx)(n.td,{children:"If true, the search is recursive."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"silent_errors"}),(0,r.jsx)(n.td,{children:"BoolInput"}),(0,r.jsx)(n.td,{children:"If true, errors do not raise an exception."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"use_multithreading"}),(0,r.jsx)(n.td,{children:"BoolInput"}),(0,r.jsx)(n.td,{children:"If true, multithreading is used."})]})]})]}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Outputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Output"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"data"}),(0,r.jsx)(n.td,{children:"List[Data]"}),(0,r.jsx)(n.td,{children:"The loaded file data from the directory."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"dataframe"}),(0,r.jsx)(n.td,{children:"DataFrame"}),(0,r.jsx)(n.td,{children:"The loaded file data in tabular DataFrame format."})]})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"file",children:"File"}),"\n",(0,r.jsxs)(n.p,{children:["This component loads and parses files of various supported formats and converts the content into a ",(0,r.jsx)(n.a,{href:"/concepts-objects",children:"Data"})," object. It supports multiple file types and provides options for parallel processing and error handling."]}),"\n",(0,r.jsx)(n.p,{children:"To load a document, follow these steps:"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["Click the ",(0,r.jsx)(n.strong,{children:"Select files"})," button."]}),"\n",(0,r.jsxs)(n.li,{children:["Select a local file or a file loaded with ",(0,r.jsx)(n.a,{href:"/concepts-file-management",children:"File management"}),", and then click ",(0,r.jsx)(n.strong,{children:"Select file"}),"."]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"The loaded file name appears in the component."}),"\n",(0,r.jsxs)(n.p,{children:["The default maximum supported file size is 100 MB.\nTo modify this value, see ",(0,r.jsx)(n.a,{href:"/environment-variables#LANGFLOW_MAX_FILE_SIZE_UPLOAD",children:"--max-file-size-upload"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"File"})," component\u2019s outputs change dynamically based on the number and type of files you select.\nFor more information, expand the following ",(0,r.jsx)(n.strong,{children:"Parameters"})," section, and then review the ",(0,r.jsx)(n.strong,{children:"Outputs"})," parameters."]}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Inputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Name"}),(0,r.jsx)(n.th,{children:"Display Name"}),(0,r.jsx)(n.th,{children:"Info"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"path"}),(0,r.jsx)(n.td,{children:"Files"}),(0,r.jsx)(n.td,{children:"The path to files to load. Supports individual files or bundled archives."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"file_path"}),(0,r.jsx)(n.td,{children:"Server File Path"}),(0,r.jsxs)(n.td,{children:["A Data object with a ",(0,r.jsx)(n.code,{children:"file_path"})," property pointing to the server file or a Message object with a path to the file. Supersedes 'Path' but supports the same file types."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"separator"}),(0,r.jsx)(n.td,{children:"Separator"}),(0,r.jsx)(n.td,{children:"The separator to use between multiple outputs in Message format."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"silent_errors"}),(0,r.jsx)(n.td,{children:"Silent Errors"}),(0,r.jsx)(n.td,{children:"If true, errors do not raise an exception."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"delete_server_file_after_processing"}),(0,r.jsx)(n.td,{children:"Delete Server File After Processing"}),(0,r.jsx)(n.td,{children:"If true, the Server File Path is deleted after processing."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"ignore_unsupported_extensions"}),(0,r.jsx)(n.td,{children:"Ignore Unsupported Extensions"}),(0,r.jsx)(n.td,{children:"If true, files with unsupported extensions are not processed."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"ignore_unspecified_files"}),(0,r.jsx)(n.td,{children:"Ignore Unspecified Files"}),(0,r.jsxs)(n.td,{children:["If true, ",(0,r.jsx)(n.code,{children:"Data"})," with no ",(0,r.jsx)(n.code,{children:"file_path"})," property is ignored."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"use_multithreading"}),(0,r.jsx)(n.td,{children:"[Deprecated] Use Multithreading"}),(0,r.jsxs)(n.td,{children:["Set 'Processing Concurrency' greater than ",(0,r.jsx)(n.code,{children:"1"})," to enable multithreading. This option is deprecated."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"concurrency_multithreading"}),(0,r.jsx)(n.td,{children:"Processing Concurrency"}),(0,r.jsx)(n.td,{children:"When multiple files are being processed, the number of files to process concurrently. Default is 1. Values greater than 1 enable parallel processing for 2 or more files."})]})]})]}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Outputs"})}),(0,r.jsx)(n.p,{children:"The outputs change dynamically based on the number and type of files selected."}),(0,r.jsx)(n.p,{children:"If a single file is selected:"}),(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Structured Content"})," ",(0,r.jsx)(n.a,{href:"/concepts-objects#dataframe-object",children:"DataFrame"}),": If a CSV or Excel file is selected, the component outputs tabular data."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Structured Content"})," ",(0,r.jsx)(n.a,{href:"/concepts-objects#data-object",children:"Data"}),": If a JSON file is selected, the component outputs parsed JSON data."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Raw Content"})," ",(0,r.jsx)(n.a,{href:"/concepts-objects#message-object",children:"Message"}),": Outputs the file's raw text content."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"File Path"})," ",(0,r.jsx)(n.a,{href:"/concepts-objects#message-object",children:"Message"}),": Outputs the path to the file on the Langflow server."]}),"\n"]}),(0,r.jsx)(n.p,{children:"If multiple files are selected:"}),(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Files"})," ",(0,r.jsx)(n.a,{href:"/concepts-objects#dataframe-object",children:"DataFrame"}),": A table containing the content and metadata of all selected files."]}),"\n"]}),(0,r.jsx)(n.p,{children:"If no files are selected:"}),(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"No outputs are displayed."}),"\n"]})]}),"\n",(0,r.jsx)(n.h3,{id:"supported-file-types",children:"Supported File Types"}),"\n",(0,r.jsx)(n.p,{children:"Text files:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".txt"})," - Text files"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".md"}),", ",(0,r.jsx)(n.code,{children:".mdx"})," - Markdown files"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".csv"})," - CSV files"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".json"})," - JSON files"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".yaml"}),", ",(0,r.jsx)(n.code,{children:".yml"})," - YAML files"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".xml"})," - XML files"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".html"}),", ",(0,r.jsx)(n.code,{children:".htm"})," - HTML files"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".pdf"})," - PDF files"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".docx"})," - Word documents"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".py"})," - Python files"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".sh"})," - Shell scripts"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".sql"})," - SQL files"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".js"})," - JavaScript files"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".ts"}),", ",(0,r.jsx)(n.code,{children:".tsx"})," - TypeScript files"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Archive formats (for bundling multiple files):"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".zip"})," - ZIP archives"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".tar"})," - TAR archives"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".tgz"})," - Gzipped TAR archives"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".bz2"})," - Bzip2 compressed files"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.code,{children:".gz"})," - Gzip compressed files"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"news-search",children:"News search"}),"\n",(0,r.jsxs)(n.p,{children:["This component searches Google News with RSS and returns clean article data. The ",(0,r.jsx)(n.code,{children:"clean_html"})," method parses the HTML content with the BeautifulSoup library, and then removes HTML markup and strips whitespace so the output data is clean."]}),"\n",(0,r.jsxs)(n.p,{children:["It returns news content as a DataFrame containing article titles, links, publication dates, and summaries. The component can also be used in ",(0,r.jsx)(n.strong,{children:"Tool Mode"})," with a connected ",(0,r.jsx)(n.strong,{children:"Agent"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["To use this component in a flow, connect the ",(0,r.jsx)(n.strong,{children:"News Search"})," output to a component that accepts the DataFrame input.\nFor example, connect the ",(0,r.jsx)(n.strong,{children:"News Search"})," component to a ",(0,r.jsx)(n.strong,{children:"Chat Output"})," component. Enter a search query, open the Playground, and click ",(0,r.jsx)(n.strong,{children:"Run Flow"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["The latest content is returned in a structured DataFrame, with the key columns ",(0,r.jsx)(n.code,{children:"title"}),", ",(0,r.jsx)(n.code,{children:"link"}),", ",(0,r.jsx)(n.code,{children:"published"})," and ",(0,r.jsx)(n.code,{children:"summary"}),"."]}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Inputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Name"}),(0,r.jsx)(n.th,{children:"Display Name"}),(0,r.jsx)(n.th,{children:"Info"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"query"}),(0,r.jsx)(n.td,{children:"Search Query"}),(0,r.jsx)(n.td,{children:"Search keywords for news articles."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"hl"}),(0,r.jsx)(n.td,{children:"Language (hl)"}),(0,r.jsxs)(n.td,{children:["Language code, such as en-US, fr, de. Default: ",(0,r.jsx)(n.code,{children:"en-US"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"gl"}),(0,r.jsx)(n.td,{children:"Country (gl)"}),(0,r.jsxs)(n.td,{children:["Country code, such as US, FR, DE. Default: ",(0,r.jsx)(n.code,{children:"US"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"ceid"}),(0,r.jsxs)(n.td,{children:["Country",":Language"," (ceid)"]}),(0,r.jsxs)(n.td,{children:["Language, such as US",":en",", FR",":fr",". Default: ",(0,r.jsx)(n.code,{children:"US:en"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"topic"}),(0,r.jsx)(n.td,{children:"Topic"}),(0,r.jsx)(n.td,{children:"One of: WORLD, NATION, BUSINESS, TECHNOLOGY, ENTERTAINMENT, SCIENCE, SPORTS, HEALTH."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"location"}),(0,r.jsx)(n.td,{children:"Location (Geo)"}),(0,r.jsx)(n.td,{children:"City, state, or country for location-based news. Leave blank for keyword search."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"timeout"}),(0,r.jsx)(n.td,{children:"Timeout"}),(0,r.jsx)(n.td,{children:"Timeout for the request in seconds."})]})]})]}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Outputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Name"}),(0,r.jsx)(n.th,{children:"Display Name"}),(0,r.jsx)(n.th,{children:"Info"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"articles"}),(0,r.jsx)(n.td,{children:"News Articles"}),(0,r.jsx)(n.td,{children:"A DataFrame containing article titles, links, publication dates, and summaries."})]})})]})]}),"\n",(0,r.jsx)(n.h2,{id:"rss-reader",children:"RSS Reader"}),"\n",(0,r.jsxs)(n.p,{children:["This component fetches and parses RSS feeds from any valid RSS feed URL. It returns the feed content as a DataFrame containing article titles, links, publication dates, and summaries. The component can also be used in ",(0,r.jsx)(n.strong,{children:"Tool Mode"})," with a connected ",(0,r.jsx)(n.strong,{children:"Agent"}),"."]}),"\n",(0,r.jsx)(n.p,{children:"To use this component in a flow, do the following:"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["Connect the ",(0,r.jsx)(n.strong,{children:"RSS reader"})," output to a component that accepts the DataFrame input, such as a ",(0,r.jsx)(n.strong,{children:"Chat Output"})," component."]}),"\n",(0,r.jsxs)(n.li,{children:["In the ",(0,r.jsx)(n.strong,{children:"RSS Feed URL"})," field, enter an RSS feed, such as ",(0,r.jsx)(n.code,{children:"https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml"})," for the New York Times."]}),"\n",(0,r.jsxs)(n.li,{children:["Open the ",(0,r.jsx)(n.strong,{children:"Playground"}),", and then click ",(0,r.jsx)(n.strong,{children:"Run Flow"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["The latest content is returned in a structured DataFrame, with the key columns ",(0,r.jsx)(n.code,{children:"title"}),", ",(0,r.jsx)(n.code,{children:"link"}),", ",(0,r.jsx)(n.code,{children:"published"})," and ",(0,r.jsx)(n.code,{children:"summary"}),"."]}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Inputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Name"}),(0,r.jsx)(n.th,{children:"Display Name"}),(0,r.jsx)(n.th,{children:"Info"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"rss_url"}),(0,r.jsx)(n.td,{children:"RSS Feed URL"}),(0,r.jsx)(n.td,{children:"URL of the RSS feed to parse."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"timeout"}),(0,r.jsx)(n.td,{children:"Timeout"}),(0,r.jsxs)(n.td,{children:["Timeout for the RSS feed request in seconds. Default: ",(0,r.jsx)(n.code,{children:"5"}),"."]})]})]})]}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Outputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Name"}),(0,r.jsx)(n.th,{children:"Display Name"}),(0,r.jsx)(n.th,{children:"Info"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"articles"}),(0,r.jsx)(n.td,{children:"Articles"}),(0,r.jsx)(n.td,{children:"A DataFrame containing article titles, links, publication dates, and summaries."})]})})]})]}),"\n",(0,r.jsx)(n.h2,{id:"sql-database",children:"SQL database"}),"\n",(0,r.jsxs)(n.p,{children:["This component executes SQL queries on ",(0,r.jsx)(n.a,{href:"https://docs.sqlalchemy.org/en/20/",children:"SQLAlchemy-compatible databases"}),".\nIt supports any SQLAlchemy-compatible database, including PostgreSQL, MySQL, SQLite, and others."]}),"\n",(0,r.jsx)(n.p,{children:"To use this component in a flow, do the following:"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["Create a test database called ",(0,r.jsx)(n.code,{children:"test.db"}),"."]}),"\n"]}),"\n",(0,r.jsx)(a.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"sqlite3 ",props:{style:{color:"#FFA657"}}},{content:"test.db",props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]}),"\n",(0,r.jsxs)(n.ol,{start:"2",children:["\n",(0,r.jsx)(n.li,{children:"Add values to the test database."}),"\n"]}),"\n",(0,r.jsx)(a.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"sqlite3 ",props:{style:{color:"#FFA657"}}},{content:"test.db \"CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT, email TEXT, age INTEGER); INSERT INTO users (name, email, age) VALUES ('John Doe', 'john@example.com', 30), ('Jane Smith', 'jane@example.com', 25), ('Bob Johnson', 'bob@example.com', 35);\"",props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]}),"\n",(0,r.jsxs)(n.ol,{start:"3",children:["\n",(0,r.jsxs)(n.li,{children:["Verify that ",(0,r.jsx)(n.code,{children:"test.db"})," has been created and contains your data."]}),"\n"]}),"\n",(0,r.jsx)(a.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"sqlite3 ",props:{style:{color:"#FFA657"}}},{content:'test.db "SELECT * FROM users;"',props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]}),"\n",(0,r.jsx)(n.p,{children:"Result:"}),"\n",(0,r.jsx)(a.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"1",props:{style:{color:"#FFA657"}}},{content:"|",props:{style:{color:"#FF7B72"}}},{content:"John ",props:{style:{color:"#FFA657"}}},{content:"Doe",props:{style:{color:"#A5D6FF"}}},{content:"|",props:{style:{color:"#FF7B72"}}},{content:"john@example.com",props:{style:{color:"#FFA657"}}}]},{tokens:[{content:"2",props:{style:{color:"#FFA657"}}},{content:"|",props:{style:{color:"#FF7B72"}}},{content:"Jane ",props:{style:{color:"#FFA657"}}},{content:"Smith",props:{style:{color:"#A5D6FF"}}},{content:"|",props:{style:{color:"#FF7B72"}}},{content:"jane@example.com",props:{style:{color:"#FFA657"}}}]},{tokens:[{content:"3",props:{style:{color:"#FFA657"}}},{content:"|",props:{style:{color:"#FF7B72"}}},{content:"John ",props:{style:{color:"#FFA657"}}},{content:"Doe",props:{style:{color:"#A5D6FF"}}},{content:"|",props:{style:{color:"#FF7B72"}}},{content:"john@example.com",props:{style:{color:"#FFA657"}}}]},{tokens:[{content:"4",props:{style:{color:"#FFA657"}}},{content:"|",props:{style:{color:"#FF7B72"}}},{content:"Jane ",props:{style:{color:"#FFA657"}}},{content:"Smith",props:{style:{color:"#A5D6FF"}}},{content:"|",props:{style:{color:"#FF7B72"}}},{content:"jane@example.com",props:{style:{color:"#FFA657"}}}]}],lang:"shell"},annotations:[]}]}),"\n",(0,r.jsxs)(n.ol,{start:"4",children:["\n",(0,r.jsxs)(n.li,{children:["In the ",(0,r.jsx)(n.strong,{children:"SQL Database"})," component's ",(0,r.jsx)(n.strong,{children:"Database URL"})," field, add the connection string for ",(0,r.jsx)(n.code,{children:"test.db"}),", such as ",(0,r.jsx)(n.code,{children:"sqlite:///test.db"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["With this connection established, the ",(0,r.jsx)(n.strong,{children:"SQL Query"})," field now accepts SQL queries.\nInstead of manually entering SQL queries, connect this database to an agent as a ",(0,r.jsx)(n.strong,{children:"Tool"})," to query it with natural language."]}),"\n",(0,r.jsxs)(n.ol,{start:"5",children:["\n",(0,r.jsxs)(n.li,{children:["In the ",(0,r.jsx)(n.strong,{children:"SQL Database"})," component, enable ",(0,r.jsx)(n.strong,{children:"Tool Mode"}),", and then connect it to an ",(0,r.jsx)(n.strong,{children:"Agent"})," component.\nThe flow looks like the following:"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"SQL database connected to agent",src:s(52189).A+"",width:"4000",height:"2400"})}),"\n",(0,r.jsxs)(n.ol,{start:"6",children:["\n",(0,r.jsxs)(n.li,{children:["In the ",(0,r.jsx)(n.strong,{children:"Agent"})," component, in the ",(0,r.jsx)(n.strong,{children:"OpenAI API Key"})," field, add your OpenAI API key."]}),"\n",(0,r.jsxs)(n.li,{children:["Open the ",(0,r.jsx)(n.strong,{children:"Playground"})," and ask ",(0,r.jsx)(n.code,{children:"What users are in my database?"}),"\nThe Agent uses the ",(0,r.jsx)(n.code,{children:"run_sql_query"})," tool to retrieve the information, and additionally identifies the duplicate ",(0,r.jsx)(n.code,{children:"users"})," entries."]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Result:"}),"\n",(0,r.jsx)(a.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Here are the users in your database:",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"1. **John Doe** - Email: john@example.com",props:{}}]},{tokens:[{content:"2. **Jane Smith** - Email: jane@example.com",props:{}}]},{tokens:[{content:"3. **John Doe** - Email: john@example.com",props:{}}]},{tokens:[{content:"4. **Jane Smith** - Email: jane@example.com",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"It seems there are duplicate entries for the users.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"> Finished chain.",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Inputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Name"}),(0,r.jsx)(n.th,{children:"Display Name"}),(0,r.jsx)(n.th,{children:"Info"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"database_url"}),(0,r.jsx)(n.td,{children:"Database URL"}),(0,r.jsx)(n.td,{children:"The SQLAlchemy-compatible database connection URL."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"query"}),(0,r.jsx)(n.td,{children:"SQL Query"}),(0,r.jsx)(n.td,{children:"The SQL query to execute."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"include_columns"}),(0,r.jsx)(n.td,{children:"Include Columns"}),(0,r.jsxs)(n.td,{children:["If enabled, includes column names in the result. Default: ",(0,r.jsx)(n.code,{children:"true"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"add_error"}),(0,r.jsx)(n.td,{children:"Add Error"}),(0,r.jsxs)(n.td,{children:["If enabled, adds any error messages to the result. Default: ",(0,r.jsx)(n.code,{children:"false"}),"."]})]})]})]}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Outputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Name"}),(0,r.jsx)(n.th,{children:"Display Name"}),(0,r.jsx)(n.th,{children:"Info"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"run_sql_query"}),(0,r.jsx)(n.td,{children:"Result Table"}),(0,r.jsx)(n.td,{children:"The query results as a DataFrame."})]})})]})]}),"\n",(0,r.jsx)(n.h2,{id:"web-search",children:"Web search"}),"\n",(0,r.jsxs)(n.p,{children:["This component performs web searches using DuckDuckGo's HTML interface, and returns the search results as a ",(0,r.jsx)(n.a,{href:"/concepts-objects#dataframe-object",children:"DataFrame"})," containing the key columns ",(0,r.jsx)(n.code,{children:"title"}),", ",(0,r.jsx)(n.code,{children:"links"}),", and ",(0,r.jsx)(n.code,{children:"snippets"}),". The component can also be used in ",(0,r.jsx)(n.strong,{children:"Tool Mode"})," with a connected ",(0,r.jsx)(n.strong,{children:"Agent"}),"."]}),"\n",(0,r.jsx)(n.p,{children:"To use this component in a flow, do the following:"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["Add the ",(0,r.jsx)(n.strong,{children:"Web search"})," component to the ",(0,r.jsx)(n.a,{href:"/basic-prompting",children:"Basic prompting"})," flow. In the ",(0,r.jsx)(n.strong,{children:"Search Query"})," field, enter a query, such as ",(0,r.jsx)(n.code,{children:"environmental news"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["Connect the ",(0,r.jsx)(n.strong,{children:"Web search"})," component's output to a component that accepts the DataFrame input."]}),"\n",(0,r.jsxs)(n.li,{children:["Connect a ",(0,r.jsx)(n.strong,{children:"Type Convert"})," component to convert the DataFrame to a Message."]}),"\n",(0,r.jsxs)(n.li,{children:["In the ",(0,r.jsx)(n.strong,{children:"Type Convert"})," component, in the ",(0,r.jsx)(n.strong,{children:"Output Type"})," field, select ",(0,r.jsx)(n.strong,{children:"Message"}),".\nYour flow looks like the following:"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"Type convert web search output to chat",src:s(42547).A+"",width:"4000",height:"1826"})}),"\n",(0,r.jsxs)(n.ol,{start:"5",children:["\n",(0,r.jsxs)(n.li,{children:["In the ",(0,r.jsx)(n.strong,{children:"Language Model"})," component, in the ",(0,r.jsx)(n.strong,{children:"OpenAI API Key"})," field, add your OpenAI API key."]}),"\n",(0,r.jsxs)(n.li,{children:["Click ",(0,r.jsx)(n.strong,{children:"Playground"}),", and then ask about ",(0,r.jsx)(n.code,{children:"latest news"}),"."]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"The search results are returned to the Playground as a message."}),"\n",(0,r.jsx)(n.p,{children:"Result:"}),"\n",(0,r.jsx)(a.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Latest news",props:{}}]},{tokens:[{content:"AI",props:{}}]},{tokens:[{content:"gpt-4o-mini",props:{}}]},{tokens:[{content:"Here are some of the latest news articles related to the environment:",props:{}}]},{tokens:[{content:"Ozone Pollution and Global Warming: A recent study highlights that ozone pollution is a significant global environmental concern, threatening human health and crop production while exacerbating global warming. Read more",props:{}}]},{tokens:[{content:"...",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsx)(n.admonition,{type:"note",children:(0,r.jsx)(n.p,{children:"This component uses web scraping and may be subject to rate limits. For production use, consider using an official search API."})}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Inputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Name"}),(0,r.jsx)(n.th,{children:"Display Name"}),(0,r.jsx)(n.th,{children:"Info"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"query"}),(0,r.jsx)(n.td,{children:"Search Query"}),(0,r.jsx)(n.td,{children:"Keywords to search for."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"timeout"}),(0,r.jsx)(n.td,{children:"Timeout"}),(0,r.jsxs)(n.td,{children:["Timeout for the web search request in seconds. Default: ",(0,r.jsx)(n.code,{children:"5"}),"."]})]})]})]}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Outputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Name"}),(0,r.jsx)(n.th,{children:"Display Name"}),(0,r.jsx)(n.th,{children:"Info"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"results"}),(0,r.jsx)(n.td,{children:"Search Results"}),(0,r.jsx)(n.td,{children:"A DataFrame containing search results with titles, links, and snippets."})]})})]})]}),"\n",(0,r.jsx)(n.h2,{id:"url",children:"URL"}),"\n",(0,r.jsx)(n.p,{children:"This component fetches content from one or more URLs, processes the content, and returns it in various formats. It supports output in plain text or raw HTML."}),"\n",(0,r.jsxs)(n.p,{children:["In the component's ",(0,r.jsx)(n.strong,{children:"URLs"})," field, enter the URL you want to load. To add multiple URL fields, click ",(0,r.jsx)(d.A,{name:"Plus","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Add URL"}),"."]}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["To use this component in a flow, connect the ",(0,r.jsx)(n.strong,{children:"DataFrame"})," output to a component that accepts the input.\nFor example, connect the ",(0,r.jsx)(n.strong,{children:"URL"})," component to a ",(0,r.jsx)(n.strong,{children:"Chat Output"})," component."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["In the URL component's ",(0,r.jsx)(n.strong,{children:"URLs"})," field, enter the URL for your request.\nThis example uses ",(0,r.jsx)(n.code,{children:"langflow.org"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Optionally, in the ",(0,r.jsx)(n.strong,{children:"Max Depth"})," field, enter how many pages away from the initial URL you want to crawl.\nSelect ",(0,r.jsx)(n.code,{children:"1"})," to crawl only the page specified in the ",(0,r.jsx)(n.strong,{children:"URLs"})," field.\nSelect ",(0,r.jsx)(n.code,{children:"2"})," to crawl all pages linked from that page.\nThe component crawls by link traversal, not by URL path depth."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Click ",(0,r.jsx)(n.strong,{children:"Playground"}),", and then click ",(0,r.jsx)(n.strong,{children:"Run Flow"}),".\nThe text contents of the URL are returned to the Playground as a structured DataFrame."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["In the ",(0,r.jsx)(n.strong,{children:"URL"})," component, change the output port to ",(0,r.jsx)(n.strong,{children:"Message"}),", and then run the flow again.\nThe text contents of the URL are returned as unstructured raw text, which you can extract patterns with the ",(0,r.jsx)(n.a,{href:"/components-processing#parser",children:"Parser"})," component."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Inputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Name"}),(0,r.jsx)(n.th,{children:"Display Name"}),(0,r.jsx)(n.th,{children:"Info"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"urls"}),(0,r.jsx)(n.td,{children:"URLs"}),(0,r.jsx)(n.td,{children:"Click the '+' button to enter one or more URLs to crawl recursively."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"max_depth"}),(0,r.jsx)(n.td,{children:"Max Depth"}),(0,r.jsx)(n.td,{children:"Controls how many 'clicks' away from the initial page the crawler will go."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"prevent_outside"}),(0,r.jsx)(n.td,{children:"Prevent Outside"}),(0,r.jsx)(n.td,{children:"If enabled, only crawls URLs within the same domain as the root URL."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"use_async"}),(0,r.jsx)(n.td,{children:"Use Async"}),(0,r.jsx)(n.td,{children:"If enabled, uses asynchronous loading which can be significantly faster but might use more system resources."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"format"}),(0,r.jsx)(n.td,{children:"Output Format"}),(0,r.jsxs)(n.td,{children:["Output Format. Use ",(0,r.jsx)(n.code,{children:"Text"})," to extract the text from the HTML or ",(0,r.jsx)(n.code,{children:"HTML"})," for the raw HTML content."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"timeout"}),(0,r.jsx)(n.td,{children:"Timeout"}),(0,r.jsx)(n.td,{children:"Timeout for the request in seconds."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"headers"}),(0,r.jsx)(n.td,{children:"Headers"}),(0,r.jsx)(n.td,{children:"The headers to send with the request."})]})]})]}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Outputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Name"}),(0,r.jsx)(n.th,{children:"Display Name"}),(0,r.jsx)(n.th,{children:"Info"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"data"}),(0,r.jsx)(n.td,{children:"Data"}),(0,r.jsxs)(n.td,{children:["A list of ",(0,r.jsx)(n.a,{href:"/concepts-objects",children:"Data"})," objects containing fetched content and metadata."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"text"}),(0,r.jsx)(n.td,{children:"Message"}),(0,r.jsx)(n.td,{children:"The fetched content as formatted text."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"dataframe"}),(0,r.jsx)(n.td,{children:"DataFrame"}),(0,r.jsxs)(n.td,{children:["The content formatted as a ",(0,r.jsx)(n.a,{href:"/concepts-objects#dataframe-object",children:"DataFrame"})," object."]})]})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"webhook",children:"Webhook"}),"\n",(0,r.jsx)(n.p,{children:"This component defines a webhook trigger that runs a flow when it receives an HTTP POST request."}),"\n",(0,r.jsxs)(n.p,{children:["If the input is not valid JSON, the component wraps it in a ",(0,r.jsx)(n.code,{children:"payload"})," object so that it can be processed and still trigger the flow."]}),"\n",(0,r.jsxs)(n.p,{children:["When a ",(0,r.jsx)(n.strong,{children:"Webhook"})," component is added to the workspace, a new ",(0,r.jsx)(n.strong,{children:"Webhook cURL"})," tab becomes available in the ",(0,r.jsx)(n.strong,{children:"API"})," pane that contains an HTTP POST request for triggering the webhook component. For example:\nReplace ",(0,r.jsx)(n.code,{children:"LANGFLOW_SERVER_ADDRESS"}),", ",(0,r.jsx)(n.code,{children:"FLOW_ID"}),", and ",(0,r.jsx)(n.code,{children:"LANGFLOW_API_KEY"})," with the values from your Langflow deployment."]}),"\n",(0,r.jsx)(a.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"POST ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "http://LANGFLOW_SERVER_ADDRESS/api/v1/webhook/FLOW_ID" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:"'Content-Type: application/json' ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:"'x-api-key: LANGFLOW_API_KEY' ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:'\'{"any": "data"}\'',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Webhook"})," component is often paired with a ",(0,r.jsxs)(n.a,{href:"/components-processing#parser",children:[(0,r.jsx)(n.strong,{children:"Parser"})," component"]})," to extract relevant data from the raw payload.\nFor more information, see ",(0,r.jsx)(n.a,{href:"/webhook",children:"Trigger flows with webhooks"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["To troubleshoot a flow with a ",(0,r.jsx)(n.strong,{children:"Webhook"})," component and verify that the component is receiving data, you can create a small flow that outputs only the parsed payload:"]}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Create a flow with ",(0,r.jsx)(n.strong,{children:"Webhook"}),", ",(0,r.jsx)(n.strong,{children:"Parser"}),", and ",(0,r.jsx)(n.strong,{children:"Chat Output"})," components."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Connect the Webhook component's ",(0,r.jsx)(n.strong,{children:"Data"})," output to the Parser component's ",(0,r.jsx)(n.strong,{children:"Data"})," input."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Connect the Parser component's ",(0,r.jsx)(n.strong,{children:"Parsed Text"})," output to the Chat Output component's ",(0,r.jsx)(n.strong,{children:"Text"})," input."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Edit the ",(0,r.jsx)(n.strong,{children:"Parser"})," component to set ",(0,r.jsx)(n.strong,{children:"Mode"})," to ",(0,r.jsx)(n.strong,{children:"Stringify"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["This mode passes the data received by the Webhook component as a string that is printed by the ",(0,r.jsx)(n.strong,{children:"Chat Output"})," component."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Click ",(0,r.jsx)(n.strong,{children:"Share"}),", select ",(0,r.jsx)(n.strong,{children:"API access"}),", and then copy the ",(0,r.jsx)(n.strong,{children:"Webhook cURL"})," code snippet."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Optional: Edit the ",(0,r.jsx)(n.code,{children:"data"})," in the code snippet if you want to pass a different payload."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Send the POST request to trigger the flow."}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Click ",(0,r.jsx)(n.strong,{children:"Playground"})," to verify that the ",(0,r.jsx)(n.strong,{children:"Chat Output"})," component printed the JSON data from your POST request."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["For more information, see ",(0,r.jsx)(n.a,{href:"/webhook",children:"Trigger flows with webhooks"}),"."]}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Inputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Name"}),(0,r.jsx)(n.th,{children:"Display Name"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"data"}),(0,r.jsx)(n.td,{children:"Payload"}),(0,r.jsx)(n.td,{children:"Receives a payload from external systems through HTTP POST requests."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"curl"}),(0,r.jsx)(n.td,{children:"cURL"}),(0,r.jsx)(n.td,{children:"The cURL command template for making requests to this webhook."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"endpoint"}),(0,r.jsx)(n.td,{children:"Endpoint"}),(0,r.jsx)(n.td,{children:"The endpoint URL where this webhook receives requests."})]})]})]}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Outputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Name"}),(0,r.jsx)(n.th,{children:"Display Name"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"output_data"}),(0,r.jsx)(n.td,{children:"Data"}),(0,r.jsxs)(n.td,{children:["Outputs processed data from the webhook input, and returns an empty ",(0,r.jsx)(n.a,{href:"/concepts-objects",children:"Data"})," object if no input is provided. If the input is not valid JSON, the component wraps it in a ",(0,r.jsx)(n.code,{children:"payload"})," object."]})]})})]})]}),"\n",(0,r.jsx)(n.h2,{id:"legacy-components",children:"Legacy components"}),"\n",(0,r.jsx)(n.p,{children:"Legacy components are available for use but are no longer supported."}),"\n",(0,r.jsx)(n.h3,{id:"gmail-loader",children:"Gmail Loader"}),"\n",(0,r.jsx)(n.admonition,{title:"Legacy Google OAuth Components",type:"warning",children:(0,r.jsxs)(n.p,{children:["Google OAuth Components are in ",(0,r.jsx)(n.strong,{children:"Legacy"}),", which means they are available for use but no longer in active development as of Langflow 1.4.0.\nThey may not work in newer versions of Langflow.\nTo connect your flows to Google OAuth services, use ",(0,r.jsx)(n.a,{href:"/integrations-composio",children:"Composio"}),"."]})}),"\n",(0,r.jsx)(n.p,{children:"This component loads emails from Gmail using provided credentials and filters."}),"\n",(0,r.jsxs)(n.p,{children:["For more information about creating a service account JSON, see ",(0,r.jsx)(n.a,{href:"https://developers.google.com/identity/protocols/oauth2/service-account",children:"Service Account JSON"}),"."]}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Inputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Input"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"json_string"}),(0,r.jsx)(n.td,{children:"SecretStrInput"}),(0,r.jsx)(n.td,{children:"A JSON string containing OAuth 2.0 access token information for service account access."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"label_ids"}),(0,r.jsx)(n.td,{children:"MessageTextInput"}),(0,r.jsx)(n.td,{children:"A comma-separated list of label IDs to filter emails."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"max_results"}),(0,r.jsx)(n.td,{children:"MessageTextInput"}),(0,r.jsx)(n.td,{children:"The maximum number of emails to load."})]})]})]}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Outputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Output"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"data"}),(0,r.jsx)(n.td,{children:"Data"}),(0,r.jsx)(n.td,{children:"The loaded email data."})]})})]})]}),"\n",(0,r.jsx)(n.h3,{id:"google-drive-loader",children:"Google Drive Loader"}),"\n",(0,r.jsx)(n.admonition,{title:"Legacy Google OAuth Components",type:"warning",children:(0,r.jsxs)(n.p,{children:["Google OAuth Components are in ",(0,r.jsx)(n.strong,{children:"Legacy"}),", which means they are available for use but no longer in active development as of Langflow 1.4.0.\nThey may not work in newer versions of Langflow.\nTo connect your flows to Google OAuth services, use ",(0,r.jsx)(n.a,{href:"/integrations-composio",children:"Composio"}),"."]})}),"\n",(0,r.jsxs)(n.p,{children:["For more information about creating a service account JSON, see ",(0,r.jsx)(n.a,{href:"https://developers.google.com/identity/protocols/oauth2/service-account",children:"Service Account JSON"}),"."]}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Inputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Input"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"json_string"}),(0,r.jsx)(n.td,{children:"SecretStrInput"}),(0,r.jsx)(n.td,{children:"A JSON string containing OAuth 2.0 access token information for service account access."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"document_id"}),(0,r.jsx)(n.td,{children:"MessageTextInput"}),(0,r.jsx)(n.td,{children:"A single Google Drive document ID."})]})]})]}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Outputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Output"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsx)(n.tbody,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"docs"}),(0,r.jsx)(n.td,{children:"Data"}),(0,r.jsx)(n.td,{children:"The loaded document data."})]})})]})]}),"\n",(0,r.jsx)(n.h3,{id:"google-drive-search",children:"Google Drive Search"}),"\n",(0,r.jsx)(n.admonition,{title:"Legacy Google OAuth Components",type:"warning",children:(0,r.jsxs)(n.p,{children:["Google OAuth Components are in ",(0,r.jsx)(n.strong,{children:"Legacy"}),", which means they are available for use but no longer in active development as of Langflow 1.4.0.\nThey may not work in newer versions of Langflow.\nTo connect your flows to Google OAuth services, use ",(0,r.jsx)(n.a,{href:"/integrations-composio",children:"Composio"}),"."]})}),"\n",(0,r.jsx)(n.p,{children:"This component searches Google Drive files using provided credentials and query parameters."}),"\n",(0,r.jsxs)(n.p,{children:["For more information about creating a service account JSON, see ",(0,r.jsx)(n.a,{href:"https://developers.google.com/identity/protocols/oauth2/service-account",children:"Service Account JSON"}),"."]}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Parameters"}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Inputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Input"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"token_string"}),(0,r.jsx)(n.td,{children:"SecretStrInput"}),(0,r.jsx)(n.td,{children:"A JSON string containing OAuth 2.0 access token information for service account access."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"query_item"}),(0,r.jsx)(n.td,{children:"DropdownInput"}),(0,r.jsx)(n.td,{children:"The field to query."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"valid_operator"}),(0,r.jsx)(n.td,{children:"DropdownInput"}),(0,r.jsx)(n.td,{children:"The operator to use in the query."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"search_term"}),(0,r.jsx)(n.td,{children:"MessageTextInput"}),(0,r.jsx)(n.td,{children:"The value to search for in the specified query item."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"query_string"}),(0,r.jsx)(n.td,{children:"MessageTextInput"}),(0,r.jsx)(n.td,{children:"The query string used for searching."})]})]})]}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.strong,{children:"Outputs"})}),(0,r.jsxs)(n.table,{children:[(0,r.jsx)(n.thead,{children:(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.th,{children:"Output"}),(0,r.jsx)(n.th,{children:"Type"}),(0,r.jsx)(n.th,{children:"Description"})]})}),(0,r.jsxs)(n.tbody,{children:[(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"doc_urls"}),(0,r.jsx)(n.td,{children:"List[str]"}),(0,r.jsx)(n.td,{children:"The URLs of the found documents."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"doc_ids"}),(0,r.jsx)(n.td,{children:"List[str]"}),(0,r.jsx)(n.td,{children:"The IDs of the found documents."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"doc_titles"}),(0,r.jsx)(n.td,{children:"List[str]"}),(0,r.jsx)(n.td,{children:"The titles of the found documents."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Data"}),(0,r.jsx)(n.td,{children:"Data"}),(0,r.jsx)(n.td,{children:"The document titles and URLs in a structured format."})]})]})]})]})]})}function u(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}function m(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},17886:(e,n,s)=>{s.d(n,{A:()=>o});s(96540);var t=s(64058),r=s(74848);function o({name:e,...n}){const s=t[e];return s?(0,r.jsx)(s,{...n}):null}},42547:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/component-type-convert-and-web-search-1eef7b9a7c1a243f4a08d9717728d0e1.png"},52189:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/component-sql-database-3d2c985aee2dd9970874cb85e1d2b570.png"},84987:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/connect-data-components-to-agent-a8cd8c94d0474ae434aeb5d507a803e8.png"}}]); \ No newline at end of file diff --git a/assets/js/7f7a8893.3754e235.js b/assets/js/7f7a8893.3754e235.js new file mode 100644 index 0000000000..8cb8fe2dad --- /dev/null +++ b/assets/js/7f7a8893.3754e235.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[188],{6944:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/component-chat-io-8d114bb5279770d2e3bc8250ec6396ed.png"},16878:(e,t,n)=>{n.r(t),n.d(t,{CH:()=>a,assets:()=>h,chCodeConfig:()=>p,contentTitle:()=>l,default:()=>u,frontMatter:()=>d,metadata:()=>s,toc:()=>x});const s=JSON.parse('{"id":"Components/components-io","title":"Inputs and outputs","description":"Input and output components define where data enters and exits your flow.","source":"@site/docs/Components/components-io.mdx","sourceDirName":"Components","slug":"/components-io","permalink":"/components-io","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Inputs and outputs","slug":"/components-io"},"sidebar":"docs","previous":{"title":"Helpers","permalink":"/components-helpers"},"next":{"title":"Logic","permalink":"/components-logic"}}');var o=n(74848),r=n(28453),c=n(24754),i=n(17886);const d={title:"Inputs and outputs",slug:"/components-io"},l="Input and output components in Langflow",h={},a={annotations:c.hk,Code:c.Cy},p={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},x=[{value:"Chat Input",id:"chat-input",level:2},{value:"Message method",id:"message-method",level:3},{value:"Text Input",id:"text-input",level:2},{value:"Chat Output",id:"chat-output",level:2},{value:"Text Output",id:"text-output",level:2},{value:"Chat components example flow",id:"chat-components-example-flow",level:2},{value:"Send chat messages with the API",id:"send-chat-messages-with-the-api",level:3},{value:"See also",id:"see-also",level:2}];function j(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components},{Details:s}=t;return a||g("CH",!1),a.Code||g("CH.Code",!0),s||g("Details",!0),(0,o.jsxs)(o.Fragment,{children:[(0,o.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,o.jsx)(t.header,{children:(0,o.jsx)(t.h1,{id:"input-and-output-components-in-langflow",children:"Input and output components in Langflow"})}),"\n",(0,o.jsx)(t.p,{children:"Input and output components define where data enters and exits your flow."}),"\n",(0,o.jsxs)(t.p,{children:["Both components accept user input and return a ",(0,o.jsx)(t.code,{children:"Message"})," object, but serve different purposes."]}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.strong,{children:"Text Input"})," component accepts a text string input and returns a ",(0,o.jsx)(t.code,{children:"Message"})," object containing only the input text. The output does not appear in the ",(0,o.jsx)(t.strong,{children:"Playground"}),"."]}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.strong,{children:"Chat Input"})," component accepts multiple input types including text, files, and metadata, and returns a ",(0,o.jsx)(t.code,{children:"Message"})," object containing the text along with sender information, session ID, and file attachments."]}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.strong,{children:"Chat Input"})," component provides an interactive chat interface in the ",(0,o.jsx)(t.strong,{children:"Playground"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"chat-input",children:"Chat Input"}),"\n",(0,o.jsxs)(t.p,{children:["This component collects user input as ",(0,o.jsx)(t.code,{children:"Text"})," strings from the chat and wraps it in a ",(0,o.jsx)(t.a,{href:"/data-types#message",children:"Message"})," object that includes the input text, sender information, session ID, file attachments, and styling properties."]}),"\n",(0,o.jsx)(t.p,{children:"It can optionally store the message in a chat history."}),"\n",(0,o.jsxs)(s,{children:[(0,o.jsx)("summary",{children:"Parameters"}),(0,o.jsx)(t.p,{children:(0,o.jsx)(t.strong,{children:"Inputs"})}),(0,o.jsxs)(t.table,{children:[(0,o.jsx)(t.thead,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.th,{children:"Name"}),(0,o.jsx)(t.th,{children:"Display Name"}),(0,o.jsx)(t.th,{children:"Info"})]})}),(0,o.jsxs)(t.tbody,{children:[(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"input_value"}),(0,o.jsx)(t.td,{children:"Text"}),(0,o.jsx)(t.td,{children:"The Message to be passed as input."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"should_store_message"}),(0,o.jsx)(t.td,{children:"Store Messages"}),(0,o.jsx)(t.td,{children:"Store the message in the history."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"sender"}),(0,o.jsx)(t.td,{children:"Sender Type"}),(0,o.jsx)(t.td,{children:"The type of sender."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"sender_name"}),(0,o.jsx)(t.td,{children:"Sender Name"}),(0,o.jsx)(t.td,{children:"The name of the sender."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"session_id"}),(0,o.jsx)(t.td,{children:"Session ID"}),(0,o.jsx)(t.td,{children:"The unique identifier for the chat session. If empty, the current session ID parameter is used."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"files"}),(0,o.jsx)(t.td,{children:"Files"}),(0,o.jsx)(t.td,{children:"The files to be sent with the message."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"background_color"}),(0,o.jsx)(t.td,{children:"Background Color"}),(0,o.jsx)(t.td,{children:"The background color of the icon."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"chat_icon"}),(0,o.jsx)(t.td,{children:"Icon"}),(0,o.jsx)(t.td,{children:"The icon of the message."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"text_color"}),(0,o.jsx)(t.td,{children:"Text Color"}),(0,o.jsx)(t.td,{children:"The text color of the name."})]})]})]}),(0,o.jsx)(t.p,{children:(0,o.jsx)(t.strong,{children:"Outputs"})}),(0,o.jsxs)(t.table,{children:[(0,o.jsx)(t.thead,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.th,{children:"Name"}),(0,o.jsx)(t.th,{children:"Display Name"}),(0,o.jsx)(t.th,{children:"Info"})]})}),(0,o.jsx)(t.tbody,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"message"}),(0,o.jsx)(t.td,{children:"Message"}),(0,o.jsx)(t.td,{children:"The resulting chat message object with all specified properties."})]})})]})]}),"\n",(0,o.jsx)(t.h3,{id:"message-method",children:"Message method"}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.code,{children:"ChatInput"})," class provides an asynchronous method to create and store a ",(0,o.jsx)(t.code,{children:"Message"})," object based on the input parameters.\nThe ",(0,o.jsx)(t.code,{children:"Message"})," object is created in the ",(0,o.jsx)(t.code,{children:"message_response"})," method of the ChatInput class using the ",(0,o.jsx)(t.code,{children:"Message.create()"})," factory method."]}),"\n",(0,o.jsx)(a.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"message ",props:{style:{color:"#C9D1D9"}}},{content:"= await",props:{style:{color:"#FF7B72"}}},{content:" Message.create(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" text",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".input_value,",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" sender",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".sender,",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" sender_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".sender_name,",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" session_id",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".session_id,",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" files",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".files,",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" properties",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "background_color"',props:{style:{color:"#A5D6FF"}}},{content:": background_color,",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text_color"',props:{style:{color:"#A5D6FF"}}},{content:": text_color,",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "icon"',props:{style:{color:"#A5D6FF"}}},{content:": icon,",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:")",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,o.jsx)(t.h2,{id:"text-input",children:"Text Input"}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.strong,{children:"Text Input"})," component accepts a text string input and returns a ",(0,o.jsx)(t.code,{children:"Message"})," object containing only the input text."]}),"\n",(0,o.jsxs)(t.p,{children:["The output does not appear in the ",(0,o.jsx)(t.strong,{children:"Playground"}),"."]}),"\n",(0,o.jsxs)(s,{children:[(0,o.jsx)("summary",{children:"Parameters"}),(0,o.jsx)(t.p,{children:(0,o.jsx)(t.strong,{children:"Inputs"})}),(0,o.jsxs)(t.table,{children:[(0,o.jsx)(t.thead,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.th,{children:"Name"}),(0,o.jsx)(t.th,{children:"Display Name"}),(0,o.jsx)(t.th,{children:"Info"})]})}),(0,o.jsx)(t.tbody,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"input_value"}),(0,o.jsx)(t.td,{children:"Text"}),(0,o.jsx)(t.td,{children:"The text/content to be passed as output."})]})})]}),(0,o.jsx)(t.p,{children:(0,o.jsx)(t.strong,{children:"Outputs"})}),(0,o.jsxs)(t.table,{children:[(0,o.jsx)(t.thead,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.th,{children:"Name"}),(0,o.jsx)(t.th,{children:"Display Name"}),(0,o.jsx)(t.th,{children:"Info"})]})}),(0,o.jsx)(t.tbody,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"text"}),(0,o.jsx)(t.td,{children:"Text"}),(0,o.jsx)(t.td,{children:"The resulting text message."})]})})]})]}),"\n",(0,o.jsx)(t.h2,{id:"chat-output",children:"Chat Output"}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.strong,{children:"Chat Output"})," component creates a ",(0,o.jsx)(t.a,{href:"/data-types#message",children:"Message"})," object that includes the input text, sender information, session ID, and styling properties."]}),"\n",(0,o.jsx)(t.p,{children:"The component accepts the following input types."}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.a,{href:"/data-types#data",children:"Data"})}),"\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.a,{href:"/data-types#dataframe",children:"DataFrame"})}),"\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.a,{href:"/data-types#message",children:"Message"})}),"\n"]}),"\n",(0,o.jsxs)(s,{children:[(0,o.jsx)("summary",{children:"Parameters"}),(0,o.jsx)(t.p,{children:(0,o.jsx)(t.strong,{children:"Inputs"})}),(0,o.jsxs)(t.table,{children:[(0,o.jsx)(t.thead,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.th,{children:"Name"}),(0,o.jsx)(t.th,{children:"Display Name"}),(0,o.jsx)(t.th,{children:"Info"})]})}),(0,o.jsxs)(t.tbody,{children:[(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"input_value"}),(0,o.jsx)(t.td,{children:"Text"}),(0,o.jsx)(t.td,{children:"The message to be passed as output."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"should_store_message"}),(0,o.jsx)(t.td,{children:"Store Messages"}),(0,o.jsx)(t.td,{children:"The flag to store the message in the history."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"sender"}),(0,o.jsx)(t.td,{children:"Sender Type"}),(0,o.jsx)(t.td,{children:"The type of sender."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"sender_name"}),(0,o.jsx)(t.td,{children:"Sender Name"}),(0,o.jsx)(t.td,{children:"The name of the sender."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"session_id"}),(0,o.jsx)(t.td,{children:"Session ID"}),(0,o.jsx)(t.td,{children:"The unique identifier for the chat session. If empty, the current session ID parameter is used."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"data_template"}),(0,o.jsx)(t.td,{children:"Data Template"}),(0,o.jsx)(t.td,{children:"The template to convert Data to Text. If the option is left empty, it is dynamically set to the Data's text key."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"background_color"}),(0,o.jsx)(t.td,{children:"Background Color"}),(0,o.jsx)(t.td,{children:"The background color of the icon."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"chat_icon"}),(0,o.jsx)(t.td,{children:"Icon"}),(0,o.jsx)(t.td,{children:"The icon of the message."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"text_color"}),(0,o.jsx)(t.td,{children:"Text Color"}),(0,o.jsx)(t.td,{children:"The text color of the name."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"clean_data"}),(0,o.jsx)(t.td,{children:"Basic Clean Data"}),(0,o.jsxs)(t.td,{children:["When enabled, ",(0,o.jsx)(t.code,{children:"DataFrame"})," inputs are cleaned when converted to text. Cleaning removes empty rows, empty lines in cells, and multiple newlines."]})]})]})]}),(0,o.jsx)(t.p,{children:(0,o.jsx)(t.strong,{children:"Outputs"})}),(0,o.jsxs)(t.table,{children:[(0,o.jsx)(t.thead,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.th,{children:"Name"}),(0,o.jsx)(t.th,{children:"Display Name"}),(0,o.jsx)(t.th,{children:"Info"})]})}),(0,o.jsx)(t.tbody,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"message"}),(0,o.jsx)(t.td,{children:"Message"}),(0,o.jsx)(t.td,{children:"The resulting chat message object with all specified properties."})]})})]})]}),"\n",(0,o.jsx)(t.h2,{id:"text-output",children:"Text Output"}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.strong,{children:"Text Output"})," takes a single input of text and returns a ",(0,o.jsx)(t.a,{href:"/data-types#message",children:"Message"})," object containing that text."]}),"\n",(0,o.jsxs)(t.p,{children:["The output does not appear in the ",(0,o.jsx)(t.strong,{children:"Playground"}),"."]}),"\n",(0,o.jsxs)(s,{children:[(0,o.jsx)("summary",{children:"Parameters"}),(0,o.jsx)(t.p,{children:(0,o.jsx)(t.strong,{children:"Inputs"})}),(0,o.jsxs)(t.table,{children:[(0,o.jsx)(t.thead,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.th,{children:"Name"}),(0,o.jsx)(t.th,{children:"Display Name"}),(0,o.jsx)(t.th,{children:"Info"})]})}),(0,o.jsx)(t.tbody,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"input_value"}),(0,o.jsx)(t.td,{children:"Text"}),(0,o.jsx)(t.td,{children:"The text to be passed as output."})]})})]}),(0,o.jsx)(t.p,{children:(0,o.jsx)(t.strong,{children:"Outputs"})}),(0,o.jsxs)(t.table,{children:[(0,o.jsx)(t.thead,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.th,{children:"Name"}),(0,o.jsx)(t.th,{children:"Display Name"}),(0,o.jsx)(t.th,{children:"Info"})]})}),(0,o.jsx)(t.tbody,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"text"}),(0,o.jsx)(t.td,{children:"Text"}),(0,o.jsx)(t.td,{children:"The resulting text message."})]})})]})]}),"\n",(0,o.jsx)(t.h2,{id:"chat-components-example-flow",children:"Chat components example flow"}),"\n",(0,o.jsxs)(t.ol,{children:["\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsxs)(t.p,{children:["To use the ",(0,o.jsx)(t.strong,{children:"Chat Input"})," and ",(0,o.jsx)(t.strong,{children:"Chat Output"})," components in a flow, connect them to components that accept or send the ",(0,o.jsx)(t.a,{href:"/data-types#message",children:"Message"})," type."]}),"\n",(0,o.jsxs)(t.p,{children:["For this example, connect a ",(0,o.jsx)(t.strong,{children:"Chat Input"})," component to an ",(0,o.jsx)(t.strong,{children:"OpenAI"})," model component's ",(0,o.jsx)(t.strong,{children:"Input"})," port, and then connect the ",(0,o.jsx)(t.strong,{children:"OpenAI"})," model component's ",(0,o.jsx)(t.strong,{children:"Message"})," port to the ",(0,o.jsx)(t.strong,{children:"Chat Output"})," component."]}),"\n"]}),"\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsxs)(t.p,{children:["In the ",(0,o.jsx)(t.strong,{children:"OpenAI"})," model component, in the ",(0,o.jsx)(t.strong,{children:"OpenAI API Key"})," field, add your ",(0,o.jsx)(t.strong,{children:"OpenAI API key"}),"."]}),"\n",(0,o.jsx)(t.p,{children:"The flow looks like this:"}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"Chat input and output components connected to an OpenAI model",src:n(6944).A+"",width:"3548",height:"1944"})}),"\n"]}),"\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsxs)(t.p,{children:["To send a message to your flow, open the ",(0,o.jsx)(t.strong,{children:"Playground"}),", and then enter a message.\nThe ",(0,o.jsx)(t.strong,{children:"OpenAI"})," model component responds.\nOptionally, in the ",(0,o.jsx)(t.strong,{children:"OpenAI"})," model component, enter a ",(0,o.jsx)(t.strong,{children:"System Message"})," to control the model's response."]}),"\n"]}),"\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsxs)(t.p,{children:["In the Langflow UI, click ",(0,o.jsx)(t.strong,{children:"Logs"}),".\nThe ",(0,o.jsx)(t.strong,{children:"Logs"})," pane opens.\nHere, you can inspect your component logs.\n",(0,o.jsx)(t.img,{alt:"Logs pane",src:n(77232).A+"",width:"4000",height:"2180"})]}),"\n"]}),"\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsxs)(t.p,{children:["Your first message was sent by the ",(0,o.jsx)(t.strong,{children:"Chat Input"})," component to the ",(0,o.jsx)(t.strong,{children:"OpenAI"})," model component.\nClick ",(0,o.jsx)(t.strong,{children:"Outputs"})," to view the sent message:"]}),"\n",(0,o.jsx)(a.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:' "messages": [',props:{}}]},{tokens:[{content:" {",props:{}}]},{tokens:[{content:' "message": "What\'s the recommended way to install Docker on Mac M1?",',props:{}}]},{tokens:[{content:' "sender": "User",',props:{}}]},{tokens:[{content:' "sender_name": "User",',props:{}}]},{tokens:[{content:' "session_id": "Session Apr 21, 17:37:04",',props:{}}]},{tokens:[{content:' "stream_url": null,',props:{}}]},{tokens:[{content:' "component_id": "ChatInput-4WKag",',props:{}}]},{tokens:[{content:' "files": [],',props:{}}]},{tokens:[{content:' "type": "text"',props:{}}]},{tokens:[{content:" }",props:{}}]},{tokens:[{content:" ],",props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsxs)(t.p,{children:["Your second message was sent by the ",(0,o.jsx)(t.strong,{children:"OpenAI"})," model component to the ",(0,o.jsx)(t.strong,{children:"Chat Output"})," component.\nThis is the raw text output of the model's response.\nThe ",(0,o.jsx)(t.strong,{children:"Chat Output"})," component accepts this text as input and presents it as a formatted message.\nClick ",(0,o.jsx)(t.strong,{children:"Outputs"})," to view the sent message:"]}),"\n",(0,o.jsx)(a.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:' "outputs":',props:{}}]},{tokens:[{content:' "text_output":',props:{}}]},{tokens:[{content:' "message": "To install Docker on a Mac with an M1 chip, you should use Docker Desktop for Mac, which is optimized for Apple Silicon. Here\'s a step-by-step guide to installing Docker on your M1 Mac:\\n\\n1.',props:{}}]},{tokens:[{content:" ...",props:{}}]},{tokens:[{content:' "type": "text"',props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,o.jsx)(t.admonition,{type:"tip",children:(0,o.jsxs)(t.p,{children:["Optionally, to view the outputs of each component in the flow, click ",(0,o.jsx)(i.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,o.jsx)(t.strong,{children:"Inspect output"}),"."]})}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(t.h3,{id:"send-chat-messages-with-the-api",children:"Send chat messages with the API"}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.strong,{children:"Chat Input"})," component is often the entry point for passing messages to the Langflow API.\nTo send the same example messages programmatically to your Langflow server, do the following:"]}),"\n",(0,o.jsxs)(t.ol,{children:["\n",(0,o.jsxs)(t.li,{children:["To get your Langflow endpoint, click ",(0,o.jsx)(t.strong,{children:"Share"}),", and then click ",(0,o.jsx)(t.strong,{children:"API access"}),"."]}),"\n",(0,o.jsxs)(t.li,{children:["Copy the command from the ",(0,o.jsx)(t.strong,{children:"cURL"})," tab, and then paste it in your terminal."]}),"\n"]}),"\n",(0,o.jsxs)(t.p,{children:["The values for ",(0,o.jsx)(t.code,{children:"LANGFLOW_SERVER_ADDRESS"}),", ",(0,o.jsx)(t.code,{children:"FLOW_ID"}),", and ",(0,o.jsx)(t.code,{children:"LANGFLOW_API_KEY"})," are automatically completed with values from your Langflow deployment.\nIf your values are different, you must replace them."]}),"\n",(0,o.jsx)(a.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl --request POST \\",props:{}}]},{tokens:[{content:' --url "http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID" \\',props:{}}]},{tokens:[{content:' --header "Content-Type: application/json" \\',props:{}}]},{tokens:[{content:' --header "x-api-key: LANGFLOW_API_KEY" \\',props:{}}]},{tokens:[{content:" --data '{",props:{}}]},{tokens:[{content:' "input_value": "What\'s the recommended way to install Docker on Mac M1?",',props:{}}]},{tokens:[{content:' "output_type": "chat",',props:{}}]},{tokens:[{content:' "input_type": "chat"',props:{}}]},{tokens:[{content:"}'",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,o.jsxs)(t.ol,{start:"3",children:["\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsxs)(t.p,{children:["Modify ",(0,o.jsx)(t.code,{children:"input_value"})," so it contains the question, ",(0,o.jsx)(t.code,{children:"What's the recommended way to install Docker on Mac M1?"}),"."]}),"\n",(0,o.jsxs)(t.p,{children:["Note the ",(0,o.jsx)(t.code,{children:"output_type"})," and ",(0,o.jsx)(t.code,{children:"input_type"})," parameters that are passed with the message. The ",(0,o.jsx)(t.code,{children:"chat"})," type provides additional configuration options, and the messages appear in the ",(0,o.jsx)(t.strong,{children:"Playground"}),". The ",(0,o.jsx)(t.code,{children:"text"})," type returns only text strings, and does not appear in the ",(0,o.jsx)(t.strong,{children:"Playground"}),"."]}),"\n"]}),"\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsxs)(t.p,{children:["Add a custom ",(0,o.jsx)(t.code,{children:"session_id"})," to the message's ",(0,o.jsx)(t.code,{children:"data"})," object."]}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(a.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl --request POST \\",props:{}}]},{tokens:[{content:' --url "http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID" \\',props:{}}]},{tokens:[{content:' --header "Content-Type: application/json" \\',props:{}}]},{tokens:[{content:' --header "x-api-key: LANGFLOW_API_KEY" \\',props:{}}]},{tokens:[{content:" --data '{",props:{}}]},{tokens:[{content:' "input_value": "Whats the recommended way to install Docker on Mac M1",',props:{}}]},{tokens:[{content:' "session_id": "docker-question-on-m1",',props:{}}]},{tokens:[{content:' "output_type": "chat",',props:{}}]},{tokens:[{content:' "input_type": "chat"',props:{}}]},{tokens:[{content:"}'",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,o.jsxs)(t.p,{children:["The custom ",(0,o.jsx)(t.code,{children:"session_id"})," value starts a new chat session between your client and the Langflow server, and can be useful in keeping conversations and AI context separate."]}),"\n",(0,o.jsxs)(t.ol,{start:"5",children:["\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsx)(t.p,{children:"Send the POST request.\nYour request is answered."}),"\n"]}),"\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsxs)(t.p,{children:["Navigate to the ",(0,o.jsx)(t.strong,{children:"Playground"}),".\nA new chat session called ",(0,o.jsx)(t.code,{children:"docker-question-on-m1"})," has appeared, using your unique ",(0,o.jsx)(t.code,{children:"session_id"}),"."]}),"\n"]}),"\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsxs)(t.p,{children:["To modify additional parameters with ",(0,o.jsx)(t.strong,{children:"Tweaks"})," for your ",(0,o.jsx)(t.strong,{children:"Chat Input"})," and ",(0,o.jsx)(t.strong,{children:"Chat Output"})," components, click ",(0,o.jsx)(t.strong,{children:"Share"}),", and then click ",(0,o.jsx)(t.strong,{children:"API access"}),"."]}),"\n"]}),"\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsxs)(t.p,{children:["Click ",(0,o.jsx)(t.strong,{children:"Input schema"})," to modify parameters in the component's ",(0,o.jsx)(t.code,{children:"data"})," object."]}),"\n",(0,o.jsxs)(t.p,{children:["For example, disabling storing messages from the ",(0,o.jsx)(t.strong,{children:"Chat Input"})," component adds a ",(0,o.jsx)(t.strong,{children:"Tweak"})," to your command:"]}),"\n",(0,o.jsx)(a.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl --request POST \\",props:{}}]},{tokens:[{content:' --url "http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID" \\',props:{}}]},{tokens:[{content:' --header "Content-Type: application/json" \\',props:{}}]},{tokens:[{content:' --header "x-api-key: LANGFLOW_API_KEY" \\',props:{}}]},{tokens:[{content:" --data '{",props:{}}]},{tokens:[{content:' "input_value": "Text to input to the flow",',props:{}}]},{tokens:[{content:' "output_type": "chat",',props:{}}]},{tokens:[{content:' "input_type": "chat",',props:{}}]},{tokens:[{content:' "tweaks": {',props:{}}]},{tokens:[{content:' "ChatInput-4WKag": {',props:{}}]},{tokens:[{content:' "should_store_message": false',props:{}}]},{tokens:[{content:" }",props:{}}]},{tokens:[{content:" }",props:{}}]},{tokens:[{content:"}'",props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsxs)(t.p,{children:["To confirm your command is using the tweak, navigate to the ",(0,o.jsx)(t.strong,{children:"Logs"})," pane, and then view the request from the ",(0,o.jsx)(t.strong,{children:"Chat Input"})," component.\nGiven the preceding example, the value for ",(0,o.jsx)(t.code,{children:"should_store_message"})," should be ",(0,o.jsx)(t.code,{children:"false"}),"."]}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(t.h2,{id:"see-also",children:"See also"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.a,{href:"/session-id",children:"Session ID"})}),"\n"]})]})}function u(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(j,{...e})}):j(e)}function g(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},17886:(e,t,n)=>{n.d(t,{A:()=>r});n(96540);var s=n(64058),o=n(74848);function r({name:e,...t}){const n=s[e];return n?(0,o.jsx)(n,{...t}):null}},77232:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/logs-cc30f076e63a5e443cf04855559703a3.png"}}]); \ No newline at end of file diff --git a/assets/js/7f7a8893.83a64abb.js b/assets/js/7f7a8893.83a64abb.js deleted file mode 100644 index ea95b60786..0000000000 --- a/assets/js/7f7a8893.83a64abb.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[188],{6944:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/component-chat-io-8d114bb5279770d2e3bc8250ec6396ed.png"},16878:(e,t,n)=>{n.r(t),n.d(t,{CH:()=>a,assets:()=>h,chCodeConfig:()=>p,contentTitle:()=>l,default:()=>u,frontMatter:()=>d,metadata:()=>s,toc:()=>x});const s=JSON.parse('{"id":"Components/components-io","title":"Inputs and outputs","description":"Input and output components define where data enters and exits your flow.","source":"@site/docs/Components/components-io.mdx","sourceDirName":"Components","slug":"/components-io","permalink":"/components-io","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Inputs and outputs","slug":"/components-io"},"sidebar":"docs","previous":{"title":"Helpers","permalink":"/components-helpers"},"next":{"title":"Logic","permalink":"/components-logic"}}');var o=n(74848),r=n(28453),c=n(24754),i=n(17886);const d={title:"Inputs and outputs",slug:"/components-io"},l="Input and output components in Langflow",h={},a={annotations:c.hk,Code:c.Cy},p={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},x=[{value:"Chat Input",id:"chat-input",level:2},{value:"Message method",id:"message-method",level:3},{value:"Text Input",id:"text-input",level:2},{value:"Chat Output",id:"chat-output",level:2},{value:"Text Output",id:"text-output",level:2},{value:"Chat components example flow",id:"chat-components-example-flow",level:2},{value:"Send chat messages with the API",id:"send-chat-messages-with-the-api",level:3},{value:"See also",id:"see-also",level:2}];function j(e){const t={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components},{Details:s}=t;return a||g("CH",!1),a.Code||g("CH.Code",!0),s||g("Details",!0),(0,o.jsxs)(o.Fragment,{children:[(0,o.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,o.jsx)(t.header,{children:(0,o.jsx)(t.h1,{id:"input-and-output-components-in-langflow",children:"Input and output components in Langflow"})}),"\n",(0,o.jsx)(t.p,{children:"Input and output components define where data enters and exits your flow."}),"\n",(0,o.jsxs)(t.p,{children:["Both components accept user input and return a ",(0,o.jsx)(t.code,{children:"Message"})," object, but serve different purposes."]}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.strong,{children:"Text Input"})," component accepts a text string input and returns a ",(0,o.jsx)(t.code,{children:"Message"})," object containing only the input text. The output does not appear in the ",(0,o.jsx)(t.strong,{children:"Playground"}),"."]}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.strong,{children:"Chat Input"})," component accepts multiple input types including text, files, and metadata, and returns a ",(0,o.jsx)(t.code,{children:"Message"})," object containing the text along with sender information, session ID, and file attachments."]}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.strong,{children:"Chat Input"})," component provides an interactive chat interface in the ",(0,o.jsx)(t.strong,{children:"Playground"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"chat-input",children:"Chat Input"}),"\n",(0,o.jsxs)(t.p,{children:["This component collects user input as ",(0,o.jsx)(t.code,{children:"Text"})," strings from the chat and wraps it in a ",(0,o.jsx)(t.a,{href:"/concepts-objects#message-object",children:"Message"})," object that includes the input text, sender information, session ID, file attachments, and styling properties."]}),"\n",(0,o.jsx)(t.p,{children:"It can optionally store the message in a chat history."}),"\n",(0,o.jsxs)(s,{children:[(0,o.jsx)("summary",{children:"Parameters"}),(0,o.jsx)(t.p,{children:(0,o.jsx)(t.strong,{children:"Inputs"})}),(0,o.jsxs)(t.table,{children:[(0,o.jsx)(t.thead,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.th,{children:"Name"}),(0,o.jsx)(t.th,{children:"Display Name"}),(0,o.jsx)(t.th,{children:"Info"})]})}),(0,o.jsxs)(t.tbody,{children:[(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"input_value"}),(0,o.jsx)(t.td,{children:"Text"}),(0,o.jsx)(t.td,{children:"The Message to be passed as input."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"should_store_message"}),(0,o.jsx)(t.td,{children:"Store Messages"}),(0,o.jsx)(t.td,{children:"Store the message in the history."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"sender"}),(0,o.jsx)(t.td,{children:"Sender Type"}),(0,o.jsx)(t.td,{children:"The type of sender."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"sender_name"}),(0,o.jsx)(t.td,{children:"Sender Name"}),(0,o.jsx)(t.td,{children:"The name of the sender."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"session_id"}),(0,o.jsx)(t.td,{children:"Session ID"}),(0,o.jsx)(t.td,{children:"The unique identifier for the chat session. If empty, the current session ID parameter is used."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"files"}),(0,o.jsx)(t.td,{children:"Files"}),(0,o.jsx)(t.td,{children:"The files to be sent with the message."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"background_color"}),(0,o.jsx)(t.td,{children:"Background Color"}),(0,o.jsx)(t.td,{children:"The background color of the icon."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"chat_icon"}),(0,o.jsx)(t.td,{children:"Icon"}),(0,o.jsx)(t.td,{children:"The icon of the message."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"text_color"}),(0,o.jsx)(t.td,{children:"Text Color"}),(0,o.jsx)(t.td,{children:"The text color of the name."})]})]})]}),(0,o.jsx)(t.p,{children:(0,o.jsx)(t.strong,{children:"Outputs"})}),(0,o.jsxs)(t.table,{children:[(0,o.jsx)(t.thead,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.th,{children:"Name"}),(0,o.jsx)(t.th,{children:"Display Name"}),(0,o.jsx)(t.th,{children:"Info"})]})}),(0,o.jsx)(t.tbody,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"message"}),(0,o.jsx)(t.td,{children:"Message"}),(0,o.jsx)(t.td,{children:"The resulting chat message object with all specified properties."})]})})]})]}),"\n",(0,o.jsx)(t.h3,{id:"message-method",children:"Message method"}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.code,{children:"ChatInput"})," class provides an asynchronous method to create and store a ",(0,o.jsx)(t.code,{children:"Message"})," object based on the input parameters.\nThe ",(0,o.jsx)(t.code,{children:"Message"})," object is created in the ",(0,o.jsx)(t.code,{children:"message_response"})," method of the ChatInput class using the ",(0,o.jsx)(t.code,{children:"Message.create()"})," factory method."]}),"\n",(0,o.jsx)(a.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"message ",props:{style:{color:"#C9D1D9"}}},{content:"= await",props:{style:{color:"#FF7B72"}}},{content:" Message.create(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" text",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".input_value,",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" sender",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".sender,",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" sender_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".sender_name,",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" session_id",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".session_id,",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" files",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".files,",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" properties",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "background_color"',props:{style:{color:"#A5D6FF"}}},{content:": background_color,",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text_color"',props:{style:{color:"#A5D6FF"}}},{content:": text_color,",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "icon"',props:{style:{color:"#A5D6FF"}}},{content:": icon,",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:")",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,o.jsx)(t.h2,{id:"text-input",children:"Text Input"}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.strong,{children:"Text Input"})," component accepts a text string input and returns a ",(0,o.jsx)(t.code,{children:"Message"})," object containing only the input text."]}),"\n",(0,o.jsxs)(t.p,{children:["The output does not appear in the ",(0,o.jsx)(t.strong,{children:"Playground"}),"."]}),"\n",(0,o.jsxs)(s,{children:[(0,o.jsx)("summary",{children:"Parameters"}),(0,o.jsx)(t.p,{children:(0,o.jsx)(t.strong,{children:"Inputs"})}),(0,o.jsxs)(t.table,{children:[(0,o.jsx)(t.thead,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.th,{children:"Name"}),(0,o.jsx)(t.th,{children:"Display Name"}),(0,o.jsx)(t.th,{children:"Info"})]})}),(0,o.jsx)(t.tbody,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"input_value"}),(0,o.jsx)(t.td,{children:"Text"}),(0,o.jsx)(t.td,{children:"The text/content to be passed as output."})]})})]}),(0,o.jsx)(t.p,{children:(0,o.jsx)(t.strong,{children:"Outputs"})}),(0,o.jsxs)(t.table,{children:[(0,o.jsx)(t.thead,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.th,{children:"Name"}),(0,o.jsx)(t.th,{children:"Display Name"}),(0,o.jsx)(t.th,{children:"Info"})]})}),(0,o.jsx)(t.tbody,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"text"}),(0,o.jsx)(t.td,{children:"Text"}),(0,o.jsx)(t.td,{children:"The resulting text message."})]})})]})]}),"\n",(0,o.jsx)(t.h2,{id:"chat-output",children:"Chat Output"}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.strong,{children:"Chat Output"})," component creates a ",(0,o.jsx)(t.a,{href:"/concepts-objects#message-object",children:"Message"})," object that includes the input text, sender information, session ID, and styling properties."]}),"\n",(0,o.jsx)(t.p,{children:"The component accepts the following input types."}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.a,{href:"/concepts-objects#data-object",children:"Data"})}),"\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.a,{href:"/concepts-objects#dataframe-object",children:"DataFrame"})}),"\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.a,{href:"/concepts-objects#message-object",children:"Message"})}),"\n"]}),"\n",(0,o.jsxs)(s,{children:[(0,o.jsx)("summary",{children:"Parameters"}),(0,o.jsx)(t.p,{children:(0,o.jsx)(t.strong,{children:"Inputs"})}),(0,o.jsxs)(t.table,{children:[(0,o.jsx)(t.thead,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.th,{children:"Name"}),(0,o.jsx)(t.th,{children:"Display Name"}),(0,o.jsx)(t.th,{children:"Info"})]})}),(0,o.jsxs)(t.tbody,{children:[(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"input_value"}),(0,o.jsx)(t.td,{children:"Text"}),(0,o.jsx)(t.td,{children:"The message to be passed as output."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"should_store_message"}),(0,o.jsx)(t.td,{children:"Store Messages"}),(0,o.jsx)(t.td,{children:"The flag to store the message in the history."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"sender"}),(0,o.jsx)(t.td,{children:"Sender Type"}),(0,o.jsx)(t.td,{children:"The type of sender."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"sender_name"}),(0,o.jsx)(t.td,{children:"Sender Name"}),(0,o.jsx)(t.td,{children:"The name of the sender."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"session_id"}),(0,o.jsx)(t.td,{children:"Session ID"}),(0,o.jsx)(t.td,{children:"The unique identifier for the chat session. If empty, the current session ID parameter is used."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"data_template"}),(0,o.jsx)(t.td,{children:"Data Template"}),(0,o.jsx)(t.td,{children:"The template to convert Data to Text. If the option is left empty, it is dynamically set to the Data's text key."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"background_color"}),(0,o.jsx)(t.td,{children:"Background Color"}),(0,o.jsx)(t.td,{children:"The background color of the icon."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"chat_icon"}),(0,o.jsx)(t.td,{children:"Icon"}),(0,o.jsx)(t.td,{children:"The icon of the message."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"text_color"}),(0,o.jsx)(t.td,{children:"Text Color"}),(0,o.jsx)(t.td,{children:"The text color of the name."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"clean_data"}),(0,o.jsx)(t.td,{children:"Basic Clean Data"}),(0,o.jsxs)(t.td,{children:["When enabled, ",(0,o.jsx)(t.code,{children:"DataFrame"})," inputs are cleaned when converted to text. Cleaning removes empty rows, empty lines in cells, and multiple newlines."]})]})]})]}),(0,o.jsx)(t.p,{children:(0,o.jsx)(t.strong,{children:"Outputs"})}),(0,o.jsxs)(t.table,{children:[(0,o.jsx)(t.thead,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.th,{children:"Name"}),(0,o.jsx)(t.th,{children:"Display Name"}),(0,o.jsx)(t.th,{children:"Info"})]})}),(0,o.jsx)(t.tbody,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"message"}),(0,o.jsx)(t.td,{children:"Message"}),(0,o.jsx)(t.td,{children:"The resulting chat message object with all specified properties."})]})})]})]}),"\n",(0,o.jsx)(t.h2,{id:"text-output",children:"Text Output"}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.strong,{children:"Text Output"})," takes a single input of text and returns a ",(0,o.jsx)(t.a,{href:"/concepts-objects#message-object",children:"Message"})," object containing that text."]}),"\n",(0,o.jsxs)(t.p,{children:["The output does not appear in the ",(0,o.jsx)(t.strong,{children:"Playground"}),"."]}),"\n",(0,o.jsxs)(s,{children:[(0,o.jsx)("summary",{children:"Parameters"}),(0,o.jsx)(t.p,{children:(0,o.jsx)(t.strong,{children:"Inputs"})}),(0,o.jsxs)(t.table,{children:[(0,o.jsx)(t.thead,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.th,{children:"Name"}),(0,o.jsx)(t.th,{children:"Display Name"}),(0,o.jsx)(t.th,{children:"Info"})]})}),(0,o.jsx)(t.tbody,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"input_value"}),(0,o.jsx)(t.td,{children:"Text"}),(0,o.jsx)(t.td,{children:"The text to be passed as output."})]})})]}),(0,o.jsx)(t.p,{children:(0,o.jsx)(t.strong,{children:"Outputs"})}),(0,o.jsxs)(t.table,{children:[(0,o.jsx)(t.thead,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.th,{children:"Name"}),(0,o.jsx)(t.th,{children:"Display Name"}),(0,o.jsx)(t.th,{children:"Info"})]})}),(0,o.jsx)(t.tbody,{children:(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"text"}),(0,o.jsx)(t.td,{children:"Text"}),(0,o.jsx)(t.td,{children:"The resulting text message."})]})})]})]}),"\n",(0,o.jsx)(t.h2,{id:"chat-components-example-flow",children:"Chat components example flow"}),"\n",(0,o.jsxs)(t.ol,{children:["\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsxs)(t.p,{children:["To use the ",(0,o.jsx)(t.strong,{children:"Chat Input"})," and ",(0,o.jsx)(t.strong,{children:"Chat Output"})," components in a flow, connect them to components that accept or send the ",(0,o.jsx)(t.a,{href:"/concepts-objects#message-object",children:"Message"})," type."]}),"\n",(0,o.jsxs)(t.p,{children:["For this example, connect a ",(0,o.jsx)(t.strong,{children:"Chat Input"})," component to an ",(0,o.jsx)(t.strong,{children:"OpenAI"})," model component's ",(0,o.jsx)(t.strong,{children:"Input"})," port, and then connect the ",(0,o.jsx)(t.strong,{children:"OpenAI"})," model component's ",(0,o.jsx)(t.strong,{children:"Message"})," port to the ",(0,o.jsx)(t.strong,{children:"Chat Output"})," component."]}),"\n"]}),"\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsxs)(t.p,{children:["In the ",(0,o.jsx)(t.strong,{children:"OpenAI"})," model component, in the ",(0,o.jsx)(t.strong,{children:"OpenAI API Key"})," field, add your ",(0,o.jsx)(t.strong,{children:"OpenAI API key"}),"."]}),"\n",(0,o.jsx)(t.p,{children:"The flow looks like this:"}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"Chat input and output components connected to an OpenAI model",src:n(6944).A+"",width:"3548",height:"1944"})}),"\n"]}),"\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsxs)(t.p,{children:["To send a message to your flow, open the ",(0,o.jsx)(t.strong,{children:"Playground"}),", and then enter a message.\nThe ",(0,o.jsx)(t.strong,{children:"OpenAI"})," model component responds.\nOptionally, in the ",(0,o.jsx)(t.strong,{children:"OpenAI"})," model component, enter a ",(0,o.jsx)(t.strong,{children:"System Message"})," to control the model's response."]}),"\n"]}),"\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsxs)(t.p,{children:["In the Langflow UI, click ",(0,o.jsx)(t.strong,{children:"Logs"}),".\nThe ",(0,o.jsx)(t.strong,{children:"Logs"})," pane opens.\nHere, you can inspect your component logs.\n",(0,o.jsx)(t.img,{alt:"Logs pane",src:n(77232).A+"",width:"4000",height:"2180"})]}),"\n"]}),"\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsxs)(t.p,{children:["Your first message was sent by the ",(0,o.jsx)(t.strong,{children:"Chat Input"})," component to the ",(0,o.jsx)(t.strong,{children:"OpenAI"})," model component.\nClick ",(0,o.jsx)(t.strong,{children:"Outputs"})," to view the sent message:"]}),"\n",(0,o.jsx)(a.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:' "messages": [',props:{}}]},{tokens:[{content:" {",props:{}}]},{tokens:[{content:' "message": "What\'s the recommended way to install Docker on Mac M1?",',props:{}}]},{tokens:[{content:' "sender": "User",',props:{}}]},{tokens:[{content:' "sender_name": "User",',props:{}}]},{tokens:[{content:' "session_id": "Session Apr 21, 17:37:04",',props:{}}]},{tokens:[{content:' "stream_url": null,',props:{}}]},{tokens:[{content:' "component_id": "ChatInput-4WKag",',props:{}}]},{tokens:[{content:' "files": [],',props:{}}]},{tokens:[{content:' "type": "text"',props:{}}]},{tokens:[{content:" }",props:{}}]},{tokens:[{content:" ],",props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsxs)(t.p,{children:["Your second message was sent by the ",(0,o.jsx)(t.strong,{children:"OpenAI"})," model component to the ",(0,o.jsx)(t.strong,{children:"Chat Output"})," component.\nThis is the raw text output of the model's response.\nThe ",(0,o.jsx)(t.strong,{children:"Chat Output"})," component accepts this text as input and presents it as a formatted message.\nClick ",(0,o.jsx)(t.strong,{children:"Outputs"})," to view the sent message:"]}),"\n",(0,o.jsx)(a.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:' "outputs":',props:{}}]},{tokens:[{content:' "text_output":',props:{}}]},{tokens:[{content:' "message": "To install Docker on a Mac with an M1 chip, you should use Docker Desktop for Mac, which is optimized for Apple Silicon. Here\'s a step-by-step guide to installing Docker on your M1 Mac:\\n\\n1.',props:{}}]},{tokens:[{content:" ...",props:{}}]},{tokens:[{content:' "type": "text"',props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,o.jsx)(t.admonition,{type:"tip",children:(0,o.jsxs)(t.p,{children:["Optionally, to view the outputs of each component in the flow, click ",(0,o.jsx)(i.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,o.jsx)(t.strong,{children:"Inspect output"}),"."]})}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(t.h3,{id:"send-chat-messages-with-the-api",children:"Send chat messages with the API"}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.strong,{children:"Chat Input"})," component is often the entry point for passing messages to the Langflow API.\nTo send the same example messages programmatically to your Langflow server, do the following:"]}),"\n",(0,o.jsxs)(t.ol,{children:["\n",(0,o.jsxs)(t.li,{children:["To get your Langflow endpoint, click ",(0,o.jsx)(t.strong,{children:"Share"}),", and then click ",(0,o.jsx)(t.strong,{children:"API access"}),"."]}),"\n",(0,o.jsxs)(t.li,{children:["Copy the command from the ",(0,o.jsx)(t.strong,{children:"cURL"})," tab, and then paste it in your terminal."]}),"\n"]}),"\n",(0,o.jsxs)(t.p,{children:["The values for ",(0,o.jsx)(t.code,{children:"LANGFLOW_SERVER_ADDRESS"}),", ",(0,o.jsx)(t.code,{children:"FLOW_ID"}),", and ",(0,o.jsx)(t.code,{children:"LANGFLOW_API_KEY"})," are automatically completed with values from your Langflow deployment.\nIf your values are different, you must replace them."]}),"\n",(0,o.jsx)(a.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl --request POST \\",props:{}}]},{tokens:[{content:' --url "http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID" \\',props:{}}]},{tokens:[{content:' --header "Content-Type: application/json" \\',props:{}}]},{tokens:[{content:' --header "x-api-key: LANGFLOW_API_KEY" \\',props:{}}]},{tokens:[{content:" --data '{",props:{}}]},{tokens:[{content:' "input_value": "What\'s the recommended way to install Docker on Mac M1?",',props:{}}]},{tokens:[{content:' "output_type": "chat",',props:{}}]},{tokens:[{content:' "input_type": "chat"',props:{}}]},{tokens:[{content:"}'",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,o.jsxs)(t.ol,{start:"3",children:["\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsxs)(t.p,{children:["Modify ",(0,o.jsx)(t.code,{children:"input_value"})," so it contains the question, ",(0,o.jsx)(t.code,{children:"What's the recommended way to install Docker on Mac M1?"}),"."]}),"\n",(0,o.jsxs)(t.p,{children:["Note the ",(0,o.jsx)(t.code,{children:"output_type"})," and ",(0,o.jsx)(t.code,{children:"input_type"})," parameters that are passed with the message. The ",(0,o.jsx)(t.code,{children:"chat"})," type provides additional configuration options, and the messages appear in the ",(0,o.jsx)(t.strong,{children:"Playground"}),". The ",(0,o.jsx)(t.code,{children:"text"})," type returns only text strings, and does not appear in the ",(0,o.jsx)(t.strong,{children:"Playground"}),"."]}),"\n"]}),"\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsxs)(t.p,{children:["Add a custom ",(0,o.jsx)(t.code,{children:"session_id"})," to the message's ",(0,o.jsx)(t.code,{children:"data"})," object."]}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(a.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl --request POST \\",props:{}}]},{tokens:[{content:' --url "http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID" \\',props:{}}]},{tokens:[{content:' --header "Content-Type: application/json" \\',props:{}}]},{tokens:[{content:' --header "x-api-key: LANGFLOW_API_KEY" \\',props:{}}]},{tokens:[{content:" --data '{",props:{}}]},{tokens:[{content:' "input_value": "Whats the recommended way to install Docker on Mac M1",',props:{}}]},{tokens:[{content:' "session_id": "docker-question-on-m1",',props:{}}]},{tokens:[{content:' "output_type": "chat",',props:{}}]},{tokens:[{content:' "input_type": "chat"',props:{}}]},{tokens:[{content:"}'",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,o.jsxs)(t.p,{children:["The custom ",(0,o.jsx)(t.code,{children:"session_id"})," value starts a new chat session between your client and the Langflow server, and can be useful in keeping conversations and AI context separate."]}),"\n",(0,o.jsxs)(t.ol,{start:"5",children:["\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsx)(t.p,{children:"Send the POST request.\nYour request is answered."}),"\n"]}),"\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsxs)(t.p,{children:["Navigate to the ",(0,o.jsx)(t.strong,{children:"Playground"}),".\nA new chat session called ",(0,o.jsx)(t.code,{children:"docker-question-on-m1"})," has appeared, using your unique ",(0,o.jsx)(t.code,{children:"session_id"}),"."]}),"\n"]}),"\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsxs)(t.p,{children:["To modify additional parameters with ",(0,o.jsx)(t.strong,{children:"Tweaks"})," for your ",(0,o.jsx)(t.strong,{children:"Chat Input"})," and ",(0,o.jsx)(t.strong,{children:"Chat Output"})," components, click ",(0,o.jsx)(t.strong,{children:"Share"}),", and then click ",(0,o.jsx)(t.strong,{children:"API access"}),"."]}),"\n"]}),"\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsxs)(t.p,{children:["Click ",(0,o.jsx)(t.strong,{children:"Input schema"})," to modify parameters in the component's ",(0,o.jsx)(t.code,{children:"data"})," object."]}),"\n",(0,o.jsxs)(t.p,{children:["For example, disabling storing messages from the ",(0,o.jsx)(t.strong,{children:"Chat Input"})," component adds a ",(0,o.jsx)(t.strong,{children:"Tweak"})," to your command:"]}),"\n",(0,o.jsx)(a.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl --request POST \\",props:{}}]},{tokens:[{content:' --url "http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID" \\',props:{}}]},{tokens:[{content:' --header "Content-Type: application/json" \\',props:{}}]},{tokens:[{content:' --header "x-api-key: LANGFLOW_API_KEY" \\',props:{}}]},{tokens:[{content:" --data '{",props:{}}]},{tokens:[{content:' "input_value": "Text to input to the flow",',props:{}}]},{tokens:[{content:' "output_type": "chat",',props:{}}]},{tokens:[{content:' "input_type": "chat",',props:{}}]},{tokens:[{content:' "tweaks": {',props:{}}]},{tokens:[{content:' "ChatInput-4WKag": {',props:{}}]},{tokens:[{content:' "should_store_message": false',props:{}}]},{tokens:[{content:" }",props:{}}]},{tokens:[{content:" }",props:{}}]},{tokens:[{content:"}'",props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n",(0,o.jsxs)(t.li,{children:["\n",(0,o.jsxs)(t.p,{children:["To confirm your command is using the tweak, navigate to the ",(0,o.jsx)(t.strong,{children:"Logs"})," pane, and then view the request from the ",(0,o.jsx)(t.strong,{children:"Chat Input"})," component.\nGiven the preceding example, the value for ",(0,o.jsx)(t.code,{children:"should_store_message"})," should be ",(0,o.jsx)(t.code,{children:"false"}),"."]}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(t.h2,{id:"see-also",children:"See also"}),"\n",(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsx)(t.li,{children:(0,o.jsx)(t.a,{href:"/session-id",children:"Session ID"})}),"\n"]})]})}function u(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(j,{...e})}):j(e)}function g(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},17886:(e,t,n)=>{n.d(t,{A:()=>r});n(96540);var s=n(64058),o=n(74848);function r({name:e,...t}){const n=s[e];return n?(0,o.jsx)(n,{...t}):null}},77232:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/logs-cc30f076e63a5e443cf04855559703a3.png"}}]); \ No newline at end of file diff --git a/assets/js/8bd4a540.21b739ff.js b/assets/js/8bd4a540.21b739ff.js new file mode 100644 index 0000000000..4b7e5d585f --- /dev/null +++ b/assets/js/8bd4a540.21b739ff.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[2307],{7685:(e,r,t)=>{t.d(r,{A:()=>s});const s=t.p+"assets/images/vector-store-document-ingestion-6157311fb4d16e7f944d55254f0cc0e2.png"},17343:(e,r,t)=>{t.r(r),t.d(r,{CH:()=>o,assets:()=>a,chCodeConfig:()=>x,contentTitle:()=>l,default:()=>u,frontMatter:()=>h,metadata:()=>s,toc:()=>j});const s=JSON.parse('{"id":"Components/components-vector-stores","title":"Vector stores","description":"Vector databases store vector data, which backs AI workloads like chatbots and Retrieval Augmented Generation.","source":"@site/docs/Components/components-vector-stores.mdx","sourceDirName":"Components","slug":"/components-vector-stores","permalink":"/components-vector-stores","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Vector stores","slug":"/components-vector-stores"},"sidebar":"docs","previous":{"title":"Tools","permalink":"/components-tools"},"next":{"title":"Use Langflow Agents","permalink":"/agents"}}');var n=t(74848),d=t(28453),i=t(24754),c=t(17886);const h={title:"Vector stores",slug:"/components-vector-stores"},l="Vector store components in Langflow",a={},o={annotations:i.hk,Code:i.Cy},x={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},j=[{value:"Use a vector store component in a flow",id:"use-a-vector-store-component-in-a-flow",level:2},{value:"Astra DB Vector Store",id:"astra-db-vector-store",level:2},{value:"Generate embeddings",id:"generate-embeddings",level:3},{value:"Hybrid search",id:"hybrid-search",level:3},{value:"AstraDB Graph vector store",id:"astradb-graph-vector-store",level:2},{value:"Cassandra",id:"cassandra",level:2},{value:"Cassandra Graph Vector Store",id:"cassandra-graph-vector-store",level:2},{value:"Chroma DB",id:"chroma-db",level:2},{value:"Clickhouse",id:"clickhouse",level:2},{value:"Couchbase",id:"couchbase",level:2},{value:"Local DB",id:"local-db",level:2},{value:"Elasticsearch",id:"elasticsearch",level:2},{value:"FAISS",id:"faiss",level:2},{value:"Graph RAG",id:"graph-rag",level:2},{value:"Hyper-Converged Database (HCD)",id:"hyper-converged-database-hcd",level:2},{value:"Milvus",id:"milvus",level:2},{value:"MongoDB Atlas",id:"mongodb-atlas",level:2},{value:"Opensearch",id:"opensearch",level:2},{value:"PGVector",id:"pgvector",level:2},{value:"Pinecone",id:"pinecone",level:2},{value:"Qdrant",id:"qdrant",level:2},{value:"Redis",id:"redis",level:2},{value:"Supabase",id:"supabase",level:2},{value:"Upstash",id:"upstash",level:2},{value:"Vectara",id:"vectara",level:2},{value:"Vectara Search",id:"vectara-search",level:2},{value:"Weaviate",id:"weaviate",level:2},{value:"Weaviate Search",id:"weaviate-search",level:2}];function m(e){const r={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,d.R)(),...e.components},{Details:s}=r;return o||p("CH",!1),o.Code||p("CH.Code",!0),s||p("Details",!0),(0,n.jsxs)(n.Fragment,{children:[(0,n.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,n.jsx)(r.header,{children:(0,n.jsx)(r.h1,{id:"vector-store-components-in-langflow",children:"Vector store components in Langflow"})}),"\n",(0,n.jsx)(r.p,{children:"Vector databases store vector data, which backs AI workloads like chatbots and Retrieval Augmented Generation."}),"\n",(0,n.jsx)(r.p,{children:"Vector database components establish connections to existing vector databases or create in-memory vector stores for storing and retrieving vector data."}),"\n",(0,n.jsxs)(r.p,{children:["Vector database components are distinct from ",(0,n.jsx)(r.a,{href:"/components-memories",children:"memory components"}),", which are built specifically for storing and retrieving chat messages from internal Langflow memory or external databases. For more information, see ",(0,n.jsx)(r.a,{href:"/memory",children:"Memory management options"}),"."]}),"\n",(0,n.jsx)(r.h2,{id:"use-a-vector-store-component-in-a-flow",children:"Use a vector store component in a flow"}),"\n",(0,n.jsxs)(r.p,{children:["This example uses the ",(0,n.jsx)(r.strong,{children:"Chroma DB"})," vector store component. Your vector store component's parameters and authentication may be different, but the document ingestion workflow is the same. A document is loaded from a local machine and chunked. The vector store component generates embeddings with the connected ",(0,n.jsx)(r.a,{href:"/components-models",children:"model"})," component, and stores them in the connected vector database."]}),"\n",(0,n.jsx)(r.p,{children:"This vector data can then be retrieved for workloads like Retrieval Augmented Generation."}),"\n",(0,n.jsx)(r.p,{children:(0,n.jsx)(r.img,{alt:"Embedding data into a vector store",src:t(7685).A+"",width:"4000",height:"2512"})}),"\n",(0,n.jsxs)(r.p,{children:["The user's chat input is embedded and compared to the vectors embedded during document ingestion for a similarity search.\nThe results are output from the vector database component as a ",(0,n.jsx)(r.a,{href:"/data-types#data",children:"Data"})," object and parsed into text.\nThis text fills the ",(0,n.jsx)(r.code,{children:"{context}"})," variable in the ",(0,n.jsx)(r.strong,{children:"Prompt"})," component, which informs the ",(0,n.jsx)(r.strong,{children:"Open AI model"})," component's responses."]}),"\n",(0,n.jsx)(r.p,{children:(0,n.jsx)(r.img,{alt:"Retrieval from a vector store",src:t(67719).A+"",width:"4000",height:"1324"})}),"\n",(0,n.jsx)(r.h2,{id:"astra-db-vector-store",children:"Astra DB Vector Store"}),"\n",(0,n.jsx)(r.p,{children:"This component implements a Vector Store using Astra DB with search capabilities."}),"\n",(0,n.jsxs)(r.p,{children:["For more information, see the ",(0,n.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/databases/create-database.html",children:"DataStax documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Display Name"}),(0,n.jsx)(r.th,{children:"Info"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"token"}),(0,n.jsx)(r.td,{children:"Astra DB Application Token"}),(0,n.jsx)(r.td,{children:"The authentication token for accessing Astra DB."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"environment"}),(0,n.jsx)(r.td,{children:"Environment"}),(0,n.jsxs)(r.td,{children:["The environment for the Astra DB API Endpoint. For example, ",(0,n.jsx)(r.code,{children:"dev"})," or ",(0,n.jsx)(r.code,{children:"prod"}),"."]})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"database_name"}),(0,n.jsx)(r.td,{children:"Database"}),(0,n.jsx)(r.td,{children:"The database name for the Astra DB instance."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"api_endpoint"}),(0,n.jsx)(r.td,{children:"Astra DB API Endpoint"}),(0,n.jsx)(r.td,{children:"The API endpoint for the Astra DB instance. This supersedes the database selection."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"collection_name"}),(0,n.jsx)(r.td,{children:"Collection"}),(0,n.jsx)(r.td,{children:"The name of the collection within Astra DB where the vectors are stored."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"keyspace"}),(0,n.jsx)(r.td,{children:"Keyspace"}),(0,n.jsx)(r.td,{children:"An optional keyspace within Astra DB to use for the collection."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding_choice"}),(0,n.jsx)(r.td,{children:"Embedding Model or Astra Vectorize"}),(0,n.jsx)(r.td,{children:"Choose an embedding model or use Astra vectorize."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding_model"}),(0,n.jsx)(r.td,{children:"Embedding Model"}),(0,n.jsx)(r.td,{children:"Specify the embedding model. Not required for Astra vectorize collections."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Number of Search Results"}),(0,n.jsxs)(r.td,{children:["The number of search results to return. Default:",(0,n.jsx)(r.code,{children:"4"}),"."]})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_type"}),(0,n.jsx)(r.td,{children:"Search Type"}),(0,n.jsxs)(r.td,{children:["The search type to use. The options are ",(0,n.jsx)(r.code,{children:"Similarity"}),", ",(0,n.jsx)(r.code,{children:"Similarity with score threshold"}),", and ",(0,n.jsx)(r.code,{children:"MMR (Max Marginal Relevance)"}),"."]})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_score_threshold"}),(0,n.jsx)(r.td,{children:"Search Score Threshold"}),(0,n.jsxs)(r.td,{children:["The minimum similarity score threshold for search results when using the ",(0,n.jsx)(r.code,{children:"Similarity with score threshold"})," option."]})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"advanced_search_filter"}),(0,n.jsx)(r.td,{children:"Search Metadata Filter"}),(0,n.jsx)(r.td,{children:"An optional dictionary of filters to apply to the search query."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"autodetect_collection"}),(0,n.jsx)(r.td,{children:"Autodetect Collection"}),(0,n.jsx)(r.td,{children:"A boolean flag to determine whether to autodetect the collection."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"content_field"}),(0,n.jsx)(r.td,{children:"Content Field"}),(0,n.jsx)(r.td,{children:"A field to use as the text content field for the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"deletion_field"}),(0,n.jsx)(r.td,{children:"Deletion Based On Field"}),(0,n.jsx)(r.td,{children:"When provided, documents in the target collection with metadata field values matching the input metadata field value are deleted before new data is loaded."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ignore_invalid_documents"}),(0,n.jsx)(r.td,{children:"Ignore Invalid Documents"}),(0,n.jsx)(r.td,{children:"A boolean flag to determine whether to ignore invalid documents at runtime."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"astradb_vectorstore_kwargs"}),(0,n.jsx)(r.td,{children:"AstraDBVectorStore Parameters"}),(0,n.jsx)(r.td,{children:"An optional dictionary of additional parameters for the AstraDBVectorStore."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Display Name"}),(0,n.jsx)(r.th,{children:"Info"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"Vector Store"}),(0,n.jsx)(r.td,{children:"The Astra DB vector store instance configured with the specified parameters."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"Search Results"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/data-types#data",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h3,{id:"generate-embeddings",children:"Generate embeddings"}),"\n",(0,n.jsxs)(r.p,{children:["The ",(0,n.jsx)(r.strong,{children:"Astra DB Vector Store"})," component offers two methods for generating embeddings."]}),"\n",(0,n.jsxs)(r.ol,{children:["\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.strong,{children:"Embedding Model"}),": Use your own embedding model by connecting an ",(0,n.jsx)(r.a,{href:"/components-embedding-models",children:"Embeddings"})," component in Langflow."]}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.strong,{children:"Astra Vectorize"}),": Use Astra DB's built-in embedding generation service. When creating a new collection, choose the embeddings provider and models, including NVIDIA's ",(0,n.jsx)(r.code,{children:"NV-Embed-QA"})," model hosted by Datastax."]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(r.admonition,{type:"important",children:(0,n.jsx)(r.p,{children:"The embedding model selection is made when creating a new collection and cannot be changed later."})}),"\n",(0,n.jsxs)(r.p,{children:["For an example of using the ",(0,n.jsx)(r.strong,{children:"Astra DB Vector Store"})," component with an embedding model, see the ",(0,n.jsx)(r.a,{href:"/vector-store-rag",children:"Vector Store RAG starter project"}),"."]}),"\n",(0,n.jsxs)(r.p,{children:["For more information, see the ",(0,n.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/databases/embedding-generation.html",children:"Astra DB Serverless documentation"}),"."]}),"\n",(0,n.jsx)(r.h3,{id:"hybrid-search",children:"Hybrid search"}),"\n",(0,n.jsxs)(r.p,{children:["The ",(0,n.jsx)(r.strong,{children:"Astra DB"})," component includes ",(0,n.jsx)(r.strong,{children:"hybrid search"}),", which is enabled by default."]}),"\n",(0,n.jsxs)(r.p,{children:["The component fields related to hybrid search are ",(0,n.jsx)(r.strong,{children:"Search Query"}),", ",(0,n.jsx)(r.strong,{children:"Lexical Terms"}),", and ",(0,n.jsx)(r.strong,{children:"Reranker"}),"."]}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:[(0,n.jsx)(r.strong,{children:"Search Query"})," finds results by vector similarity."]}),"\n",(0,n.jsxs)(r.li,{children:[(0,n.jsx)(r.strong,{children:"Lexical Terms"})," is a comma-separated string of keywords, like ",(0,n.jsx)(r.code,{children:"features, data, attributes, characteristics"}),"."]}),"\n",(0,n.jsxs)(r.li,{children:[(0,n.jsx)(r.strong,{children:"Reranker"})," is the re-ranker model used in the hybrid search.\nThe re-ranker model is ",(0,n.jsx)(r.code,{children:"nvidia/llama-3.2-nv.reranker"}),"."]}),"\n"]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/databases/hybrid-search.html",children:"Hybrid search"})," performs a vector similarity search and a lexical search, compares the results of both searches, and then returns the most relevant results overall."]}),"\n",(0,n.jsx)(r.admonition,{type:"important",children:(0,n.jsxs)(r.p,{children:["To use hybrid search, your collection must be created with vector, lexical, and rerank capabilities enabled. These capabilities are enabled by default when you create a collection in a database in the AWS us-east-2 region.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/api-reference/collection-methods/create-collection.html#example-hybrid",children:"DataStax documentation"}),"."]})}),"\n",(0,n.jsxs)(r.p,{children:["To use ",(0,n.jsx)(r.strong,{children:"Hybrid search"})," in the ",(0,n.jsx)(r.strong,{children:"Astra DB"})," component, do the following:"]}),"\n",(0,n.jsxs)(r.ol,{children:["\n",(0,n.jsxs)(r.li,{children:["Click ",(0,n.jsx)(r.strong,{children:"New Flow"})," > ",(0,n.jsx)(r.strong,{children:"RAG"})," > ",(0,n.jsx)(r.strong,{children:"Hybrid Search RAG"}),"."]}),"\n",(0,n.jsxs)(r.li,{children:["In the ",(0,n.jsx)(r.strong,{children:"OpenAI"})," model component, add your ",(0,n.jsx)(r.strong,{children:"OpenAI API key"}),"."]}),"\n",(0,n.jsxs)(r.li,{children:["In the ",(0,n.jsx)(r.strong,{children:"Astra DB"})," vector store component, add your ",(0,n.jsx)(r.strong,{children:"Astra DB Application Token"}),"."]}),"\n",(0,n.jsxs)(r.li,{children:["In the ",(0,n.jsx)(r.strong,{children:"Database"})," field, select your database."]}),"\n",(0,n.jsxs)(r.li,{children:["In the ",(0,n.jsx)(r.strong,{children:"Collection"})," field, select or create a collection with hybrid search capabilities enabled."]}),"\n",(0,n.jsxs)(r.li,{children:["In the ",(0,n.jsx)(r.strong,{children:"Playground"}),", enter a question about your data, such as ",(0,n.jsx)(r.code,{children:"What are the features of my data?"}),"\nYour query is sent to two components: an ",(0,n.jsx)(r.strong,{children:"OpenAI"})," model component and the ",(0,n.jsx)(r.strong,{children:"Astra DB"})," vector database component.\nThe ",(0,n.jsx)(r.strong,{children:"OpenAI"})," component contains a prompt for creating the lexical query from your input:"]}),"\n"]}),"\n",(0,n.jsx)(o.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"You are a database query planner that takes a user's requests, and then converts to a search against the subject matter in question.",props:{}}]},{tokens:[{content:"You should convert the query into:",props:{}}]},{tokens:[{content:"1. A list of keywords to use against a Lucene text analyzer index, no more than 4. Strictly unigrams.",props:{}}]},{tokens:[{content:"2. A question to use as the basis for a QA embedding engine.",props:{}}]},{tokens:[{content:"Avoid common keywords associated with the user's subject matter.",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,n.jsxs)(r.ol,{start:"7",children:["\n",(0,n.jsxs)(r.li,{children:["To view the keywords and questions the ",(0,n.jsx)(r.strong,{children:"OpenAI"})," component generates from your collection, in the ",(0,n.jsx)(r.strong,{children:"OpenAI"})," component, click ",(0,n.jsx)(c.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,n.jsx)(r.strong,{children:"Inspect output"}),"."]}),"\n"]}),"\n",(0,n.jsx)(o.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"1. Keywords: features, data, attributes, characteristics",props:{}}]},{tokens:[{content:"2. Question: What characteristics can be identified in my data?",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,n.jsxs)(r.ol,{start:"8",children:["\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:["To view the ",(0,n.jsx)(r.a,{href:"/data-types#dataframe",children:"DataFrame"})," generated from the ",(0,n.jsx)(r.strong,{children:"OpenAI"})," component's response, in the ",(0,n.jsx)(r.strong,{children:"Structured Output"})," component, click ",(0,n.jsx)(c.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,n.jsx)(r.strong,{children:"Inspect output"}),".\nThe DataFrame is passed to a ",(0,n.jsx)(r.strong,{children:"Parser"})," component, which parses the contents of the ",(0,n.jsx)(r.strong,{children:"Keywords"})," column into a string."]}),"\n",(0,n.jsxs)(r.p,{children:["This string of comma-separated words is passed to the ",(0,n.jsx)(r.strong,{children:"Lexical Terms"})," port of the ",(0,n.jsx)(r.strong,{children:"Astra DB"})," component.\nNote that the ",(0,n.jsx)(r.strong,{children:"Search Query"})," port of the Astra DB port is connected to the ",(0,n.jsx)(r.strong,{children:"Chat Input"})," component from step 6.\nThis ",(0,n.jsx)(r.strong,{children:"Search Query"})," is vectorized, and both the ",(0,n.jsx)(r.strong,{children:"Search Query"})," and ",(0,n.jsx)(r.strong,{children:"Lexical Terms"})," content are sent to the reranker at the ",(0,n.jsx)(r.code,{children:"find_and_rerank"})," endpoint."]}),"\n",(0,n.jsxs)(r.p,{children:["The reranker compares the vector search results against the string of terms from the lexical search.\nThe highest-ranked results of your hybrid search are returned to the ",(0,n.jsx)(r.strong,{children:"Playground"}),"."]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(r.p,{children:["For more information, see the ",(0,n.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/databases/hybrid-search.html",children:"DataStax documentation"}),"."]}),"\n",(0,n.jsx)(r.h2,{id:"astradb-graph-vector-store",children:"AstraDB Graph vector store"}),"\n",(0,n.jsxs)(r.p,{children:["This component implements a Vector Store using AstraDB with graph capabilities.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/tutorials/graph-rag.html",children:"Astra DB Serverless documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Display Name"}),(0,n.jsx)(r.th,{children:"Info"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"collection_name"}),(0,n.jsx)(r.td,{children:"Collection Name"}),(0,n.jsx)(r.td,{children:"The name of the collection within AstraDB where the vectors are stored. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"token"}),(0,n.jsx)(r.td,{children:"Astra DB Application Token"}),(0,n.jsx)(r.td,{children:"Authentication token for accessing AstraDB. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"api_endpoint"}),(0,n.jsx)(r.td,{children:"API Endpoint"}),(0,n.jsx)(r.td,{children:"API endpoint URL for the AstraDB service. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_input"}),(0,n.jsx)(r.td,{children:"Search Input"}),(0,n.jsx)(r.td,{children:"Query string for similarity search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Ingest Data"}),(0,n.jsx)(r.td,{children:"Data to be ingested into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"namespace"}),(0,n.jsx)(r.td,{children:"Namespace"}),(0,n.jsx)(r.td,{children:"Optional namespace within AstraDB to use for the collection."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embedding Model"}),(0,n.jsx)(r.td,{children:"Embedding model to use."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"metric"}),(0,n.jsx)(r.td,{children:"Metric"}),(0,n.jsx)(r.td,{children:'Distance metric for vector comparisons. The options are "cosine", "euclidean", "dot_product".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"setup_mode"}),(0,n.jsx)(r.td,{children:"Setup Mode"}),(0,n.jsx)(r.td,{children:'Configuration mode for setting up the vector store. The options are "Sync", "Async", "Off".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"pre_delete_collection"}),(0,n.jsx)(r.td,{children:"Pre Delete Collection"}),(0,n.jsx)(r.td,{children:"Boolean flag to determine whether to delete the collection before creating a new one."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Number of Results"}),(0,n.jsx)(r.td,{children:"Number of results to return in similarity search. Default: 4."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_type"}),(0,n.jsx)(r.td,{children:"Search Type"}),(0,n.jsx)(r.td,{children:'Search type to use. The options are "Similarity", "Graph Traversal", "Hybrid".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"traversal_depth"}),(0,n.jsx)(r.td,{children:"Traversal Depth"}),(0,n.jsx)(r.td,{children:"Maximum depth for graph traversal searches. Default: 1."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_score_threshold"}),(0,n.jsx)(r.td,{children:"Search Score Threshold"}),(0,n.jsx)(r.td,{children:"Minimum similarity score threshold for search results."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_filter"}),(0,n.jsx)(r.td,{children:"Search Metadata Filter"}),(0,n.jsx)(r.td,{children:"Optional dictionary of filters to apply to the search query."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Display Name"}),(0,n.jsx)(r.th,{children:"Info"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"Vector Store"}),(0,n.jsx)(r.td,{children:"The Graph RAG vector store instance configured with the specified parameters."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"Search Results"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/data-types#data",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"cassandra",children:"Cassandra"}),"\n",(0,n.jsxs)(r.p,{children:["This component creates a Cassandra Vector Store with search capabilities.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://cassandra.apache.org/doc/latest/cassandra/vector-search/overview.html",children:"Cassandra documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"database_ref"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Contact points for the database or AstraDB database ID."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"username"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Username for the database (leave empty for AstraDB)."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"token"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"User password for the database or AstraDB token."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"keyspace"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Table Keyspace or AstraDB namespace."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"table_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Name of the table or AstraDB collection."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ttl_seconds"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"Time-to-live for added texts."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"batch_size"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"Number of data to process in a single batch."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"setup_mode"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Configuration mode for setting up the Cassandra table."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"cluster_kwargs"}),(0,n.jsx)(r.td,{children:"Dict"}),(0,n.jsx)(r.td,{children:"Additional keyword arguments for the Cassandra cluster."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Query for similarity search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Data"}),(0,n.jsx)(r.td,{children:"Data to be ingested into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"Embedding function to use."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"Number of results to return in search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_type"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Type of search to perform."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_score_threshold"}),(0,n.jsx)(r.td,{children:"Float"}),(0,n.jsx)(r.td,{children:"Minimum similarity score for search results."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_filter"}),(0,n.jsx)(r.td,{children:"Dict"}),(0,n.jsx)(r.td,{children:"Metadata filters for search query."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"body_search"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Document textual search terms."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"enable_body_search"}),(0,n.jsx)(r.td,{children:"Boolean"}),(0,n.jsx)(r.td,{children:"Flag to enable body search."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"Cassandra"}),(0,n.jsx)(r.td,{children:"The Cassandra vector store instance configured with the specified parameters."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"List[Data]"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.code,{children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"cassandra-graph-vector-store",children:"Cassandra Graph Vector Store"}),"\n",(0,n.jsx)(r.p,{children:"This component implements a Cassandra Graph Vector Store with search capabilities."}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Display Name"}),(0,n.jsx)(r.th,{children:"Info"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"database_ref"}),(0,n.jsx)(r.td,{children:"Contact Points / Astra Database ID"}),(0,n.jsx)(r.td,{children:"The contact points for the database or AstraDB database ID. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"username"}),(0,n.jsx)(r.td,{children:"Username"}),(0,n.jsx)(r.td,{children:"The username for the database. Leave this field empty for AstraDB."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"token"}),(0,n.jsx)(r.td,{children:"Password / AstraDB Token"}),(0,n.jsx)(r.td,{children:"The user password for the database or AstraDB token. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"keyspace"}),(0,n.jsx)(r.td,{children:"Keyspace"}),(0,n.jsx)(r.td,{children:"The table Keyspace or AstraDB namespace. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"table_name"}),(0,n.jsx)(r.td,{children:"Table Name"}),(0,n.jsx)(r.td,{children:"The name of the table or AstraDB collection where vectors are stored. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"setup_mode"}),(0,n.jsx)(r.td,{children:"Setup Mode"}),(0,n.jsx)(r.td,{children:'The configuration mode for setting up the Cassandra table. The options are "Sync" or "Off". Default: "Sync".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"cluster_kwargs"}),(0,n.jsx)(r.td,{children:"Cluster arguments"}),(0,n.jsx)(r.td,{children:"An optional dictionary of additional keyword arguments for the Cassandra cluster."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"Search Query"}),(0,n.jsx)(r.td,{children:"The query string for similarity search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Ingest Data"}),(0,n.jsx)(r.td,{children:"The list of data to be ingested into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embedding"}),(0,n.jsx)(r.td,{children:"The embedding model to use."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Number of Results"}),(0,n.jsx)(r.td,{children:"The number of results to return in similarity search. Default: 4."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_type"}),(0,n.jsx)(r.td,{children:"Search Type"}),(0,n.jsx)(r.td,{children:'The search type to use. The options are "Traversal", "MMR traversal", "Similarity", "Similarity with score threshold", or "MMR (Max Marginal Relevance)". Default: "Traversal".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"depth"}),(0,n.jsx)(r.td,{children:"Depth of traversal"}),(0,n.jsx)(r.td,{children:'The maximum depth of edges to traverse. Used for "Traversal" or "MMR traversal" search types. Default: 1.'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_score_threshold"}),(0,n.jsx)(r.td,{children:"Search Score Threshold"}),(0,n.jsx)(r.td,{children:'The minimum similarity score threshold for search results. Used for "Similarity with score threshold" search types.'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_filter"}),(0,n.jsx)(r.td,{children:"Search Metadata Filter"}),(0,n.jsx)(r.td,{children:"An optional dictionary of filters to apply to the search query."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Display Name"}),(0,n.jsx)(r.th,{children:"Info"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"Vector Store"}),(0,n.jsx)(r.td,{children:"The Cassandra Graph vector store instance configured with the specified parameters."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"Search Results"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/data-types#data",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"chroma-db",children:"Chroma DB"}),"\n",(0,n.jsx)(r.p,{children:"This component creates a Chroma Vector Store with search capabilities."}),"\n",(0,n.jsx)(r.p,{children:"The Chroma DB component creates an ephemeral vector database for experimentation and vector storage."}),"\n",(0,n.jsxs)(r.ol,{children:["\n",(0,n.jsxs)(r.li,{children:["To use this component in a flow, connect it to a component that outputs ",(0,n.jsx)(r.strong,{children:"Data"})," or ",(0,n.jsx)(r.strong,{children:"DataFrame"}),".\nThis example splits text from a ",(0,n.jsx)(r.a,{href:"/components-data#url",children:"URL"})," component, and computes embeddings with the connected ",(0,n.jsx)(r.strong,{children:"OpenAI Embeddings"})," component. Chroma DB computes embeddings by default, but you can connect your own embeddings model, as seen in this example."]}),"\n"]}),"\n",(0,n.jsx)(r.p,{children:(0,n.jsx)(r.img,{alt:"ChromaDB receiving split text",src:t(88690).A+"",width:"4000",height:"2694"})}),"\n",(0,n.jsxs)(r.ol,{start:"2",children:["\n",(0,n.jsxs)(r.li,{children:["In the ",(0,n.jsx)(r.strong,{children:"Chroma DB"})," component, in the ",(0,n.jsx)(r.strong,{children:"Collection"})," field, enter a name for your embeddings collection."]}),"\n",(0,n.jsxs)(r.li,{children:["Optionally, to persist the Chroma database, in the ",(0,n.jsx)(r.strong,{children:"Persist"})," field, enter a directory to store the ",(0,n.jsx)(r.code,{children:"chroma.sqlite3"})," file.\nThis example uses ",(0,n.jsx)(r.code,{children:"./chroma-db"})," to create a directory relative to where Langflow is running."]}),"\n",(0,n.jsxs)(r.li,{children:["To load data and embeddings into your Chroma database, in the ",(0,n.jsx)(r.strong,{children:"Chroma DB"})," component, click ",(0,n.jsx)(c.A,{name:"Play","aria-hidden":"true"})," ",(0,n.jsx)(r.strong,{children:"Run component"}),"."]}),"\n"]}),"\n",(0,n.jsx)(r.admonition,{type:"tip",children:(0,n.jsxs)(r.p,{children:["When loading duplicate documents, enable the ",(0,n.jsx)(r.strong,{children:"Allow Duplicates"})," option in Chroma DB if you want to store multiple copies of the same content, or disable it to automatically deduplicate your data."]})}),"\n",(0,n.jsxs)(r.ol,{start:"5",children:["\n",(0,n.jsxs)(r.li,{children:["To view the split data, in the ",(0,n.jsx)(r.strong,{children:"Split Text"})," component, click ",(0,n.jsx)(c.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,n.jsx)(r.strong,{children:"Inspect output"}),"."]}),"\n",(0,n.jsxs)(r.li,{children:["To query your loaded data, open the ",(0,n.jsx)(r.strong,{children:"Playground"})," and query your database.\nYour input is converted to vector data and compared to the stored vectors in a vector similarity search."]}),"\n"]}),"\n",(0,n.jsxs)(r.p,{children:["For more information, see the ",(0,n.jsx)(r.a,{href:"https://docs.trychroma.com/",children:"Chroma documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"collection_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:'The name of the Chroma collection. Default: "langflow".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"persist_directory"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The directory to persist the Chroma database."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The query to search for in the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Data"}),(0,n.jsxs)(r.td,{children:["The data to ingest into the vector store (list of ",(0,n.jsx)(r.code,{children:"Data"})," objects)."]})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"The embedding function to use for the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"chroma_server_cors_allow_origins"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The CORS allow origins for the Chroma server."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"chroma_server_host"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The host for the Chroma server."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"chroma_server_http_port"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"The HTTP port for the Chroma server."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"chroma_server_grpc_port"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"The gRPC port for the Chroma server."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"chroma_server_ssl_enabled"}),(0,n.jsx)(r.td,{children:"Boolean"}),(0,n.jsx)(r.td,{children:"Enable SSL for the Chroma server."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"allow_duplicates"}),(0,n.jsx)(r.td,{children:"Boolean"}),(0,n.jsx)(r.td,{children:"Allow duplicate documents in the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_type"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:'The type of search to perform: "Similarity" or "MMR".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsxs)(r.td,{children:["The number of results to return from the search. Default: ",(0,n.jsx)(r.code,{children:"10"}),"."]})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"limit"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsxs)(r.td,{children:["The limit of the number of records to compare when ",(0,n.jsx)(r.code,{children:"Allow Duplicates"})," is ",(0,n.jsx)(r.code,{children:"False"}),"."]})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"Chroma"}),(0,n.jsx)(r.td,{children:"The Chroma vector store instance."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"List[Data]"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/data-types#data",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"clickhouse",children:"Clickhouse"}),"\n",(0,n.jsxs)(r.p,{children:["This component implements a Clickhouse Vector Store with search capabilities.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://clickhouse.com/docs/en/intro",children:"Clickhouse Documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Display Name"}),(0,n.jsx)(r.th,{children:"Info"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"host"}),(0,n.jsx)(r.td,{children:"hostname"}),(0,n.jsx)(r.td,{children:'The Clickhouse server hostname. Required. Default: "localhost".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"port"}),(0,n.jsx)(r.td,{children:"port"}),(0,n.jsx)(r.td,{children:"The Clickhouse server port. Required. Default: 8123."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"database"}),(0,n.jsx)(r.td,{children:"database"}),(0,n.jsx)(r.td,{children:"The Clickhouse database name. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"table"}),(0,n.jsx)(r.td,{children:"Table name"}),(0,n.jsx)(r.td,{children:"The Clickhouse table name. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"username"}),(0,n.jsx)(r.td,{children:"The ClickHouse user name."}),(0,n.jsx)(r.td,{children:"Username for authentication. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"password"}),(0,n.jsx)(r.td,{children:"The password for username."}),(0,n.jsx)(r.td,{children:"Password for authentication. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"index_type"}),(0,n.jsx)(r.td,{children:"index_type"}),(0,n.jsx)(r.td,{children:'Type of the index. The options are "annoy" and "vector_similarity". Default: "annoy".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"metric"}),(0,n.jsx)(r.td,{children:"metric"}),(0,n.jsx)(r.td,{children:'Metric to compute distance. The options are "angular", "euclidean", "manhattan", "hamming", "dot". Default: "angular".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"secure"}),(0,n.jsx)(r.td,{children:"Use https/TLS"}),(0,n.jsx)(r.td,{children:"Overrides inferred values from the interface or port arguments. Default: false."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"index_param"}),(0,n.jsx)(r.td,{children:"Param of the index"}),(0,n.jsx)(r.td,{children:"Index parameters. Default: \"'L2Distance',100\"."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"index_query_params"}),(0,n.jsx)(r.td,{children:"index query params"}),(0,n.jsx)(r.td,{children:"Additional index query parameters."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"Search Query"}),(0,n.jsx)(r.td,{children:"The query string for similarity search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Ingest Data"}),(0,n.jsx)(r.td,{children:"The data to be ingested into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embedding"}),(0,n.jsx)(r.td,{children:"The embedding model to use."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Number of Results"}),(0,n.jsx)(r.td,{children:"The number of results to return in similarity search. Default: 4."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"score_threshold"}),(0,n.jsx)(r.td,{children:"Score threshold"}),(0,n.jsx)(r.td,{children:"The threshold for similarity scores."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Display Name"}),(0,n.jsx)(r.th,{children:"Info"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"Vector Store"}),(0,n.jsx)(r.td,{children:"The Clickhouse vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"Search Results"}),(0,n.jsx)(r.td,{children:"The results of the similarity search as a list of Data objects."})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"couchbase",children:"Couchbase"}),"\n",(0,n.jsxs)(r.p,{children:["This component creates a Couchbase Vector Store with search capabilities.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://docs.couchbase.com/home/index.html",children:"Couchbase documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"couchbase_connection_string"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"Couchbase Cluster connection string. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"couchbase_username"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Couchbase username. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"couchbase_password"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"Couchbase password. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"bucket_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Name of the Couchbase bucket. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"scope_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Name of the Couchbase scope. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"collection_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Name of the Couchbase collection. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"index_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Name of the Couchbase index. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The query to search for in the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Data"}),(0,n.jsx)(r.td,{children:"The list of data to ingest into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"The embedding function to use for the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"Number of results to return from the search. Default: 4."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsx)(r.tbody,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"CouchbaseVectorStore"}),(0,n.jsx)(r.td,{children:"A Couchbase vector store instance configured with the specified parameters."})]})})]})]}),"\n",(0,n.jsx)(r.h2,{id:"local-db",children:"Local DB"}),"\n",(0,n.jsxs)(r.p,{children:["The ",(0,n.jsx)(r.strong,{children:"Local DB"})," component is Langflow's enhanced version of Chroma DB."]}),"\n",(0,n.jsx)(r.p,{children:"The component adds a user-friendly interface with two modes (Ingest and Retrieve), automatic collection management, and built-in persistence in Langflow's cache directory."}),"\n",(0,n.jsxs)(r.p,{children:["Local DB includes ",(0,n.jsx)(r.strong,{children:"Ingest"})," and ",(0,n.jsx)(r.strong,{children:"Retrieve"})," modes."]}),"\n",(0,n.jsxs)(r.p,{children:["The ",(0,n.jsx)(r.strong,{children:"Ingest"})," mode works similarly to ",(0,n.jsx)(r.a,{href:"#chroma-db",children:"ChromaDB"}),", and persists your database to the Langflow cache directory. The Langflow cache directory location is specified in ",(0,n.jsx)(r.code,{children:"LANGFLOW_CONFIG_DIR"}),". For more information, see ",(0,n.jsx)(r.a,{href:"/environment-variables",children:"Environment variables"}),"."]}),"\n",(0,n.jsxs)(r.p,{children:["The ",(0,n.jsx)(r.strong,{children:"Retrieve"})," mode can query your ",(0,n.jsx)(r.strong,{children:"Chroma DB"})," collections."]}),"\n",(0,n.jsx)(r.p,{children:(0,n.jsx)(r.img,{alt:"Local DB retrieving vectors",src:t(60159).A+"",width:"4000",height:"2188"})}),"\n",(0,n.jsxs)(r.p,{children:["For more information, see the ",(0,n.jsx)(r.a,{href:"https://docs.trychroma.com/",children:"Chroma documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"collection_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:'The name of the Chroma collection. Default: "langflow".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"persist_directory"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsxs)(r.td,{children:["Custom base directory to save the vector store. Collections are stored under ",(0,n.jsx)(r.code,{children:"$DIRECTORY/vector_stores/$COLLECTION_NAME"}),". If not specified, it uses your system's cache folder."]})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"existing_collections"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Select a previously created collection to search through its stored data."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"The embedding function to use for the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"allow_duplicates"}),(0,n.jsx)(r.td,{children:"Boolean"}),(0,n.jsx)(r.td,{children:"If false, will not add documents that are already in the Vector Store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_type"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:'Type of search to perform: "Similarity" or "MMR".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Data/DataFrame"}),(0,n.jsx)(r.td,{children:"Data to store. It is embedded and indexed for semantic search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Enter text to search for similar content in the selected collection."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"Number of results to return. Default: 10."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"limit"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"Limit the number of records to compare when Allow Duplicates is False."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"Chroma"}),(0,n.jsx)(r.td,{children:"A local Chroma vector store instance configured with the specified parameters."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsxs)(r.td,{children:["List",(0,n.jsx)(r.a,{href:"/data-types#data",children:"Data"})]}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/data-types#data",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"elasticsearch",children:"Elasticsearch"}),"\n",(0,n.jsxs)(r.p,{children:["This component creates an Elasticsearch Vector Store with search capabilities.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://www.elastic.co/guide/en/elasticsearch/reference/current/dense-vector.html",children:"Elasticsearch documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"es_url"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Elasticsearch server URL."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"es_user"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Username for Elasticsearch authentication."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"es_password"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"Password for Elasticsearch authentication."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"index_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Name of the Elasticsearch index."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"strategy"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:'Strategy for vector search. The options are "approximate_k_nearest_neighbors" or "script_scoring".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"distance_strategy"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:'Strategy for distance calculation. The options are "COSINE", "EUCLIDEAN_DISTANCE", or "DOT_PRODUCT".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Query for similarity search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Data"}),(0,n.jsx)(r.td,{children:"Data to be ingested into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"Embedding function to use."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsxs)(r.td,{children:["Number of results to return in search. Default: ",(0,n.jsx)(r.code,{children:"4"}),"."]})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"ElasticsearchStore"}),(0,n.jsx)(r.td,{children:"The Elasticsearch vector store instance."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"List[Data]"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/data-types#data",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"faiss",children:"FAISS"}),"\n",(0,n.jsxs)(r.p,{children:["This component creates a FAISS Vector Store with search capabilities.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://faiss.ai/index.html",children:"FAISS documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"index_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:'The name of the FAISS index. Default: "langflow_index".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"persist_directory"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Path to save the FAISS index. It is relative to where Langflow is running."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The query to search for in the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Data"}),(0,n.jsx)(r.td,{children:"The list of data to ingest into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"allow_dangerous_deserialization"}),(0,n.jsx)(r.td,{children:"Boolean"}),(0,n.jsx)(r.td,{children:"Set to True to allow loading pickle files from untrusted sources. Default: True."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"The embedding function to use for the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"Number of results to return from the search. Default: 4."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Display Name"}),(0,n.jsx)(r.th,{children:"Info"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"Vector Store"}),(0,n.jsx)(r.td,{children:"The FAISS vector store instance configured with the specified parameters."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"Search Results"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/data-types#data",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"graph-rag",children:"Graph RAG"}),"\n",(0,n.jsxs)(r.p,{children:["This component performs Graph RAG (Retrieval Augmented Generation) traversal in a vector store, enabling graph-based document retrieval.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://datastax.github.io/graph-rag/",children:"Graph RAG documentation"}),"."]}),"\n",(0,n.jsxs)(r.p,{children:["For an example flow, see the ",(0,n.jsx)(r.strong,{children:"Graph RAG"})," template."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Display Name"}),(0,n.jsx)(r.th,{children:"Info"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding_model"}),(0,n.jsx)(r.td,{children:"Embedding Model"}),(0,n.jsxs)(r.td,{children:["Specify the embedding model. This is not required for collections embedded with ",(0,n.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/databases/embedding-generation.html",children:"Astra vectorize"}),"."]})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"Vector Store Connection"}),(0,n.jsx)(r.td,{children:"Connection to the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"edge_definition"}),(0,n.jsx)(r.td,{children:"Edge Definition"}),(0,n.jsxs)(r.td,{children:["Edge definition for the graph traversal. For more information, see the ",(0,n.jsx)(r.a,{href:"https://datastax.github.io/graph-rag/reference/graph_retriever/edges/",children:"GraphRAG documentation"}),"."]})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"strategy"}),(0,n.jsx)(r.td,{children:"Traversal Strategies"}),(0,n.jsx)(r.td,{children:"The strategy to use for graph traversal. Strategy options are dynamically loaded from available strategies."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"Search Query"}),(0,n.jsx)(r.td,{children:"The query to search for in the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"graphrag_strategy_kwargs"}),(0,n.jsx)(r.td,{children:"Strategy Parameters"}),(0,n.jsxs)(r.td,{children:["Optional dictionary of additional parameters for the retrieval strategy. For more information, see the ",(0,n.jsx)(r.a,{href:"https://datastax.github.io/graph-rag/reference/graph_retriever/strategies/",children:"strategy documentation"}),"."]})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsx)(r.tbody,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"List[Data]"}),(0,n.jsxs)(r.td,{children:["Results of the graph-based document retrieval as a list of ",(0,n.jsx)(r.a,{href:"/data-types#data",children:"Data"})," objects."]})]})})]})]}),"\n",(0,n.jsx)(r.h2,{id:"hyper-converged-database-hcd",children:"Hyper-Converged Database (HCD)"}),"\n",(0,n.jsx)(r.p,{children:"This component implements a Vector Store using HCD."}),"\n",(0,n.jsxs)(r.p,{children:["To use the HCD vector store, add your deployment's collection name, username, password, and HCD Data API endpoint.\nThe endpoint must be formatted like ",(0,n.jsx)(r.code,{children:"http[s]://**DOMAIN_NAME** or **IP_ADDRESS**[:port]"}),", for example, ",(0,n.jsx)(r.code,{children:"http://192.0.2.250:8181"}),"."]}),"\n",(0,n.jsxs)(r.p,{children:["Replace ",(0,n.jsx)(r.strong,{children:"DOMAIN_NAME"})," or ",(0,n.jsx)(r.strong,{children:"IP_ADDRESS"})," with the domain name or IP address of your HCD Data API connection."]}),"\n",(0,n.jsx)(r.p,{children:"To use the HCD vector store for embeddings ingestion, connect it to an embeddings model and a file loader:"}),"\n",(0,n.jsx)(r.p,{children:(0,n.jsx)(r.img,{alt:"HCD vector store embeddings ingestion",src:t(42638).A+"",width:"2294",height:"1684"})}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Display Name"}),(0,n.jsx)(r.th,{children:"Info"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"collection_name"}),(0,n.jsx)(r.td,{children:"Collection Name"}),(0,n.jsx)(r.td,{children:"The name of the collection within HCD where the vectors will be stored. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"username"}),(0,n.jsx)(r.td,{children:"HCD Username"}),(0,n.jsx)(r.td,{children:'Authentication username for accessing HCD. Default is "hcd-superuser". Required.'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"password"}),(0,n.jsx)(r.td,{children:"HCD Password"}),(0,n.jsx)(r.td,{children:"Authentication password for accessing HCD. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"api_endpoint"}),(0,n.jsx)(r.td,{children:"HCD API Endpoint"}),(0,n.jsx)(r.td,{children:"API endpoint URL for the HCD service. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_input"}),(0,n.jsx)(r.td,{children:"Search Input"}),(0,n.jsx)(r.td,{children:"Query string for similarity search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Ingest Data"}),(0,n.jsx)(r.td,{children:"Data to be ingested into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"namespace"}),(0,n.jsx)(r.td,{children:"Namespace"}),(0,n.jsx)(r.td,{children:'Optional namespace within HCD to use for the collection. Default is "default_namespace".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ca_certificate"}),(0,n.jsx)(r.td,{children:"CA Certificate"}),(0,n.jsx)(r.td,{children:"Optional CA certificate for TLS connections to HCD."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"metric"}),(0,n.jsx)(r.td,{children:"Metric"}),(0,n.jsx)(r.td,{children:'Optional distance metric for vector comparisons. Options are "cosine", "dot_product", "euclidean".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"batch_size"}),(0,n.jsx)(r.td,{children:"Batch Size"}),(0,n.jsx)(r.td,{children:"Optional number of data to process in a single batch."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"bulk_insert_batch_concurrency"}),(0,n.jsx)(r.td,{children:"Bulk Insert Batch Concurrency"}),(0,n.jsx)(r.td,{children:"Optional concurrency level for bulk insert operations."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"bulk_insert_overwrite_concurrency"}),(0,n.jsx)(r.td,{children:"Bulk Insert Overwrite Concurrency"}),(0,n.jsx)(r.td,{children:"Optional concurrency level for bulk insert operations that overwrite existing data."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"bulk_delete_concurrency"}),(0,n.jsx)(r.td,{children:"Bulk Delete Concurrency"}),(0,n.jsx)(r.td,{children:"Optional concurrency level for bulk delete operations."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"setup_mode"}),(0,n.jsx)(r.td,{children:"Setup Mode"}),(0,n.jsx)(r.td,{children:'Configuration mode for setting up the vector store. Options are "Sync", "Async", "Off". Default is "Sync".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"pre_delete_collection"}),(0,n.jsx)(r.td,{children:"Pre Delete Collection"}),(0,n.jsx)(r.td,{children:"Boolean flag to determine whether to delete the collection before creating a new one."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"metadata_indexing_include"}),(0,n.jsx)(r.td,{children:"Metadata Indexing Include"}),(0,n.jsx)(r.td,{children:"Optional list of metadata fields to include in the indexing."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embedding or Astra Vectorize"}),(0,n.jsx)(r.td,{children:"Allows either an embedding model or an Astra Vectorize configuration."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"metadata_indexing_exclude"}),(0,n.jsx)(r.td,{children:"Metadata Indexing Exclude"}),(0,n.jsx)(r.td,{children:"Optional list of metadata fields to exclude from the indexing."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"collection_indexing_policy"}),(0,n.jsx)(r.td,{children:"Collection Indexing Policy"}),(0,n.jsx)(r.td,{children:"Optional dictionary defining the indexing policy for the collection."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Number of Results"}),(0,n.jsx)(r.td,{children:"Number of results to return in similarity search. Default is 4."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_type"}),(0,n.jsx)(r.td,{children:"Search Type"}),(0,n.jsx)(r.td,{children:'Search type to use. Options are "Similarity", "Similarity with score threshold", "MMR (Max Marginal Relevance)". Default is "Similarity".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_score_threshold"}),(0,n.jsx)(r.td,{children:"Search Score Threshold"}),(0,n.jsx)(r.td,{children:"Minimum similarity score threshold for search results. Default is 0."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_filter"}),(0,n.jsx)(r.td,{children:"Search Metadata Filter"}),(0,n.jsx)(r.td,{children:"Optional dictionary of filters to apply to the search query."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"HyperConvergedDatabaseVectorStore"}),(0,n.jsx)(r.td,{children:"The HCD vector store instance."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"List[Data]"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/data-types#data",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"milvus",children:"Milvus"}),"\n",(0,n.jsxs)(r.p,{children:["This component creates a Milvus Vector Store with search capabilities.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://milvus.io/docs",children:"Milvus documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"collection_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Name of the Milvus collection."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"collection_description"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Description of the Milvus collection."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"uri"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Connection URI for Milvus."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"password"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"Password for Milvus."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"username"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"Username for Milvus."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"batch_size"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"Number of data to process in a single batch."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Query for similarity search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Data"}),(0,n.jsx)(r.td,{children:"Data to be ingested into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"Embedding function to use."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"Number of results to return in search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_type"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Type of search to perform."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_score_threshold"}),(0,n.jsx)(r.td,{children:"Float"}),(0,n.jsx)(r.td,{children:"Minimum similarity score for search results."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_filter"}),(0,n.jsx)(r.td,{children:"Dict"}),(0,n.jsx)(r.td,{children:"Metadata filters for search query."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"setup_mode"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Configuration mode for setting up the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_dimensions"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"Number of dimensions of the vectors."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"pre_delete_collection"}),(0,n.jsx)(r.td,{children:"Boolean"}),(0,n.jsx)(r.td,{children:"Whether to delete the collection before creating a new one."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsx)(r.tbody,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"Milvus"}),(0,n.jsx)(r.td,{children:"A Milvus vector store instance configured with the specified parameters."})]})})]})]}),"\n",(0,n.jsx)(r.h2,{id:"mongodb-atlas",children:"MongoDB Atlas"}),"\n",(0,n.jsxs)(r.p,{children:["This component creates a MongoDB Atlas Vector Store with search capabilities.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://www.mongodb.com/docs/atlas/atlas-vector-search/tutorials/vector-search-quick-start/",children:"MongoDB Atlas documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"mongodb_atlas_cluster_uri"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"The connection URI for your MongoDB Atlas cluster. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"enable_mtls"}),(0,n.jsx)(r.td,{children:"Boolean"}),(0,n.jsx)(r.td,{children:"Enable mutual TLS authentication. Default: false."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"mongodb_atlas_client_cert"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"Client certificate combined with private key for mTLS authentication. Required if mTLS is enabled."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"db_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The name of the database to use. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"collection_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The name of the collection to use. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"index_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The name of the Atlas Search index, it should be a Vector Search. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"insert_mode"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:'How to insert new documents into the collection. The options are "append" or "overwrite". Default: "append".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"The embedding model to use."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"Number of results to return in similarity search. Default: 4."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"index_field"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:'The field to index. Default: "embedding".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"filter_field"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The field to filter the index."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_dimensions"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"Embedding context length. Default: 1536."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"similarity"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:'The method used to measure similarity between vectors. The options are "cosine", "euclidean", or "dotProduct". Default: "cosine".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"quantization"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:'Quantization reduces memory costs by converting 32-bit floats to smaller data types. The options are "scalar" or "binary".'})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"MongoDBAtlasVectorSearch"}),(0,n.jsx)(r.td,{children:"The MongoDB Atlas vector store instance."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"List[Data]"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/data-types#data",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"opensearch",children:"Opensearch"}),"\n",(0,n.jsxs)(r.p,{children:["This component creates an Opensearch vector store with search capabilities\nFor more information, see ",(0,n.jsx)(r.a,{href:"https://opensearch.org/platform/search/vector-database.html",children:"Opensearch documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"opensearch_url"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsxs)(r.td,{children:["URL for OpenSearch cluster, such as ",(0,n.jsx)(r.code,{children:"https://192.168.1.1:9200"}),"."]})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"index_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The index name where the vectors are stored in OpenSearch cluster."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_input"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Enter a search query. Leave empty to retrieve all documents or if hybrid search is being used."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Data"}),(0,n.jsx)(r.td,{children:"The data to be ingested into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"The embedding function to use."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_type"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:'The options are "similarity", "similarity_score_threshold", "mmr".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"The number of results to return in search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_score_threshold"}),(0,n.jsx)(r.td,{children:"Float"}),(0,n.jsx)(r.td,{children:"The minimum similarity score threshold for search results."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"username"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The username for the opensource cluster."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"password"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"The password for the opensource cluster."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"use_ssl"}),(0,n.jsx)(r.td,{children:"Boolean"}),(0,n.jsx)(r.td,{children:"Use SSL."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"verify_certs"}),(0,n.jsx)(r.td,{children:"Boolean"}),(0,n.jsx)(r.td,{children:"Verify certificates."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"hybrid_search_query"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Provide a custom hybrid search query in JSON format. This allows you to combine vector similarity and keyword matching."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"OpenSearchVectorSearch"}),(0,n.jsx)(r.td,{children:"OpenSearch vector store instance"})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"List[Data]"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/data-types#data",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"pgvector",children:"PGVector"}),"\n",(0,n.jsxs)(r.p,{children:["This component creates a PGVector Vector Store with search capabilities.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://github.com/pgvector/pgvector",children:"PGVector documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"pg_server_url"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"The PostgreSQL server connection string."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"collection_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The table name for the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The query for similarity search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Data"}),(0,n.jsx)(r.td,{children:"The data to be ingested into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"The embedding function to use."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"The number of results to return in search."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Display Name"}),(0,n.jsx)(r.th,{children:"Info"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"Vector Store"}),(0,n.jsx)(r.td,{children:"The PGVector vector store instance configured with the specified parameters."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"Search Results"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/data-types#data",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"pinecone",children:"Pinecone"}),"\n",(0,n.jsxs)(r.p,{children:["This component creates a Pinecone Vector Store with search capabilities.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://docs.pinecone.io/home",children:"Pinecone documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"index_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The name of the Pinecone index."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"namespace"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The namespace for the index."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"distance_strategy"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The strategy for calculating distance between vectors."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"pinecone_api_key"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"The API key for Pinecone."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"text_key"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The key in the record to use as text."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The query for similarity search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Data"}),(0,n.jsx)(r.td,{children:"The data to be ingested into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"The embedding function to use."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"The number of results to return in search."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Display Name"}),(0,n.jsx)(r.th,{children:"Info"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"Vector Store"}),(0,n.jsx)(r.td,{children:"The Pinecone vector store instance configured with the specified parameters."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"Search Results"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/data-types#data",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"qdrant",children:"Qdrant"}),"\n",(0,n.jsxs)(r.p,{children:["This component creates a Qdrant Vector Store with search capabilities.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://qdrant.tech/documentation/",children:"Qdrant documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"collection_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The name of the Qdrant collection."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"host"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The Qdrant server host."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"port"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"The Qdrant server port."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"grpc_port"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"The Qdrant gRPC port."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"api_key"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"The API key for Qdrant."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"prefix"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The prefix for Qdrant."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"timeout"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"The timeout for Qdrant operations."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"path"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The path for Qdrant."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"url"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The URL for Qdrant."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"distance_func"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The distance function for vector similarity."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"content_payload_key"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The content payload key."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"metadata_payload_key"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The metadata payload key."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The query for similarity search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Data"}),(0,n.jsx)(r.td,{children:"The data to be ingested into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"The embedding function to use."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"The number of results to return in search."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"Qdrant"}),(0,n.jsx)(r.td,{children:"A Qdrant vector store instance."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"List[Data]"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/data-types#data",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"redis",children:"Redis"}),"\n",(0,n.jsxs)(r.p,{children:["This component creates a Redis Vector Store with search capabilities.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://redis.io/docs/latest/develop/interact/search-and-query/advanced-concepts/vectors/",children:"Redis documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"redis_server_url"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"The Redis server connection string."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"redis_index_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The name of the Redis index."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"code"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The custom code for Redis (advanced)."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"schema"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The schema for Redis index."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The query for similarity search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Data"}),(0,n.jsx)(r.td,{children:"The data to be ingested into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"The number of results to return in search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"The embedding function to use."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"Redis"}),(0,n.jsx)(r.td,{children:"Redis vector store instance"})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"List[Data]"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/data-types#data",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"supabase",children:"Supabase"}),"\n",(0,n.jsxs)(r.p,{children:["This component creates a connection to a Supabase Vector Store with search capabilities.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://supabase.com/docs/guides/ai",children:"Supabase documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"supabase_url"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The URL of the Supabase instance."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"supabase_service_key"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"The service key for Supabase authentication."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"table_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The name of the table in Supabase."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"query_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The name of the query to use."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The query for similarity search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Data"}),(0,n.jsx)(r.td,{children:"The data to be ingested into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"The embedding function to use."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"The number of results to return in search."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"SupabaseVectorStore"}),(0,n.jsx)(r.td,{children:"A Supabase vector store instance."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"List[Data]"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/data-types#data",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"upstash",children:"Upstash"}),"\n",(0,n.jsxs)(r.p,{children:["This component creates an Upstash Vector Store with search capabilities.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://upstash.com/docs/introduction",children:"Upstash documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"index_url"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The URL of the Upstash index."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"index_token"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"The token for the Upstash index."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"text_key"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The key in the record to use as text."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"namespace"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The namespace for the index."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The query for similarity search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"metadata_filter"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Filter documents by metadata."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Data"}),(0,n.jsx)(r.td,{children:"The data to be ingested into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"The embedding function to use."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"The number of results to return in search."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"UpstashVectorStore"}),(0,n.jsx)(r.td,{children:"An Upstash vector store instance."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"List[Data]"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/data-types#data",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"vectara",children:"Vectara"}),"\n",(0,n.jsxs)(r.p,{children:["This component creates a Vectara Vector Store with search capabilities.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://docs.vectara.com/docs/",children:"Vectara documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vectara_customer_id"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The Vectara customer ID."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vectara_corpus_id"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The Vectara corpus ID."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vectara_api_key"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"The Vectara API key."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"The embedding function to use (optional)."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"List[Document/Data]"}),(0,n.jsx)(r.td,{children:"The data to be ingested into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The query for similarity search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"The number of results to return in search."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"VectaraVectorStore"}),(0,n.jsx)(r.td,{children:"Vectara vector store instance."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"List[Data]"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/data-types#data",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"vectara-search",children:"Vectara Search"}),"\n",(0,n.jsxs)(r.p,{children:["This component searches a Vectara Vector Store for documents based on the provided input.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://docs.vectara.com/docs/",children:"Vectara documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_type"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:'The type of search, such as "Similarity" or "MMR".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"input_value"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The search query."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vectara_customer_id"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The Vectara customer ID."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vectara_corpus_id"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The Vectara corpus ID."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vectara_api_key"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"The Vectara API key."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"files_url"}),(0,n.jsx)(r.td,{children:"List[String]"}),(0,n.jsx)(r.td,{children:"Optional URLs for file initialization."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsx)(r.tbody,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"List[Data]"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/data-types#data",children:"Data"})," objects."]})]})})]})]}),"\n",(0,n.jsx)(r.h2,{id:"weaviate",children:"Weaviate"}),"\n",(0,n.jsxs)(r.p,{children:["This component facilitates a Weaviate Vector Store setup, optimizing text and document indexing and retrieval.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://weaviate.io/developers/weaviate",children:"Weaviate Documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"weaviate_url"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The default instance URL."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_by_text"}),(0,n.jsx)(r.td,{children:"Boolean"}),(0,n.jsx)(r.td,{children:"Indicates whether to search by text."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"api_key"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"The optional API key for authentication."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"index_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The optional index name."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"text_key"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The default text extraction key."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"input"}),(0,n.jsx)(r.td,{children:"Document"}),(0,n.jsx)(r.td,{children:"The document or record."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"The embedding model used."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"attributes"}),(0,n.jsx)(r.td,{children:"List[String]"}),(0,n.jsx)(r.td,{children:"Optional additional attributes."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsx)(r.tbody,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"WeaviateVectorStore"}),(0,n.jsx)(r.td,{children:"The Weaviate vector store instance."})]})})]})]}),"\n",(0,n.jsx)(r.h2,{id:"weaviate-search",children:"Weaviate Search"}),"\n",(0,n.jsxs)(r.p,{children:["This component searches a Weaviate Vector Store for documents similar to the input.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://weaviate.io/developers/weaviate",children:"Weaviate Documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_type"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:'The type of search, such as "Similarity" or "MMR"'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"input_value"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The search query."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"weaviate_url"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The default instance URL."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_by_text"}),(0,n.jsx)(r.td,{children:"Boolean"}),(0,n.jsx)(r.td,{children:"A boolean value that indicates whether to search by text."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"api_key"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"The optional API key for authentication."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"index_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The optional index name."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"text_key"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The default text extraction key."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"The embeddings model used."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"attributes"}),(0,n.jsx)(r.td,{children:"List[String]"}),(0,n.jsx)(r.td,{children:"Optional additional attributes."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsx)(r.tbody,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"List[Data]"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/data-types#data",children:"Data"})," objects."]})]})})]})]})]})}function u(e={}){const{wrapper:r}={...(0,d.R)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(m,{...e})}):m(e)}function p(e,r){throw new Error("Expected "+(r?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},17886:(e,r,t)=>{t.d(r,{A:()=>d});t(96540);var s=t(64058),n=t(74848);function d({name:e,...r}){const t=s[e];return t?(0,n.jsx)(t,{...r}):null}},42638:(e,r,t)=>{t.d(r,{A:()=>s});const s=t.p+"assets/images/component-hcd-example-flow-b82057600ce5e9e4a0f7ea0a61dcbf7f.png"},60159:(e,r,t)=>{t.d(r,{A:()=>s});const s=t.p+"assets/images/component-local-db-5ba34611640c3e325d9dd3cdcb591d1f.png"},67719:(e,r,t)=>{t.d(r,{A:()=>s});const s=t.p+"assets/images/vector-store-retrieval-af7257d77ff0259ab1a0980641d464ce.png"},88690:(e,r,t)=>{t.d(r,{A:()=>s});const s=t.p+"assets/images/component-chroma-db-b69a08e861be3451fe6f2992e203f516.png"}}]); \ No newline at end of file diff --git a/assets/js/8bd4a540.ef87eb43.js b/assets/js/8bd4a540.ef87eb43.js deleted file mode 100644 index 3925aaa51d..0000000000 --- a/assets/js/8bd4a540.ef87eb43.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[2307],{7685:(e,r,t)=>{t.d(r,{A:()=>s});const s=t.p+"assets/images/vector-store-document-ingestion-6157311fb4d16e7f944d55254f0cc0e2.png"},17343:(e,r,t)=>{t.r(r),t.d(r,{CH:()=>o,assets:()=>a,chCodeConfig:()=>x,contentTitle:()=>l,default:()=>u,frontMatter:()=>h,metadata:()=>s,toc:()=>j});const s=JSON.parse('{"id":"Components/components-vector-stores","title":"Vector stores","description":"Vector databases store vector data, which backs AI workloads like chatbots and Retrieval Augmented Generation.","source":"@site/docs/Components/components-vector-stores.mdx","sourceDirName":"Components","slug":"/components-vector-stores","permalink":"/components-vector-stores","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Vector stores","slug":"/components-vector-stores"},"sidebar":"docs","previous":{"title":"Tools","permalink":"/components-tools"},"next":{"title":"Use Langflow Agents","permalink":"/agents"}}');var n=t(74848),d=t(28453),i=t(24754),c=t(17886);const h={title:"Vector stores",slug:"/components-vector-stores"},l="Vector store components in Langflow",a={},o={annotations:i.hk,Code:i.Cy},x={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},j=[{value:"Use a vector store component in a flow",id:"use-a-vector-store-component-in-a-flow",level:2},{value:"Astra DB Vector Store",id:"astra-db-vector-store",level:2},{value:"Generate embeddings",id:"generate-embeddings",level:3},{value:"Hybrid search",id:"hybrid-search",level:3},{value:"AstraDB Graph vector store",id:"astradb-graph-vector-store",level:2},{value:"Cassandra",id:"cassandra",level:2},{value:"Cassandra Graph Vector Store",id:"cassandra-graph-vector-store",level:2},{value:"Chroma DB",id:"chroma-db",level:2},{value:"Clickhouse",id:"clickhouse",level:2},{value:"Couchbase",id:"couchbase",level:2},{value:"Local DB",id:"local-db",level:2},{value:"Elasticsearch",id:"elasticsearch",level:2},{value:"FAISS",id:"faiss",level:2},{value:"Graph RAG",id:"graph-rag",level:2},{value:"Hyper-Converged Database (HCD)",id:"hyper-converged-database-hcd",level:2},{value:"Milvus",id:"milvus",level:2},{value:"MongoDB Atlas",id:"mongodb-atlas",level:2},{value:"Opensearch",id:"opensearch",level:2},{value:"PGVector",id:"pgvector",level:2},{value:"Pinecone",id:"pinecone",level:2},{value:"Qdrant",id:"qdrant",level:2},{value:"Redis",id:"redis",level:2},{value:"Supabase",id:"supabase",level:2},{value:"Upstash",id:"upstash",level:2},{value:"Vectara",id:"vectara",level:2},{value:"Vectara Search",id:"vectara-search",level:2},{value:"Weaviate",id:"weaviate",level:2},{value:"Weaviate Search",id:"weaviate-search",level:2}];function m(e){const r={a:"a",admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,d.R)(),...e.components},{Details:s}=r;return o||p("CH",!1),o.Code||p("CH.Code",!0),s||p("Details",!0),(0,n.jsxs)(n.Fragment,{children:[(0,n.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,n.jsx)(r.header,{children:(0,n.jsx)(r.h1,{id:"vector-store-components-in-langflow",children:"Vector store components in Langflow"})}),"\n",(0,n.jsx)(r.p,{children:"Vector databases store vector data, which backs AI workloads like chatbots and Retrieval Augmented Generation."}),"\n",(0,n.jsx)(r.p,{children:"Vector database components establish connections to existing vector databases or create in-memory vector stores for storing and retrieving vector data."}),"\n",(0,n.jsxs)(r.p,{children:["Vector database components are distinct from ",(0,n.jsx)(r.a,{href:"/components-memories",children:"memory components"}),", which are built specifically for storing and retrieving chat messages from internal Langflow memory or external databases. For more information, see ",(0,n.jsx)(r.a,{href:"/memory",children:"Memory management options"}),"."]}),"\n",(0,n.jsx)(r.h2,{id:"use-a-vector-store-component-in-a-flow",children:"Use a vector store component in a flow"}),"\n",(0,n.jsxs)(r.p,{children:["This example uses the ",(0,n.jsx)(r.strong,{children:"Chroma DB"})," vector store component. Your vector store component's parameters and authentication may be different, but the document ingestion workflow is the same. A document is loaded from a local machine and chunked. The vector store component generates embeddings with the connected ",(0,n.jsx)(r.a,{href:"/components-models",children:"model"})," component, and stores them in the connected vector database."]}),"\n",(0,n.jsx)(r.p,{children:"This vector data can then be retrieved for workloads like Retrieval Augmented Generation."}),"\n",(0,n.jsx)(r.p,{children:(0,n.jsx)(r.img,{alt:"Embedding data into a vector store",src:t(7685).A+"",width:"4000",height:"2512"})}),"\n",(0,n.jsxs)(r.p,{children:["The user's chat input is embedded and compared to the vectors embedded during document ingestion for a similarity search.\nThe results are output from the vector database component as a ",(0,n.jsx)(r.a,{href:"/concepts-objects",children:"Data"})," object and parsed into text.\nThis text fills the ",(0,n.jsx)(r.code,{children:"{context}"})," variable in the ",(0,n.jsx)(r.strong,{children:"Prompt"})," component, which informs the ",(0,n.jsx)(r.strong,{children:"Open AI model"})," component's responses."]}),"\n",(0,n.jsx)(r.p,{children:(0,n.jsx)(r.img,{alt:"Retrieval from a vector store",src:t(67719).A+"",width:"4000",height:"1324"})}),"\n",(0,n.jsx)(r.h2,{id:"astra-db-vector-store",children:"Astra DB Vector Store"}),"\n",(0,n.jsx)(r.p,{children:"This component implements a Vector Store using Astra DB with search capabilities."}),"\n",(0,n.jsxs)(r.p,{children:["For more information, see the ",(0,n.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/databases/create-database.html",children:"DataStax documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Display Name"}),(0,n.jsx)(r.th,{children:"Info"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"token"}),(0,n.jsx)(r.td,{children:"Astra DB Application Token"}),(0,n.jsx)(r.td,{children:"The authentication token for accessing Astra DB."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"environment"}),(0,n.jsx)(r.td,{children:"Environment"}),(0,n.jsxs)(r.td,{children:["The environment for the Astra DB API Endpoint. For example, ",(0,n.jsx)(r.code,{children:"dev"})," or ",(0,n.jsx)(r.code,{children:"prod"}),"."]})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"database_name"}),(0,n.jsx)(r.td,{children:"Database"}),(0,n.jsx)(r.td,{children:"The database name for the Astra DB instance."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"api_endpoint"}),(0,n.jsx)(r.td,{children:"Astra DB API Endpoint"}),(0,n.jsx)(r.td,{children:"The API endpoint for the Astra DB instance. This supersedes the database selection."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"collection_name"}),(0,n.jsx)(r.td,{children:"Collection"}),(0,n.jsx)(r.td,{children:"The name of the collection within Astra DB where the vectors are stored."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"keyspace"}),(0,n.jsx)(r.td,{children:"Keyspace"}),(0,n.jsx)(r.td,{children:"An optional keyspace within Astra DB to use for the collection."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding_choice"}),(0,n.jsx)(r.td,{children:"Embedding Model or Astra Vectorize"}),(0,n.jsx)(r.td,{children:"Choose an embedding model or use Astra vectorize."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding_model"}),(0,n.jsx)(r.td,{children:"Embedding Model"}),(0,n.jsx)(r.td,{children:"Specify the embedding model. Not required for Astra vectorize collections."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Number of Search Results"}),(0,n.jsxs)(r.td,{children:["The number of search results to return. Default:",(0,n.jsx)(r.code,{children:"4"}),"."]})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_type"}),(0,n.jsx)(r.td,{children:"Search Type"}),(0,n.jsxs)(r.td,{children:["The search type to use. The options are ",(0,n.jsx)(r.code,{children:"Similarity"}),", ",(0,n.jsx)(r.code,{children:"Similarity with score threshold"}),", and ",(0,n.jsx)(r.code,{children:"MMR (Max Marginal Relevance)"}),"."]})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_score_threshold"}),(0,n.jsx)(r.td,{children:"Search Score Threshold"}),(0,n.jsxs)(r.td,{children:["The minimum similarity score threshold for search results when using the ",(0,n.jsx)(r.code,{children:"Similarity with score threshold"})," option."]})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"advanced_search_filter"}),(0,n.jsx)(r.td,{children:"Search Metadata Filter"}),(0,n.jsx)(r.td,{children:"An optional dictionary of filters to apply to the search query."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"autodetect_collection"}),(0,n.jsx)(r.td,{children:"Autodetect Collection"}),(0,n.jsx)(r.td,{children:"A boolean flag to determine whether to autodetect the collection."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"content_field"}),(0,n.jsx)(r.td,{children:"Content Field"}),(0,n.jsx)(r.td,{children:"A field to use as the text content field for the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"deletion_field"}),(0,n.jsx)(r.td,{children:"Deletion Based On Field"}),(0,n.jsx)(r.td,{children:"When provided, documents in the target collection with metadata field values matching the input metadata field value are deleted before new data is loaded."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ignore_invalid_documents"}),(0,n.jsx)(r.td,{children:"Ignore Invalid Documents"}),(0,n.jsx)(r.td,{children:"A boolean flag to determine whether to ignore invalid documents at runtime."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"astradb_vectorstore_kwargs"}),(0,n.jsx)(r.td,{children:"AstraDBVectorStore Parameters"}),(0,n.jsx)(r.td,{children:"An optional dictionary of additional parameters for the AstraDBVectorStore."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Display Name"}),(0,n.jsx)(r.th,{children:"Info"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"Vector Store"}),(0,n.jsx)(r.td,{children:"The Astra DB vector store instance configured with the specified parameters."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"Search Results"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/concepts-objects#data-object",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h3,{id:"generate-embeddings",children:"Generate embeddings"}),"\n",(0,n.jsxs)(r.p,{children:["The ",(0,n.jsx)(r.strong,{children:"Astra DB Vector Store"})," component offers two methods for generating embeddings."]}),"\n",(0,n.jsxs)(r.ol,{children:["\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.strong,{children:"Embedding Model"}),": Use your own embedding model by connecting an ",(0,n.jsx)(r.a,{href:"/components-embedding-models",children:"Embeddings"})," component in Langflow."]}),"\n"]}),"\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.strong,{children:"Astra Vectorize"}),": Use Astra DB's built-in embedding generation service. When creating a new collection, choose the embeddings provider and models, including NVIDIA's ",(0,n.jsx)(r.code,{children:"NV-Embed-QA"})," model hosted by Datastax."]}),"\n"]}),"\n"]}),"\n",(0,n.jsx)(r.admonition,{type:"important",children:(0,n.jsx)(r.p,{children:"The embedding model selection is made when creating a new collection and cannot be changed later."})}),"\n",(0,n.jsxs)(r.p,{children:["For an example of using the ",(0,n.jsx)(r.strong,{children:"Astra DB Vector Store"})," component with an embedding model, see the ",(0,n.jsx)(r.a,{href:"/vector-store-rag",children:"Vector Store RAG starter project"}),"."]}),"\n",(0,n.jsxs)(r.p,{children:["For more information, see the ",(0,n.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/databases/embedding-generation.html",children:"Astra DB Serverless documentation"}),"."]}),"\n",(0,n.jsx)(r.h3,{id:"hybrid-search",children:"Hybrid search"}),"\n",(0,n.jsxs)(r.p,{children:["The ",(0,n.jsx)(r.strong,{children:"Astra DB"})," component includes ",(0,n.jsx)(r.strong,{children:"hybrid search"}),", which is enabled by default."]}),"\n",(0,n.jsxs)(r.p,{children:["The component fields related to hybrid search are ",(0,n.jsx)(r.strong,{children:"Search Query"}),", ",(0,n.jsx)(r.strong,{children:"Lexical Terms"}),", and ",(0,n.jsx)(r.strong,{children:"Reranker"}),"."]}),"\n",(0,n.jsxs)(r.ul,{children:["\n",(0,n.jsxs)(r.li,{children:[(0,n.jsx)(r.strong,{children:"Search Query"})," finds results by vector similarity."]}),"\n",(0,n.jsxs)(r.li,{children:[(0,n.jsx)(r.strong,{children:"Lexical Terms"})," is a comma-separated string of keywords, like ",(0,n.jsx)(r.code,{children:"features, data, attributes, characteristics"}),"."]}),"\n",(0,n.jsxs)(r.li,{children:[(0,n.jsx)(r.strong,{children:"Reranker"})," is the re-ranker model used in the hybrid search.\nThe re-ranker model is ",(0,n.jsx)(r.code,{children:"nvidia/llama-3.2-nv.reranker"}),"."]}),"\n"]}),"\n",(0,n.jsxs)(r.p,{children:[(0,n.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/databases/hybrid-search.html",children:"Hybrid search"})," performs a vector similarity search and a lexical search, compares the results of both searches, and then returns the most relevant results overall."]}),"\n",(0,n.jsx)(r.admonition,{type:"important",children:(0,n.jsxs)(r.p,{children:["To use hybrid search, your collection must be created with vector, lexical, and rerank capabilities enabled. These capabilities are enabled by default when you create a collection in a database in the AWS us-east-2 region.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/api-reference/collection-methods/create-collection.html#example-hybrid",children:"DataStax documentation"}),"."]})}),"\n",(0,n.jsxs)(r.p,{children:["To use ",(0,n.jsx)(r.strong,{children:"Hybrid search"})," in the ",(0,n.jsx)(r.strong,{children:"Astra DB"})," component, do the following:"]}),"\n",(0,n.jsxs)(r.ol,{children:["\n",(0,n.jsxs)(r.li,{children:["Click ",(0,n.jsx)(r.strong,{children:"New Flow"})," > ",(0,n.jsx)(r.strong,{children:"RAG"})," > ",(0,n.jsx)(r.strong,{children:"Hybrid Search RAG"}),"."]}),"\n",(0,n.jsxs)(r.li,{children:["In the ",(0,n.jsx)(r.strong,{children:"OpenAI"})," model component, add your ",(0,n.jsx)(r.strong,{children:"OpenAI API key"}),"."]}),"\n",(0,n.jsxs)(r.li,{children:["In the ",(0,n.jsx)(r.strong,{children:"Astra DB"})," vector store component, add your ",(0,n.jsx)(r.strong,{children:"Astra DB Application Token"}),"."]}),"\n",(0,n.jsxs)(r.li,{children:["In the ",(0,n.jsx)(r.strong,{children:"Database"})," field, select your database."]}),"\n",(0,n.jsxs)(r.li,{children:["In the ",(0,n.jsx)(r.strong,{children:"Collection"})," field, select or create a collection with hybrid search capabilities enabled."]}),"\n",(0,n.jsxs)(r.li,{children:["In the ",(0,n.jsx)(r.strong,{children:"Playground"}),", enter a question about your data, such as ",(0,n.jsx)(r.code,{children:"What are the features of my data?"}),"\nYour query is sent to two components: an ",(0,n.jsx)(r.strong,{children:"OpenAI"})," model component and the ",(0,n.jsx)(r.strong,{children:"Astra DB"})," vector database component.\nThe ",(0,n.jsx)(r.strong,{children:"OpenAI"})," component contains a prompt for creating the lexical query from your input:"]}),"\n"]}),"\n",(0,n.jsx)(o.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"You are a database query planner that takes a user's requests, and then converts to a search against the subject matter in question.",props:{}}]},{tokens:[{content:"You should convert the query into:",props:{}}]},{tokens:[{content:"1. A list of keywords to use against a Lucene text analyzer index, no more than 4. Strictly unigrams.",props:{}}]},{tokens:[{content:"2. A question to use as the basis for a QA embedding engine.",props:{}}]},{tokens:[{content:"Avoid common keywords associated with the user's subject matter.",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,n.jsxs)(r.ol,{start:"7",children:["\n",(0,n.jsxs)(r.li,{children:["To view the keywords and questions the ",(0,n.jsx)(r.strong,{children:"OpenAI"})," component generates from your collection, in the ",(0,n.jsx)(r.strong,{children:"OpenAI"})," component, click ",(0,n.jsx)(c.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,n.jsx)(r.strong,{children:"Inspect output"}),"."]}),"\n"]}),"\n",(0,n.jsx)(o.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"1. Keywords: features, data, attributes, characteristics",props:{}}]},{tokens:[{content:"2. Question: What characteristics can be identified in my data?",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,n.jsxs)(r.ol,{start:"8",children:["\n",(0,n.jsxs)(r.li,{children:["\n",(0,n.jsxs)(r.p,{children:["To view the ",(0,n.jsx)(r.a,{href:"/concepts-objects#dataframe-object",children:"DataFrame"})," generated from the ",(0,n.jsx)(r.strong,{children:"OpenAI"})," component's response, in the ",(0,n.jsx)(r.strong,{children:"Structured Output"})," component, click ",(0,n.jsx)(c.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,n.jsx)(r.strong,{children:"Inspect output"}),".\nThe DataFrame is passed to a ",(0,n.jsx)(r.strong,{children:"Parser"})," component, which parses the contents of the ",(0,n.jsx)(r.strong,{children:"Keywords"})," column into a string."]}),"\n",(0,n.jsxs)(r.p,{children:["This string of comma-separated words is passed to the ",(0,n.jsx)(r.strong,{children:"Lexical Terms"})," port of the ",(0,n.jsx)(r.strong,{children:"Astra DB"})," component.\nNote that the ",(0,n.jsx)(r.strong,{children:"Search Query"})," port of the Astra DB port is connected to the ",(0,n.jsx)(r.strong,{children:"Chat Input"})," component from step 6.\nThis ",(0,n.jsx)(r.strong,{children:"Search Query"})," is vectorized, and both the ",(0,n.jsx)(r.strong,{children:"Search Query"})," and ",(0,n.jsx)(r.strong,{children:"Lexical Terms"})," content are sent to the reranker at the ",(0,n.jsx)(r.code,{children:"find_and_rerank"})," endpoint."]}),"\n",(0,n.jsxs)(r.p,{children:["The reranker compares the vector search results against the string of terms from the lexical search.\nThe highest-ranked results of your hybrid search are returned to the ",(0,n.jsx)(r.strong,{children:"Playground"}),"."]}),"\n"]}),"\n"]}),"\n",(0,n.jsxs)(r.p,{children:["For more information, see the ",(0,n.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/databases/hybrid-search.html",children:"DataStax documentation"}),"."]}),"\n",(0,n.jsx)(r.h2,{id:"astradb-graph-vector-store",children:"AstraDB Graph vector store"}),"\n",(0,n.jsxs)(r.p,{children:["This component implements a Vector Store using AstraDB with graph capabilities.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/tutorials/graph-rag.html",children:"Astra DB Serverless documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Display Name"}),(0,n.jsx)(r.th,{children:"Info"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"collection_name"}),(0,n.jsx)(r.td,{children:"Collection Name"}),(0,n.jsx)(r.td,{children:"The name of the collection within AstraDB where the vectors are stored. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"token"}),(0,n.jsx)(r.td,{children:"Astra DB Application Token"}),(0,n.jsx)(r.td,{children:"Authentication token for accessing AstraDB. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"api_endpoint"}),(0,n.jsx)(r.td,{children:"API Endpoint"}),(0,n.jsx)(r.td,{children:"API endpoint URL for the AstraDB service. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_input"}),(0,n.jsx)(r.td,{children:"Search Input"}),(0,n.jsx)(r.td,{children:"Query string for similarity search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Ingest Data"}),(0,n.jsx)(r.td,{children:"Data to be ingested into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"namespace"}),(0,n.jsx)(r.td,{children:"Namespace"}),(0,n.jsx)(r.td,{children:"Optional namespace within AstraDB to use for the collection."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embedding Model"}),(0,n.jsx)(r.td,{children:"Embedding model to use."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"metric"}),(0,n.jsx)(r.td,{children:"Metric"}),(0,n.jsx)(r.td,{children:'Distance metric for vector comparisons. The options are "cosine", "euclidean", "dot_product".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"setup_mode"}),(0,n.jsx)(r.td,{children:"Setup Mode"}),(0,n.jsx)(r.td,{children:'Configuration mode for setting up the vector store. The options are "Sync", "Async", "Off".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"pre_delete_collection"}),(0,n.jsx)(r.td,{children:"Pre Delete Collection"}),(0,n.jsx)(r.td,{children:"Boolean flag to determine whether to delete the collection before creating a new one."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Number of Results"}),(0,n.jsx)(r.td,{children:"Number of results to return in similarity search. Default: 4."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_type"}),(0,n.jsx)(r.td,{children:"Search Type"}),(0,n.jsx)(r.td,{children:'Search type to use. The options are "Similarity", "Graph Traversal", "Hybrid".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"traversal_depth"}),(0,n.jsx)(r.td,{children:"Traversal Depth"}),(0,n.jsx)(r.td,{children:"Maximum depth for graph traversal searches. Default: 1."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_score_threshold"}),(0,n.jsx)(r.td,{children:"Search Score Threshold"}),(0,n.jsx)(r.td,{children:"Minimum similarity score threshold for search results."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_filter"}),(0,n.jsx)(r.td,{children:"Search Metadata Filter"}),(0,n.jsx)(r.td,{children:"Optional dictionary of filters to apply to the search query."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Display Name"}),(0,n.jsx)(r.th,{children:"Info"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"Vector Store"}),(0,n.jsx)(r.td,{children:"The Graph RAG vector store instance configured with the specified parameters."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"Search Results"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/concepts-objects#data-object",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"cassandra",children:"Cassandra"}),"\n",(0,n.jsxs)(r.p,{children:["This component creates a Cassandra Vector Store with search capabilities.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://cassandra.apache.org/doc/latest/cassandra/vector-search/overview.html",children:"Cassandra documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"database_ref"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Contact points for the database or AstraDB database ID."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"username"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Username for the database (leave empty for AstraDB)."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"token"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"User password for the database or AstraDB token."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"keyspace"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Table Keyspace or AstraDB namespace."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"table_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Name of the table or AstraDB collection."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ttl_seconds"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"Time-to-live for added texts."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"batch_size"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"Number of data to process in a single batch."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"setup_mode"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Configuration mode for setting up the Cassandra table."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"cluster_kwargs"}),(0,n.jsx)(r.td,{children:"Dict"}),(0,n.jsx)(r.td,{children:"Additional keyword arguments for the Cassandra cluster."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Query for similarity search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Data"}),(0,n.jsx)(r.td,{children:"Data to be ingested into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"Embedding function to use."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"Number of results to return in search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_type"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Type of search to perform."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_score_threshold"}),(0,n.jsx)(r.td,{children:"Float"}),(0,n.jsx)(r.td,{children:"Minimum similarity score for search results."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_filter"}),(0,n.jsx)(r.td,{children:"Dict"}),(0,n.jsx)(r.td,{children:"Metadata filters for search query."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"body_search"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Document textual search terms."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"enable_body_search"}),(0,n.jsx)(r.td,{children:"Boolean"}),(0,n.jsx)(r.td,{children:"Flag to enable body search."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"Cassandra"}),(0,n.jsx)(r.td,{children:"The Cassandra vector store instance configured with the specified parameters."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"List[Data]"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.code,{children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"cassandra-graph-vector-store",children:"Cassandra Graph Vector Store"}),"\n",(0,n.jsx)(r.p,{children:"This component implements a Cassandra Graph Vector Store with search capabilities."}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Display Name"}),(0,n.jsx)(r.th,{children:"Info"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"database_ref"}),(0,n.jsx)(r.td,{children:"Contact Points / Astra Database ID"}),(0,n.jsx)(r.td,{children:"The contact points for the database or AstraDB database ID. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"username"}),(0,n.jsx)(r.td,{children:"Username"}),(0,n.jsx)(r.td,{children:"The username for the database. Leave this field empty for AstraDB."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"token"}),(0,n.jsx)(r.td,{children:"Password / AstraDB Token"}),(0,n.jsx)(r.td,{children:"The user password for the database or AstraDB token. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"keyspace"}),(0,n.jsx)(r.td,{children:"Keyspace"}),(0,n.jsx)(r.td,{children:"The table Keyspace or AstraDB namespace. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"table_name"}),(0,n.jsx)(r.td,{children:"Table Name"}),(0,n.jsx)(r.td,{children:"The name of the table or AstraDB collection where vectors are stored. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"setup_mode"}),(0,n.jsx)(r.td,{children:"Setup Mode"}),(0,n.jsx)(r.td,{children:'The configuration mode for setting up the Cassandra table. The options are "Sync" or "Off". Default: "Sync".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"cluster_kwargs"}),(0,n.jsx)(r.td,{children:"Cluster arguments"}),(0,n.jsx)(r.td,{children:"An optional dictionary of additional keyword arguments for the Cassandra cluster."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"Search Query"}),(0,n.jsx)(r.td,{children:"The query string for similarity search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Ingest Data"}),(0,n.jsx)(r.td,{children:"The list of data to be ingested into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embedding"}),(0,n.jsx)(r.td,{children:"The embedding model to use."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Number of Results"}),(0,n.jsx)(r.td,{children:"The number of results to return in similarity search. Default: 4."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_type"}),(0,n.jsx)(r.td,{children:"Search Type"}),(0,n.jsx)(r.td,{children:'The search type to use. The options are "Traversal", "MMR traversal", "Similarity", "Similarity with score threshold", or "MMR (Max Marginal Relevance)". Default: "Traversal".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"depth"}),(0,n.jsx)(r.td,{children:"Depth of traversal"}),(0,n.jsx)(r.td,{children:'The maximum depth of edges to traverse. Used for "Traversal" or "MMR traversal" search types. Default: 1.'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_score_threshold"}),(0,n.jsx)(r.td,{children:"Search Score Threshold"}),(0,n.jsx)(r.td,{children:'The minimum similarity score threshold for search results. Used for "Similarity with score threshold" search types.'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_filter"}),(0,n.jsx)(r.td,{children:"Search Metadata Filter"}),(0,n.jsx)(r.td,{children:"An optional dictionary of filters to apply to the search query."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Display Name"}),(0,n.jsx)(r.th,{children:"Info"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"Vector Store"}),(0,n.jsx)(r.td,{children:"The Cassandra Graph vector store instance configured with the specified parameters."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"Search Results"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/concepts-objects#data-object",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"chroma-db",children:"Chroma DB"}),"\n",(0,n.jsx)(r.p,{children:"This component creates a Chroma Vector Store with search capabilities."}),"\n",(0,n.jsx)(r.p,{children:"The Chroma DB component creates an ephemeral vector database for experimentation and vector storage."}),"\n",(0,n.jsxs)(r.ol,{children:["\n",(0,n.jsxs)(r.li,{children:["To use this component in a flow, connect it to a component that outputs ",(0,n.jsx)(r.strong,{children:"Data"})," or ",(0,n.jsx)(r.strong,{children:"DataFrame"}),".\nThis example splits text from a ",(0,n.jsx)(r.a,{href:"/components-data#url",children:"URL"})," component, and computes embeddings with the connected ",(0,n.jsx)(r.strong,{children:"OpenAI Embeddings"})," component. Chroma DB computes embeddings by default, but you can connect your own embeddings model, as seen in this example."]}),"\n"]}),"\n",(0,n.jsx)(r.p,{children:(0,n.jsx)(r.img,{alt:"ChromaDB receiving split text",src:t(88690).A+"",width:"4000",height:"2694"})}),"\n",(0,n.jsxs)(r.ol,{start:"2",children:["\n",(0,n.jsxs)(r.li,{children:["In the ",(0,n.jsx)(r.strong,{children:"Chroma DB"})," component, in the ",(0,n.jsx)(r.strong,{children:"Collection"})," field, enter a name for your embeddings collection."]}),"\n",(0,n.jsxs)(r.li,{children:["Optionally, to persist the Chroma database, in the ",(0,n.jsx)(r.strong,{children:"Persist"})," field, enter a directory to store the ",(0,n.jsx)(r.code,{children:"chroma.sqlite3"})," file.\nThis example uses ",(0,n.jsx)(r.code,{children:"./chroma-db"})," to create a directory relative to where Langflow is running."]}),"\n",(0,n.jsxs)(r.li,{children:["To load data and embeddings into your Chroma database, in the ",(0,n.jsx)(r.strong,{children:"Chroma DB"})," component, click ",(0,n.jsx)(c.A,{name:"Play","aria-hidden":"true"})," ",(0,n.jsx)(r.strong,{children:"Run component"}),"."]}),"\n"]}),"\n",(0,n.jsx)(r.admonition,{type:"tip",children:(0,n.jsxs)(r.p,{children:["When loading duplicate documents, enable the ",(0,n.jsx)(r.strong,{children:"Allow Duplicates"})," option in Chroma DB if you want to store multiple copies of the same content, or disable it to automatically deduplicate your data."]})}),"\n",(0,n.jsxs)(r.ol,{start:"5",children:["\n",(0,n.jsxs)(r.li,{children:["To view the split data, in the ",(0,n.jsx)(r.strong,{children:"Split Text"})," component, click ",(0,n.jsx)(c.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,n.jsx)(r.strong,{children:"Inspect output"}),"."]}),"\n",(0,n.jsxs)(r.li,{children:["To query your loaded data, open the ",(0,n.jsx)(r.strong,{children:"Playground"})," and query your database.\nYour input is converted to vector data and compared to the stored vectors in a vector similarity search."]}),"\n"]}),"\n",(0,n.jsxs)(r.p,{children:["For more information, see the ",(0,n.jsx)(r.a,{href:"https://docs.trychroma.com/",children:"Chroma documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"collection_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:'The name of the Chroma collection. Default: "langflow".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"persist_directory"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The directory to persist the Chroma database."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The query to search for in the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Data"}),(0,n.jsxs)(r.td,{children:["The data to ingest into the vector store (list of ",(0,n.jsx)(r.code,{children:"Data"})," objects)."]})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"The embedding function to use for the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"chroma_server_cors_allow_origins"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The CORS allow origins for the Chroma server."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"chroma_server_host"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The host for the Chroma server."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"chroma_server_http_port"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"The HTTP port for the Chroma server."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"chroma_server_grpc_port"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"The gRPC port for the Chroma server."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"chroma_server_ssl_enabled"}),(0,n.jsx)(r.td,{children:"Boolean"}),(0,n.jsx)(r.td,{children:"Enable SSL for the Chroma server."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"allow_duplicates"}),(0,n.jsx)(r.td,{children:"Boolean"}),(0,n.jsx)(r.td,{children:"Allow duplicate documents in the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_type"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:'The type of search to perform: "Similarity" or "MMR".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsxs)(r.td,{children:["The number of results to return from the search. Default: ",(0,n.jsx)(r.code,{children:"10"}),"."]})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"limit"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsxs)(r.td,{children:["The limit of the number of records to compare when ",(0,n.jsx)(r.code,{children:"Allow Duplicates"})," is ",(0,n.jsx)(r.code,{children:"False"}),"."]})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"Chroma"}),(0,n.jsx)(r.td,{children:"The Chroma vector store instance."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"List[Data]"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/concepts-objects#data-object",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"clickhouse",children:"Clickhouse"}),"\n",(0,n.jsxs)(r.p,{children:["This component implements a Clickhouse Vector Store with search capabilities.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://clickhouse.com/docs/en/intro",children:"Clickhouse Documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Display Name"}),(0,n.jsx)(r.th,{children:"Info"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"host"}),(0,n.jsx)(r.td,{children:"hostname"}),(0,n.jsx)(r.td,{children:'The Clickhouse server hostname. Required. Default: "localhost".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"port"}),(0,n.jsx)(r.td,{children:"port"}),(0,n.jsx)(r.td,{children:"The Clickhouse server port. Required. Default: 8123."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"database"}),(0,n.jsx)(r.td,{children:"database"}),(0,n.jsx)(r.td,{children:"The Clickhouse database name. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"table"}),(0,n.jsx)(r.td,{children:"Table name"}),(0,n.jsx)(r.td,{children:"The Clickhouse table name. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"username"}),(0,n.jsx)(r.td,{children:"The ClickHouse user name."}),(0,n.jsx)(r.td,{children:"Username for authentication. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"password"}),(0,n.jsx)(r.td,{children:"The password for username."}),(0,n.jsx)(r.td,{children:"Password for authentication. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"index_type"}),(0,n.jsx)(r.td,{children:"index_type"}),(0,n.jsx)(r.td,{children:'Type of the index. The options are "annoy" and "vector_similarity". Default: "annoy".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"metric"}),(0,n.jsx)(r.td,{children:"metric"}),(0,n.jsx)(r.td,{children:'Metric to compute distance. The options are "angular", "euclidean", "manhattan", "hamming", "dot". Default: "angular".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"secure"}),(0,n.jsx)(r.td,{children:"Use https/TLS"}),(0,n.jsx)(r.td,{children:"Overrides inferred values from the interface or port arguments. Default: false."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"index_param"}),(0,n.jsx)(r.td,{children:"Param of the index"}),(0,n.jsx)(r.td,{children:"Index parameters. Default: \"'L2Distance',100\"."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"index_query_params"}),(0,n.jsx)(r.td,{children:"index query params"}),(0,n.jsx)(r.td,{children:"Additional index query parameters."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"Search Query"}),(0,n.jsx)(r.td,{children:"The query string for similarity search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Ingest Data"}),(0,n.jsx)(r.td,{children:"The data to be ingested into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embedding"}),(0,n.jsx)(r.td,{children:"The embedding model to use."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Number of Results"}),(0,n.jsx)(r.td,{children:"The number of results to return in similarity search. Default: 4."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"score_threshold"}),(0,n.jsx)(r.td,{children:"Score threshold"}),(0,n.jsx)(r.td,{children:"The threshold for similarity scores."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Display Name"}),(0,n.jsx)(r.th,{children:"Info"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"Vector Store"}),(0,n.jsx)(r.td,{children:"The Clickhouse vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"Search Results"}),(0,n.jsx)(r.td,{children:"The results of the similarity search as a list of Data objects."})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"couchbase",children:"Couchbase"}),"\n",(0,n.jsxs)(r.p,{children:["This component creates a Couchbase Vector Store with search capabilities.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://docs.couchbase.com/home/index.html",children:"Couchbase documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"couchbase_connection_string"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"Couchbase Cluster connection string. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"couchbase_username"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Couchbase username. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"couchbase_password"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"Couchbase password. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"bucket_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Name of the Couchbase bucket. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"scope_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Name of the Couchbase scope. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"collection_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Name of the Couchbase collection. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"index_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Name of the Couchbase index. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The query to search for in the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Data"}),(0,n.jsx)(r.td,{children:"The list of data to ingest into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"The embedding function to use for the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"Number of results to return from the search. Default: 4."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsx)(r.tbody,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"CouchbaseVectorStore"}),(0,n.jsx)(r.td,{children:"A Couchbase vector store instance configured with the specified parameters."})]})})]})]}),"\n",(0,n.jsx)(r.h2,{id:"local-db",children:"Local DB"}),"\n",(0,n.jsxs)(r.p,{children:["The ",(0,n.jsx)(r.strong,{children:"Local DB"})," component is Langflow's enhanced version of Chroma DB."]}),"\n",(0,n.jsx)(r.p,{children:"The component adds a user-friendly interface with two modes (Ingest and Retrieve), automatic collection management, and built-in persistence in Langflow's cache directory."}),"\n",(0,n.jsxs)(r.p,{children:["Local DB includes ",(0,n.jsx)(r.strong,{children:"Ingest"})," and ",(0,n.jsx)(r.strong,{children:"Retrieve"})," modes."]}),"\n",(0,n.jsxs)(r.p,{children:["The ",(0,n.jsx)(r.strong,{children:"Ingest"})," mode works similarly to ",(0,n.jsx)(r.a,{href:"#chroma-db",children:"ChromaDB"}),", and persists your database to the Langflow cache directory. The Langflow cache directory location is specified in ",(0,n.jsx)(r.code,{children:"LANGFLOW_CONFIG_DIR"}),". For more information, see ",(0,n.jsx)(r.a,{href:"/environment-variables",children:"Environment variables"}),"."]}),"\n",(0,n.jsxs)(r.p,{children:["The ",(0,n.jsx)(r.strong,{children:"Retrieve"})," mode can query your ",(0,n.jsx)(r.strong,{children:"Chroma DB"})," collections."]}),"\n",(0,n.jsx)(r.p,{children:(0,n.jsx)(r.img,{alt:"Local DB retrieving vectors",src:t(60159).A+"",width:"4000",height:"2188"})}),"\n",(0,n.jsxs)(r.p,{children:["For more information, see the ",(0,n.jsx)(r.a,{href:"https://docs.trychroma.com/",children:"Chroma documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"collection_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:'The name of the Chroma collection. Default: "langflow".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"persist_directory"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsxs)(r.td,{children:["Custom base directory to save the vector store. Collections are stored under ",(0,n.jsx)(r.code,{children:"$DIRECTORY/vector_stores/$COLLECTION_NAME"}),". If not specified, it uses your system's cache folder."]})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"existing_collections"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Select a previously created collection to search through its stored data."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"The embedding function to use for the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"allow_duplicates"}),(0,n.jsx)(r.td,{children:"Boolean"}),(0,n.jsx)(r.td,{children:"If false, will not add documents that are already in the Vector Store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_type"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:'Type of search to perform: "Similarity" or "MMR".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Data/DataFrame"}),(0,n.jsx)(r.td,{children:"Data to store. It is embedded and indexed for semantic search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Enter text to search for similar content in the selected collection."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"Number of results to return. Default: 10."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"limit"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"Limit the number of records to compare when Allow Duplicates is False."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"Chroma"}),(0,n.jsx)(r.td,{children:"A local Chroma vector store instance configured with the specified parameters."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsxs)(r.td,{children:["List",(0,n.jsx)(r.a,{href:"/concepts-objects#data-object",children:"Data"})]}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/concepts-objects#data-object",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"elasticsearch",children:"Elasticsearch"}),"\n",(0,n.jsxs)(r.p,{children:["This component creates an Elasticsearch Vector Store with search capabilities.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://www.elastic.co/guide/en/elasticsearch/reference/current/dense-vector.html",children:"Elasticsearch documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"es_url"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Elasticsearch server URL."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"es_user"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Username for Elasticsearch authentication."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"es_password"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"Password for Elasticsearch authentication."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"index_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Name of the Elasticsearch index."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"strategy"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:'Strategy for vector search. The options are "approximate_k_nearest_neighbors" or "script_scoring".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"distance_strategy"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:'Strategy for distance calculation. The options are "COSINE", "EUCLIDEAN_DISTANCE", or "DOT_PRODUCT".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Query for similarity search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Data"}),(0,n.jsx)(r.td,{children:"Data to be ingested into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"Embedding function to use."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsxs)(r.td,{children:["Number of results to return in search. Default: ",(0,n.jsx)(r.code,{children:"4"}),"."]})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"ElasticsearchStore"}),(0,n.jsx)(r.td,{children:"The Elasticsearch vector store instance."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"List[Data]"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/concepts-objects#data-object",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"faiss",children:"FAISS"}),"\n",(0,n.jsxs)(r.p,{children:["This component creates a FAISS Vector Store with search capabilities.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://faiss.ai/index.html",children:"FAISS documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"index_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:'The name of the FAISS index. Default: "langflow_index".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"persist_directory"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Path to save the FAISS index. It is relative to where Langflow is running."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The query to search for in the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Data"}),(0,n.jsx)(r.td,{children:"The list of data to ingest into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"allow_dangerous_deserialization"}),(0,n.jsx)(r.td,{children:"Boolean"}),(0,n.jsx)(r.td,{children:"Set to True to allow loading pickle files from untrusted sources. Default: True."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"The embedding function to use for the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"Number of results to return from the search. Default: 4."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Display Name"}),(0,n.jsx)(r.th,{children:"Info"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"Vector Store"}),(0,n.jsx)(r.td,{children:"The FAISS vector store instance configured with the specified parameters."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"Search Results"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/concepts-objects#data-object",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"graph-rag",children:"Graph RAG"}),"\n",(0,n.jsxs)(r.p,{children:["This component performs Graph RAG (Retrieval Augmented Generation) traversal in a vector store, enabling graph-based document retrieval.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://datastax.github.io/graph-rag/",children:"Graph RAG documentation"}),"."]}),"\n",(0,n.jsxs)(r.p,{children:["For an example flow, see the ",(0,n.jsx)(r.strong,{children:"Graph RAG"})," template."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Display Name"}),(0,n.jsx)(r.th,{children:"Info"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding_model"}),(0,n.jsx)(r.td,{children:"Embedding Model"}),(0,n.jsxs)(r.td,{children:["Specify the embedding model. This is not required for collections embedded with ",(0,n.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/databases/embedding-generation.html",children:"Astra vectorize"}),"."]})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"Vector Store Connection"}),(0,n.jsx)(r.td,{children:"Connection to the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"edge_definition"}),(0,n.jsx)(r.td,{children:"Edge Definition"}),(0,n.jsxs)(r.td,{children:["Edge definition for the graph traversal. For more information, see the ",(0,n.jsx)(r.a,{href:"https://datastax.github.io/graph-rag/reference/graph_retriever/edges/",children:"GraphRAG documentation"}),"."]})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"strategy"}),(0,n.jsx)(r.td,{children:"Traversal Strategies"}),(0,n.jsx)(r.td,{children:"The strategy to use for graph traversal. Strategy options are dynamically loaded from available strategies."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"Search Query"}),(0,n.jsx)(r.td,{children:"The query to search for in the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"graphrag_strategy_kwargs"}),(0,n.jsx)(r.td,{children:"Strategy Parameters"}),(0,n.jsxs)(r.td,{children:["Optional dictionary of additional parameters for the retrieval strategy. For more information, see the ",(0,n.jsx)(r.a,{href:"https://datastax.github.io/graph-rag/reference/graph_retriever/strategies/",children:"strategy documentation"}),"."]})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsx)(r.tbody,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"List[Data]"}),(0,n.jsxs)(r.td,{children:["Results of the graph-based document retrieval as a list of ",(0,n.jsx)(r.a,{href:"/concepts-objects#data-object",children:"Data"})," objects."]})]})})]})]}),"\n",(0,n.jsx)(r.h2,{id:"hyper-converged-database-hcd",children:"Hyper-Converged Database (HCD)"}),"\n",(0,n.jsx)(r.p,{children:"This component implements a Vector Store using HCD."}),"\n",(0,n.jsxs)(r.p,{children:["To use the HCD vector store, add your deployment's collection name, username, password, and HCD Data API endpoint.\nThe endpoint must be formatted like ",(0,n.jsx)(r.code,{children:"http[s]://**DOMAIN_NAME** or **IP_ADDRESS**[:port]"}),", for example, ",(0,n.jsx)(r.code,{children:"http://192.0.2.250:8181"}),"."]}),"\n",(0,n.jsxs)(r.p,{children:["Replace ",(0,n.jsx)(r.strong,{children:"DOMAIN_NAME"})," or ",(0,n.jsx)(r.strong,{children:"IP_ADDRESS"})," with the domain name or IP address of your HCD Data API connection."]}),"\n",(0,n.jsx)(r.p,{children:"To use the HCD vector store for embeddings ingestion, connect it to an embeddings model and a file loader:"}),"\n",(0,n.jsx)(r.p,{children:(0,n.jsx)(r.img,{alt:"HCD vector store embeddings ingestion",src:t(42638).A+"",width:"2294",height:"1684"})}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Display Name"}),(0,n.jsx)(r.th,{children:"Info"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"collection_name"}),(0,n.jsx)(r.td,{children:"Collection Name"}),(0,n.jsx)(r.td,{children:"The name of the collection within HCD where the vectors will be stored. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"username"}),(0,n.jsx)(r.td,{children:"HCD Username"}),(0,n.jsx)(r.td,{children:'Authentication username for accessing HCD. Default is "hcd-superuser". Required.'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"password"}),(0,n.jsx)(r.td,{children:"HCD Password"}),(0,n.jsx)(r.td,{children:"Authentication password for accessing HCD. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"api_endpoint"}),(0,n.jsx)(r.td,{children:"HCD API Endpoint"}),(0,n.jsx)(r.td,{children:"API endpoint URL for the HCD service. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_input"}),(0,n.jsx)(r.td,{children:"Search Input"}),(0,n.jsx)(r.td,{children:"Query string for similarity search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Ingest Data"}),(0,n.jsx)(r.td,{children:"Data to be ingested into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"namespace"}),(0,n.jsx)(r.td,{children:"Namespace"}),(0,n.jsx)(r.td,{children:'Optional namespace within HCD to use for the collection. Default is "default_namespace".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ca_certificate"}),(0,n.jsx)(r.td,{children:"CA Certificate"}),(0,n.jsx)(r.td,{children:"Optional CA certificate for TLS connections to HCD."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"metric"}),(0,n.jsx)(r.td,{children:"Metric"}),(0,n.jsx)(r.td,{children:'Optional distance metric for vector comparisons. Options are "cosine", "dot_product", "euclidean".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"batch_size"}),(0,n.jsx)(r.td,{children:"Batch Size"}),(0,n.jsx)(r.td,{children:"Optional number of data to process in a single batch."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"bulk_insert_batch_concurrency"}),(0,n.jsx)(r.td,{children:"Bulk Insert Batch Concurrency"}),(0,n.jsx)(r.td,{children:"Optional concurrency level for bulk insert operations."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"bulk_insert_overwrite_concurrency"}),(0,n.jsx)(r.td,{children:"Bulk Insert Overwrite Concurrency"}),(0,n.jsx)(r.td,{children:"Optional concurrency level for bulk insert operations that overwrite existing data."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"bulk_delete_concurrency"}),(0,n.jsx)(r.td,{children:"Bulk Delete Concurrency"}),(0,n.jsx)(r.td,{children:"Optional concurrency level for bulk delete operations."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"setup_mode"}),(0,n.jsx)(r.td,{children:"Setup Mode"}),(0,n.jsx)(r.td,{children:'Configuration mode for setting up the vector store. Options are "Sync", "Async", "Off". Default is "Sync".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"pre_delete_collection"}),(0,n.jsx)(r.td,{children:"Pre Delete Collection"}),(0,n.jsx)(r.td,{children:"Boolean flag to determine whether to delete the collection before creating a new one."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"metadata_indexing_include"}),(0,n.jsx)(r.td,{children:"Metadata Indexing Include"}),(0,n.jsx)(r.td,{children:"Optional list of metadata fields to include in the indexing."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embedding or Astra Vectorize"}),(0,n.jsx)(r.td,{children:"Allows either an embedding model or an Astra Vectorize configuration."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"metadata_indexing_exclude"}),(0,n.jsx)(r.td,{children:"Metadata Indexing Exclude"}),(0,n.jsx)(r.td,{children:"Optional list of metadata fields to exclude from the indexing."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"collection_indexing_policy"}),(0,n.jsx)(r.td,{children:"Collection Indexing Policy"}),(0,n.jsx)(r.td,{children:"Optional dictionary defining the indexing policy for the collection."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Number of Results"}),(0,n.jsx)(r.td,{children:"Number of results to return in similarity search. Default is 4."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_type"}),(0,n.jsx)(r.td,{children:"Search Type"}),(0,n.jsx)(r.td,{children:'Search type to use. Options are "Similarity", "Similarity with score threshold", "MMR (Max Marginal Relevance)". Default is "Similarity".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_score_threshold"}),(0,n.jsx)(r.td,{children:"Search Score Threshold"}),(0,n.jsx)(r.td,{children:"Minimum similarity score threshold for search results. Default is 0."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_filter"}),(0,n.jsx)(r.td,{children:"Search Metadata Filter"}),(0,n.jsx)(r.td,{children:"Optional dictionary of filters to apply to the search query."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"HyperConvergedDatabaseVectorStore"}),(0,n.jsx)(r.td,{children:"The HCD vector store instance."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"List[Data]"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/concepts-objects#data-object",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"milvus",children:"Milvus"}),"\n",(0,n.jsxs)(r.p,{children:["This component creates a Milvus Vector Store with search capabilities.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://milvus.io/docs",children:"Milvus documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"collection_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Name of the Milvus collection."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"collection_description"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Description of the Milvus collection."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"uri"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Connection URI for Milvus."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"password"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"Password for Milvus."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"username"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"Username for Milvus."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"batch_size"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"Number of data to process in a single batch."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Query for similarity search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Data"}),(0,n.jsx)(r.td,{children:"Data to be ingested into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"Embedding function to use."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"Number of results to return in search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_type"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Type of search to perform."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_score_threshold"}),(0,n.jsx)(r.td,{children:"Float"}),(0,n.jsx)(r.td,{children:"Minimum similarity score for search results."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_filter"}),(0,n.jsx)(r.td,{children:"Dict"}),(0,n.jsx)(r.td,{children:"Metadata filters for search query."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"setup_mode"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Configuration mode for setting up the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_dimensions"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"Number of dimensions of the vectors."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"pre_delete_collection"}),(0,n.jsx)(r.td,{children:"Boolean"}),(0,n.jsx)(r.td,{children:"Whether to delete the collection before creating a new one."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsx)(r.tbody,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"Milvus"}),(0,n.jsx)(r.td,{children:"A Milvus vector store instance configured with the specified parameters."})]})})]})]}),"\n",(0,n.jsx)(r.h2,{id:"mongodb-atlas",children:"MongoDB Atlas"}),"\n",(0,n.jsxs)(r.p,{children:["This component creates a MongoDB Atlas Vector Store with search capabilities.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://www.mongodb.com/docs/atlas/atlas-vector-search/tutorials/vector-search-quick-start/",children:"MongoDB Atlas documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"mongodb_atlas_cluster_uri"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"The connection URI for your MongoDB Atlas cluster. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"enable_mtls"}),(0,n.jsx)(r.td,{children:"Boolean"}),(0,n.jsx)(r.td,{children:"Enable mutual TLS authentication. Default: false."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"mongodb_atlas_client_cert"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"Client certificate combined with private key for mTLS authentication. Required if mTLS is enabled."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"db_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The name of the database to use. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"collection_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The name of the collection to use. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"index_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The name of the Atlas Search index, it should be a Vector Search. Required."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"insert_mode"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:'How to insert new documents into the collection. The options are "append" or "overwrite". Default: "append".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"The embedding model to use."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"Number of results to return in similarity search. Default: 4."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"index_field"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:'The field to index. Default: "embedding".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"filter_field"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The field to filter the index."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_dimensions"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"Embedding context length. Default: 1536."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"similarity"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:'The method used to measure similarity between vectors. The options are "cosine", "euclidean", or "dotProduct". Default: "cosine".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"quantization"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:'Quantization reduces memory costs by converting 32-bit floats to smaller data types. The options are "scalar" or "binary".'})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"MongoDBAtlasVectorSearch"}),(0,n.jsx)(r.td,{children:"The MongoDB Atlas vector store instance."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"List[Data]"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/concepts-objects#data-object",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"opensearch",children:"Opensearch"}),"\n",(0,n.jsxs)(r.p,{children:["This component creates an Opensearch vector store with search capabilities\nFor more information, see ",(0,n.jsx)(r.a,{href:"https://opensearch.org/platform/search/vector-database.html",children:"Opensearch documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"opensearch_url"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsxs)(r.td,{children:["URL for OpenSearch cluster, such as ",(0,n.jsx)(r.code,{children:"https://192.168.1.1:9200"}),"."]})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"index_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The index name where the vectors are stored in OpenSearch cluster."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_input"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Enter a search query. Leave empty to retrieve all documents or if hybrid search is being used."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Data"}),(0,n.jsx)(r.td,{children:"The data to be ingested into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"The embedding function to use."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_type"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:'The options are "similarity", "similarity_score_threshold", "mmr".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"The number of results to return in search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_score_threshold"}),(0,n.jsx)(r.td,{children:"Float"}),(0,n.jsx)(r.td,{children:"The minimum similarity score threshold for search results."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"username"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The username for the opensource cluster."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"password"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"The password for the opensource cluster."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"use_ssl"}),(0,n.jsx)(r.td,{children:"Boolean"}),(0,n.jsx)(r.td,{children:"Use SSL."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"verify_certs"}),(0,n.jsx)(r.td,{children:"Boolean"}),(0,n.jsx)(r.td,{children:"Verify certificates."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"hybrid_search_query"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Provide a custom hybrid search query in JSON format. This allows you to combine vector similarity and keyword matching."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"OpenSearchVectorSearch"}),(0,n.jsx)(r.td,{children:"OpenSearch vector store instance"})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"List[Data]"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/concepts-objects#data-object",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"pgvector",children:"PGVector"}),"\n",(0,n.jsxs)(r.p,{children:["This component creates a PGVector Vector Store with search capabilities.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://github.com/pgvector/pgvector",children:"PGVector documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"pg_server_url"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"The PostgreSQL server connection string."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"collection_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The table name for the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The query for similarity search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Data"}),(0,n.jsx)(r.td,{children:"The data to be ingested into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"The embedding function to use."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"The number of results to return in search."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Display Name"}),(0,n.jsx)(r.th,{children:"Info"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"Vector Store"}),(0,n.jsx)(r.td,{children:"The PGVector vector store instance configured with the specified parameters."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"Search Results"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/concepts-objects#data-object",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"pinecone",children:"Pinecone"}),"\n",(0,n.jsxs)(r.p,{children:["This component creates a Pinecone Vector Store with search capabilities.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://docs.pinecone.io/home",children:"Pinecone documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"index_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The name of the Pinecone index."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"namespace"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The namespace for the index."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"distance_strategy"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The strategy for calculating distance between vectors."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"pinecone_api_key"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"The API key for Pinecone."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"text_key"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The key in the record to use as text."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The query for similarity search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Data"}),(0,n.jsx)(r.td,{children:"The data to be ingested into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"The embedding function to use."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"The number of results to return in search."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Display Name"}),(0,n.jsx)(r.th,{children:"Info"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"Vector Store"}),(0,n.jsx)(r.td,{children:"The Pinecone vector store instance configured with the specified parameters."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"Search Results"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/concepts-objects#data-object",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"qdrant",children:"Qdrant"}),"\n",(0,n.jsxs)(r.p,{children:["This component creates a Qdrant Vector Store with search capabilities.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://qdrant.tech/documentation/",children:"Qdrant documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"collection_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The name of the Qdrant collection."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"host"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The Qdrant server host."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"port"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"The Qdrant server port."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"grpc_port"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"The Qdrant gRPC port."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"api_key"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"The API key for Qdrant."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"prefix"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The prefix for Qdrant."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"timeout"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"The timeout for Qdrant operations."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"path"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The path for Qdrant."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"url"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The URL for Qdrant."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"distance_func"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The distance function for vector similarity."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"content_payload_key"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The content payload key."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"metadata_payload_key"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The metadata payload key."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The query for similarity search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Data"}),(0,n.jsx)(r.td,{children:"The data to be ingested into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"The embedding function to use."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"The number of results to return in search."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"Qdrant"}),(0,n.jsx)(r.td,{children:"A Qdrant vector store instance."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"List[Data]"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/concepts-objects#data-object",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"redis",children:"Redis"}),"\n",(0,n.jsxs)(r.p,{children:["This component creates a Redis Vector Store with search capabilities.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://redis.io/docs/latest/develop/interact/search-and-query/advanced-concepts/vectors/",children:"Redis documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"redis_server_url"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"The Redis server connection string."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"redis_index_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The name of the Redis index."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"code"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The custom code for Redis (advanced)."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"schema"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The schema for Redis index."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The query for similarity search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Data"}),(0,n.jsx)(r.td,{children:"The data to be ingested into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"The number of results to return in search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"The embedding function to use."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"Redis"}),(0,n.jsx)(r.td,{children:"Redis vector store instance"})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"List[Data]"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/concepts-objects#data-object",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"supabase",children:"Supabase"}),"\n",(0,n.jsxs)(r.p,{children:["This component creates a connection to a Supabase Vector Store with search capabilities.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://supabase.com/docs/guides/ai",children:"Supabase documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"supabase_url"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The URL of the Supabase instance."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"supabase_service_key"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"The service key for Supabase authentication."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"table_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The name of the table in Supabase."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"query_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The name of the query to use."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The query for similarity search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Data"}),(0,n.jsx)(r.td,{children:"The data to be ingested into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"The embedding function to use."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"The number of results to return in search."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"SupabaseVectorStore"}),(0,n.jsx)(r.td,{children:"A Supabase vector store instance."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"List[Data]"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/concepts-objects#data-object",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"upstash",children:"Upstash"}),"\n",(0,n.jsxs)(r.p,{children:["This component creates an Upstash Vector Store with search capabilities.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://upstash.com/docs/introduction",children:"Upstash documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"index_url"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The URL of the Upstash index."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"index_token"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"The token for the Upstash index."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"text_key"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The key in the record to use as text."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"namespace"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The namespace for the index."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The query for similarity search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"metadata_filter"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"Filter documents by metadata."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"Data"}),(0,n.jsx)(r.td,{children:"The data to be ingested into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"The embedding function to use."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"The number of results to return in search."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"UpstashVectorStore"}),(0,n.jsx)(r.td,{children:"An Upstash vector store instance."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"List[Data]"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/concepts-objects#data-object",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"vectara",children:"Vectara"}),"\n",(0,n.jsxs)(r.p,{children:["This component creates a Vectara Vector Store with search capabilities.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://docs.vectara.com/docs/",children:"Vectara documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vectara_customer_id"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The Vectara customer ID."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vectara_corpus_id"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The Vectara corpus ID."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vectara_api_key"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"The Vectara API key."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"The embedding function to use (optional)."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"ingest_data"}),(0,n.jsx)(r.td,{children:"List[Document/Data]"}),(0,n.jsx)(r.td,{children:"The data to be ingested into the vector store."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_query"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The query for similarity search."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"number_of_results"}),(0,n.jsx)(r.td,{children:"Integer"}),(0,n.jsx)(r.td,{children:"The number of results to return in search."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"VectaraVectorStore"}),(0,n.jsx)(r.td,{children:"Vectara vector store instance."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"List[Data]"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/concepts-objects#data-object",children:"Data"})," objects."]})]})]})]})]}),"\n",(0,n.jsx)(r.h2,{id:"vectara-search",children:"Vectara Search"}),"\n",(0,n.jsxs)(r.p,{children:["This component searches a Vectara Vector Store for documents based on the provided input.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://docs.vectara.com/docs/",children:"Vectara documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_type"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:'The type of search, such as "Similarity" or "MMR".'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"input_value"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The search query."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vectara_customer_id"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The Vectara customer ID."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vectara_corpus_id"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The Vectara corpus ID."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vectara_api_key"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"The Vectara API key."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"files_url"}),(0,n.jsx)(r.td,{children:"List[String]"}),(0,n.jsx)(r.td,{children:"Optional URLs for file initialization."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsx)(r.tbody,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"List[Data]"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/concepts-objects#data-object",children:"Data"})," objects."]})]})})]})]}),"\n",(0,n.jsx)(r.h2,{id:"weaviate",children:"Weaviate"}),"\n",(0,n.jsxs)(r.p,{children:["This component facilitates a Weaviate Vector Store setup, optimizing text and document indexing and retrieval.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://weaviate.io/developers/weaviate",children:"Weaviate Documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"weaviate_url"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The default instance URL."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_by_text"}),(0,n.jsx)(r.td,{children:"Boolean"}),(0,n.jsx)(r.td,{children:"Indicates whether to search by text."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"api_key"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"The optional API key for authentication."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"index_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The optional index name."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"text_key"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The default text extraction key."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"input"}),(0,n.jsx)(r.td,{children:"Document"}),(0,n.jsx)(r.td,{children:"The document or record."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"The embedding model used."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"attributes"}),(0,n.jsx)(r.td,{children:"List[String]"}),(0,n.jsx)(r.td,{children:"Optional additional attributes."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsx)(r.tbody,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"vector_store"}),(0,n.jsx)(r.td,{children:"WeaviateVectorStore"}),(0,n.jsx)(r.td,{children:"The Weaviate vector store instance."})]})})]})]}),"\n",(0,n.jsx)(r.h2,{id:"weaviate-search",children:"Weaviate Search"}),"\n",(0,n.jsxs)(r.p,{children:["This component searches a Weaviate Vector Store for documents similar to the input.\nFor more information, see the ",(0,n.jsx)(r.a,{href:"https://weaviate.io/developers/weaviate",children:"Weaviate Documentation"}),"."]}),"\n",(0,n.jsxs)(s,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Inputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsxs)(r.tbody,{children:[(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_type"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:'The type of search, such as "Similarity" or "MMR"'})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"input_value"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The search query."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"weaviate_url"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The default instance URL."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_by_text"}),(0,n.jsx)(r.td,{children:"Boolean"}),(0,n.jsx)(r.td,{children:"A boolean value that indicates whether to search by text."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"api_key"}),(0,n.jsx)(r.td,{children:"SecretString"}),(0,n.jsx)(r.td,{children:"The optional API key for authentication."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"index_name"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The optional index name."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"text_key"}),(0,n.jsx)(r.td,{children:"String"}),(0,n.jsx)(r.td,{children:"The default text extraction key."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"embedding"}),(0,n.jsx)(r.td,{children:"Embeddings"}),(0,n.jsx)(r.td,{children:"The embeddings model used."})]}),(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"attributes"}),(0,n.jsx)(r.td,{children:"List[String]"}),(0,n.jsx)(r.td,{children:"Optional additional attributes."})]})]})]}),(0,n.jsx)(r.p,{children:(0,n.jsx)(r.strong,{children:"Outputs"})}),(0,n.jsxs)(r.table,{children:[(0,n.jsx)(r.thead,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.th,{children:"Name"}),(0,n.jsx)(r.th,{children:"Type"}),(0,n.jsx)(r.th,{children:"Description"})]})}),(0,n.jsx)(r.tbody,{children:(0,n.jsxs)(r.tr,{children:[(0,n.jsx)(r.td,{children:"search_results"}),(0,n.jsx)(r.td,{children:"List[Data]"}),(0,n.jsxs)(r.td,{children:["The results of the similarity search as a list of ",(0,n.jsx)(r.a,{href:"/concepts-objects#data-object",children:"Data"})," objects."]})]})})]})]})]})}function u(e={}){const{wrapper:r}={...(0,d.R)(),...e.components};return r?(0,n.jsx)(r,{...e,children:(0,n.jsx)(m,{...e})}):m(e)}function p(e,r){throw new Error("Expected "+(r?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},17886:(e,r,t)=>{t.d(r,{A:()=>d});t(96540);var s=t(64058),n=t(74848);function d({name:e,...r}){const t=s[e];return t?(0,n.jsx)(t,{...r}):null}},42638:(e,r,t)=>{t.d(r,{A:()=>s});const s=t.p+"assets/images/component-hcd-example-flow-b82057600ce5e9e4a0f7ea0a61dcbf7f.png"},60159:(e,r,t)=>{t.d(r,{A:()=>s});const s=t.p+"assets/images/component-local-db-5ba34611640c3e325d9dd3cdcb591d1f.png"},67719:(e,r,t)=>{t.d(r,{A:()=>s});const s=t.p+"assets/images/vector-store-retrieval-af7257d77ff0259ab1a0980641d464ce.png"},88690:(e,r,t)=>{t.d(r,{A:()=>s});const s=t.p+"assets/images/component-chroma-db-b69a08e861be3451fe6f2992e203f516.png"}}]); \ No newline at end of file diff --git a/assets/js/b079b393.2cba11aa.js b/assets/js/b079b393.2cba11aa.js new file mode 100644 index 0000000000..195d1a68cc --- /dev/null +++ b/assets/js/b079b393.2cba11aa.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:"/data-types#dataframe",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.6026cd15.js b/assets/js/b079b393.6026cd15.js deleted file mode 100644 index 485e6ffb8f..0000000000 --- a/assets/js/b079b393.6026cd15.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":"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/ccb2a150.e036d526.js b/assets/js/ccb2a150.1a59d9e7.js similarity index 77% rename from assets/js/ccb2a150.e036d526.js rename to assets/js/ccb2a150.1a59d9e7.js index 1a32ef15b7..cff0ecffd2 100644 --- a/assets/js/ccb2a150.e036d526.js +++ b/assets/js/ccb2a150.1a59d9e7.js @@ -1 +1 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[416],{17886:(e,n,t)=>{t.d(n,{A:()=>s});t(96540);var o=t(64058),r=t(74848);function s({name:e,...n}){const t=o[e];return t?(0,r.jsx)(t,{...n}):null}},33946:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/quickstart-simple-agent-flow-cdfc39ae694994607cd72b6e858be64a.png"},38741:(e,n,t)=>{t.r(n),t.d(n,{CH:()=>h,assets:()=>d,chCodeConfig:()=>p,contentTitle:()=>c,default:()=>f,frontMatter:()=>l,metadata:()=>o,toc:()=>g});const o=JSON.parse('{"id":"Templates/simple-agent","title":"Simple agent","description":"This flow demonstrates using an Agent in a flow.","source":"@site/docs/Templates/simple-agent.mdx","sourceDirName":"Templates","slug":"/simple-agent","permalink":"/simple-agent","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Simple agent","slug":"/simple-agent"},"sidebar":"docs","previous":{"title":"Basic prompting","permalink":"/basic-prompting"},"next":{"title":"Blog writer","permalink":"/blog-writer"}}');var r=t(74848),s=t(28453),i=t(24754),a=t(17886);const l={title:"Simple agent",slug:"/simple-agent"},c=void 0,d={},h={annotations:i.hk,Code:i.Cy},p={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},g=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Open Langflow and start a new flow",id:"open-langflow-and-start-a-new-flow",level:2},{value:"Run the simple agent flow",id:"run-the-simple-agent-flow",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,s.R)(),...e.components};return h||m("CH",!1),h.Code||m("CH.Code",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.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,r.jsxs)(n.p,{children:["This flow demonstrates using an ",(0,r.jsx)(n.a,{href:"/agents",children:"Agent"})," in a flow.\nAn ",(0,r.jsx)(n.strong,{children:"Agent"}),' uses an LLM as its "brain" to select among the connected tools and complete its tasks.']}),"\n",(0,r.jsxs)(n.p,{children:["In this flow, the ",(0,r.jsx)(n.strong,{children:"Agent"})," reasons using a connected ",(0,r.jsx)(n.a,{href:"/components-models",children:"Language model"})," component.\nThe ",(0,r.jsx)(n.strong,{children:"Agent"})," selects the ",(0,r.jsx)(n.a,{href:"/components-helpers#calculator",children:"Calculator"})," tool for simple math problems, and the ",(0,r.jsx)(n.a,{href:"/components-data#url",children:"URL"})," tool to search a URL for content."]}),"\n",(0,r.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/get-started-installation",children:"A running Langflow instance"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://platform.openai.com/",children:"An OpenAI API key"})}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"open-langflow-and-start-a-new-flow",children:"Open Langflow and start a new flow"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["From the Langflow dashboard, click ",(0,r.jsx)(n.strong,{children:"New Flow"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Select ",(0,r.jsx)(n.strong,{children:"Simple Agent"}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Simple Agent"})," flow is created."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"Simple agent starter flow",src:t(33946).A+"",width:"4000",height:"2180"})}),"\n",(0,r.jsx)(n.h2,{id:"run-the-simple-agent-flow",children:"Run the simple agent flow"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Add your ",(0,r.jsx)(n.strong,{children:"OpenAI API key"})," to the ",(0,r.jsx)(n.strong,{children:"Agent"})," component."]}),"\n",(0,r.jsxs)(n.p,{children:["Optionally, create a ",(0,r.jsx)(n.a,{href:"/configuration-global-variables",children:"global variable"})," for the ",(0,r.jsx)(n.strong,{children:"OpenAI API key"}),"."]}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["In the ",(0,r.jsx)(n.strong,{children:"OpenAI API Key"})," field, click ",(0,r.jsx)(a.A,{name:"Globe","aria-hidden":"True"})," ",(0,r.jsx)(n.strong,{children:"Globe"}),", and then click ",(0,r.jsx)(n.strong,{children:"Add New Variable"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["In the ",(0,r.jsx)(n.strong,{children:"Variable Name"})," field, enter ",(0,r.jsx)(n.code,{children:"openai_api_key"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["In the ",(0,r.jsx)(n.strong,{children:"Value"})," field, paste your OpenAI API Key (",(0,r.jsx)(n.code,{children:"sk-..."}),")."]}),"\n",(0,r.jsxs)(n.li,{children:["Click ",(0,r.jsx)(n.strong,{children:"Save Variable"}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["To run the flow, click ",(0,r.jsx)(a.A,{name:"Play","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Playground"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["To confirm the tools are connected, ask the agent, ",(0,r.jsx)(n.code,{children:"What tools are available to you?"}),"\nThe response is similar to the following:"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"I have access to the following tools:",props:{}}]},{tokens:[{content:"Calculator: Perform basic arithmetic operations.",props:{}}]},{tokens:[{content:"fetch_content: Load and retrieve data from specified URLs.",props:{}}]},{tokens:[{content:"fetch_content_text: Load and retrieve text data from specified URLs.",props:{}}]},{tokens:[{content:"as_dataframe: Load and retrieve data in a structured format (dataframe) from specified URLs.",props:{}}]},{tokens:[{content:"get_current_date: Returns the current date and time in a selected timezone.",props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Ask the agent a question. For example, ask it to create a tabletop character using your favorite rules set.\nThe agent tells you when it's using the ",(0,r.jsx)(n.code,{children:"URL-fetch_content_text"})," tool to search for rules information, and when it's using ",(0,r.jsx)(n.code,{children:"CalculatorComponent-evaluate_expression"})," to generate attributes with dice rolls.\nThe final output should be similar to this:"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Final Attributes",props:{}}]},{tokens:[{content:"Strength (STR): 10",props:{}}]},{tokens:[{content:"Constitution (CON): 12",props:{}}]},{tokens:[{content:"Size (SIZ): 14",props:{}}]},{tokens:[{content:"Dexterity (DEX): 9",props:{}}]},{tokens:[{content:"Intelligence (INT): 11",props:{}}]},{tokens:[{content:"Power (POW): 13",props:{}}]},{tokens:[{content:"Charisma (CHA): 8",props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["Now that your query has completed the journey from ",(0,r.jsx)(n.strong,{children:"Chat input"})," to ",(0,r.jsx)(n.strong,{children:"Chat output"}),", you have completed the ",(0,r.jsx)(n.strong,{children:"Simple Agent"})," flow."]})]})}function f(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(u,{...e})}):u(e)}function m(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}}}]); \ No newline at end of file +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[416],{17886:(e,n,t)=>{t.d(n,{A:()=>s});t(96540);var o=t(64058),r=t(74848);function s({name:e,...n}){const t=o[e];return t?(0,r.jsx)(t,{...n}):null}},33946:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/quickstart-simple-agent-flow-cdfc39ae694994607cd72b6e858be64a.png"},38741:(e,n,t)=>{t.r(n),t.d(n,{CH:()=>h,assets:()=>d,chCodeConfig:()=>p,contentTitle:()=>c,default:()=>f,frontMatter:()=>l,metadata:()=>o,toc:()=>g});const o=JSON.parse('{"id":"Templates/simple-agent","title":"Simple agent","description":"This flow demonstrates using an Agent in a flow.","source":"@site/docs/Templates/simple-agent.mdx","sourceDirName":"Templates","slug":"/simple-agent","permalink":"/simple-agent","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Simple agent","slug":"/simple-agent"},"sidebar":"docs","previous":{"title":"Basic prompting","permalink":"/basic-prompting"},"next":{"title":"Blog writer","permalink":"/blog-writer"}}');var r=t(74848),s=t(28453),i=t(24754),a=t(17886);const l={title:"Simple agent",slug:"/simple-agent"},c=void 0,d={},h={annotations:i.hk,Code:i.Cy},p={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},g=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Open Langflow and start a new flow",id:"open-langflow-and-start-a-new-flow",level:2},{value:"Run the simple agent flow",id:"run-the-simple-agent-flow",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,s.R)(),...e.components};return h||m("CH",!1),h.Code||m("CH.Code",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.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,r.jsxs)(n.p,{children:["This flow demonstrates using an ",(0,r.jsx)(n.a,{href:"/agents",children:"Agent"})," in a flow.\nAn ",(0,r.jsx)(n.strong,{children:"Agent"}),' uses an LLM as its "brain" to select among the connected tools and complete its tasks.']}),"\n",(0,r.jsxs)(n.p,{children:["In this flow, the ",(0,r.jsx)(n.strong,{children:"Agent"})," reasons using a connected ",(0,r.jsx)(n.a,{href:"/components-models",children:"Language model"})," component.\nThe ",(0,r.jsx)(n.strong,{children:"Agent"})," selects the ",(0,r.jsx)(n.a,{href:"/components-helpers#calculator",children:"Calculator"})," tool for simple math problems, and the ",(0,r.jsx)(n.a,{href:"/components-data#url",children:"URL"})," tool to search a URL for content."]}),"\n",(0,r.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/get-started-installation",children:"A running Langflow instance"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://platform.openai.com/",children:"An OpenAI API key"})}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"open-langflow-and-start-a-new-flow",children:"Open Langflow and start a new flow"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["From the Langflow dashboard, click ",(0,r.jsx)(n.strong,{children:"New Flow"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Select ",(0,r.jsx)(n.strong,{children:"Simple Agent"}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Simple Agent"})," flow is created."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"Simple agent starter flow",src:t(33946).A+"",width:"4000",height:"2180"})}),"\n",(0,r.jsx)(n.h2,{id:"run-the-simple-agent-flow",children:"Run the simple agent flow"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Add your ",(0,r.jsx)(n.strong,{children:"OpenAI API key"})," to the ",(0,r.jsx)(n.strong,{children:"Agent"})," component."]}),"\n",(0,r.jsxs)(n.p,{children:["Optionally, create a ",(0,r.jsx)(n.a,{href:"/configuration-global-variables",children:"global variable"})," for the ",(0,r.jsx)(n.strong,{children:"OpenAI API key"}),"."]}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["In the ",(0,r.jsx)(n.strong,{children:"OpenAI API Key"})," field, click ",(0,r.jsx)(a.A,{name:"Globe","aria-hidden":"True"})," ",(0,r.jsx)(n.strong,{children:"Globe"}),", and then click ",(0,r.jsx)(n.strong,{children:"Add New Variable"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["In the ",(0,r.jsx)(n.strong,{children:"Variable Name"})," field, enter ",(0,r.jsx)(n.code,{children:"openai_api_key"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["In the ",(0,r.jsx)(n.strong,{children:"Value"})," field, paste your OpenAI API Key (",(0,r.jsx)(n.code,{children:"sk-..."}),")."]}),"\n",(0,r.jsxs)(n.li,{children:["Click ",(0,r.jsx)(n.strong,{children:"Save Variable"}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["To run the flow, click ",(0,r.jsx)(a.A,{name:"Play","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Playground"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["To confirm the tools are connected, ask the agent, ",(0,r.jsx)(n.code,{children:"What tools are available to you?"}),"\nThe response is similar to the following:"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"I have access to the following tools:",props:{}}]},{tokens:[{content:"Calculator: Perform basic arithmetic operations.",props:{}}]},{tokens:[{content:"fetch_content: Load and retrieve data from specified URLs.",props:{}}]},{tokens:[{content:"fetch_content_text: Load and retrieve text from specified URLs.",props:{}}]},{tokens:[{content:"as_dataframe: Load and retrieve data in a structured format (dataframe) from specified URLs.",props:{}}]},{tokens:[{content:"get_current_date: Returns the current date and time in a selected timezone.",props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Ask the agent a question. For example, ask it to create a tabletop character using your favorite rules set.\nThe agent tells you when it's using the ",(0,r.jsx)(n.code,{children:"URL-fetch_content_text"})," tool to search for rules information, and when it's using ",(0,r.jsx)(n.code,{children:"CalculatorComponent-evaluate_expression"})," to generate attributes with dice rolls.\nThe final output should be similar to this:"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Final Attributes",props:{}}]},{tokens:[{content:"Strength (STR): 10",props:{}}]},{tokens:[{content:"Constitution (CON): 12",props:{}}]},{tokens:[{content:"Size (SIZ): 14",props:{}}]},{tokens:[{content:"Dexterity (DEX): 9",props:{}}]},{tokens:[{content:"Intelligence (INT): 11",props:{}}]},{tokens:[{content:"Power (POW): 13",props:{}}]},{tokens:[{content:"Charisma (CHA): 8",props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["Now that your query has completed the journey from ",(0,r.jsx)(n.strong,{children:"Chat input"})," to ",(0,r.jsx)(n.strong,{children:"Chat output"}),", you have completed the ",(0,r.jsx)(n.strong,{children:"Simple Agent"})," flow."]})]})}function f(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(u,{...e})}):u(e)}function m(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}}}]); \ No newline at end of file diff --git a/assets/js/d5bb0e16.6d8af6b8.js b/assets/js/d5bb0e16.6d8af6b8.js deleted file mode 100644 index 540705ace0..0000000000 --- a/assets/js/d5bb0e16.6d8af6b8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[4218],{17886:(e,t,s)=>{s.d(t,{A:()=>i});s(96540);var r=s(64058),n=s(74848);function i({name:e,...t}){const s=r[e];return s?(0,n.jsx)(s,{...t}):null}},28453:(e,t,s)=>{s.d(t,{R:()=>d,x:()=>l});var r=s(96540);const n={},i=r.createContext(n);function d(e){const t=r.useContext(i);return r.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(n):e.components||n:d(e.components),r.createElement(i.Provider,{value:t},e.children)}},68335:(e,t,s)=>{s.d(t,{A:()=>r});const r=s.p+"assets/images/component-astra-db-json-tool-117aff566c0df01a555264bb128b3693.png"},91132:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>c,contentTitle:()=>h,default:()=>x,frontMatter:()=>l,metadata:()=>r,toc:()=>o});const r=JSON.parse('{"id":"Components/components-tools","title":"Tools","description":"The Tools category in Langflow is removed as of Langflow 1.5.","source":"@site/docs/Components/components-tools.mdx","sourceDirName":"Components","slug":"/components-tools","permalink":"/components-tools","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Tools","slug":"/components-tools"},"sidebar":"docs","previous":{"title":"Prompts","permalink":"/components-prompts"},"next":{"title":"Vector stores","permalink":"/components-vector-stores"}}');var n=s(74848),i=s(28453),d=s(17886);const l={title:"Tools",slug:"/components-tools"},h=void 0,c={},o=[{value:"arXiv",id:"arxiv",level:2},{value:"Astra DB tool",id:"astra-db-tool",level:2},{value:"Define Astra DB tool parameters",id:"define-astra-db-tool-parameters",level:3},{value:"Astra DB CQL Tool",id:"astra-db-cql-tool",level:2},{value:"Bing Search API",id:"bing-search-api",level:2},{value:"Combinatorial Reasoner",id:"combinatorial-reasoner",level:2},{value:"DuckDuckGo search",id:"duckduckgo-search",level:2},{value:"Exa Search",id:"exa-search",level:2},{value:"Glean Search API",id:"glean-search-api",level:2},{value:"Google Search API",id:"google-search-api",level:3},{value:"Google Serper API",id:"google-serper-api",level:2},{value:"MCP connection",id:"mcp-connection",level:2},{value:"MCP Tools (deprecated)",id:"mcp-tools-deprecated",level:3},{value:"Search API",id:"search-api",level:2},{value:"SearXNG Search Tool",id:"searxng-search-tool",level:2},{value:"Wikidata",id:"wikidata",level:2},{value:"Wikipedia API",id:"wikipedia-api",level:2},{value:"Legacy components",id:"legacy-components",level:2},{value:"Calculator Tool",id:"calculator-tool",level:3},{value:"Python Code Structured Tool",id:"python-code-structured-tool",level:3},{value:"Python REPL Tool",id:"python-repl-tool",level:3},{value:"Retriever Tool",id:"retriever-tool",level:3}];function a(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components},{Details:r}=t;return r||function(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.strong,{children:"Tools"})," category in Langflow is removed as of Langflow 1.5."]}),"\n",(0,n.jsxs)(t.p,{children:["Most components from the ",(0,n.jsx)(t.strong,{children:"Tools"})," category have been moved to other categories or bundles."]}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["The ",(0,n.jsx)(t.a,{href:"/components-agents#mcp-connection",children:"MCP Tools"})," component is available in ",(0,n.jsx)(t.strong,{children:"Agent components"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:["The ",(0,n.jsx)(t.a,{href:"/components-helpers#calculator",children:"calculator"})," component is available in ",(0,n.jsx)(t.strong,{children:"Helpers"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:["The ",(0,n.jsx)(t.a,{href:"/components-tools#astra-db-tool",children:"Astra DB JSON"})," and ",(0,n.jsx)(t.a,{href:"#astra-db-cql-tool",children:"Astra DB CQL"})," tools are available in the ",(0,n.jsx)(t.strong,{children:"DataStax"})," bundle."]}),"\n",(0,n.jsxs)(t.li,{children:["The ",(0,n.jsx)(t.a,{href:"/components-processing#python-interpreter",children:"Python Interpreter"})," component is available in ",(0,n.jsx)(t.strong,{children:"Processing"}),"."]}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:["The remaining tools listed below are moved to a ",(0,n.jsx)(t.strong,{children:"Bundle"})," or in ",(0,n.jsx)(t.strong,{children:"Legacy"}),".\nLegacy components are available for use but are no longer supported."]}),"\n",(0,n.jsx)(t.h2,{id:"arxiv",children:"arXiv"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["As of Langflow 1.5, this component is available in the ",(0,n.jsx)(t.strong,{children:"Search"})," bundle."]})}),"\n",(0,n.jsxs)(t.p,{children:["This component searches and retrieves papers from ",(0,n.jsx)(t.a,{href:"https://arXiv.org",children:"arXiv.org"}),"."]}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"search_query"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsxs)(t.td,{children:["The search query for arXiv papers. For example, ",(0,n.jsx)(t.code,{children:"quantum computing"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"search_type"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The field to search in."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"max_results"}),(0,n.jsx)(t.td,{children:"Integer"}),(0,n.jsx)(t.td,{children:"The maximum number of results to return."})]})]})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"papers"}),(0,n.jsx)(t.td,{children:"List[Data]"}),(0,n.jsx)(t.td,{children:"A list of retrieved arXiv papers."})]})})]})]}),"\n",(0,n.jsx)(t.h2,{id:"astra-db-tool",children:"Astra DB tool"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["As of Langflow 1.5, this component is available in the ",(0,n.jsx)(t.strong,{children:"DataStax"})," bundle."]})}),"\n",(0,n.jsx)(t.p,{children:"This component allows agents to query data from Astra DB collections."}),"\n",(0,n.jsxs)(t.p,{children:["To use this tool in a flow, connect it to an ",(0,n.jsx)(t.strong,{children:"Agent"})," component.\nThe flow looks like this:"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"Astra DB JSON tool connected to an Agent",src:s(68335).A+"",width:"4000",height:"2742"})}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.strong,{children:"Tool Name"})," and ",(0,n.jsx)(t.strong,{children:"Tool Description"})," fields are required for the Agent to decide when to use the tool.\n",(0,n.jsx)(t.strong,{children:"Tool Name"})," cannot contain spaces."]}),"\n",(0,n.jsxs)(t.p,{children:["The values for ",(0,n.jsx)(t.strong,{children:"Collection Name"}),", ",(0,n.jsx)(t.strong,{children:"Astra DB Application Token"}),", and ",(0,n.jsx)(t.strong,{children:"Astra DB API Endpoint"})," are found in your Astra DB deployment. For more information, see the ",(0,n.jsx)(t.a,{href:"https://docs.datastax.com/en/astra-db-serverless/databases/create-database.html",children:"DataStax documentation"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["In this example, an ",(0,n.jsx)(t.strong,{children:"OpenAI"})," embeddings component is connected to use the Astra DB tool component's ",(0,n.jsx)(t.strong,{children:"Semantic Search"})," capability.\nTo use ",(0,n.jsx)(t.strong,{children:"Semantic Search"}),", you must have an embedding model or Astra DB Vectorize enabled.\nIf you try to run the flow without an embedding model, you will get an error."]}),"\n",(0,n.jsxs)(t.p,{children:["Open the ",(0,n.jsx)(t.strong,{children:"Playground"})," and ask a question about your data.\nThe Agent uses the ",(0,n.jsx)(t.strong,{children:"Astra DB Tool"})," to return information about your collection."]}),"\n",(0,n.jsx)(t.h3,{id:"define-astra-db-tool-parameters",children:"Define Astra DB tool parameters"}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.strong,{children:"Tool Parameters"})," configuration pane allows you to define parameters for ",(0,n.jsx)(t.a,{href:"https://docs.datastax.com/en/astra-db-serverless/api-reference/document-methods/find-many.html#parameters",children:"filter conditions"})," for the component's ",(0,n.jsx)(t.strong,{children:"Find"})," command."]}),"\n",(0,n.jsxs)(t.p,{children:["These filters become available as parameters that the LLM can use when calling the tool, with a better understanding of each parameter provided by the ",(0,n.jsx)(t.strong,{children:"Description"})," field."]}),"\n",(0,n.jsxs)(t.ol,{children:["\n",(0,n.jsxs)(t.li,{children:["To define a parameter for your query, in the ",(0,n.jsx)(t.strong,{children:"Tool Parameters"})," pane, click ",(0,n.jsx)(d.A,{name:"Plus","aria-hidden":"true"})," ",(0,n.jsx)(t.strong,{children:"Add a new row"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:["Complete the fields based on your data. For example, with this filter, the LLM can filter by unique ",(0,n.jsx)(t.code,{children:"customer_id"})," values."]}),"\n"]}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["Name: ",(0,n.jsx)(t.code,{children:"customer_id"})]}),"\n",(0,n.jsx)(t.li,{children:"Attribute Name: Leave empty if the attribute matches the field name in the database."}),"\n",(0,n.jsxs)(t.li,{children:["Description: ",(0,n.jsx)(t.code,{children:'"The unique identifier of the customer to filter by"'}),"."]}),"\n",(0,n.jsxs)(t.li,{children:["Is Metadata: ",(0,n.jsx)(t.code,{children:"False"})," unless the value stored in the metadata field."]}),"\n",(0,n.jsxs)(t.li,{children:["Is Mandatory: ",(0,n.jsx)(t.code,{children:"True"})," to require this filter."]}),"\n",(0,n.jsxs)(t.li,{children:["Is Timestamp: ",(0,n.jsx)(t.code,{children:"False"})," since the value is an ID, not a timestamp."]}),"\n",(0,n.jsxs)(t.li,{children:["Operator: ",(0,n.jsx)(t.code,{children:"$eq"})," to look for an exact match."]}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:["If you want to apply filters regardless of the LLM's input, use the ",(0,n.jsx)(t.strong,{children:"Static Filters"})," option, which is available in the component's ",(0,n.jsx)(t.strong,{children:"Controls"})," pane."]}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Parameter"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Name"}),(0,n.jsx)(t.td,{children:"The name of the parameter that is exposed to the LLM. It can be the same as the underlying field name or a more descriptive label. The LLM uses this name, along with the description, to infer what value to provide during execution."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Attribute Name"}),(0,n.jsxs)(t.td,{children:["When the parameter name shown to the LLM differs from the actual field or property in the database, use this setting to map the user-facing name to the correct attribute. For example, to apply a range filter to the timestamp field, define two separate parameters, such as ",(0,n.jsx)(t.code,{children:"start_date"})," and ",(0,n.jsx)(t.code,{children:"end_date"}),", that both reference the same timestamp attribute."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Description"}),(0,n.jsxs)(t.td,{children:["Provides instructions to the LLM on how the parameter should be used. Clear and specific guidance helps the LLM provide valid input. For example, if a field such as ",(0,n.jsx)(t.code,{children:"specialty"})," is stored in lowercase, the description should indicate that the input must be lowercase."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Is Metadata"}),(0,n.jsxs)(t.td,{children:["When loading data using LangChain or Langflow, additional attributes may be stored under a metadata object. If the target attribute is stored this way, enable this option. It adjusts the query by generating a filter in the format: ",(0,n.jsx)(t.code,{children:'{"metadata.": ""}'})]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Is Timestamp"}),(0,n.jsx)(t.td,{children:"For date or time-based filters, enable this option to automatically convert values to the timestamp format that the Astrapy client expects. This ensures compatibility with the underlying API without requiring manual formatting."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Operator"}),(0,n.jsxs)(t.td,{children:["Defines the filtering logic applied to the attribute. You can use any valid ",(0,n.jsx)(t.a,{href:"https://docs.datastax.com/en/astra-db-serverless/api-reference/filter-operator-collections.html",children:"Data API filter operator"}),". For example, to filter a time range on the timestamp attribute, use two parameters: one with the ",(0,n.jsx)(t.code,{children:"$gt"}),' operator for "greater than", and another with the ',(0,n.jsx)(t.code,{children:"$lt"}),' operator for "less than".']})]})]})]}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Tool Name"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The name used to reference the tool in the agent's prompt."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Tool Description"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"A brief description of the tool. This helps the model decide when to use it."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Collection Name"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The name of the Astra DB collection to query."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Token"}),(0,n.jsx)(t.td,{children:"SecretString"}),(0,n.jsx)(t.td,{children:"The authentication token for accessing Astra DB."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"API Endpoint"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The Astra DB API endpoint."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Projection Fields"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsxs)(t.td,{children:["The attributes to return, separated by commas. The default is ",(0,n.jsx)(t.code,{children:"*"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Tool Parameters"}),(0,n.jsx)(t.td,{children:"Dict"}),(0,n.jsxs)(t.td,{children:["Parameters the model needs to fill to execute the tool. For required parameters, use an exclamation mark, for example ",(0,n.jsx)(t.code,{children:"!customer_id"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Static Filters"}),(0,n.jsx)(t.td,{children:"Dict"}),(0,n.jsx)(t.td,{children:"Attribute-value pairs used to filter query results."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Limit"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The number of documents to return."})]})]})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.strong,{children:"Data"})," output is used when directly querying Astra DB, while the ",(0,n.jsx)(t.strong,{children:"Tool"})," output is used when integrating with agents."]}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Data"}),(0,n.jsx)(t.td,{children:"List[Data]"}),(0,n.jsxs)(t.td,{children:["A list of ",(0,n.jsx)(t.a,{href:"/concepts-objects",children:"Data"})," objects containing the query results from Astra DB. Each ",(0,n.jsx)(t.code,{children:"Data"})," object contains the document fields specified by the projection attributes. Limited by the ",(0,n.jsx)(t.code,{children:"number_of_results"})," parameter."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Tool"}),(0,n.jsx)(t.td,{children:"StructuredTool"}),(0,n.jsxs)(t.td,{children:["A LangChain ",(0,n.jsx)(t.code,{children:"StructuredTool"})," object that can be used in agent workflows. Contains the tool name, description, argument schema based on tool parameters, and the query function."]})]})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"astra-db-cql-tool",children:"Astra DB CQL Tool"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["As of Langflow 1.5, this component is available in the ",(0,n.jsx)(t.strong,{children:"DataStax"})," bundle."]})}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.code,{children:"Astra DB CQL Tool"})," allows agents to query data from CQL tables in Astra DB."]}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Tool Name"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The name used to reference the tool in the agent's prompt."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Tool Description"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"A brief description of the tool to guide the model in using it."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Keyspace"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The name of the keyspace."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Table Name"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The name of the Astra DB CQL table to query."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Token"}),(0,n.jsx)(t.td,{children:"SecretString"}),(0,n.jsx)(t.td,{children:"The authentication token for Astra DB."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"API Endpoint"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The Astra DB API endpoint."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Projection Fields"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:'The attributes to return, separated by commas. Default: "*".'})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Partition Keys"}),(0,n.jsx)(t.td,{children:"Dict"}),(0,n.jsx)(t.td,{children:"Required parameters that the model must fill to query the tool."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Clustering Keys"}),(0,n.jsx)(t.td,{children:"Dict"}),(0,n.jsxs)(t.td,{children:["Optional parameters the model can fill to refine the query. Required parameters should be marked with an exclamation mark, for example, ",(0,n.jsx)(t.code,{children:"!customer_id"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Static Filters"}),(0,n.jsx)(t.td,{children:"Dict"}),(0,n.jsx)(t.td,{children:"Attribute-value pairs used to filter query results."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Limit"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The number of records to return."})]})]})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Data"}),(0,n.jsx)(t.td,{children:"List[Data]"}),(0,n.jsxs)(t.td,{children:["A list of ",(0,n.jsx)(t.a,{href:"/concepts-objects",children:"Data"})," objects containing the query results from the Astra DB CQL table. Each Data object contains the document fields specified by the projection fields. Limited by the ",(0,n.jsx)(t.code,{children:"number_of_results"})," parameter."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Tool"}),(0,n.jsx)(t.td,{children:"StructuredTool"}),(0,n.jsx)(t.td,{children:"A LangChain StructuredTool object that can be used in agent workflows. Contains the tool name, description, argument schema based on partition and clustering keys, and the query function."})]})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"bing-search-api",children:"Bing Search API"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["As of Langflow 1.5, this component is available in the ",(0,n.jsx)(t.strong,{children:"Search"})," bundle."]})}),"\n",(0,n.jsx)(t.p,{children:"This component allows you to call the Bing Search API."}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"bing_subscription_key"}),(0,n.jsx)(t.td,{children:"SecretString"}),(0,n.jsx)(t.td,{children:"A Bing API subscription key."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"input_value"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The search query input."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"bing_search_url"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"A custom Bing Search URL."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"k"}),(0,n.jsx)(t.td,{children:"Integer"}),(0,n.jsx)(t.td,{children:"The number of search results to return."})]})]})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"results"}),(0,n.jsx)(t.td,{children:"List[Data]"}),(0,n.jsx)(t.td,{children:"A list of search results."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"tool"}),(0,n.jsx)(t.td,{children:"Tool"}),(0,n.jsx)(t.td,{children:"A Bing Search tool for use in LangChain."})]})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"combinatorial-reasoner",children:"Combinatorial Reasoner"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["This component is available in the ",(0,n.jsx)(t.strong,{children:"Components"})," menu under ",(0,n.jsx)(t.strong,{children:"Bundles"}),"."]})}),"\n",(0,n.jsxs)(t.p,{children:["This component runs Icosa's Combinatorial Reasoning (CR) pipeline on an input to create an optimized prompt with embedded reasons. For more information, see ",(0,n.jsx)(t.a,{href:"https://www.icosacomputing.com/",children:"Icosa computing"}),"."]}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"prompt"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The input to run CR on."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"openai_api_key"}),(0,n.jsx)(t.td,{children:"SecretString"}),(0,n.jsx)(t.td,{children:"An OpenAI API key for authentication."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"username"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"A username for Icosa API authentication."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"password"}),(0,n.jsx)(t.td,{children:"SecretString"}),(0,n.jsx)(t.td,{children:"A password for Icosa API authentication."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"model_name"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The OpenAI LLM to use for reason generation."})]})]})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"optimized_prompt"}),(0,n.jsx)(t.td,{children:"Message"}),(0,n.jsx)(t.td,{children:"A message object containing the optimized prompt."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"reasons"}),(0,n.jsx)(t.td,{children:"List[String]"}),(0,n.jsx)(t.td,{children:"A list of the selected reasons that are embedded in the optimized prompt."})]})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"duckduckgo-search",children:"DuckDuckGo search"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["As of Langflow 1.5, this component is available in the ",(0,n.jsx)(t.strong,{children:"Search"})," bundle."]})}),"\n",(0,n.jsxs)(t.p,{children:["This component performs web searches using the ",(0,n.jsx)(t.a,{href:"https://www.duckduckgo.com",children:"DuckDuckGo"})," search engine with result-limiting capabilities."]}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"input_value"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The search query to execute with DuckDuckGo."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"max_results"}),(0,n.jsx)(t.td,{children:"Integer"}),(0,n.jsx)(t.td,{children:"The maximum number of search results to return. Default: 5."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"max_snippet_length"}),(0,n.jsx)(t.td,{children:"Integer"}),(0,n.jsx)(t.td,{children:"The maximum length of each result snippet. Default: 100."})]})]})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"data"}),(0,n.jsx)(t.td,{children:"List[Data]"}),(0,n.jsx)(t.td,{children:"A list of search results as Data objects containing snippets and full content."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"text"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The search results formatted as a single text string."})]})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"exa-search",children:"Exa Search"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["As of Langflow 1.5, this component is available in the ",(0,n.jsx)(t.strong,{children:"Search"})," bundle."]})}),"\n",(0,n.jsxs)(t.p,{children:["This component provides an ",(0,n.jsx)(t.a,{href:"https://exa.ai/",children:"Exa Search"})," toolkit for search and content retrieval."]}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"metaphor_api_key"}),(0,n.jsx)(t.td,{children:"SecretString"}),(0,n.jsx)(t.td,{children:"An API key for Exa Search."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"use_autoprompt"}),(0,n.jsx)(t.td,{children:"Boolean"}),(0,n.jsx)(t.td,{children:"Whether to use the autoprompt feature. Default: true."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"search_num_results"}),(0,n.jsx)(t.td,{children:"Integer"}),(0,n.jsx)(t.td,{children:"The number of results to return for search. Default: 5."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"similar_num_results"}),(0,n.jsx)(t.td,{children:"Integer"}),(0,n.jsx)(t.td,{children:"The number of similar results to return. Default: 5."})]})]})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"tools"}),(0,n.jsx)(t.td,{children:"List[Tool]"}),(0,n.jsx)(t.td,{children:"A list of search tools provided by the toolkit."})]})})]})]}),"\n",(0,n.jsx)(t.h2,{id:"glean-search-api",children:"Glean Search API"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["As of Langflow 1.5, this component is available in the ",(0,n.jsx)(t.strong,{children:"Search"})," bundle."]})}),"\n",(0,n.jsx)(t.p,{children:"This component allows you to call the Glean Search API."}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"glean_api_url"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The URL of the Glean API."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"glean_access_token"}),(0,n.jsx)(t.td,{children:"SecretString"}),(0,n.jsx)(t.td,{children:"An access token for Glean API authentication."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"query"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The search query input."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"page_size"}),(0,n.jsx)(t.td,{children:"Integer"}),(0,n.jsx)(t.td,{children:"The number of results per page. Default: 10."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"request_options"}),(0,n.jsx)(t.td,{children:"Dict"}),(0,n.jsx)(t.td,{children:"Additional options for the API request."})]})]})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"results"}),(0,n.jsx)(t.td,{children:"List[Data]"}),(0,n.jsx)(t.td,{children:"A list of search results."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"tool"}),(0,n.jsx)(t.td,{children:"Tool"}),(0,n.jsx)(t.td,{children:"A Glean Search tool for use in LangChain."})]})]})]})]}),"\n",(0,n.jsx)(t.h3,{id:"google-search-api",children:"Google Search API"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["As of Langflow 1.5, this component is available in the ",(0,n.jsx)(t.strong,{children:"Search"})," bundle."]})}),"\n",(0,n.jsx)(t.p,{children:"This component allows you to call the Google Search API."}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"google_api_key"}),(0,n.jsx)(t.td,{children:"SecretString"}),(0,n.jsx)(t.td,{children:"A Google API key for authentication."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"google_cse_id"}),(0,n.jsx)(t.td,{children:"SecretString"}),(0,n.jsx)(t.td,{children:"A Google Custom Search Engine ID."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"input_value"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The search query input."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"k"}),(0,n.jsx)(t.td,{children:"Integer"}),(0,n.jsx)(t.td,{children:"The number of search results to return."})]})]})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"results"}),(0,n.jsx)(t.td,{children:"List[Data]"}),(0,n.jsx)(t.td,{children:"A list of search results."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"tool"}),(0,n.jsx)(t.td,{children:"Tool"}),(0,n.jsx)(t.td,{children:"A Google Search tool for use in LangChain."})]})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"google-serper-api",children:"Google Serper API"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["As of Langflow 1.5, this component is available in the ",(0,n.jsx)(t.strong,{children:"Search"})," bundle."]})}),"\n",(0,n.jsx)(t.p,{children:"This component allows you to call the Serper.dev Google Search API."}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"serper_api_key"}),(0,n.jsx)(t.td,{children:"SecretString"}),(0,n.jsx)(t.td,{children:"An API key for Serper.dev authentication."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"input_value"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The search query input."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"k"}),(0,n.jsx)(t.td,{children:"Integer"}),(0,n.jsx)(t.td,{children:"The number of search results to return."})]})]})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"results"}),(0,n.jsx)(t.td,{children:"List[Data]"}),(0,n.jsx)(t.td,{children:"A list of search results."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"tool"}),(0,n.jsx)(t.td,{children:"Tool"}),(0,n.jsx)(t.td,{children:"A Google Serper search tool for use in LangChain."})]})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"mcp-connection",children:"MCP connection"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["As of Langflow 1.5, this component is called the ",(0,n.jsx)(t.strong,{children:"MCP Tools"})," component."]})}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.strong,{children:"MCP tools"})," component exposes Model Context Protocol (MCP) servers, including your other flows, as tools for Langflow agents. For information about this component, see ",(0,n.jsx)(t.a,{href:"/mcp-client",children:"Use Langflow as an MCP client"}),"."]}),"\n",(0,n.jsx)(t.h3,{id:"mcp-tools-deprecated",children:"MCP Tools (deprecated)"}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.strong,{children:"MCP Tools (stdio)"})," and ",(0,n.jsx)(t.strong,{children:"MCP Tools (SSE)"})," components are deprecated as of Langflow version 1.3.\nThey are replaced by a single ",(0,n.jsx)(t.a,{href:"/mcp-client",children:"MCP tools"})," component."]}),"\n",(0,n.jsx)(t.h2,{id:"search-api",children:"Search API"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["As of Langflow 1.5, this component is available in the ",(0,n.jsx)(t.strong,{children:"Search"})," bundle."]})}),"\n",(0,n.jsxs)(t.p,{children:["This component calls the ",(0,n.jsx)(t.code,{children:"searchapi.io"})," API. It can be used to search the web for information."]}),"\n",(0,n.jsxs)(t.p,{children:["For more information, see the ",(0,n.jsx)(t.a,{href:"https://www.searchapi.io/docs/google",children:"SearchAPI documentation"}),"."]}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"engine"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsxs)(t.td,{children:["The search engine to use. Default: ",(0,n.jsx)(t.code,{children:"google"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"api_key"}),(0,n.jsx)(t.td,{children:"SecretString"}),(0,n.jsx)(t.td,{children:"The API key for authenticating with SearchAPI."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"input_value"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The search query or input for the API call."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"search_params"}),(0,n.jsx)(t.td,{children:"Dict"}),(0,n.jsx)(t.td,{children:"Additional parameters for customizing the search."})]})]})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"data"}),(0,n.jsx)(t.td,{children:"List[Data]"}),(0,n.jsx)(t.td,{children:"A list of Data objects containing search results."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"tool"}),(0,n.jsx)(t.td,{children:"Tool"}),(0,n.jsx)(t.td,{children:"A Tool object for use in LangChain workflows."})]})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"searxng-search-tool",children:"SearXNG Search Tool"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["As of Langflow 1.5, this component is available in the ",(0,n.jsx)(t.strong,{children:"Search"})," bundle."]})}),"\n",(0,n.jsx)(t.p,{children:"This component creates a tool for searching using SearXNG, a metasearch engine."}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"url"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The URL of the SearXNG instance."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"max_results"}),(0,n.jsx)(t.td,{children:"Integer"}),(0,n.jsx)(t.td,{children:"The maximum number of results to return."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"categories"}),(0,n.jsx)(t.td,{children:"List[String]"}),(0,n.jsx)(t.td,{children:"The categories to search in."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"language"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The language for the search results."})]})]})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"result_tool"}),(0,n.jsx)(t.td,{children:"Tool"}),(0,n.jsx)(t.td,{children:"A SearXNG search tool for use in LangChain."})]})})]})]}),"\n",(0,n.jsx)(t.h2,{id:"wikidata",children:"Wikidata"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["As of Langflow 1.5, this component is available in the ",(0,n.jsx)(t.strong,{children:"Search"})," bundle."]})}),"\n",(0,n.jsx)(t.p,{children:"This component performs a search using the Wikidata API."}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"query"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The text query for similarity search on Wikidata."})]})})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"data"}),(0,n.jsx)(t.td,{children:"List[Data]"}),(0,n.jsx)(t.td,{children:"The search results from Wikidata API as a list of Data objects."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"text"}),(0,n.jsx)(t.td,{children:"Message"}),(0,n.jsx)(t.td,{children:"The search results formatted as a text message."})]})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"wikipedia-api",children:"Wikipedia API"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["As of Langflow 1.5, this component is available in the ",(0,n.jsx)(t.strong,{children:"Search"})," bundle."]})}),"\n",(0,n.jsx)(t.p,{children:"This component creates a tool for searching and retrieving information from Wikipedia."}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"input_value"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The search query input."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"lang"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsxs)(t.td,{children:["The language code for Wikipedia. Default: ",(0,n.jsx)(t.code,{children:"en"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"k"}),(0,n.jsx)(t.td,{children:"Integer"}),(0,n.jsx)(t.td,{children:"The number of results to return."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"load_all_available_meta"}),(0,n.jsx)(t.td,{children:"Boolean"}),(0,n.jsx)(t.td,{children:"Whether to load all available metadata."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"doc_content_chars_max"}),(0,n.jsx)(t.td,{children:"Integer"}),(0,n.jsx)(t.td,{children:"The maximum number of characters for document content."})]})]})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"results"}),(0,n.jsx)(t.td,{children:"List[Data]"}),(0,n.jsx)(t.td,{children:"A list of Wikipedia search results."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"tool"}),(0,n.jsx)(t.td,{children:"Tool"}),(0,n.jsx)(t.td,{children:"A Wikipedia search tool for use in LangChain."})]})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"legacy-components",children:"Legacy components"}),"\n",(0,n.jsx)(t.p,{children:"Legacy components are available for use but are no longer supported."}),"\n",(0,n.jsx)(t.h3,{id:"calculator-tool",children:"Calculator Tool"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["This component is now available in ",(0,n.jsx)(t.a,{href:"/components-helpers#calculator",children:"Helper components"}),"."]})}),"\n",(0,n.jsx)(t.p,{children:"This component allows you to evaluate basic arithmetic expressions. It supports addition, subtraction, multiplication, division, and exponentiation."}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"expression"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsxs)(t.td,{children:["The arithmetic expression to evaluate. For example, ",(0,n.jsx)(t.code,{children:"4*4*(33/22)+12-20"}),"."]})]})})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"result"}),(0,n.jsx)(t.td,{children:"Tool"}),(0,n.jsx)(t.td,{children:"A calculator tool for use in LangChain."})]})})]})]}),"\n",(0,n.jsx)(t.h3,{id:"python-code-structured-tool",children:"Python Code Structured Tool"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["This component is in ",(0,n.jsx)(t.strong,{children:"Legacy"}),", which means it is available for use but no longer in active development.\nInstead, use the ",(0,n.jsx)(t.a,{href:"/components-processing#python-interpreter",children:"Python Interpreter"}),"."]})}),"\n",(0,n.jsx)(t.p,{children:"This component creates a structured tool from Python code using a dataclass."}),"\n",(0,n.jsx)(t.p,{children:"The component dynamically updates its configuration based on the provided Python code, allowing for custom function arguments and descriptions."}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"tool_code"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The Python code for the tool's dataclass."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"tool_name"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The name of the tool."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"tool_description"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The description of the tool."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"return_direct"}),(0,n.jsx)(t.td,{children:"Boolean"}),(0,n.jsx)(t.td,{children:"Whether to return the function output directly."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"tool_function"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The selected function for the tool."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"global_variables"}),(0,n.jsx)(t.td,{children:"Dict"}),(0,n.jsx)(t.td,{children:"Global variables or data for the tool."})]})]})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"result_tool"}),(0,n.jsx)(t.td,{children:"Tool"}),(0,n.jsx)(t.td,{children:"A structured tool created from the Python code."})]})})]})]}),"\n",(0,n.jsx)(t.h3,{id:"python-repl-tool",children:"Python REPL Tool"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["The Python REPL tool is available in ",(0,n.jsx)(t.strong,{children:"Processing"})," and re-named the ",(0,n.jsx)(t.a,{href:"/components-processing#python-interpreter",children:"Python Interpreter"})]})}),"\n",(0,n.jsx)(t.p,{children:"This component creates a Python REPL (Read-Eval-Print Loop) tool for executing Python code."}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"name"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsxs)(t.td,{children:["The name of the tool. Default: ",(0,n.jsx)(t.code,{children:"python_repl"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"description"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"A description of the tool's functionality."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"global_imports"}),(0,n.jsx)(t.td,{children:"List[String]"}),(0,n.jsxs)(t.td,{children:["A list of modules to import globally. Default: ",(0,n.jsx)(t.code,{children:"math"}),"."]})]})]})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"tool"}),(0,n.jsx)(t.td,{children:"Tool"}),(0,n.jsx)(t.td,{children:"A Python REPL tool for use in LangChain."})]})})]})]}),"\n",(0,n.jsx)(t.h3,{id:"retriever-tool",children:"Retriever Tool"}),"\n",(0,n.jsx)(t.p,{children:"This component creates a tool for interacting with a retriever in LangChain."}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"retriever"}),(0,n.jsx)(t.td,{children:"BaseRetriever"}),(0,n.jsx)(t.td,{children:"The retriever to interact with."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"name"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The name of the tool."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"description"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"A description of the tool's functionality."})]})]})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"tool"}),(0,n.jsx)(t.td,{children:"Tool"}),(0,n.jsx)(t.td,{children:"A retriever tool for use in LangChain."})]})})]})]})]})}function x(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(a,{...e})}):a(e)}}}]); \ No newline at end of file diff --git a/assets/js/d5bb0e16.e29d0b76.js b/assets/js/d5bb0e16.e29d0b76.js new file mode 100644 index 0000000000..225f9e8323 --- /dev/null +++ b/assets/js/d5bb0e16.e29d0b76.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[4218],{17886:(e,t,s)=>{s.d(t,{A:()=>i});s(96540);var r=s(64058),n=s(74848);function i({name:e,...t}){const s=r[e];return s?(0,n.jsx)(s,{...t}):null}},28453:(e,t,s)=>{s.d(t,{R:()=>d,x:()=>l});var r=s(96540);const n={},i=r.createContext(n);function d(e){const t=r.useContext(i);return r.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(n):e.components||n:d(e.components),r.createElement(i.Provider,{value:t},e.children)}},68335:(e,t,s)=>{s.d(t,{A:()=>r});const r=s.p+"assets/images/component-astra-db-json-tool-117aff566c0df01a555264bb128b3693.png"},91132:(e,t,s)=>{s.r(t),s.d(t,{assets:()=>c,contentTitle:()=>h,default:()=>x,frontMatter:()=>l,metadata:()=>r,toc:()=>o});const r=JSON.parse('{"id":"Components/components-tools","title":"Tools","description":"The Tools category in Langflow is removed as of Langflow 1.5.","source":"@site/docs/Components/components-tools.mdx","sourceDirName":"Components","slug":"/components-tools","permalink":"/components-tools","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Tools","slug":"/components-tools"},"sidebar":"docs","previous":{"title":"Prompts","permalink":"/components-prompts"},"next":{"title":"Vector stores","permalink":"/components-vector-stores"}}');var n=s(74848),i=s(28453),d=s(17886);const l={title:"Tools",slug:"/components-tools"},h=void 0,c={},o=[{value:"arXiv",id:"arxiv",level:2},{value:"Astra DB tool",id:"astra-db-tool",level:2},{value:"Define Astra DB tool parameters",id:"define-astra-db-tool-parameters",level:3},{value:"Astra DB CQL Tool",id:"astra-db-cql-tool",level:2},{value:"Bing Search API",id:"bing-search-api",level:2},{value:"Combinatorial Reasoner",id:"combinatorial-reasoner",level:2},{value:"DuckDuckGo search",id:"duckduckgo-search",level:2},{value:"Exa Search",id:"exa-search",level:2},{value:"Glean Search API",id:"glean-search-api",level:2},{value:"Google Search API",id:"google-search-api",level:3},{value:"Google Serper API",id:"google-serper-api",level:2},{value:"MCP connection",id:"mcp-connection",level:2},{value:"MCP Tools (deprecated)",id:"mcp-tools-deprecated",level:3},{value:"Search API",id:"search-api",level:2},{value:"SearXNG Search Tool",id:"searxng-search-tool",level:2},{value:"Wikidata",id:"wikidata",level:2},{value:"Wikipedia API",id:"wikipedia-api",level:2},{value:"Legacy components",id:"legacy-components",level:2},{value:"Calculator Tool",id:"calculator-tool",level:3},{value:"Python Code Structured Tool",id:"python-code-structured-tool",level:3},{value:"Python REPL Tool",id:"python-repl-tool",level:3},{value:"Retriever Tool",id:"retriever-tool",level:3}];function a(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components},{Details:r}=t;return r||function(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.strong,{children:"Tools"})," category in Langflow is removed as of Langflow 1.5."]}),"\n",(0,n.jsxs)(t.p,{children:["Most components from the ",(0,n.jsx)(t.strong,{children:"Tools"})," category have been moved to other categories or bundles."]}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["The ",(0,n.jsx)(t.a,{href:"/components-agents#mcp-connection",children:"MCP Tools"})," component is available in ",(0,n.jsx)(t.strong,{children:"Agent components"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:["The ",(0,n.jsx)(t.a,{href:"/components-helpers#calculator",children:"calculator"})," component is available in ",(0,n.jsx)(t.strong,{children:"Helpers"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:["The ",(0,n.jsx)(t.a,{href:"/components-tools#astra-db-tool",children:"Astra DB JSON"})," and ",(0,n.jsx)(t.a,{href:"#astra-db-cql-tool",children:"Astra DB CQL"})," tools are available in the ",(0,n.jsx)(t.strong,{children:"DataStax"})," bundle."]}),"\n",(0,n.jsxs)(t.li,{children:["The ",(0,n.jsx)(t.a,{href:"/components-processing#python-interpreter",children:"Python Interpreter"})," component is available in ",(0,n.jsx)(t.strong,{children:"Processing"}),"."]}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:["The remaining tools listed below are moved to a ",(0,n.jsx)(t.strong,{children:"Bundle"})," or in ",(0,n.jsx)(t.strong,{children:"Legacy"}),".\nLegacy components are available for use but are no longer supported."]}),"\n",(0,n.jsx)(t.h2,{id:"arxiv",children:"arXiv"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["As of Langflow 1.5, this component is available in the ",(0,n.jsx)(t.strong,{children:"Search"})," bundle."]})}),"\n",(0,n.jsxs)(t.p,{children:["This component searches and retrieves papers from ",(0,n.jsx)(t.a,{href:"https://arXiv.org",children:"arXiv.org"}),"."]}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"search_query"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsxs)(t.td,{children:["The search query for arXiv papers. For example, ",(0,n.jsx)(t.code,{children:"quantum computing"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"search_type"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The field to search in."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"max_results"}),(0,n.jsx)(t.td,{children:"Integer"}),(0,n.jsx)(t.td,{children:"The maximum number of results to return."})]})]})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"papers"}),(0,n.jsx)(t.td,{children:"List[Data]"}),(0,n.jsx)(t.td,{children:"A list of retrieved arXiv papers."})]})})]})]}),"\n",(0,n.jsx)(t.h2,{id:"astra-db-tool",children:"Astra DB tool"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["As of Langflow 1.5, this component is available in the ",(0,n.jsx)(t.strong,{children:"DataStax"})," bundle."]})}),"\n",(0,n.jsx)(t.p,{children:"This component allows agents to query data from Astra DB collections."}),"\n",(0,n.jsxs)(t.p,{children:["To use this tool in a flow, connect it to an ",(0,n.jsx)(t.strong,{children:"Agent"})," component.\nThe flow looks like this:"]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{alt:"Astra DB JSON tool connected to an Agent",src:s(68335).A+"",width:"4000",height:"2742"})}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.strong,{children:"Tool Name"})," and ",(0,n.jsx)(t.strong,{children:"Tool Description"})," fields are required for the Agent to decide when to use the tool.\n",(0,n.jsx)(t.strong,{children:"Tool Name"})," cannot contain spaces."]}),"\n",(0,n.jsxs)(t.p,{children:["The values for ",(0,n.jsx)(t.strong,{children:"Collection Name"}),", ",(0,n.jsx)(t.strong,{children:"Astra DB Application Token"}),", and ",(0,n.jsx)(t.strong,{children:"Astra DB API Endpoint"})," are found in your Astra DB deployment. For more information, see the ",(0,n.jsx)(t.a,{href:"https://docs.datastax.com/en/astra-db-serverless/databases/create-database.html",children:"DataStax documentation"}),"."]}),"\n",(0,n.jsxs)(t.p,{children:["In this example, an ",(0,n.jsx)(t.strong,{children:"OpenAI"})," embeddings component is connected to use the Astra DB tool component's ",(0,n.jsx)(t.strong,{children:"Semantic Search"})," capability.\nTo use ",(0,n.jsx)(t.strong,{children:"Semantic Search"}),", you must have an embedding model or Astra DB Vectorize enabled.\nIf you try to run the flow without an embedding model, you will get an error."]}),"\n",(0,n.jsxs)(t.p,{children:["Open the ",(0,n.jsx)(t.strong,{children:"Playground"})," and ask a question about your data.\nThe Agent uses the ",(0,n.jsx)(t.strong,{children:"Astra DB Tool"})," to return information about your collection."]}),"\n",(0,n.jsx)(t.h3,{id:"define-astra-db-tool-parameters",children:"Define Astra DB tool parameters"}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.strong,{children:"Tool Parameters"})," configuration pane allows you to define parameters for ",(0,n.jsx)(t.a,{href:"https://docs.datastax.com/en/astra-db-serverless/api-reference/document-methods/find-many.html#parameters",children:"filter conditions"})," for the component's ",(0,n.jsx)(t.strong,{children:"Find"})," command."]}),"\n",(0,n.jsxs)(t.p,{children:["These filters become available as parameters that the LLM can use when calling the tool, with a better understanding of each parameter provided by the ",(0,n.jsx)(t.strong,{children:"Description"})," field."]}),"\n",(0,n.jsxs)(t.ol,{children:["\n",(0,n.jsxs)(t.li,{children:["To define a parameter for your query, in the ",(0,n.jsx)(t.strong,{children:"Tool Parameters"})," pane, click ",(0,n.jsx)(d.A,{name:"Plus","aria-hidden":"true"})," ",(0,n.jsx)(t.strong,{children:"Add a new row"}),"."]}),"\n",(0,n.jsxs)(t.li,{children:["Complete the fields based on your data. For example, with this filter, the LLM can filter by unique ",(0,n.jsx)(t.code,{children:"customer_id"})," values."]}),"\n"]}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:["Name: ",(0,n.jsx)(t.code,{children:"customer_id"})]}),"\n",(0,n.jsx)(t.li,{children:"Attribute Name: Leave empty if the attribute matches the field name in the database."}),"\n",(0,n.jsxs)(t.li,{children:["Description: ",(0,n.jsx)(t.code,{children:'"The unique identifier of the customer to filter by"'}),"."]}),"\n",(0,n.jsxs)(t.li,{children:["Is Metadata: ",(0,n.jsx)(t.code,{children:"False"})," unless the value stored in the metadata field."]}),"\n",(0,n.jsxs)(t.li,{children:["Is Mandatory: ",(0,n.jsx)(t.code,{children:"True"})," to require this filter."]}),"\n",(0,n.jsxs)(t.li,{children:["Is Timestamp: ",(0,n.jsx)(t.code,{children:"False"})," since the value is an ID, not a timestamp."]}),"\n",(0,n.jsxs)(t.li,{children:["Operator: ",(0,n.jsx)(t.code,{children:"$eq"})," to look for an exact match."]}),"\n"]}),"\n",(0,n.jsxs)(t.p,{children:["If you want to apply filters regardless of the LLM's input, use the ",(0,n.jsx)(t.strong,{children:"Static Filters"})," option, which is available in the component's ",(0,n.jsx)(t.strong,{children:"Controls"})," pane."]}),"\n",(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Parameter"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Name"}),(0,n.jsx)(t.td,{children:"The name of the parameter that is exposed to the LLM. It can be the same as the underlying field name or a more descriptive label. The LLM uses this name, along with the description, to infer what value to provide during execution."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Attribute Name"}),(0,n.jsxs)(t.td,{children:["When the parameter name shown to the LLM differs from the actual field or property in the database, use this setting to map the user-facing name to the correct attribute. For example, to apply a range filter to the timestamp field, define two separate parameters, such as ",(0,n.jsx)(t.code,{children:"start_date"})," and ",(0,n.jsx)(t.code,{children:"end_date"}),", that both reference the same timestamp attribute."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Description"}),(0,n.jsxs)(t.td,{children:["Provides instructions to the LLM on how the parameter should be used. Clear and specific guidance helps the LLM provide valid input. For example, if a field such as ",(0,n.jsx)(t.code,{children:"specialty"})," is stored in lowercase, the description should indicate that the input must be lowercase."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Is Metadata"}),(0,n.jsxs)(t.td,{children:["When loading data using LangChain or Langflow, additional attributes may be stored under a metadata object. If the target attribute is stored this way, enable this option. It adjusts the query by generating a filter in the format: ",(0,n.jsx)(t.code,{children:'{"metadata.": ""}'})]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Is Timestamp"}),(0,n.jsx)(t.td,{children:"For date or time-based filters, enable this option to automatically convert values to the timestamp format that the Astrapy client expects. This ensures compatibility with the underlying API without requiring manual formatting."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Operator"}),(0,n.jsxs)(t.td,{children:["Defines the filtering logic applied to the attribute. You can use any valid ",(0,n.jsx)(t.a,{href:"https://docs.datastax.com/en/astra-db-serverless/api-reference/filter-operator-collections.html",children:"Data API filter operator"}),". For example, to filter a time range on the timestamp attribute, use two parameters: one with the ",(0,n.jsx)(t.code,{children:"$gt"}),' operator for "greater than", and another with the ',(0,n.jsx)(t.code,{children:"$lt"}),' operator for "less than".']})]})]})]}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Tool Name"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The name used to reference the tool in the agent's prompt."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Tool Description"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"A brief description of the tool. This helps the model decide when to use it."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Collection Name"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The name of the Astra DB collection to query."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Token"}),(0,n.jsx)(t.td,{children:"SecretString"}),(0,n.jsx)(t.td,{children:"The authentication token for accessing Astra DB."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"API Endpoint"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The Astra DB API endpoint."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Projection Fields"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsxs)(t.td,{children:["The attributes to return, separated by commas. The default is ",(0,n.jsx)(t.code,{children:"*"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Tool Parameters"}),(0,n.jsx)(t.td,{children:"Dict"}),(0,n.jsxs)(t.td,{children:["Parameters the model needs to fill to execute the tool. For required parameters, use an exclamation mark, for example ",(0,n.jsx)(t.code,{children:"!customer_id"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Static Filters"}),(0,n.jsx)(t.td,{children:"Dict"}),(0,n.jsx)(t.td,{children:"Attribute-value pairs used to filter query results."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Limit"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The number of documents to return."})]})]})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.strong,{children:"Data"})," output is used when directly querying Astra DB, while the ",(0,n.jsx)(t.strong,{children:"Tool"})," output is used when integrating with agents."]}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Data"}),(0,n.jsx)(t.td,{children:"List[Data]"}),(0,n.jsxs)(t.td,{children:["A list of ",(0,n.jsx)(t.a,{href:"/data-types#data",children:"Data"})," objects containing the query results from Astra DB. Each ",(0,n.jsx)(t.code,{children:"Data"})," object contains the document fields specified by the projection attributes. Limited by the ",(0,n.jsx)(t.code,{children:"number_of_results"})," parameter."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Tool"}),(0,n.jsx)(t.td,{children:"StructuredTool"}),(0,n.jsxs)(t.td,{children:["A LangChain ",(0,n.jsx)(t.code,{children:"StructuredTool"})," object that can be used in agent workflows. Contains the tool name, description, argument schema based on tool parameters, and the query function."]})]})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"astra-db-cql-tool",children:"Astra DB CQL Tool"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["As of Langflow 1.5, this component is available in the ",(0,n.jsx)(t.strong,{children:"DataStax"})," bundle."]})}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.code,{children:"Astra DB CQL Tool"})," allows agents to query data from CQL tables in Astra DB."]}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Tool Name"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The name used to reference the tool in the agent's prompt."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Tool Description"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"A brief description of the tool to guide the model in using it."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Keyspace"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The name of the keyspace."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Table Name"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The name of the Astra DB CQL table to query."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Token"}),(0,n.jsx)(t.td,{children:"SecretString"}),(0,n.jsx)(t.td,{children:"The authentication token for Astra DB."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"API Endpoint"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The Astra DB API endpoint."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Projection Fields"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:'The attributes to return, separated by commas. Default: "*".'})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Partition Keys"}),(0,n.jsx)(t.td,{children:"Dict"}),(0,n.jsx)(t.td,{children:"Required parameters that the model must fill to query the tool."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Clustering Keys"}),(0,n.jsx)(t.td,{children:"Dict"}),(0,n.jsxs)(t.td,{children:["Optional parameters the model can fill to refine the query. Required parameters should be marked with an exclamation mark, for example, ",(0,n.jsx)(t.code,{children:"!customer_id"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Static Filters"}),(0,n.jsx)(t.td,{children:"Dict"}),(0,n.jsx)(t.td,{children:"Attribute-value pairs used to filter query results."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Limit"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The number of records to return."})]})]})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Data"}),(0,n.jsx)(t.td,{children:"List[Data]"}),(0,n.jsxs)(t.td,{children:["A list of ",(0,n.jsx)(t.a,{href:"/data-types#data",children:"Data"})," objects containing the query results from the Astra DB CQL table. Each Data object contains the document fields specified by the projection fields. Limited by the ",(0,n.jsx)(t.code,{children:"number_of_results"})," parameter."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"Tool"}),(0,n.jsx)(t.td,{children:"StructuredTool"}),(0,n.jsx)(t.td,{children:"A LangChain StructuredTool object that can be used in agent workflows. Contains the tool name, description, argument schema based on partition and clustering keys, and the query function."})]})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"bing-search-api",children:"Bing Search API"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["As of Langflow 1.5, this component is available in the ",(0,n.jsx)(t.strong,{children:"Search"})," bundle."]})}),"\n",(0,n.jsx)(t.p,{children:"This component allows you to call the Bing Search API."}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"bing_subscription_key"}),(0,n.jsx)(t.td,{children:"SecretString"}),(0,n.jsx)(t.td,{children:"A Bing API subscription key."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"input_value"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The search query input."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"bing_search_url"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"A custom Bing Search URL."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"k"}),(0,n.jsx)(t.td,{children:"Integer"}),(0,n.jsx)(t.td,{children:"The number of search results to return."})]})]})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"results"}),(0,n.jsx)(t.td,{children:"List[Data]"}),(0,n.jsx)(t.td,{children:"A list of search results."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"tool"}),(0,n.jsx)(t.td,{children:"Tool"}),(0,n.jsx)(t.td,{children:"A Bing Search tool for use in LangChain."})]})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"combinatorial-reasoner",children:"Combinatorial Reasoner"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["This component is available in the ",(0,n.jsx)(t.strong,{children:"Components"})," menu under ",(0,n.jsx)(t.strong,{children:"Bundles"}),"."]})}),"\n",(0,n.jsxs)(t.p,{children:["This component runs Icosa's Combinatorial Reasoning (CR) pipeline on an input to create an optimized prompt with embedded reasons. For more information, see ",(0,n.jsx)(t.a,{href:"https://www.icosacomputing.com/",children:"Icosa computing"}),"."]}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"prompt"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The input to run CR on."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"openai_api_key"}),(0,n.jsx)(t.td,{children:"SecretString"}),(0,n.jsx)(t.td,{children:"An OpenAI API key for authentication."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"username"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"A username for Icosa API authentication."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"password"}),(0,n.jsx)(t.td,{children:"SecretString"}),(0,n.jsx)(t.td,{children:"A password for Icosa API authentication."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"model_name"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The OpenAI LLM to use for reason generation."})]})]})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"optimized_prompt"}),(0,n.jsx)(t.td,{children:"Message"}),(0,n.jsx)(t.td,{children:"A message object containing the optimized prompt."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"reasons"}),(0,n.jsx)(t.td,{children:"List[String]"}),(0,n.jsx)(t.td,{children:"A list of the selected reasons that are embedded in the optimized prompt."})]})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"duckduckgo-search",children:"DuckDuckGo search"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["As of Langflow 1.5, this component is available in the ",(0,n.jsx)(t.strong,{children:"Search"})," bundle."]})}),"\n",(0,n.jsxs)(t.p,{children:["This component performs web searches using the ",(0,n.jsx)(t.a,{href:"https://www.duckduckgo.com",children:"DuckDuckGo"})," search engine with result-limiting capabilities."]}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"input_value"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The search query to execute with DuckDuckGo."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"max_results"}),(0,n.jsx)(t.td,{children:"Integer"}),(0,n.jsx)(t.td,{children:"The maximum number of search results to return. Default: 5."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"max_snippet_length"}),(0,n.jsx)(t.td,{children:"Integer"}),(0,n.jsx)(t.td,{children:"The maximum length of each result snippet. Default: 100."})]})]})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"data"}),(0,n.jsx)(t.td,{children:"List[Data]"}),(0,n.jsx)(t.td,{children:"A list of search results as Data objects containing snippets and full content."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"text"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The search results formatted as a single text string."})]})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"exa-search",children:"Exa Search"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["As of Langflow 1.5, this component is available in the ",(0,n.jsx)(t.strong,{children:"Search"})," bundle."]})}),"\n",(0,n.jsxs)(t.p,{children:["This component provides an ",(0,n.jsx)(t.a,{href:"https://exa.ai/",children:"Exa Search"})," toolkit for search and content retrieval."]}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"metaphor_api_key"}),(0,n.jsx)(t.td,{children:"SecretString"}),(0,n.jsx)(t.td,{children:"An API key for Exa Search."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"use_autoprompt"}),(0,n.jsx)(t.td,{children:"Boolean"}),(0,n.jsx)(t.td,{children:"Whether to use the autoprompt feature. Default: true."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"search_num_results"}),(0,n.jsx)(t.td,{children:"Integer"}),(0,n.jsx)(t.td,{children:"The number of results to return for search. Default: 5."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"similar_num_results"}),(0,n.jsx)(t.td,{children:"Integer"}),(0,n.jsx)(t.td,{children:"The number of similar results to return. Default: 5."})]})]})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"tools"}),(0,n.jsx)(t.td,{children:"List[Tool]"}),(0,n.jsx)(t.td,{children:"A list of search tools provided by the toolkit."})]})})]})]}),"\n",(0,n.jsx)(t.h2,{id:"glean-search-api",children:"Glean Search API"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["As of Langflow 1.5, this component is available in the ",(0,n.jsx)(t.strong,{children:"Search"})," bundle."]})}),"\n",(0,n.jsx)(t.p,{children:"This component allows you to call the Glean Search API."}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"glean_api_url"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The URL of the Glean API."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"glean_access_token"}),(0,n.jsx)(t.td,{children:"SecretString"}),(0,n.jsx)(t.td,{children:"An access token for Glean API authentication."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"query"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The search query input."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"page_size"}),(0,n.jsx)(t.td,{children:"Integer"}),(0,n.jsx)(t.td,{children:"The number of results per page. Default: 10."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"request_options"}),(0,n.jsx)(t.td,{children:"Dict"}),(0,n.jsx)(t.td,{children:"Additional options for the API request."})]})]})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"results"}),(0,n.jsx)(t.td,{children:"List[Data]"}),(0,n.jsx)(t.td,{children:"A list of search results."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"tool"}),(0,n.jsx)(t.td,{children:"Tool"}),(0,n.jsx)(t.td,{children:"A Glean Search tool for use in LangChain."})]})]})]})]}),"\n",(0,n.jsx)(t.h3,{id:"google-search-api",children:"Google Search API"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["As of Langflow 1.5, this component is available in the ",(0,n.jsx)(t.strong,{children:"Search"})," bundle."]})}),"\n",(0,n.jsx)(t.p,{children:"This component allows you to call the Google Search API."}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"google_api_key"}),(0,n.jsx)(t.td,{children:"SecretString"}),(0,n.jsx)(t.td,{children:"A Google API key for authentication."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"google_cse_id"}),(0,n.jsx)(t.td,{children:"SecretString"}),(0,n.jsx)(t.td,{children:"A Google Custom Search Engine ID."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"input_value"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The search query input."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"k"}),(0,n.jsx)(t.td,{children:"Integer"}),(0,n.jsx)(t.td,{children:"The number of search results to return."})]})]})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"results"}),(0,n.jsx)(t.td,{children:"List[Data]"}),(0,n.jsx)(t.td,{children:"A list of search results."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"tool"}),(0,n.jsx)(t.td,{children:"Tool"}),(0,n.jsx)(t.td,{children:"A Google Search tool for use in LangChain."})]})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"google-serper-api",children:"Google Serper API"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["As of Langflow 1.5, this component is available in the ",(0,n.jsx)(t.strong,{children:"Search"})," bundle."]})}),"\n",(0,n.jsx)(t.p,{children:"This component allows you to call the Serper.dev Google Search API."}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"serper_api_key"}),(0,n.jsx)(t.td,{children:"SecretString"}),(0,n.jsx)(t.td,{children:"An API key for Serper.dev authentication."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"input_value"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The search query input."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"k"}),(0,n.jsx)(t.td,{children:"Integer"}),(0,n.jsx)(t.td,{children:"The number of search results to return."})]})]})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"results"}),(0,n.jsx)(t.td,{children:"List[Data]"}),(0,n.jsx)(t.td,{children:"A list of search results."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"tool"}),(0,n.jsx)(t.td,{children:"Tool"}),(0,n.jsx)(t.td,{children:"A Google Serper search tool for use in LangChain."})]})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"mcp-connection",children:"MCP connection"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["As of Langflow 1.5, this component is called the ",(0,n.jsx)(t.strong,{children:"MCP Tools"})," component."]})}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.strong,{children:"MCP tools"})," component exposes Model Context Protocol (MCP) servers, including your other flows, as tools for Langflow agents. For information about this component, see ",(0,n.jsx)(t.a,{href:"/mcp-client",children:"Use Langflow as an MCP client"}),"."]}),"\n",(0,n.jsx)(t.h3,{id:"mcp-tools-deprecated",children:"MCP Tools (deprecated)"}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.strong,{children:"MCP Tools (stdio)"})," and ",(0,n.jsx)(t.strong,{children:"MCP Tools (SSE)"})," components are deprecated as of Langflow version 1.3.\nThey are replaced by a single ",(0,n.jsx)(t.a,{href:"/mcp-client",children:"MCP tools"})," component."]}),"\n",(0,n.jsx)(t.h2,{id:"search-api",children:"Search API"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["As of Langflow 1.5, this component is available in the ",(0,n.jsx)(t.strong,{children:"Search"})," bundle."]})}),"\n",(0,n.jsxs)(t.p,{children:["This component calls the ",(0,n.jsx)(t.code,{children:"searchapi.io"})," API. It can be used to search the web for information."]}),"\n",(0,n.jsxs)(t.p,{children:["For more information, see the ",(0,n.jsx)(t.a,{href:"https://www.searchapi.io/docs/google",children:"SearchAPI documentation"}),"."]}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"engine"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsxs)(t.td,{children:["The search engine to use. Default: ",(0,n.jsx)(t.code,{children:"google"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"api_key"}),(0,n.jsx)(t.td,{children:"SecretString"}),(0,n.jsx)(t.td,{children:"The API key for authenticating with SearchAPI."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"input_value"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The search query or input for the API call."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"search_params"}),(0,n.jsx)(t.td,{children:"Dict"}),(0,n.jsx)(t.td,{children:"Additional parameters for customizing the search."})]})]})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"data"}),(0,n.jsx)(t.td,{children:"List[Data]"}),(0,n.jsx)(t.td,{children:"A list of Data objects containing search results."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"tool"}),(0,n.jsx)(t.td,{children:"Tool"}),(0,n.jsx)(t.td,{children:"A Tool object for use in LangChain workflows."})]})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"searxng-search-tool",children:"SearXNG Search Tool"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["As of Langflow 1.5, this component is available in the ",(0,n.jsx)(t.strong,{children:"Search"})," bundle."]})}),"\n",(0,n.jsx)(t.p,{children:"This component creates a tool for searching using SearXNG, a metasearch engine."}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"url"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The URL of the SearXNG instance."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"max_results"}),(0,n.jsx)(t.td,{children:"Integer"}),(0,n.jsx)(t.td,{children:"The maximum number of results to return."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"categories"}),(0,n.jsx)(t.td,{children:"List[String]"}),(0,n.jsx)(t.td,{children:"The categories to search in."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"language"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The language for the search results."})]})]})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"result_tool"}),(0,n.jsx)(t.td,{children:"Tool"}),(0,n.jsx)(t.td,{children:"A SearXNG search tool for use in LangChain."})]})})]})]}),"\n",(0,n.jsx)(t.h2,{id:"wikidata",children:"Wikidata"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["As of Langflow 1.5, this component is available in the ",(0,n.jsx)(t.strong,{children:"Search"})," bundle."]})}),"\n",(0,n.jsx)(t.p,{children:"This component performs a search using the Wikidata API."}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"query"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The text query for similarity search on Wikidata."})]})})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"data"}),(0,n.jsx)(t.td,{children:"List[Data]"}),(0,n.jsx)(t.td,{children:"The search results from Wikidata API as a list of Data objects."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"text"}),(0,n.jsx)(t.td,{children:"Message"}),(0,n.jsx)(t.td,{children:"The search results formatted as a text message."})]})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"wikipedia-api",children:"Wikipedia API"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["As of Langflow 1.5, this component is available in the ",(0,n.jsx)(t.strong,{children:"Search"})," bundle."]})}),"\n",(0,n.jsx)(t.p,{children:"This component creates a tool for searching and retrieving information from Wikipedia."}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"input_value"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The search query input."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"lang"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsxs)(t.td,{children:["The language code for Wikipedia. Default: ",(0,n.jsx)(t.code,{children:"en"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"k"}),(0,n.jsx)(t.td,{children:"Integer"}),(0,n.jsx)(t.td,{children:"The number of results to return."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"load_all_available_meta"}),(0,n.jsx)(t.td,{children:"Boolean"}),(0,n.jsx)(t.td,{children:"Whether to load all available metadata."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"doc_content_chars_max"}),(0,n.jsx)(t.td,{children:"Integer"}),(0,n.jsx)(t.td,{children:"The maximum number of characters for document content."})]})]})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"results"}),(0,n.jsx)(t.td,{children:"List[Data]"}),(0,n.jsx)(t.td,{children:"A list of Wikipedia search results."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"tool"}),(0,n.jsx)(t.td,{children:"Tool"}),(0,n.jsx)(t.td,{children:"A Wikipedia search tool for use in LangChain."})]})]})]})]}),"\n",(0,n.jsx)(t.h2,{id:"legacy-components",children:"Legacy components"}),"\n",(0,n.jsx)(t.p,{children:"Legacy components are available for use but are no longer supported."}),"\n",(0,n.jsx)(t.h3,{id:"calculator-tool",children:"Calculator Tool"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["This component is now available in ",(0,n.jsx)(t.a,{href:"/components-helpers#calculator",children:"Helper components"}),"."]})}),"\n",(0,n.jsx)(t.p,{children:"This component allows you to evaluate basic arithmetic expressions. It supports addition, subtraction, multiplication, division, and exponentiation."}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"expression"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsxs)(t.td,{children:["The arithmetic expression to evaluate. For example, ",(0,n.jsx)(t.code,{children:"4*4*(33/22)+12-20"}),"."]})]})})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"result"}),(0,n.jsx)(t.td,{children:"Tool"}),(0,n.jsx)(t.td,{children:"A calculator tool for use in LangChain."})]})})]})]}),"\n",(0,n.jsx)(t.h3,{id:"python-code-structured-tool",children:"Python Code Structured Tool"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["This component is in ",(0,n.jsx)(t.strong,{children:"Legacy"}),", which means it is available for use but no longer in active development.\nInstead, use the ",(0,n.jsx)(t.a,{href:"/components-processing#python-interpreter",children:"Python Interpreter"}),"."]})}),"\n",(0,n.jsx)(t.p,{children:"This component creates a structured tool from Python code using a dataclass."}),"\n",(0,n.jsx)(t.p,{children:"The component dynamically updates its configuration based on the provided Python code, allowing for custom function arguments and descriptions."}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"tool_code"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The Python code for the tool's dataclass."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"tool_name"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The name of the tool."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"tool_description"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The description of the tool."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"return_direct"}),(0,n.jsx)(t.td,{children:"Boolean"}),(0,n.jsx)(t.td,{children:"Whether to return the function output directly."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"tool_function"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The selected function for the tool."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"global_variables"}),(0,n.jsx)(t.td,{children:"Dict"}),(0,n.jsx)(t.td,{children:"Global variables or data for the tool."})]})]})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"result_tool"}),(0,n.jsx)(t.td,{children:"Tool"}),(0,n.jsx)(t.td,{children:"A structured tool created from the Python code."})]})})]})]}),"\n",(0,n.jsx)(t.h3,{id:"python-repl-tool",children:"Python REPL Tool"}),"\n",(0,n.jsx)(t.admonition,{type:"important",children:(0,n.jsxs)(t.p,{children:["The Python REPL tool is available in ",(0,n.jsx)(t.strong,{children:"Processing"})," and re-named the ",(0,n.jsx)(t.a,{href:"/components-processing#python-interpreter",children:"Python Interpreter"})]})}),"\n",(0,n.jsx)(t.p,{children:"This component creates a Python REPL (Read-Eval-Print Loop) tool for executing Python code."}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"name"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsxs)(t.td,{children:["The name of the tool. Default: ",(0,n.jsx)(t.code,{children:"python_repl"}),"."]})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"description"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"A description of the tool's functionality."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"global_imports"}),(0,n.jsx)(t.td,{children:"List[String]"}),(0,n.jsxs)(t.td,{children:["A list of modules to import globally. Default: ",(0,n.jsx)(t.code,{children:"math"}),"."]})]})]})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"tool"}),(0,n.jsx)(t.td,{children:"Tool"}),(0,n.jsx)(t.td,{children:"A Python REPL tool for use in LangChain."})]})})]})]}),"\n",(0,n.jsx)(t.h3,{id:"retriever-tool",children:"Retriever Tool"}),"\n",(0,n.jsx)(t.p,{children:"This component creates a tool for interacting with a retriever in LangChain."}),"\n",(0,n.jsxs)(r,{children:[(0,n.jsx)("summary",{children:"Parameters"}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Inputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsxs)(t.tbody,{children:[(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"retriever"}),(0,n.jsx)(t.td,{children:"BaseRetriever"}),(0,n.jsx)(t.td,{children:"The retriever to interact with."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"name"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"The name of the tool."})]}),(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"description"}),(0,n.jsx)(t.td,{children:"String"}),(0,n.jsx)(t.td,{children:"A description of the tool's functionality."})]})]})]}),(0,n.jsx)(t.p,{children:(0,n.jsx)(t.strong,{children:"Outputs"})}),(0,n.jsxs)(t.table,{children:[(0,n.jsx)(t.thead,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.th,{children:"Name"}),(0,n.jsx)(t.th,{children:"Type"}),(0,n.jsx)(t.th,{children:"Description"})]})}),(0,n.jsx)(t.tbody,{children:(0,n.jsxs)(t.tr,{children:[(0,n.jsx)(t.td,{children:"tool"}),(0,n.jsx)(t.td,{children:"Tool"}),(0,n.jsx)(t.td,{children:"A retriever tool for use in LangChain."})]})})]})]})]})}function x(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,n.jsx)(t,{...e,children:(0,n.jsx)(a,{...e})}):a(e)}}}]); \ No newline at end of file diff --git a/assets/js/e6c6a4d2.81a844e5.js b/assets/js/e6c6a4d2.25926483.js similarity index 55% rename from assets/js/e6c6a4d2.81a844e5.js rename to assets/js/e6c6a4d2.25926483.js index 9fe470a9e9..360565ce81 100644 --- a/assets/js/e6c6a4d2.81a844e5.js +++ b/assets/js/e6c6a4d2.25926483.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 \\"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 +"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 \\"nulla1c\\": \\"\\"\\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/f01590dc.6a7eeda6.js b/assets/js/f01590dc.6a7eeda6.js deleted file mode 100644 index 16088486be..0000000000 --- a/assets/js/f01590dc.6a7eeda6.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[4223],{26928:(e,t,n)=>{n.r(t),n.d(t,{CH:()=>a,assets:()=>l,chCodeConfig:()=>h,contentTitle:()=>d,default:()=>j,frontMatter:()=>c,metadata:()=>i,toc:()=>x});const i=JSON.parse('{"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.","source":"@site/docs/Integrations/Nvidia/integrations-nvidia-ingest.mdx","sourceDirName":"Integrations/Nvidia","slug":"/integrations-nvidia-ingest","permalink":"/integrations-nvidia-ingest","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Integrate NVIDIA Retriever Extraction with Langflow","slug":"/integrations-nvidia-ingest"},"sidebar":"docs","previous":{"title":"Notion Meeting Notes Agent","permalink":"/integrations/notion/notion-agent-meeting-notes"},"next":{"title":"NVIDIA NIM on WSL2","permalink":"/integrations-nvidia-ingest-wsl2"}}');var r=n(74848),s=n(28453),o=n(24754);const c={title:"Integrate NVIDIA Retriever Extraction with Langflow",slug:"/integrations-nvidia-ingest"},d=void 0,l={},a={annotations:o.hk,Code:o.Cy},h={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},x=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Use the NVIDIA Retriever Extraction component in a flow",id:"use-the-nvidia-retriever-extraction-component-in-a-flow",level:2},{value:"NVIDIA Retriever Extraction component parameters",id:"parameters",level:2},{value:"Inputs",id:"inputs",level:3},{value:"Outputs",id:"outputs",level:3}];function p(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return a||u("CH",!1),a.Code||u("CH.Code",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n",(0,r.jsx)(t.admonition,{type:"note",children:(0,r.jsx)(t.p,{children:"NVIDIA Retriever Extraction is also known as NV-Ingest and NeMo Retriever Extraction."})}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"NVIDIA Retriever Extraction"})," component integrates with the ",(0,r.jsx)(t.a,{href:"https://github.com/NVIDIA/nv-ingest",children:"NVIDIA nv-ingest"})," microservice for data ingestion, processing, and extraction of text files."]}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.code,{children:"nv-ingest"})," service supports multiple extraction methods for PDF, DOCX, and PPTX file types, and includes pre- and post-processing services like splitting, chunking, and embedding generation. The extractor service's High Resolution mode uses the ",(0,r.jsx)(t.code,{children:"nemoretriever-parse"})," extraction method for better quality extraction from scanned PDF documents. This feature is only available for PDF files."]}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"NVIDIA Retriever Extraction"})," component imports the NVIDIA ",(0,r.jsx)(t.code,{children:"Ingestor"})," client, ingests files with requests to the NVIDIA ingest endpoint, and outputs the processed content as a list of ",(0,r.jsx)(t.a,{href:"/concepts-objects#data-object",children:"Data"})," objects. ",(0,r.jsx)(t.code,{children:"Ingestor"})," accepts additional configuration options for data extraction from other text formats. To configure these options, see the ",(0,r.jsx)(t.a,{href:"/integrations-nvidia-ingest#parameters",children:"component parameters"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["An NVIDIA Ingest endpoint. For more information on setting up an NVIDIA Ingest endpoint, see the ",(0,r.jsx)(t.a,{href:"https://github.com/NVIDIA/nv-ingest?tab=readme-ov-file#quickstart",children:"NVIDIA Ingest quickstart"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"NVIDIA Retriever Extraction"})," component requires the installation of additional dependencies to your Langflow environment. To install the dependencies in a virtual environment, run the following commands."]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:"If you have the Langflow repository cloned and installed from source:"}),"\n"]}),"\n",(0,r.jsx)(a.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"source **",props:{style:{color:"#79C0FF"}}},{content:"YOUR_LANGFLOW_VENV",props:{style:{color:"#A5D6FF"}}},{content:"**",props:{style:{color:"#79C0FF"}}},{content:"/bin/activate",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"uv ",props:{style:{color:"#FFA657"}}},{content:"sync ",props:{style:{color:"#A5D6FF"}}},{content:"--extra ",props:{style:{color:"#79C0FF"}}},{content:"nv-ingest",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"uv ",props:{style:{color:"#FFA657"}}},{content:"run langflow run",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:"If you are installing Langflow from the Python Package Index:"}),"\n"]}),"\n",(0,r.jsx)(a.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"source **",props:{style:{color:"#79C0FF"}}},{content:"YOUR_LANGFLOW_VENV",props:{style:{color:"#A5D6FF"}}},{content:"**",props:{style:{color:"#79C0FF"}}},{content:"/bin/activate",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"uv ",props:{style:{color:"#FFA657"}}},{content:"pip install ",props:{style:{color:"#A5D6FF"}}},{content:"--prerelease=allow ",props:{style:{color:"#79C0FF"}}},{content:"'langflow[nv-ingest]'",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"uv ",props:{style:{color:"#FFA657"}}},{content:"run langflow run",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"use-the-nvidia-retriever-extraction-component-in-a-flow",children:"Use the NVIDIA Retriever Extraction component in a flow"}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"NVIDIA Retriever Extraction"})," component accepts ",(0,r.jsx)(t.strong,{children:"Message"})," inputs and outputs ",(0,r.jsx)(t.strong,{children:"Data"}),". The component calls an NVIDIA Ingest microservice's endpoint to ingest a local file and extract the text."]}),"\n",(0,r.jsx)(t.p,{children:"To use the NVIDIA Retriever Extraction component in your flow, follow these steps:"}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["In the component library, click the ",(0,r.jsx)(t.strong,{children:"NVIDIA Retriever Extraction"})," component, and then drag it onto the canvas."]}),"\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Base URL"})," field, enter the URL of the NVIDIA Ingest endpoint.\nOptionally, add the endpoint URL as a ",(0,r.jsx)(t.strong,{children:"Global variable"}),":","\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["Click ",(0,r.jsx)(t.strong,{children:"Settings"}),", and then click ",(0,r.jsx)(t.strong,{children:"Global Variables"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Click ",(0,r.jsx)(t.strong,{children:"Add New"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Name your variable. Paste your endpoint in the ",(0,r.jsx)(t.strong,{children:"Value"})," field."]}),"\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Apply To Fields"})," field, select the field you want to globally apply this variable to. In this case, select ",(0,r.jsx)(t.strong,{children:"NVIDIA Base URL"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Click ",(0,r.jsx)(t.strong,{children:"Save Variable"}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["Click the ",(0,r.jsx)(t.strong,{children:"Select files"})," button to select which file you want to ingest."]}),"\n",(0,r.jsx)(t.li,{children:"Select which text type to extract from the file.\nThe component supports text, charts, tables, images, and infographics.\nOptionally, for PDF files, enable High Resolution mode for better quality extraction from scanned documents."}),"\n",(0,r.jsxs)(t.li,{children:["Select whether to split the text into chunks.\nModify the splitting parameters in the component's ",(0,r.jsx)(t.strong,{children:"Configuration"})," tab."]}),"\n",(0,r.jsxs)(t.li,{children:["Click ",(0,r.jsx)(t.strong,{children:"Run"})," to ingest the file."]}),"\n",(0,r.jsxs)(t.li,{children:["To confirm the component is ingesting the file, open the ",(0,r.jsx)(t.strong,{children:"Logs"})," pane to view the output of the flow."]}),"\n",(0,r.jsxs)(t.li,{children:["To store the processed data in a vector database, add an ",(0,r.jsx)(t.strong,{children:"AstraDB Vector"})," component to your flow, and connect the ",(0,r.jsx)(t.strong,{children:"NVIDIA Retriever Extraction"})," component to the ",(0,r.jsx)(t.strong,{children:"AstraDB Vector"})," component with a ",(0,r.jsx)(t.strong,{children:"Data"})," output."]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"NVIDIA Retriever Extraction component flow",src:n(76102).A+"",width:"1722",height:"1548"})}),"\n",(0,r.jsxs)(t.ol,{start:"9",children:["\n",(0,r.jsx)(t.li,{children:"Run the flow.\nInspect your Astra DB vector database to view the processed data."}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"parameters",children:"NVIDIA Retriever Extraction component parameters"}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"NVIDIA Retriever Extraction"})," component has the following parameters."]}),"\n",(0,r.jsxs)(t.p,{children:["For more information, see the ",(0,r.jsx)(t.a,{href:"https://nvidia.github.io/nv-ingest/user-guide/",children:"NV-Ingest documentation"}),"."]}),"\n",(0,r.jsx)(t.h3,{id:"inputs",children:"Inputs"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"base_url"}),(0,r.jsx)(t.td,{children:"NVIDIA Ingestion URL"}),(0,r.jsx)(t.td,{children:"The URL of the NVIDIA Ingestion API."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"path"}),(0,r.jsx)(t.td,{children:"Path"}),(0,r.jsx)(t.td,{children:"File path to process."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"extract_text"}),(0,r.jsx)(t.td,{children:"Extract Text"}),(0,r.jsxs)(t.td,{children:["Extract text from documents. Default: ",(0,r.jsx)(t.code,{children:"True"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"extract_charts"}),(0,r.jsx)(t.td,{children:"Extract Charts"}),(0,r.jsxs)(t.td,{children:["Extract text from charts. Default: ",(0,r.jsx)(t.code,{children:"False"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"extract_tables"}),(0,r.jsx)(t.td,{children:"Extract Tables"}),(0,r.jsxs)(t.td,{children:["Extract text from tables. Default: ",(0,r.jsx)(t.code,{children:"True"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"extract_images"}),(0,r.jsx)(t.td,{children:"Extract Images"}),(0,r.jsxs)(t.td,{children:["Extract images from document. Default: ",(0,r.jsx)(t.code,{children:"True"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"extract_infographics"}),(0,r.jsx)(t.td,{children:"Extract Infographics"}),(0,r.jsxs)(t.td,{children:["Extract infographics from document. Default: ",(0,r.jsx)(t.code,{children:"False"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"text_depth"}),(0,r.jsx)(t.td,{children:"Text Depth"}),(0,r.jsxs)(t.td,{children:["The level at which text is extracted. Options: 'document', 'page', 'block', 'line', 'span'. Default: ",(0,r.jsx)(t.code,{children:"page"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"split_text"}),(0,r.jsx)(t.td,{children:"Split Text"}),(0,r.jsxs)(t.td,{children:["Split text into smaller chunks. Default: ",(0,r.jsx)(t.code,{children:"True"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"chunk_size"}),(0,r.jsx)(t.td,{children:"Chunk Size"}),(0,r.jsxs)(t.td,{children:["The number of tokens per chunk. Default: ",(0,r.jsx)(t.code,{children:"500"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"chunk_overlap"}),(0,r.jsx)(t.td,{children:"Chunk Overlap"}),(0,r.jsxs)(t.td,{children:["Number of tokens to overlap from previous chunk. Default: ",(0,r.jsx)(t.code,{children:"150"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"filter_images"}),(0,r.jsx)(t.td,{children:"Filter Images"}),(0,r.jsxs)(t.td,{children:["Filter images (see advanced options for filtering criteria). Default: ",(0,r.jsx)(t.code,{children:"False"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"min_image_size"}),(0,r.jsx)(t.td,{children:"Minimum Image Size Filter"}),(0,r.jsxs)(t.td,{children:["Minimum image width/length in pixels. Default: ",(0,r.jsx)(t.code,{children:"128"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"min_aspect_ratio"}),(0,r.jsx)(t.td,{children:"Minimum Aspect Ratio Filter"}),(0,r.jsxs)(t.td,{children:["Minimum allowed aspect ratio (width / height). Default: ",(0,r.jsx)(t.code,{children:"0.2"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"max_aspect_ratio"}),(0,r.jsx)(t.td,{children:"Maximum Aspect Ratio Filter"}),(0,r.jsxs)(t.td,{children:["Maximum allowed aspect ratio (width / height). Default: ",(0,r.jsx)(t.code,{children:"5.0"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"dedup_images"}),(0,r.jsx)(t.td,{children:"Deduplicate Images"}),(0,r.jsxs)(t.td,{children:["Filter duplicated images. Default: ",(0,r.jsx)(t.code,{children:"True"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"caption_images"}),(0,r.jsx)(t.td,{children:"Caption Images"}),(0,r.jsxs)(t.td,{children:["Generate captions for images using the NVIDIA captioning model. Default: ",(0,r.jsx)(t.code,{children:"True"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"high_resolution"}),(0,r.jsx)(t.td,{children:"High Resolution (PDF only)"}),(0,r.jsxs)(t.td,{children:["Process PDF in high-resolution mode for better quality extraction from scanned PDF. Default: ",(0,r.jsx)(t.code,{children:"False"}),"."]})]})]})]}),"\n",(0,r.jsx)(t.h3,{id:"outputs",children:"Outputs"}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"NVIDIA Retriever Extraction"})," component outputs a list of ",(0,r.jsx)(t.a,{href:"/concepts-objects#data-object",children:"Data"})," objects where each object contains:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"text"}),": The extracted content.","\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:"For text documents: The extracted text content."}),"\n",(0,r.jsx)(t.li,{children:"For tables and charts: The extracted table/chart content."}),"\n",(0,r.jsx)(t.li,{children:"For images: The image caption."}),"\n",(0,r.jsx)(t.li,{children:"For infographics: The extracted infographic content."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"file_path"}),": The source file name and path."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"document_type"}),": The type of the document, which can be ",(0,r.jsx)(t.code,{children:"text"}),", ",(0,r.jsx)(t.code,{children:"structured"}),", or ",(0,r.jsx)(t.code,{children:"image"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"description"}),": Additional description of the content."]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["The output varies based on the ",(0,r.jsx)(t.code,{children:"document_type"}),":"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Documents with ",(0,r.jsx)(t.code,{children:'document_type: "text"'})," contain:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:"Raw text content extracted from documents, for example, paragraphs from PDFs or DOCX files."}),"\n",(0,r.jsxs)(t.li,{children:["Content stored directly in the ",(0,r.jsx)(t.code,{children:"text"})," field."]}),"\n",(0,r.jsxs)(t.li,{children:["Content extracted using the ",(0,r.jsx)(t.code,{children:"extract_text"})," parameter."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Documents with ",(0,r.jsx)(t.code,{children:'document_type: "structured"'})," contain:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:"Text extracted from tables, charts, and infographics and processed to preserve structural information."}),"\n",(0,r.jsxs)(t.li,{children:["Content extracted using the ",(0,r.jsx)(t.code,{children:"extract_tables"}),", ",(0,r.jsx)(t.code,{children:"extract_charts"}),", and ",(0,r.jsx)(t.code,{children:"extract_infographics"})," parameters."]}),"\n",(0,r.jsxs)(t.li,{children:["Content stored in the ",(0,r.jsx)(t.code,{children:"text"})," field after being processed from the ",(0,r.jsx)(t.code,{children:"table_content"})," metadata."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Documents with ",(0,r.jsx)(t.code,{children:'document_type: "image"'})," contain:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:"Image content extracted from documents."}),"\n",(0,r.jsxs)(t.li,{children:["Caption text stored in the ",(0,r.jsx)(t.code,{children:"text"})," field when ",(0,r.jsx)(t.code,{children:"caption_images"})," is enabled."]}),"\n",(0,r.jsxs)(t.li,{children:["Content extracted using the ",(0,r.jsx)(t.code,{children:"extract_images"})," parameter."]}),"\n"]}),"\n"]}),"\n"]})]})}function j(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}function u(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},76102:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/nvidia-component-ingest-astra-c6f0107751252206ab0d500a25ba3f9c.png"}}]); \ No newline at end of file diff --git a/assets/js/f01590dc.7fbbd871.js b/assets/js/f01590dc.7fbbd871.js new file mode 100644 index 0000000000..19eb2d9c98 --- /dev/null +++ b/assets/js/f01590dc.7fbbd871.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[4223],{26928:(e,t,n)=>{n.r(t),n.d(t,{CH:()=>a,assets:()=>l,chCodeConfig:()=>h,contentTitle:()=>d,default:()=>j,frontMatter:()=>c,metadata:()=>i,toc:()=>x});const i=JSON.parse('{"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.","source":"@site/docs/Integrations/Nvidia/integrations-nvidia-ingest.mdx","sourceDirName":"Integrations/Nvidia","slug":"/integrations-nvidia-ingest","permalink":"/integrations-nvidia-ingest","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Integrate NVIDIA Retriever Extraction with Langflow","slug":"/integrations-nvidia-ingest"},"sidebar":"docs","previous":{"title":"Notion Meeting Notes Agent","permalink":"/integrations/notion/notion-agent-meeting-notes"},"next":{"title":"NVIDIA NIM on WSL2","permalink":"/integrations-nvidia-ingest-wsl2"}}');var r=n(74848),s=n(28453),o=n(24754);const c={title:"Integrate NVIDIA Retriever Extraction with Langflow",slug:"/integrations-nvidia-ingest"},d=void 0,l={},a={annotations:o.hk,Code:o.Cy},h={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},x=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Use the NVIDIA Retriever Extraction component in a flow",id:"use-the-nvidia-retriever-extraction-component-in-a-flow",level:2},{value:"NVIDIA Retriever Extraction component parameters",id:"parameters",level:2},{value:"Inputs",id:"inputs",level:3},{value:"Outputs",id:"outputs",level:3}];function p(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return a||u("CH",!1),a.Code||u("CH.Code",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n",(0,r.jsx)(t.admonition,{type:"note",children:(0,r.jsx)(t.p,{children:"NVIDIA Retriever Extraction is also known as NV-Ingest and NeMo Retriever Extraction."})}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"NVIDIA Retriever Extraction"})," component integrates with the ",(0,r.jsx)(t.a,{href:"https://github.com/NVIDIA/nv-ingest",children:"NVIDIA nv-ingest"})," microservice for data ingestion, processing, and extraction of text files."]}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.code,{children:"nv-ingest"})," service supports multiple extraction methods for PDF, DOCX, and PPTX file types, and includes pre- and post-processing services like splitting, chunking, and embedding generation. The extractor service's High Resolution mode uses the ",(0,r.jsx)(t.code,{children:"nemoretriever-parse"})," extraction method for better quality extraction from scanned PDF documents. This feature is only available for PDF files."]}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"NVIDIA Retriever Extraction"})," component imports the NVIDIA ",(0,r.jsx)(t.code,{children:"Ingestor"})," client, ingests files with requests to the NVIDIA ingest endpoint, and outputs the processed content as a list of ",(0,r.jsx)(t.a,{href:"/data-types#data",children:"Data"})," objects. ",(0,r.jsx)(t.code,{children:"Ingestor"})," accepts additional configuration options for data extraction from other text formats. To configure these options, see the ",(0,r.jsx)(t.a,{href:"/integrations-nvidia-ingest#parameters",children:"component parameters"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["An NVIDIA Ingest endpoint. For more information on setting up an NVIDIA Ingest endpoint, see the ",(0,r.jsx)(t.a,{href:"https://github.com/NVIDIA/nv-ingest?tab=readme-ov-file#quickstart",children:"NVIDIA Ingest quickstart"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"NVIDIA Retriever Extraction"})," component requires the installation of additional dependencies to your Langflow environment. To install the dependencies in a virtual environment, run the following commands."]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:"If you have the Langflow repository cloned and installed from source:"}),"\n"]}),"\n",(0,r.jsx)(a.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"source **",props:{style:{color:"#79C0FF"}}},{content:"YOUR_LANGFLOW_VENV",props:{style:{color:"#A5D6FF"}}},{content:"**",props:{style:{color:"#79C0FF"}}},{content:"/bin/activate",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"uv ",props:{style:{color:"#FFA657"}}},{content:"sync ",props:{style:{color:"#A5D6FF"}}},{content:"--extra ",props:{style:{color:"#79C0FF"}}},{content:"nv-ingest",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"uv ",props:{style:{color:"#FFA657"}}},{content:"run langflow run",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:"If you are installing Langflow from the Python Package Index:"}),"\n"]}),"\n",(0,r.jsx)(a.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"source **",props:{style:{color:"#79C0FF"}}},{content:"YOUR_LANGFLOW_VENV",props:{style:{color:"#A5D6FF"}}},{content:"**",props:{style:{color:"#79C0FF"}}},{content:"/bin/activate",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"uv ",props:{style:{color:"#FFA657"}}},{content:"pip install ",props:{style:{color:"#A5D6FF"}}},{content:"--prerelease=allow ",props:{style:{color:"#79C0FF"}}},{content:"'langflow[nv-ingest]'",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"uv ",props:{style:{color:"#FFA657"}}},{content:"run langflow run",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"use-the-nvidia-retriever-extraction-component-in-a-flow",children:"Use the NVIDIA Retriever Extraction component in a flow"}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"NVIDIA Retriever Extraction"})," component accepts ",(0,r.jsx)(t.strong,{children:"Message"})," inputs and outputs ",(0,r.jsx)(t.strong,{children:"Data"}),". The component calls an NVIDIA Ingest microservice's endpoint to ingest a local file and extract the text."]}),"\n",(0,r.jsx)(t.p,{children:"To use the NVIDIA Retriever Extraction component in your flow, follow these steps:"}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["In the component library, click the ",(0,r.jsx)(t.strong,{children:"NVIDIA Retriever Extraction"})," component, and then drag it onto the canvas."]}),"\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Base URL"})," field, enter the URL of the NVIDIA Ingest endpoint.\nOptionally, add the endpoint URL as a ",(0,r.jsx)(t.strong,{children:"Global variable"}),":","\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["Click ",(0,r.jsx)(t.strong,{children:"Settings"}),", and then click ",(0,r.jsx)(t.strong,{children:"Global Variables"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Click ",(0,r.jsx)(t.strong,{children:"Add New"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Name your variable. Paste your endpoint in the ",(0,r.jsx)(t.strong,{children:"Value"})," field."]}),"\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Apply To Fields"})," field, select the field you want to globally apply this variable to. In this case, select ",(0,r.jsx)(t.strong,{children:"NVIDIA Base URL"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Click ",(0,r.jsx)(t.strong,{children:"Save Variable"}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["Click the ",(0,r.jsx)(t.strong,{children:"Select files"})," button to select which file you want to ingest."]}),"\n",(0,r.jsx)(t.li,{children:"Select which text type to extract from the file.\nThe component supports text, charts, tables, images, and infographics.\nOptionally, for PDF files, enable High Resolution mode for better quality extraction from scanned documents."}),"\n",(0,r.jsxs)(t.li,{children:["Select whether to split the text into chunks.\nModify the splitting parameters in the component's ",(0,r.jsx)(t.strong,{children:"Configuration"})," tab."]}),"\n",(0,r.jsxs)(t.li,{children:["Click ",(0,r.jsx)(t.strong,{children:"Run"})," to ingest the file."]}),"\n",(0,r.jsxs)(t.li,{children:["To confirm the component is ingesting the file, open the ",(0,r.jsx)(t.strong,{children:"Logs"})," pane to view the output of the flow."]}),"\n",(0,r.jsxs)(t.li,{children:["To store the processed data in a vector database, add an ",(0,r.jsx)(t.strong,{children:"AstraDB Vector"})," component to your flow, and connect the ",(0,r.jsx)(t.strong,{children:"NVIDIA Retriever Extraction"})," component to the ",(0,r.jsx)(t.strong,{children:"AstraDB Vector"})," component with a ",(0,r.jsx)(t.strong,{children:"Data"})," output."]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"NVIDIA Retriever Extraction component flow",src:n(76102).A+"",width:"1722",height:"1548"})}),"\n",(0,r.jsxs)(t.ol,{start:"9",children:["\n",(0,r.jsx)(t.li,{children:"Run the flow.\nInspect your Astra DB vector database to view the processed data."}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"parameters",children:"NVIDIA Retriever Extraction component parameters"}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"NVIDIA Retriever Extraction"})," component has the following parameters."]}),"\n",(0,r.jsxs)(t.p,{children:["For more information, see the ",(0,r.jsx)(t.a,{href:"https://nvidia.github.io/nv-ingest/user-guide/",children:"NV-Ingest documentation"}),"."]}),"\n",(0,r.jsx)(t.h3,{id:"inputs",children:"Inputs"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Display Name"}),(0,r.jsx)(t.th,{children:"Info"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"base_url"}),(0,r.jsx)(t.td,{children:"NVIDIA Ingestion URL"}),(0,r.jsx)(t.td,{children:"The URL of the NVIDIA Ingestion API."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"path"}),(0,r.jsx)(t.td,{children:"Path"}),(0,r.jsx)(t.td,{children:"File path to process."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"extract_text"}),(0,r.jsx)(t.td,{children:"Extract Text"}),(0,r.jsxs)(t.td,{children:["Extract text from documents. Default: ",(0,r.jsx)(t.code,{children:"True"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"extract_charts"}),(0,r.jsx)(t.td,{children:"Extract Charts"}),(0,r.jsxs)(t.td,{children:["Extract text from charts. Default: ",(0,r.jsx)(t.code,{children:"False"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"extract_tables"}),(0,r.jsx)(t.td,{children:"Extract Tables"}),(0,r.jsxs)(t.td,{children:["Extract text from tables. Default: ",(0,r.jsx)(t.code,{children:"True"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"extract_images"}),(0,r.jsx)(t.td,{children:"Extract Images"}),(0,r.jsxs)(t.td,{children:["Extract images from document. Default: ",(0,r.jsx)(t.code,{children:"True"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"extract_infographics"}),(0,r.jsx)(t.td,{children:"Extract Infographics"}),(0,r.jsxs)(t.td,{children:["Extract infographics from document. Default: ",(0,r.jsx)(t.code,{children:"False"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"text_depth"}),(0,r.jsx)(t.td,{children:"Text Depth"}),(0,r.jsxs)(t.td,{children:["The level at which text is extracted. Options: 'document', 'page', 'block', 'line', 'span'. Default: ",(0,r.jsx)(t.code,{children:"page"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"split_text"}),(0,r.jsx)(t.td,{children:"Split Text"}),(0,r.jsxs)(t.td,{children:["Split text into smaller chunks. Default: ",(0,r.jsx)(t.code,{children:"True"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"chunk_size"}),(0,r.jsx)(t.td,{children:"Chunk Size"}),(0,r.jsxs)(t.td,{children:["The number of tokens per chunk. Default: ",(0,r.jsx)(t.code,{children:"500"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"chunk_overlap"}),(0,r.jsx)(t.td,{children:"Chunk Overlap"}),(0,r.jsxs)(t.td,{children:["Number of tokens to overlap from previous chunk. Default: ",(0,r.jsx)(t.code,{children:"150"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"filter_images"}),(0,r.jsx)(t.td,{children:"Filter Images"}),(0,r.jsxs)(t.td,{children:["Filter images (see advanced options for filtering criteria). Default: ",(0,r.jsx)(t.code,{children:"False"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"min_image_size"}),(0,r.jsx)(t.td,{children:"Minimum Image Size Filter"}),(0,r.jsxs)(t.td,{children:["Minimum image width/length in pixels. Default: ",(0,r.jsx)(t.code,{children:"128"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"min_aspect_ratio"}),(0,r.jsx)(t.td,{children:"Minimum Aspect Ratio Filter"}),(0,r.jsxs)(t.td,{children:["Minimum allowed aspect ratio (width / height). Default: ",(0,r.jsx)(t.code,{children:"0.2"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"max_aspect_ratio"}),(0,r.jsx)(t.td,{children:"Maximum Aspect Ratio Filter"}),(0,r.jsxs)(t.td,{children:["Maximum allowed aspect ratio (width / height). Default: ",(0,r.jsx)(t.code,{children:"5.0"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"dedup_images"}),(0,r.jsx)(t.td,{children:"Deduplicate Images"}),(0,r.jsxs)(t.td,{children:["Filter duplicated images. Default: ",(0,r.jsx)(t.code,{children:"True"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"caption_images"}),(0,r.jsx)(t.td,{children:"Caption Images"}),(0,r.jsxs)(t.td,{children:["Generate captions for images using the NVIDIA captioning model. Default: ",(0,r.jsx)(t.code,{children:"True"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"high_resolution"}),(0,r.jsx)(t.td,{children:"High Resolution (PDF only)"}),(0,r.jsxs)(t.td,{children:["Process PDF in high-resolution mode for better quality extraction from scanned PDF. Default: ",(0,r.jsx)(t.code,{children:"False"}),"."]})]})]})]}),"\n",(0,r.jsx)(t.h3,{id:"outputs",children:"Outputs"}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"NVIDIA Retriever Extraction"})," component outputs a list of ",(0,r.jsx)(t.a,{href:"/data-types#data",children:"Data"})," objects where each object contains:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"text"}),": The extracted content.","\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:"For text documents: The extracted text content."}),"\n",(0,r.jsx)(t.li,{children:"For tables and charts: The extracted table/chart content."}),"\n",(0,r.jsx)(t.li,{children:"For images: The image caption."}),"\n",(0,r.jsx)(t.li,{children:"For infographics: The extracted infographic content."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"file_path"}),": The source file name and path."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"document_type"}),": The type of the document, which can be ",(0,r.jsx)(t.code,{children:"text"}),", ",(0,r.jsx)(t.code,{children:"structured"}),", or ",(0,r.jsx)(t.code,{children:"image"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"description"}),": Additional description of the content."]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["The output varies based on the ",(0,r.jsx)(t.code,{children:"document_type"}),":"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Documents with ",(0,r.jsx)(t.code,{children:'document_type: "text"'})," contain:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:"Raw text content extracted from documents, for example, paragraphs from PDFs or DOCX files."}),"\n",(0,r.jsxs)(t.li,{children:["Content stored directly in the ",(0,r.jsx)(t.code,{children:"text"})," field."]}),"\n",(0,r.jsxs)(t.li,{children:["Content extracted using the ",(0,r.jsx)(t.code,{children:"extract_text"})," parameter."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Documents with ",(0,r.jsx)(t.code,{children:'document_type: "structured"'})," contain:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:"Text extracted from tables, charts, and infographics and processed to preserve structural information."}),"\n",(0,r.jsxs)(t.li,{children:["Content extracted using the ",(0,r.jsx)(t.code,{children:"extract_tables"}),", ",(0,r.jsx)(t.code,{children:"extract_charts"}),", and ",(0,r.jsx)(t.code,{children:"extract_infographics"})," parameters."]}),"\n",(0,r.jsxs)(t.li,{children:["Content stored in the ",(0,r.jsx)(t.code,{children:"text"})," field after being processed from the ",(0,r.jsx)(t.code,{children:"table_content"})," metadata."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Documents with ",(0,r.jsx)(t.code,{children:'document_type: "image"'})," contain:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:"Image content extracted from documents."}),"\n",(0,r.jsxs)(t.li,{children:["Caption text stored in the ",(0,r.jsx)(t.code,{children:"text"})," field when ",(0,r.jsx)(t.code,{children:"caption_images"})," is enabled."]}),"\n",(0,r.jsxs)(t.li,{children:["Content extracted using the ",(0,r.jsx)(t.code,{children:"extract_images"})," parameter."]}),"\n"]}),"\n"]}),"\n"]})]})}function j(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}function u(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},76102:(e,t,n)=>{n.d(t,{A:()=>i});const i=n.p+"assets/images/nvidia-component-ingest-astra-c6f0107751252206ab0d500a25ba3f9c.png"}}]); \ No newline at end of file diff --git a/assets/js/f735f5f3.6791a1bf.js b/assets/js/f735f5f3.6791a1bf.js new file mode 100644 index 0000000000..c3e958d46f --- /dev/null +++ b/assets/js/f735f5f3.6791a1bf.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[4876],{17886:(e,n,l)=>{l.d(n,{A:()=>o});l(96540);var i=l(64058),s=l(74848);function o({name:e,...n}){const l=i[e];return l?(0,s.jsx)(l,{...n}):null}},28453:(e,n,l)=>{l.d(n,{R:()=>t,x:()=>d});var i=l(96540);const s={},o=i.createContext(s);function t(e){const n=i.useContext(o);return i.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function d(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:t(e.components),i.createElement(o.Provider,{value:n},e.children)}},41884:(e,n,l)=>{l.r(n),l.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>f,frontMatter:()=>d,metadata:()=>i,toc:()=>r});const i=JSON.parse('{"id":"Concepts/concepts-file-management","title":"Manage files","description":"Upload, store, and manage files in Langflow\'s File management system.","source":"@site/docs/Concepts/concepts-file-management.mdx","sourceDirName":"Concepts","slug":"/concepts-file-management","permalink":"/concepts-file-management","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Manage files","slug":"/concepts-file-management"},"sidebar":"docs","previous":{"title":"Langflow data types","permalink":"/data-types"},"next":{"title":"Components overview","permalink":"/concepts-components"}}');var s=l(74848),o=l(28453),t=l(17886);const d={title:"Manage files",slug:"/concepts-file-management"},c=void 0,a={},r=[{value:"Upload a file",id:"upload-a-file",level:2},{value:"Use uploaded files in a flow",id:"use-uploaded-files-in-a-flow",level:2},{value:"Send files to a flow with the Langflow API",id:"send-files-to-a-flow-with-the-langflow-api",level:2},{value:"Supported file types",id:"supported-file-types",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:["Upload, store, and manage files in Langflow's ",(0,s.jsx)(n.strong,{children:"File management"})," system."]}),"\n",(0,s.jsxs)(n.p,{children:["Uploading files to the ",(0,s.jsx)(n.strong,{children:"File management"})," system keeps your files in a central location, and allows you to re-use files across flows without repeated manual uploads."]}),"\n",(0,s.jsx)(n.h2,{id:"upload-a-file",children:"Upload a file"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"File management"})," system is available at the ",(0,s.jsx)(n.code,{children:"/files"})," URL. For example, if you're running Langflow at the default ",(0,s.jsx)(n.code,{children:"http://localhost:7860"})," address, the ",(0,s.jsx)(n.strong,{children:"File management"})," system is located at ",(0,s.jsx)(n.code,{children:"http://localhost:7860/files"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"To upload a file from your local machine:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["From the ",(0,s.jsx)(n.strong,{children:"My Files"})," window at ",(0,s.jsx)(n.code,{children:"http://localhost:7860/files"}),", click ",(0,s.jsx)(n.strong,{children:"Upload"}),"."]}),"\n",(0,s.jsx)(n.li,{children:"Select the file to upload.\nThe file is uploaded to Langflow."}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"You can upload multiple files in a single action.\nFiles are available to flows stored in different projects."}),"\n",(0,s.jsxs)(n.p,{children:["Files stored in ",(0,s.jsx)(n.strong,{children:"My Files"})," can be renamed, downloaded, duplicated, or deleted."]}),"\n",(0,s.jsxs)(n.p,{children:["To delete a file from your project, hover over a file's icon to click and select it, and then click ",(0,s.jsx)(t.A,{name:"Trash2","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Delete"}),".\nYou can delete multiple files in a single action."]}),"\n",(0,s.jsxs)(n.p,{children:["To download a file from your project, hover over a file's icon to click and select it, and then click ",(0,s.jsx)(t.A,{name:"Download","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Download"}),".\nYou can download multiple files in a single action, but they will be saved together in a .ZIP file."]}),"\n",(0,s.jsx)(n.h2,{id:"use-uploaded-files-in-a-flow",children:"Use uploaded files in a flow"}),"\n",(0,s.jsx)(n.p,{children:"To use your uploaded files in flows:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Include the ",(0,s.jsx)(n.a,{href:"/components-data#file",children:"File"})," component in a flow."]}),"\n",(0,s.jsxs)(n.li,{children:["To select a document to load, in the\xa0",(0,s.jsx)(n.strong,{children:"File"}),"\xa0component, click the\xa0",(0,s.jsx)(n.strong,{children:"Select files"}),"\xa0button."]}),"\n",(0,s.jsxs)(n.li,{children:["Select a file to upload, and then click\xa0",(0,s.jsx)(n.strong,{children:"Select file"}),". The loaded file name appears in the component."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["For an example of using the ",(0,s.jsx)(n.strong,{children:"File"})," component in a flow, see the ",(0,s.jsx)(n.a,{href:"/document-qa",children:"Document QA tutorial project"}),"."]}),"\n",(0,s.jsx)(n.admonition,{type:"note",children:(0,s.jsxs)(n.p,{children:["If you prefer a one-time upload, the ",(0,s.jsx)(n.a,{href:"/components-data#file",children:"File"})," component still allows one-time uploads directly from your local machine."]})}),"\n",(0,s.jsx)(n.h2,{id:"send-files-to-a-flow-with-the-langflow-api",children:"Send files to a flow with the Langflow API"}),"\n",(0,s.jsxs)(n.p,{children:["For information on file management with the Langflow API, see ",(0,s.jsx)(n.a,{href:"/api-files",children:"Files endpoints"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"supported-file-types",children:"Supported file types"}),"\n",(0,s.jsx)(n.p,{children:"The maximum supported file size is 100 MB."}),"\n",(0,s.jsx)(n.p,{children:"Text files:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:".txt"})," - Text files"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:".md"}),", ",(0,s.jsx)(n.code,{children:".mdx"})," - Markdown files"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:".csv"})," - CSV files"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:".json"})," - JSON files"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:".yaml"}),", ",(0,s.jsx)(n.code,{children:".yml"})," - YAML files"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:".xml"})," - XML files"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:".html"}),", ",(0,s.jsx)(n.code,{children:".htm"})," - HTML files"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:".pdf"})," - PDF files"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:".docx"})," - Word documents"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:".py"})," - Python files"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:".sh"})," - Shell scripts"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:".sql"})," - SQL files"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:".js"})," - JavaScript files"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:".ts"}),", ",(0,s.jsx)(n.code,{children:".tsx"})," - TypeScript files"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Archive formats (for bundling multiple files):"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:".zip"})," - ZIP archives"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:".tar"})," - TAR archives"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:".tgz"})," - Gzipped TAR archives"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:".bz2"})," - Bzip2 compressed files"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:".gz"})," - Gzip compressed files"]}),"\n"]})]})}function f(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}}}]); \ No newline at end of file diff --git a/assets/js/f735f5f3.f96e130e.js b/assets/js/f735f5f3.f96e130e.js deleted file mode 100644 index ef65d16c80..0000000000 --- a/assets/js/f735f5f3.f96e130e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[4876],{17886:(e,n,l)=>{l.d(n,{A:()=>o});l(96540);var s=l(64058),i=l(74848);function o({name:e,...n}){const l=s[e];return l?(0,i.jsx)(l,{...n}):null}},28453:(e,n,l)=>{l.d(n,{R:()=>t,x:()=>c});var s=l(96540);const i={},o=s.createContext(i);function t(e){const n=s.useContext(o);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function c(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:t(e.components),s.createElement(o.Provider,{value:n},e.children)}},41884:(e,n,l)=>{l.r(n),l.d(n,{assets:()=>r,contentTitle:()=>d,default:()=>f,frontMatter:()=>c,metadata:()=>s,toc:()=>a});const s=JSON.parse('{"id":"Concepts/concepts-file-management","title":"Manage files","description":"Upload, store, and manage files in Langflow\'s File management system.","source":"@site/docs/Concepts/concepts-file-management.mdx","sourceDirName":"Concepts","slug":"/concepts-file-management","permalink":"/concepts-file-management","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Manage files","slug":"/concepts-file-management"},"sidebar":"docs","previous":{"title":"Langflow objects","permalink":"/concepts-objects"},"next":{"title":"Components overview","permalink":"/concepts-components"}}');var i=l(74848),o=l(28453),t=l(17886);const c={title:"Manage files",slug:"/concepts-file-management"},d=void 0,r={},a=[{value:"Upload a file",id:"upload-a-file",level:2},{value:"Use uploaded files in a flow",id:"use-uploaded-files-in-a-flow",level:2},{value:"Send files to a flow with the Langflow API",id:"send-files-to-a-flow-with-the-langflow-api",level:2},{value:"Supported file types",id:"supported-file-types",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.p,{children:["Upload, store, and manage files in Langflow's ",(0,i.jsx)(n.strong,{children:"File management"})," system."]}),"\n",(0,i.jsxs)(n.p,{children:["Uploading files to the ",(0,i.jsx)(n.strong,{children:"File management"})," system keeps your files in a central location, and allows you to re-use files across flows without repeated manual uploads."]}),"\n",(0,i.jsx)(n.h2,{id:"upload-a-file",children:"Upload a file"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.strong,{children:"File management"})," system is available at the ",(0,i.jsx)(n.code,{children:"/files"})," URL. For example, if you're running Langflow at the default ",(0,i.jsx)(n.code,{children:"http://localhost:7860"})," address, the ",(0,i.jsx)(n.strong,{children:"File management"})," system is located at ",(0,i.jsx)(n.code,{children:"http://localhost:7860/files"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"To upload a file from your local machine:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["From the ",(0,i.jsx)(n.strong,{children:"My Files"})," window at ",(0,i.jsx)(n.code,{children:"http://localhost:7860/files"}),", click ",(0,i.jsx)(n.strong,{children:"Upload"}),"."]}),"\n",(0,i.jsx)(n.li,{children:"Select the file to upload.\nThe file is uploaded to Langflow."}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"You can upload multiple files in a single action.\nFiles are available to flows stored in different projects."}),"\n",(0,i.jsxs)(n.p,{children:["Files stored in ",(0,i.jsx)(n.strong,{children:"My Files"})," can be renamed, downloaded, duplicated, or deleted."]}),"\n",(0,i.jsxs)(n.p,{children:["To delete a file from your project, hover over a file's icon to click and select it, and then click ",(0,i.jsx)(t.A,{name:"Trash2","aria-hidden":"true"})," ",(0,i.jsx)(n.strong,{children:"Delete"}),".\nYou can delete multiple files in a single action."]}),"\n",(0,i.jsxs)(n.p,{children:["To download a file from your project, hover over a file's icon to click and select it, and then click ",(0,i.jsx)(t.A,{name:"Download","aria-hidden":"true"})," ",(0,i.jsx)(n.strong,{children:"Download"}),".\nYou can download multiple files in a single action, but they will be saved together in a .ZIP file."]}),"\n",(0,i.jsx)(n.h2,{id:"use-uploaded-files-in-a-flow",children:"Use uploaded files in a flow"}),"\n",(0,i.jsx)(n.p,{children:"To use your uploaded files in flows:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["Include the ",(0,i.jsx)(n.a,{href:"/components-data#file",children:"File"})," component in a flow."]}),"\n",(0,i.jsxs)(n.li,{children:["To select a document to load, in the\xa0",(0,i.jsx)(n.strong,{children:"File"}),"\xa0component, click the\xa0",(0,i.jsx)(n.strong,{children:"Select files"}),"\xa0button."]}),"\n",(0,i.jsxs)(n.li,{children:["Select a file to upload, and then click\xa0",(0,i.jsx)(n.strong,{children:"Select file"}),". The loaded file name appears in the component."]}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["For an example of using the ",(0,i.jsx)(n.strong,{children:"File"})," component in a flow, see the ",(0,i.jsx)(n.a,{href:"/document-qa",children:"Document QA tutorial project"}),"."]}),"\n",(0,i.jsx)(n.admonition,{type:"note",children:(0,i.jsxs)(n.p,{children:["If you prefer a one-time upload, the ",(0,i.jsx)(n.a,{href:"/components-data#file",children:"File"})," component still allows one-time uploads directly from your local machine."]})}),"\n",(0,i.jsx)(n.h2,{id:"send-files-to-a-flow-with-the-langflow-api",children:"Send files to a flow with the Langflow API"}),"\n",(0,i.jsxs)(n.p,{children:["For information on file management with the Langflow API, see ",(0,i.jsx)(n.a,{href:"/api-files",children:"Files endpoints"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"supported-file-types",children:"Supported file types"}),"\n",(0,i.jsx)(n.p,{children:"The maximum supported file size is 100 MB."}),"\n",(0,i.jsx)(n.p,{children:"Text files:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:".txt"})," - Text files"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:".md"}),", ",(0,i.jsx)(n.code,{children:".mdx"})," - Markdown files"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:".csv"})," - CSV files"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:".json"})," - JSON files"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:".yaml"}),", ",(0,i.jsx)(n.code,{children:".yml"})," - YAML files"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:".xml"})," - XML files"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:".html"}),", ",(0,i.jsx)(n.code,{children:".htm"})," - HTML files"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:".pdf"})," - PDF files"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:".docx"})," - Word documents"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:".py"})," - Python files"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:".sh"})," - Shell scripts"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:".sql"})," - SQL files"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:".js"})," - JavaScript files"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:".ts"}),", ",(0,i.jsx)(n.code,{children:".tsx"})," - TypeScript files"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"Archive formats (for bundling multiple files):"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:".zip"})," - ZIP archives"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:".tar"})," - TAR archives"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:".tgz"})," - Gzipped TAR archives"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:".bz2"})," - Bzip2 compressed files"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:".gz"})," - Gzip compressed files"]}),"\n"]})]})}function f(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}}}]); \ No newline at end of file diff --git a/assets/js/main.0e1b5a24.js b/assets/js/main.0e1b5a24.js deleted file mode 100644 index c6de315c51..0000000000 --- a/assets/js/main.0e1b5a24.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! 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