From c90e8bc6b8843f72b450523fa095d8f7fb7bea05 Mon Sep 17 00:00:00 2001 From: "github-merge-queue[bot]" Date: Fri, 5 Sep 2025 14:41:47 +0000 Subject: [PATCH] deploy: b1d5a8011f4a90396c51eb4652ed94fbbfe2621b --- 404.html | 4 +- about-langflow.html | 4 +- agent-tutorial.html | 4 +- agents-tools.html | 4 +- agents.html | 23 +-- api-build.html | 5 +- api-files.html | 5 +- api-flows-run.html | 5 +- api-flows.html | 5 +- api-keys-and-authentication.html | 6 +- api-logs.html | 5 +- api-monitor.html | 5 +- api-projects.html | 5 +- api-reference-api-examples.html | 4 +- api-users.html | 5 +- 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.4cf7ec16.js | 1 - assets/js/0132780e.7a7d2c66.js | 1 + ...388ca.aa9d9dc2.js => 07e388ca.d1e23d1c.js} | 2 +- assets/js/0f761898.b32793df.js | 1 - assets/js/0f761898.e2579c56.js | 1 + assets/js/16faf8bf.0e58f6cd.js | 1 - assets/js/16faf8bf.6bd06b19.js | 1 + assets/js/1a8a0a64.1614d6c0.js | 1 + assets/js/1a8a0a64.6de21041.js | 1 - assets/js/1ab69cbd.14b3e131.js | 1 - assets/js/1ab69cbd.2adece5b.js | 1 + assets/js/20177945.2985f669.js | 1 + assets/js/20177945.c5c5bc37.js | 1 - ...d74f7.d1c29daf.js => 22dd74f7.4d4ce93b.js} | 2 +- assets/js/230d5fdc.59155fa1.js | 1 - assets/js/230d5fdc.bdc0515f.js | 1 + ...e6167.166f30e1.js => 238e6167.ca32a726.js} | 2 +- ...0d4f5.c73c2a8c.js => 2ab0d4f5.269437ea.js} | 2 +- assets/js/2ea623f2.13e0e74f.js | 1 + assets/js/2ea623f2.d381c765.js | 1 - assets/js/2fc7e024.4a9c7470.js | 1 - assets/js/2fc7e024.dc12de8f.js | 1 + assets/js/393c45a3.984d3040.js | 1 + assets/js/393c45a3.a88f2240.js | 1 - assets/js/3b25a2ae.8d5d1da2.js | 1 - assets/js/3b25a2ae.b4e56f6c.js | 1 + assets/js/41d45d82.5a4c1534.js | 1 - assets/js/41d45d82.61261f80.js | 1 + assets/js/42962acd.021175a9.js | 1 + assets/js/42962acd.a7523d67.js | 1 - assets/js/444a6da6.45ad0c8d.js | 1 + assets/js/444a6da6.fe9ec445.js | 1 - assets/js/44691977.0577edc0.js | 1 - assets/js/44691977.86f58a3f.js | 1 + assets/js/453ae64a.37a1ad59.js | 1 + assets/js/453ae64a.5b9bae34.js | 1 - assets/js/46abd5bb.27675ca8.js | 1 - assets/js/46abd5bb.d3b58293.js | 1 + ...346a5.cf5052ec.js => 46d346a5.7813004f.js} | 2 +- assets/js/4e56251d.625c5c7c.js | 1 - assets/js/4e56251d.a2691196.js | 1 + ...5646b.61eb2fc0.js => 5015646b.6772f6d8.js} | 2 +- assets/js/56c23a02.7edd1f17.js | 1 + assets/js/56c23a02.bfa09799.js | 1 - assets/js/593d9d00.a94b7977.js | 1 - assets/js/593d9d00.bfb7b6ef.js | 1 + assets/js/5f1a63c6.0f204179.js | 1 + assets/js/5f1a63c6.55e64b78.js | 1 - assets/js/619c7267.5b0ca992.js | 1 + assets/js/619c7267.e75cc5aa.js | 1 - assets/js/622bdc6f.2afcdb64.js | 1 + assets/js/622bdc6f.e786f853.js | 1 - assets/js/622fd833.1361199d.js | 1 + assets/js/622fd833.9772c05d.js | 1 - assets/js/62d1268c.255d7637.js | 1 - assets/js/62d1268c.9067f8f7.js | 1 + assets/js/681e5335.097e3679.js | 1 - assets/js/681e5335.6cbf7b90.js | 1 + assets/js/709203b3.7c36c923.js | 1 - assets/js/709203b3.87a87a83.js | 1 + assets/js/7819cc1c.057c63d7.js | 1 + assets/js/7819cc1c.4fbc21ff.js | 1 - ...8e433.eab03115.js => 7a88e433.72fe3438.js} | 2 +- assets/js/7de42fc9.4a780e8f.js | 1 + assets/js/7de42fc9.f40201c4.js | 1 - assets/js/7e40e6b3.1f2c6944.js | 1 - assets/js/7e40e6b3.c1f98c4b.js | 1 + assets/js/7f193c41.0846ef5d.js | 1 - assets/js/7f193c41.c7ac6369.js | 1 + assets/js/7f7a8893.7c73e87e.js | 1 - assets/js/7f7a8893.a8581ef5.js | 1 + assets/js/8a484c94.ac2a10e3.js | 1 - assets/js/8a484c94.f3f3c257.js | 1 + ...4a540.1111abcf.js => 8bd4a540.12907f81.js} | 2 +- ...e5443.11221aaa.js => 8bee5443.d30ebdcb.js} | 2 +- assets/js/97254d1d.2ac13b55.js | 1 - assets/js/97254d1d.6cd30cd4.js | 1 + assets/js/9895db20.ebb58851.js | 1 + assets/js/9895db20.f26fbe46.js | 1 - assets/js/9f55b2fc.61d4719f.js | 1 - assets/js/9f55b2fc.89b869ca.js | 1 + assets/js/a6d50436.88abe60b.js | 1 + assets/js/a6d50436.bc61f482.js | 1 - assets/js/a84e1c02.27434cb1.js | 1 + assets/js/a84e1c02.3534b6c7.js | 1 - assets/js/a99a45c9.97d1f5d1.js | 1 + assets/js/a99a45c9.a852dec5.js | 1 - ...6d5f0.fc5c42cb.js => ad06d5f0.8d6bbf3a.js} | 2 +- assets/js/ad42ff54.64d37952.js | 1 + assets/js/ad42ff54.efbc375f.js | 1 - assets/js/ae70dfbf.cb14c9cb.js | 1 - assets/js/ae70dfbf.f4f9387d.js | 1 + assets/js/b079b393.5a8d148c.js | 1 - assets/js/b079b393.77fcc6f2.js | 1 + assets/js/b796be74.207b4d64.js | 1 - assets/js/b796be74.43b74263.js | 1 + assets/js/b9f9404d.076495eb.js | 1 - assets/js/b9f9404d.ecbc4bd3.js | 1 + assets/js/baacc2a1.4632d92a.js | 1 + assets/js/baacc2a1.e7ddc6f8.js | 1 - ...8ec1d.5766cfc9.js => bbb8ec1d.3fda98cf.js} | 2 +- assets/js/c76bd485.261e627c.js | 1 - assets/js/c76bd485.816a0ed4.js | 1 + assets/js/c7f32161.e2c79c9c.js | 1 + assets/js/c7f32161.f2a5ff70.js | 1 - assets/js/ca5faf5d.6cc0e60c.js | 1 + assets/js/ca5faf5d.ee9648c5.js | 1 - assets/js/cb17b4e0.8800737e.js | 1 - assets/js/cb17b4e0.8fd20b57.js | 1 + assets/js/cce672fb.3c1f85b9.js | 1 + assets/js/cce672fb.57c7829d.js | 1 - assets/js/cd086441.48985967.js | 1 + assets/js/cd086441.960c2e83.js | 1 - assets/js/d1f3cfe5.9b2b9b3e.js | 1 - assets/js/d1f3cfe5.c86f00ba.js | 1 + ...8efb9.48987fcd.js => d8c8efb9.7594c043.js} | 2 +- assets/js/da1ad91e.362e3c9b.js | 1 + assets/js/da1ad91e.7ba5573d.js | 1 - assets/js/dfa3dc90.7127ec5b.js | 1 - assets/js/dfa3dc90.aed5ad3e.js | 1 + assets/js/e24b341f.656dec8d.js | 1 + assets/js/e24b341f.66f5442d.js | 1 - assets/js/e267ad05.1b71e9ca.js | 1 - assets/js/e267ad05.a0b07365.js | 1 + assets/js/e3230154.0ec9668a.js | 1 - assets/js/e3230154.126cbc92.js | 1 + assets/js/e55b8e98.0b8884b3.js | 1 + assets/js/e55b8e98.df33c9e2.js | 1 - assets/js/e627b1b2.51bf40a8.js | 1 + assets/js/e627b1b2.9fcb9075.js | 1 - ...6a4d2.84fae6c2.js => e6c6a4d2.cabc981f.js} | 2 +- ...d58ff.1237f227.js => e82d58ff.41285f40.js} | 2 +- assets/js/ec030ab7.5c14cd9a.js | 1 + assets/js/ec030ab7.788cb4bd.js | 1 - assets/js/f01590dc.7eb36a75.js | 1 - assets/js/f01590dc.cd2d7fa9.js | 1 + assets/js/f0b67137.2df6cb53.js | 1 - assets/js/f0b67137.bc9be628.js | 1 + assets/js/ff7f32ba.15da425f.js | 1 + assets/js/ff7f32ba.ac2c7408.js | 1 - assets/js/main.14a877c9.js | 2 - assets/js/main.e2332c07.js | 2 + ...CENSE.txt => main.e2332c07.js.LICENSE.txt} | 0 ...n.ae1f3a5b.js => runtime~main.e0adb39a.js} | 2 +- bundles-aiml.html | 8 +- bundles-amazon.html | 18 +-- bundles-anthropic.html | 10 +- bundles-arxiv.html | 4 +- bundles-azure.html | 14 +- bundles-baidu.html | 6 +- bundles-bing.html | 8 +- bundles-cloudflare.html | 8 +- bundles-cohere.html | 20 +-- bundles-datastax.html | 4 +- bundles-deepseek.html | 10 +- bundles-duckduckgo.html | 8 +- bundles-exa.html | 4 +- bundles-glean.html | 8 +- bundles-google.html | 14 +- bundles-groq.html | 6 +- bundles-huggingface.html | 12 +- bundles-ibm.html | 14 +- bundles-icosacomputing.html | 4 +- bundles-langchain.html | 15 +- bundles-lmstudio.html | 14 +- bundles-maritalk.html | 10 +- bundles-mem0.html | 8 +- bundles-mistralai.html | 14 +- bundles-novita.html | 8 +- bundles-nvidia.html | 8 +- bundles-ollama.html | 6 +- bundles-openai.html | 14 +- bundles-openrouter.html | 10 +- bundles-perplexity.html | 10 +- bundles-redis.html | 8 +- bundles-sambanova.html | 10 +- bundles-searchapi.html | 8 +- bundles-vertexai.html | 14 +- bundles-wikipedia.html | 8 +- bundles-xai.html | 10 +- chat-with-files.html | 4 +- chat-with-rag.html | 4 +- components-agents.html | 12 +- components-bundle-components.html | 9 +- components-custom-components.html | 8 +- components-data.html | 40 ++--- components-embedding-models.html | 17 +- components-helpers.html | 6 +- components-io.html | 12 +- components-logic.html | 12 +- components-memories.html | 4 +- components-models.html | 4 +- components-processing.html | 59 ++++--- components-prompts.html | 4 +- components-tools.html | 4 +- components-vector-stores.html | 8 +- concepts-components.html | 11 +- concepts-file-management.html | 4 +- concepts-flows-import.html | 4 +- concepts-flows.html | 27 ++-- concepts-overview.html | 4 +- concepts-playground.html | 4 +- concepts-publish.html | 8 +- concepts-voice-mode.html | 4 +- configuration-cli.html | 4 +- configuration-custom-database.html | 4 +- configuration-global-variables.html | 4 +- contributing-bundles.html | 58 ++++--- 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 | 8 +- deployment-architecture.html | 4 +- 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 | 6 +- deployment-prod-best-practices.html | 4 +- deployment-public-server.html | 4 +- deployment-railway.html | 4 +- deployment-render.html | 4 +- develop-application.html | 4 +- enterprise-database-guide.html | 4 +- environment-variables.html | 4 +- get-started-installation.html | 4 +- get-started-quickstart.html | 4 +- index.html | 4 +- install-custom-dependencies.html | 4 +- integrations-apify.html | 4 +- integrations-arize.html | 4 +- integrations-assemblyai.html | 10 +- integrations-cleanlab.html | 15 +- integrations-composio.html | 4 +- integrations-docling.html | 4 +- integrations-google-big-query.html | 4 +- integrations-langfuse.html | 4 +- integrations-langsmith.html | 4 +- integrations-langwatch.html | 9 +- integrations-nvidia-g-assist.html | 54 ++++--- integrations-nvidia-ingest-wsl2.html | 4 +- integrations-nvidia-ingest.html | 9 +- integrations-opik.html | 5 +- .../notion/notion-agent-conversational.html | 6 +- .../notion/notion-agent-meeting-notes.html | 8 +- integrations/notion/setup.html | 4 +- logging.html | 4 +- luna-for-langflow.html | 4 +- mcp-client.html | 10 +- mcp-component-astra.html | 4 +- mcp-server.html | 147 +++++++++++------- mcp-tutorial.html | 4 +- memory.html | 4 +- release-notes.html | 11 +- search.html | 4 +- session-id.html | 4 +- sitemap.xml | 2 +- troubleshoot.html | 4 +- typescript-client.html | 60 ++++--- webhook.html | 4 +- 404 files changed, 1015 insertions(+), 956 deletions(-) delete mode 100644 assets/js/0132780e.4cf7ec16.js create mode 100644 assets/js/0132780e.7a7d2c66.js rename assets/js/{07e388ca.aa9d9dc2.js => 07e388ca.d1e23d1c.js} (87%) delete mode 100644 assets/js/0f761898.b32793df.js create mode 100644 assets/js/0f761898.e2579c56.js delete mode 100644 assets/js/16faf8bf.0e58f6cd.js create mode 100644 assets/js/16faf8bf.6bd06b19.js create mode 100644 assets/js/1a8a0a64.1614d6c0.js delete mode 100644 assets/js/1a8a0a64.6de21041.js delete mode 100644 assets/js/1ab69cbd.14b3e131.js create mode 100644 assets/js/1ab69cbd.2adece5b.js create mode 100644 assets/js/20177945.2985f669.js delete mode 100644 assets/js/20177945.c5c5bc37.js rename assets/js/{22dd74f7.d1c29daf.js => 22dd74f7.4d4ce93b.js} (95%) delete mode 100644 assets/js/230d5fdc.59155fa1.js create mode 100644 assets/js/230d5fdc.bdc0515f.js rename assets/js/{238e6167.166f30e1.js => 238e6167.ca32a726.js} (90%) rename assets/js/{2ab0d4f5.c73c2a8c.js => 2ab0d4f5.269437ea.js} (50%) create mode 100644 assets/js/2ea623f2.13e0e74f.js delete mode 100644 assets/js/2ea623f2.d381c765.js delete mode 100644 assets/js/2fc7e024.4a9c7470.js create mode 100644 assets/js/2fc7e024.dc12de8f.js create mode 100644 assets/js/393c45a3.984d3040.js delete mode 100644 assets/js/393c45a3.a88f2240.js delete mode 100644 assets/js/3b25a2ae.8d5d1da2.js create mode 100644 assets/js/3b25a2ae.b4e56f6c.js delete mode 100644 assets/js/41d45d82.5a4c1534.js create mode 100644 assets/js/41d45d82.61261f80.js create mode 100644 assets/js/42962acd.021175a9.js delete mode 100644 assets/js/42962acd.a7523d67.js create mode 100644 assets/js/444a6da6.45ad0c8d.js delete mode 100644 assets/js/444a6da6.fe9ec445.js delete mode 100644 assets/js/44691977.0577edc0.js create mode 100644 assets/js/44691977.86f58a3f.js create mode 100644 assets/js/453ae64a.37a1ad59.js delete mode 100644 assets/js/453ae64a.5b9bae34.js delete mode 100644 assets/js/46abd5bb.27675ca8.js create mode 100644 assets/js/46abd5bb.d3b58293.js rename assets/js/{46d346a5.cf5052ec.js => 46d346a5.7813004f.js} (99%) delete mode 100644 assets/js/4e56251d.625c5c7c.js create mode 100644 assets/js/4e56251d.a2691196.js rename assets/js/{5015646b.61eb2fc0.js => 5015646b.6772f6d8.js} (52%) create mode 100644 assets/js/56c23a02.7edd1f17.js delete mode 100644 assets/js/56c23a02.bfa09799.js delete mode 100644 assets/js/593d9d00.a94b7977.js create mode 100644 assets/js/593d9d00.bfb7b6ef.js create mode 100644 assets/js/5f1a63c6.0f204179.js delete mode 100644 assets/js/5f1a63c6.55e64b78.js create mode 100644 assets/js/619c7267.5b0ca992.js delete mode 100644 assets/js/619c7267.e75cc5aa.js create mode 100644 assets/js/622bdc6f.2afcdb64.js delete mode 100644 assets/js/622bdc6f.e786f853.js create mode 100644 assets/js/622fd833.1361199d.js delete mode 100644 assets/js/622fd833.9772c05d.js delete mode 100644 assets/js/62d1268c.255d7637.js create mode 100644 assets/js/62d1268c.9067f8f7.js delete mode 100644 assets/js/681e5335.097e3679.js create mode 100644 assets/js/681e5335.6cbf7b90.js delete mode 100644 assets/js/709203b3.7c36c923.js create mode 100644 assets/js/709203b3.87a87a83.js create mode 100644 assets/js/7819cc1c.057c63d7.js delete mode 100644 assets/js/7819cc1c.4fbc21ff.js rename assets/js/{7a88e433.eab03115.js => 7a88e433.72fe3438.js} (85%) create mode 100644 assets/js/7de42fc9.4a780e8f.js delete mode 100644 assets/js/7de42fc9.f40201c4.js delete mode 100644 assets/js/7e40e6b3.1f2c6944.js create mode 100644 assets/js/7e40e6b3.c1f98c4b.js delete mode 100644 assets/js/7f193c41.0846ef5d.js create mode 100644 assets/js/7f193c41.c7ac6369.js delete mode 100644 assets/js/7f7a8893.7c73e87e.js create mode 100644 assets/js/7f7a8893.a8581ef5.js delete mode 100644 assets/js/8a484c94.ac2a10e3.js create mode 100644 assets/js/8a484c94.f3f3c257.js rename assets/js/{8bd4a540.1111abcf.js => 8bd4a540.12907f81.js} (99%) rename assets/js/{8bee5443.11221aaa.js => 8bee5443.d30ebdcb.js} (57%) delete mode 100644 assets/js/97254d1d.2ac13b55.js create mode 100644 assets/js/97254d1d.6cd30cd4.js create mode 100644 assets/js/9895db20.ebb58851.js delete mode 100644 assets/js/9895db20.f26fbe46.js delete mode 100644 assets/js/9f55b2fc.61d4719f.js create mode 100644 assets/js/9f55b2fc.89b869ca.js create mode 100644 assets/js/a6d50436.88abe60b.js delete mode 100644 assets/js/a6d50436.bc61f482.js create mode 100644 assets/js/a84e1c02.27434cb1.js delete mode 100644 assets/js/a84e1c02.3534b6c7.js create mode 100644 assets/js/a99a45c9.97d1f5d1.js delete mode 100644 assets/js/a99a45c9.a852dec5.js rename assets/js/{ad06d5f0.fc5c42cb.js => ad06d5f0.8d6bbf3a.js} (88%) create mode 100644 assets/js/ad42ff54.64d37952.js delete mode 100644 assets/js/ad42ff54.efbc375f.js delete mode 100644 assets/js/ae70dfbf.cb14c9cb.js create mode 100644 assets/js/ae70dfbf.f4f9387d.js delete mode 100644 assets/js/b079b393.5a8d148c.js create mode 100644 assets/js/b079b393.77fcc6f2.js delete mode 100644 assets/js/b796be74.207b4d64.js create mode 100644 assets/js/b796be74.43b74263.js delete mode 100644 assets/js/b9f9404d.076495eb.js create mode 100644 assets/js/b9f9404d.ecbc4bd3.js create mode 100644 assets/js/baacc2a1.4632d92a.js delete mode 100644 assets/js/baacc2a1.e7ddc6f8.js rename assets/js/{bbb8ec1d.5766cfc9.js => bbb8ec1d.3fda98cf.js} (62%) delete mode 100644 assets/js/c76bd485.261e627c.js create mode 100644 assets/js/c76bd485.816a0ed4.js create mode 100644 assets/js/c7f32161.e2c79c9c.js delete mode 100644 assets/js/c7f32161.f2a5ff70.js create mode 100644 assets/js/ca5faf5d.6cc0e60c.js delete mode 100644 assets/js/ca5faf5d.ee9648c5.js delete mode 100644 assets/js/cb17b4e0.8800737e.js create mode 100644 assets/js/cb17b4e0.8fd20b57.js create mode 100644 assets/js/cce672fb.3c1f85b9.js delete mode 100644 assets/js/cce672fb.57c7829d.js create mode 100644 assets/js/cd086441.48985967.js delete mode 100644 assets/js/cd086441.960c2e83.js delete mode 100644 assets/js/d1f3cfe5.9b2b9b3e.js create mode 100644 assets/js/d1f3cfe5.c86f00ba.js rename assets/js/{d8c8efb9.48987fcd.js => d8c8efb9.7594c043.js} (53%) create mode 100644 assets/js/da1ad91e.362e3c9b.js delete mode 100644 assets/js/da1ad91e.7ba5573d.js delete mode 100644 assets/js/dfa3dc90.7127ec5b.js create mode 100644 assets/js/dfa3dc90.aed5ad3e.js create mode 100644 assets/js/e24b341f.656dec8d.js delete mode 100644 assets/js/e24b341f.66f5442d.js delete mode 100644 assets/js/e267ad05.1b71e9ca.js create mode 100644 assets/js/e267ad05.a0b07365.js delete mode 100644 assets/js/e3230154.0ec9668a.js create mode 100644 assets/js/e3230154.126cbc92.js create mode 100644 assets/js/e55b8e98.0b8884b3.js delete mode 100644 assets/js/e55b8e98.df33c9e2.js create mode 100644 assets/js/e627b1b2.51bf40a8.js delete mode 100644 assets/js/e627b1b2.9fcb9075.js rename assets/js/{e6c6a4d2.84fae6c2.js => e6c6a4d2.cabc981f.js} (55%) rename assets/js/{e82d58ff.1237f227.js => e82d58ff.41285f40.js} (98%) create mode 100644 assets/js/ec030ab7.5c14cd9a.js delete mode 100644 assets/js/ec030ab7.788cb4bd.js delete mode 100644 assets/js/f01590dc.7eb36a75.js create mode 100644 assets/js/f01590dc.cd2d7fa9.js delete mode 100644 assets/js/f0b67137.2df6cb53.js create mode 100644 assets/js/f0b67137.bc9be628.js create mode 100644 assets/js/ff7f32ba.15da425f.js delete mode 100644 assets/js/ff7f32ba.ac2c7408.js delete mode 100644 assets/js/main.14a877c9.js create mode 100644 assets/js/main.e2332c07.js rename assets/js/{main.14a877c9.js.LICENSE.txt => main.e2332c07.js.LICENSE.txt} (100%) rename assets/js/{runtime~main.ae1f3a5b.js => runtime~main.e0adb39a.js} (65%) diff --git a/404.html b/404.html index 7dde284e18..a6e4200bc1 100644 --- a/404.html +++ b/404.html @@ -23,8 +23,8 @@ - - + + diff --git a/about-langflow.html b/about-langflow.html index 1d80007585..6260dc7d37 100644 --- a/about-langflow.html +++ b/about-langflow.html @@ -23,8 +23,8 @@ - - + + diff --git a/agent-tutorial.html b/agent-tutorial.html index ce4faf6aac..fec492e305 100644 --- a/agent-tutorial.html +++ b/agent-tutorial.html @@ -23,8 +23,8 @@ - - + + diff --git a/agents-tools.html b/agents-tools.html index 7766827346..ff211328cc 100644 --- a/agents-tools.html +++ b/agents-tools.html @@ -23,8 +23,8 @@ - - + + diff --git a/agents.html b/agents.html index d712311f4a..4ce6a13264 100644 --- a/agents.html +++ b/agents.html @@ -23,8 +23,8 @@ - - + + @@ -52,9 +52,9 @@

Langflow's Agent component is critical for building agent flows. This component provides everything you need to create an agent, including multiple Large Language Model (LLM) providers, tool calling, and custom instructions. It simplifies agent configuration so you can focus on application development.

-
How do agents work?

Agents extend LLMs by integrating tools, which are functions that provide additional context and enable autonomous task execution. +

How do agents work?

Agents extend Large Language Models (LLMs) by integrating tools, which are functions that provide additional context and enable autonomous task execution. These integrations make agents more specialized and powerful than standalone LLMs.

Whereas an LLM might generate acceptable, inert responses to general queries and tasks, an agent can leverage the integrated context and tools to provide more relevant responses and even take action. -For example, you might create an agent that can access your company's knowledge base, repositories, and other resources to help your team with tasks that require knowledge of your specific products, customers, and code.

Agents use LLMs as a reasoning engine to process input, determine which actions to take to address the query, and then generate a response. +For example, you might create an agent that can access your company's documentation, repositories, and other resources to help your team with tasks that require knowledge of your specific products, customers, and code.

Agents use LLMs as a reasoning engine to process input, determine which actions to take to address the query, and then generate a response. The response could be a typical text-based LLM response, or it could involve an action, like editing a file, running a script, or calling an external API.

In an agentic context, tools are functions that the agent can run to perform tasks or access external resources. A function is wrapped as a Tool object with a common interface that the agent understands. Agents become aware of tools through tool registration, which is when the agent is provided a list of available tools typically at agent initialization. @@ -115,8 +115,8 @@ With the given example, the agent should call the News Search c

For a multi-agent example, see Use an agent as a tool.

Agent component parameters

You can configure the Agent component to use your preferred provider and model, custom instructions, and tools.

-
tip

Many optional Agent component input parameters are hidden by default in the visual editor. -You can access all component parameters through the Controls in the component's header menu.

+

Some parameters are hidden by default in the visual editor. +You can modify all parameters through the Controls in the component's header menu.

Provider and model

Use the Model Provider (agent_llm) and Model Name (llm_model) settings to select the model provider and LLM that you want the agent to use.

The Agent component includes many models from several popular model providers. @@ -144,18 +144,19 @@ This memory allows them to retrieve and reference messages from previous convers

Chat memories are grouped by session ID (session_id). It is recommended to use custom session IDs if you need to segregate chat memory for different users or applications that run the same flow.

By default, the Agent component uses your Langflow installation's storage, and it retrieves a limited number of chat messages, which you can configure with the Number of Chat History Messages parameter.

-

Although the Message History component isn't required for default chat memory, it provides more options for sorting, filtering, and limiting memories, and the Message History component is required to use external chat memory like Mem0.

+

The Message History component isn't required for default chat memory, but it is required if you want to use external chat memory like Mem0. +Additionally, the Message History component provides more options for sorting, filtering, and limiting memories. Although, most of these options are built-in to the Agent component with default values.

For more information, see Store chat memory and Message History component.

Additional parameters

-

With the Agent component, the available parameters can change depending on the selected provider and model. -For example, some models support additional modes, arguments, or features like chat memory and temperature.

-

Some additional input parameters include the following:

+

With the Agent component, the available parameters can change depending on the selected provider and model, including support for additional modes, arguments, or features like chat memory and temperature. +For example:

  • Current Date (add_current_date_tool): When enabled (true), this setting adds a tool to the agent that can retrieve the current date.
  • Handle Parse Errors (handle_parsing_errors): When enabled (true), this setting allows the agent to fix errors, like typos, when analyzing user input.
  • Verbose (verbose): When enabled (true), this setting records detailed logging output for debugging and analysis.
-

To view and configure all parameters, click Controls in the component's header menu.

+

Some parameters are hidden by default in the visual editor. +You can modify all parameters through the Controls in the component's header menu.

Agent component output

The Agent component outputs a Response (response) that is Message data containing the agent's raw response to the query.

Typically, this is passed to a Chat Output component to return the response in a human-readable format. diff --git a/api-build.html b/api-build.html index 71b060c627..bfeda572fe 100644 --- a/api-build.html +++ b/api-build.html @@ -23,8 +23,8 @@ - - + + @@ -48,7 +48,6 @@

Build endpoints

-
important

The /build endpoints are used by Langflow's frontend visual editor code. These endpoints are part of the internal Langflow codebase.

Don't use these endpoints to run flows in applications that use your Langflow flows. To run flows in your apps, see Flow trigger endpoints.

diff --git a/api-files.html b/api-files.html index 9dc6ef8c03..035de4c0bc 100644 --- a/api-files.html +++ b/api-files.html @@ -23,8 +23,8 @@ - - + + @@ -48,7 +48,6 @@

Files endpoints

-

Use the /files endpoints to move files between your local machine and Langflow.

Differences between /v1/files and /v2/files

There are two versions of the /files endpoints.

diff --git a/api-flows-run.html b/api-flows-run.html index 5f67005251..7cb34241de 100644 --- a/api-flows-run.html +++ b/api-flows-run.html @@ -23,8 +23,8 @@ - - + + @@ -48,7 +48,6 @@

Flow trigger endpoints

-

Use the /run and /webhook endpoints to run flows.

To create, read, update, and delete flows, see Flow management endpoints.

Run flow

diff --git a/api-flows.html b/api-flows.html index f853152b94..b4fa46c72b 100644 --- a/api-flows.html +++ b/api-flows.html @@ -23,8 +23,8 @@ - - + + @@ -48,7 +48,6 @@

Flow management endpoints

-

Use the /flows endpoint to create, read, update, and delete flows.

If you want to use the Langflow API to run a flow, see Flow trigger endpoints.

Create flow

diff --git a/api-keys-and-authentication.html b/api-keys-and-authentication.html index 27356fd1e0..f00b967057 100644 --- a/api-keys-and-authentication.html +++ b/api-keys-and-authentication.html @@ -23,8 +23,8 @@ - - + + @@ -146,7 +146,7 @@ For more information, see

_10
LANGFLOW_SUPERUSER=administrator
_10
LANGFLOW_SUPERUSER_PASSWORD=securepassword

They are required if LANGFLOW_AUTO_LOGIN=False. Otherwise, they aren't relevant.

-

If required and not set in when you start a Langflow server with authentication enabled, then the default values are langflow and langflow for system auto-login behavior. +

When you start a Langflow server with authentication enabled, if these variables are required but not set, then Langflow uses the default values of langflow and langflow. These defaults don't apply when using the Langflow CLI command langflow superuser.

LANGFLOW_SECRET_KEY

This environment variable stores a secret key used for encrypting sensitive data like API keys. diff --git a/api-logs.html b/api-logs.html index de5a0fd7f6..97e791992c 100644 --- a/api-logs.html +++ b/api-logs.html @@ -23,8 +23,8 @@ - - + + @@ -48,7 +48,6 @@

Logs endpoints

-

Retrieve logs for your Langflow flow.

Enable log retrieval

The /logs endpoint requires log retrieval to be enabled in your Langflow instance.

diff --git a/api-monitor.html b/api-monitor.html index 435f5eaea1..050f199a70 100644 --- a/api-monitor.html +++ b/api-monitor.html @@ -23,8 +23,8 @@ - - + + @@ -48,7 +48,6 @@

Monitor endpoints

-

The /monitor endpoints are for internal Langflow functionality, primarily related to running flows in the Playground, storing chat history, and generating flow logs.

This information is primarily for those who are building custom components or contributing to the Langflow codebase in a way that requires calling or understanding these endpoints.

For typical application development with Langflow, there are more appropriate options for monitoring, debugging, and memory management. diff --git a/api-projects.html b/api-projects.html index e45f4ec4e9..ea51596529 100644 --- a/api-projects.html +++ b/api-projects.html @@ -23,8 +23,8 @@ - - + + @@ -48,7 +48,6 @@

Projects endpoints

-

Use the /projects endpoint to create, read, update, and delete Langflow projects.

Read projects

Get a list of Langflow projects, including project IDs, names, and descriptions.

diff --git a/api-reference-api-examples.html b/api-reference-api-examples.html index 2d5c805789..28bd0fbaa4 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 fea3fd5390..f158c0869f 100644 --- a/api-users.html +++ b/api-users.html @@ -23,8 +23,8 @@ - - + + @@ -48,7 +48,6 @@

Users endpoints

-

Use the /users endpoint to manage user accounts in Langflow.

Add user

Create a new user account with a given username and password.

diff --git a/api.html b/api.html index d81a298334..5aed9ffefb 100644 --- a/api.html +++ b/api.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/add-server.html b/api/add-server.html index fd81437b41..dceb3aaed7 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 7f036a7e8e..2f23e826cc 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 f33db45c20..02a13f6c65 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 a761535aba..11ff1e2793 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 e8aa840d99..b25cefe8ed 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 483e45983f..31d64b7cfe 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 4ccae2eddf..4464985759 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 ae791364bd..157ea41d11 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 70f1b2b23e..45e481b074 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 cdab45d645..e67e63e140 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 faf2215b89..3311799caf 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 962dd28c90..1f3568484f 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 d1624e6448..ee5106f0be 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 21f50b0dde..fd5ce4e563 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 1faa023380..24fdcb03ea 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 dc51c36468..e66bd83e41 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 7f7ef26c8e..7f5c431382 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 709d2b0930..094d96db65 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 2a6b022f33..9220032972 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 a33527f234..1d141ce22d 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 44837e1b44..4d2d32d4ae 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 18b9dccb54..684d71cb2c 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 8cda2c5e36..b1652e92f1 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 6c970dc28b..5764203b3e 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 9313fb030c..32526f23e5 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 b6a784c652..8005747a34 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 45b56ec81c..3e368e6d60 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 7c77e99fc6..15ca28bdf8 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 0e75034bf0..d83b238891 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 91f85025ed..5f3d178320 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 df140e592d..8e5b14538d 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 3edfa5a53f..6b7ea862f3 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 2aeccd8b2c..4d97a97763 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 e7e16a41c6..f4270c0f0d 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 9f1d5baead..460fed19e4 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 6ff3a4906b..a9bd3cc85b 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 575584c9b2..fe590b06e3 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 bb8f4056ba..30a646ca7b 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 c0d17f4e87..6025f18695 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 634f1baf1d..5dcfe51bd5 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 2f705a5413..bec269b3a1 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 5b69311fcb..0662ce9be4 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 8100f992d3..289c1f040c 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 f2c4a80516..9356fedf15 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 9c836efcd4..4b95bb361d 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 ecd6a9f5e4..e4a902154c 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 fae1e91d40..92a1b0d2db 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 d614c672d2..9dc29aacfd 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 61802d678c..d78f279c8b 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 dcb72c50f1..cfc8b18f78 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 538838a03a..76a31023da 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 9e423628ac..9b415288b5 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 4ae81a5e2e..723b0fe58d 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 84cb101c7f..8d006e7c13 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 a6ec3b10a0..6bb740fedc 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 5ea9996a00..0cf9b3f093 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 d7faa94a0d..c608d4b7ce 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 8574e7e198..4e73501d4f 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 e6f28c7ad2..20fb0c9f6e 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 8cff58fd08..3081fda598 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 ef8268fd0b..c9c41bc084 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 5337dff0dc..33014659c9 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 9d476cba7a..7c69d58440 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 2de4bc91bd..fd402b9581 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 ba3dc57cb1..5f3164d487 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 e9620e8330..6068aecb8c 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 af93f8a3ee..05df8eb9c2 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 ea129d1d82..c4b8031aef 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 8012b65a65..0885105c27 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 04ce4331df..737d3dc1ff 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 0b5d3cfa5c..379013e08e 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 a6fda0105c..3ee5dd5bb5 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 ebfecc534b..2fea3f2466 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 6a028e1606..dc07418f4f 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 f8bf10f91a..98083a7966 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 411ae359e0..0255ab4619 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 c47fc88a70..e3fa407eb2 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 8fa0ed38d0..388c02d72b 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 1bcbeb2443..49701a055e 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 e3e9a1da02..fdae0c8c19 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 f4cd9e89be..3026ec2e71 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 6e7da023f7..0e41553f17 100644 --- a/api/logout.html +++ b/api/logout.html @@ -23,8 +23,8 @@ - - + + diff --git a/api/logs.html b/api/logs.html index 0ea65aa4b6..fbb17b5543 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 a37debc035..faf2fdb746 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 fefbb8d6d3..751cf7a37a 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 8eca1b9a3a..bdecae915e 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 781f757369..cfb2451a1a 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 de56639e7f..66b02195be 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 4ec4c19a20..4914a47009 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 7aca134871..51b2acdd97 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 dd0e9fe19f..adcced6c7b 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 3d2cacc970..815287240e 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 f7e2135066..f2d809b974 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 5f9b5d04ba..26f2a6b51f 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 e6b6f1d4e1..859f4c054e 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 4b3e5e4d87..e9933034d9 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 16e77e494f..5640312cf7 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 9662e01748..a3eb630deb 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 8ce800ec4f..228c4cd985 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 d311737843..e15d5be3a5 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 cd8b8c6f7a..2b16900f3e 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 6e92901f89..800a2cf98b 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 708d43e322..dabb0f3c28 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 90671a75de..9ebf649220 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 d914880353..2e220ce984 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 33ebd0592d..4e66fd6246 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 ebd4df772b..4b6660c9d0 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 3f60053318..57eb158905 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 b549aa42fc..af353f8a77 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 508d0b88a9..0e86f009d4 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 8d70a6bc7a..f78521db4c 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 867f1d79e7..6b7f7b0006 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 9ad5aa0eec..ea25725a52 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 5c64a9c7eb..a6da809af9 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 c898cd0a50..dedc5eab43 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 0197027162..1931e70d89 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 8974b826ea..27ad8a8220 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 703c60e0b8..70c17e233d 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 f8766be5ff..8cdd4f8d18 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 4105068906..9a7f845f48 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 79873ec362..ed2e4dc259 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 0e08a73a47..44c5f9d431 100644 --- a/api/webhook-run-flow.html +++ b/api/webhook-run-flow.html @@ -23,8 +23,8 @@ - - + + diff --git a/assets/js/0132780e.4cf7ec16.js b/assets/js/0132780e.4cf7ec16.js deleted file mode 100644 index 62e455fe1c..0000000000 --- a/assets/js/0132780e.4cf7ec16.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[7841],{12260:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/conditional-looping-756b330b8dc690b3dab1c44cc2fb05db.png"},17886:(e,n,t)=>{t.d(n,{A:()=>r});t(96540);var o=t(64058),s=t(74848);function r({name:e,...n}){const t=o[e];return t?(0,s.jsx)(t,{...n}):null}},57373:(e,n,t)=>{t.r(n),t.d(n,{CH:()=>h,assets:()=>a,chCodeConfig:()=>p,contentTitle:()=>d,default:()=>j,frontMatter:()=>l,metadata:()=>o,toc:()=>x});const o=JSON.parse('{"id":"Components/components-logic","title":"Logic","description":"Langflow\'s 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":"Prompt Template","permalink":"/components-prompts"},"next":{"title":"Helpers","permalink":"/components-helpers"}}');var s=t(74848),r=t(28453),i=t(24754),c=t(17886);const l={title:"Logic",slug:"/components-logic"},d=void 0,a={},h={annotations:i.hk,Code:i.Cy},p={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},x=[{value:"If-Else (conditional router)",id:"if-else",level:2},{value:"Use the If-Else component in a flow",id:"use-the-if-else-component-in-a-flow",level:3},{value:"If-Else parameters",id:"if-else-parameters",level:3},{value:"Loop",id:"loop",level:2},{value:"The looping process",id:"the-looping-process",level:3},{value:"Loop example",id:"loop-example",level:3},{value:"Conditional looping",id:"conditional-looping",level:3},{value:"Notify and Listen",id:"notify-and-listen",level:2},{value:"Run flow",id:"run-flow",level:2},{value:"Run Flow parameters",id:"run-flow-parameters",level:3},{value:"Legacy Logic components",id:"legacy-logic-components",level:2}];function u(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},{Details:o}=n;return h||g("CH",!1),h.Code||g("CH.Code",!0),o||g("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)(n.p,{children:["Langflow's ",(0,s.jsx)(n.strong,{children:"Logic"})," components provide functionalities for routing, conditional processing, and flow management."]}),"\n",(0,s.jsx)(n.h2,{id:"if-else",children:"If-Else (conditional router)"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"If-Else"})," component is a conditional router that routes messages by comparing two strings.\nIt evaluates a condition by comparing two text inputs using the specified operator, and then routes the message to ",(0,s.jsx)(n.code,{children:"true_result"})," or ",(0,s.jsx)(n.code,{children:"false_result"})," depending on the evaluation."]}),"\n",(0,s.jsxs)(n.p,{children:["The operator looks for single strings in the input (",(0,s.jsx)(n.code,{children:"input_text"}),") based on an operator and match text (",(0,s.jsx)(n.code,{children:"match_text"}),"), but it can also search for multiple words by matching a regex.\nAvailable operators include:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"equals"}),": Exact match comparison"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"not equals"}),": Inverse of exact match"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"contains"}),": Checks if the ",(0,s.jsx)(n.code,{children:"match_text"})," is found within ",(0,s.jsx)(n.code,{children:"input_text"})]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"starts with"}),": Checks if ",(0,s.jsx)(n.code,{children:"input_text"})," begins with ",(0,s.jsx)(n.code,{children:"match_text"})]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"ends with"}),": Checks if ",(0,s.jsx)(n.code,{children:"input_text"})," ends with ",(0,s.jsx)(n.code,{children:"match_text"})]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"regex"}),": Matches on a case-sensitive pattern"]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["By default, all operators are case insensitive except ",(0,s.jsx)(n.strong,{children:"regex"}),".\n",(0,s.jsx)(n.strong,{children:"regex"})," is always case sensitive, and you can enable case sensitivity for all other operators in the ",(0,s.jsx)(n.a,{href:"#if-else-parameters",children:"If-Else parameters"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"use-the-if-else-component-in-a-flow",children:"Use the If-Else component in a flow"}),"\n",(0,s.jsxs)(n.p,{children:["The following example uses the ",(0,s.jsx)(n.strong,{children:"If-Else"})," component to check incoming chat messages with regex matching, and then output a different response depending on whether the match evaluated to true or false."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"A conditional router connected to two OpenAI components",src:t(89329).A+"",width:"3532",height:"3044"})}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Add an ",(0,s.jsx)(n.strong,{children:"If-Else"})," component to your flow, and then configure it as follows:"]}),"\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:"Text Input"}),": Connect the ",(0,s.jsx)(n.strong,{children:"Text Input"})," port to a ",(0,s.jsx)(n.strong,{children:"Chat Input"})," component or another ",(0,s.jsx)(n.code,{children:"Message"})," input."]}),"\n",(0,s.jsxs)(n.p,{children:["If your input isn't in ",(0,s.jsx)(n.code,{children:"Message"})," format, you can use another component to transform it, such as the ",(0,s.jsxs)(n.a,{href:"/components-processing#type-convert",children:[(0,s.jsx)(n.strong,{children:"Type Convert"})," component"]})," or ",(0,s.jsxs)(n.a,{href:"/components-processing#parser",children:[(0,s.jsx)(n.strong,{children:"Parser"})," component"]}),".\nIf your input isn't appropriate for ",(0,s.jsx)(n.code,{children:"Message"})," format, consider using another component for conditional routing, such as the ",(0,s.jsxs)(n.a,{href:"/components-processing#data-operations",children:[(0,s.jsx)(n.strong,{children:"Data Operations"})," component"]}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Match Text"}),": Enter ",(0,s.jsx)(n.code,{children:".*(urgent|warning|caution).*"})," so the component looks for these values in incoming input. The regex match is case sensitive, so if you need to look for all permutations of ",(0,s.jsx)(n.code,{children:"warning"}),", enter ",(0,s.jsx)(n.code,{children:"warning|Warning|WARNING"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Operator"}),": Select ",(0,s.jsx)(n.strong,{children:"regex"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Case True"}),": In the ",(0,s.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),", click ",(0,s.jsx)(c.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Controls"}),", enable the ",(0,s.jsx)(n.strong,{children:"Case True"})," parameter, click ",(0,s.jsx)(n.strong,{children:"Close"}),", and then enter ",(0,s.jsx)(n.code,{children:"New Message Detected"})," in the field."]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Case True"})," message is sent from the ",(0,s.jsx)(n.strong,{children:"True"})," output port when the match condition evaluates to true."]}),"\n",(0,s.jsxs)(n.p,{children:["No message is set for ",(0,s.jsx)(n.strong,{children:"Case False"})," so the component doesn't emit a message when the condition evaluates to false."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Depending on what you want to happen when the outcome is ",(0,s.jsx)(n.strong,{children:"True"}),", add components to your flow to execute that logic:"]}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Add a ",(0,s.jsx)(n.strong,{children:"Language Model"}),", ",(0,s.jsx)(n.strong,{children:"Prompt Template"}),", and ",(0,s.jsx)(n.strong,{children:"Chat Output"})," component to your flow."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["In the ",(0,s.jsx)(n.strong,{children:"Language Model"})," component, enter your OpenAI API key or select a different provider and model."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Connect the ",(0,s.jsx)(n.strong,{children:"If-Else"})," component's ",(0,s.jsx)(n.strong,{children:"True"})," output port to the ",(0,s.jsx)(n.strong,{children:"Language Model"})," component's ",(0,s.jsx)(n.strong,{children:"Input"})," port."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["In the ",(0,s.jsx)(n.strong,{children:"Prompt Template"})," component, enter instructions for the model when the evaluation is true, such as ",(0,s.jsx)(n.code,{children:"Send a message that a new warning, caution, or urgent message was received"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Connect the ",(0,s.jsx)(n.strong,{children:"Prompt Template"})," component to the ",(0,s.jsx)(n.strong,{children:"Language Model"})," component's ",(0,s.jsx)(n.strong,{children:"System Message"})," port."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Connect the ",(0,s.jsx)(n.strong,{children:"Language Model"})," component's output to the ",(0,s.jsx)(n.strong,{children:"Chat Output"})," component."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Repeat the same process with another set of ",(0,s.jsx)(n.strong,{children:"Language Model"}),", ",(0,s.jsx)(n.strong,{children:"Prompt Template"}),", and ",(0,s.jsx)(n.strong,{children:"Chat Output"})," components for the ",(0,s.jsx)(n.strong,{children:"False"})," outcome."]}),"\n",(0,s.jsxs)(n.p,{children:["Connect the ",(0,s.jsx)(n.strong,{children:"If-Else"})," component's ",(0,s.jsx)(n.strong,{children:"False"})," output port to the second ",(0,s.jsx)(n.strong,{children:"Language Model"})," component's ",(0,s.jsx)(n.strong,{children:"Input"})," port.\nIn the second ",(0,s.jsx)(n.strong,{children:"Prompt Template"}),", enter instructions for the model when the evaluation is false, such as ",(0,s.jsx)(n.code,{children:"Send a message that a new low-priority message was received"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["To test the flow, open the ",(0,s.jsx)(n.strong,{children:"Playground"}),", and then send the flow some messages with and without your regex strings.\nThe chat output should reflect the instructions in your prompts based on the regex evaluation."]}),"\n",(0,s.jsx)(h.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"User: A new user was created.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"AI: A new low-priority message was received.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"User: Sign-in warning: new user locked out.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"AI: A new warning, caution, or urgent message was received. Please review it at your earliest convenience.",props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"if-else-parameters",children:"If-Else parameters"}),"\n",(0,s.jsxs)(n.p,{children:["Some ",(0,s.jsx)(n.strong,{children:"If-Else"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,s.jsx)(c.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Controls"})," in the ",(0,s.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\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:"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:"input_text"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The primary text input for the operation."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"match_text"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The text to compare against."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"operator"}),(0,s.jsx)(n.td,{children:"Dropdown"}),(0,s.jsxs)(n.td,{children:["Input parameter. The operator used to compare texts. Options include ",(0,s.jsx)(n.code,{children:"equals"}),", ",(0,s.jsx)(n.code,{children:"not equals"}),", ",(0,s.jsx)(n.code,{children:"contains"}),", ",(0,s.jsx)(n.code,{children:"starts with"}),", ",(0,s.jsx)(n.code,{children:"ends with"}),", and ",(0,s.jsx)(n.code,{children:"regex"}),". The default is ",(0,s.jsx)(n.code,{children:"equals"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"case_sensitive"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"Input parameter. When true, the comparison is case sensitive. The default is false. This setting doesn't apply to regex comparisons."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"max_iterations"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsx)(n.td,{children:"Input parameter. The maximum number of iterations allowed for the conditional router. The default is 10."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"default_route"}),(0,s.jsx)(n.td,{children:"Dropdown"}),(0,s.jsxs)(n.td,{children:["Input parameter. The route to take when max iterations are reached. Options include ",(0,s.jsx)(n.code,{children:"true_result"})," or ",(0,s.jsx)(n.code,{children:"false_result"}),". The default is ",(0,s.jsx)(n.code,{children:"false_result"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"true_result"}),(0,s.jsx)(n.td,{children:"Message"}),(0,s.jsx)(n.td,{children:"Output parameter. The output produced when the condition is true."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"false_result"}),(0,s.jsx)(n.td,{children:"Message"}),(0,s.jsx)(n.td,{children:"Output parameter. The output produced when the condition is false."})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"loop",children:"Loop"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Loop"})," component iterates over a list of input by passing individual items to other components attached at the ",(0,s.jsx)(n.strong,{children:"Item"})," output port until there are no items left to process.\nThen, the ",(0,s.jsx)(n.strong,{children:"Loop"})," component passes the aggregated result of all looping to the component connected to the ",(0,s.jsx)(n.strong,{children:"Done"})," port."]}),"\n",(0,s.jsx)(n.h3,{id:"the-looping-process",children:"The looping process"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Loop"})," component is like a miniature flow within your flow.\nHere's a breakdown of the looping process:"]}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Accepts a list of ",(0,s.jsx)(n.a,{href:"/data-types#data",children:(0,s.jsx)(n.code,{children:"Data"})})," or ",(0,s.jsx)(n.a,{href:"/data-types#dataframe",children:(0,s.jsx)(n.code,{children:"DataFrame"})})," objects, such as a CSV file, through the ",(0,s.jsx)(n.strong,{children:"Loop"})," component's ",(0,s.jsx)(n.strong,{children:"Inputs"})," port."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Splits the input into individual items. For example, a CSV file is broken down by rows."}),"\n",(0,s.jsxs)(n.p,{children:["Specifically, the ",(0,s.jsx)(n.strong,{children:"Loop"})," component repeatedly extracts items by ",(0,s.jsx)(n.code,{children:"text"})," key in the ",(0,s.jsx)(n.code,{children:"Data"})," or ",(0,s.jsx)(n.code,{children:"DataFrame"})," objects until there are no more items to extract.\nEach ",(0,s.jsx)(n.code,{children:"item"})," output is a ",(0,s.jsx)(n.code,{children:"Data"})," objects."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Iterates over each ",(0,s.jsx)(n.code,{children:"item"})," by passing them to the ",(0,s.jsx)(n.strong,{children:"Item"})," output port."]}),"\n",(0,s.jsxs)(n.p,{children:["This port connects to one or more components that perform actions on each item.\nThe final component in the ",(0,s.jsx)(n.strong,{children:"Item"})," loop connects back to the ",(0,s.jsx)(n.strong,{children:"Loop"})," component's ",(0,s.jsx)(n.strong,{children:"Looping"})," port to process the next item."]}),"\n",(0,s.jsxs)(n.p,{children:["Only one component connects to the ",(0,s.jsx)(n.strong,{children:"Item"})," port, but you can pass the data through as many components as you need, as long as the last component in the chain connects back to the ",(0,s.jsx)(n.strong,{children:"Looping"})," port."]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"If-Else"})," component isn't compatible with the ",(0,s.jsx)(n.strong,{children:"Loop"})," component.\nFor more information, see ",(0,s.jsx)(n.a,{href:"#conditional-looping",children:"Conditional looping"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["After processing all items, the results are aggregated into a single ",(0,s.jsx)(n.code,{children:"Data"})," object that is passed from the ",(0,s.jsx)(n.strong,{children:"Loop"})," component's ",(0,s.jsx)(n.strong,{children:"Done"})," port to the next component in the flow."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["The following simplified Python code summarizes how the ",(0,s.jsx)(n.strong,{children:"Loop"})," component works.\nThis ",(0,s.jsx)(n.em,{children:"isn't"})," the actual component code; it is only meant to help you understand the general process."]}),"\n",(0,s.jsx)(h.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"for",props:{style:{color:"#FF7B72"}}},{content:" i ",props:{style:{color:"#C9D1D9"}}},{content:"in ",props:{style:{color:"#FF7B72"}}},{content:"input",props:{style:{color:"#79C0FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"# Receive input data as a list",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" process_item(i) ",props:{style:{color:"#C9D1D9"}}},{content:"# Process each item through components connected at the Item port",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" if",props:{style:{color:"#FF7B72"}}},{content:" has_more_items():",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" continue ",props:{style:{color:"#FF7B72"}}},{content:"# Loop back to Looping port to process the next item",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" else",props:{style:{color:"#FF7B72"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" break ",props:{style:{color:"#FF7B72"}}},{content:"# Exit the loop when no more items are left",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"done ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" aggregate_results() ",props:{style:{color:"#C9D1D9"}}},{content:"# Compile all returned items",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"print",props:{style:{color:"#79C0FF"}}},{content:"(done) ",props:{style:{color:"#C9D1D9"}}},{content:"# Send the aggregated results from the Done port to another component",props:{style:{color:"#8B949E"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(n.h3,{id:"loop-example",children:"Loop example"}),"\n",(0,s.jsxs)(n.p,{children:["In the follow example, the ",(0,s.jsx)(n.strong,{children:"Loop"})," component iterates over a CSV file until there are no rows left to process.\nIn this case, the ",(0,s.jsx)(n.strong,{children:"Item"})," port passes each row to a ",(0,s.jsx)(n.strong,{children:"Type Convert"})," component to convert the row into a ",(0,s.jsx)(n.code,{children:"Message"})," object, passes the ",(0,s.jsx)(n.code,{children:"Message"})," to a ",(0,s.jsx)(n.strong,{children:"Structured Output"})," component to be processed into structured data that is then passed back to the ",(0,s.jsx)(n.strong,{children:"Loop"})," component's ",(0,s.jsx)(n.strong,{children:"Looping"})," port.\nAfter processing all rows, the ",(0,s.jsx)(n.strong,{children:"Loop"})," component loads the aggregated list of structured data into a Chroma DB database through the ",(0,s.jsx)(n.strong,{children:"Chroma DB"})," component connected to the ",(0,s.jsx)(n.strong,{children:"Done"})," port."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Loop CSV parser",src:t(91110).A+"",width:"3876",height:"3300"})}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsxs)(n.p,{children:["For more examples of the ",(0,s.jsx)(n.strong,{children:"Loop"})," component, try the ",(0,s.jsx)(n.strong,{children:"Research Translation Loop"})," template in Langflow, or see the video tutorial ",(0,s.jsx)(n.a,{href:"https://www.youtube.com/watch?v=9Wx7WODSKTo",children:"Mastering the Loop Component & Agentic RAG in Langflow"}),"."]})}),"\n",(0,s.jsx)(n.h3,{id:"conditional-looping",children:"Conditional looping"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"If-Else"})," component isn't compatible with the ",(0,s.jsx)(n.strong,{children:"Loop"})," component.\nIf you need conditional loop events, redesign your flow to process conditions before the loop.\nFor example, if you are looping over a ",(0,s.jsx)(n.code,{children:"DataFrame"}),", you could use multiple ",(0,s.jsxs)(n.a,{href:"/components-processing#dataframe-operations",children:[(0,s.jsx)(n.strong,{children:"DataFrame Operations"})," components"]})," to conditionally filter data, and then run separate loops on each set of filtered data."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"A flow with conditional looping.",src:t(12260).A+"",width:"1482",height:"673"})}),"\n",(0,s.jsx)(n.h2,{id:"notify-and-listen",children:"Notify and Listen"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Notify"})," and ",(0,s.jsx)(n.strong,{children:"Listen"})," components are used together."]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Notify"})," component builds a notification from the current flow's context, including specific data content and a status identifier."]}),"\n",(0,s.jsxs)(n.p,{children:["The resulting notification is sent to the ",(0,s.jsx)(n.strong,{children:"Listen"})," component.\nThe notification data can then be passed to other components in the flow, such as the ",(0,s.jsx)(n.strong,{children:"If-Else"})," component."]}),"\n",(0,s.jsx)(n.h2,{id:"run-flow",children:"Run flow"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Run Flow"})," component runs another Langflow flow as a subprocess of the current flow."]}),"\n",(0,s.jsxs)(n.p,{children:["You can use this component to chain flows together, run flows conditionally, and attach flows to ",(0,s.jsxs)(n.a,{href:"/components-agents",children:[(0,s.jsx)(n.strong,{children:"Agent"})," components"]})," as ",(0,s.jsx)(n.a,{href:"/agents-tools",children:"tools for agents"})," to run as needed."]}),"\n",(0,s.jsxs)(n.p,{children:["When used with an agent, the ",(0,s.jsx)(n.code,{children:"name"})," and ",(0,s.jsx)(n.code,{children:"description"})," metadata that the agent uses to register the tool are created automatically."]}),"\n",(0,s.jsxs)(n.p,{children:["When you select a flow for the ",(0,s.jsx)(n.strong,{children:"Run Flow"})," component, it uses the target flow's graph structure to dynamically generate input and output fields on the ",(0,s.jsx)(n.strong,{children:"Run Flow"})," component."]}),"\n",(0,s.jsx)(n.h3,{id:"run-flow-parameters",children:"Run Flow parameters"}),"\n",(0,s.jsxs)(n.p,{children:["Some ",(0,s.jsx)(n.strong,{children:"Run Flow"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,s.jsx)(c.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Controls"})," in the ",(0,s.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\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:"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:"flow_name_selected"}),(0,s.jsx)(n.td,{children:"Dropdown"}),(0,s.jsx)(n.td,{children:"Input parameter. The name of the flow to run."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"session_id"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The session ID for the flow run, if you want to pass a custom session ID for the subflow."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"flow_tweak_data"}),(0,s.jsx)(n.td,{children:"Dict"}),(0,s.jsx)(n.td,{children:"Input parameter. Dictionary of tweaks to customize the flow's behavior. Available tweaks depend on the selected flow."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"dynamic inputs"}),(0,s.jsx)(n.td,{children:"Various"}),(0,s.jsx)(n.td,{children:"Input parameter. Additional inputs are generated based on the selected flow."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"run_outputs"}),(0,s.jsxs)(n.td,{children:["A ",(0,s.jsx)(n.code,{children:"List"})," of types (",(0,s.jsx)(n.code,{children:"Data"}),", ",(0,s.jsx)(n.code,{children:"Message"}),", or ",(0,s.jsx)(n.code,{children:"DataFrame"}),")"]}),(0,s.jsx)(n.td,{children:"Output parameter. All outputs are generated from running the flow."})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"legacy-logic-components",children:"Legacy Logic components"}),"\n",(0,s.jsxs)(n.p,{children:["The following ",(0,s.jsx)(n.strong,{children:"Logic"})," components are legacy components.\nYou can still use them in your flows, but they are no longer supported and can be removed in a future release."]}),"\n",(0,s.jsx)(n.p,{children:"Replace these components with suggested alternatives as soon as possible.\nComponents marked deprecated in addition to legacy should be replaced immediately."}),"\n",(0,s.jsxs)(o,{children:[(0,s.jsx)("summary",{children:"Condition/Data Conditional Router"}),(0,s.jsxs)(n.p,{children:["As an alternative to this legacy component, see the ",(0,s.jsxs)(n.a,{href:"#if-else",children:[(0,s.jsx)(n.strong,{children:"If-Else"})," component"]}),"."]}),(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Condition"})," component routes ",(0,s.jsx)(n.code,{children:"Data"})," objects based on a condition applied to a specified key, including Boolean validation.\nIt supports ",(0,s.jsx)(n.code,{children:"true_output"})," and ",(0,s.jsx)(n.code,{children:"false_output"})," for routing the results based on the condition evaluation."]}),(0,s.jsx)(n.p,{children:"This component is useful in workflows that require conditional routing of complex data structures, enabling dynamic decision-making based on data content."}),(0,s.jsxs)(n.p,{children:["It can process either a single ",(0,s.jsx)(n.code,{children:"Data"})," object or a list of ",(0,s.jsx)(n.code,{children:"Data"})," objects.\nThe following actions occur when processing a list of ",(0,s.jsx)(n.code,{children:"Data"})," objects:"]}),(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Each object in the list is evaluated individually."}),"\n",(0,s.jsxs)(n.li,{children:["Objects meeting the condition go to ",(0,s.jsx)(n.code,{children:"true_output"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Objects not meeting the condition go to ",(0,s.jsx)(n.code,{children:"false_output"}),"."]}),"\n",(0,s.jsx)(n.li,{children:"If all objects go to one output, the other output is empty."}),"\n"]}),(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Condition"})," component accepts the following parameters:"]}),(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_input"}),(0,s.jsx)(n.td,{children:"Data"}),(0,s.jsx)(n.td,{children:"Input parameter. The Data object or list of Data objects to process. This input can handle both single items and lists."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"key_name"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The name of the key in the Data object to check."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"operator"}),(0,s.jsx)(n.td,{children:"Dropdown"}),(0,s.jsxs)(n.td,{children:["Input parameter. The operator to apply. Options: ",(0,s.jsx)(n.code,{children:"equals"}),", ",(0,s.jsx)(n.code,{children:"not equals"}),", ",(0,s.jsx)(n.code,{children:"contains"}),", ",(0,s.jsx)(n.code,{children:"starts with"}),", ",(0,s.jsx)(n.code,{children:"ends with"}),", ",(0,s.jsx)(n.code,{children:"boolean validator"}),". Default: ",(0,s.jsx)(n.code,{children:"equals"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"compare_value"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. The value to compare against. Not shown/used when operator is ",(0,s.jsx)(n.code,{children:"boolean validator"}),"."]})]})]})]}),(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"operator"})," options have the following behaviors:"]}),(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"equals"}),": Exact match comparison between the key's value and compare_value."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"not equals"}),": Inverse of exact match."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"contains"}),": Checks if compare_value is found within the key's value."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"starts with"}),": Checks if the key's value begins with compare_value."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"ends with"}),": Checks if the key's value ends with compare_value."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"boolean validator"}),": Treats the key's value as a Boolean. The following values are considered true:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Boolean ",(0,s.jsx)(n.code,{children:"true"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Strings: ",(0,s.jsx)(n.code,{children:"true"}),", ",(0,s.jsx)(n.code,{children:"1"}),", ",(0,s.jsx)(n.code,{children:"yes"}),", ",(0,s.jsx)(n.code,{children:"y"}),", ",(0,s.jsx)(n.code,{children:"on"})," (case-insensitive)"]}),"\n",(0,s.jsxs)(n.li,{children:["Any other value is converted using Python's ",(0,s.jsx)(n.code,{children:"bool()"})," function"]}),"\n"]}),"\n"]}),"\n"]})]}),"\n",(0,s.jsxs)(o,{children:[(0,s.jsx)("summary",{children:"Pass"}),(0,s.jsxs)(n.p,{children:["As an alternative to this legacy component, use the ",(0,s.jsxs)(n.a,{href:"#if-else",children:[(0,s.jsx)(n.strong,{children:"If-Else"})," component"]})," to pass a message without modification."]}),(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Pass"})," component forwards the input message without modification."]}),(0,s.jsx)(n.p,{children:"It accepts the following parameters:"}),(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:"Display Name"}),(0,s.jsx)(n.th,{children:"Info"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"input_message"}),(0,s.jsx)(n.td,{children:"Input Message"}),(0,s.jsx)(n.td,{children:"Input parameter. The message to forward."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"ignored_message"}),(0,s.jsx)(n.td,{children:"Ignored Message"}),(0,s.jsx)(n.td,{children:"Input parameter. A second message that is ignored. Used as a workaround for continuity."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"output_message"}),(0,s.jsx)(n.td,{children:"Output Message"}),(0,s.jsx)(n.td,{children:"Output parameter. The forwarded message from the input."})]})]})]})]}),"\n",(0,s.jsxs)(o,{children:[(0,s.jsx)("summary",{children:"Flow As Tool (deprecated)"}),(0,s.jsx)(n.p,{children:"This component constructed a tool from a function that ran a loaded flow."}),(0,s.jsxs)(n.p,{children:["It was deprecated in Langflow version 1.1.2 and replaced by the ",(0,s.jsxs)(n.a,{href:"#run-flow",children:[(0,s.jsx)(n.strong,{children:"Run Flow"})," component"]}),"."]})]}),"\n",(0,s.jsxs)(o,{children:[(0,s.jsx)("summary",{children:"Sub Flow (deprecated)"}),(0,s.jsx)(n.p,{children:"This component integrated entire flows as components within a larger workflow.\nIt dynamically generated inputs based on the selected flow and executed the flow with provided parameters."}),(0,s.jsxs)(n.p,{children:["It was deprecated in Langflow version 1.1.2 and replaced by the ",(0,s.jsxs)(n.a,{href:"#run-flow",children:[(0,s.jsx)(n.strong,{children:"Run Flow"})," component"]}),"."]})]})]})}function j(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(u,{...e})}):u(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.")}},89329:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/component-conditional-router-1fb27526613395545592fc9166c75c27.png"},91110:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/component-loop-csv-66c1b53f0722b36a900632806cb32d78.png"}}]); \ No newline at end of file diff --git a/assets/js/0132780e.7a7d2c66.js b/assets/js/0132780e.7a7d2c66.js new file mode 100644 index 0000000000..c70b2dd785 --- /dev/null +++ b/assets/js/0132780e.7a7d2c66.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[7841],{12260:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/conditional-looping-756b330b8dc690b3dab1c44cc2fb05db.png"},17886:(e,n,t)=>{t.d(n,{A:()=>r});t(96540);var o=t(64058),s=t(74848);function r({name:e,...n}){const t=o[e];return t?(0,s.jsx)(t,{...n}):null}},31929:(e,n,t)=>{t.d(n,{Ay:()=>l,RM:()=>i});var o=t(74848),s=t(28453),r=t(17886);const i=[];function c(e){const n={a:"a",p:"p",strong:"strong",...(0,s.R)(),...e.components};return(0,o.jsxs)(n.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,o.jsx)(r.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,o.jsx)(n.strong,{children:"Controls"})," in the ",(0,o.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function l(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},57373:(e,n,t)=>{t.r(n),t.d(n,{CH:()=>p,assets:()=>h,chCodeConfig:()=>x,contentTitle:()=>a,default:()=>g,frontMatter:()=>d,metadata:()=>o,toc:()=>u});const o=JSON.parse('{"id":"Components/components-logic","title":"Logic","description":"Langflow\'s 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":"Prompt Template","permalink":"/components-prompts"},"next":{"title":"Helpers","permalink":"/components-helpers"}}');var s=t(74848),r=t(28453),i=t(24754),c=t(17886),l=t(31929);const d={title:"Logic",slug:"/components-logic"},a=void 0,h={},p={annotations:i.hk,Code:i.Cy},x={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},u=[{value:"If-Else (conditional router)",id:"if-else",level:2},{value:"Use the If-Else component in a flow",id:"use-the-if-else-component-in-a-flow",level:3},{value:"If-Else parameters",id:"if-else-parameters",level:3},...l.RM,{value:"Loop",id:"loop",level:2},{value:"The looping process",id:"the-looping-process",level:3},{value:"Loop example",id:"loop-example",level:3},{value:"Conditional looping",id:"conditional-looping",level:3},{value:"Notify and Listen",id:"notify-and-listen",level:2},{value:"Run flow",id:"run-flow",level:2},{value:"Run Flow parameters",id:"run-flow-parameters",level:3},...l.RM,{value:"Legacy Logic components",id:"legacy-logic-components",level:2}];function j(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},{Details:o}=n;return p||m("CH",!1),p.Code||m("CH.Code",!0),o||m("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)(n.p,{children:["Langflow's ",(0,s.jsx)(n.strong,{children:"Logic"})," components provide functionalities for routing, conditional processing, and flow management."]}),"\n",(0,s.jsx)(n.h2,{id:"if-else",children:"If-Else (conditional router)"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"If-Else"})," component is a conditional router that routes messages by comparing two strings.\nIt evaluates a condition by comparing two text inputs using the specified operator, and then routes the message to ",(0,s.jsx)(n.code,{children:"true_result"})," or ",(0,s.jsx)(n.code,{children:"false_result"})," depending on the evaluation."]}),"\n",(0,s.jsxs)(n.p,{children:["The operator looks for single strings in the input (",(0,s.jsx)(n.code,{children:"input_text"}),") based on an operator and match text (",(0,s.jsx)(n.code,{children:"match_text"}),"), but it can also search for multiple words by matching a regex.\nAvailable operators include:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"equals"}),": Exact match comparison"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"not equals"}),": Inverse of exact match"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"contains"}),": Checks if the ",(0,s.jsx)(n.code,{children:"match_text"})," is found within ",(0,s.jsx)(n.code,{children:"input_text"})]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"starts with"}),": Checks if ",(0,s.jsx)(n.code,{children:"input_text"})," begins with ",(0,s.jsx)(n.code,{children:"match_text"})]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"ends with"}),": Checks if ",(0,s.jsx)(n.code,{children:"input_text"})," ends with ",(0,s.jsx)(n.code,{children:"match_text"})]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"regex"}),": Matches on a case-sensitive pattern"]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["By default, all operators are case insensitive except ",(0,s.jsx)(n.strong,{children:"regex"}),".\n",(0,s.jsx)(n.strong,{children:"regex"})," is always case sensitive, and you can enable case sensitivity for all other operators in the ",(0,s.jsx)(n.a,{href:"#if-else-parameters",children:"If-Else parameters"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"use-the-if-else-component-in-a-flow",children:"Use the If-Else component in a flow"}),"\n",(0,s.jsxs)(n.p,{children:["The following example uses the ",(0,s.jsx)(n.strong,{children:"If-Else"})," component to check incoming chat messages with regex matching, and then output a different response depending on whether the match evaluated to true or false."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"A conditional router connected to two OpenAI components",src:t(89329).A+"",width:"3532",height:"3044"})}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Add an ",(0,s.jsx)(n.strong,{children:"If-Else"})," component to your flow, and then configure it as follows:"]}),"\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:"Text Input"}),": Connect the ",(0,s.jsx)(n.strong,{children:"Text Input"})," port to a ",(0,s.jsx)(n.strong,{children:"Chat Input"})," component or another ",(0,s.jsx)(n.code,{children:"Message"})," input."]}),"\n",(0,s.jsxs)(n.p,{children:["If your input isn't in ",(0,s.jsx)(n.code,{children:"Message"})," format, you can use another component to transform it, such as the ",(0,s.jsxs)(n.a,{href:"/components-processing#type-convert",children:[(0,s.jsx)(n.strong,{children:"Type Convert"})," component"]})," or ",(0,s.jsxs)(n.a,{href:"/components-processing#parser",children:[(0,s.jsx)(n.strong,{children:"Parser"})," component"]}),".\nIf your input isn't appropriate for ",(0,s.jsx)(n.code,{children:"Message"})," format, consider using another component for conditional routing, such as the ",(0,s.jsxs)(n.a,{href:"/components-processing#data-operations",children:[(0,s.jsx)(n.strong,{children:"Data Operations"})," component"]}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Match Text"}),": Enter ",(0,s.jsx)(n.code,{children:".*(urgent|warning|caution).*"})," so the component looks for these values in incoming input. The regex match is case sensitive, so if you need to look for all permutations of ",(0,s.jsx)(n.code,{children:"warning"}),", enter ",(0,s.jsx)(n.code,{children:"warning|Warning|WARNING"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Operator"}),": Select ",(0,s.jsx)(n.strong,{children:"regex"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Case True"}),": In the ",(0,s.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),", click ",(0,s.jsx)(c.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Controls"}),", enable the ",(0,s.jsx)(n.strong,{children:"Case True"})," parameter, click ",(0,s.jsx)(n.strong,{children:"Close"}),", and then enter ",(0,s.jsx)(n.code,{children:"New Message Detected"})," in the field."]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Case True"})," message is sent from the ",(0,s.jsx)(n.strong,{children:"True"})," output port when the match condition evaluates to true."]}),"\n",(0,s.jsxs)(n.p,{children:["No message is set for ",(0,s.jsx)(n.strong,{children:"Case False"})," so the component doesn't emit a message when the condition evaluates to false."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Depending on what you want to happen when the outcome is ",(0,s.jsx)(n.strong,{children:"True"}),", add components to your flow to execute that logic:"]}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Add a ",(0,s.jsx)(n.strong,{children:"Language Model"}),", ",(0,s.jsx)(n.strong,{children:"Prompt Template"}),", and ",(0,s.jsx)(n.strong,{children:"Chat Output"})," component to your flow."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["In the ",(0,s.jsx)(n.strong,{children:"Language Model"})," component, enter your OpenAI API key or select a different provider and model."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Connect the ",(0,s.jsx)(n.strong,{children:"If-Else"})," component's ",(0,s.jsx)(n.strong,{children:"True"})," output port to the ",(0,s.jsx)(n.strong,{children:"Language Model"})," component's ",(0,s.jsx)(n.strong,{children:"Input"})," port."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["In the ",(0,s.jsx)(n.strong,{children:"Prompt Template"})," component, enter instructions for the model when the evaluation is true, such as ",(0,s.jsx)(n.code,{children:"Send a message that a new warning, caution, or urgent message was received"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Connect the ",(0,s.jsx)(n.strong,{children:"Prompt Template"})," component to the ",(0,s.jsx)(n.strong,{children:"Language Model"})," component's ",(0,s.jsx)(n.strong,{children:"System Message"})," port."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Connect the ",(0,s.jsx)(n.strong,{children:"Language Model"})," component's output to the ",(0,s.jsx)(n.strong,{children:"Chat Output"})," component."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Repeat the same process with another set of ",(0,s.jsx)(n.strong,{children:"Language Model"}),", ",(0,s.jsx)(n.strong,{children:"Prompt Template"}),", and ",(0,s.jsx)(n.strong,{children:"Chat Output"})," components for the ",(0,s.jsx)(n.strong,{children:"False"})," outcome."]}),"\n",(0,s.jsxs)(n.p,{children:["Connect the ",(0,s.jsx)(n.strong,{children:"If-Else"})," component's ",(0,s.jsx)(n.strong,{children:"False"})," output port to the second ",(0,s.jsx)(n.strong,{children:"Language Model"})," component's ",(0,s.jsx)(n.strong,{children:"Input"})," port.\nIn the second ",(0,s.jsx)(n.strong,{children:"Prompt Template"}),", enter instructions for the model when the evaluation is false, such as ",(0,s.jsx)(n.code,{children:"Send a message that a new low-priority message was received"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["To test the flow, open the ",(0,s.jsx)(n.strong,{children:"Playground"}),", and then send the flow some messages with and without your regex strings.\nThe chat output should reflect the instructions in your prompts based on the regex evaluation."]}),"\n",(0,s.jsx)(p.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"User: A new user was created.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"AI: A new low-priority message was received.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"User: Sign-in warning: new user locked out.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"AI: A new warning, caution, or urgent message was received. Please review it at your earliest convenience.",props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"if-else-parameters",children:"If-Else parameters"}),"\n",(0,s.jsx)(l.Ay,{}),"\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:"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:"input_text"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The primary text input for the operation."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"match_text"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The text to compare against."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"operator"}),(0,s.jsx)(n.td,{children:"Dropdown"}),(0,s.jsxs)(n.td,{children:["Input parameter. The operator used to compare texts. Options include ",(0,s.jsx)(n.code,{children:"equals"}),", ",(0,s.jsx)(n.code,{children:"not equals"}),", ",(0,s.jsx)(n.code,{children:"contains"}),", ",(0,s.jsx)(n.code,{children:"starts with"}),", ",(0,s.jsx)(n.code,{children:"ends with"}),", and ",(0,s.jsx)(n.code,{children:"regex"}),". The default is ",(0,s.jsx)(n.code,{children:"equals"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"case_sensitive"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"Input parameter. When true, the comparison is case sensitive. The default is false. This setting doesn't apply to regex comparisons."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"max_iterations"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsx)(n.td,{children:"Input parameter. The maximum number of iterations allowed for the conditional router. The default is 10."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"default_route"}),(0,s.jsx)(n.td,{children:"Dropdown"}),(0,s.jsxs)(n.td,{children:["Input parameter. The route to take when max iterations are reached. Options include ",(0,s.jsx)(n.code,{children:"true_result"})," or ",(0,s.jsx)(n.code,{children:"false_result"}),". The default is ",(0,s.jsx)(n.code,{children:"false_result"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"true_result"}),(0,s.jsx)(n.td,{children:"Message"}),(0,s.jsx)(n.td,{children:"Output parameter. The output produced when the condition is true."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"false_result"}),(0,s.jsx)(n.td,{children:"Message"}),(0,s.jsx)(n.td,{children:"Output parameter. The output produced when the condition is false."})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"loop",children:"Loop"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Loop"})," component iterates over a list of input by passing individual items to other components attached at the ",(0,s.jsx)(n.strong,{children:"Item"})," output port until there are no items left to process.\nThen, the ",(0,s.jsx)(n.strong,{children:"Loop"})," component passes the aggregated result of all looping to the component connected to the ",(0,s.jsx)(n.strong,{children:"Done"})," port."]}),"\n",(0,s.jsx)(n.h3,{id:"the-looping-process",children:"The looping process"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Loop"})," component is like a miniature flow within your flow.\nHere's a breakdown of the looping process:"]}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Accepts a list of ",(0,s.jsx)(n.a,{href:"/data-types#data",children:(0,s.jsx)(n.code,{children:"Data"})})," or ",(0,s.jsx)(n.a,{href:"/data-types#dataframe",children:(0,s.jsx)(n.code,{children:"DataFrame"})})," objects, such as a CSV file, through the ",(0,s.jsx)(n.strong,{children:"Loop"})," component's ",(0,s.jsx)(n.strong,{children:"Inputs"})," port."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Splits the input into individual items. For example, a CSV file is broken down by rows."}),"\n",(0,s.jsxs)(n.p,{children:["Specifically, the ",(0,s.jsx)(n.strong,{children:"Loop"})," component repeatedly extracts items by ",(0,s.jsx)(n.code,{children:"text"})," key in the ",(0,s.jsx)(n.code,{children:"Data"})," or ",(0,s.jsx)(n.code,{children:"DataFrame"})," objects until there are no more items to extract.\nEach ",(0,s.jsx)(n.code,{children:"item"})," output is a ",(0,s.jsx)(n.code,{children:"Data"})," objects."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Iterates over each ",(0,s.jsx)(n.code,{children:"item"})," by passing them to the ",(0,s.jsx)(n.strong,{children:"Item"})," output port."]}),"\n",(0,s.jsxs)(n.p,{children:["This port connects to one or more components that perform actions on each item.\nThe final component in the ",(0,s.jsx)(n.strong,{children:"Item"})," loop connects back to the ",(0,s.jsx)(n.strong,{children:"Loop"})," component's ",(0,s.jsx)(n.strong,{children:"Looping"})," port to process the next item."]}),"\n",(0,s.jsxs)(n.p,{children:["Only one component connects to the ",(0,s.jsx)(n.strong,{children:"Item"})," port, but you can pass the data through as many components as you need, as long as the last component in the chain connects back to the ",(0,s.jsx)(n.strong,{children:"Looping"})," port."]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"If-Else"})," component isn't compatible with the ",(0,s.jsx)(n.strong,{children:"Loop"})," component.\nFor more information, see ",(0,s.jsx)(n.a,{href:"#conditional-looping",children:"Conditional looping"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["After processing all items, the results are aggregated into a single ",(0,s.jsx)(n.code,{children:"Data"})," object that is passed from the ",(0,s.jsx)(n.strong,{children:"Loop"})," component's ",(0,s.jsx)(n.strong,{children:"Done"})," port to the next component in the flow."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["The following simplified Python code summarizes how the ",(0,s.jsx)(n.strong,{children:"Loop"})," component works.\nThis ",(0,s.jsx)(n.em,{children:"isn't"})," the actual component code; it is only meant to help you understand the general process."]}),"\n",(0,s.jsx)(p.Code,{codeConfig:x,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"for",props:{style:{color:"#FF7B72"}}},{content:" i ",props:{style:{color:"#C9D1D9"}}},{content:"in ",props:{style:{color:"#FF7B72"}}},{content:"input",props:{style:{color:"#79C0FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"# Receive input data as a list",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" process_item(i) ",props:{style:{color:"#C9D1D9"}}},{content:"# Process each item through components connected at the Item port",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" if",props:{style:{color:"#FF7B72"}}},{content:" has_more_items():",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" continue ",props:{style:{color:"#FF7B72"}}},{content:"# Loop back to Looping port to process the next item",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" else",props:{style:{color:"#FF7B72"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" break ",props:{style:{color:"#FF7B72"}}},{content:"# Exit the loop when no more items are left",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"done ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" aggregate_results() ",props:{style:{color:"#C9D1D9"}}},{content:"# Compile all returned items",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"print",props:{style:{color:"#79C0FF"}}},{content:"(done) ",props:{style:{color:"#C9D1D9"}}},{content:"# Send the aggregated results from the Done port to another component",props:{style:{color:"#8B949E"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(n.h3,{id:"loop-example",children:"Loop example"}),"\n",(0,s.jsxs)(n.p,{children:["In the follow example, the ",(0,s.jsx)(n.strong,{children:"Loop"})," component iterates over a CSV file until there are no rows left to process.\nIn this case, the ",(0,s.jsx)(n.strong,{children:"Item"})," port passes each row to a ",(0,s.jsx)(n.strong,{children:"Type Convert"})," component to convert the row into a ",(0,s.jsx)(n.code,{children:"Message"})," object, passes the ",(0,s.jsx)(n.code,{children:"Message"})," to a ",(0,s.jsx)(n.strong,{children:"Structured Output"})," component to be processed into structured data that is then passed back to the ",(0,s.jsx)(n.strong,{children:"Loop"})," component's ",(0,s.jsx)(n.strong,{children:"Looping"})," port.\nAfter processing all rows, the ",(0,s.jsx)(n.strong,{children:"Loop"})," component loads the aggregated list of structured data into a Chroma DB database through the ",(0,s.jsx)(n.strong,{children:"Chroma DB"})," component connected to the ",(0,s.jsx)(n.strong,{children:"Done"})," port."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Loop CSV parser",src:t(91110).A+"",width:"3876",height:"3300"})}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsxs)(n.p,{children:["For more examples of the ",(0,s.jsx)(n.strong,{children:"Loop"})," component, try the ",(0,s.jsx)(n.strong,{children:"Research Translation Loop"})," template in Langflow, or see the video tutorial ",(0,s.jsx)(n.a,{href:"https://www.youtube.com/watch?v=9Wx7WODSKTo",children:"Mastering the Loop Component & Agentic RAG in Langflow"}),"."]})}),"\n",(0,s.jsx)(n.h3,{id:"conditional-looping",children:"Conditional looping"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"If-Else"})," component isn't compatible with the ",(0,s.jsx)(n.strong,{children:"Loop"})," component.\nIf you need conditional loop events, redesign your flow to process conditions before the loop.\nFor example, if you are looping over a ",(0,s.jsx)(n.code,{children:"DataFrame"}),", you could use multiple ",(0,s.jsxs)(n.a,{href:"/components-processing#dataframe-operations",children:[(0,s.jsx)(n.strong,{children:"DataFrame Operations"})," components"]})," to conditionally filter data, and then run separate loops on each set of filtered data."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"A flow with conditional looping.",src:t(12260).A+"",width:"1482",height:"673"})}),"\n",(0,s.jsx)(n.h2,{id:"notify-and-listen",children:"Notify and Listen"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Notify"})," and ",(0,s.jsx)(n.strong,{children:"Listen"})," components are used together."]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Notify"})," component builds a notification from the current flow's context, including specific data content and a status identifier."]}),"\n",(0,s.jsxs)(n.p,{children:["The resulting notification is sent to the ",(0,s.jsx)(n.strong,{children:"Listen"})," component.\nThe notification data can then be passed to other components in the flow, such as the ",(0,s.jsx)(n.strong,{children:"If-Else"})," component."]}),"\n",(0,s.jsx)(n.h2,{id:"run-flow",children:"Run flow"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Run Flow"})," component runs another Langflow flow as a subprocess of the current flow."]}),"\n",(0,s.jsxs)(n.p,{children:["You can use this component to chain flows together, run flows conditionally, and attach flows to ",(0,s.jsxs)(n.a,{href:"/components-agents",children:[(0,s.jsx)(n.strong,{children:"Agent"})," components"]})," as ",(0,s.jsx)(n.a,{href:"/agents-tools",children:"tools for agents"})," to run as needed."]}),"\n",(0,s.jsxs)(n.p,{children:["When used with an agent, the ",(0,s.jsx)(n.code,{children:"name"})," and ",(0,s.jsx)(n.code,{children:"description"})," metadata that the agent uses to register the tool are created automatically."]}),"\n",(0,s.jsxs)(n.p,{children:["When you select a flow for the ",(0,s.jsx)(n.strong,{children:"Run Flow"})," component, it uses the target flow's graph structure to dynamically generate input and output fields on the ",(0,s.jsx)(n.strong,{children:"Run Flow"})," component."]}),"\n",(0,s.jsx)(n.h3,{id:"run-flow-parameters",children:"Run Flow parameters"}),"\n",(0,s.jsx)(l.Ay,{}),"\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:"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:"flow_name_selected"}),(0,s.jsx)(n.td,{children:"Dropdown"}),(0,s.jsx)(n.td,{children:"Input parameter. The name of the flow to run."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"session_id"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The session ID for the flow run, if you want to pass a custom session ID for the subflow."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"flow_tweak_data"}),(0,s.jsx)(n.td,{children:"Dict"}),(0,s.jsx)(n.td,{children:"Input parameter. Dictionary of tweaks to customize the flow's behavior. Available tweaks depend on the selected flow."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"dynamic inputs"}),(0,s.jsx)(n.td,{children:"Various"}),(0,s.jsx)(n.td,{children:"Input parameter. Additional inputs are generated based on the selected flow."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"run_outputs"}),(0,s.jsxs)(n.td,{children:["A ",(0,s.jsx)(n.code,{children:"List"})," of types (",(0,s.jsx)(n.code,{children:"Data"}),", ",(0,s.jsx)(n.code,{children:"Message"}),", or ",(0,s.jsx)(n.code,{children:"DataFrame"}),")"]}),(0,s.jsx)(n.td,{children:"Output parameter. All outputs are generated from running the flow."})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"legacy-logic-components",children:"Legacy Logic components"}),"\n",(0,s.jsxs)(n.p,{children:["The following ",(0,s.jsx)(n.strong,{children:"Logic"})," components are legacy components.\nYou can still use them in your flows, but they are no longer supported and can be removed in a future release."]}),"\n",(0,s.jsx)(n.p,{children:"Replace these components with suggested alternatives as soon as possible.\nComponents marked deprecated in addition to legacy should be replaced immediately."}),"\n",(0,s.jsxs)(o,{children:[(0,s.jsx)("summary",{children:"Condition/Data Conditional Router"}),(0,s.jsxs)(n.p,{children:["As an alternative to this legacy component, see the ",(0,s.jsxs)(n.a,{href:"#if-else",children:[(0,s.jsx)(n.strong,{children:"If-Else"})," component"]}),"."]}),(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Condition"})," component routes ",(0,s.jsx)(n.code,{children:"Data"})," objects based on a condition applied to a specified key, including Boolean validation.\nIt supports ",(0,s.jsx)(n.code,{children:"true_output"})," and ",(0,s.jsx)(n.code,{children:"false_output"})," for routing the results based on the condition evaluation."]}),(0,s.jsx)(n.p,{children:"This component is useful in workflows that require conditional routing of complex data structures, enabling dynamic decision-making based on data content."}),(0,s.jsxs)(n.p,{children:["It can process either a single ",(0,s.jsx)(n.code,{children:"Data"})," object or a list of ",(0,s.jsx)(n.code,{children:"Data"})," objects.\nThe following actions occur when processing a list of ",(0,s.jsx)(n.code,{children:"Data"})," objects:"]}),(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Each object in the list is evaluated individually."}),"\n",(0,s.jsxs)(n.li,{children:["Objects meeting the condition go to ",(0,s.jsx)(n.code,{children:"true_output"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Objects not meeting the condition go to ",(0,s.jsx)(n.code,{children:"false_output"}),"."]}),"\n",(0,s.jsx)(n.li,{children:"If all objects go to one output, the other output is empty."}),"\n"]}),(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Condition"})," component accepts the following parameters:"]}),(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_input"}),(0,s.jsx)(n.td,{children:"Data"}),(0,s.jsx)(n.td,{children:"Input parameter. The Data object or list of Data objects to process. This input can handle both single items and lists."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"key_name"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The name of the key in the Data object to check."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"operator"}),(0,s.jsx)(n.td,{children:"Dropdown"}),(0,s.jsxs)(n.td,{children:["Input parameter. The operator to apply. Options: ",(0,s.jsx)(n.code,{children:"equals"}),", ",(0,s.jsx)(n.code,{children:"not equals"}),", ",(0,s.jsx)(n.code,{children:"contains"}),", ",(0,s.jsx)(n.code,{children:"starts with"}),", ",(0,s.jsx)(n.code,{children:"ends with"}),", ",(0,s.jsx)(n.code,{children:"boolean validator"}),". Default: ",(0,s.jsx)(n.code,{children:"equals"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"compare_value"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. The value to compare against. Not shown/used when operator is ",(0,s.jsx)(n.code,{children:"boolean validator"}),"."]})]})]})]}),(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"operator"})," options have the following behaviors:"]}),(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"equals"}),": Exact match comparison between the key's value and compare_value."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"not equals"}),": Inverse of exact match."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"contains"}),": Checks if compare_value is found within the key's value."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"starts with"}),": Checks if the key's value begins with compare_value."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"ends with"}),": Checks if the key's value ends with compare_value."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"boolean validator"}),": Treats the key's value as a Boolean. The following values are considered true:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Boolean ",(0,s.jsx)(n.code,{children:"true"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Strings: ",(0,s.jsx)(n.code,{children:"true"}),", ",(0,s.jsx)(n.code,{children:"1"}),", ",(0,s.jsx)(n.code,{children:"yes"}),", ",(0,s.jsx)(n.code,{children:"y"}),", ",(0,s.jsx)(n.code,{children:"on"})," (case-insensitive)"]}),"\n",(0,s.jsxs)(n.li,{children:["Any other value is converted using Python's ",(0,s.jsx)(n.code,{children:"bool()"})," function"]}),"\n"]}),"\n"]}),"\n"]})]}),"\n",(0,s.jsxs)(o,{children:[(0,s.jsx)("summary",{children:"Pass"}),(0,s.jsxs)(n.p,{children:["As an alternative to this legacy component, use the ",(0,s.jsxs)(n.a,{href:"#if-else",children:[(0,s.jsx)(n.strong,{children:"If-Else"})," component"]})," to pass a message without modification."]}),(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Pass"})," component forwards the input message without modification."]}),(0,s.jsx)(n.p,{children:"It accepts the following parameters:"}),(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:"Display Name"}),(0,s.jsx)(n.th,{children:"Info"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"input_message"}),(0,s.jsx)(n.td,{children:"Input Message"}),(0,s.jsx)(n.td,{children:"Input parameter. The message to forward."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"ignored_message"}),(0,s.jsx)(n.td,{children:"Ignored Message"}),(0,s.jsx)(n.td,{children:"Input parameter. A second message that is ignored. Used as a workaround for continuity."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"output_message"}),(0,s.jsx)(n.td,{children:"Output Message"}),(0,s.jsx)(n.td,{children:"Output parameter. The forwarded message from the input."})]})]})]})]}),"\n",(0,s.jsxs)(o,{children:[(0,s.jsx)("summary",{children:"Flow As Tool (deprecated)"}),(0,s.jsx)(n.p,{children:"This component constructed a tool from a function that ran a loaded flow."}),(0,s.jsxs)(n.p,{children:["It was deprecated in Langflow version 1.1.2 and replaced by the ",(0,s.jsxs)(n.a,{href:"#run-flow",children:[(0,s.jsx)(n.strong,{children:"Run Flow"})," component"]}),"."]})]}),"\n",(0,s.jsxs)(o,{children:[(0,s.jsx)("summary",{children:"Sub Flow (deprecated)"}),(0,s.jsx)(n.p,{children:"This component integrated entire flows as components within a larger workflow.\nIt dynamically generated inputs based on the selected flow and executed the flow with provided parameters."}),(0,s.jsxs)(n.p,{children:["It was deprecated in Langflow version 1.1.2 and replaced by the ",(0,s.jsxs)(n.a,{href:"#run-flow",children:[(0,s.jsx)(n.strong,{children:"Run Flow"})," component"]}),"."]})]})]})}function g(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(j,{...e})}):j(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.")}},89329:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/component-conditional-router-1fb27526613395545592fc9166c75c27.png"},91110:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/component-loop-csv-66c1b53f0722b36a900632806cb32d78.png"}}]); \ No newline at end of file diff --git a/assets/js/07e388ca.aa9d9dc2.js b/assets/js/07e388ca.d1e23d1c.js similarity index 87% rename from assets/js/07e388ca.aa9d9dc2.js rename to assets/js/07e388ca.d1e23d1c.js index 906115196b..86e5817bb5 100644 --- a/assets/js/07e388ca.aa9d9dc2.js +++ b/assets/js/07e388ca.d1e23d1c.js @@ -1 +1 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[1628],{4558:(o,e,t)=>{t.d(e,{A:()=>n});const n=t.p+"assets/images/api-pane-9cb07c8f812374268f94e3f8e65c6be3.png"},11470:(o,e,t)=>{t.d(e,{A:()=>x});var n=t(96540),s=t(18215),l=t(23104),r=t(56347),c=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 y({value:o,tabValues:e}){return e.some(e=>e.value===o)}function u({queryString:o=!1,groupId:e}){const t=(0,r.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 f(o){const{defaultValue:e,queryString:t=!1,groupId:s}=o,l=h(o),[r,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(!y({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:l})),[a,d]=u({queryString:t,groupId:s}),[f,D]=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??f;return y({value:o,tabValues:l})?o:null})();(0,c.A)(()=>{F&&p(F)},[F]);return{selectedValue:r,selectValue:(0,n.useCallback)(o=>{if(!y({value:o,tabValues:l}))throw new Error(`Can't select invalid tab value=${o}`);p(o),d(o),D(o)},[d,D,l]),tabValues:l}}var D=t(92303);const F={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=t(74848);function m({className:o,block:e,selectedValue:t,selectValue:n,tabValues:r}){const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,l.a_)(),a=o=>{const e=o.currentTarget,s=c.indexOf(e),l=r[s].value;l!==t&&(p(e),n(l))},i=o=>{let e=null;switch(o.key){case"Enter":a(o);break;case"ArrowRight":{const t=c.indexOf(o.currentTarget)+1;e=c[t]??c[0];break}case"ArrowLeft":{const t=c.indexOf(o.currentTarget)-1;e=c[t]??c[c.length-1];break}}e?.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":e},o),children:r.map(({value:o,label:e,attributes:n})=>(0,g.jsx)("li",{role:"tab",tabIndex:t===o?0:-1,"aria-selected":t===o,ref:o=>{c.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 w({lazy:o,children:e,selectedValue:t}){const l=(Array.isArray(e)?e:[e]).filter(Boolean);if(o){const o=l.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,g.jsx)("div",{className:"margin-top--md",children:l.map((o,e)=>(0,n.cloneElement)(o,{key:e,hidden:o.props.value!==t}))})}function C(o){const e=f(o);return(0,g.jsxs)("div",{className:(0,s.A)("tabs-container",F.tabList),children:[(0,g.jsx)(m,{...e,...o}),(0,g.jsx)(w,{...e,...o})]})}function x(o){const e=(0,D.A)();return(0,g.jsx)(C,{...o,children:d(o.children)},String(e))}},19365:(o,e,t)=>{t.d(e,{A:()=>r});t(96540);var n=t(18215);const s={tabItem:"tabItem_Ymn6"};var l=t(74848);function r({children:o,hidden:e,className:t}){return(0,l.jsx)("div",{role:"tabpanel",className:(0,n.A)(s.tabItem,t),hidden:e,children:o})}},28453:(o,e,t)=>{t.d(e,{R:()=>r,x:()=>c});var n=t(96540);const s={},l=n.createContext(s);function r(o){const e=n.useContext(l);return n.useMemo(function(){return"function"==typeof o?o(e):{...e,...o}},[e,o])}function c(o){let e;return e=o.disableParentContext?"function"==typeof o.components?o.components(s):o.components||s:r(o.components),n.createElement(l.Provider,{value:e},o.children)}},42373:(o,e,t)=>{t.r(e),t.d(e,{CH:()=>h,assets:()=>d,chCodeConfig:()=>y,contentTitle:()=>i,default:()=>D,frontMatter:()=>a,metadata:()=>n,toc:()=>u});const n=JSON.parse('{"id":"Concepts/concepts-publish","title":"Trigger flows with the Langflow API","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.","source":"@site/docs/Concepts/concepts-publish.mdx","sourceDirName":"Concepts","slug":"/concepts-publish","permalink":"/concepts-publish","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Trigger flows with the Langflow API","slug":"/concepts-publish"},"sidebar":"docs","previous":{"title":"Build flows","permalink":"/concepts-flows"},"next":{"title":"Trigger flows with webhooks","permalink":"/webhook"}}');var s=t(74848),l=t(28453),r=t(24754),c=t(11470),p=t(19365);const a={title:"Trigger flows with the Langflow API",slug:"/concepts-publish"},i=void 0,d={},h={annotations:r.hk,Code:r.Cy},y={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},u=[{value:"Use the Langflow API to run flows",id:"api-access",level:2},{value:"Generate API code snippets",id:"generate-api-code-snippets",level:3},{value:"Langflow API authentication",id:"langflow-api-authentication",level:3},{value:"Input Schema (tweaks)",id:"input-schema",level:3},{value:"Use a flow ID alias",id:"use-a-flow-id-alias",level:3},{value:"Embed a flow into a website",id:"embedded-chat-widget",level:2},{value:"Get a langflow-chat snippet",id:"get-a-langflow-chat-snippet",level:3},{value:"Embed the chat widget with React, Angular, or HTML",id:"embed-the-chat-widget",level:3},{value:"Configure the langflow-chat web component",id:"configure-the-langflow-chat-web-component",level:3},{value:"Serve flows through a Langflow MCP server",id:"serve-flows-through-a-langflow-mcp-server",level:2},{value:"See also",id:"see-also",level:2}];function f(o){const e={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,l.R)(),...o.components},{Details:n}=e;return h||F("CH",!1),h.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.jsx)(e.p,{children:"After you build a flow, you probably want to run it within an application, such as a chatbot within a mobile app or website."}),"\n",(0,s.jsx)(e.p,{children:"Langflow provides several ways to run flows from external applications:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.a,{href:"#api-access",children:"Trigger flows with the Langflow API"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.a,{href:"#embedded-chat-widget",children:"Add an embedded chat widget to a website"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.a,{href:"#serve-flows-through-a-langflow-mcp-server",children:"Serve flows through a Langflow MCP server"})}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:["Although you can use these options with an isolated, local Langflow instance, they are typically more valuable when you have ",(0,s.jsx)(e.a,{href:"/deployment-overview",children:"deployed a Langflow server"})," or ",(0,s.jsx)(e.a,{href:"/develop-application",children:"packaged Langflow as a dependency of an application"}),"."]}),"\n",(0,s.jsx)(e.h2,{id:"api-access",children:"Use the Langflow API to run flows"}),"\n",(0,s.jsx)(e.p,{children:"The Langflow API is the primary way to access your flows and Langflow servers programmatically."}),"\n",(0,s.jsx)(e.admonition,{title:"Try it",type:"tip",children:(0,s.jsxs)(e.p,{children:["For an example of a script that calls the Langflow API, see the ",(0,s.jsx)(e.a,{href:"/get-started-quickstart",children:"Quickstart"}),"."]})}),"\n",(0,s.jsx)(e.h3,{id:"generate-api-code-snippets",children:"Generate API code snippets"}),"\n",(0,s.jsx)(e.p,{children:"To help you embed Langflow API requests in your scripts, Langflow automatically generates Python, JavaScript, and curl code snippets for your flows.\nTo get these code snippets, do the following:"}),"\n",(0,s.jsxs)(e.ol,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsx)(e.p,{children:"In Langflow, open the flow that you want to embed in your application."}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["Click ",(0,s.jsx)(e.strong,{children:"Share"}),", and then select ",(0,s.jsx)(e.strong,{children:"API access"}),"."]}),"\n",(0,s.jsxs)(e.p,{children:["These code snippets call the ",(0,s.jsx)(e.code,{children:"/v1/run/$FLOW_ID"})," endpoint, and they automatically populate minimum values, like the Langflow server URL, flow ID, headers, and request parameters."]}),"\n",(0,s.jsx)(e.admonition,{title:"Windows",type:"tip",children:(0,s.jsx)(e.p,{children:"The paths generated by the API access pane assume a *nix environment.\nIf you use Microsoft Windows or WSL, you might need to adjust the filepaths given in the code snippets."})}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{alt:"API access pane",src:t(4558).A+"",width:"4000",height:"2212"})}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["Optional: Click ",(0,s.jsx)(e.a,{href:"#input-schema",children:(0,s.jsx)(e.strong,{children:"Input Schema"})})," to modify component parameters in the code snippets without changing the flow itself."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsx)(e.p,{children:"Copy the snippet for the language that you want to use."}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsx)(e.p,{children:"Run the snippet as is, or use the snippet in the context of a larger script."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:["For more information and examples of other Langflow API endpoints, see ",(0,s.jsx)(e.a,{href:"/api-reference-api-examples",children:"Get started with the Langflow API"}),"."]}),"\n",(0,s.jsx)(e.h3,{id:"langflow-api-authentication",children:"Langflow API authentication"}),"\n",(0,s.jsx)(e.p,{children:"In Langflow versions 1.5 and later, most API endpoints require authentication with a Langflow API key."}),"\n",(0,s.jsxs)(e.p,{children:["Code snippets generated in the ",(0,s.jsx)(e.strong,{children:"API access"})," pane include a script that checks for a ",(0,s.jsx)(e.code,{children:"LANGFLOW_API_KEY"})," environment variable set in the local terminal session.\nThis script doesn't check for Langflow API keys set anywhere besides the local terminal session."]}),"\n",(0,s.jsxs)(e.p,{children:["For this script to work, you must set a ",(0,s.jsx)(e.code,{children:"LANGFLOW_API_KEY"})," variable in the terminal session where you intend to run the code snippet, such as ",(0,s.jsx)(e.code,{children:'export LANGFLOW_API_KEY="sk..."'}),"."]}),"\n",(0,s.jsxs)(e.p,{children:["Alternatively, you can edit the code snippet to include an ",(0,s.jsx)(e.code,{children:"x-api-key"})," header and ensure that the request can authenticate to the Langflow API."]}),"\n",(0,s.jsxs)(e.p,{children:["For more information, see ",(0,s.jsx)(e.a,{href:"/api-keys-and-authentication",children:"API keys and authentication"})," and ",(0,s.jsx)(e.a,{href:"/api-reference-api-examples",children:"Get started with the Langflow API"}),"."]}),"\n",(0,s.jsx)(e.h3,{id:"input-schema",children:"Input Schema (tweaks)"}),"\n",(0,s.jsxs)(e.p,{children:["Tweaks are one-time overrides that modify component parameters at runtime, rather than permanently modifying the flow itself.\nFor an example of tweaks in a script, see the ",(0,s.jsx)(e.a,{href:"/get-started-quickstart",children:"Quickstart"}),"."]}),"\n",(0,s.jsxs)(e.admonition,{type:"tip",children:[(0,s.jsx)(e.p,{children:"Tweaks make your flows more dynamic and reusable."}),(0,s.jsx)(e.p,{children:"You can create one flow and use it for multiple applications by passing application-specific tweaks in each application's Langflow API requests."})]}),"\n",(0,s.jsxs)(e.p,{children:["In the ",(0,s.jsx)(e.strong,{children:"API access"})," pane, click ",(0,s.jsx)(e.strong,{children:"Input Schema"})," to add ",(0,s.jsx)(e.code,{children:"tweaks"})," to the request payload in a flow's code snippets."]}),"\n",(0,s.jsxs)(e.p,{children:["Changes to a flow's ",(0,s.jsx)(e.strong,{children:"Input Schema"})," are saved exclusively as tweaks for that flow's ",(0,s.jsx)(e.strong,{children:"API access"})," code snippets.\nThese tweaks don't change the flow parameters set in the ",(0,s.jsx)(e.a,{href:"/concepts-overview#workspace",children:"workspace"}),", and they don't apply to other flows."]}),"\n",(0,s.jsxs)(e.p,{children:["Adding tweaks through the ",(0,s.jsx)(e.strong,{children:"Input Schema"})," can help you troubleshoot formatting issues with tweaks that you manually added to Langflow API requests."]}),"\n",(0,s.jsxs)(e.p,{children:["For example, the following curl command includes a tweak that disables the ",(0,s.jsx)(e.strong,{children:"Store Messages"})," setting in a flow's ",(0,s.jsx)(e.strong,{children:"Chat Input"})," component:"]}),"\n",(0,s.jsx)(h.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"--request ",props:{style:{color:"#79C0FF"}}},{content:"POST ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --url ",props:{style:{color:"#79C0FF"}}},{content:'"http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --header ",props:{style:{color:"#79C0FF"}}},{content:'"Content-Type: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --header ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: LANGFLOW_API_KEY" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --data ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_value": "Text to input to the flow",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "output_type": "chat",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_type": "chat",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "tweaks": {',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "ChatInput-4WKag": {',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "should_store_message": false',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsx)(e.h3,{id:"use-a-flow-id-alias",children:"Use a flow ID alias"}),"\n",(0,s.jsxs)(e.p,{children:["If you want your requests to use an alias instead of the actual flow ID, you can rename the flow's ",(0,s.jsx)(e.code,{children:"/v1/run/$FLOW_ID"})," endpoint:"]}),"\n",(0,s.jsxs)(e.ol,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["In Langflow, open the flow, click ",(0,s.jsx)(e.strong,{children:"Share"}),", and then select ",(0,s.jsx)(e.strong,{children:"API access"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["Click ",(0,s.jsx)(e.strong,{children:"Input Schema"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["In the ",(0,s.jsx)(e.strong,{children:"Endpoint Name"})," field, enter an alias for your flow's ID, such as a memorable, human-readable name."]}),"\n",(0,s.jsxs)(e.p,{children:["The name can contain only letters, numbers, hyphens, and underscores, such as ",(0,s.jsx)(e.code,{children:"flow-customer-database-agent"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["To save the change, close the ",(0,s.jsx)(e.strong,{children:"Input Schema"})," pane."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:["The automatically generated code snippets now use your new endpoint name instead of the original flow ID, such as ",(0,s.jsx)(e.code,{children:'url = "http://localhost:7868/api/v1/run/flow-customer-database-agent"'}),"."]}),"\n",(0,s.jsx)(e.h2,{id:"embedded-chat-widget",children:"Embed a flow into a website"}),"\n",(0,s.jsxs)(e.p,{children:["For each flow, Langflow provides a code snippet that you can insert into the ",(0,s.jsx)(e.code,{children:""})," of your website's HTML to interact with your flow through an embedded chat widget."]}),"\n",(0,s.jsxs)(e.admonition,{title:"Required components",type:"important",children:[(0,s.jsxs)(e.p,{children:["The chat widget only supports flows that have ",(0,s.jsx)(e.strong,{children:"Chat Input"})," and ",(0,s.jsx)(e.strong,{children:"Chat Output"})," components, which are required for the chat experience.\n",(0,s.jsx)(e.strong,{children:"Text Input"})," and ",(0,s.jsx)(e.strong,{children:"Text Output"})," components can send and receive messages, but they don't include ongoing LLM chat context."]}),(0,s.jsxs)(e.p,{children:["Attempting to chat with a flow that doesn't have ",(0,s.jsxs)(e.a,{href:"/components-io",children:[(0,s.jsx)(e.strong,{children:"Chat Input"})," component"]})," will trigger the flow, but the response only indicates that the input was empty."]})]}),"\n",(0,s.jsx)(e.h3,{id:"get-a-langflow-chat-snippet",children:"Get a langflow-chat snippet"}),"\n",(0,s.jsx)(e.p,{children:"To get a flow's embedded chat widget code snippet, do the following:"}),"\n",(0,s.jsxs)(e.ol,{children:["\n",(0,s.jsx)(e.li,{children:"In Langflow, open the flow you want to embed."}),"\n",(0,s.jsxs)(e.li,{children:["Click ",(0,s.jsx)(e.strong,{children:"Share"}),", and then select ",(0,s.jsx)(e.strong,{children:"Embed into site"}),"."]}),"\n",(0,s.jsxs)(e.li,{children:["Copy the code snippet and use it in the ",(0,s.jsx)(e.code,{children:""})," of your website's HTML.\nFor more information, see ",(0,s.jsx)(e.a,{href:"#embed-the-chat-widget",children:"Embed the chat widget with React, Angular, or HTML"}),"."]}),"\n",(0,s.jsxs)(e.li,{children:["Add the ",(0,s.jsx)(e.code,{children:"api_key"})," prop to ensure the widget has permission to run the flow, as explained in ",(0,s.jsx)(e.a,{href:"#configure-the-langflow-chat-web-component",children:"Configure the langflow-chat web component"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:["The chat widget is implemented as a web component called ",(0,s.jsx)(e.code,{children:"langflow-chat"})," that is loaded from a CDN. For more information, see the ",(0,s.jsx)(e.a,{href:"https://github.com/langflow-ai/langflow-embedded-chat",children:"langflow-embedded-chat repository"}),"."]}),"\n",(0,s.jsxs)(e.p,{children:["For example, the following HTML embeds a chat widget for a ",(0,s.jsx)(e.strong,{children:"Basic Prompting"})," template flow hosted on a Langflow server deployed on ngrok:"]}),"\n",(0,s.jsx)(h.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"<",props:{style:{color:"#C9D1D9"}}},{content:"html",props:{style:{color:"#7EE787"}}},{content:">",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" <",props:{style:{color:"#C9D1D9"}}},{content:"head",props:{style:{color:"#7EE787"}}},{content:">",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" <",props:{style:{color:"#C9D1D9"}}},{content:"script ",props:{style:{color:"#7EE787"}}},{content:"src",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"https://cdn.jsdelivr.net/gh/langflow-ai/langflow-embedded-chat@main/dist/build/static/js/bundle.min.js"',props:{style:{color:"#A5D6FF"}}},{content:">",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" <",props:{style:{color:"#C9D1D9"}}},{content:"body",props:{style:{color:"#7EE787"}}},{content:">",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" <",props:{style:{color:"#C9D1D9"}}},{content:"langflow-chat",props:{style:{color:"#7EE787"}}}]},{tokens:[{content:" host_url",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"https://c822-73-64-93-151.ngrok-free.app"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" flow_id",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"dcbed533-859f-4b99-b1f5-16fce884f28f"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" api_key",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"$LANGFLOW_API_KEY"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" >",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]}],lang:"html"},annotations:[]}]}),"\n",(0,s.jsx)(e.p,{children:"When this code is deployed to a live site, it renders as a responsive chatbot.\nIf a user interacts with the chatbot, the input triggers the specified flow, and then the chatbot returns the output from the flow run."}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{alt:"Default chat widget",src:t(43806).A+"",width:"1852",height:"2668"})}),"\n",(0,s.jsx)(e.admonition,{title:"Try it",type:"tip",children:(0,s.jsxs)(e.p,{children:["Use the ",(0,s.jsx)(e.a,{href:"https://codesandbox.io/p/sandbox/langflow-embedded-chat-example-dv9zpx",children:"Langflow embedded chat CodeSandbox"})," for an interactive live demo of the embedded chat widget that uses your own flow.\nFor more information, see the ",(0,s.jsx)(e.a,{href:"https://github.com/langflow-ai/langflow-embedded-chat?tab=readme-ov-file#live-example",children:"langflow-embedded-chat README"}),"."]})}),"\n",(0,s.jsx)(e.h3,{id:"embed-the-chat-widget",children:"Embed the chat widget with React, Angular, or HTML"}),"\n",(0,s.jsx)(e.p,{children:"The following examples show how to use embedded chat widget in React, Angular, and plain HTML."}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsxs)(p.A,{value:"react",label:"React",default:!0,children:[(0,s.jsx)(e.p,{children:"To use the chat widget in your React application, create a component that loads the widget script and renders the chat interface:"}),(0,s.jsxs)(e.ol,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsx)(e.p,{children:"Declare your web component, and then encapsulate it in a React component:"}),"\n",(0,s.jsx)(h.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"//Declaration of langflow-chat web component",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"declare",props:{style:{color:"#FF7B72"}}},{content:" global {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"namespace ",props:{style:{color:"#FF7B72"}}},{content:"JSX",props:{style:{color:"#FFA657"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" interface ",props:{style:{color:"#FF7B72"}}},{content:"IntrinsicElements",props:{style:{color:"#FFA657"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "langflow-chat"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#FF7B72"}}},{content:"any",props:{style:{color:"#79C0FF"}}},{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:"//Definition for langflow-chat React component",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"export default function ",props:{style:{color:"#FF7B72"}}},{content:"ChatWidget",props:{style:{color:"#D2A8FF"}}},{content:"({ className }) ",props:{style:{color:"#FFA657"}}},{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"return",props:{style:{color:"#FF7B72"}}},{content:" (",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" <",props:{style:{color:"#C9D1D9"}}},{content:"div ",props:{style:{color:"#7EE787"}}},{content:"className",props:{style:{color:"#79C0FF"}}},{content:"={",props:{style:{color:"#FF7B72"}}},{content:"className",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#FF7B72"}}},{content:">",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" <",props:{style:{color:"#C9D1D9"}}},{content:"langflow-chat",props:{style:{color:"#7EE787"}}}]},{tokens:[{content:" host_url",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"https://c822-73-64-93-151.ngrok-free.app"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" flow_id",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"dcbed533-859f-4b99-b1f5-16fce884f28f"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" api_key",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"$LANGFLOW_API_KEY"',props:{style:{color:"#A5D6FF"}}}]},{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:"javascript"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsx)(e.p,{children:"Place the component anywhere in your code to render the chat widget."}),"\n",(0,s.jsxs)(e.p,{children:["In the following example, the React widget component is located at ",(0,s.jsx)(e.code,{children:"docs/src/components/ChatWidget/index.tsx"}),", and ",(0,s.jsx)(e.code,{children:"index.tsx"})," includes a script to load the chat widget code from CDN, along with the declaration and definition from the previous step:"]}),"\n",(0,s.jsx)(h.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" React, { useEffect } ",props:{style:{color:"#C9D1D9"}}},{content:"from ",props:{style:{color:"#FF7B72"}}},{content:"'react'",props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"// Component to load the chat widget script",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"const ",props:{style:{color:"#FF7B72"}}},{content:"ChatScriptLoader ",props:{style:{color:"#D2A8FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" () ",props:{style:{color:"#C9D1D9"}}},{content:"=>",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"useEffect",props:{style:{color:"#D2A8FF"}}},{content:"(() ",props:{style:{color:"#C9D1D9"}}},{content:"=>",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" if",props:{style:{color:"#FF7B72"}}},{content:" (",props:{style:{color:"#C9D1D9"}}},{content:"!",props:{style:{color:"#FF7B72"}}},{content:"document.",props:{style:{color:"#C9D1D9"}}},{content:"querySelector",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'script[src*=\"langflow-embedded-chat\"]'",props:{style:{color:"#A5D6FF"}}},{content:")) {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" const ",props:{style:{color:"#FF7B72"}}},{content:"script ",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" document.",props:{style:{color:"#C9D1D9"}}},{content:"createElement",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'script'",props:{style:{color:"#A5D6FF"}}},{content:");",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" script.src ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"'https://cdn.jsdelivr.net/gh/langflow-ai/langflow-embedded-chat@main/dist/build/static/js/bundle.min.js'",props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" script.async ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" document.body.",props:{style:{color:"#C9D1D9"}}},{content:"appendChild",props:{style:{color:"#D2A8FF"}}},{content:"(script);",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}, []);",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"return ",props:{style:{color:"#FF7B72"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"};",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"//Declaration of langflow-chat web component",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"declare",props:{style:{color:"#FF7B72"}}},{content:" global {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"namespace ",props:{style:{color:"#FF7B72"}}},{content:"JSX",props:{style:{color:"#FFA657"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" interface ",props:{style:{color:"#FF7B72"}}},{content:"IntrinsicElements",props:{style:{color:"#FFA657"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "langflow-chat"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#FF7B72"}}},{content:"any",props:{style:{color:"#79C0FF"}}},{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:"//Definition for langflow-chat React component",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"export default function ",props:{style:{color:"#FF7B72"}}},{content:"ChatWidget",props:{style:{color:"#D2A8FF"}}},{content:"({ className }) ",props:{style:{color:"#FFA657"}}},{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"return",props:{style:{color:"#FF7B72"}}},{content:" (",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" <",props:{style:{color:"#C9D1D9"}}},{content:"div ",props:{style:{color:"#7EE787"}}},{content:"className",props:{style:{color:"#79C0FF"}}},{content:"={",props:{style:{color:"#FF7B72"}}},{content:"className",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#FF7B72"}}},{content:">",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" <",props:{style:{color:"#C9D1D9"}}},{content:"ChatScriptLoader",props:{style:{color:"#7EE787"}}},{content:" />",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" <",props:{style:{color:"#C9D1D9"}}},{content:"langflow-chat",props:{style:{color:"#7EE787"}}}]},{tokens:[{content:" host_url",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"https://c822-73-64-93-151.ngrok-free.app"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" flow_id",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"dcbed533-859f-4b99-b1f5-16fce884f28f"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" api_key",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"$LANGFLOW_API_KEY"',props:{style:{color:"#A5D6FF"}}}]},{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:"javascript"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["Import the ",(0,s.jsx)(e.code,{children:"langflow-chat"})," React component to make it available for use on a page.\nModify the following import statement with your React component's name and path:"]}),"\n",(0,s.jsx)(h.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" ChatWidget ",props:{style:{color:"#C9D1D9"}}},{content:"from ",props:{style:{color:"#FF7B72"}}},{content:"'@site/src/components/ChatWidget'",props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]}],lang:"jsx"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["To display the widget, call your ",(0,s.jsx)(e.code,{children:"langflow-chat"})," component in the desired location on the page.\nModify the following reference for your React component's name and the desired ",(0,s.jsx)(e.code,{children:"className"}),":"]}),"\n",(0,s.jsx)(h.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:'',props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n"]})]}),(0,s.jsxs)(p.A,{value:"angular",label:"Angular",children:[(0,s.jsx)(e.p,{children:"To use the chat widget in your Angular application, create a component that loads the widget script and renders the chat interface."}),(0,s.jsxs)(e.p,{children:["In an Angular application, ",(0,s.jsx)(e.code,{children:"langflow-chat"})," is a custom web component that you must explicitly allow in your site's ",(0,s.jsx)(e.code,{children:".components.ts"}),".\nTherefore, to use the embedded chat widget, you must add ",(0,s.jsx)(e.code,{children:"CUSTOM_ELEMENTS_SCHEMA"})," to your module's configuration, and then integrate the ",(0,s.jsx)(e.code,{children:""})," element."]}),(0,s.jsxs)(e.p,{children:["Angular requires you to explicitly allow custom web components, like ",(0,s.jsx)(e.code,{children:"langflow-chat"}),", in your site's ",(0,s.jsx)(e.code,{children:"components"}),".\nTherefore, you must add the ",(0,s.jsx)(e.code,{children:""})," element to your Angular template and configure Angular to recognize it.\nYou must add ",(0,s.jsx)(e.code,{children:"CUSTOM_ELEMENTS_SCHEMA"})," to your module's configuration to enable this."]}),(0,s.jsxs)(e.ol,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["In your Angular application, edit the ",(0,s.jsx)(e.code,{children:".module.ts"})," file where you want to add the ",(0,s.jsx)(e.code,{children:"langflow-chat"})," web component."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["At the top of ",(0,s.jsx)(e.code,{children:".module.ts"}),", import ",(0,s.jsx)(e.code,{children:"CUSTOM_ELEMENTS_SCHEMA"}),":"]}),"\n",(0,s.jsx)(h.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';",props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["In the ",(0,s.jsx)(e.code,{children:"@NgModule"})," decorator, add ",(0,s.jsx)(e.code,{children:"CUSTOM_ELEMENTS_SCHEMA"})," to the ",(0,s.jsx)(e.code,{children:"schemas"})," array:"]}),"\n",(0,s.jsx)(h.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" { NgModule, CUSTOM_ELEMENTS_SCHEMA } ",props:{style:{color:"#C9D1D9"}}},{content:"from ",props:{style:{color:"#FF7B72"}}},{content:"'@angular/core'",props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" { BrowserModule } ",props:{style:{color:"#C9D1D9"}}},{content:"from ",props:{style:{color:"#FF7B72"}}},{content:"'@angular/platform-browser'",props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" { AppComponent } ",props:{style:{color:"#C9D1D9"}}},{content:"from ",props:{style:{color:"#FF7B72"}}},{content:"'./app.component'",props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"@",props:{style:{color:"#C9D1D9"}}},{content:"NgModule",props:{style:{color:"#D2A8FF"}}},{content:"({",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"declarations: [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" AppComponent",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"imports: [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" BrowserModule",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"schemas: [",props:{style:{color:"#C9D1D9"}}},{content:"CUSTOM_ELEMENTS_SCHEMA",props:{style:{color:"#79C0FF"}}},{content:"],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"providers: [],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"bootstrap: [AppComponent]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"})",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"export class ",props:{style:{color:"#FF7B72"}}},{content:"AppModule",props:{style:{color:"#FFA657"}}},{content:" { }",props:{style:{color:"#C9D1D9"}}}]}],lang:"javascript"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["Edit the ",(0,s.jsx)(e.code,{children:".component.ts"})," file where you want to use the embedded chat widget."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["In the ",(0,s.jsx)(e.code,{children:"@Component"})," decorator, add the ",(0,s.jsx)(e.code,{children:""})," element to the ",(0,s.jsx)(e.code,{children:"template"})," key:"]}),"\n",(0,s.jsx)(h.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" { Component } ",props:{style:{color:"#C9D1D9"}}},{content:"from ",props:{style:{color:"#FF7B72"}}},{content:"'@angular/core'",props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"@",props:{style:{color:"#C9D1D9"}}},{content:"Component",props:{style:{color:"#D2A8FF"}}},{content:"({",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"selector: ",props:{style:{color:"#C9D1D9"}}},{content:"'app-root'",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"template: ",props:{style:{color:"#C9D1D9"}}},{content:"`",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:'
',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"

Langflow Chat Test

",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"
",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"`",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"styles: [",props:{style:{color:"#C9D1D9"}}},{content:"`",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" .container {",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" padding: 20px;",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" text-align: center;",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"`",props:{style:{color:"#A5D6FF"}}},{content:"]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"})",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"export class ",props:{style:{color:"#FF7B72"}}},{content:"AppComponent",props:{style:{color:"#FFA657"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"title ",props:{style:{color:"#FFA657"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"'Langflow Chat Test'",props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"javascript"},annotations:[]}]}),"\n"]}),"\n"]})]}),(0,s.jsx)(p.A,{value:"html",label:"HTML",children:(0,s.jsx)(h.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"<",props:{style:{color:"#C9D1D9"}}},{content:"html ",props:{style:{color:"#7EE787"}}},{content:"lang",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"en"',props:{style:{color:"#A5D6FF"}}},{content:">",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"<",props:{style:{color:"#C9D1D9"}}},{content:"head",props:{style:{color:"#7EE787"}}},{content:">",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"<",props:{style:{color:"#C9D1D9"}}},{content:"script ",props:{style:{color:"#7EE787"}}},{content:"src",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"https://cdn.jsdelivr.net/gh/langflow-ai/langflow-embedded-chat@v1.0.7/dist/build/static/js/bundle.min.js"',props:{style:{color:"#A5D6FF"}}},{content:">",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"<",props:{style:{color:"#C9D1D9"}}},{content:"body",props:{style:{color:"#7EE787"}}},{content:">",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"<",props:{style:{color:"#C9D1D9"}}},{content:"langflow-chat",props:{style:{color:"#7EE787"}}}]},{tokens:[{content:" host_url",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"https://c822-73-64-93-151.ngrok-free.app"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" flow_id",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"dcbed533-859f-4b99-b1f5-16fce884f28f"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" api_key",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"$LANGFLOW_API_KEY"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" >",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]}],lang:"html"},annotations:[]}]})})]}),"\n",(0,s.jsx)(e.h3,{id:"configure-the-langflow-chat-web-component",children:"Configure the langflow-chat web component"}),"\n",(0,s.jsxs)(e.p,{children:["To use the embedded chat widget in your HTML, the ",(0,s.jsx)(e.code,{children:"langflow-chat"})," web component must include the following minimum inputs (also known as ",(0,s.jsx)(e.em,{children:"props"})," in React):"]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"host_url"}),": Your Langflow server URL. Must be ",(0,s.jsx)(e.code,{children:"HTTPS"}),". Don't include a trailing slash (",(0,s.jsx)(e.code,{children:"/"}),")."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"flow_id"}),": The ID of the flow you want to embed."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"api_key"}),": A ",(0,s.jsx)(e.a,{href:"/api-keys-and-authentication",children:"Langflow API key"}),".\nThis prop is recommended to ensure the widget has permission to run the flow."]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:["The minimum inputs are automatically populated in the ",(0,s.jsxs)(e.a,{href:"#get-a-langflow-chat-snippet",children:[(0,s.jsx)(e.strong,{children:"Embed into site"})," code snippet"]})," that is generated by Langflow."]}),"\n",(0,s.jsxs)(e.p,{children:["You can use additional inputs (props) to modify the embedded chat widget.\nFor a list of all props, types, and descriptions, see the ",(0,s.jsx)(e.a,{href:"https://github.com/langflow-ai/langflow-embedded-chat?tab=readme-ov-file#configuration",children:"langflow-embedded-chat README"}),"."]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Example: Langflow API key prop"}),(0,s.jsxs)(e.p,{children:["The ",(0,s.jsx)(e.code,{children:"api_key"})," prop stores a Langflow API key that the chat widget can use to authenticate the underlying Langflow API request."]}),(0,s.jsx)(e.p,{children:"The Langflow team recommends following industry best practices for handling sensitive credentials.\nFor example, securely store your API key, and then retrieve with an environment variable:"}),(0,s.jsx)(h.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"<",props:{style:{color:"#C9D1D9"}}},{content:"langflow-chat",props:{style:{color:"#7EE787"}}}]},{tokens:[{content:" host_url",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"https://c822-73-64-93-151.ngrok-free.app"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" flow_id",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"dcbed533-859f-4b99-b1f5-16fce884f28f"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" api_key",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"$LANGFLOW_API_KEY"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:">",props:{style:{color:"#C9D1D9"}}}]}],lang:"html"},annotations:[]}]})]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Example: Style props"}),(0,s.jsxs)(e.p,{children:["There are many props you can use to customize the style and positioning of the embedded chat widget.\nMany of these props are of type JSON, and they require specific formatting, depending on where you embed the ",(0,s.jsx)(e.code,{children:"langflow-chat"})," web component."]}),(0,s.jsxs)(e.p,{children:["In React and plain HTML, JSON props are expressed as JSON objects or stringified JSON, such as ",(0,s.jsx)(e.code,{children:'\\{"key":"value"\\}'}),":"]}),(0,s.jsx)(h.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"<",props:{style:{color:"#C9D1D9"}}},{content:"langflow-chat",props:{style:{color:"#7EE787"}}}]},{tokens:[{content:" host_url",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"https://c822-73-64-93-151.ngrok-free.app"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" flow_id",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"dcbed533-859f-4b99-b1f5-16fce884f28f"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" api_key",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"$LANGFLOW_API_KEY"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" chat_window_style",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "backgroundColor": "#1a0d0d",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "border": "4px solid #b30000",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "borderRadius": "16px",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "boxShadow": "0 8px 32px #b30000",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "color": "#fff",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "fontFamily": "Georgia, serif",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "padding": "16px"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }'",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" window_title",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"Custom Styled Chat"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" height",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"600"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" width",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"400"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:">",props:{style:{color:"#C9D1D9"}}}]}],lang:"html"},annotations:[]}]}),(0,s.jsxs)(e.p,{children:["For Angular applications, use ",(0,s.jsx)(e.a,{href:"https://angular.dev/guide/templates/binding#binding-dynamic-properties-and-attributes",children:"property binding syntax"})," to pass JSON props as JavaScript objects.\nFor example:"]}),(0,s.jsx)(h.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" { Component } ",props:{style:{color:"#C9D1D9"}}},{content:"from ",props:{style:{color:"#FF7B72"}}},{content:"'@angular/core'",props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"@",props:{style:{color:"#C9D1D9"}}},{content:"Component",props:{style:{color:"#D2A8FF"}}},{content:"({",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" selector: ",props:{style:{color:"#C9D1D9"}}},{content:"'app-root'",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" template: ",props:{style:{color:"#C9D1D9"}}},{content:"`",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:'
',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"

Langflow Chat Test

",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"
",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" `",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" styles: [",props:{style:{color:"#C9D1D9"}}},{content:"`",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" .container {",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" padding: 20px;",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" text-align: center;",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" `",props:{style:{color:"#A5D6FF"}}},{content:"]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"})",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"export class ",props:{style:{color:"#FF7B72"}}},{content:"AppComponent",props:{style:{color:"#FFA657"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" title ",props:{style:{color:"#FFA657"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"'Langflow Chat Test'",props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"javascript"},annotations:[]}]})]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Example: Session ID prop"}),(0,s.jsxs)(e.p,{children:["The following example adds a custom ",(0,s.jsx)(e.a,{href:"/session-id",children:"session ID"})," to help identify flow runs started by the embeded chat widget:"]}),(0,s.jsx)(h.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"<",props:{style:{color:"#C9D1D9"}}},{content:"langflow-chat",props:{style:{color:"#7EE787"}}}]},{tokens:[{content:" host_url",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"https://c822-73-64-93-151.ngrok-free.app"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" flow_id",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"dcbed533-859f-4b99-b1f5-16fce884f28f"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" api_key",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"$LANGFLOW_API_KEY"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" session_id",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"$SESSION_ID"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:">",props:{style:{color:"#C9D1D9"}}}]}],lang:"html"},annotations:[]}]})]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Example: Tweaks prop"}),(0,s.jsxs)(e.p,{children:["Use the ",(0,s.jsx)(e.code,{children:"tweaks"})," prop to modify flow parameters at runtime.\nThe available keys for the ",(0,s.jsx)(e.code,{children:"tweaks"})," object depend on the flow you are serving through the embedded chat widget."]}),(0,s.jsxs)(e.p,{children:["In React and plain HTML, ",(0,s.jsx)(e.code,{children:"tweaks"})," are declared as a JSON object, similar to how you would pass them to a Langflow API endpoint like ",(0,s.jsx)(e.a,{href:"/api-flows-run#run-flow",children:(0,s.jsx)(e.code,{children:"/v1/run/$FLOW_ID"})}),".\nFor example:"]}),(0,s.jsx)(h.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"<",props:{style:{color:"#C9D1D9"}}},{content:"langflow-chat",props:{style:{color:"#7EE787"}}}]},{tokens:[{content:" host_url",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"https://c822-73-64-93-151.ngrok-free.app"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" flow_id",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"dcbed533-859f-4b99-b1f5-16fce884f28f"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" api_key",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"$LANGFLOW_API_KEY"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" tweaks",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "model_name": "llama-3.1-8b-instant"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }'",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:">",props:{style:{color:"#C9D1D9"}}}]}],lang:"html"},annotations:[]}]}),(0,s.jsxs)(e.p,{children:["For Angular applications, use ",(0,s.jsx)(e.a,{href:"https://angular.dev/guide/templates/binding#binding-dynamic-properties-and-attributes",children:"property binding syntax"})," to pass JSON props as JavaScript objects.\nFor example:"]}),(0,s.jsx)(h.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" { Component } ",props:{style:{color:"#C9D1D9"}}},{content:"from ",props:{style:{color:"#FF7B72"}}},{content:"'@angular/core'",props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"@",props:{style:{color:"#C9D1D9"}}},{content:"Component",props:{style:{color:"#D2A8FF"}}},{content:"({",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" selector: ",props:{style:{color:"#C9D1D9"}}},{content:"'app-root'",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" template: ",props:{style:{color:"#C9D1D9"}}},{content:"`",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:'
',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"

Langflow Chat Test

",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"
",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" `",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" styles: [",props:{style:{color:"#C9D1D9"}}},{content:"`",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" .container {",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" padding: 20px;",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" text-align: center;",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" `",props:{style:{color:"#A5D6FF"}}},{content:"]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"})",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"export class ",props:{style:{color:"#FF7B72"}}},{content:"AppComponent",props:{style:{color:"#FFA657"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" title ",props:{style:{color:"#FFA657"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"'Langflow Chat Test'",props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"javascript"},annotations:[]}]})]}),"\n",(0,s.jsx)(e.h2,{id:"serve-flows-through-a-langflow-mcp-server",children:"Serve flows through a Langflow MCP server"}),"\n",(0,s.jsxs)(e.p,{children:["Each ",(0,s.jsx)(e.a,{href:"/concepts-flows#projects",children:"Langflow project"})," has an MCP server that exposes the project's flows as ",(0,s.jsx)(e.a,{href:"https://modelcontextprotocol.io/docs/concepts/tools",children:"tools"})," that ",(0,s.jsx)(e.a,{href:"https://modelcontextprotocol.io/clients",children:"MCP clients"})," can use to generate responses."]}),"\n",(0,s.jsx)(e.p,{children:"In addition to serving flows through Langflow MCP servers, you can use Langflow as an MCP client to access any MCP server, including Langflow MCP servers."}),"\n",(0,s.jsxs)(e.p,{children:["Interactions with Langflow MCP servers happen through the Langflow API's ",(0,s.jsx)(e.code,{children:"/mcp"})," endpoints."]}),"\n",(0,s.jsxs)(e.p,{children:["For more information, see ",(0,s.jsx)(e.a,{href:"/mcp-server",children:"Use Langflow as an MCP server"})," and ",(0,s.jsx)(e.a,{href:"/mcp-client",children:"Use Langflow as an MCP client"}),"."]}),"\n",(0,s.jsx)(e.h2,{id:"see-also",children:"See also"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.a,{href:"/concepts-flows-import",children:"Import and export flows"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.a,{href:"/api-files",children:"Files endpoints"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.a,{href:"/concepts-playground",children:"Test flows in the Playground"})}),"\n"]})]})}function D(o={}){const{wrapper:e}={...(0,l.R)(),...o.components};return e?(0,s.jsx)(e,{...o,children:(0,s.jsx)(f,{...o})}):f(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.")}},43806:(o,e,t)=>{t.d(e,{A:()=>n});const n=t.p+"assets/images/chat-widget-default-50fbdf351e2e984e4103a225be85f9a4.png"}}]); \ No newline at end of file +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[1628],{4558:(o,e,t)=>{t.d(e,{A:()=>n});const n=t.p+"assets/images/api-pane-9cb07c8f812374268f94e3f8e65c6be3.png"},11470:(o,e,t)=>{t.d(e,{A:()=>x});var n=t(96540),s=t(18215),l=t(23104),r=t(56347),c=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 y({value:o,tabValues:e}){return e.some(e=>e.value===o)}function u({queryString:o=!1,groupId:e}){const t=(0,r.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 f(o){const{defaultValue:e,queryString:t=!1,groupId:s}=o,l=h(o),[r,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(!y({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:l})),[a,d]=u({queryString:t,groupId:s}),[f,D]=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??f;return y({value:o,tabValues:l})?o:null})();(0,c.A)(()=>{F&&p(F)},[F]);return{selectedValue:r,selectValue:(0,n.useCallback)(o=>{if(!y({value:o,tabValues:l}))throw new Error(`Can't select invalid tab value=${o}`);p(o),d(o),D(o)},[d,D,l]),tabValues:l}}var D=t(92303);const F={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=t(74848);function m({className:o,block:e,selectedValue:t,selectValue:n,tabValues:r}){const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,l.a_)(),a=o=>{const e=o.currentTarget,s=c.indexOf(e),l=r[s].value;l!==t&&(p(e),n(l))},i=o=>{let e=null;switch(o.key){case"Enter":a(o);break;case"ArrowRight":{const t=c.indexOf(o.currentTarget)+1;e=c[t]??c[0];break}case"ArrowLeft":{const t=c.indexOf(o.currentTarget)-1;e=c[t]??c[c.length-1];break}}e?.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":e},o),children:r.map(({value:o,label:e,attributes:n})=>(0,g.jsx)("li",{role:"tab",tabIndex:t===o?0:-1,"aria-selected":t===o,ref:o=>{c.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 w({lazy:o,children:e,selectedValue:t}){const l=(Array.isArray(e)?e:[e]).filter(Boolean);if(o){const o=l.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,g.jsx)("div",{className:"margin-top--md",children:l.map((o,e)=>(0,n.cloneElement)(o,{key:e,hidden:o.props.value!==t}))})}function C(o){const e=f(o);return(0,g.jsxs)("div",{className:(0,s.A)("tabs-container",F.tabList),children:[(0,g.jsx)(m,{...e,...o}),(0,g.jsx)(w,{...e,...o})]})}function x(o){const e=(0,D.A)();return(0,g.jsx)(C,{...o,children:d(o.children)},String(e))}},19365:(o,e,t)=>{t.d(e,{A:()=>r});t(96540);var n=t(18215);const s={tabItem:"tabItem_Ymn6"};var l=t(74848);function r({children:o,hidden:e,className:t}){return(0,l.jsx)("div",{role:"tabpanel",className:(0,n.A)(s.tabItem,t),hidden:e,children:o})}},28453:(o,e,t)=>{t.d(e,{R:()=>r,x:()=>c});var n=t(96540);const s={},l=n.createContext(s);function r(o){const e=n.useContext(l);return n.useMemo(function(){return"function"==typeof o?o(e):{...e,...o}},[e,o])}function c(o){let e;return e=o.disableParentContext?"function"==typeof o.components?o.components(s):o.components||s:r(o.components),n.createElement(l.Provider,{value:e},o.children)}},42373:(o,e,t)=>{t.r(e),t.d(e,{CH:()=>h,assets:()=>d,chCodeConfig:()=>y,contentTitle:()=>i,default:()=>D,frontMatter:()=>a,metadata:()=>n,toc:()=>u});const n=JSON.parse('{"id":"Concepts/concepts-publish","title":"Trigger flows with the Langflow API","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.","source":"@site/docs/Concepts/concepts-publish.mdx","sourceDirName":"Concepts","slug":"/concepts-publish","permalink":"/concepts-publish","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Trigger flows with the Langflow API","slug":"/concepts-publish"},"sidebar":"docs","previous":{"title":"Build flows","permalink":"/concepts-flows"},"next":{"title":"Trigger flows with webhooks","permalink":"/webhook"}}');var s=t(74848),l=t(28453),r=t(24754),c=t(11470),p=t(19365);const a={title:"Trigger flows with the Langflow API",slug:"/concepts-publish"},i=void 0,d={},h={annotations:r.hk,Code:r.Cy},y={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},u=[{value:"Use the Langflow API to run flows",id:"api-access",level:2},{value:"Generate API code snippets",id:"generate-api-code-snippets",level:3},{value:"Langflow API authentication",id:"langflow-api-authentication",level:3},{value:"Input Schema (tweaks)",id:"input-schema",level:3},{value:"Use a flow ID alias",id:"use-a-flow-id-alias",level:3},{value:"Embed a flow into a website",id:"embedded-chat-widget",level:2},{value:"Get a langflow-chat snippet",id:"get-a-langflow-chat-snippet",level:3},{value:"Embed the chat widget with React, Angular, or HTML",id:"embed-the-chat-widget",level:3},{value:"Configure the langflow-chat web component",id:"configure-the-langflow-chat-web-component",level:3},{value:"Serve flows through a Langflow MCP server",id:"serve-flows-through-a-langflow-mcp-server",level:2},{value:"See also",id:"see-also",level:2}];function f(o){const e={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,l.R)(),...o.components},{Details:n}=e;return h||F("CH",!1),h.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.jsx)(e.p,{children:"After you build a flow, you probably want to run it within an application, such as a chatbot within a mobile app or website."}),"\n",(0,s.jsx)(e.p,{children:"Langflow provides several ways to run flows from external applications:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.a,{href:"#api-access",children:"Trigger flows with the Langflow API"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.a,{href:"#embedded-chat-widget",children:"Add an embedded chat widget to a website"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.a,{href:"#serve-flows-through-a-langflow-mcp-server",children:"Serve flows through a Langflow MCP server"})}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:["Although you can use these options with an isolated, local Langflow instance, they are typically more valuable when you have ",(0,s.jsx)(e.a,{href:"/deployment-overview",children:"deployed a Langflow server"})," or ",(0,s.jsx)(e.a,{href:"/develop-application",children:"packaged Langflow as a dependency of an application"}),"."]}),"\n",(0,s.jsx)(e.h2,{id:"api-access",children:"Use the Langflow API to run flows"}),"\n",(0,s.jsx)(e.p,{children:"The Langflow API is the primary way to access your flows and Langflow servers programmatically."}),"\n",(0,s.jsx)(e.admonition,{title:"Try it",type:"tip",children:(0,s.jsxs)(e.p,{children:["For an example of a script that calls the Langflow API, see the ",(0,s.jsx)(e.a,{href:"/get-started-quickstart",children:"Quickstart"}),"."]})}),"\n",(0,s.jsx)(e.h3,{id:"generate-api-code-snippets",children:"Generate API code snippets"}),"\n",(0,s.jsx)(e.p,{children:"To help you embed Langflow API requests in your scripts, Langflow automatically generates Python, JavaScript, and curl code snippets for your flows.\nTo get these code snippets, do the following:"}),"\n",(0,s.jsxs)(e.ol,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsx)(e.p,{children:"In Langflow, open the flow that you want to embed in your application."}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["Click ",(0,s.jsx)(e.strong,{children:"Share"}),", and then select ",(0,s.jsx)(e.strong,{children:"API access"}),"."]}),"\n",(0,s.jsxs)(e.p,{children:["These code snippets call the ",(0,s.jsx)(e.code,{children:"/v1/run/$FLOW_ID"})," endpoint, and they automatically populate minimum values, like the Langflow server URL, flow ID, headers, and request parameters."]}),"\n",(0,s.jsx)(e.admonition,{title:"Windows",type:"tip",children:(0,s.jsx)(e.p,{children:"The paths generated by the API access pane assume a *nix environment.\nIf you use Microsoft Windows or WSL, you might need to adjust the filepaths given in the code snippets."})}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{alt:"API access pane",src:t(4558).A+"",width:"4000",height:"2212"})}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["Optional: Click ",(0,s.jsx)(e.a,{href:"#input-schema",children:(0,s.jsx)(e.strong,{children:"Input Schema"})})," to modify component parameters in the code snippets without changing the flow itself."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsx)(e.p,{children:"Copy the snippet for the language that you want to use."}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsx)(e.p,{children:"Run the snippet as is, or use the snippet in the context of a larger script."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:["For more information and examples of other Langflow API endpoints, see ",(0,s.jsx)(e.a,{href:"/api-reference-api-examples",children:"Get started with the Langflow API"}),"."]}),"\n",(0,s.jsx)(e.h3,{id:"langflow-api-authentication",children:"Langflow API authentication"}),"\n",(0,s.jsx)(e.p,{children:"In Langflow versions 1.5 and later, most API endpoints require authentication with a Langflow API key."}),"\n",(0,s.jsxs)(e.p,{children:["Code snippets generated in the ",(0,s.jsx)(e.strong,{children:"API access"})," pane include a script that checks for a ",(0,s.jsx)(e.code,{children:"LANGFLOW_API_KEY"})," environment variable set in the local terminal session.\nThis script doesn't check for Langflow API keys set anywhere besides the local terminal session."]}),"\n",(0,s.jsxs)(e.p,{children:["For this script to work, you must set a ",(0,s.jsx)(e.code,{children:"LANGFLOW_API_KEY"})," variable in the terminal session where you intend to run the code snippet, such as ",(0,s.jsx)(e.code,{children:'export LANGFLOW_API_KEY="sk..."'}),"."]}),"\n",(0,s.jsxs)(e.p,{children:["Alternatively, you can edit the code snippet to include an ",(0,s.jsx)(e.code,{children:"x-api-key"})," header and ensure that the request can authenticate to the Langflow API."]}),"\n",(0,s.jsxs)(e.p,{children:["For more information, see ",(0,s.jsx)(e.a,{href:"/api-keys-and-authentication",children:"API keys and authentication"})," and ",(0,s.jsx)(e.a,{href:"/api-reference-api-examples",children:"Get started with the Langflow API"}),"."]}),"\n",(0,s.jsx)(e.h3,{id:"input-schema",children:"Input Schema (tweaks)"}),"\n",(0,s.jsxs)(e.p,{children:["Tweaks are one-time overrides that modify component parameters at runtime, rather than permanently modifying the flow itself.\nFor an example of tweaks in a script, see the ",(0,s.jsx)(e.a,{href:"/get-started-quickstart",children:"Quickstart"}),"."]}),"\n",(0,s.jsxs)(e.admonition,{type:"tip",children:[(0,s.jsx)(e.p,{children:"Tweaks make your flows more dynamic and reusable."}),(0,s.jsx)(e.p,{children:"You can create one flow and use it for multiple applications by passing application-specific tweaks in each application's Langflow API requests."})]}),"\n",(0,s.jsxs)(e.p,{children:["In the ",(0,s.jsx)(e.strong,{children:"API access"})," pane, click ",(0,s.jsx)(e.strong,{children:"Input Schema"})," to add ",(0,s.jsx)(e.code,{children:"tweaks"})," to the request payload in a flow's code snippets."]}),"\n",(0,s.jsxs)(e.p,{children:["Changes to a flow's ",(0,s.jsx)(e.strong,{children:"Input Schema"})," are saved exclusively as tweaks for that flow's ",(0,s.jsx)(e.strong,{children:"API access"})," code snippets.\nThese tweaks don't change the flow parameters set in the ",(0,s.jsx)(e.a,{href:"/concepts-overview#workspace",children:"workspace"}),", and they don't apply to other flows."]}),"\n",(0,s.jsxs)(e.p,{children:["Adding tweaks through the ",(0,s.jsx)(e.strong,{children:"Input Schema"})," can help you troubleshoot formatting issues with tweaks that you manually added to Langflow API requests."]}),"\n",(0,s.jsxs)(e.p,{children:["For example, the following curl command includes a tweak that disables the ",(0,s.jsx)(e.strong,{children:"Store Messages"})," setting in a flow's ",(0,s.jsx)(e.strong,{children:"Chat Input"})," component:"]}),"\n",(0,s.jsx)(h.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"--request ",props:{style:{color:"#79C0FF"}}},{content:"POST ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --url ",props:{style:{color:"#79C0FF"}}},{content:'"http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --header ",props:{style:{color:"#79C0FF"}}},{content:'"Content-Type: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --header ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: LANGFLOW_API_KEY" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --data ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_value": "Text to input to the flow",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "output_type": "chat",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_type": "chat",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "tweaks": {',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "ChatInput-4WKag": {',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "should_store_message": false',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsx)(e.h3,{id:"use-a-flow-id-alias",children:"Use a flow ID alias"}),"\n",(0,s.jsxs)(e.p,{children:["If you want your requests to use an alias instead of the actual flow ID, you can rename the flow's ",(0,s.jsx)(e.code,{children:"/v1/run/$FLOW_ID"})," endpoint:"]}),"\n",(0,s.jsxs)(e.ol,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["In Langflow, open the flow, click ",(0,s.jsx)(e.strong,{children:"Share"}),", and then select ",(0,s.jsx)(e.strong,{children:"API access"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["Click ",(0,s.jsx)(e.strong,{children:"Input Schema"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["In the ",(0,s.jsx)(e.strong,{children:"Endpoint Name"})," field, enter an alias for your flow's ID, such as a memorable, human-readable name."]}),"\n",(0,s.jsxs)(e.p,{children:["The name can contain only letters, numbers, hyphens, and underscores, such as ",(0,s.jsx)(e.code,{children:"flow-customer-database-agent"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["To save the change, close the ",(0,s.jsx)(e.strong,{children:"Input Schema"})," pane."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:["The automatically generated code snippets now use your new endpoint name instead of the original flow ID, such as ",(0,s.jsx)(e.code,{children:'url = "http://localhost:7868/api/v1/run/flow-customer-database-agent"'}),"."]}),"\n",(0,s.jsx)(e.h2,{id:"embedded-chat-widget",children:"Embed a flow into a website"}),"\n",(0,s.jsxs)(e.p,{children:["For each flow, Langflow provides a code snippet that you can insert into the ",(0,s.jsx)(e.code,{children:""})," of your website's HTML to interact with your flow through an embedded chat widget."]}),"\n",(0,s.jsxs)(e.admonition,{title:"Required components",type:"important",children:[(0,s.jsxs)(e.p,{children:["The chat widget only supports flows that have ",(0,s.jsx)(e.strong,{children:"Chat Input"})," and ",(0,s.jsx)(e.strong,{children:"Chat Output"})," components, which are required for the chat experience.\n",(0,s.jsx)(e.strong,{children:"Text Input"})," and ",(0,s.jsx)(e.strong,{children:"Text Output"})," components can send and receive messages, but they don't include ongoing LLM chat context."]}),(0,s.jsxs)(e.p,{children:["Attempting to chat with a flow that doesn't have ",(0,s.jsxs)(e.a,{href:"/components-io",children:[(0,s.jsx)(e.strong,{children:"Chat Input"})," component"]})," will trigger the flow, but the response only indicates that the input was empty."]})]}),"\n",(0,s.jsx)(e.h3,{id:"get-a-langflow-chat-snippet",children:"Get a langflow-chat snippet"}),"\n",(0,s.jsx)(e.p,{children:"To get a flow's embedded chat widget code snippet, do the following:"}),"\n",(0,s.jsxs)(e.ol,{children:["\n",(0,s.jsx)(e.li,{children:"In Langflow, open the flow you want to embed."}),"\n",(0,s.jsxs)(e.li,{children:["Click ",(0,s.jsx)(e.strong,{children:"Share"}),", and then select ",(0,s.jsx)(e.strong,{children:"Embed into site"}),"."]}),"\n",(0,s.jsxs)(e.li,{children:["Copy the code snippet and use it in the ",(0,s.jsx)(e.code,{children:""})," of your website's HTML.\nFor more information, see ",(0,s.jsx)(e.a,{href:"#embed-the-chat-widget",children:"Embed the chat widget with React, Angular, or HTML"}),"."]}),"\n",(0,s.jsxs)(e.li,{children:["Add the ",(0,s.jsx)(e.code,{children:"api_key"})," prop to ensure the widget has permission to run the flow, as explained in ",(0,s.jsx)(e.a,{href:"#configure-the-langflow-chat-web-component",children:"Configure the langflow-chat web component"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:["The chat widget is implemented as a web component called ",(0,s.jsx)(e.code,{children:"langflow-chat"})," that is loaded from a CDN. For more information, see the ",(0,s.jsx)(e.a,{href:"https://github.com/langflow-ai/langflow-embedded-chat",children:"langflow-embedded-chat repository"}),"."]}),"\n",(0,s.jsxs)(e.p,{children:["For example, the following HTML embeds a chat widget for a ",(0,s.jsx)(e.strong,{children:"Basic Prompting"})," template flow hosted on a Langflow server deployed on ngrok:"]}),"\n",(0,s.jsx)(h.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"<",props:{style:{color:"#C9D1D9"}}},{content:"html",props:{style:{color:"#7EE787"}}},{content:">",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" <",props:{style:{color:"#C9D1D9"}}},{content:"head",props:{style:{color:"#7EE787"}}},{content:">",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" <",props:{style:{color:"#C9D1D9"}}},{content:"script ",props:{style:{color:"#7EE787"}}},{content:"src",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"https://cdn.jsdelivr.net/gh/langflow-ai/langflow-embedded-chat@main/dist/build/static/js/bundle.min.js"',props:{style:{color:"#A5D6FF"}}},{content:">",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" <",props:{style:{color:"#C9D1D9"}}},{content:"body",props:{style:{color:"#7EE787"}}},{content:">",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" <",props:{style:{color:"#C9D1D9"}}},{content:"langflow-chat",props:{style:{color:"#7EE787"}}}]},{tokens:[{content:" host_url",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"https://c822-73-64-93-151.ngrok-free.app"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" flow_id",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"dcbed533-859f-4b99-b1f5-16fce884f28f"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" api_key",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"$LANGFLOW_API_KEY"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" >",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]}],lang:"html"},annotations:[]}]}),"\n",(0,s.jsx)(e.p,{children:"When this code is deployed to a live site, it renders as a responsive chatbot.\nIf a user interacts with the chatbot, the input triggers the specified flow, and then the chatbot returns the output from the flow run."}),"\n",(0,s.jsx)(e.p,{children:(0,s.jsx)(e.img,{alt:"Default chat widget",src:t(43806).A+"",width:"1852",height:"2668"})}),"\n",(0,s.jsx)(e.admonition,{title:"Try it",type:"tip",children:(0,s.jsxs)(e.p,{children:["Use the ",(0,s.jsx)(e.a,{href:"https://codesandbox.io/p/sandbox/langflow-embedded-chat-example-dv9zpx",children:"Langflow embedded chat CodeSandbox"})," for an interactive live demo of the embedded chat widget that uses your own flow.\nFor more information, see the ",(0,s.jsx)(e.a,{href:"https://github.com/langflow-ai/langflow-embedded-chat?tab=readme-ov-file#live-example",children:"langflow-embedded-chat README"}),"."]})}),"\n",(0,s.jsx)(e.h3,{id:"embed-the-chat-widget",children:"Embed the chat widget with React, Angular, or HTML"}),"\n",(0,s.jsx)(e.p,{children:"The following examples show how to use embedded chat widget in React, Angular, and plain HTML."}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsxs)(p.A,{value:"react",label:"React",default:!0,children:[(0,s.jsx)(e.p,{children:"To use the chat widget in your React application, create a component that loads the widget script and renders the chat interface:"}),(0,s.jsxs)(e.ol,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsx)(e.p,{children:"Declare your web component, and then encapsulate it in a React component:"}),"\n",(0,s.jsx)(h.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"//Declaration of langflow-chat web component",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"declare",props:{style:{color:"#FF7B72"}}},{content:" global {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"namespace ",props:{style:{color:"#FF7B72"}}},{content:"JSX",props:{style:{color:"#FFA657"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" interface ",props:{style:{color:"#FF7B72"}}},{content:"IntrinsicElements",props:{style:{color:"#FFA657"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "langflow-chat"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#FF7B72"}}},{content:"any",props:{style:{color:"#79C0FF"}}},{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:"//Definition for langflow-chat React component",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"export default function ",props:{style:{color:"#FF7B72"}}},{content:"ChatWidget",props:{style:{color:"#D2A8FF"}}},{content:"({ className }) ",props:{style:{color:"#FFA657"}}},{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"return",props:{style:{color:"#FF7B72"}}},{content:" (",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" <",props:{style:{color:"#C9D1D9"}}},{content:"div ",props:{style:{color:"#7EE787"}}},{content:"className",props:{style:{color:"#79C0FF"}}},{content:"={",props:{style:{color:"#FF7B72"}}},{content:"className",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#FF7B72"}}},{content:">",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" <",props:{style:{color:"#C9D1D9"}}},{content:"langflow-chat",props:{style:{color:"#7EE787"}}}]},{tokens:[{content:" host_url",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"https://c822-73-64-93-151.ngrok-free.app"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" flow_id",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"dcbed533-859f-4b99-b1f5-16fce884f28f"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" api_key",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"$LANGFLOW_API_KEY"',props:{style:{color:"#A5D6FF"}}}]},{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:"javascript"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsx)(e.p,{children:"Place the component anywhere in your code to render the chat widget."}),"\n",(0,s.jsxs)(e.p,{children:["In the following example, the React widget component is located at ",(0,s.jsx)(e.code,{children:"docs/src/components/ChatWidget/index.tsx"}),", and ",(0,s.jsx)(e.code,{children:"index.tsx"})," includes a script to load the chat widget code from CDN, along with the declaration and definition from the previous step:"]}),"\n",(0,s.jsx)(h.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" React, { useEffect } ",props:{style:{color:"#C9D1D9"}}},{content:"from ",props:{style:{color:"#FF7B72"}}},{content:"'react'",props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"// Component to load the chat widget script",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"const ",props:{style:{color:"#FF7B72"}}},{content:"ChatScriptLoader ",props:{style:{color:"#D2A8FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" () ",props:{style:{color:"#C9D1D9"}}},{content:"=>",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"useEffect",props:{style:{color:"#D2A8FF"}}},{content:"(() ",props:{style:{color:"#C9D1D9"}}},{content:"=>",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" if",props:{style:{color:"#FF7B72"}}},{content:" (",props:{style:{color:"#C9D1D9"}}},{content:"!",props:{style:{color:"#FF7B72"}}},{content:"document.",props:{style:{color:"#C9D1D9"}}},{content:"querySelector",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'script[src*=\"langflow-embedded-chat\"]'",props:{style:{color:"#A5D6FF"}}},{content:")) {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" const ",props:{style:{color:"#FF7B72"}}},{content:"script ",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" document.",props:{style:{color:"#C9D1D9"}}},{content:"createElement",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'script'",props:{style:{color:"#A5D6FF"}}},{content:");",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" script.src ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"'https://cdn.jsdelivr.net/gh/langflow-ai/langflow-embedded-chat@main/dist/build/static/js/bundle.min.js'",props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" script.async ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" document.body.",props:{style:{color:"#C9D1D9"}}},{content:"appendChild",props:{style:{color:"#D2A8FF"}}},{content:"(script);",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}, []);",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"return ",props:{style:{color:"#FF7B72"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"};",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"//Declaration of langflow-chat web component",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"declare",props:{style:{color:"#FF7B72"}}},{content:" global {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"namespace ",props:{style:{color:"#FF7B72"}}},{content:"JSX",props:{style:{color:"#FFA657"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" interface ",props:{style:{color:"#FF7B72"}}},{content:"IntrinsicElements",props:{style:{color:"#FFA657"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "langflow-chat"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#FF7B72"}}},{content:"any",props:{style:{color:"#79C0FF"}}},{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:"//Definition for langflow-chat React component",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"export default function ",props:{style:{color:"#FF7B72"}}},{content:"ChatWidget",props:{style:{color:"#D2A8FF"}}},{content:"({ className }) ",props:{style:{color:"#FFA657"}}},{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"return",props:{style:{color:"#FF7B72"}}},{content:" (",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" <",props:{style:{color:"#C9D1D9"}}},{content:"div ",props:{style:{color:"#7EE787"}}},{content:"className",props:{style:{color:"#79C0FF"}}},{content:"={",props:{style:{color:"#FF7B72"}}},{content:"className",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#FF7B72"}}},{content:">",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" <",props:{style:{color:"#C9D1D9"}}},{content:"ChatScriptLoader",props:{style:{color:"#7EE787"}}},{content:" />",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" <",props:{style:{color:"#C9D1D9"}}},{content:"langflow-chat",props:{style:{color:"#7EE787"}}}]},{tokens:[{content:" host_url",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"https://c822-73-64-93-151.ngrok-free.app"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" flow_id",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"dcbed533-859f-4b99-b1f5-16fce884f28f"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" api_key",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"$LANGFLOW_API_KEY"',props:{style:{color:"#A5D6FF"}}}]},{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:"javascript"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["Import the ",(0,s.jsx)(e.code,{children:"langflow-chat"})," React component to make it available for use on a page.\nModify the following import statement with your React component's name and path:"]}),"\n",(0,s.jsx)(h.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" ChatWidget ",props:{style:{color:"#C9D1D9"}}},{content:"from ",props:{style:{color:"#FF7B72"}}},{content:"'@site/src/components/ChatWidget'",props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]}],lang:"jsx"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["To display the widget, call your ",(0,s.jsx)(e.code,{children:"langflow-chat"})," component in the desired location on the page.\nModify the following reference for your React component's name and the desired ",(0,s.jsx)(e.code,{children:"className"}),":"]}),"\n",(0,s.jsx)(h.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:'',props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n"]})]}),(0,s.jsxs)(p.A,{value:"angular",label:"Angular",children:[(0,s.jsx)(e.p,{children:"To use the chat widget in your Angular application, create a component that loads the widget script and renders the chat interface."}),(0,s.jsxs)(e.p,{children:["In an Angular application, ",(0,s.jsx)(e.code,{children:"langflow-chat"})," is a custom web component that you must explicitly allow in your site's ",(0,s.jsx)(e.code,{children:".components.ts"}),".\nTherefore, to use the embedded chat widget, you must add ",(0,s.jsx)(e.code,{children:"CUSTOM_ELEMENTS_SCHEMA"})," to your module's configuration, and then integrate the ",(0,s.jsx)(e.code,{children:""})," element."]}),(0,s.jsxs)(e.p,{children:["Angular requires you to explicitly allow custom web components, like ",(0,s.jsx)(e.code,{children:"langflow-chat"}),", in your site's ",(0,s.jsx)(e.code,{children:"components"}),".\nTherefore, you must add the ",(0,s.jsx)(e.code,{children:""})," element to your Angular template and configure Angular to recognize it.\nYou must add ",(0,s.jsx)(e.code,{children:"CUSTOM_ELEMENTS_SCHEMA"})," to your module's configuration to enable this."]}),(0,s.jsxs)(e.ol,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["In your Angular application, edit the ",(0,s.jsx)(e.code,{children:".module.ts"})," file where you want to add the ",(0,s.jsx)(e.code,{children:"langflow-chat"})," web component."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["At the top of ",(0,s.jsx)(e.code,{children:".module.ts"}),", import ",(0,s.jsx)(e.code,{children:"CUSTOM_ELEMENTS_SCHEMA"}),":"]}),"\n",(0,s.jsx)(h.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';",props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["In the ",(0,s.jsx)(e.code,{children:"@NgModule"})," decorator, add ",(0,s.jsx)(e.code,{children:"CUSTOM_ELEMENTS_SCHEMA"})," to the ",(0,s.jsx)(e.code,{children:"schemas"})," array:"]}),"\n",(0,s.jsx)(h.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" { NgModule, CUSTOM_ELEMENTS_SCHEMA } ",props:{style:{color:"#C9D1D9"}}},{content:"from ",props:{style:{color:"#FF7B72"}}},{content:"'@angular/core'",props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" { BrowserModule } ",props:{style:{color:"#C9D1D9"}}},{content:"from ",props:{style:{color:"#FF7B72"}}},{content:"'@angular/platform-browser'",props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" { AppComponent } ",props:{style:{color:"#C9D1D9"}}},{content:"from ",props:{style:{color:"#FF7B72"}}},{content:"'./app.component'",props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"@",props:{style:{color:"#C9D1D9"}}},{content:"NgModule",props:{style:{color:"#D2A8FF"}}},{content:"({",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"declarations: [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" AppComponent",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"imports: [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" BrowserModule",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"schemas: [",props:{style:{color:"#C9D1D9"}}},{content:"CUSTOM_ELEMENTS_SCHEMA",props:{style:{color:"#79C0FF"}}},{content:"],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"providers: [],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"bootstrap: [AppComponent]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"})",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"export class ",props:{style:{color:"#FF7B72"}}},{content:"AppModule",props:{style:{color:"#FFA657"}}},{content:" { }",props:{style:{color:"#C9D1D9"}}}]}],lang:"javascript"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["Edit the ",(0,s.jsx)(e.code,{children:".component.ts"})," file where you want to use the embedded chat widget."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["In the ",(0,s.jsx)(e.code,{children:"@Component"})," decorator, add the ",(0,s.jsx)(e.code,{children:""})," element to the ",(0,s.jsx)(e.code,{children:"template"})," key:"]}),"\n",(0,s.jsx)(h.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" { Component } ",props:{style:{color:"#C9D1D9"}}},{content:"from ",props:{style:{color:"#FF7B72"}}},{content:"'@angular/core'",props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"@",props:{style:{color:"#C9D1D9"}}},{content:"Component",props:{style:{color:"#D2A8FF"}}},{content:"({",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"selector: ",props:{style:{color:"#C9D1D9"}}},{content:"'app-root'",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"template: ",props:{style:{color:"#C9D1D9"}}},{content:"`",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:'
',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"

Langflow Chat Test

",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"
",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"`",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"styles: [",props:{style:{color:"#C9D1D9"}}},{content:"`",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" .container {",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" padding: 20px;",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" text-align: center;",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"`",props:{style:{color:"#A5D6FF"}}},{content:"]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"})",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"export class ",props:{style:{color:"#FF7B72"}}},{content:"AppComponent",props:{style:{color:"#FFA657"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"title ",props:{style:{color:"#FFA657"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"'Langflow Chat Test'",props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"javascript"},annotations:[]}]}),"\n"]}),"\n"]})]}),(0,s.jsx)(p.A,{value:"html",label:"HTML",children:(0,s.jsx)(h.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"<",props:{style:{color:"#C9D1D9"}}},{content:"html ",props:{style:{color:"#7EE787"}}},{content:"lang",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"en"',props:{style:{color:"#A5D6FF"}}},{content:">",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"<",props:{style:{color:"#C9D1D9"}}},{content:"head",props:{style:{color:"#7EE787"}}},{content:">",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"<",props:{style:{color:"#C9D1D9"}}},{content:"script ",props:{style:{color:"#7EE787"}}},{content:"src",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"https://cdn.jsdelivr.net/gh/langflow-ai/langflow-embedded-chat@v1.0.7/dist/build/static/js/bundle.min.js"',props:{style:{color:"#A5D6FF"}}},{content:">",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"<",props:{style:{color:"#C9D1D9"}}},{content:"body",props:{style:{color:"#7EE787"}}},{content:">",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"<",props:{style:{color:"#C9D1D9"}}},{content:"langflow-chat",props:{style:{color:"#7EE787"}}}]},{tokens:[{content:" host_url",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"https://c822-73-64-93-151.ngrok-free.app"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" flow_id",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"dcbed533-859f-4b99-b1f5-16fce884f28f"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" api_key",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"$LANGFLOW_API_KEY"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" >",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]}],lang:"html"},annotations:[]}]})})]}),"\n",(0,s.jsx)(e.h3,{id:"configure-the-langflow-chat-web-component",children:"Configure the langflow-chat web component"}),"\n",(0,s.jsxs)(e.p,{children:["To use the embedded chat widget in your HTML, the ",(0,s.jsx)(e.code,{children:"langflow-chat"})," web component must include the following minimum inputs (also known as ",(0,s.jsx)(e.em,{children:"props"})," in React):"]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"host_url"}),": Your Langflow server URL. Must be ",(0,s.jsx)(e.code,{children:"HTTPS"}),". Don't include a trailing slash (",(0,s.jsx)(e.code,{children:"/"}),")."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"flow_id"}),": The ID of the flow you want to embed."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"api_key"}),": A ",(0,s.jsx)(e.a,{href:"/api-keys-and-authentication",children:"Langflow API key"}),".\nThis prop is recommended to ensure the widget has permission to run the flow."]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:["The minimum inputs are automatically populated in the ",(0,s.jsxs)(e.a,{href:"#get-a-langflow-chat-snippet",children:[(0,s.jsx)(e.strong,{children:"Embed into site"})," code snippet"]})," that is generated by Langflow."]}),"\n",(0,s.jsxs)(e.p,{children:["You can use additional inputs (props) to modify the embedded chat widget.\nFor a list of all props, types, and descriptions, see the ",(0,s.jsx)(e.a,{href:"https://github.com/langflow-ai/langflow-embedded-chat?tab=readme-ov-file#configuration",children:"langflow-embedded-chat README"}),"."]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Example: Langflow API key prop"}),(0,s.jsxs)(e.p,{children:["The ",(0,s.jsx)(e.code,{children:"api_key"})," prop stores a Langflow API key that the chat widget can use to authenticate the underlying Langflow API request."]}),(0,s.jsx)(e.p,{children:"The Langflow team recommends following industry best practices for handling sensitive credentials.\nFor example, securely store your API key, and then retrieve with an environment variable:"}),(0,s.jsx)(h.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"<",props:{style:{color:"#C9D1D9"}}},{content:"langflow-chat",props:{style:{color:"#7EE787"}}}]},{tokens:[{content:" host_url",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"https://c822-73-64-93-151.ngrok-free.app"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" flow_id",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"dcbed533-859f-4b99-b1f5-16fce884f28f"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" api_key",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"$LANGFLOW_API_KEY"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:">",props:{style:{color:"#C9D1D9"}}}]}],lang:"html"},annotations:[]}]})]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Example: Style props"}),(0,s.jsxs)(e.p,{children:["There are many props you can use to customize the style and positioning of the embedded chat widget.\nMany of these props are of type JSON, and they require specific formatting, depending on where you embed the ",(0,s.jsx)(e.code,{children:"langflow-chat"})," web component."]}),(0,s.jsxs)(e.p,{children:["In React and plain HTML, JSON props are expressed as JSON objects or stringified JSON, such as ",(0,s.jsx)(e.code,{children:'\\{"key":"value"\\}'}),":"]}),(0,s.jsx)(h.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"<",props:{style:{color:"#C9D1D9"}}},{content:"langflow-chat",props:{style:{color:"#7EE787"}}}]},{tokens:[{content:" host_url",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"https://c822-73-64-93-151.ngrok-free.app"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" flow_id",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"dcbed533-859f-4b99-b1f5-16fce884f28f"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" api_key",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"$LANGFLOW_API_KEY"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" chat_window_style",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "backgroundColor": "#1a0d0d",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "border": "4px solid #b30000",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "borderRadius": "16px",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "boxShadow": "0 8px 32px #b30000",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "color": "#fff",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "fontFamily": "Georgia, serif",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "padding": "16px"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }'",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" window_title",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"Custom Styled Chat"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" height",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"600"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" width",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"400"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:">",props:{style:{color:"#C9D1D9"}}}]}],lang:"html"},annotations:[]}]}),(0,s.jsxs)(e.p,{children:["For Angular applications, use ",(0,s.jsx)(e.a,{href:"https://angular.dev/guide/templates/binding#binding-dynamic-properties-and-attributes",children:"property binding syntax"})," to pass JSON props as JavaScript objects.\nFor example:"]}),(0,s.jsx)(h.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" { Component } ",props:{style:{color:"#C9D1D9"}}},{content:"from ",props:{style:{color:"#FF7B72"}}},{content:"'@angular/core'",props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"@",props:{style:{color:"#C9D1D9"}}},{content:"Component",props:{style:{color:"#D2A8FF"}}},{content:"({",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" selector: ",props:{style:{color:"#C9D1D9"}}},{content:"'app-root'",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" template: ",props:{style:{color:"#C9D1D9"}}},{content:"`",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:'
',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"

Langflow Chat Test

",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"
",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" `",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" styles: [",props:{style:{color:"#C9D1D9"}}},{content:"`",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" .container {",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" padding: 20px;",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" text-align: center;",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" `",props:{style:{color:"#A5D6FF"}}},{content:"]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"})",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"export class ",props:{style:{color:"#FF7B72"}}},{content:"AppComponent",props:{style:{color:"#FFA657"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" title ",props:{style:{color:"#FFA657"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"'Langflow Chat Test'",props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"javascript"},annotations:[]}]})]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Example: Session ID prop"}),(0,s.jsxs)(e.p,{children:["The following example adds a custom ",(0,s.jsx)(e.a,{href:"/session-id",children:"session ID"})," to help identify flow runs started by the embedded chat widget:"]}),(0,s.jsx)(h.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"<",props:{style:{color:"#C9D1D9"}}},{content:"langflow-chat",props:{style:{color:"#7EE787"}}}]},{tokens:[{content:" host_url",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"https://c822-73-64-93-151.ngrok-free.app"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" flow_id",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"dcbed533-859f-4b99-b1f5-16fce884f28f"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" api_key",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"$LANGFLOW_API_KEY"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" session_id",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"$SESSION_ID"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:">",props:{style:{color:"#C9D1D9"}}}]}],lang:"html"},annotations:[]}]})]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Example: Tweaks prop"}),(0,s.jsxs)(e.p,{children:["Use the ",(0,s.jsx)(e.code,{children:"tweaks"})," prop to modify flow parameters at runtime.\nThe available keys for the ",(0,s.jsx)(e.code,{children:"tweaks"})," object depend on the flow you are serving through the embedded chat widget."]}),(0,s.jsxs)(e.p,{children:["In React and plain HTML, ",(0,s.jsx)(e.code,{children:"tweaks"})," are declared as a JSON object, similar to how you would pass them to a Langflow API endpoint like ",(0,s.jsx)(e.a,{href:"/api-flows-run#run-flow",children:(0,s.jsx)(e.code,{children:"/v1/run/$FLOW_ID"})}),".\nFor example:"]}),(0,s.jsx)(h.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"<",props:{style:{color:"#C9D1D9"}}},{content:"langflow-chat",props:{style:{color:"#7EE787"}}}]},{tokens:[{content:" host_url",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"https://c822-73-64-93-151.ngrok-free.app"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" flow_id",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"dcbed533-859f-4b99-b1f5-16fce884f28f"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" api_key",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:'"$LANGFLOW_API_KEY"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" tweaks",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#C9D1D9"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "model_name": "llama-3.1-8b-instant"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }'",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:">",props:{style:{color:"#C9D1D9"}}}]}],lang:"html"},annotations:[]}]}),(0,s.jsxs)(e.p,{children:["For Angular applications, use ",(0,s.jsx)(e.a,{href:"https://angular.dev/guide/templates/binding#binding-dynamic-properties-and-attributes",children:"property binding syntax"})," to pass JSON props as JavaScript objects.\nFor example:"]}),(0,s.jsx)(h.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" { Component } ",props:{style:{color:"#C9D1D9"}}},{content:"from ",props:{style:{color:"#FF7B72"}}},{content:"'@angular/core'",props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"@",props:{style:{color:"#C9D1D9"}}},{content:"Component",props:{style:{color:"#D2A8FF"}}},{content:"({",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" selector: ",props:{style:{color:"#C9D1D9"}}},{content:"'app-root'",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" template: ",props:{style:{color:"#C9D1D9"}}},{content:"`",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:'
',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"

Langflow Chat Test

",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"
",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" `",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" styles: [",props:{style:{color:"#C9D1D9"}}},{content:"`",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" .container {",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" padding: 20px;",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" text-align: center;",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" `",props:{style:{color:"#A5D6FF"}}},{content:"]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"})",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"export class ",props:{style:{color:"#FF7B72"}}},{content:"AppComponent",props:{style:{color:"#FFA657"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" title ",props:{style:{color:"#FFA657"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"'Langflow Chat Test'",props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"javascript"},annotations:[]}]})]}),"\n",(0,s.jsx)(e.h2,{id:"serve-flows-through-a-langflow-mcp-server",children:"Serve flows through a Langflow MCP server"}),"\n",(0,s.jsxs)(e.p,{children:["Each ",(0,s.jsx)(e.a,{href:"/concepts-flows#projects",children:"Langflow project"})," has an MCP server that exposes the project's flows as ",(0,s.jsx)(e.a,{href:"https://modelcontextprotocol.io/docs/concepts/tools",children:"tools"})," that ",(0,s.jsx)(e.a,{href:"https://modelcontextprotocol.io/clients",children:"MCP clients"})," can use to generate responses."]}),"\n",(0,s.jsx)(e.p,{children:"In addition to serving flows through Langflow MCP servers, you can use Langflow as an MCP client to access any MCP server, including your Langflow MCP servers."}),"\n",(0,s.jsxs)(e.p,{children:["Interactions with Langflow MCP servers happen through the Langflow API's ",(0,s.jsx)(e.code,{children:"/mcp"})," endpoints."]}),"\n",(0,s.jsxs)(e.p,{children:["For more information, see ",(0,s.jsx)(e.a,{href:"/mcp-server",children:"Use Langflow as an MCP server"})," and ",(0,s.jsx)(e.a,{href:"/mcp-client",children:"Use Langflow as an MCP client"}),"."]}),"\n",(0,s.jsx)(e.h2,{id:"see-also",children:"See also"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.a,{href:"/concepts-flows-import",children:"Import and export flows"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.a,{href:"/api-files",children:"Files endpoints"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.a,{href:"/concepts-playground",children:"Test flows in the Playground"})}),"\n"]})]})}function D(o={}){const{wrapper:e}={...(0,l.R)(),...o.components};return e?(0,s.jsx)(e,{...o,children:(0,s.jsx)(f,{...o})}):f(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.")}},43806:(o,e,t)=>{t.d(e,{A:()=>n});const n=t.p+"assets/images/chat-widget-default-50fbdf351e2e984e4103a225be85f9a4.png"}}]); \ No newline at end of file diff --git a/assets/js/0f761898.b32793df.js b/assets/js/0f761898.b32793df.js deleted file mode 100644 index 514a50bef5..0000000000 --- a/assets/js/0f761898.b32793df.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[1490],{17886:(e,n,t)=>{t.d(n,{A:()=>i});t(96540);var s=t(64058),r=t(74848);function i({name:e,...n}){const t=s[e];return t?(0,r.jsx)(t,{...n}):null}},63261:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>d,default:()=>h,frontMatter:()=>c,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"Components/bundles-huggingface","title":"Hugging Face","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-huggingface.mdx","sourceDirName":"Components","slug":"/bundles-huggingface","permalink":"/bundles-huggingface","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Hugging Face","slug":"/bundles-huggingface"},"sidebar":"docs","previous":{"title":"Groq","permalink":"/bundles-groq"},"next":{"title":"IBM","permalink":"/bundles-ibm"}}');var r=t(74848),i=t(28453),o=t(17886);const c={title:"Hugging Face",slug:"/bundles-huggingface"},d=void 0,a={},l=[{value:"Hugging Face text generation",id:"hugging-face-text-generation",level:2},{value:"Hugging Face text generation parameters",id:"hugging-face-text-generation-parameters",level:3},{value:"Hugging Face Embeddings Inference",id:"hugging-face-embeddings-inference",level:2},{value:"Hugging Face Embeddings Inference parameters",id:"hugging-face-embeddings-inference-parameters",level:3},{value:"Use a local Hugging Face embeddings model",id:"local-hugging-face-model",level:3}];function g(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",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};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,r.jsxs)(n.p,{children:["The components in the ",(0,r.jsx)(n.strong,{children:"Hugging Face"})," bundle require access to Hugging Face APIs."]}),"\n",(0,r.jsxs)(n.p,{children:["For more information about Hugging Face features and functionality used by Hugging Face components, see the ",(0,r.jsx)(n.a,{href:"https://huggingface.co/docs",children:"Hugging Face documentation"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"hugging-face-text-generation",children:"Hugging Face text generation"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Hugging Face"})," component generates text using a specified model by sending requests to the Hugging Face API, which is a hosted inference API for models hosted on Hugging Face.\nAuthentication is required."]}),"\n",(0,r.jsxs)(n.p,{children:["This component can output either a ",(0,r.jsx)(n.strong,{children:"Model Response"})," (",(0,r.jsx)(n.a,{href:"/data-types#message",children:(0,r.jsx)(n.code,{children:"Message"})}),") or a ",(0,r.jsx)(n.strong,{children:"Language Model"})," (",(0,r.jsx)(n.a,{href:"/data-types#languagemodel",children:(0,r.jsx)(n.code,{children:"LanguageModel"})}),").\nSpecifically, the ",(0,r.jsx)(n.strong,{children:"Language Model"})," output is an instance of ",(0,r.jsx)(n.a,{href:"https://python.langchain.com/docs/integrations/providers/huggingface/",children:(0,r.jsx)(n.code,{children:"HuggingFaceHub"})})," configured according to the component's parameters."]}),"\n",(0,r.jsxs)(n.p,{children:["Use the ",(0,r.jsx)(n.strong,{children:"Language Model"})," output when you want to use a Hugging Face model as the LLM for another LLM-driven component, such as a ",(0,r.jsx)(n.strong,{children:"Language Model"})," or ",(0,r.jsx)(n.strong,{children:"Smart Function"})," component."]}),"\n",(0,r.jsxs)(n.p,{children:["For more information, see ",(0,r.jsxs)(n.a,{href:"/components-models",children:[(0,r.jsx)(n.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"hugging-face-text-generation-parameters",children:"Hugging Face text generation parameters"}),"\n",(0,r.jsxs)(n.p,{children:["Many ",(0,r.jsx)(n.strong,{children:"Hugging Face"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,r.jsx)(o.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Controls"})," in the ",(0,r.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(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:"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:"model_id"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:'Input parameter. The model ID from Hugging Face Hub. For example, "gpt2", "facebook/bart-large".'})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"huggingfacehub_api_token"}),(0,r.jsx)(n.td,{children:"SecretString"}),(0,r.jsxs)(n.td,{children:["Input parameter. Your ",(0,r.jsx)(n.a,{href:"https://huggingface.co/docs/hub/security-tokens",children:"Hugging Face API token"})," for authentication."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"temperature"}),(0,r.jsx)(n.td,{children:"Float"}),(0,r.jsx)(n.td,{children:"Input parameter. Controls randomness in the output. Range: [0.0, 1.0]. Default: 0.7."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"max_new_tokens"}),(0,r.jsx)(n.td,{children:"Integer"}),(0,r.jsx)(n.td,{children:"Input parameter. Maximum number of tokens to generate. Default: 512."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"top_p"}),(0,r.jsx)(n.td,{children:"Float"}),(0,r.jsx)(n.td,{children:"Input parameter. Nucleus sampling parameter. Range: [0.0, 1.0]. Default: 0.95."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"top_k"}),(0,r.jsx)(n.td,{children:"Integer"}),(0,r.jsx)(n.td,{children:"Input parameter. Top-k sampling parameter. Default: 50."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"model_kwargs"}),(0,r.jsx)(n.td,{children:"Dictionary"}),(0,r.jsx)(n.td,{children:"Input parameter. Additional keyword arguments to pass to the model."})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"hugging-face-embeddings-inference",children:"Hugging Face Embeddings Inference"}),"\n",(0,r.jsxs)(n.p,{children:["Use the ",(0,r.jsx)(n.strong,{children:"Hugging Face Embeddings Inference"})," component to create embeddings with Hugging Face's hosted models or with your own locally hosted models."]}),"\n",(0,r.jsxs)(n.p,{children:["The component generates embeddings using ",(0,r.jsx)(n.a,{href:"https://huggingface.co/models",children:"Hugging Face Inference API models"}),".\nAuthentication is required when not using a local model."]}),"\n",(0,r.jsxs)(n.p,{children:["For more information about using embedding model components in flows, see ",(0,r.jsxs)(n.a,{href:"/components-embedding-models",children:[(0,r.jsx)(n.strong,{children:"Embedding Model"})," components"]})," and ",(0,r.jsx)(n.a,{href:"#local-hugging-face-model",children:"Use a local Hugging Face embeddings model"}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"hugging-face-embeddings-inference-parameters",children:"Hugging Face Embeddings Inference parameters"}),"\n",(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:"API Key"}),(0,r.jsx)(n.td,{children:"API Key"}),(0,r.jsxs)(n.td,{children:["Input parameter. Your ",(0,r.jsx)(n.a,{href:"https://huggingface.co/docs/hub/security-tokens",children:"Hugging Face API token"})," for accessing the Hugging Face Inference API, if required. Local inference models don't require an API key."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"API URL"}),(0,r.jsx)(n.td,{children:"API URL"}),(0,r.jsx)(n.td,{children:"Input parameter. The URL of the Hugging Face Inference API."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"Model Name"}),(0,r.jsx)(n.td,{children:"Model Name"}),(0,r.jsx)(n.td,{children:"Input parameter. The name of the model to use for embeddings."})]})]})]}),"\n",(0,r.jsx)(n.h3,{id:"local-hugging-face-model",children:"Use a local Hugging Face embeddings model"}),"\n",(0,r.jsxs)(n.p,{children:["To connect the local Hugging Face model to the ",(0,r.jsx)(n.strong,{children:"Hugging Face Embeddings Inference"})," component and use it in a flow, follow these steps:"]}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Run a ",(0,r.jsx)(n.a,{href:"https://huggingface.co/docs/text-embeddings-inference/local_cpu",children:"local Hugging Face embeddings inference"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["For this example, create a flow from the ",(0,r.jsx)(n.strong,{children:"Vector Store RAG"})," template."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Replace the two ",(0,r.jsx)(n.strong,{children:"OpenAI Embeddings"})," components with ",(0,r.jsx)(n.strong,{children:"Hugging Face Embeddings Inference"})," components."]}),"\n",(0,r.jsxs)(n.p,{children:["Make sure to reconnect the ",(0,r.jsx)(n.strong,{children:"Embedding Model"})," ports from each ",(0,r.jsx)(n.strong,{children:"Embeddings Inference"})," component to its corresponding ",(0,r.jsx)(n.strong,{children:"Astra DB"})," vector store component."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Configure the ",(0,r.jsx)(n.strong,{children:"Astra DB"})," vector store components to connect to your Astra organization, or replace both ",(0,r.jsx)(n.strong,{children:"Astra DB"})," vector store components with other ",(0,r.jsxs)(n.a,{href:"/components-vector-stores",children:[(0,r.jsx)(n.strong,{children:"Vector Store"})," components"]}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Connect each ",(0,r.jsx)(n.strong,{children:"Hugging Face Embeddings Inference"})," component to your local inference model:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Inference Endpoint"}),": Enter the URL of your local inference model."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"API Key"}),": Can be empty for local inference."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Model Name"}),": Enter the name of your local inference model if it isn't automatically detected."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["To test the flow, click ",(0,r.jsx)(n.strong,{children:"Playground"}),", and then enter some text to generate an embedding."]}),"\n"]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(g,{...e})}):g(e)}}}]); \ No newline at end of file diff --git a/assets/js/0f761898.e2579c56.js b/assets/js/0f761898.e2579c56.js new file mode 100644 index 0000000000..fafac45fbf --- /dev/null +++ b/assets/js/0f761898.e2579c56.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[1490],{17886:(e,n,t)=>{t.d(n,{A:()=>i});t(96540);var s=t(64058),r=t(74848);function i({name:e,...n}){const t=s[e];return t?(0,r.jsx)(t,{...n}):null}},31929:(e,n,t)=>{t.d(n,{Ay:()=>d,RM:()=>o});var s=t(74848),r=t(28453),i=t(17886);const o=[];function c(e){const n={a:"a",p:"p",strong:"strong",...(0,r.R)(),...e.components};return(0,s.jsxs)(n.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,s.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Controls"})," in the ",(0,s.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function d(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},63261:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>d,default:()=>h,frontMatter:()=>c,metadata:()=>s,toc:()=>l});const s=JSON.parse('{"id":"Components/bundles-huggingface","title":"Hugging Face","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-huggingface.mdx","sourceDirName":"Components","slug":"/bundles-huggingface","permalink":"/bundles-huggingface","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Hugging Face","slug":"/bundles-huggingface"},"sidebar":"docs","previous":{"title":"Groq","permalink":"/bundles-groq"},"next":{"title":"IBM","permalink":"/bundles-ibm"}}');var r=t(74848),i=t(28453),o=(t(17886),t(31929));const c={title:"Hugging Face",slug:"/bundles-huggingface"},d=void 0,a={},l=[{value:"Hugging Face text generation",id:"hugging-face-text-generation",level:2},{value:"Hugging Face text generation parameters",id:"hugging-face-text-generation-parameters",level:3},...o.RM,{value:"Hugging Face Embeddings Inference",id:"hugging-face-embeddings-inference",level:2},{value:"Hugging Face Embeddings Inference parameters",id:"hugging-face-embeddings-inference-parameters",level:3},{value:"Use a local Hugging Face embeddings model",id:"local-hugging-face-model",level:3}];function g(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",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};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,r.jsxs)(n.p,{children:["The components in the ",(0,r.jsx)(n.strong,{children:"Hugging Face"})," bundle require access to Hugging Face APIs."]}),"\n",(0,r.jsxs)(n.p,{children:["For more information about Hugging Face features and functionality used by Hugging Face components, see the ",(0,r.jsx)(n.a,{href:"https://huggingface.co/docs",children:"Hugging Face documentation"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"hugging-face-text-generation",children:"Hugging Face text generation"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Hugging Face"})," component generates text using a specified model by sending requests to the Hugging Face API, which is a hosted inference API for models hosted on Hugging Face.\nAuthentication is required."]}),"\n",(0,r.jsxs)(n.p,{children:["This component can output either a ",(0,r.jsx)(n.strong,{children:"Model Response"})," (",(0,r.jsx)(n.a,{href:"/data-types#message",children:(0,r.jsx)(n.code,{children:"Message"})}),") or a ",(0,r.jsx)(n.strong,{children:"Language Model"})," (",(0,r.jsx)(n.a,{href:"/data-types#languagemodel",children:(0,r.jsx)(n.code,{children:"LanguageModel"})}),").\nSpecifically, the ",(0,r.jsx)(n.strong,{children:"Language Model"})," output is an instance of ",(0,r.jsx)(n.a,{href:"https://python.langchain.com/docs/integrations/providers/huggingface/",children:(0,r.jsx)(n.code,{children:"HuggingFaceHub"})})," configured according to the component's parameters."]}),"\n",(0,r.jsxs)(n.p,{children:["Use the ",(0,r.jsx)(n.strong,{children:"Language Model"})," output when you want to use a Hugging Face model as the LLM for another LLM-driven component, such as an ",(0,r.jsx)(n.strong,{children:"Agent"})," or ",(0,r.jsx)(n.strong,{children:"Smart Function"})," component."]}),"\n",(0,r.jsxs)(n.p,{children:["For more information, see ",(0,r.jsxs)(n.a,{href:"/components-models",children:[(0,r.jsx)(n.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"hugging-face-text-generation-parameters",children:"Hugging Face text generation parameters"}),"\n",(0,r.jsx)(o.Ay,{}),"\n",(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:"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:"model_id"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:'Input parameter. The model ID from Hugging Face Hub. For example, "gpt2", "facebook/bart-large".'})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"huggingfacehub_api_token"}),(0,r.jsx)(n.td,{children:"SecretString"}),(0,r.jsxs)(n.td,{children:["Input parameter. Your ",(0,r.jsx)(n.a,{href:"https://huggingface.co/docs/hub/security-tokens",children:"Hugging Face API token"})," for authentication."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"temperature"}),(0,r.jsx)(n.td,{children:"Float"}),(0,r.jsx)(n.td,{children:"Input parameter. Controls randomness in the output. Range: [0.0, 1.0]. Default: 0.7."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"max_new_tokens"}),(0,r.jsx)(n.td,{children:"Integer"}),(0,r.jsx)(n.td,{children:"Input parameter. Maximum number of tokens to generate. Default: 512."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"top_p"}),(0,r.jsx)(n.td,{children:"Float"}),(0,r.jsx)(n.td,{children:"Input parameter. Nucleus sampling parameter. Range: [0.0, 1.0]. Default: 0.95."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"top_k"}),(0,r.jsx)(n.td,{children:"Integer"}),(0,r.jsx)(n.td,{children:"Input parameter. Top-k sampling parameter. Default: 50."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"model_kwargs"}),(0,r.jsx)(n.td,{children:"Dictionary"}),(0,r.jsx)(n.td,{children:"Input parameter. Additional keyword arguments to pass to the model."})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"hugging-face-embeddings-inference",children:"Hugging Face Embeddings Inference"}),"\n",(0,r.jsxs)(n.p,{children:["Use the ",(0,r.jsx)(n.strong,{children:"Hugging Face Embeddings Inference"})," component to create embeddings with Hugging Face's hosted models or with your own locally hosted models."]}),"\n",(0,r.jsxs)(n.p,{children:["The component generates embeddings using ",(0,r.jsx)(n.a,{href:"https://huggingface.co/models",children:"Hugging Face Inference API models"}),".\nAuthentication is required when not using a local model."]}),"\n",(0,r.jsxs)(n.p,{children:["For more information about using embedding model components in flows, see ",(0,r.jsxs)(n.a,{href:"/components-embedding-models",children:[(0,r.jsx)(n.strong,{children:"Embedding Model"})," components"]})," and ",(0,r.jsx)(n.a,{href:"#local-hugging-face-model",children:"Use a local Hugging Face embeddings model"}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"hugging-face-embeddings-inference-parameters",children:"Hugging Face Embeddings Inference parameters"}),"\n",(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:"api_key"}),(0,r.jsx)(n.td,{children:"API Key"}),(0,r.jsxs)(n.td,{children:["Input parameter. Your ",(0,r.jsx)(n.a,{href:"https://huggingface.co/docs/hub/security-tokens",children:"Hugging Face API token"})," for accessing the Hugging Face Inference API, if required. Local inference models don't require an API key."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"api_url"}),(0,r.jsx)(n.td,{children:"API URL"}),(0,r.jsx)(n.td,{children:"Input parameter. The URL of the Hugging Face Inference API."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"model_name"}),(0,r.jsx)(n.td,{children:"Model Name"}),(0,r.jsx)(n.td,{children:"Input parameter. The name of the model to use for embeddings."})]})]})]}),"\n",(0,r.jsx)(n.h3,{id:"local-hugging-face-model",children:"Use a local Hugging Face embeddings model"}),"\n",(0,r.jsxs)(n.p,{children:["To connect the local Hugging Face model to the ",(0,r.jsx)(n.strong,{children:"Hugging Face Embeddings Inference"})," component and use it in a flow, follow these steps:"]}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Run a ",(0,r.jsx)(n.a,{href:"https://huggingface.co/docs/text-embeddings-inference/local_cpu",children:"local Hugging Face embeddings inference"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["For this example, create a flow from the ",(0,r.jsx)(n.strong,{children:"Vector Store RAG"})," template."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Replace the two ",(0,r.jsx)(n.strong,{children:"OpenAI Embeddings"})," components with ",(0,r.jsx)(n.strong,{children:"Hugging Face Embeddings Inference"})," components."]}),"\n",(0,r.jsxs)(n.p,{children:["Make sure to reconnect the ",(0,r.jsx)(n.strong,{children:"Embedding Model"})," ports from each ",(0,r.jsx)(n.strong,{children:"Embeddings Inference"})," component to its corresponding ",(0,r.jsx)(n.strong,{children:"Astra DB"})," vector store component."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Configure the ",(0,r.jsx)(n.strong,{children:"Astra DB"})," vector store components to connect to your Astra organization, or replace both ",(0,r.jsx)(n.strong,{children:"Astra DB"})," vector store components with other ",(0,r.jsxs)(n.a,{href:"/components-vector-stores",children:[(0,r.jsx)(n.strong,{children:"Vector Store"})," components"]}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Connect each ",(0,r.jsx)(n.strong,{children:"Hugging Face Embeddings Inference"})," component to your local inference model:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Inference Endpoint"}),": Enter the URL of your local inference model."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"API Key"}),": Can be empty for local inference."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Model Name"}),": Enter the name of your local inference model if it isn't automatically detected."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["To test the flow, click ",(0,r.jsx)(n.strong,{children:"Playground"}),", and then enter some text to generate an embedding."]}),"\n"]}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(g,{...e})}):g(e)}}}]); \ No newline at end of file diff --git a/assets/js/16faf8bf.0e58f6cd.js b/assets/js/16faf8bf.0e58f6cd.js deleted file mode 100644 index 0ab2df9e54..0000000000 --- a/assets/js/16faf8bf.0e58f6cd.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[9315],{17886:(e,t,n)=>{n.d(t,{A:()=>r});n(96540);var s=n(64058),d=n(74848);function r({name:e,...t}){const n=s[e];return n?(0,d.jsx)(n,{...t}):null}},34531:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>l,default:()=>u,frontMatter:()=>o,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"Components/bundles-lmstudio","title":"LM Studio","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-lmstudio.mdx","sourceDirName":"Components","slug":"/bundles-lmstudio","permalink":"/bundles-lmstudio","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"LM Studio","slug":"/bundles-lmstudio"},"sidebar":"docs","previous":{"title":"LangChain","permalink":"/bundles-langchain"},"next":{"title":"MariTalk","permalink":"/bundles-maritalk"}}');var d=n(74848),r=n(28453),i=n(17886);const o={title:"LM Studio",slug:"/bundles-lmstudio"},l=void 0,a={},c=[{value:"LM Studio text generation",id:"lm-studio-text-generation",level:2},{value:"LM Studio text generation parameters",id:"lm-studio-text-generation-parameters",level:3},{value:"LM Studio Embeddings",id:"lm-studio-embeddings",level:2},{value:"LM Studio Embeddings parameters",id:"lm-studio-embeddings-parameters",level:3}];function h(e){const t={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.R)(),...e.components};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(t.p,{children:[(0,d.jsx)(t.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,d.jsxs)(t.p,{children:["The components in the ",(0,d.jsx)(t.strong,{children:"LM Studio"})," bundle let you use models from a local or hosted instance of LM Studio.\nComponents can require authentication with an LM Studio API key. For information about LM Studio models, connections, and credentials, see the ",(0,d.jsx)(t.a,{href:"https://lmstudio.ai/docs",children:"LM Studio documentation"}),"."]}),"\n",(0,d.jsx)(t.h2,{id:"lm-studio-text-generation",children:"LM Studio text generation"}),"\n",(0,d.jsxs)(t.p,{children:["The ",(0,d.jsx)(t.strong,{children:"LM Studio"})," component generates text using LM Studio's local language models."]}),"\n",(0,d.jsxs)(t.p,{children:["It can output either a ",(0,d.jsx)(t.strong,{children:"Model Response"})," (",(0,d.jsx)(t.a,{href:"/data-types#message",children:(0,d.jsx)(t.code,{children:"Message"})}),") or a ",(0,d.jsx)(t.strong,{children:"Language Model"})," (",(0,d.jsx)(t.a,{href:"/data-types#languagemodel",children:(0,d.jsx)(t.code,{children:"LanguageModel"})}),")."]}),"\n",(0,d.jsxs)(t.p,{children:["Use the ",(0,d.jsx)(t.strong,{children:"Language Model"})," output when you want to use an LM Studio model as the LLM for another LLM-driven component, such as a ",(0,d.jsx)(t.strong,{children:"Language Model"})," or ",(0,d.jsx)(t.strong,{children:"Smart Function"})," component."]}),"\n",(0,d.jsxs)(t.p,{children:["For more information, see ",(0,d.jsxs)(t.a,{href:"/components-models",children:[(0,d.jsx)(t.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,d.jsx)(t.h3,{id:"lm-studio-text-generation-parameters",children:"LM Studio text generation parameters"}),"\n",(0,d.jsxs)(t.p,{children:["Many ",(0,d.jsx)(t.strong,{children:"LM Studio"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,d.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,d.jsx)(t.strong,{children:"Controls"})," in the ",(0,d.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(0,d.jsxs)(t.table,{children:[(0,d.jsx)(t.thead,{children:(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.th,{children:"Name"}),(0,d.jsx)(t.th,{children:"Type"}),(0,d.jsx)(t.th,{children:"Description"})]})}),(0,d.jsxs)(t.tbody,{children:[(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"base_url"}),(0,d.jsx)(t.td,{children:"String"}),(0,d.jsxs)(t.td,{children:["Input parameter. The URL where LM Studio is running. Default: ",(0,d.jsx)(t.code,{children:'"http://localhost:1234"'}),"."]})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"api_key"}),(0,d.jsx)(t.td,{children:"LM Studio API Key"}),(0,d.jsx)(t.td,{children:"Input parameter. The API key for authentication with LM Studio, if required."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"max_tokens"}),(0,d.jsx)(t.td,{children:"Integer"}),(0,d.jsxs)(t.td,{children:["Input parameter. Maximum number of tokens to generate in the response. Default: ",(0,d.jsx)(t.code,{children:"512"}),"."]})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"temperature"}),(0,d.jsx)(t.td,{children:"Float"}),(0,d.jsxs)(t.td,{children:["Input parameter. Controls randomness in the output. Range: ",(0,d.jsx)(t.code,{children:"[0.0, 2.0]"}),". Default: ",(0,d.jsx)(t.code,{children:"0.7"}),"."]})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"top_p"}),(0,d.jsx)(t.td,{children:"Float"}),(0,d.jsxs)(t.td,{children:["Input parameter. Controls diversity with nucleus sampling. Range: ",(0,d.jsx)(t.code,{children:"[0.0, 1.0]"}),". Default: ",(0,d.jsx)(t.code,{children:"1.0"}),"."]})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"stop"}),(0,d.jsx)(t.td,{children:"List[String]"}),(0,d.jsx)(t.td,{children:"Input parameter. List of strings that stop generation when encountered."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"stream"}),(0,d.jsx)(t.td,{children:"Boolean"}),(0,d.jsx)(t.td,{children:"Input parameter. Whether to stream the response. Default: false."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"presence_penalty"}),(0,d.jsx)(t.td,{children:"Float"}),(0,d.jsxs)(t.td,{children:["Input parameter. Penalizes repeated tokens. Range: ",(0,d.jsx)(t.code,{children:"[-2.0, 2.0]"}),". Default: ",(0,d.jsx)(t.code,{children:"0.0"}),"."]})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"frequency_penalty"}),(0,d.jsx)(t.td,{children:"Float"}),(0,d.jsxs)(t.td,{children:["Input parameter. Penalizes frequent tokens. Range: ",(0,d.jsx)(t.code,{children:"[-2.0, 2.0]"}),". Default: ",(0,d.jsx)(t.code,{children:"0.0"}),"."]})]})]})]}),"\n",(0,d.jsx)(t.h2,{id:"lm-studio-embeddings",children:"LM Studio Embeddings"}),"\n",(0,d.jsxs)(t.p,{children:["The ",(0,d.jsx)(t.strong,{children:"LM Studio Embeddings"})," component generates embeddings using LM Studio models."]}),"\n",(0,d.jsxs)(t.p,{children:["For more information about using embedding model components in flows, see ",(0,d.jsxs)(t.a,{href:"/components-embedding-models",children:[(0,d.jsx)(t.strong,{children:"Embedding Model"})," components"]}),"."]}),"\n",(0,d.jsx)(t.h3,{id:"lm-studio-embeddings-parameters",children:"LM Studio Embeddings parameters"}),"\n",(0,d.jsxs)(t.p,{children:["Many ",(0,d.jsx)(t.strong,{children:"LM Studio Embeddings"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,d.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,d.jsx)(t.strong,{children:"Controls"})," in the ",(0,d.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(0,d.jsxs)(t.table,{children:[(0,d.jsx)(t.thead,{children:(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.th,{children:"Name"}),(0,d.jsx)(t.th,{children:"Display Name"}),(0,d.jsx)(t.th,{children:"Info"})]})}),(0,d.jsxs)(t.tbody,{children:[(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"model"}),(0,d.jsx)(t.td,{children:"Model"}),(0,d.jsx)(t.td,{children:"Input parameter. The LM Studio model to use for generating embeddings."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"base_url"}),(0,d.jsx)(t.td,{children:"LM Studio Base URL"}),(0,d.jsx)(t.td,{children:"Input parameter. The base URL for the LM Studio API."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"api_key"}),(0,d.jsx)(t.td,{children:"LM Studio API Key"}),(0,d.jsx)(t.td,{children:"Input parameter. The API key for authentication with LM Studio."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"temperature"}),(0,d.jsx)(t.td,{children:"Model Temperature"}),(0,d.jsx)(t.td,{children:"Input parameter. The temperature setting for the model."})]})]})]})]})}function u(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,d.jsx)(t,{...e,children:(0,d.jsx)(h,{...e})}):h(e)}}}]); \ No newline at end of file diff --git a/assets/js/16faf8bf.6bd06b19.js b/assets/js/16faf8bf.6bd06b19.js new file mode 100644 index 0000000000..f167886dc0 --- /dev/null +++ b/assets/js/16faf8bf.6bd06b19.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[9315],{17886:(e,t,n)=>{n.d(t,{A:()=>r});n(96540);var s=n(64058),d=n(74848);function r({name:e,...t}){const n=s[e];return n?(0,d.jsx)(n,{...t}):null}},31929:(e,t,n)=>{n.d(t,{Ay:()=>l,RM:()=>i});var s=n(74848),d=n(28453),r=n(17886);const i=[];function o(e){const t={a:"a",p:"p",strong:"strong",...(0,d.R)(),...e.components};return(0,s.jsxs)(t.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,s.jsx)(r.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(t.strong,{children:"Controls"})," in the ",(0,s.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function l(e={}){const{wrapper:t}={...(0,d.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(o,{...e})}):o(e)}},34531:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>a,contentTitle:()=>l,default:()=>u,frontMatter:()=>o,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"Components/bundles-lmstudio","title":"LM Studio","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-lmstudio.mdx","sourceDirName":"Components","slug":"/bundles-lmstudio","permalink":"/bundles-lmstudio","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"LM Studio","slug":"/bundles-lmstudio"},"sidebar":"docs","previous":{"title":"LangChain","permalink":"/bundles-langchain"},"next":{"title":"MariTalk","permalink":"/bundles-maritalk"}}');var d=n(74848),r=n(28453),i=(n(17886),n(31929));const o={title:"LM Studio",slug:"/bundles-lmstudio"},l=void 0,a={},c=[{value:"LM Studio text generation",id:"lm-studio-text-generation",level:2},{value:"LM Studio text generation parameters",id:"lm-studio-text-generation-parameters",level:3},...i.RM,{value:"LM Studio Embeddings",id:"lm-studio-embeddings",level:2},{value:"LM Studio Embeddings parameters",id:"lm-studio-embeddings-parameters",level:3},...i.RM];function h(e){const t={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.R)(),...e.components};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(t.p,{children:[(0,d.jsx)(t.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,d.jsxs)(t.p,{children:["The components in the ",(0,d.jsx)(t.strong,{children:"LM Studio"})," bundle let you use models from a local or hosted instance of LM Studio.\nComponents can require authentication with an LM Studio API key. For information about LM Studio models, connections, and credentials, see the ",(0,d.jsx)(t.a,{href:"https://lmstudio.ai/docs",children:"LM Studio documentation"}),"."]}),"\n",(0,d.jsx)(t.h2,{id:"lm-studio-text-generation",children:"LM Studio text generation"}),"\n",(0,d.jsxs)(t.p,{children:["The ",(0,d.jsx)(t.strong,{children:"LM Studio"})," component generates text using LM Studio's local language models."]}),"\n",(0,d.jsxs)(t.p,{children:["It can output either a ",(0,d.jsx)(t.strong,{children:"Model Response"})," (",(0,d.jsx)(t.a,{href:"/data-types#message",children:(0,d.jsx)(t.code,{children:"Message"})}),") or a ",(0,d.jsx)(t.strong,{children:"Language Model"})," (",(0,d.jsx)(t.a,{href:"/data-types#languagemodel",children:(0,d.jsx)(t.code,{children:"LanguageModel"})}),")."]}),"\n",(0,d.jsxs)(t.p,{children:["Use the ",(0,d.jsx)(t.strong,{children:"Language Model"})," output when you want to use an LM Studio model as the LLM for another LLM-driven component, such as an ",(0,d.jsx)(t.strong,{children:"Agent"})," or ",(0,d.jsx)(t.strong,{children:"Smart Function"})," component."]}),"\n",(0,d.jsxs)(t.p,{children:["For more information, see ",(0,d.jsxs)(t.a,{href:"/components-models",children:[(0,d.jsx)(t.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,d.jsx)(t.h3,{id:"lm-studio-text-generation-parameters",children:"LM Studio text generation parameters"}),"\n",(0,d.jsx)(i.Ay,{}),"\n",(0,d.jsxs)(t.table,{children:[(0,d.jsx)(t.thead,{children:(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.th,{children:"Name"}),(0,d.jsx)(t.th,{children:"Type"}),(0,d.jsx)(t.th,{children:"Description"})]})}),(0,d.jsxs)(t.tbody,{children:[(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"base_url"}),(0,d.jsx)(t.td,{children:"String"}),(0,d.jsxs)(t.td,{children:["Input parameter. The URL where LM Studio is running. Default: ",(0,d.jsx)(t.code,{children:'"http://localhost:1234"'}),"."]})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"api_key"}),(0,d.jsx)(t.td,{children:"LM Studio API Key"}),(0,d.jsx)(t.td,{children:"Input parameter. The API key for authentication with LM Studio, if required."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"max_tokens"}),(0,d.jsx)(t.td,{children:"Integer"}),(0,d.jsxs)(t.td,{children:["Input parameter. Maximum number of tokens to generate in the response. Default: ",(0,d.jsx)(t.code,{children:"512"}),"."]})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"temperature"}),(0,d.jsx)(t.td,{children:"Float"}),(0,d.jsxs)(t.td,{children:["Input parameter. Controls randomness in the output. Range: ",(0,d.jsx)(t.code,{children:"[0.0, 2.0]"}),". Default: ",(0,d.jsx)(t.code,{children:"0.7"}),"."]})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"top_p"}),(0,d.jsx)(t.td,{children:"Float"}),(0,d.jsxs)(t.td,{children:["Input parameter. Controls diversity with nucleus sampling. Range: ",(0,d.jsx)(t.code,{children:"[0.0, 1.0]"}),". Default: ",(0,d.jsx)(t.code,{children:"1.0"}),"."]})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"stop"}),(0,d.jsx)(t.td,{children:"List[String]"}),(0,d.jsx)(t.td,{children:"Input parameter. List of strings that stop generation when encountered."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"stream"}),(0,d.jsx)(t.td,{children:"Boolean"}),(0,d.jsx)(t.td,{children:"Input parameter. Whether to stream the response. Default: false."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"presence_penalty"}),(0,d.jsx)(t.td,{children:"Float"}),(0,d.jsxs)(t.td,{children:["Input parameter. Penalizes repeated tokens. Range: ",(0,d.jsx)(t.code,{children:"[-2.0, 2.0]"}),". Default: ",(0,d.jsx)(t.code,{children:"0.0"}),"."]})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"frequency_penalty"}),(0,d.jsx)(t.td,{children:"Float"}),(0,d.jsxs)(t.td,{children:["Input parameter. Penalizes frequent tokens. Range: ",(0,d.jsx)(t.code,{children:"[-2.0, 2.0]"}),". Default: ",(0,d.jsx)(t.code,{children:"0.0"}),"."]})]})]})]}),"\n",(0,d.jsx)(t.h2,{id:"lm-studio-embeddings",children:"LM Studio Embeddings"}),"\n",(0,d.jsxs)(t.p,{children:["The ",(0,d.jsx)(t.strong,{children:"LM Studio Embeddings"})," component generates embeddings using LM Studio models."]}),"\n",(0,d.jsxs)(t.p,{children:["For more information about using embedding model components in flows, see ",(0,d.jsxs)(t.a,{href:"/components-embedding-models",children:[(0,d.jsx)(t.strong,{children:"Embedding Model"})," components"]}),"."]}),"\n",(0,d.jsx)(t.h3,{id:"lm-studio-embeddings-parameters",children:"LM Studio Embeddings parameters"}),"\n",(0,d.jsx)(i.Ay,{}),"\n",(0,d.jsxs)(t.table,{children:[(0,d.jsx)(t.thead,{children:(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.th,{children:"Name"}),(0,d.jsx)(t.th,{children:"Display Name"}),(0,d.jsx)(t.th,{children:"Info"})]})}),(0,d.jsxs)(t.tbody,{children:[(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"model"}),(0,d.jsx)(t.td,{children:"Model"}),(0,d.jsx)(t.td,{children:"Input parameter. The LM Studio model to use for generating embeddings."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"base_url"}),(0,d.jsx)(t.td,{children:"LM Studio Base URL"}),(0,d.jsx)(t.td,{children:"Input parameter. The base URL for the LM Studio API."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"api_key"}),(0,d.jsx)(t.td,{children:"LM Studio API Key"}),(0,d.jsx)(t.td,{children:"Input parameter. The API key for authentication with LM Studio."})]}),(0,d.jsxs)(t.tr,{children:[(0,d.jsx)(t.td,{children:"temperature"}),(0,d.jsx)(t.td,{children:"Model Temperature"}),(0,d.jsx)(t.td,{children:"Input parameter. The temperature setting for the model."})]})]})]})]})}function u(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,d.jsx)(t,{...e,children:(0,d.jsx)(h,{...e})}):h(e)}}}]); \ No newline at end of file diff --git a/assets/js/1a8a0a64.1614d6c0.js b/assets/js/1a8a0a64.1614d6c0.js new file mode 100644 index 0000000000..27d6254f3d --- /dev/null +++ b/assets/js/1a8a0a64.1614d6c0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[7807],{28453:(e,t,o)=>{o.d(t,{R:()=>c,x:()=>l});var n=o(96540);const s={},r=n.createContext(s);function c(e){const t=n.useContext(r);return n.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(s):e.components||s:c(e.components),n.createElement(r.Provider,{value:t},e.children)}},57824:(e,t,o)=>{o.r(t),o.d(t,{CH:()=>p,assets:()=>a,chCodeConfig:()=>d,contentTitle:()=>i,default:()=>g,frontMatter:()=>l,metadata:()=>n,toc:()=>h});const n=JSON.parse('{"id":"API-Reference/api-logs","title":"Logs endpoints","description":"Retrieve logs for your Langflow flow.","source":"@site/docs/API-Reference/api-logs.mdx","sourceDirName":"API-Reference","slug":"/api-logs","permalink":"/api-logs","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Logs endpoints","slug":"/api-logs"},"sidebar":"docs","previous":{"title":"Projects endpoints","permalink":"/api-projects"},"next":{"title":"Monitor endpoints","permalink":"/api-monitor"}}');var s=o(74848),r=o(28453),c=o(24754);const l={title:"Logs endpoints",slug:"/api-logs"},i=void 0,a={},p={annotations:c.hk,Code:c.Cy},d={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},h=[{value:"Enable log retrieval",id:"enable-log-retrieval",level:2},{value:"Stream logs",id:"stream-logs",level:2},{value:"Retrieve logs with optional parameters",id:"retrieve-logs-with-optional-parameters",level:2}];function u(e){const t={code:"code",h2:"h2",li:"li",ol:"ol",p:"p",ul:"ul",...(0,r.R)(),...e.components},{Details:o}=t;return p||f("CH",!1),p.Code||f("CH.Code",!0),o||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",(0,s.jsx)(t.p,{children:"Retrieve logs for your Langflow flow."}),"\n",(0,s.jsx)(t.h2,{id:"enable-log-retrieval",children:"Enable log retrieval"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"/logs"})," endpoint requires log retrieval to be enabled in your Langflow instance."]}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["To enable log retrieval, include these values in your ",(0,s.jsx)(t.code,{children:".env"})," file:"]}),"\n",(0,s.jsx)(p.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"LANGFLOW_ENABLE_LOG_RETRIEVAL=True",props:{}}]},{tokens:[{content:"LANGFLOW_LOG_RETRIEVER_BUFFER_SIZE=10000",props:{}}]},{tokens:[{content:"LANGFLOW_LOG_LEVEL=DEBUG",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsxs)(t.p,{children:["Log retrieval requires that ",(0,s.jsx)(t.code,{children:"LANGFLOW_LOG_RETRIEVER_BUFFER_SIZE"})," is greater than 0. The default value is ",(0,s.jsx)(t.code,{children:"10000"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Start Langflow with the updated ",(0,s.jsx)(t.code,{children:".env"}),":"]}),"\n",(0,s.jsx)(p.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"uv run langflow run --env-file .env",props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"stream-logs",children:"Stream logs"}),"\n",(0,s.jsx)(t.p,{children:"Stream logs in real-time using Server Sent Events (SSE)."}),"\n",(0,s.jsx)(p.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/logs-stream" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: text/event-stream" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(o,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(p.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"keepalive",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"1736355791151": "2025-01-08T12:03:11.151218-0500 DEBUG Building Chat Input\\n"}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"1736355791485": "2025-01-08T12:03:11.485380-0500 DEBUG consumed event add_message-153bcd5d-ef4d-4ece-8cc0-47c6b6a9ef92 (time in queue, 0.0000, client 0.0001)\\n"}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"1736355791499": "2025-01-08T12:03:11.499704-0500 DEBUG consumed event end_vertex-3d7125cd-7b8a-44eb-9113-ed5b785e3cf3 (time in queue, 0.0056, client 0.0047)\\n"}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"1736355791502": "2025-01-08T12:03:11.502510-0500 DEBUG consumed event end-40d0b363-5618-4a23-bbae-487cd0b9594d (time in queue, 0.0001, client 0.0004)\\n"}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"1736355791513": "2025-01-08T12:03:11.513097-0500 DEBUG Logged vertex build: 729ff2f8-6b01-48c8-9ad0-3743c2af9e8a\\n"}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"1736355791834": "2025-01-08T12:03:11.834982-0500 DEBUG Telemetry data sent successfully.\\n"}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"1736355791941": "2025-01-08T12:03:11.941840-0500 DEBUG Telemetry data sent successfully.\\n"}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"keepalive",props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n",(0,s.jsx)(t.h2,{id:"retrieve-logs-with-optional-parameters",children:"Retrieve logs with optional parameters"}),"\n",(0,s.jsx)(t.p,{children:"Retrieve logs with optional query parameters:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"lines_before"}),": The number of logs before the timestamp or the last log."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"lines_after"}),": The number of logs after the timestamp."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"timestamp"}),": The timestamp to start getting logs from."]}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["The default values for all three parameters is ",(0,s.jsx)(t.code,{children:"0"}),".\nWith default values, the endpoint returns the last 10 lines of logs."]}),"\n",(0,s.jsx)(p.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/logs?lines_before=0&lines_after=0×tamp=0" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(o,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(p.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{}}]},{tokens:[{content:' "1736354770500": "2025-01-08T11:46:10.500363-0500 DEBUG Creating starter project Document Q&A\\n",',props:{}}]},{tokens:[{content:' "1736354770511": "2025-01-08T11:46:10.511146-0500 DEBUG Creating starter project Image Sentiment Analysis\\n",',props:{}}]},{tokens:[{content:' "1736354770521": "2025-01-08T11:46:10.521018-0500 DEBUG Creating starter project SEO Keyword Generator\\n",',props:{}}]},{tokens:[{content:' "1736354770532": "2025-01-08T11:46:10.532677-0500 DEBUG Creating starter project Sequential Tasks Agents\\n",',props:{}}]},{tokens:[{content:' "1736354770544": "2025-01-08T11:46:10.544010-0500 DEBUG Creating starter project Custom Component Generator\\n",',props:{}}]},{tokens:[{content:' "1736354770555": "2025-01-08T11:46:10.555513-0500 DEBUG Creating starter project Prompt Chaining\\n",',props:{}}]},{tokens:[{content:' "1736354770588": "2025-01-08T11:46:10.588105-0500 DEBUG Create service ServiceType.CHAT_SERVICE\\n",',props:{}}]},{tokens:[{content:' "1736354771021": "2025-01-08T11:46:11.021817-0500 DEBUG Telemetry data sent successfully.\\n",',props:{}}]},{tokens:[{content:' "1736354775619": "2025-01-08T11:46:15.619545-0500 DEBUG Create service ServiceType.STORE_SERVICE\\n",',props:{}}]},{tokens:[{content:' "1736354775699": "2025-01-08T11:46:15.699661-0500 DEBUG File 046-rocket.svg retrieved successfully from flow /Users/USER/Library/Caches/langflow/profile_pictures/Space.\\n"',props:{}}]},{tokens:[{content:"}",props:{}}]}],lang:"text"},annotations:[]}]})]})]})}function g(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(u,{...e})}):u(e)}function f(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/1a8a0a64.6de21041.js b/assets/js/1a8a0a64.6de21041.js deleted file mode 100644 index db423a52e9..0000000000 --- a/assets/js/1a8a0a64.6de21041.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[7807],{11470:(e,t,n)=>{n.d(t,{A:()=>F});var o=n(96540),r=n(18215),s=n(23104),a=n(56347),l=n(205),c=n(57485),i=n(31682),u=n(70679);function d(e){return o.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,o.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 p(e){const{values:t,children:n}=e;return(0,o.useMemo)(()=>{const e=t??function(e){return d(e).map(({props:{value:e,label:t,attributes:n,default:o}})=>({value:e,label:t,attributes:n,default:o}))}(n);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,n])}function h({value:e,tabValues:t}){return t.some(t=>t.value===e)}function f({queryString:e=!1,groupId:t}){const n=(0,a.W6)(),r=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,c.aZ)(r),(0,o.useCallback)(e=>{if(!r)return;const t=new URLSearchParams(n.location.search);t.set(r,e),n.replace({...n.location,search:t.toString()})},[r,n])]}function g(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,s=p(e),[a,c]=(0,o.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(!h({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 n=t.find(e=>e.default)??t[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:s})),[i,d]=f({queryString:n,groupId:r}),[g,m]=function({groupId:e}){const t=function(e){return e?`docusaurus.tab.${e}`:null}(e),[n,r]=(0,u.Dv)(t);return[n,(0,o.useCallback)(e=>{t&&r.set(e)},[t,r])]}({groupId:r}),b=(()=>{const e=i??g;return h({value:e,tabValues:s})?e:null})();(0,l.A)(()=>{b&&c(b)},[b]);return{selectedValue:a,selectValue:(0,o.useCallback)(e=>{if(!h({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);c(e),d(e),m(e)},[d,m,s]),tabValues:s}}var m=n(92303);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=n(74848);function k({className:e,block:t,selectedValue:n,selectValue:o,tabValues:a}){const l=[],{blockElementScrollPositionUntilNextRender:c}=(0,s.a_)(),i=e=>{const t=e.currentTarget,r=l.indexOf(t),s=a[r].value;s!==n&&(c(t),o(s))},u=e=>{let t=null;switch(e.key){case"Enter":i(e);break;case"ArrowRight":{const n=l.indexOf(e.currentTarget)+1;t=l[n]??l[0];break}case"ArrowLeft":{const n=l.indexOf(e.currentTarget)-1;t=l[n]??l[l.length-1];break}}t?.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":t},e),children:a.map(({value:e,label:t,attributes:o})=>(0,v.jsx)("li",{role:"tab",tabIndex:n===e?0:-1,"aria-selected":n===e,ref:e=>{l.push(e)},onKeyDown:u,onClick:i,...o,className:(0,r.A)("tabs__item",b.tabItem,o?.className,{"tabs__item--active":n===e}),children:t??e},e))})}function y({lazy:e,children:t,selectedValue:n}){const s=(Array.isArray(t)?t:[t]).filter(Boolean);if(e){const e=s.find(e=>e.props.value===n);return e?(0,o.cloneElement)(e,{className:(0,r.A)("margin-top--md",e.props.className)}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:s.map((e,t)=>(0,o.cloneElement)(e,{key:t,hidden:e.props.value!==n}))})}function x(e){const t=g(e);return(0,v.jsxs)("div",{className:(0,r.A)("tabs-container",b.tabList),children:[(0,v.jsx)(k,{...t,...e}),(0,v.jsx)(y,{...t,...e})]})}function F(e){const t=(0,m.A)();return(0,v.jsx)(x,{...e,children:d(e.children)},String(t))}},19365:(e,t,n)=>{n.d(t,{A:()=>a});n(96540);var o=n(18215);const r={tabItem:"tabItem_Ymn6"};var s=n(74848);function a({children:e,hidden:t,className:n}){return(0,s.jsx)("div",{role:"tabpanel",className:(0,o.A)(r.tabItem,n),hidden:t,children:e})}},28453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>l});var o=n(96540);const r={},s=o.createContext(r);function a(e){const t=o.useContext(s);return o.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(r):e.components||r:a(e.components),o.createElement(s.Provider,{value:t},e.children)}},57824:(e,t,n)=>{n.r(t),n.d(t,{CH:()=>u,assets:()=>i,chCodeConfig:()=>d,contentTitle:()=>c,default:()=>f,frontMatter:()=>l,metadata:()=>o,toc:()=>p});const o=JSON.parse('{"id":"API-Reference/api-logs","title":"Logs endpoints","description":"Retrieve logs for your Langflow flow.","source":"@site/docs/API-Reference/api-logs.mdx","sourceDirName":"API-Reference","slug":"/api-logs","permalink":"/api-logs","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Logs endpoints","slug":"/api-logs"},"sidebar":"docs","previous":{"title":"Projects endpoints","permalink":"/api-projects"},"next":{"title":"Monitor endpoints","permalink":"/api-monitor"}}');var r=n(74848),s=n(28453),a=n(24754);n(11470),n(19365);const l={title:"Logs endpoints",slug:"/api-logs"},c=void 0,i={},u={annotations:a.hk,Code:a.Cy},d={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},p=[{value:"Enable log retrieval",id:"enable-log-retrieval",level:2},{value:"Stream logs",id:"stream-logs",level:2},{value:"Retrieve logs with optional parameters",id:"retrieve-logs-with-optional-parameters",level:2}];function h(e){const t={code:"code",h2:"h2",li:"li",ol:"ol",p:"p",ul:"ul",...(0,s.R)(),...e.components},{Details:n}=t;return u||g("CH",!1),u.Code||g("CH.Code",!0),n||g("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)(t.p,{children:"Retrieve logs for your Langflow flow."}),"\n",(0,r.jsx)(t.h2,{id:"enable-log-retrieval",children:"Enable log retrieval"}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.code,{children:"/logs"})," endpoint requires log retrieval to be enabled in your Langflow instance."]}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["To enable log retrieval, include these values in your ",(0,r.jsx)(t.code,{children:".env"})," file:"]}),"\n",(0,r.jsx)(u.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"LANGFLOW_ENABLE_LOG_RETRIEVAL=True",props:{}}]},{tokens:[{content:"LANGFLOW_LOG_RETRIEVER_BUFFER_SIZE=10000",props:{}}]},{tokens:[{content:"LANGFLOW_LOG_LEVEL=DEBUG",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(t.p,{children:["Log retrieval requires that ",(0,r.jsx)(t.code,{children:"LANGFLOW_LOG_RETRIEVER_BUFFER_SIZE"})," is greater than 0. The default value is ",(0,r.jsx)(t.code,{children:"10000"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Start Langflow with the updated ",(0,r.jsx)(t.code,{children:".env"}),":"]}),"\n",(0,r.jsx)(u.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"uv run langflow run --env-file .env",props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"stream-logs",children:"Stream logs"}),"\n",(0,r.jsx)(t.p,{children:"Stream logs in real-time using Server Sent Events (SSE)."}),"\n",(0,r.jsx)(u.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/logs-stream" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: text/event-stream" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,r.jsxs)(n,{children:[(0,r.jsx)("summary",{children:"Result"}),(0,r.jsx)(u.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"keepalive",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"1736355791151": "2025-01-08T12:03:11.151218-0500 DEBUG Building Chat Input\\n"}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"1736355791485": "2025-01-08T12:03:11.485380-0500 DEBUG consumed event add_message-153bcd5d-ef4d-4ece-8cc0-47c6b6a9ef92 (time in queue, 0.0000, client 0.0001)\\n"}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"1736355791499": "2025-01-08T12:03:11.499704-0500 DEBUG consumed event end_vertex-3d7125cd-7b8a-44eb-9113-ed5b785e3cf3 (time in queue, 0.0056, client 0.0047)\\n"}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"1736355791502": "2025-01-08T12:03:11.502510-0500 DEBUG consumed event end-40d0b363-5618-4a23-bbae-487cd0b9594d (time in queue, 0.0001, client 0.0004)\\n"}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"1736355791513": "2025-01-08T12:03:11.513097-0500 DEBUG Logged vertex build: 729ff2f8-6b01-48c8-9ad0-3743c2af9e8a\\n"}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"1736355791834": "2025-01-08T12:03:11.834982-0500 DEBUG Telemetry data sent successfully.\\n"}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"1736355791941": "2025-01-08T12:03:11.941840-0500 DEBUG Telemetry data sent successfully.\\n"}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"keepalive",props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n",(0,r.jsx)(t.h2,{id:"retrieve-logs-with-optional-parameters",children:"Retrieve logs with optional parameters"}),"\n",(0,r.jsx)(t.p,{children:"Retrieve logs with optional query parameters:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"lines_before"}),": The number of logs before the timestamp or the last log."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"lines_after"}),": The number of logs after the timestamp."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"timestamp"}),": The timestamp to start getting logs from."]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["The default values for all three parameters is ",(0,r.jsx)(t.code,{children:"0"}),".\nWith default values, the endpoint returns the last 10 lines of logs."]}),"\n",(0,r.jsx)(u.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/logs?lines_before=0&lines_after=0×tamp=0" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,r.jsxs)(n,{children:[(0,r.jsx)("summary",{children:"Result"}),(0,r.jsx)(u.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{}}]},{tokens:[{content:' "1736354770500": "2025-01-08T11:46:10.500363-0500 DEBUG Creating starter project Document Q&A\\n",',props:{}}]},{tokens:[{content:' "1736354770511": "2025-01-08T11:46:10.511146-0500 DEBUG Creating starter project Image Sentiment Analysis\\n",',props:{}}]},{tokens:[{content:' "1736354770521": "2025-01-08T11:46:10.521018-0500 DEBUG Creating starter project SEO Keyword Generator\\n",',props:{}}]},{tokens:[{content:' "1736354770532": "2025-01-08T11:46:10.532677-0500 DEBUG Creating starter project Sequential Tasks Agents\\n",',props:{}}]},{tokens:[{content:' "1736354770544": "2025-01-08T11:46:10.544010-0500 DEBUG Creating starter project Custom Component Generator\\n",',props:{}}]},{tokens:[{content:' "1736354770555": "2025-01-08T11:46:10.555513-0500 DEBUG Creating starter project Prompt Chaining\\n",',props:{}}]},{tokens:[{content:' "1736354770588": "2025-01-08T11:46:10.588105-0500 DEBUG Create service ServiceType.CHAT_SERVICE\\n",',props:{}}]},{tokens:[{content:' "1736354771021": "2025-01-08T11:46:11.021817-0500 DEBUG Telemetry data sent successfully.\\n",',props:{}}]},{tokens:[{content:' "1736354775619": "2025-01-08T11:46:15.619545-0500 DEBUG Create service ServiceType.STORE_SERVICE\\n",',props:{}}]},{tokens:[{content:' "1736354775699": "2025-01-08T11:46:15.699661-0500 DEBUG File 046-rocket.svg retrieved successfully from flow /Users/USER/Library/Caches/langflow/profile_pictures/Space.\\n"',props:{}}]},{tokens:[{content:"}",props:{}}]}],lang:"text"},annotations:[]}]})]})]})}function f(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(h,{...e})}):h(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/1ab69cbd.14b3e131.js b/assets/js/1ab69cbd.14b3e131.js deleted file mode 100644 index 82315c041b..0000000000 --- a/assets/js/1ab69cbd.14b3e131.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[2475],{8593:(o,e,t)=>{t.r(e),t.d(e,{CH:()=>a,assets:()=>i,chCodeConfig:()=>d,contentTitle:()=>p,default:()=>y,frontMatter:()=>c,metadata:()=>n,toc:()=>u});const n=JSON.parse('{"id":"API-Reference/api-build","title":"Build endpoints","description":"The /build endpoints are used by Langflow\'s frontend visual editor code.","source":"@site/docs/API-Reference/api-build.mdx","sourceDirName":"API-Reference","slug":"/api-build","permalink":"/api-build","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Build endpoints","slug":"/api-build"},"sidebar":"docs","previous":{"title":"Monitor endpoints","permalink":"/api-monitor"},"next":{"title":"Users endpoints","permalink":"/api-users"}}');var s=t(74848),r=t(28453),l=t(24754);t(11470),t(19365);const c={title:"Build endpoints",slug:"/api-build"},p=void 0,i={},a={annotations:l.hk,Code:l.Cy},d={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},u=[{value:"Build flow and stream events",id:"build-flow-and-stream-events",level:2},{value:"Build headers",id:"build-headers",level:2},{value:"Build parameters",id:"build-parameters",level:2},{value:"Set start and stop points",id:"set-start-and-stop-points",level:3},{value:"Override flow parameters",id:"override-flow-parameters",level:3},{value:"See also",id:"see-also",level:2}];function h(o){const e={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",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)(),...o.components},{Details:t}=e;return a||F("CH",!1),a.Code||F("CH.Code",!0),t||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.admonition,{type:"important",children:[(0,s.jsxs)(e.p,{children:["The ",(0,s.jsx)(e.code,{children:"/build"})," endpoints are used by Langflow's frontend visual editor code.\nThese endpoints are part of the internal Langflow codebase."]}),(0,s.jsxs)(e.p,{children:["Don't use these endpoints to run flows in applications that use your Langflow flows.\nTo run flows in your apps, see ",(0,s.jsx)(e.a,{href:"/api-flows-run",children:"Flow trigger endpoints"}),"."]})]}),"\n",(0,s.jsxs)(e.p,{children:["The ",(0,s.jsx)(e.code,{children:"/build"})," endpoints support Langflow's frontend code for building flows in the Langflow visual editor.\nYou can use these endpoints to build vertices and flows, as well as execute flows with streaming event responses.\nYou might need to use or understand these endpoints when contributing to the Langflow codebase."]}),"\n",(0,s.jsx)(e.h2,{id:"build-flow-and-stream-events",children:"Build flow and stream events"}),"\n",(0,s.jsx)(e.p,{children:"This endpoint builds and executes a flow, returning a job ID that can be used to stream execution events."}),"\n",(0,s.jsxs)(e.ol,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["Send a POST request to the ",(0,s.jsx)(e.code,{children:"/build/$FLOW_ID/flow"})," endpoint:"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/build/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'/flow" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "inputs": {',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_value": "Tell me a story"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }'",props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "job_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"123e4567-e89b-12d3-a456-426614174000"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["After receiving a job ID from the build endpoint, use the ",(0,s.jsx)(e.code,{children:"/build/$JOB_ID/events"})," endpoint to stream the execution results:"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/build/123e4567-e89b-12d3-a456-426614174000/events" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}},{content:'"event"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"vertices_sorted"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"data"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}},{content:'"ids"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}},{content:'"ChatInput-XtBLx"',props:{style:{color:"#A5D6FF"}}},{content:"], ",props:{style:{color:"#C9D1D9"}}},{content:'"to_run"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}},{content:'"Prompt-x74Ze"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"ChatOutput-ylMzN"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"ChatInput-XtBLx"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"OpenAIModel-d1wOZ"',props:{style:{color:"#A5D6FF"}}},{content:"]}}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}},{content:'"event"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"add_message"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"data"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}},{content:'"timestamp"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-03-03T17:42:23"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"sender"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"User"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"sender_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"User"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"session_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"d2bbd92b-187e-4c84-b2d4-5df365704201"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"text"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Tell me a story"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"files"',props:{style:{color:"#7EE787"}}},{content:": [], ",props:{style:{color:"#C9D1D9"}}},{content:'"error"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"edit"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"properties"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}},{content:'"text_color"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'""',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"background_color"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'""',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"edited"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"source"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}},{content:'"id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"display_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"source"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:"}, ",props:{style:{color:"#C9D1D9"}}},{content:'"icon"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'""',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"allow_markdown"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"positive_feedback"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"state"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"complete"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"targets"',props:{style:{color:"#7EE787"}}},{content:": []}, ",props:{style:{color:"#C9D1D9"}}},{content:'"category"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"message"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"content_blocks"',props:{style:{color:"#7EE787"}}},{content:": [], ",props:{style:{color:"#C9D1D9"}}},{content:'"id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"28879bd8-6a68-4dd5-b658-74d643a4dd92"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"d2bbd92b-187e-4c84-b2d4-5df365704201"',props:{style:{color:"#A5D6FF"}}},{content:"}}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"// ... Additional events as the flow executes ...",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}},{content:'"event"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"end"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"data"',props:{style:{color:"#7EE787"}}},{content:": {}}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:["The ",(0,s.jsx)(e.code,{children:"/build/$FLOW_ID/events"})," endpoint has a ",(0,s.jsx)(e.code,{children:"stream"})," query parameter that defaults to true.\nTo disable streaming and get all events at once, set ",(0,s.jsx)(e.code,{children:"?stream=false"}),"."]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/build/123e4567-e89b-12d3-a456-426614174000/events?stream=false" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]}),"\n",(0,s.jsx)(e.h2,{id:"build-headers",children:"Build headers"}),"\n",(0,s.jsxs)(e.table,{children:[(0,s.jsx)(e.thead,{children:(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.th,{children:"Header"}),(0,s.jsx)(e.th,{children:"Info"}),(0,s.jsx)(e.th,{children:"Example"})]})}),(0,s.jsxs)(e.tbody,{children:[(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"Content-Type"}),(0,s.jsx)(e.td,{children:"Required. Specifies the JSON format."}),(0,s.jsx)(e.td,{children:'"application/json"'})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"accept"}),(0,s.jsx)(e.td,{children:"Optional. Specifies the response format."}),(0,s.jsx)(e.td,{children:'"application/json"'})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"x-api-key"}),(0,s.jsx)(e.td,{children:"Optional. Required only if authentication is enabled."}),(0,s.jsx)(e.td,{children:'"sk-..."'})]})]})]}),"\n",(0,s.jsx)(e.h2,{id:"build-parameters",children:"Build parameters"}),"\n",(0,s.jsxs)(e.table,{children:[(0,s.jsx)(e.thead,{children:(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.th,{children:"Parameter"}),(0,s.jsx)(e.th,{children:"Type"}),(0,s.jsx)(e.th,{children:"Description"})]})}),(0,s.jsxs)(e.tbody,{children:[(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"inputs"}),(0,s.jsx)(e.td,{children:"object"}),(0,s.jsx)(e.td,{children:"Optional. Input values for flow components."})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"data"}),(0,s.jsx)(e.td,{children:"object"}),(0,s.jsx)(e.td,{children:"Optional. Flow data to override stored configuration."})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"files"}),(0,s.jsx)(e.td,{children:"array[string]"}),(0,s.jsx)(e.td,{children:"Optional. List of file paths to use."})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"start_component_id"}),(0,s.jsx)(e.td,{children:"string"}),(0,s.jsxs)(e.td,{children:["Optional. ID of the component where the execution should start. Component ",(0,s.jsx)(e.code,{children:"id"})," values can be found in ",(0,s.jsx)(e.a,{href:"/concepts-flows-import#langflow-json-file-contents",children:"Langflow JSON files"})]})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"stop_component_id"}),(0,s.jsx)(e.td,{children:"string"}),(0,s.jsxs)(e.td,{children:["Optional. ID of the component where the execution should stop. Component ",(0,s.jsx)(e.code,{children:"id"})," values can be found in ",(0,s.jsx)(e.a,{href:"/concepts-flows-import#langflow-json-file-contents",children:"Langflow JSON files"}),"."]})]}),(0,s.jsxs)(e.tr,{children:[(0,s.jsx)(e.td,{children:"log_builds"}),(0,s.jsx)(e.td,{children:"Boolean"}),(0,s.jsx)(e.td,{children:"Whether to record build logs. Default: Enabled (true)."})]})]})]}),"\n",(0,s.jsx)(e.h3,{id:"set-start-and-stop-points",children:"Set start and stop points"}),"\n",(0,s.jsxs)(e.p,{children:["The ",(0,s.jsx)(e.code,{children:"/build"})," endpoint accepts optional values for ",(0,s.jsx)(e.code,{children:"start_component_id"})," and ",(0,s.jsx)(e.code,{children:"stop_component_id"})," to control where the flow run starts and stops.\nSetting ",(0,s.jsx)(e.code,{children:"stop_component_id"})," for a component triggers the same behavior as clicking ",(0,s.jsx)(e.strong,{children:"Run component"})," on that component in the visual editor: The specified component and all dependent components leading up to that component will run."]}),"\n",(0,s.jsxs)(e.p,{children:["The following example stops flow execution at an ",(0,s.jsx)(e.strong,{children:"OpenAI"})," component:"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/build/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'/flow" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:'\'{"stop_component_id": "OpenAIModel-Uksag"}\'',props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]}),"\n",(0,s.jsx)(e.h3,{id:"override-flow-parameters",children:"Override flow parameters"}),"\n",(0,s.jsxs)(e.p,{children:["The ",(0,s.jsx)(e.code,{children:"/build"})," endpoint also accepts inputs for ",(0,s.jsx)(e.code,{children:"data"})," directly, instead of using the values stored in the Langflow database.\nThis is useful for running flows without having to pass custom values through the visual editor."]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/build/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'/flow" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "data": {',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "nodes": [],',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "edges": []',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "inputs": {',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_value": "Your custom input here",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "session": "session_id"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }'",props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{ ",props:{style:{color:"#C9D1D9"}}},{content:'"job_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"0bcc7f23-40b4-4bfa-9b8a-a44181fd1175"',props:{style:{color:"#A5D6FF"}}},{content:" }",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(e.h2,{id:"see-also",children:"See also"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.a,{href:"/api-monitor#get-vertex-builds",children:"Get Vertex builds"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.a,{href:"/api-monitor#delete-vertex-builds",children:"Delete Vertex builds"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.a,{href:"/session-id",children:"Session ID"})}),"\n"]})]})}function y(o={}){const{wrapper:e}={...(0,r.R)(),...o.components};return e?(0,s.jsx)(e,{...o,children:(0,s.jsx)(h,{...o})}):h(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.")}},11470:(o,e,t)=>{t.d(e,{A:()=>j});var n=t(96540),s=t(18215),r=t(23104),l=t(56347),c=t(205),p=t(57485),i=t(31682),a=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 u(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,i.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 h({value:o,tabValues:e}){return e.some(e=>e.value===o)}function y({queryString:o=!1,groupId:e}){const t=(0,l.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 F(o){const{defaultValue:e,queryString:t=!1,groupId:s}=o,r=u(o),[l,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(!h({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})),[i,d]=y({queryString:t,groupId:s}),[F,D]=function({groupId:o}){const e=function(o){return o?`docusaurus.tab.${o}`:null}(o),[t,s]=(0,a.Dv)(e);return[t,(0,n.useCallback)(o=>{e&&s.set(o)},[e,s])]}({groupId:s}),f=(()=>{const o=i??F;return h({value:o,tabValues:r})?o:null})();(0,c.A)(()=>{f&&p(f)},[f]);return{selectedValue:l,selectValue:(0,n.useCallback)(o=>{if(!h({value:o,tabValues:r}))throw new Error(`Can't select invalid tab value=${o}`);p(o),d(o),D(o)},[d,D,r]),tabValues:r}}var D=t(92303);const f={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var C=t(74848);function b({className:o,block:e,selectedValue:t,selectValue:n,tabValues:l}){const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,r.a_)(),i=o=>{const e=o.currentTarget,s=c.indexOf(e),r=l[s].value;r!==t&&(p(e),n(r))},a=o=>{let e=null;switch(o.key){case"Enter":i(o);break;case"ArrowRight":{const t=c.indexOf(o.currentTarget)+1;e=c[t]??c[0];break}case"ArrowLeft":{const t=c.indexOf(o.currentTarget)-1;e=c[t]??c[c.length-1];break}}e?.focus()};return(0,C.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":e},o),children:l.map(({value:o,label:e,attributes:n})=>(0,C.jsx)("li",{role:"tab",tabIndex:t===o?0:-1,"aria-selected":t===o,ref:o=>{c.push(o)},onKeyDown:a,onClick:i,...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,C.jsx)("div",{className:"margin-top--md",children:r.map((o,e)=>(0,n.cloneElement)(o,{key:e,hidden:o.props.value!==t}))})}function m(o){const e=F(o);return(0,C.jsxs)("div",{className:(0,s.A)("tabs-container",f.tabList),children:[(0,C.jsx)(b,{...e,...o}),(0,C.jsx)(x,{...e,...o})]})}function j(o){const e=(0,D.A)();return(0,C.jsx)(m,{...o,children:d(o.children)},String(e))}},19365:(o,e,t)=>{t.d(e,{A:()=>l});t(96540);var n=t(18215);const s={tabItem:"tabItem_Ymn6"};var r=t(74848);function l({children:o,hidden:e,className:t}){return(0,r.jsx)("div",{role:"tabpanel",className:(0,n.A)(s.tabItem,t),hidden:e,children:o})}},28453:(o,e,t)=>{t.d(e,{R:()=>l,x:()=>c});var n=t(96540);const s={},r=n.createContext(s);function l(o){const e=n.useContext(r);return n.useMemo(function(){return"function"==typeof o?o(e):{...e,...o}},[e,o])}function c(o){let e;return e=o.disableParentContext?"function"==typeof o.components?o.components(s):o.components||s:l(o.components),n.createElement(r.Provider,{value:e},o.children)}}}]); \ No newline at end of file diff --git a/assets/js/1ab69cbd.2adece5b.js b/assets/js/1ab69cbd.2adece5b.js new file mode 100644 index 0000000000..22c1e85406 --- /dev/null +++ b/assets/js/1ab69cbd.2adece5b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[2475],{8593:(o,t,e)=>{e.r(t),e.d(t,{CH:()=>d,assets:()=>i,chCodeConfig:()=>a,contentTitle:()=>p,default:()=>h,frontMatter:()=>c,metadata:()=>n,toc:()=>y});const n=JSON.parse('{"id":"API-Reference/api-build","title":"Build endpoints","description":"The /build endpoints are used by Langflow\'s frontend visual editor code.","source":"@site/docs/API-Reference/api-build.mdx","sourceDirName":"API-Reference","slug":"/api-build","permalink":"/api-build","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Build endpoints","slug":"/api-build"},"sidebar":"docs","previous":{"title":"Monitor endpoints","permalink":"/api-monitor"},"next":{"title":"Users endpoints","permalink":"/api-users"}}');var s=e(74848),r=e(28453),l=e(24754);const c={title:"Build endpoints",slug:"/api-build"},p=void 0,i={},d={annotations:l.hk,Code:l.Cy},a={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},y=[{value:"Build flow and stream events",id:"build-flow-and-stream-events",level:2},{value:"Build headers",id:"build-headers",level:2},{value:"Build parameters",id:"build-parameters",level:2},{value:"Set start and stop points",id:"set-start-and-stop-points",level:3},{value:"Override flow parameters",id:"override-flow-parameters",level:3},{value:"See also",id:"see-also",level:2}];function F(o){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",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)(),...o.components},{Details:e}=t;return d||D("CH",!1),d.Code||D("CH.Code",!0),e||D("Details",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n",(0,s.jsxs)(t.admonition,{type:"important",children:[(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"/build"})," endpoints are used by Langflow's frontend visual editor code.\nThese endpoints are part of the internal Langflow codebase."]}),(0,s.jsxs)(t.p,{children:["Don't use these endpoints to run flows in applications that use your Langflow flows.\nTo run flows in your apps, see ",(0,s.jsx)(t.a,{href:"/api-flows-run",children:"Flow trigger endpoints"}),"."]})]}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"/build"})," endpoints support Langflow's frontend code for building flows in the Langflow visual editor.\nYou can use these endpoints to build vertices and flows, as well as execute flows with streaming event responses.\nYou might need to use or understand these endpoints when contributing to the Langflow codebase."]}),"\n",(0,s.jsx)(t.h2,{id:"build-flow-and-stream-events",children:"Build flow and stream events"}),"\n",(0,s.jsx)(t.p,{children:"This endpoint builds and executes a flow, returning a job ID that can be used to stream execution events."}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Send a POST request to the ",(0,s.jsx)(t.code,{children:"/build/$FLOW_ID/flow"})," endpoint:"]}),"\n",(0,s.jsx)(d.Code,{codeConfig:a,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/build/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'/flow" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "inputs": {',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_value": "Tell me a story"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }'",props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(d.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "job_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"123e4567-e89b-12d3-a456-426614174000"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["After receiving a job ID from the build endpoint, use the ",(0,s.jsx)(t.code,{children:"/build/$JOB_ID/events"})," endpoint to stream the execution results:"]}),"\n",(0,s.jsx)(d.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/build/123e4567-e89b-12d3-a456-426614174000/events" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(d.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}},{content:'"event"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"vertices_sorted"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"data"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}},{content:'"ids"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}},{content:'"ChatInput-XtBLx"',props:{style:{color:"#A5D6FF"}}},{content:"], ",props:{style:{color:"#C9D1D9"}}},{content:'"to_run"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}},{content:'"Prompt-x74Ze"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"ChatOutput-ylMzN"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"ChatInput-XtBLx"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"OpenAIModel-d1wOZ"',props:{style:{color:"#A5D6FF"}}},{content:"]}}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}},{content:'"event"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"add_message"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"data"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}},{content:'"timestamp"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-03-03T17:42:23"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"sender"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"User"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"sender_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"User"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"session_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"d2bbd92b-187e-4c84-b2d4-5df365704201"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"text"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Tell me a story"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"files"',props:{style:{color:"#7EE787"}}},{content:": [], ",props:{style:{color:"#C9D1D9"}}},{content:'"error"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"edit"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"properties"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}},{content:'"text_color"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'""',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"background_color"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'""',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"edited"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"source"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}},{content:'"id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"display_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"source"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:"}, ",props:{style:{color:"#C9D1D9"}}},{content:'"icon"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'""',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"allow_markdown"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"positive_feedback"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"state"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"complete"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"targets"',props:{style:{color:"#7EE787"}}},{content:": []}, ",props:{style:{color:"#C9D1D9"}}},{content:'"category"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"message"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"content_blocks"',props:{style:{color:"#7EE787"}}},{content:": [], ",props:{style:{color:"#C9D1D9"}}},{content:'"id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"28879bd8-6a68-4dd5-b658-74d643a4dd92"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"d2bbd92b-187e-4c84-b2d4-5df365704201"',props:{style:{color:"#A5D6FF"}}},{content:"}}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"// ... Additional events as the flow executes ...",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}},{content:'"event"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"end"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"data"',props:{style:{color:"#7EE787"}}},{content:": {}}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"/build/$FLOW_ID/events"})," endpoint has a ",(0,s.jsx)(t.code,{children:"stream"})," query parameter that defaults to true.\nTo disable streaming and get all events at once, set ",(0,s.jsx)(t.code,{children:"?stream=false"}),"."]}),"\n",(0,s.jsx)(d.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/build/123e4567-e89b-12d3-a456-426614174000/events?stream=false" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]}),"\n",(0,s.jsx)(t.h2,{id:"build-headers",children:"Build headers"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Header"}),(0,s.jsx)(t.th,{children:"Info"}),(0,s.jsx)(t.th,{children:"Example"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Content-Type"}),(0,s.jsx)(t.td,{children:"Required. Specifies the JSON format."}),(0,s.jsx)(t.td,{children:'"application/json"'})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"accept"}),(0,s.jsx)(t.td,{children:"Optional. Specifies the response format."}),(0,s.jsx)(t.td,{children:'"application/json"'})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"x-api-key"}),(0,s.jsx)(t.td,{children:"Optional. Required only if authentication is enabled."}),(0,s.jsx)(t.td,{children:'"sk-..."'})]})]})]}),"\n",(0,s.jsx)(t.h2,{id:"build-parameters",children:"Build parameters"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Parameter"}),(0,s.jsx)(t.th,{children:"Type"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"inputs"}),(0,s.jsx)(t.td,{children:"object"}),(0,s.jsx)(t.td,{children:"Optional. Input values for flow components."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"data"}),(0,s.jsx)(t.td,{children:"object"}),(0,s.jsx)(t.td,{children:"Optional. Flow data to override stored configuration."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"files"}),(0,s.jsx)(t.td,{children:"array[string]"}),(0,s.jsx)(t.td,{children:"Optional. List of file paths to use."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"start_component_id"}),(0,s.jsx)(t.td,{children:"string"}),(0,s.jsxs)(t.td,{children:["Optional. ID of the component where the execution should start. Component ",(0,s.jsx)(t.code,{children:"id"})," values can be found in ",(0,s.jsx)(t.a,{href:"/concepts-flows-import#langflow-json-file-contents",children:"Langflow JSON files"})]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"stop_component_id"}),(0,s.jsx)(t.td,{children:"string"}),(0,s.jsxs)(t.td,{children:["Optional. ID of the component where the execution should stop. Component ",(0,s.jsx)(t.code,{children:"id"})," values can be found in ",(0,s.jsx)(t.a,{href:"/concepts-flows-import#langflow-json-file-contents",children:"Langflow JSON files"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"log_builds"}),(0,s.jsx)(t.td,{children:"Boolean"}),(0,s.jsx)(t.td,{children:"Whether to record build logs. Default: Enabled (true)."})]})]})]}),"\n",(0,s.jsx)(t.h3,{id:"set-start-and-stop-points",children:"Set start and stop points"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"/build"})," endpoint accepts optional values for ",(0,s.jsx)(t.code,{children:"start_component_id"})," and ",(0,s.jsx)(t.code,{children:"stop_component_id"})," to control where the flow run starts and stops.\nSetting ",(0,s.jsx)(t.code,{children:"stop_component_id"})," for a component triggers the same behavior as clicking ",(0,s.jsx)(t.strong,{children:"Run component"})," on that component in the visual editor: The specified component and all dependent components leading up to that component will run."]}),"\n",(0,s.jsxs)(t.p,{children:["The following example stops flow execution at an ",(0,s.jsx)(t.strong,{children:"OpenAI"})," component:"]}),"\n",(0,s.jsx)(d.Code,{codeConfig:a,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/build/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'/flow" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:'\'{"stop_component_id": "OpenAIModel-Uksag"}\'',props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]}),"\n",(0,s.jsx)(t.h3,{id:"override-flow-parameters",children:"Override flow parameters"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"/build"})," endpoint also accepts inputs for ",(0,s.jsx)(t.code,{children:"data"})," directly, instead of using the values stored in the Langflow database.\nThis is useful for running flows without having to pass custom values through the visual editor."]}),"\n",(0,s.jsx)(d.Code,{codeConfig:a,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/build/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'/flow" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "data": {',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "nodes": [],',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "edges": []',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "inputs": {',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_value": "Your custom input here",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "session": "session_id"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }'",props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(d.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{ ",props:{style:{color:"#C9D1D9"}}},{content:'"job_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"0bcc7f23-40b4-4bfa-9b8a-a44181fd1175"',props:{style:{color:"#A5D6FF"}}},{content:" }",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},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:"/api-monitor#get-vertex-builds",children:"Get Vertex builds"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"/api-monitor#delete-vertex-builds",children:"Delete Vertex builds"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"/session-id",children:"Session ID"})}),"\n"]})]})}function h(o={}){const{wrapper:t}={...(0,r.R)(),...o.components};return t?(0,s.jsx)(t,{...o,children:(0,s.jsx)(F,{...o})}):F(o)}function D(o,t){throw new Error("Expected "+(t?"component":"object")+" `"+o+"` to be defined: you likely forgot to import, pass, or provide it.")}},28453:(o,t,e)=>{e.d(t,{R:()=>l,x:()=>c});var n=e(96540);const s={},r=n.createContext(s);function l(o){const t=n.useContext(r);return n.useMemo(function(){return"function"==typeof o?o(t):{...t,...o}},[t,o])}function c(o){let t;return t=o.disableParentContext?"function"==typeof o.components?o.components(s):o.components||s:l(o.components),n.createElement(r.Provider,{value:t},o.children)}}}]); \ No newline at end of file diff --git a/assets/js/20177945.2985f669.js b/assets/js/20177945.2985f669.js new file mode 100644 index 0000000000..6455fb8a8d --- /dev/null +++ b/assets/js/20177945.2985f669.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[8392],{11470:(o,e,t)=>{t.d(e,{A:()=>C});var n=t(96540),s=t(18215),r=t(23104),l=t(56347),c=t(205),p=t(57485),i=t(31682),a=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 u(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,i.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 h({value:o,tabValues:e}){return e.some(e=>e.value===o)}function y({queryString:o=!1,groupId:e}){const t=(0,l.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 F(o){const{defaultValue:e,queryString:t=!1,groupId:s}=o,r=u(o),[l,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(!h({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})),[i,d]=y({queryString:t,groupId:s}),[F,D]=function({groupId:o}){const e=function(o){return o?`docusaurus.tab.${o}`:null}(o),[t,s]=(0,a.Dv)(e);return[t,(0,n.useCallback)(o=>{e&&s.set(o)},[e,s])]}({groupId:s}),m=(()=>{const o=i??F;return h({value:o,tabValues:r})?o:null})();(0,c.A)(()=>{m&&p(m)},[m]);return{selectedValue:l,selectValue:(0,n.useCallback)(o=>{if(!h({value:o,tabValues:r}))throw new Error(`Can't select invalid tab value=${o}`);p(o),d(o),D(o)},[d,D,r]),tabValues:r}}var D=t(92303);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var x=t(74848);function f({className:o,block:e,selectedValue:t,selectValue:n,tabValues:l}){const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,r.a_)(),i=o=>{const e=o.currentTarget,s=c.indexOf(e),r=l[s].value;r!==t&&(p(e),n(r))},a=o=>{let e=null;switch(o.key){case"Enter":i(o);break;case"ArrowRight":{const t=c.indexOf(o.currentTarget)+1;e=c[t]??c[0];break}case"ArrowLeft":{const t=c.indexOf(o.currentTarget)-1;e=c[t]??c[c.length-1];break}}e?.focus()};return(0,x.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":e},o),children:l.map(({value:o,label:e,attributes:n})=>(0,x.jsx)("li",{role:"tab",tabIndex:t===o?0:-1,"aria-selected":t===o,ref:o=>{c.push(o)},onKeyDown:a,onClick:i,...n,className:(0,s.A)("tabs__item",m.tabItem,n?.className,{"tabs__item--active":t===o}),children:e??o},o))})}function g({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,x.jsx)("div",{className:"margin-top--md",children:r.map((o,e)=>(0,n.cloneElement)(o,{key:e,hidden:o.props.value!==t}))})}function j(o){const e=F(o);return(0,x.jsxs)("div",{className:(0,s.A)("tabs-container",m.tabList),children:[(0,x.jsx)(f,{...e,...o}),(0,x.jsx)(g,{...e,...o})]})}function C(o){const e=(0,D.A)();return(0,x.jsx)(j,{...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:()=>l});t(96540);var n=t(18215);const s={tabItem:"tabItem_Ymn6"};var r=t(74848);function l({children:o,hidden:e,className:t}){return(0,r.jsx)("div",{role:"tabpanel",className:(0,n.A)(s.tabItem,t),hidden:e,children:o})}},58950:(o,e,t)=>{t.r(e),t.d(e,{CH:()=>u,assets:()=>d,chCodeConfig:()=>h,contentTitle:()=>a,default:()=>D,frontMatter:()=>i,metadata:()=>n,toc:()=>y});const n=JSON.parse('{"id":"Components/components-custom-components","title":"Create custom Python components","description":"Custom components extend Langflow\'s functionality through Python classes that inherit from Component. This enables integration of new features, data manipulation, external services, and specialized tools.","source":"@site/docs/Components/components-custom-components.mdx","sourceDirName":"Components","slug":"/components-custom-components","permalink":"/components-custom-components","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Create custom Python components","slug":"/components-custom-components"},"sidebar":"docs","previous":{"title":"xAI","permalink":"/bundles-xai"},"next":{"title":"Get started with the Langflow API","permalink":"/api-reference-api-examples"}}');var s=t(74848),r=t(28453),l=t(24754),c=(t(17886),t(11470)),p=t(19365);const i={title:"Create custom Python components",slug:"/components-custom-components"},a=void 0,d={},u={annotations:l.hk,Code:l.Cy},h={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},y=[{value:"Class-level attributes",id:"class-level-attributes",level:2},{value:"Structure of a custom component",id:"structure-of-a-custom-component",level:3},{value:"Internal Lifecycle and Execution Flow",id:"internal-lifecycle-and-execution-flow",level:3},{value:"Inputs and outputs",id:"inputs-and-outputs",level:3},{value:"Associated Methods",id:"associated-methods",level:3},{value:"Components with multiple outputs",id:"components-with-multiple-outputs",level:3},{value:"Output Grouping Behavior with group_outputs",id:"output-grouping-behavior-with-group_outputs",level:4},{value:"Common internal patterns",id:"common-internal-patterns",level:3},{value:"_pre_run_setup()",id:"_pre_run_setup",level:4},{value:"Override run or _run",id:"override-run-or-_run",level:4},{value:"Store data in self.ctx",id:"store-data-in-selfctx",level:4},{value:"Directory structure requirements",id:"directory-structure-requirements",level:2},{value:"Custom component inputs and outputs",id:"custom-component-inputs-and-outputs",level:2},{value:"Inputs",id:"inputs",level:3},{value:"Outputs",id:"outputs",level:3},{value:"Tool Mode",id:"tool-mode",level:3},{value:"Typed annotations",id:"typed-annotations",level:2},{value:"Common Return Types",id:"common-return-types",level:3},{value:"Tips for typed annotations",id:"tips-for-typed-annotations",level:3},{value:"Enable dynamic fields",id:"enable-dynamic-fields",level:2},{value:"Implement update_build_config",id:"implement-update_build_config",level:3},{value:"Additional Dynamic Field Controls",id:"additional-dynamic-field-controls",level:3},{value:"Tips for Managing Dynamic Fields",id:"tips-for-managing-dynamic-fields",level:3},{value:"Error handling and logging",id:"error-handling-and-logging",level:2},{value:"Error handling techniques",id:"error-handling-techniques",level:3},{value:"Improve debugging and flow management",id:"improve-debugging-and-flow-management",level:3},{value:"Tips for error handling and logging",id:"tips-for-error-handling-and-logging",level:3},{value:"Contribute custom components to Langflow",id:"contribute-custom-components-to-langflow",level:2}];function F(o){const e={a:"a",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...o.components};return u||m("CH",!1),u.Code||m("CH.Code",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n","\n",(0,s.jsxs)(e.p,{children:["Custom components extend Langflow's functionality through Python classes that inherit from ",(0,s.jsx)(e.code,{children:"Component"}),". This enables integration of new features, data manipulation, external services, and specialized tools."]}),"\n",(0,s.jsx)(e.p,{children:'In Langflow\'s node-based environment, each node is a "component" that performs discrete functions. Custom components are Python classes which define:'}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Inputs"})," \u2014 Data or parameters your component requires."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Outputs"})," \u2014 Data your component provides to downstream nodes."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Logic"})," \u2014 How you process inputs to produce outputs."]}),"\n"]}),"\n",(0,s.jsx)(e.p,{children:"The benefits of creating custom components include unlimited extensibility, reusability, automatic field generation in the visual editor based on inputs, and type-safe connections between nodes."}),"\n",(0,s.jsx)(e.p,{children:"Create custom components for performing specialized tasks, calling APIs, or adding advanced logic."}),"\n",(0,s.jsx)(e.p,{children:"Custom components in Langflow are built upon:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:["The Python class that inherits from ",(0,s.jsx)(e.code,{children:"Component"}),"."]}),"\n",(0,s.jsx)(e.li,{children:"Class-level attributes that identify and describe the component."}),"\n",(0,s.jsx)(e.li,{children:"Input and output lists that determine data flow."}),"\n",(0,s.jsx)(e.li,{children:"Internal variables for logging and advanced logic."}),"\n"]}),"\n",(0,s.jsx)(e.h2,{id:"class-level-attributes",children:"Class-level attributes"}),"\n",(0,s.jsx)(e.p,{children:"Define these attributes to control a custom component's appearance and behavior:"}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"class ",props:{style:{color:"#FF7B72"}}},{content:"MyCsvReader",props:{style:{color:"#FFA657"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"Component",props:{style:{color:"#79C0FF"}}},{content:"):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"CSV Reader"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" description ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"Reads CSV files"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" icon ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"file-text"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" name ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"CSVReader"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" documentation ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"http://docs.example.com/csv_reader"',props:{style:{color:"#A5D6FF"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:"display_name"}),": A user-friendly label shown in the visual editor."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:"description"}),": A brief summary shown in tooltips and printed below the component name when added to a flow."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:"icon"}),": A decorative icon from Langflow's icon library, printed next to the name."]}),"\n",(0,s.jsxs)(e.p,{children:["Langflow uses ",(0,s.jsx)(e.a,{href:"https://lucide.dev/icons",children:"Lucide"})," for icons. To assign an icon to your component, set the icon attribute to the name of a Lucide icon as a string, such as ",(0,s.jsx)(e.code,{children:'icon = "file-text"'}),". Langflow renders icons from the Lucide library automatically."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:"name"}),": A unique internal identifier, typically the same name as the folder containing your component code."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:"documentation"}),": An optional link to external documentation, such as API or product documentation."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(e.h3,{id:"structure-of-a-custom-component",children:"Structure of a custom component"}),"\n",(0,s.jsx)(e.p,{children:"A Langflow custom component is more than a class with inputs and outputs. It includes an internal structure with optional lifecycle steps, output generation, front-end interaction, and logic organization."}),"\n",(0,s.jsx)(e.p,{children:"A basic component:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:["Inherits from ",(0,s.jsx)(e.code,{children:"langflow.custom.Component"}),"."]}),"\n",(0,s.jsxs)(e.li,{children:["Declares metadata like ",(0,s.jsx)(e.code,{children:"display_name"}),", ",(0,s.jsx)(e.code,{children:"description"}),", ",(0,s.jsx)(e.code,{children:"icon"}),", and more."]}),"\n",(0,s.jsxs)(e.li,{children:["Defines ",(0,s.jsx)(e.code,{children:"inputs"})," and ",(0,s.jsx)(e.code,{children:"outputs"})," lists."]}),"\n",(0,s.jsx)(e.li,{children:"Implements methods matching output specifications."}),"\n"]}),"\n",(0,s.jsx)(e.p,{children:"A minimal custom component skeleton contains the following:"}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.custom ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Component",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.template ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Output",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"class ",props:{style:{color:"#FF7B72"}}},{content:"MyComponent",props:{style:{color:"#FFA657"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"Component",props:{style:{color:"#79C0FF"}}},{content:"):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"My Component"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" description ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"A short summary."',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" icon ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"sparkles"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" name ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"MyComponent"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" inputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" []",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" outputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" []",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" def ",props:{style:{color:"#FF7B72"}}},{content:"some_output_method",props:{style:{color:"#D2A8FF"}}},{content:"(self):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return ",props:{style:{color:"#FF7B72"}}},{content:"...",props:{style:{color:"#79C0FF"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(e.h3,{id:"internal-lifecycle-and-execution-flow",children:"Internal Lifecycle and Execution Flow"}),"\n",(0,s.jsx)(e.p,{children:"Langflow's engine manages:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Instantiation"}),": A component is created and internal structures are initialized."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Assigning Inputs"}),": Values from the visual editor or connections are assigned to component fields."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Validation and Setup"}),": Optional hooks like ",(0,s.jsx)(e.code,{children:"_pre_run_setup"}),"."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Outputs Generation"}),": ",(0,s.jsx)(e.code,{children:"run()"})," or ",(0,s.jsx)(e.code,{children:"build_results()"})," triggers output methods."]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Optional Hooks"}),":"]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"initialize_data"})," or ",(0,s.jsx)(e.code,{children:"_pre_run_setup"})," can run setup logic before the component's main execution."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"__call__"}),", ",(0,s.jsx)(e.code,{children:"run()"}),", or ",(0,s.jsx)(e.code,{children:"_run()"})," can be overridden to customize how the component is called or to define custom execution logic."]}),"\n"]}),"\n",(0,s.jsx)(e.h3,{id:"inputs-and-outputs",children:"Inputs and outputs"}),"\n",(0,s.jsx)(e.p,{children:"Custom component inputs are defined with properties like:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"name"}),", ",(0,s.jsx)(e.code,{children:"display_name"})]}),"\n",(0,s.jsxs)(e.li,{children:["Optional: ",(0,s.jsx)(e.code,{children:"info"}),", ",(0,s.jsx)(e.code,{children:"value"}),", ",(0,s.jsx)(e.code,{children:"advanced"}),", ",(0,s.jsx)(e.code,{children:"is_list"}),", ",(0,s.jsx)(e.code,{children:"tool_mode"}),", ",(0,s.jsx)(e.code,{children:"real_time_refresh"})]}),"\n"]}),"\n",(0,s.jsx)(e.p,{children:"For example:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"StrInput"}),": simple text input."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"DropdownInput"}),": selectable options."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"HandleInput"}),": specialized connections."]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:["Custom component ",(0,s.jsx)(e.code,{children:"Output"})," properties define:"]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"name"}),", ",(0,s.jsx)(e.code,{children:"display_name"}),", ",(0,s.jsx)(e.code,{children:"method"})]}),"\n",(0,s.jsxs)(e.li,{children:["Optional: ",(0,s.jsx)(e.code,{children:"info"})]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:["For more information, see ",(0,s.jsx)(e.a,{href:"/components-custom-components#custom-component-inputs-and-outputs",children:"Custom component inputs and outputs"}),"."]}),"\n",(0,s.jsx)(e.h3,{id:"associated-methods",children:"Associated Methods"}),"\n",(0,s.jsx)(e.p,{children:"Each output is linked to a method:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:"The output method name must match the method name."}),"\n",(0,s.jsx)(e.li,{children:"The method typically returns objects like Message, Data, or DataFrame."}),"\n",(0,s.jsxs)(e.li,{children:["The method can use inputs with ",(0,s.jsx)(e.code,{children:"self."}),"."]}),"\n"]}),"\n",(0,s.jsx)(e.p,{children:"For example:"}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Output(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"File Contents"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"file_contents"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" method",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"read_file"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:")",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"#...",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"read_file",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> Data:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" path ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".filename",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" with ",props:{style:{color:"#FF7B72"}}},{content:"open",props:{style:{color:"#79C0FF"}}},{content:"(path, ",props:{style:{color:"#C9D1D9"}}},{content:'"r"',props:{style:{color:"#A5D6FF"}}},{content:") ",props:{style:{color:"#C9D1D9"}}},{content:"as",props:{style:{color:"#FF7B72"}}},{content:" f:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" content ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" f.read()",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" self",props:{style:{color:"#79C0FF"}}},{content:".status ",props:{style:{color:"#C9D1D9"}}},{content:"= f",props:{style:{color:"#FF7B72"}}},{content:'"Read ',props:{style:{color:"#A5D6FF"}}},{content:"{len",props:{style:{color:"#79C0FF"}}},{content:"(content)",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:" chars from ",props:{style:{color:"#A5D6FF"}}},{content:"{",props:{style:{color:"#79C0FF"}}},{content:"path",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" Data(",props:{style:{color:"#C9D1D9"}}},{content:"data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"{",props:{style:{color:"#C9D1D9"}}},{content:'"content"',props:{style:{color:"#A5D6FF"}}},{content:": content})",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(e.h3,{id:"components-with-multiple-outputs",children:"Components with multiple outputs"}),"\n",(0,s.jsx)(e.p,{children:"A component can define multiple outputs.\nEach output can have a different corresponding method.\nFor example:"}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"outputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" Output(",props:{style:{color:"#C9D1D9"}}},{content:"display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Processed Data"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"processed_data"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"method",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"process_data"',props:{style:{color:"#A5D6FF"}}},{content:"),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" Output(",props:{style:{color:"#C9D1D9"}}},{content:"display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Debug Info"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"debug_info"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"method",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"provide_debug_info"',props:{style:{color:"#A5D6FF"}}},{content:"),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsxs)(e.h4,{id:"output-grouping-behavior-with-group_outputs",children:["Output Grouping Behavior with ",(0,s.jsx)(e.code,{children:"group_outputs"})]}),"\n",(0,s.jsx)(e.p,{children:"By default, components in Langflow that produce multiple outputs only allow one output selection in the visual editor.\nThe component will have only one output port where the user can select the preferred output type."}),"\n",(0,s.jsxs)(e.p,{children:["This behavior is controlled by the ",(0,s.jsx)(e.code,{children:"group_outputs"})," parameter:"]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsxs)(e.strong,{children:[(0,s.jsx)(e.code,{children:"group_outputs=False"})," (default)"]}),": When a component has more than one output and ",(0,s.jsx)(e.code,{children:"group_outputs"})," is false or not set, the outputs are grouped in the visual editor, and the user must select one."]}),"\n",(0,s.jsx)(e.p,{children:"Use this option when the component is expected to return only one type of output when used in a flow."}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"group_outputs=True"})}),": All outputs are available simultaneously in the visual editor. The component has one output port for each output, and the user can connect zero or more outputs to other components."]}),"\n",(0,s.jsx)(e.p,{children:"Use this option when the component is expected to return multiple values that are used in parallel by downstream components or processes."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsxs)(p.A,{value:"false",label:"False or not set",default:!0,children:[(0,s.jsxs)(e.p,{children:["In this example, the visual editor provides a single output port, and the user can select one of the outputs.\nSince ",(0,s.jsx)(e.code,{children:"group_outputs=False"})," is the default behavior, it doesn't need to be explicitly set in the component, as shown in this example:"]}),(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"outputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" Output(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"structured_output"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Structured Output"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" method",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"build_structured_output"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" Output(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"dataframe_output"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"DataFrame Output"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" method",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"build_structured_dataframe"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]})]}),(0,s.jsxs)(p.A,{value:"true",label:"True",children:[(0,s.jsx)(e.p,{children:"In this example, all outputs are available simultaneously in the visual editor:"}),(0,s.jsxs)(e.ol,{start:"2",children:["\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.code,{children:"group_outputs=True"})}),"\n"]}),(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"outputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" Output(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"true_result"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"True"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" method",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"true_response"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" group_outputs",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:" Output(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"false_result"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"False"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" method",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"false_response"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" group_outputs",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"True",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]})]})]}),"\n",(0,s.jsx)(e.h3,{id:"common-internal-patterns",children:"Common internal patterns"}),"\n",(0,s.jsx)(e.h4,{id:"_pre_run_setup",children:(0,s.jsx)(e.code,{children:"_pre_run_setup()"})}),"\n",(0,s.jsx)(e.p,{children:"To initialize a custom component with counters set:"}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"_pre_run_setup",props:{style:{color:"#D2A8FF"}}},{content:"(self):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" if not ",props:{style:{color:"#FF7B72"}}},{content:"hasattr",props:{style:{color:"#79C0FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"_initialized"',props:{style:{color:"#A5D6FF"}}},{content:"):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" self",props:{style:{color:"#79C0FF"}}},{content:"._initialized ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"True",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" self",props:{style:{color:"#79C0FF"}}},{content:".iteration ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"0",props:{style:{color:"#79C0FF"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsxs)(e.h4,{id:"override-run-or-_run",children:["Override ",(0,s.jsx)(e.code,{children:"run"})," or ",(0,s.jsx)(e.code,{children:"_run"})]}),"\n",(0,s.jsxs)(e.p,{children:["You can override ",(0,s.jsx)(e.code,{children:"async def _run(self): ..."})," to define custom execution logic, although the default behavior from the base class usually covers most cases."]}),"\n",(0,s.jsxs)(e.h4,{id:"store-data-in-selfctx",children:["Store data in ",(0,s.jsx)(e.code,{children:"self.ctx"})]}),"\n",(0,s.jsxs)(e.p,{children:["Use ",(0,s.jsx)(e.code,{children:"self.ctx"})," as a shared storage for data or counters across the component's execution flow:"]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"some_method",props:{style:{color:"#D2A8FF"}}},{content:"(self):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" count ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".ctx.get(",props:{style:{color:"#C9D1D9"}}},{content:'"my_count"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"0",props:{style:{color:"#79C0FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" self",props:{style:{color:"#79C0FF"}}},{content:".ctx[",props:{style:{color:"#C9D1D9"}}},{content:'"my_count"',props:{style:{color:"#A5D6FF"}}},{content:"] ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" count ",props:{style:{color:"#C9D1D9"}}},{content:"+ ",props:{style:{color:"#FF7B72"}}},{content:"1",props:{style:{color:"#79C0FF"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(e.h2,{id:"directory-structure-requirements",children:"Directory structure requirements"}),"\n",(0,s.jsxs)(e.p,{children:["By default, Langflow looks for custom components in the ",(0,s.jsx)(e.code,{children:"/components"})," directory."]}),"\n",(0,s.jsxs)(e.p,{children:["If you're creating custom components in a different location using the ",(0,s.jsx)(e.code,{children:"LANGFLOW_COMPONENTS_PATH"})," ",(0,s.jsx)(e.a,{href:"/environment-variables",children:"environment variable"}),", components must be organized in a specific directory structure to be properly loaded and displayed in the visual editor:"]}),"\n",(0,s.jsxs)(e.p,{children:["Each category directory ",(0,s.jsx)(e.strong,{children:"must"})," contain an ",(0,s.jsx)(e.code,{children:"__init__.py"})," file for Langflow to properly recognize and load the components.\nThis is a Python package requirement that ensures the directory is treated as a module."]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"/your/custom/components/path/ # Base directory set by LANGFLOW_COMPONENTS_PATH",props:{}}]},{tokens:[{content:" \u2514\u2500\u2500 category_name/ # Required category subfolder that determines menu name",props:{}}]},{tokens:[{content:" \u251c\u2500\u2500 __init__.py # Required",props:{}}]},{tokens:[{content:" \u2514\u2500\u2500 custom_component.py # Component file",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsx)(e.p,{children:"Components must be placed inside category folders, not directly in the base directory."}),"\n",(0,s.jsxs)(e.p,{children:["The category folder name determines where the component appears in the Langflow ",(0,s.jsx)(e.strong,{children:"Components"})," menu.\nFor example, to add a component to the ",(0,s.jsx)(e.strong,{children:"Helpers"})," category, place it in the ",(0,s.jsx)(e.code,{children:"helpers"})," subfolder:"]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"/app/custom_components/ # LANGFLOW_COMPONENTS_PATH",props:{}}]},{tokens:[{content:' \u2514\u2500\u2500 helpers/ # Displayed within the "Helpers" category',props:{}}]},{tokens:[{content:" \u251c\u2500\u2500 __init__.py # Required",props:{}}]},{tokens:[{content:" \u2514\u2500\u2500 custom_component.py # Your component",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsx)(e.p,{children:"You can have multiple category folders to organize components into different categories:"}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"/app/custom_components/",props:{}}]},{tokens:[{content:" \u251c\u2500\u2500 helpers/",props:{}}]},{tokens:[{content:" \u2502 \u251c\u2500\u2500 __init__.py",props:{}}]},{tokens:[{content:" \u2502 \u2514\u2500\u2500 helper_component.py",props:{}}]},{tokens:[{content:" \u2514\u2500\u2500 tools/",props:{}}]},{tokens:[{content:" \u251c\u2500\u2500 __init__.py",props:{}}]},{tokens:[{content:" \u2514\u2500\u2500 tool_component.py",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsx)(e.p,{children:"This folder structure is required for Langflow to properly discover and load your custom components. Components placed directly in the base directory aren't loaded."}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"/app/custom_components/ # LANGFLOW_COMPONENTS_PATH",props:{}}]},{tokens:[{content:" \u2514\u2500\u2500 custom_component.py # Won't be loaded - missing category folder!",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsx)(e.h2,{id:"custom-component-inputs-and-outputs",children:"Custom component inputs and outputs"}),"\n",(0,s.jsx)(e.p,{children:"Inputs and outputs define how data flows through the component, how it appears in the visual editor, and how connections to other components are validated."}),"\n",(0,s.jsx)(e.h3,{id:"inputs",children:"Inputs"}),"\n",(0,s.jsxs)(e.p,{children:["Inputs are defined in a class-level ",(0,s.jsx)(e.code,{children:"inputs"})," list. When Langflow loads the component, it uses this list to render component fields and ",(0,s.jsx)(e.a,{href:"/concepts-components#component-ports",children:"ports"})," in the visual editor. Users or other components provide values or connections to fill these inputs."]}),"\n",(0,s.jsxs)(e.p,{children:["An input is usually an instance of a class from ",(0,s.jsx)(e.code,{children:"langflow.io"})," (such as ",(0,s.jsx)(e.code,{children:"StrInput"}),", ",(0,s.jsx)(e.code,{children:"DataInput"}),", or ",(0,s.jsx)(e.code,{children:"MessageTextInput"}),"). The most common constructor parameters are:"]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"name"})}),": The internal variable name, accessed with ",(0,s.jsx)(e.code,{children:"self."}),"."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"display_name"})}),": The label shown to users in the visual editor."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"info"})})," ",(0,s.jsx)(e.em,{children:"(optional)"}),": A tooltip or short description."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"value"})})," ",(0,s.jsx)(e.em,{children:"(optional)"}),": The default value."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"advanced"})})," ",(0,s.jsx)(e.em,{children:"(optional)"}),': If true, moves the field into the "Advanced" section.']}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"required"})})," ",(0,s.jsx)(e.em,{children:"(optional)"}),": If true, forces the user to provide a value."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"is_list"})})," ",(0,s.jsx)(e.em,{children:"(optional)"}),": If true, allows multiple values."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"input_types"})})," ",(0,s.jsx)(e.em,{children:"(optional)"}),": Restricts allowed connection types (e.g., ",(0,s.jsx)(e.code,{children:'["Data"]'}),", ",(0,s.jsx)(e.code,{children:'["LanguageModel"]'}),")."]}),"\n"]}),"\n",(0,s.jsx)(e.p,{children:"Here are the most commonly used input classes and their typical usage."}),"\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Text Inputs"}),": For simple text entries."]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"StrInput"})})," creates a single-line text field."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"MultilineInput"})})," creates a multi-line text area."]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Numeric and Boolean Inputs"}),": Ensures users can only enter valid numeric or Boolean data."]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"BoolInput"})}),", ",(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"IntInput"})}),", and ",(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"FloatInput"})})," provide fields for Boolean, integer, and float values, ensuring type consistency."]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Dropdowns"}),": For selecting from predefined options, useful for modes or levels."]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"DropdownInput"})})}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Secrets"}),": A specialized input for sensitive data, ensuring input is hidden in the visual editor."]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"SecretStrInput"})})," for API keys and passwords."]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Specialized Data Inputs"}),": Ensures type-checking and color-coded connections in the visual editor."]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"DataInput"})})," expects a ",(0,s.jsx)(e.code,{children:"Data"})," object (typically with ",(0,s.jsx)(e.code,{children:".data"})," and optional ",(0,s.jsx)(e.code,{children:".text"}),")."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"MessageInput"})})," expects a ",(0,s.jsx)(e.code,{children:"Message"})," object, used in chat or agent flows."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"MessageTextInput"})})," simplifies access to the ",(0,s.jsx)(e.code,{children:".text"})," field of a ",(0,s.jsx)(e.code,{children:"Message"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Handle-Based Inputs"}),": Used to connect outputs of specific types, ensuring correct pipeline connections."]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"HandleInput"})})}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"File Uploads"}),": Allows users to upload files directly through the visual editor or receive file paths from other components."]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"FileInput"})})}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Lists"}),": Set ",(0,s.jsx)(e.code,{children:"is_list=True"})," to accept multiple values, ideal for batch or grouped operations."]}),"\n",(0,s.jsxs)(e.p,{children:["This example defines three inputs: a text field (",(0,s.jsx)(e.code,{children:"StrInput"}),"), a Boolean toggle (",(0,s.jsx)(e.code,{children:"BoolInput"}),"), and a dropdown selection (",(0,s.jsx)(e.code,{children:"DropdownInput"}),")."]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.io ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" StrInput, BoolInput, DropdownInput",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"inputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" StrInput(",props:{style:{color:"#C9D1D9"}}},{content:"name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"title"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Title"',props:{style:{color:"#A5D6FF"}}},{content:"),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" BoolInput(",props:{style:{color:"#C9D1D9"}}},{content:"name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"enabled"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Enabled"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"value",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"True",props:{style:{color:"#79C0FF"}}},{content:"),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" DropdownInput(",props:{style:{color:"#C9D1D9"}}},{content:"name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"mode"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Mode"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"options",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"[",props:{style:{color:"#C9D1D9"}}},{content:'"Fast"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"Safe"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"Experimental"',props:{style:{color:"#A5D6FF"}}},{content:"], ",props:{style:{color:"#C9D1D9"}}},{content:"value",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Safe"',props:{style:{color:"#A5D6FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(e.h3,{id:"outputs",children:"Outputs"}),"\n",(0,s.jsxs)(e.p,{children:["Outputs are defined in a class-level ",(0,s.jsx)(e.code,{children:"outputs"})," list. When Langflow renders a component, each output becomes a connector point in the visual editor. When you connect something to an output, Langflow automatically calls the corresponding method and passes the returned object to the next component."]}),"\n",(0,s.jsxs)(e.p,{children:["An output is usually an instance of ",(0,s.jsx)(e.code,{children:"Output"})," from ",(0,s.jsx)(e.code,{children:"langflow.io"}),", with common parameters:"]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"name"})}),": The internal variable name."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"display_name"})}),": The label shown in the visual editor."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"method"})}),": The name of the method called to produce the output."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"info"})})," ",(0,s.jsx)(e.em,{children:"(optional)"}),": Help text shown on hover."]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:["The method must exist in the class, and it is recommended to annotate its return type for better type checking.\nYou can also set a ",(0,s.jsx)(e.code,{children:"self.status"})," message inside the method to show progress or logs."]}),"\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Common Return Types"}),":"]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"Message"})}),": Structured chat messages."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"Data"})}),": Flexible object with ",(0,s.jsx)(e.code,{children:".data"})," and optional ",(0,s.jsx)(e.code,{children:".text"}),"."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"DataFrame"})}),": Pandas-based tables (",(0,s.jsx)(e.code,{children:"langflow.schema.DataFrame"}),")."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Primitive types"}),": ",(0,s.jsx)(e.code,{children:"str"}),", ",(0,s.jsx)(e.code,{children:"int"}),", ",(0,s.jsx)(e.code,{children:"bool"})," (not recommended if you need type/color consistency)."]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:["In this example, the ",(0,s.jsx)(e.code,{children:"DataToDataFrame"})," component defines its output using the outputs list. The ",(0,s.jsx)(e.code,{children:"df_out"})," output is linked to the ",(0,s.jsx)(e.code,{children:"build_df"})," method, so when connected to another component (node), Langflow calls this method and passes its returned ",(0,s.jsx)(e.code,{children:"DataFrame"})," to the next node. This demonstrates how each output maps to a method that generates the actual output data."]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.custom ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Component",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.io ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" DataInput, Output",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.schema ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Data, DataFrame",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"class ",props:{style:{color:"#FF7B72"}}},{content:"DataToDataFrame",props:{style:{color:"#FFA657"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"Component",props:{style:{color:"#79C0FF"}}},{content:"):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"Data to DataFrame"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" description ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"Convert multiple Data objects into a DataFrame"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" icon ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"table"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" name ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"DataToDataFrame"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" inputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" DataInput(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"items"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Data Items"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" info",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"List of Data objects to convert"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" is_list",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"True",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" )",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" outputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" Output(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"df_out"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"DataFrame Output"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" method",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"build_df"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" )",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" def ",props:{style:{color:"#FF7B72"}}},{content:"build_df",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> DataFrame:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" rows ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" []",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" for",props:{style:{color:"#FF7B72"}}},{content:" item ",props:{style:{color:"#C9D1D9"}}},{content:"in ",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".items:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" row_dict ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" item.data.copy() ",props:{style:{color:"#C9D1D9"}}},{content:"if",props:{style:{color:"#FF7B72"}}},{content:" item.data ",props:{style:{color:"#C9D1D9"}}},{content:"else",props:{style:{color:"#FF7B72"}}},{content:" {}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" row_dict[",props:{style:{color:"#C9D1D9"}}},{content:'"text"',props:{style:{color:"#A5D6FF"}}},{content:"] ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" item.get_text() ",props:{style:{color:"#C9D1D9"}}},{content:"or ",props:{style:{color:"#FF7B72"}}},{content:'""',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" rows.append(row_dict)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" df ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" DataFrame(rows)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" self",props:{style:{color:"#79C0FF"}}},{content:".status ",props:{style:{color:"#C9D1D9"}}},{content:"= f",props:{style:{color:"#FF7B72"}}},{content:'"Built DataFrame with ',props:{style:{color:"#A5D6FF"}}},{content:"{len",props:{style:{color:"#79C0FF"}}},{content:"(rows)",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:' rows."',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" df",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(e.h3,{id:"tool-mode",children:"Tool Mode"}),"\n",(0,s.jsxs)(e.p,{children:["Components that support ",(0,s.jsx)(e.strong,{children:"Tool Mode"})," can be used as standalone components (when ",(0,s.jsx)(e.em,{children:"not"})," in ",(0,s.jsx)(e.strong,{children:"Tool Mode"}),") or as tools for other components with a ",(0,s.jsx)(e.strong,{children:"Tools"})," input, such as ",(0,s.jsx)(e.strong,{children:"Agent"})," components."]}),"\n",(0,s.jsxs)(e.p,{children:["You can allow a custom component to support ",(0,s.jsx)(e.strong,{children:"Tool Mode"})," by setting ",(0,s.jsx)(e.code,{children:"tool_mode=True"}),":"]}),"\n",(0,s.jsx)(u.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:" MessageTextInput(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"message"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Mensage"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" info",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Enter the message that will be processed directly by the tool"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" tool_mode",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"True",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsxs)(e.p,{children:["Langflow currently supports the following input types for ",(0,s.jsx)(e.strong,{children:"Tool Mode"}),":"]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.code,{children:"DataInput"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.code,{children:"DataFrameInput"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.code,{children:"PromptInput"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.code,{children:"MessageTextInput"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.code,{children:"MultilineInput"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.code,{children:"DropdownInput"})}),"\n"]}),"\n",(0,s.jsx)(e.h2,{id:"typed-annotations",children:"Typed annotations"}),"\n",(0,s.jsxs)(e.p,{children:["In Langflow, ",(0,s.jsx)(e.strong,{children:"typed annotations"})," allow Langflow to visually guide users and maintain flow consistency."]}),"\n",(0,s.jsx)(e.p,{children:"Typed annotations provide:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Color-coding"}),": Outputs like ",(0,s.jsx)(e.code,{children:"-> Data"})," or ",(0,s.jsx)(e.code,{children:"-> Message"})," get distinct colors."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Validation"}),": Langflow blocks incompatible connections automatically."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Readability"}),": Developers can quickly understand data flow."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Development tools"}),": Better code suggestions and error checking in your code editor."]}),"\n"]}),"\n",(0,s.jsx)(e.h3,{id:"common-return-types",children:"Common Return Types"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:"Message"}),": For chat-style outputs. Connects to any of several ",(0,s.jsx)(e.code,{children:"Message"}),"-compatible inputs."]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"produce_message",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> Message:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" Message(",props:{style:{color:"#C9D1D9"}}},{content:"text",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Hello! from typed method!"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"sender",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"System"',props:{style:{color:"#A5D6FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:"Data"}),": For structured data like dicts or partial texts. Connects only to ",(0,s.jsx)(e.code,{children:"DataInput"})," (ports that accept ",(0,s.jsx)(e.code,{children:"Data"}),")."]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"get_processed_data",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> Data:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" processed ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}},{content:'"key1"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"value1"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"key2"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"123",props:{style:{color:"#79C0FF"}}},{content:"}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" Data(",props:{style:{color:"#C9D1D9"}}},{content:"data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"processed)",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:"DataFrame"}),": For tabular data. Connects only to ",(0,s.jsx)(e.code,{children:"DataFrameInput"})," (ports that accept ",(0,s.jsx)(e.code,{children:"DataFrame"}),")."]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"build_df",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> DataFrame:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" pdf ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" pd.DataFrame({",props:{style:{color:"#C9D1D9"}}},{content:'"A"',props:{style:{color:"#A5D6FF"}}},{content:": [",props:{style:{color:"#C9D1D9"}}},{content:"1",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"2",props:{style:{color:"#79C0FF"}}},{content:"], ",props:{style:{color:"#C9D1D9"}}},{content:'"B"',props:{style:{color:"#A5D6FF"}}},{content:": [",props:{style:{color:"#C9D1D9"}}},{content:"3",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"4",props:{style:{color:"#79C0FF"}}},{content:"]})",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" DataFrame(pdf)",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["Primitive Types (",(0,s.jsx)(e.code,{children:"str"}),", ",(0,s.jsx)(e.code,{children:"int"}),", ",(0,s.jsx)(e.code,{children:"bool"}),"): Returning primitives is allowed but wrapping in ",(0,s.jsx)(e.code,{children:"Data"})," or ",(0,s.jsx)(e.code,{children:"Message"})," is recommended for better consistency in the visual editor."]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"compute_sum",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> ",props:{style:{color:"#C9D1D9"}}},{content:"int",props:{style:{color:"#79C0FF"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return ",props:{style:{color:"#FF7B72"}}},{content:"sum",props:{style:{color:"#79C0FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".numbers)",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(e.h3,{id:"tips-for-typed-annotations",children:"Tips for typed annotations"}),"\n",(0,s.jsx)(e.p,{children:"When using typed annotations, consider the following best practices:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Always Annotate Outputs"}),": Specify return types like ",(0,s.jsx)(e.code,{children:"-> Data"}),", ",(0,s.jsx)(e.code,{children:"-> Message"}),", or ",(0,s.jsx)(e.code,{children:"-> DataFrame"})," to enable proper visual editor color-coding and validation."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Wrap Raw Data"}),": Use ",(0,s.jsx)(e.code,{children:"Data"}),", ",(0,s.jsx)(e.code,{children:"Message"}),", or ",(0,s.jsx)(e.code,{children:"DataFrame"})," wrappers instead of returning plain structures."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Use Primitives Carefully"}),": Direct ",(0,s.jsx)(e.code,{children:"str"})," or ",(0,s.jsx)(e.code,{children:"int"})," returns are fine for simple flows, but wrapping improves flexibility."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Annotate Helpers Too"}),": Even if internal, typing improves maintainability and clarity."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Handle Edge Cases"}),": Prefer returning structured ",(0,s.jsx)(e.code,{children:"Data"})," with error fields when needed."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Stay Consistent"}),": Use the same types across your components to make flows predictable and easier to build."]}),"\n"]}),"\n",(0,s.jsx)(e.h2,{id:"enable-dynamic-fields",children:"Enable dynamic fields"}),"\n",(0,s.jsxs)(e.p,{children:["In ",(0,s.jsx)(e.strong,{children:"Langflow"}),", dynamic fields allow inputs to change or appear based on user interactions. You can make an input dynamic by setting ",(0,s.jsx)(e.code,{children:"dynamic=True"}),".\nOptionally, setting ",(0,s.jsx)(e.code,{children:"real_time_refresh=True"})," triggers the ",(0,s.jsx)(e.code,{children:"update_build_config"})," method to adjust the input's visibility or properties in real time, creating a contextual visual editor experience that only exposes relevant fields based on the user's choices."]}),"\n",(0,s.jsxs)(e.p,{children:["In this example, the operator field triggers updates with ",(0,s.jsx)(e.code,{children:"real_time_refresh=True"}),".\nThe ",(0,s.jsx)(e.code,{children:"regex_pattern"})," field is initially hidden and controlled with ",(0,s.jsx)(e.code,{children:"dynamic=True"}),"."]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.io ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" DropdownInput, StrInput",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"class ",props:{style:{color:"#FF7B72"}}},{content:"RegexRouter",props:{style:{color:"#FFA657"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"Component",props:{style:{color:"#79C0FF"}}},{content:"):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"Regex Router"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" description ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"Demonstrates dynamic fields for regex input."',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" inputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" DropdownInput(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"operator"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Operator"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" options",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"[",props:{style:{color:"#C9D1D9"}}},{content:'"equals"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"contains"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"regex"',props:{style:{color:"#A5D6FF"}}},{content:"],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" value",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"equals"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" real_time_refresh",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"True",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" StrInput(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"regex_pattern"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Regex Pattern"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" info",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"\"Used if operator='regex'\"",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" dynamic",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"True",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" show",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"False",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ]",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsxs)(e.h3,{id:"implement-update_build_config",children:["Implement ",(0,s.jsx)(e.code,{children:"update_build_config"})]}),"\n",(0,s.jsxs)(e.p,{children:["When a field with ",(0,s.jsx)(e.code,{children:"real_time_refresh=True"})," is modified, Langflow calls the ",(0,s.jsx)(e.code,{children:"update_build_config"})," method, passing the updated field name, value, and the component's configuration to dynamically adjust the visibility or properties of other fields based on user input."]}),"\n",(0,s.jsxs)(e.p,{children:["This example will show or hide the ",(0,s.jsx)(e.code,{children:"regex_pattern"})," field when the user selects a different operator."]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"update_build_config",props:{style:{color:"#D2A8FF"}}},{content:"(self, build_config: ",props:{style:{color:"#C9D1D9"}}},{content:"dict",props:{style:{color:"#79C0FF"}}},{content:", field_value: ",props:{style:{color:"#C9D1D9"}}},{content:"str",props:{style:{color:"#79C0FF"}}},{content:", field_name: ",props:{style:{color:"#C9D1D9"}}},{content:"str ",props:{style:{color:"#79C0FF"}}},{content:"| ",props:{style:{color:"#FF7B72"}}},{content:"None ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"None",props:{style:{color:"#79C0FF"}}},{content:") -> ",props:{style:{color:"#C9D1D9"}}},{content:"dict",props:{style:{color:"#79C0FF"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" if",props:{style:{color:"#FF7B72"}}},{content:" field_name ",props:{style:{color:"#C9D1D9"}}},{content:"== ",props:{style:{color:"#FF7B72"}}},{content:'"operator"',props:{style:{color:"#A5D6FF"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" if",props:{style:{color:"#FF7B72"}}},{content:" field_value ",props:{style:{color:"#C9D1D9"}}},{content:"== ",props:{style:{color:"#FF7B72"}}},{content:'"regex"',props:{style:{color:"#A5D6FF"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" build_config[",props:{style:{color:"#C9D1D9"}}},{content:'"regex_pattern"',props:{style:{color:"#A5D6FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:'"show"',props:{style:{color:"#A5D6FF"}}},{content:"] ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"True",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" else",props:{style:{color:"#FF7B72"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" build_config[",props:{style:{color:"#C9D1D9"}}},{content:'"regex_pattern"',props:{style:{color:"#A5D6FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:'"show"',props:{style:{color:"#A5D6FF"}}},{content:"] ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"False",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" build_config",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(e.h3,{id:"additional-dynamic-field-controls",children:"Additional Dynamic Field Controls"}),"\n",(0,s.jsxs)(e.p,{children:["You can also modify other properties within ",(0,s.jsx)(e.code,{children:"update_build_config"}),", such as:"]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:"required"}),": Set ",(0,s.jsx)(e.code,{children:'build_config["some_field"]["required"] = True/False'})]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:"advanced"}),": Set ",(0,s.jsx)(e.code,{children:'build_config["some_field"]["advanced"] = True'})]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:"options"}),": Modify dynamic dropdown options."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(e.h3,{id:"tips-for-managing-dynamic-fields",children:"Tips for Managing Dynamic Fields"}),"\n",(0,s.jsx)(e.p,{children:"When working with dynamic fields, consider the following best practices to ensure a smooth user experience:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Minimize field changes"}),": Hide only fields that are truly irrelevant to avoid confusing users."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Test behavior"}),": Ensure that adding or removing fields doesn't accidentally erase user input."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Preserve data"}),": Use ",(0,s.jsx)(e.code,{children:'build_config["some_field"]["show"] = False'})," to hide fields without losing their values."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Clarify logic"}),": Add ",(0,s.jsx)(e.code,{children:"info"})," notes to explain why fields appear or disappear based on conditions."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Keep it manageable"}),": If the dynamic logic becomes too complex, consider breaking it into smaller components, unless it serves a clear purpose in a single node."]}),"\n"]}),"\n",(0,s.jsx)(e.h2,{id:"error-handling-and-logging",children:"Error handling and logging"}),"\n",(0,s.jsx)(e.p,{children:"In Langflow, robust error handling ensures that your components behave predictably, even when unexpected situations occur, such as invalid inputs, external API failures, or internal logic errors."}),"\n",(0,s.jsx)(e.h3,{id:"error-handling-techniques",children:"Error handling techniques"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Raise Exceptions"}),": If a critical error occurs, you can raise standard Python exceptions such as ",(0,s.jsx)(e.code,{children:"ValueError"}),", or specialized exceptions like ",(0,s.jsx)(e.code,{children:"ToolException"}),". Langflow will automatically catch these and display appropriate error messages in the visual editor, helping users quickly identify what went wrong."]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"compute_result",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> ",props:{style:{color:"#C9D1D9"}}},{content:"str",props:{style:{color:"#79C0FF"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" if not ",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".user_input:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" raise ",props:{style:{color:"#FF7B72"}}},{content:"ValueError",props:{style:{color:"#79C0FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:'"No input provided."',props:{style:{color:"#A5D6FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" # ...",props:{style:{color:"#8B949E"}}}]}],lang:"python"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Return Structured Error Data"}),': Instead of stopping a flow abruptly, you can return a Data object containing an "error" field. This approach allows the flow to continue operating and enables downstream components to detect and handle the error gracefully.']}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"run_model",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> Data:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" try",props:{style:{color:"#FF7B72"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" # ...",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" except ",props:{style:{color:"#FF7B72"}}},{content:"Exception ",props:{style:{color:"#79C0FF"}}},{content:"as",props:{style:{color:"#FF7B72"}}},{content:" e:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" Data(",props:{style:{color:"#C9D1D9"}}},{content:"data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"{",props:{style:{color:"#C9D1D9"}}},{content:'"error"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"str",props:{style:{color:"#79C0FF"}}},{content:"(e)})",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(e.h3,{id:"improve-debugging-and-flow-management",children:"Improve debugging and flow management"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsxs)(e.strong,{children:["Use ",(0,s.jsx)(e.code,{children:"self.status"})]}),": Each component has a status field where you can store short messages about the execution result\u2014such as success summaries, partial progress, or error notifications. These appear directly in the visual editor, making troubleshooting easier for users."]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"parse_data",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> Data:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# ...",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"self",props:{style:{color:"#79C0FF"}}},{content:".status ",props:{style:{color:"#C9D1D9"}}},{content:"= f",props:{style:{color:"#FF7B72"}}},{content:'"Parsed ',props:{style:{color:"#A5D6FF"}}},{content:"{len",props:{style:{color:"#79C0FF"}}},{content:"(rows)",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:' rows successfully."',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"return",props:{style:{color:"#FF7B72"}}},{content:" Data(",props:{style:{color:"#C9D1D9"}}},{content:"data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"{",props:{style:{color:"#C9D1D9"}}},{content:'"rows"',props:{style:{color:"#A5D6FF"}}},{content:": rows})",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsxs)(e.strong,{children:["Stop specific outputs with ",(0,s.jsx)(e.code,{children:"self.stop(...)"})]}),": You can halt individual output paths when certain conditions fail, without affecting the entire component. This is especially useful when working with components that have multiple output branches."]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"some_output",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> Data:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"if <",props:{style:{color:"#FF7B72"}}},{content:"some condition",props:{style:{color:"#C9D1D9"}}},{content:">",props:{style:{color:"#FF7B72"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" self",props:{style:{color:"#79C0FF"}}},{content:".stop(",props:{style:{color:"#C9D1D9"}}},{content:'"some_output"',props:{style:{color:"#A5D6FF"}}},{content:") ",props:{style:{color:"#C9D1D9"}}},{content:"# Tells Langflow no data flows",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" Data(",props:{style:{color:"#C9D1D9"}}},{content:"data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"{",props:{style:{color:"#C9D1D9"}}},{content:'"error"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Condition not met"',props:{style:{color:"#A5D6FF"}}},{content:"})",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Log events"}),': You can log key execution details inside components. Logs are displayed in the "Logs" or "Events" section of the component\'s detail view and can be accessed later through the flow\'s debug panel or exported files, providing a clear trace of the component\'s behavior for easier debugging.']}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"process_file",props:{style:{color:"#D2A8FF"}}},{content:"(self, file_path: ",props:{style:{color:"#C9D1D9"}}},{content:"str",props:{style:{color:"#79C0FF"}}},{content:"):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"self",props:{style:{color:"#79C0FF"}}},{content:".log(",props:{style:{color:"#C9D1D9"}}},{content:"f",props:{style:{color:"#FF7B72"}}},{content:'"Processing file ',props:{style:{color:"#A5D6FF"}}},{content:"{",props:{style:{color:"#79C0FF"}}},{content:"file_path",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:'"',props:{style:{color:"#A5D6FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# ...",props:{style:{color:"#8B949E"}}}]}],lang:"python"},annotations:[]}]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(e.h3,{id:"tips-for-error-handling-and-logging",children:"Tips for error handling and logging"}),"\n",(0,s.jsx)(e.p,{children:"To build more reliable components, consider the following best practices:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Validate inputs early"}),": Catch missing or invalid inputs at the start to prevent broken logic."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsxs)(e.strong,{children:["Summarize with ",(0,s.jsx)(e.code,{children:"self.status"})]}),": Use short success or error summaries to help users understand results quickly."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Keep logs concise"}),": Focus on meaningful messages to avoid cluttering the visual editor."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Return structured errors"}),": When appropriate, return ",(0,s.jsx)(e.code,{children:'Data(data={"error": ...})'})," instead of raising exceptions to allow downstream handling."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Stop outputs selectively"}),": Only halt specific outputs with ",(0,s.jsx)(e.code,{children:"self.stop(...)"})," if necessary, to preserve correct flow behavior elsewhere."]}),"\n"]}),"\n",(0,s.jsx)(e.h2,{id:"contribute-custom-components-to-langflow",children:"Contribute custom components to Langflow"}),"\n",(0,s.jsxs)(e.p,{children:["See ",(0,s.jsx)(e.a,{href:"/contributing-components",children:"How to Contribute"})," to contribute your custom component to Langflow."]})]})}function D(o={}){const{wrapper:e}={...(0,r.R)(),...o.components};return e?(0,s.jsx)(e,{...o,children:(0,s.jsx)(F,{...o})}):F(o)}function m(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/20177945.c5c5bc37.js b/assets/js/20177945.c5c5bc37.js deleted file mode 100644 index a6bdd46547..0000000000 --- a/assets/js/20177945.c5c5bc37.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[8392],{11470:(o,e,t)=>{t.d(e,{A:()=>C});var n=t(96540),s=t(18215),r=t(23104),l=t(56347),c=t(205),p=t(57485),i=t(31682),a=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 u(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,i.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 h({value:o,tabValues:e}){return e.some(e=>e.value===o)}function y({queryString:o=!1,groupId:e}){const t=(0,l.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 F(o){const{defaultValue:e,queryString:t=!1,groupId:s}=o,r=u(o),[l,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(!h({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})),[i,d]=y({queryString:t,groupId:s}),[F,D]=function({groupId:o}){const e=function(o){return o?`docusaurus.tab.${o}`:null}(o),[t,s]=(0,a.Dv)(e);return[t,(0,n.useCallback)(o=>{e&&s.set(o)},[e,s])]}({groupId:s}),m=(()=>{const o=i??F;return h({value:o,tabValues:r})?o:null})();(0,c.A)(()=>{m&&p(m)},[m]);return{selectedValue:l,selectValue:(0,n.useCallback)(o=>{if(!h({value:o,tabValues:r}))throw new Error(`Can't select invalid tab value=${o}`);p(o),d(o),D(o)},[d,D,r]),tabValues:r}}var D=t(92303);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var x=t(74848);function f({className:o,block:e,selectedValue:t,selectValue:n,tabValues:l}){const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,r.a_)(),i=o=>{const e=o.currentTarget,s=c.indexOf(e),r=l[s].value;r!==t&&(p(e),n(r))},a=o=>{let e=null;switch(o.key){case"Enter":i(o);break;case"ArrowRight":{const t=c.indexOf(o.currentTarget)+1;e=c[t]??c[0];break}case"ArrowLeft":{const t=c.indexOf(o.currentTarget)-1;e=c[t]??c[c.length-1];break}}e?.focus()};return(0,x.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":e},o),children:l.map(({value:o,label:e,attributes:n})=>(0,x.jsx)("li",{role:"tab",tabIndex:t===o?0:-1,"aria-selected":t===o,ref:o=>{c.push(o)},onKeyDown:a,onClick:i,...n,className:(0,s.A)("tabs__item",m.tabItem,n?.className,{"tabs__item--active":t===o}),children:e??o},o))})}function g({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,x.jsx)("div",{className:"margin-top--md",children:r.map((o,e)=>(0,n.cloneElement)(o,{key:e,hidden:o.props.value!==t}))})}function j(o){const e=F(o);return(0,x.jsxs)("div",{className:(0,s.A)("tabs-container",m.tabList),children:[(0,x.jsx)(f,{...e,...o}),(0,x.jsx)(g,{...e,...o})]})}function C(o){const e=(0,D.A)();return(0,x.jsx)(j,{...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:()=>l});t(96540);var n=t(18215);const s={tabItem:"tabItem_Ymn6"};var r=t(74848);function l({children:o,hidden:e,className:t}){return(0,r.jsx)("div",{role:"tabpanel",className:(0,n.A)(s.tabItem,t),hidden:e,children:o})}},58950:(o,e,t)=>{t.r(e),t.d(e,{CH:()=>u,assets:()=>d,chCodeConfig:()=>h,contentTitle:()=>a,default:()=>D,frontMatter:()=>i,metadata:()=>n,toc:()=>y});const n=JSON.parse('{"id":"Components/components-custom-components","title":"Create custom Python components","description":"Custom components extend Langflow\'s functionality through Python classes that inherit from Component. This enables integration of new features, data manipulation, external services, and specialized tools.","source":"@site/docs/Components/components-custom-components.mdx","sourceDirName":"Components","slug":"/components-custom-components","permalink":"/components-custom-components","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Create custom Python components","slug":"/components-custom-components"},"sidebar":"docs","previous":{"title":"xAI","permalink":"/bundles-xai"},"next":{"title":"Get started with the Langflow API","permalink":"/api-reference-api-examples"}}');var s=t(74848),r=t(28453),l=t(24754),c=(t(17886),t(11470)),p=t(19365);const i={title:"Create custom Python components",slug:"/components-custom-components"},a=void 0,d={},u={annotations:l.hk,Code:l.Cy},h={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},y=[{value:"Class-level attributes",id:"class-level-attributes",level:2},{value:"Structure of a custom component",id:"structure-of-a-custom-component",level:3},{value:"Internal Lifecycle and Execution Flow",id:"internal-lifecycle-and-execution-flow",level:3},{value:"Inputs and outputs",id:"inputs-and-outputs",level:3},{value:"Associated Methods",id:"associated-methods",level:3},{value:"Components with multiple outputs",id:"components-with-multiple-outputs",level:3},{value:"Output Grouping Behavior with group_outputs",id:"output-grouping-behavior-with-group_outputs",level:4},{value:"Common internal patterns",id:"common-internal-patterns",level:3},{value:"_pre_run_setup()",id:"_pre_run_setup",level:4},{value:"Override run or _run",id:"override-run-or-_run",level:4},{value:"Store data in self.ctx",id:"store-data-in-selfctx",level:4},{value:"Directory structure requirements",id:"directory-structure-requirements",level:2},{value:"Custom component inputs and outputs",id:"custom-component-inputs-and-outputs",level:2},{value:"Inputs",id:"inputs",level:3},{value:"Outputs",id:"outputs",level:3},{value:"Tool Mode",id:"tool-mode",level:3},{value:"Typed annotations",id:"typed-annotations",level:2},{value:"Common Return Types",id:"common-return-types",level:3},{value:"Tips for typed annotations",id:"tips-for-typed-annotations",level:3},{value:"Enable dynamic fields",id:"enable-dynamic-fields",level:2},{value:"Implement update_build_config",id:"implement-update_build_config",level:3},{value:"Additional Dynamic Field Controls",id:"additional-dynamic-field-controls",level:3},{value:"Tips for Managing Dynamic Fields",id:"tips-for-managing-dynamic-fields",level:3},{value:"Error handling and logging",id:"error-handling-and-logging",level:2},{value:"Error handling techniques",id:"error-handling-techniques",level:3},{value:"Improve debugging and flow management",id:"improve-debugging-and-flow-management",level:3},{value:"Tips for error handling and logging",id:"tips-for-error-handling-and-logging",level:3},{value:"Contribute custom components to Langflow",id:"contribute-custom-components-to-langflow",level:2}];function F(o){const e={a:"a",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...o.components};return u||m("CH",!1),u.Code||m("CH.Code",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n","\n",(0,s.jsxs)(e.p,{children:["Custom components extend Langflow's functionality through Python classes that inherit from ",(0,s.jsx)(e.code,{children:"Component"}),". This enables integration of new features, data manipulation, external services, and specialized tools."]}),"\n",(0,s.jsx)(e.p,{children:'In Langflow\'s node-based environment, each node is a "component" that performs discrete functions. Custom components are Python classes which define:'}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Inputs"})," \u2014 Data or parameters your component requires."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Outputs"})," \u2014 Data your component provides to downstream nodes."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Logic"})," \u2014 How you process inputs to produce outputs."]}),"\n"]}),"\n",(0,s.jsx)(e.p,{children:"The benefits of creating custom components include unlimited extensibility, reusability, automatic field generation in the visual editor based on inputs, and type-safe connections between nodes."}),"\n",(0,s.jsx)(e.p,{children:"Create custom components for performing specialized tasks, calling APIs, or adding advanced logic."}),"\n",(0,s.jsx)(e.p,{children:"Custom components in Langflow are built upon:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:["The Python class that inherits from ",(0,s.jsx)(e.code,{children:"Component"}),"."]}),"\n",(0,s.jsx)(e.li,{children:"Class-level attributes that identify and describe the component."}),"\n",(0,s.jsx)(e.li,{children:"Input and output lists that determine data flow."}),"\n",(0,s.jsx)(e.li,{children:"Internal variables for logging and advanced logic."}),"\n"]}),"\n",(0,s.jsx)(e.h2,{id:"class-level-attributes",children:"Class-level attributes"}),"\n",(0,s.jsx)(e.p,{children:"Define these attributes to control a custom component's appearance and behavior:"}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"class ",props:{style:{color:"#FF7B72"}}},{content:"MyCsvReader",props:{style:{color:"#FFA657"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"Component",props:{style:{color:"#79C0FF"}}},{content:"):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"CSV Reader"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" description ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"Reads CSV files"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" icon ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"file-text"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" name ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"CSVReader"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" documentation ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"http://docs.example.com/csv_reader"',props:{style:{color:"#A5D6FF"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:"display_name"}),": A user-friendly label shown in the ",(0,s.jsx)(e.strong,{children:"Components"})," menu and on the component itself when you add it to a flow."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:"description"}),": A brief summary shown in tooltips and printed below the component name when added to a flow."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:"icon"}),": A decorative icon from Langflow's icon library, printed next to the name."]}),"\n",(0,s.jsxs)(e.p,{children:["Langflow uses ",(0,s.jsx)(e.a,{href:"https://lucide.dev/icons",children:"Lucide"})," for icons. To assign an icon to your component, set the icon attribute to the name of a Lucide icon as a string, such as ",(0,s.jsx)(e.code,{children:'icon = "file-text"'}),". Langflow renders icons from the Lucide library automatically."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:"name"}),": A unique internal identifier."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:"documentation"}),": An optional link to external documentation, such as API or product documentation."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(e.h3,{id:"structure-of-a-custom-component",children:"Structure of a custom component"}),"\n",(0,s.jsx)(e.p,{children:"A Langflow custom component is more than a class with inputs and outputs. It includes an internal structure with optional lifecycle steps, output generation, front-end interaction, and logic organization."}),"\n",(0,s.jsx)(e.p,{children:"A basic component:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:["Inherits from ",(0,s.jsx)(e.code,{children:"langflow.custom.Component"}),"."]}),"\n",(0,s.jsxs)(e.li,{children:["Declares metadata like ",(0,s.jsx)(e.code,{children:"display_name"}),", ",(0,s.jsx)(e.code,{children:"description"}),", ",(0,s.jsx)(e.code,{children:"icon"}),", and more."]}),"\n",(0,s.jsxs)(e.li,{children:["Defines ",(0,s.jsx)(e.code,{children:"inputs"})," and ",(0,s.jsx)(e.code,{children:"outputs"})," lists."]}),"\n",(0,s.jsx)(e.li,{children:"Implements methods matching output specifications."}),"\n"]}),"\n",(0,s.jsx)(e.p,{children:"A minimal custom component skeleton contains the following:"}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.custom ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Component",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.template ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Output",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"class ",props:{style:{color:"#FF7B72"}}},{content:"MyComponent",props:{style:{color:"#FFA657"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"Component",props:{style:{color:"#79C0FF"}}},{content:"):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"My Component"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" description ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"A short summary."',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" icon ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"sparkles"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" name ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"MyComponent"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" inputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" []",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" outputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" []",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" def ",props:{style:{color:"#FF7B72"}}},{content:"some_output_method",props:{style:{color:"#D2A8FF"}}},{content:"(self):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return ",props:{style:{color:"#FF7B72"}}},{content:"...",props:{style:{color:"#79C0FF"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(e.h3,{id:"internal-lifecycle-and-execution-flow",children:"Internal Lifecycle and Execution Flow"}),"\n",(0,s.jsx)(e.p,{children:"Langflow's engine manages:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Instantiation"}),": A component is created and internal structures are initialized."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Assigning Inputs"}),": Values from the visual editor or connections are assigned to component fields."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Validation and Setup"}),": Optional hooks like ",(0,s.jsx)(e.code,{children:"_pre_run_setup"}),"."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Outputs Generation"}),": ",(0,s.jsx)(e.code,{children:"run()"})," or ",(0,s.jsx)(e.code,{children:"build_results()"})," triggers output methods."]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Optional Hooks"}),":"]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"initialize_data"})," or ",(0,s.jsx)(e.code,{children:"_pre_run_setup"})," can run setup logic before the component's main execution."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"__call__"}),", ",(0,s.jsx)(e.code,{children:"run()"}),", or ",(0,s.jsx)(e.code,{children:"_run()"})," can be overridden to customize how the component is called or to define custom execution logic."]}),"\n"]}),"\n",(0,s.jsx)(e.h3,{id:"inputs-and-outputs",children:"Inputs and outputs"}),"\n",(0,s.jsx)(e.p,{children:"Custom component inputs are defined with properties like:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"name"}),", ",(0,s.jsx)(e.code,{children:"display_name"})]}),"\n",(0,s.jsxs)(e.li,{children:["Optional: ",(0,s.jsx)(e.code,{children:"info"}),", ",(0,s.jsx)(e.code,{children:"value"}),", ",(0,s.jsx)(e.code,{children:"advanced"}),", ",(0,s.jsx)(e.code,{children:"is_list"}),", ",(0,s.jsx)(e.code,{children:"tool_mode"}),", ",(0,s.jsx)(e.code,{children:"real_time_refresh"})]}),"\n"]}),"\n",(0,s.jsx)(e.p,{children:"For example:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"StrInput"}),": simple text input."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"DropdownInput"}),": selectable options."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"HandleInput"}),": specialized connections."]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:["Custom component ",(0,s.jsx)(e.code,{children:"Output"})," properties define:"]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"name"}),", ",(0,s.jsx)(e.code,{children:"display_name"}),", ",(0,s.jsx)(e.code,{children:"method"})]}),"\n",(0,s.jsxs)(e.li,{children:["Optional: ",(0,s.jsx)(e.code,{children:"info"})]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:["For more information, see ",(0,s.jsx)(e.a,{href:"/components-custom-components#custom-component-inputs-and-outputs",children:"Custom component inputs and outputs"}),"."]}),"\n",(0,s.jsx)(e.h3,{id:"associated-methods",children:"Associated Methods"}),"\n",(0,s.jsx)(e.p,{children:"Each output is linked to a method:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:"The output method name must match the method name."}),"\n",(0,s.jsx)(e.li,{children:"The method typically returns objects like Message, Data, or DataFrame."}),"\n",(0,s.jsxs)(e.li,{children:["The method can use inputs with ",(0,s.jsx)(e.code,{children:"self."}),"."]}),"\n"]}),"\n",(0,s.jsx)(e.p,{children:"For example:"}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Output(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"File Contents"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"file_contents"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" method",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"read_file"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:")",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"#...",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"read_file",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> Data:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" path ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".filename",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" with ",props:{style:{color:"#FF7B72"}}},{content:"open",props:{style:{color:"#79C0FF"}}},{content:"(path, ",props:{style:{color:"#C9D1D9"}}},{content:'"r"',props:{style:{color:"#A5D6FF"}}},{content:") ",props:{style:{color:"#C9D1D9"}}},{content:"as",props:{style:{color:"#FF7B72"}}},{content:" f:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" content ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" f.read()",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" self",props:{style:{color:"#79C0FF"}}},{content:".status ",props:{style:{color:"#C9D1D9"}}},{content:"= f",props:{style:{color:"#FF7B72"}}},{content:'"Read ',props:{style:{color:"#A5D6FF"}}},{content:"{len",props:{style:{color:"#79C0FF"}}},{content:"(content)",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:" chars from ",props:{style:{color:"#A5D6FF"}}},{content:"{",props:{style:{color:"#79C0FF"}}},{content:"path",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" Data(",props:{style:{color:"#C9D1D9"}}},{content:"data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"{",props:{style:{color:"#C9D1D9"}}},{content:'"content"',props:{style:{color:"#A5D6FF"}}},{content:": content})",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(e.h3,{id:"components-with-multiple-outputs",children:"Components with multiple outputs"}),"\n",(0,s.jsx)(e.p,{children:"A component can define multiple outputs.\nEach output can have a different corresponding method.\nFor example:"}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"outputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" Output(",props:{style:{color:"#C9D1D9"}}},{content:"display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Processed Data"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"processed_data"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"method",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"process_data"',props:{style:{color:"#A5D6FF"}}},{content:"),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" Output(",props:{style:{color:"#C9D1D9"}}},{content:"display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Debug Info"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"debug_info"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"method",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"provide_debug_info"',props:{style:{color:"#A5D6FF"}}},{content:"),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsxs)(e.h4,{id:"output-grouping-behavior-with-group_outputs",children:["Output Grouping Behavior with ",(0,s.jsx)(e.code,{children:"group_outputs"})]}),"\n",(0,s.jsx)(e.p,{children:"By default, components in Langflow that produce multiple outputs only allow one output selection in the visual editor.\nThe component will have only one output port where the user can select the preferred output type."}),"\n",(0,s.jsxs)(e.p,{children:["This behavior is controlled by the ",(0,s.jsx)(e.code,{children:"group_outputs"})," parameter:"]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsxs)(e.strong,{children:[(0,s.jsx)(e.code,{children:"group_outputs=False"})," (default)"]}),": When a component has more than one output and ",(0,s.jsx)(e.code,{children:"group_outputs"})," is false or not set, the outputs are grouped in the visual editor, and the user must select one."]}),"\n",(0,s.jsx)(e.p,{children:"Use this option when the component is expected to return only one type of output when used in a flow."}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"group_outputs=True"})}),": All outputs are available simultaneously in the visual editor. The component has one output port for each output, and the user can connect zero or more outputs to other components."]}),"\n",(0,s.jsx)(e.p,{children:"Use this option when the component is expected to return multiple values that are used in parallel by downstream components or processes."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsxs)(p.A,{value:"false",label:"False or not set",default:!0,children:[(0,s.jsxs)(e.p,{children:["In this example, the visual editor provides a single output port, and the user can select one of the outputs.\nSince ",(0,s.jsx)(e.code,{children:"group_outputs=False"})," is the default behavior, it doesn't need to be explicitly set in the component, as shown in this example:"]}),(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"outputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" Output(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"structured_output"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Structured Output"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" method",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"build_structured_output"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" Output(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"dataframe_output"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"DataFrame Output"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" method",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"build_structured_dataframe"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]})]}),(0,s.jsxs)(p.A,{value:"true",label:"True",children:[(0,s.jsx)(e.p,{children:"In this example, all outputs are available simultaneously in the visual editor:"}),(0,s.jsxs)(e.ol,{start:"2",children:["\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.code,{children:"group_outputs=True"})}),"\n"]}),(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"outputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" Output(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"true_result"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"True"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" method",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"true_response"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" group_outputs",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:" Output(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"false_result"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"False"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" method",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"false_response"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" group_outputs",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"True",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]})]})]}),"\n",(0,s.jsx)(e.h3,{id:"common-internal-patterns",children:"Common internal patterns"}),"\n",(0,s.jsx)(e.h4,{id:"_pre_run_setup",children:(0,s.jsx)(e.code,{children:"_pre_run_setup()"})}),"\n",(0,s.jsx)(e.p,{children:"To initialize a custom component with counters set:"}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"_pre_run_setup",props:{style:{color:"#D2A8FF"}}},{content:"(self):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" if not ",props:{style:{color:"#FF7B72"}}},{content:"hasattr",props:{style:{color:"#79C0FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"_initialized"',props:{style:{color:"#A5D6FF"}}},{content:"):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" self",props:{style:{color:"#79C0FF"}}},{content:"._initialized ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"True",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" self",props:{style:{color:"#79C0FF"}}},{content:".iteration ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"0",props:{style:{color:"#79C0FF"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsxs)(e.h4,{id:"override-run-or-_run",children:["Override ",(0,s.jsx)(e.code,{children:"run"})," or ",(0,s.jsx)(e.code,{children:"_run"})]}),"\n",(0,s.jsxs)(e.p,{children:["You can override ",(0,s.jsx)(e.code,{children:"async def _run(self): ..."})," to define custom execution logic, although the default behavior from the base class usually covers most cases."]}),"\n",(0,s.jsxs)(e.h4,{id:"store-data-in-selfctx",children:["Store data in ",(0,s.jsx)(e.code,{children:"self.ctx"})]}),"\n",(0,s.jsxs)(e.p,{children:["Use ",(0,s.jsx)(e.code,{children:"self.ctx"})," as a shared storage for data or counters across the component's execution flow:"]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"some_method",props:{style:{color:"#D2A8FF"}}},{content:"(self):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" count ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".ctx.get(",props:{style:{color:"#C9D1D9"}}},{content:'"my_count"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"0",props:{style:{color:"#79C0FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" self",props:{style:{color:"#79C0FF"}}},{content:".ctx[",props:{style:{color:"#C9D1D9"}}},{content:'"my_count"',props:{style:{color:"#A5D6FF"}}},{content:"] ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" count ",props:{style:{color:"#C9D1D9"}}},{content:"+ ",props:{style:{color:"#FF7B72"}}},{content:"1",props:{style:{color:"#79C0FF"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(e.h2,{id:"directory-structure-requirements",children:"Directory structure requirements"}),"\n",(0,s.jsxs)(e.p,{children:["By default, Langflow looks for custom components in the ",(0,s.jsx)(e.code,{children:"/components"})," directory."]}),"\n",(0,s.jsxs)(e.p,{children:["If you're creating custom components in a different location using the ",(0,s.jsx)(e.code,{children:"LANGFLOW_COMPONENTS_PATH"})," ",(0,s.jsx)(e.a,{href:"/environment-variables",children:"environment variable"}),", components must be organized in a specific directory structure to be properly loaded and displayed in the visual editor:"]}),"\n",(0,s.jsxs)(e.p,{children:["Each category directory ",(0,s.jsx)(e.strong,{children:"must"})," contain an ",(0,s.jsx)(e.code,{children:"__init__.py"})," file for Langflow to properly recognize and load the components.\nThis is a Python package requirement that ensures the directory is treated as a module."]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"/your/custom/components/path/ # Base directory set by LANGFLOW_COMPONENTS_PATH",props:{}}]},{tokens:[{content:" \u2514\u2500\u2500 category_name/ # Required category subfolder that determines menu name",props:{}}]},{tokens:[{content:" \u251c\u2500\u2500 __init__.py # Required",props:{}}]},{tokens:[{content:" \u2514\u2500\u2500 custom_component.py # Component file",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsx)(e.p,{children:"Components must be placed inside category folders, not directly in the base directory."}),"\n",(0,s.jsxs)(e.p,{children:["The category folder name determines where the component appears in the Langflow ",(0,s.jsx)(e.strong,{children:"Components"})," menu.\nFor example, to add a component to the ",(0,s.jsx)(e.strong,{children:"Helpers"})," category, place it in the ",(0,s.jsx)(e.code,{children:"helpers"})," subfolder:"]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"/app/custom_components/ # LANGFLOW_COMPONENTS_PATH",props:{}}]},{tokens:[{content:' \u2514\u2500\u2500 helpers/ # Displayed within the "Helpers" category',props:{}}]},{tokens:[{content:" \u251c\u2500\u2500 __init__.py # Required",props:{}}]},{tokens:[{content:" \u2514\u2500\u2500 custom_component.py # Your component",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsx)(e.p,{children:"You can have multiple category folders to organize components into different categories:"}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"/app/custom_components/",props:{}}]},{tokens:[{content:" \u251c\u2500\u2500 helpers/",props:{}}]},{tokens:[{content:" \u2502 \u251c\u2500\u2500 __init__.py",props:{}}]},{tokens:[{content:" \u2502 \u2514\u2500\u2500 helper_component.py",props:{}}]},{tokens:[{content:" \u2514\u2500\u2500 tools/",props:{}}]},{tokens:[{content:" \u251c\u2500\u2500 __init__.py",props:{}}]},{tokens:[{content:" \u2514\u2500\u2500 tool_component.py",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsx)(e.p,{children:"This folder structure is required for Langflow to properly discover and load your custom components. Components placed directly in the base directory aren't loaded."}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"/app/custom_components/ # LANGFLOW_COMPONENTS_PATH",props:{}}]},{tokens:[{content:" \u2514\u2500\u2500 custom_component.py # Won't be loaded - missing category folder!",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsx)(e.h2,{id:"custom-component-inputs-and-outputs",children:"Custom component inputs and outputs"}),"\n",(0,s.jsx)(e.p,{children:"Inputs and outputs define how data flows through the component, how it appears in the visual editor, and how connections to other components are validated."}),"\n",(0,s.jsx)(e.h3,{id:"inputs",children:"Inputs"}),"\n",(0,s.jsxs)(e.p,{children:["Inputs are defined in a class-level ",(0,s.jsx)(e.code,{children:"inputs"})," list. When Langflow loads the component, it uses this list to render component fields and ",(0,s.jsx)(e.a,{href:"/concepts-components#component-ports",children:"ports"})," in the visual editor. Users or other components provide values or connections to fill these inputs."]}),"\n",(0,s.jsxs)(e.p,{children:["An input is usually an instance of a class from ",(0,s.jsx)(e.code,{children:"langflow.io"})," (such as ",(0,s.jsx)(e.code,{children:"StrInput"}),", ",(0,s.jsx)(e.code,{children:"DataInput"}),", or ",(0,s.jsx)(e.code,{children:"MessageTextInput"}),"). The most common constructor parameters are:"]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"name"})}),": The internal variable name, accessed with ",(0,s.jsx)(e.code,{children:"self."}),"."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"display_name"})}),": The label shown to users in the visual editor."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"info"})})," ",(0,s.jsx)(e.em,{children:"(optional)"}),": A tooltip or short description."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"value"})})," ",(0,s.jsx)(e.em,{children:"(optional)"}),": The default value."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"advanced"})})," ",(0,s.jsx)(e.em,{children:"(optional)"}),': If true, moves the field into the "Advanced" section.']}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"required"})})," ",(0,s.jsx)(e.em,{children:"(optional)"}),": If true, forces the user to provide a value."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"is_list"})})," ",(0,s.jsx)(e.em,{children:"(optional)"}),": If true, allows multiple values."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"input_types"})})," ",(0,s.jsx)(e.em,{children:"(optional)"}),": Restricts allowed connection types (e.g., ",(0,s.jsx)(e.code,{children:'["Data"]'}),", ",(0,s.jsx)(e.code,{children:'["LanguageModel"]'}),")."]}),"\n"]}),"\n",(0,s.jsx)(e.p,{children:"Here are the most commonly used input classes and their typical usage."}),"\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Text Inputs"}),": For simple text entries."]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"StrInput"})})," creates a single-line text field."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"MultilineInput"})})," creates a multi-line text area."]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Numeric and Boolean Inputs"}),": Ensures users can only enter valid numeric or Boolean data."]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"BoolInput"})}),", ",(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"IntInput"})}),", and ",(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"FloatInput"})})," provide fields for Boolean, integer, and float values, ensuring type consistency."]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Dropdowns"}),": For selecting from predefined options, useful for modes or levels."]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"DropdownInput"})})}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Secrets"}),": A specialized input for sensitive data, ensuring input is hidden in the visual editor."]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"SecretStrInput"})})," for API keys and passwords."]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Specialized Data Inputs"}),": Ensures type-checking and color-coded connections in the visual editor."]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"DataInput"})})," expects a ",(0,s.jsx)(e.code,{children:"Data"})," object (typically with ",(0,s.jsx)(e.code,{children:".data"})," and optional ",(0,s.jsx)(e.code,{children:".text"}),")."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"MessageInput"})})," expects a ",(0,s.jsx)(e.code,{children:"Message"})," object, used in chat or agent flows."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"MessageTextInput"})})," simplifies access to the ",(0,s.jsx)(e.code,{children:".text"})," field of a ",(0,s.jsx)(e.code,{children:"Message"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Handle-Based Inputs"}),": Used to connect outputs of specific types, ensuring correct pipeline connections."]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"HandleInput"})})}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"File Uploads"}),": Allows users to upload files directly through the visual editor or receive file paths from other components."]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"FileInput"})})}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Lists"}),": Set ",(0,s.jsx)(e.code,{children:"is_list=True"})," to accept multiple values, ideal for batch or grouped operations."]}),"\n",(0,s.jsxs)(e.p,{children:["This example defines three inputs: a text field (",(0,s.jsx)(e.code,{children:"StrInput"}),"), a Boolean toggle (",(0,s.jsx)(e.code,{children:"BoolInput"}),"), and a dropdown selection (",(0,s.jsx)(e.code,{children:"DropdownInput"}),")."]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.io ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" StrInput, BoolInput, DropdownInput",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"inputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" StrInput(",props:{style:{color:"#C9D1D9"}}},{content:"name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"title"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Title"',props:{style:{color:"#A5D6FF"}}},{content:"),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" BoolInput(",props:{style:{color:"#C9D1D9"}}},{content:"name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"enabled"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Enabled"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"value",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"True",props:{style:{color:"#79C0FF"}}},{content:"),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" DropdownInput(",props:{style:{color:"#C9D1D9"}}},{content:"name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"mode"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Mode"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"options",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"[",props:{style:{color:"#C9D1D9"}}},{content:'"Fast"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"Safe"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"Experimental"',props:{style:{color:"#A5D6FF"}}},{content:"], ",props:{style:{color:"#C9D1D9"}}},{content:"value",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Safe"',props:{style:{color:"#A5D6FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(e.h3,{id:"outputs",children:"Outputs"}),"\n",(0,s.jsxs)(e.p,{children:["Outputs are defined in a class-level ",(0,s.jsx)(e.code,{children:"outputs"})," list. When Langflow renders a component, each output becomes a connector point in the visual editor. When you connect something to an output, Langflow automatically calls the corresponding method and passes the returned object to the next component."]}),"\n",(0,s.jsxs)(e.p,{children:["An output is usually an instance of ",(0,s.jsx)(e.code,{children:"Output"})," from ",(0,s.jsx)(e.code,{children:"langflow.io"}),", with common parameters:"]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"name"})}),": The internal variable name."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"display_name"})}),": The label shown in the visual editor."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"method"})}),": The name of the method called to produce the output."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"info"})})," ",(0,s.jsx)(e.em,{children:"(optional)"}),": Help text shown on hover."]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:["The method must exist in the class, and it is recommended to annotate its return type for better type checking.\nYou can also set a ",(0,s.jsx)(e.code,{children:"self.status"})," message inside the method to show progress or logs."]}),"\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Common Return Types"}),":"]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"Message"})}),": Structured chat messages."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"Data"})}),": Flexible object with ",(0,s.jsx)(e.code,{children:".data"})," and optional ",(0,s.jsx)(e.code,{children:".text"}),"."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:(0,s.jsx)(e.code,{children:"DataFrame"})}),": Pandas-based tables (",(0,s.jsx)(e.code,{children:"langflow.schema.DataFrame"}),")."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Primitive types"}),": ",(0,s.jsx)(e.code,{children:"str"}),", ",(0,s.jsx)(e.code,{children:"int"}),", ",(0,s.jsx)(e.code,{children:"bool"})," (not recommended if you need type/color consistency)."]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:["In this example, the ",(0,s.jsx)(e.code,{children:"DataToDataFrame"})," component defines its output using the outputs list. The ",(0,s.jsx)(e.code,{children:"df_out"})," output is linked to the ",(0,s.jsx)(e.code,{children:"build_df"})," method, so when connected to another component (node), Langflow calls this method and passes its returned ",(0,s.jsx)(e.code,{children:"DataFrame"})," to the next node. This demonstrates how each output maps to a method that generates the actual output data."]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.custom ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Component",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.io ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" DataInput, Output",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.schema ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Data, DataFrame",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"class ",props:{style:{color:"#FF7B72"}}},{content:"DataToDataFrame",props:{style:{color:"#FFA657"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"Component",props:{style:{color:"#79C0FF"}}},{content:"):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"Data to DataFrame"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" description ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"Convert multiple Data objects into a DataFrame"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" icon ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"table"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" name ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"DataToDataFrame"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" inputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" DataInput(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"items"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Data Items"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" info",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"List of Data objects to convert"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" is_list",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"True",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" )",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" outputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" Output(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"df_out"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"DataFrame Output"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" method",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"build_df"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" )",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" def ",props:{style:{color:"#FF7B72"}}},{content:"build_df",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> DataFrame:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" rows ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" []",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" for",props:{style:{color:"#FF7B72"}}},{content:" item ",props:{style:{color:"#C9D1D9"}}},{content:"in ",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".items:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" row_dict ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" item.data.copy() ",props:{style:{color:"#C9D1D9"}}},{content:"if",props:{style:{color:"#FF7B72"}}},{content:" item.data ",props:{style:{color:"#C9D1D9"}}},{content:"else",props:{style:{color:"#FF7B72"}}},{content:" {}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" row_dict[",props:{style:{color:"#C9D1D9"}}},{content:'"text"',props:{style:{color:"#A5D6FF"}}},{content:"] ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" item.get_text() ",props:{style:{color:"#C9D1D9"}}},{content:"or ",props:{style:{color:"#FF7B72"}}},{content:'""',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" rows.append(row_dict)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" df ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" DataFrame(rows)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" self",props:{style:{color:"#79C0FF"}}},{content:".status ",props:{style:{color:"#C9D1D9"}}},{content:"= f",props:{style:{color:"#FF7B72"}}},{content:'"Built DataFrame with ',props:{style:{color:"#A5D6FF"}}},{content:"{len",props:{style:{color:"#79C0FF"}}},{content:"(rows)",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:' rows."',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" df",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(e.h3,{id:"tool-mode",children:"Tool Mode"}),"\n",(0,s.jsxs)(e.p,{children:["Components that support ",(0,s.jsx)(e.strong,{children:"Tool Mode"})," can be used as standalone components (when ",(0,s.jsx)(e.em,{children:"not"})," in ",(0,s.jsx)(e.strong,{children:"Tool Mode"}),") or as tools for other components with a ",(0,s.jsx)(e.strong,{children:"Tools"})," input, such as ",(0,s.jsx)(e.strong,{children:"Agent"})," components."]}),"\n",(0,s.jsxs)(e.p,{children:["You can allow a custom component to support ",(0,s.jsx)(e.strong,{children:"Tool Mode"})," by setting ",(0,s.jsx)(e.code,{children:"tool_mode=True"}),":"]}),"\n",(0,s.jsx)(u.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:" MessageTextInput(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"message"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Mensage"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" info",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Enter the message that will be processed directly by the tool"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" tool_mode",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"True",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsxs)(e.p,{children:["Langflow currently supports the following input types for ",(0,s.jsx)(e.strong,{children:"Tool Mode"}),":"]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.code,{children:"DataInput"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.code,{children:"DataFrameInput"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.code,{children:"PromptInput"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.code,{children:"MessageTextInput"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.code,{children:"MultilineInput"})}),"\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.code,{children:"DropdownInput"})}),"\n"]}),"\n",(0,s.jsx)(e.h2,{id:"typed-annotations",children:"Typed annotations"}),"\n",(0,s.jsxs)(e.p,{children:["In Langflow, ",(0,s.jsx)(e.strong,{children:"typed annotations"})," allow Langflow to visually guide users and maintain flow consistency."]}),"\n",(0,s.jsx)(e.p,{children:"Typed annotations provide:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Color-coding"}),": Outputs like ",(0,s.jsx)(e.code,{children:"-> Data"})," or ",(0,s.jsx)(e.code,{children:"-> Message"})," get distinct colors."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Validation"}),": Langflow blocks incompatible connections automatically."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Readability"}),": Developers can quickly understand data flow."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Development tools"}),": Better code suggestions and error checking in your code editor."]}),"\n"]}),"\n",(0,s.jsx)(e.h3,{id:"common-return-types",children:"Common Return Types"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:"Message"}),": For chat-style outputs. Connects to any of several ",(0,s.jsx)(e.code,{children:"Message"}),"-compatible inputs."]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"produce_message",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> Message:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" Message(",props:{style:{color:"#C9D1D9"}}},{content:"text",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Hello! from typed method!"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"sender",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"System"',props:{style:{color:"#A5D6FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:"Data"}),": For structured data like dicts or partial texts. Connects only to ",(0,s.jsx)(e.code,{children:"DataInput"})," (ports that accept ",(0,s.jsx)(e.code,{children:"Data"}),")."]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"get_processed_data",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> Data:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" processed ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}},{content:'"key1"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"value1"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"key2"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"123",props:{style:{color:"#79C0FF"}}},{content:"}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" Data(",props:{style:{color:"#C9D1D9"}}},{content:"data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"processed)",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:"DataFrame"}),": For tabular data. Connects only to ",(0,s.jsx)(e.code,{children:"DataFrameInput"})," (ports that accept ",(0,s.jsx)(e.code,{children:"DataFrame"}),")."]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"build_df",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> DataFrame:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" pdf ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" pd.DataFrame({",props:{style:{color:"#C9D1D9"}}},{content:'"A"',props:{style:{color:"#A5D6FF"}}},{content:": [",props:{style:{color:"#C9D1D9"}}},{content:"1",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"2",props:{style:{color:"#79C0FF"}}},{content:"], ",props:{style:{color:"#C9D1D9"}}},{content:'"B"',props:{style:{color:"#A5D6FF"}}},{content:": [",props:{style:{color:"#C9D1D9"}}},{content:"3",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"4",props:{style:{color:"#79C0FF"}}},{content:"]})",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" DataFrame(pdf)",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["Primitive Types (",(0,s.jsx)(e.code,{children:"str"}),", ",(0,s.jsx)(e.code,{children:"int"}),", ",(0,s.jsx)(e.code,{children:"bool"}),"): Returning primitives is allowed but wrapping in ",(0,s.jsx)(e.code,{children:"Data"})," or ",(0,s.jsx)(e.code,{children:"Message"})," is recommended for better consistency in the visual editor."]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"compute_sum",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> ",props:{style:{color:"#C9D1D9"}}},{content:"int",props:{style:{color:"#79C0FF"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return ",props:{style:{color:"#FF7B72"}}},{content:"sum",props:{style:{color:"#79C0FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".numbers)",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(e.h3,{id:"tips-for-typed-annotations",children:"Tips for typed annotations"}),"\n",(0,s.jsx)(e.p,{children:"When using typed annotations, consider the following best practices:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Always Annotate Outputs"}),": Specify return types like ",(0,s.jsx)(e.code,{children:"-> Data"}),", ",(0,s.jsx)(e.code,{children:"-> Message"}),", or ",(0,s.jsx)(e.code,{children:"-> DataFrame"})," to enable proper visual editor color-coding and validation."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Wrap Raw Data"}),": Use ",(0,s.jsx)(e.code,{children:"Data"}),", ",(0,s.jsx)(e.code,{children:"Message"}),", or ",(0,s.jsx)(e.code,{children:"DataFrame"})," wrappers instead of returning plain structures."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Use Primitives Carefully"}),": Direct ",(0,s.jsx)(e.code,{children:"str"})," or ",(0,s.jsx)(e.code,{children:"int"})," returns are fine for simple flows, but wrapping improves flexibility."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Annotate Helpers Too"}),": Even if internal, typing improves maintainability and clarity."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Handle Edge Cases"}),": Prefer returning structured ",(0,s.jsx)(e.code,{children:"Data"})," with error fields when needed."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Stay Consistent"}),": Use the same types across your components to make flows predictable and easier to build."]}),"\n"]}),"\n",(0,s.jsx)(e.h2,{id:"enable-dynamic-fields",children:"Enable dynamic fields"}),"\n",(0,s.jsxs)(e.p,{children:["In ",(0,s.jsx)(e.strong,{children:"Langflow"}),", dynamic fields allow inputs to change or appear based on user interactions. You can make an input dynamic by setting ",(0,s.jsx)(e.code,{children:"dynamic=True"}),".\nOptionally, setting ",(0,s.jsx)(e.code,{children:"real_time_refresh=True"})," triggers the ",(0,s.jsx)(e.code,{children:"update_build_config"})," method to adjust the input's visibility or properties in real time, creating a contextual visual editor experience that only exposes relevant fields based on the user's choices."]}),"\n",(0,s.jsxs)(e.p,{children:["In this example, the operator field triggers updates with ",(0,s.jsx)(e.code,{children:"real_time_refresh=True"}),".\nThe ",(0,s.jsx)(e.code,{children:"regex_pattern"})," field is initially hidden and controlled with ",(0,s.jsx)(e.code,{children:"dynamic=True"}),"."]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langflow.io ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" DropdownInput, StrInput",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"class ",props:{style:{color:"#FF7B72"}}},{content:"RegexRouter",props:{style:{color:"#FFA657"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"Component",props:{style:{color:"#79C0FF"}}},{content:"):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"Regex Router"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" description ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"Demonstrates dynamic fields for regex input."',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" inputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" DropdownInput(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"operator"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Operator"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" options",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"[",props:{style:{color:"#C9D1D9"}}},{content:'"equals"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"contains"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"regex"',props:{style:{color:"#A5D6FF"}}},{content:"],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" value",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"equals"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" real_time_refresh",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"True",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" StrInput(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"regex_pattern"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Regex Pattern"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" info",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"\"Used if operator='regex'\"",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" dynamic",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"True",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" show",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"False",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ]",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsxs)(e.h3,{id:"implement-update_build_config",children:["Implement ",(0,s.jsx)(e.code,{children:"update_build_config"})]}),"\n",(0,s.jsxs)(e.p,{children:["When a field with ",(0,s.jsx)(e.code,{children:"real_time_refresh=True"})," is modified, Langflow calls the ",(0,s.jsx)(e.code,{children:"update_build_config"})," method, passing the updated field name, value, and the component's configuration to dynamically adjust the visibility or properties of other fields based on user input."]}),"\n",(0,s.jsxs)(e.p,{children:["This example will show or hide the ",(0,s.jsx)(e.code,{children:"regex_pattern"})," field when the user selects a different operator."]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"update_build_config",props:{style:{color:"#D2A8FF"}}},{content:"(self, build_config: ",props:{style:{color:"#C9D1D9"}}},{content:"dict",props:{style:{color:"#79C0FF"}}},{content:", field_value: ",props:{style:{color:"#C9D1D9"}}},{content:"str",props:{style:{color:"#79C0FF"}}},{content:", field_name: ",props:{style:{color:"#C9D1D9"}}},{content:"str ",props:{style:{color:"#79C0FF"}}},{content:"| ",props:{style:{color:"#FF7B72"}}},{content:"None ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"None",props:{style:{color:"#79C0FF"}}},{content:") -> ",props:{style:{color:"#C9D1D9"}}},{content:"dict",props:{style:{color:"#79C0FF"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" if",props:{style:{color:"#FF7B72"}}},{content:" field_name ",props:{style:{color:"#C9D1D9"}}},{content:"== ",props:{style:{color:"#FF7B72"}}},{content:'"operator"',props:{style:{color:"#A5D6FF"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" if",props:{style:{color:"#FF7B72"}}},{content:" field_value ",props:{style:{color:"#C9D1D9"}}},{content:"== ",props:{style:{color:"#FF7B72"}}},{content:'"regex"',props:{style:{color:"#A5D6FF"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" build_config[",props:{style:{color:"#C9D1D9"}}},{content:'"regex_pattern"',props:{style:{color:"#A5D6FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:'"show"',props:{style:{color:"#A5D6FF"}}},{content:"] ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"True",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" else",props:{style:{color:"#FF7B72"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" build_config[",props:{style:{color:"#C9D1D9"}}},{content:'"regex_pattern"',props:{style:{color:"#A5D6FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:'"show"',props:{style:{color:"#A5D6FF"}}},{content:"] ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"False",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" build_config",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(e.h3,{id:"additional-dynamic-field-controls",children:"Additional Dynamic Field Controls"}),"\n",(0,s.jsxs)(e.p,{children:["You can also modify other properties within ",(0,s.jsx)(e.code,{children:"update_build_config"}),", such as:"]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:"required"}),": Set ",(0,s.jsx)(e.code,{children:'build_config["some_field"]["required"] = True/False'})]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:"advanced"}),": Set ",(0,s.jsx)(e.code,{children:'build_config["some_field"]["advanced"] = True'})]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:"options"}),": Modify dynamic dropdown options."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(e.h3,{id:"tips-for-managing-dynamic-fields",children:"Tips for Managing Dynamic Fields"}),"\n",(0,s.jsx)(e.p,{children:"When working with dynamic fields, consider the following best practices to ensure a smooth user experience:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Minimize field changes"}),": Hide only fields that are truly irrelevant to avoid confusing users."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Test behavior"}),": Ensure that adding or removing fields doesn't accidentally erase user input."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Preserve data"}),": Use ",(0,s.jsx)(e.code,{children:'build_config["some_field"]["show"] = False'})," to hide fields without losing their values."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Clarify logic"}),": Add ",(0,s.jsx)(e.code,{children:"info"})," notes to explain why fields appear or disappear based on conditions."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Keep it manageable"}),": If the dynamic logic becomes too complex, consider breaking it into smaller components, unless it serves a clear purpose in a single node."]}),"\n"]}),"\n",(0,s.jsx)(e.h2,{id:"error-handling-and-logging",children:"Error handling and logging"}),"\n",(0,s.jsx)(e.p,{children:"In Langflow, robust error handling ensures that your components behave predictably, even when unexpected situations occur, such as invalid inputs, external API failures, or internal logic errors."}),"\n",(0,s.jsx)(e.h3,{id:"error-handling-techniques",children:"Error handling techniques"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Raise Exceptions"}),": If a critical error occurs, you can raise standard Python exceptions such as ",(0,s.jsx)(e.code,{children:"ValueError"}),", or specialized exceptions like ",(0,s.jsx)(e.code,{children:"ToolException"}),". Langflow will automatically catch these and display appropriate error messages in the visual editor, helping users quickly identify what went wrong."]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"compute_result",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> ",props:{style:{color:"#C9D1D9"}}},{content:"str",props:{style:{color:"#79C0FF"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" if not ",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".user_input:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" raise ",props:{style:{color:"#FF7B72"}}},{content:"ValueError",props:{style:{color:"#79C0FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:'"No input provided."',props:{style:{color:"#A5D6FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" # ...",props:{style:{color:"#8B949E"}}}]}],lang:"python"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Return Structured Error Data"}),': Instead of stopping a flow abruptly, you can return a Data object containing an "error" field. This approach allows the flow to continue operating and enables downstream components to detect and handle the error gracefully.']}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"run_model",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> Data:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" try",props:{style:{color:"#FF7B72"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" # ...",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" except ",props:{style:{color:"#FF7B72"}}},{content:"Exception ",props:{style:{color:"#79C0FF"}}},{content:"as",props:{style:{color:"#FF7B72"}}},{content:" e:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" Data(",props:{style:{color:"#C9D1D9"}}},{content:"data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"{",props:{style:{color:"#C9D1D9"}}},{content:'"error"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"str",props:{style:{color:"#79C0FF"}}},{content:"(e)})",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(e.h3,{id:"improve-debugging-and-flow-management",children:"Improve debugging and flow management"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsxs)(e.strong,{children:["Use ",(0,s.jsx)(e.code,{children:"self.status"})]}),": Each component has a status field where you can store short messages about the execution result\u2014such as success summaries, partial progress, or error notifications. These appear directly in the visual editor, making troubleshooting easier for users."]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"parse_data",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> Data:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# ...",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"self",props:{style:{color:"#79C0FF"}}},{content:".status ",props:{style:{color:"#C9D1D9"}}},{content:"= f",props:{style:{color:"#FF7B72"}}},{content:'"Parsed ',props:{style:{color:"#A5D6FF"}}},{content:"{len",props:{style:{color:"#79C0FF"}}},{content:"(rows)",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:' rows successfully."',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"return",props:{style:{color:"#FF7B72"}}},{content:" Data(",props:{style:{color:"#C9D1D9"}}},{content:"data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"{",props:{style:{color:"#C9D1D9"}}},{content:'"rows"',props:{style:{color:"#A5D6FF"}}},{content:": rows})",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsxs)(e.strong,{children:["Stop specific outputs with ",(0,s.jsx)(e.code,{children:"self.stop(...)"})]}),": You can halt individual output paths when certain conditions fail, without affecting the entire component. This is especially useful when working with components that have multiple output branches."]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"some_output",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> Data:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"if <",props:{style:{color:"#FF7B72"}}},{content:"some condition",props:{style:{color:"#C9D1D9"}}},{content:">",props:{style:{color:"#FF7B72"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" self",props:{style:{color:"#79C0FF"}}},{content:".stop(",props:{style:{color:"#C9D1D9"}}},{content:'"some_output"',props:{style:{color:"#A5D6FF"}}},{content:") ",props:{style:{color:"#C9D1D9"}}},{content:"# Tells Langflow no data flows",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" Data(",props:{style:{color:"#C9D1D9"}}},{content:"data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"{",props:{style:{color:"#C9D1D9"}}},{content:'"error"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Condition not met"',props:{style:{color:"#A5D6FF"}}},{content:"})",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.strong,{children:"Log events"}),': You can log key execution details inside components. Logs are displayed in the "Logs" or "Events" section of the component\'s detail view and can be accessed later through the flow\'s debug panel or exported files, providing a clear trace of the component\'s behavior for easier debugging.']}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"process_file",props:{style:{color:"#D2A8FF"}}},{content:"(self, file_path: ",props:{style:{color:"#C9D1D9"}}},{content:"str",props:{style:{color:"#79C0FF"}}},{content:"):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"self",props:{style:{color:"#79C0FF"}}},{content:".log(",props:{style:{color:"#C9D1D9"}}},{content:"f",props:{style:{color:"#FF7B72"}}},{content:'"Processing file ',props:{style:{color:"#A5D6FF"}}},{content:"{",props:{style:{color:"#79C0FF"}}},{content:"file_path",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:'"',props:{style:{color:"#A5D6FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# ...",props:{style:{color:"#8B949E"}}}]}],lang:"python"},annotations:[]}]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(e.h3,{id:"tips-for-error-handling-and-logging",children:"Tips for error handling and logging"}),"\n",(0,s.jsx)(e.p,{children:"To build more reliable components, consider the following best practices:"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Validate inputs early"}),": Catch missing or invalid inputs at the start to prevent broken logic."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsxs)(e.strong,{children:["Summarize with ",(0,s.jsx)(e.code,{children:"self.status"})]}),": Use short success or error summaries to help users understand results quickly."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Keep logs concise"}),": Focus on meaningful messages to avoid cluttering the visual editor."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Return structured errors"}),": When appropriate, return ",(0,s.jsx)(e.code,{children:'Data(data={"error": ...})'})," instead of raising exceptions to allow downstream handling."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.strong,{children:"Stop outputs selectively"}),": Only halt specific outputs with ",(0,s.jsx)(e.code,{children:"self.stop(...)"})," if necessary, to preserve correct flow behavior elsewhere."]}),"\n"]}),"\n",(0,s.jsx)(e.h2,{id:"contribute-custom-components-to-langflow",children:"Contribute custom components to Langflow"}),"\n",(0,s.jsxs)(e.p,{children:["See ",(0,s.jsx)(e.a,{href:"/contributing-components",children:"How to Contribute"})," to contribute your custom component to Langflow."]})]})}function D(o={}){const{wrapper:e}={...(0,r.R)(),...o.components};return e?(0,s.jsx)(e,{...o,children:(0,s.jsx)(F,{...o})}):F(o)}function m(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/22dd74f7.d1c29daf.js b/assets/js/22dd74f7.4d4ce93b.js similarity index 95% rename from assets/js/22dd74f7.d1c29daf.js rename to assets/js/22dd74f7.4d4ce93b.js index be0ddd9579..61d0f5cf3a 100644 --- a/assets/js/22dd74f7.d1c29daf.js +++ b/assets/js/22dd74f7.4d4ce93b.js @@ -1 +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":"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":"category","label":"Run flows","items":[{"type":"link","label":"Trigger flows with the Langflow API","href":"/concepts-publish","docId":"Concepts/concepts-publish","unlisted":false},{"type":"link","label":"Trigger flows with webhooks","href":"/webhook","docId":"Develop/webhook","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"link","label":"Test flows","href":"/concepts-playground","docId":"Concepts/concepts-playground","unlisted":false},{"type":"link","label":"Import and export flows","href":"/concepts-flows-import","docId":"Concepts/concepts-flows-import","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 client","href":"/mcp-client","docId":"Components/mcp-client","unlisted":false},{"type":"link","label":"Use Langflow as an MCP server","href":"/mcp-server","docId":"Concepts/mcp-server","unlisted":false},{"type":"link","label":"Connect an Astra DB MCP server to Langflow","href":"/mcp-component-astra","docId":"Integrations/mcp-component-astra","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Develop","items":[{"type":"link","label":"API keys and authentication","href":"/api-keys-and-authentication","docId":"Configuration/api-keys-and-authentication","unlisted":false},{"type":"link","label":"Install custom dependencies","href":"/install-custom-dependencies","docId":"Develop/install-custom-dependencies","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":"category","label":"Storage and memory","items":[{"type":"link","label":"Manage files","href":"/concepts-file-management","docId":"Concepts/concepts-file-management","unlisted":false},{"type":"link","label":"Manage memory","href":"/memory","docId":"Develop/memory","unlisted":false},{"type":"link","label":"Use Session IDs","href":"/session-id","docId":"Develop/session-id","unlisted":false},{"type":"link","label":"Configure an external PostgreSQL database","href":"/configuration-custom-database","docId":"Configuration/configuration-custom-database","unlisted":false},{"type":"link","label":"Database guide for enterprise administrators","href":"/enterprise-database-guide","docId":"Develop/enterprise-database-guide","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Observability","items":[{"type":"link","label":"Logs","href":"/logging","docId":"Develop/logging","unlisted":false},{"type":"category","label":"Monitoring","items":[{"type":"link","label":"Arize","href":"/integrations-arize","docId":"Integrations/Arize/integrations-arize","unlisted":false},{"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}],"collapsed":true,"collapsible":true},{"type":"link","label":"Telemetry","href":"/contributing-telemetry","docId":"Contributing/contributing-telemetry","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"link","label":"Use Langflow data types","href":"/data-types","docId":"Concepts/data-types","unlisted":false},{"type":"link","label":"Use voice mode","href":"/concepts-voice-mode","docId":"Concepts/concepts-voice-mode","unlisted":false},{"type":"link","label":"Use the Langflow CLI","href":"/configuration-cli","docId":"Configuration/configuration-cli","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Deploy","items":[{"type":"link","label":"Langflow deployment overview","href":"/deployment-overview","docId":"Deployment/deployment-overview","unlisted":false},{"type":"link","label":"Deploy a public Langflow server","href":"/deployment-public-server","docId":"Deployment/deployment-public-server","unlisted":false},{"type":"category","label":"Containerized deployments","items":[{"type":"link","label":"Containerize a Langflow application","href":"/develop-application","docId":"Develop/develop-application","unlisted":false},{"type":"link","label":"Langflow Docker images","href":"/deployment-docker","docId":"Deployment/deployment-docker","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":"Deployment architecture","href":"/deployment-architecture","docId":"Deployment/deployment-architecture","unlisted":false},{"type":"link","label":"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}],"collapsed":true,"collapsible":true},{"type":"category","label":"Cloud platforms","items":[{"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}],"collapsed":true,"collapsible":true},{"type":"category","label":"Components reference","items":[{"type":"link","label":"Components overview","href":"/concepts-components","docId":"Concepts/concepts-components","unlisted":false},{"type":"category","label":"Core components","items":[{"type":"link","label":"Input / Output","href":"/components-io","docId":"Components/components-io","unlisted":false},{"type":"link","label":"Agents","href":"/components-agents","docId":"Components/components-agents","unlisted":false},{"type":"category","label":"Models","items":[{"type":"link","label":"Language Model","href":"/components-models","docId":"Components/components-models","unlisted":false},{"type":"link","label":"Embedding Model","href":"/components-embedding-models","docId":"Components/components-embedding-models","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"link","label":"Data","href":"/components-data","docId":"Components/components-data","unlisted":false},{"type":"link","label":"Vector Stores","href":"/components-vector-stores","docId":"Components/components-vector-stores","unlisted":false},{"type":"category","label":"Processing","items":[{"type":"link","label":"Processing components","href":"/components-processing","docId":"Components/components-processing","unlisted":false},{"type":"link","label":"Prompt Template","href":"/components-prompts","docId":"Components/components-prompts","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"link","label":"Logic","href":"/components-logic","docId":"Components/components-logic","unlisted":false},{"type":"link","label":"Helpers","href":"/components-helpers","docId":"Components/components-helpers","unlisted":false},{"type":"link","label":"Tools","href":"/components-tools","docId":"Components/components-tools","unlisted":false},{"type":"link","label":"Memories","href":"/components-memories","docId":"Components/components-memories","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Bundles","items":[{"type":"link","label":"About bundles","href":"/components-bundle-components","docId":"Components/components-bundles","unlisted":false},{"type":"link","label":"AI/ML API","href":"/bundles-aiml","docId":"Components/bundles-aiml","unlisted":false},{"type":"link","label":"Amazon","href":"/bundles-amazon","docId":"Components/bundles-amazon","unlisted":false},{"type":"link","label":"Anthropic","href":"/bundles-anthropic","docId":"Components/bundles-anthropic","unlisted":false},{"type":"link","label":"Apify","href":"/integrations-apify","docId":"Integrations/Apify/integrations-apify","unlisted":false},{"type":"link","label":"arXiv","href":"/bundles-arxiv","docId":"Components/bundles-arxiv","unlisted":false},{"type":"link","label":"AssemblyAI","href":"/integrations-assemblyai","docId":"Integrations/integrations-assemblyai","unlisted":false},{"type":"link","label":"Azure","href":"/bundles-azure","docId":"Components/bundles-azure","unlisted":false},{"type":"link","label":"Baidu","href":"/bundles-baidu","docId":"Components/bundles-baidu","unlisted":false},{"type":"link","label":"Bing","href":"/bundles-bing","docId":"Components/bundles-bing","unlisted":false},{"type":"link","label":"Cleanlab","href":"/integrations-cleanlab","docId":"Integrations/Cleanlab/integrations-cleanlab","unlisted":false},{"type":"link","label":"Cloudflare","href":"/bundles-cloudflare","docId":"Components/bundles-cloudflare","unlisted":false},{"type":"link","label":"Cohere","href":"/bundles-cohere","docId":"Components/bundles-cohere","unlisted":false},{"type":"link","label":"Composio","href":"/integrations-composio","docId":"Integrations/Composio/integrations-composio","unlisted":false},{"type":"link","label":"DataStax","href":"/bundles-datastax","docId":"Components/bundles-datastax","unlisted":false},{"type":"link","label":"DeepSeek","href":"/bundles-deepseek","docId":"Components/bundles-deepseek","unlisted":false},{"type":"link","label":"Docling","href":"/integrations-docling","docId":"Integrations/Docling/integrations-docling","unlisted":false},{"type":"link","label":"DuckDuckGo","href":"/bundles-duckduckgo","docId":"Components/bundles-duckduckgo","unlisted":false},{"type":"link","label":"Exa","href":"/bundles-exa","docId":"Components/bundles-exa","unlisted":false},{"type":"link","label":"Glean","href":"/bundles-glean","docId":"Components/bundles-glean","unlisted":false},{"type":"category","label":"Google","items":[{"type":"link","label":"Google components","href":"/bundles-google","docId":"Components/bundles-google","unlisted":false},{"type":"link","label":"Google BigQuery","href":"/integrations-google-big-query","docId":"Integrations/Google/integrations-google-big-query","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"link","label":"Groq","href":"/bundles-groq","docId":"Components/bundles-groq","unlisted":false},{"type":"link","label":"Hugging Face","href":"/bundles-huggingface","docId":"Components/bundles-huggingface","unlisted":false},{"type":"link","label":"IBM","href":"/bundles-ibm","docId":"Components/bundles-ibm","unlisted":false},{"type":"link","label":"Icosa Computing","href":"/bundles-icosacomputing","docId":"Components/bundles-icosacomputing","unlisted":false},{"type":"link","label":"LangChain","href":"/bundles-langchain","docId":"Components/bundles-langchain","unlisted":false},{"type":"link","label":"LM Studio","href":"/bundles-lmstudio","docId":"Components/bundles-lmstudio","unlisted":false},{"type":"link","label":"MariTalk","href":"/bundles-maritalk","docId":"Components/bundles-maritalk","unlisted":false},{"type":"link","label":"Mem0","href":"/bundles-mem0","docId":"Components/bundles-mem0","unlisted":false},{"type":"link","label":"MistralAI","href":"/bundles-mistralai","docId":"Components/bundles-mistralai","unlisted":false},{"type":"category","label":"Notion","items":[{"type":"link","label":"Set up a Notion App","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":"link","label":"Novita","href":"/bundles-novita","docId":"Components/bundles-novita","unlisted":false},{"type":"category","label":"NVIDIA","items":[{"type":"link","label":"NVIDIA components","href":"/bundles-nvidia","docId":"Components/bundles-nvidia","unlisted":false},{"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},{"type":"link","label":"Ollama","href":"/bundles-ollama","docId":"Components/bundles-ollama","unlisted":false},{"type":"link","label":"OpenAI","href":"/bundles-openai","docId":"Components/bundles-openai","unlisted":false},{"type":"link","label":"OpenRouter","href":"/bundles-openrouter","docId":"Components/bundles-openrouter","unlisted":false},{"type":"link","label":"Perplexity","href":"/bundles-perplexity","docId":"Components/bundles-perplexity","unlisted":false},{"type":"link","label":"Redis","href":"/bundles-redis","docId":"Components/bundles-redis","unlisted":false},{"type":"link","label":"SambaNova","href":"/bundles-sambanova","docId":"Components/bundles-sambanova","unlisted":false},{"type":"link","label":"SearchApi","href":"/bundles-searchapi","docId":"Components/bundles-searchapi","unlisted":false},{"type":"link","label":"Vertex AI","href":"/bundles-vertexai","docId":"Components/bundles-vertexai","unlisted":false},{"type":"link","label":"Wikipedia","href":"/bundles-wikipedia","docId":"Components/bundles-wikipedia","unlisted":false},{"type":"link","label":"xAI","href":"/bundles-xai","docId":"Components/bundles-xai","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"link","label":"Create custom Python components","href":"/components-custom-components","docId":"Components/components-custom-components","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":"Use the TypeScript client","href":"/typescript-client","docId":"Develop/Clients/typescript-client","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":"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":"IBM Elite Support for Langflow","href":"/luna-for-langflow","docId":"Support/luna-for-langflow","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"html","className":"sidebar-ad","value":"\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
\\n Get started in minutes\\n Download Langflow Desktop\\n
\\n
\\n "}]},"docs":{"Agents/agents":{"id":"Agents/agents","title":"Use Langflow agents","description":"Langflow\'s Agent component is critical for building agent flows.","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 visual editor 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":"The /monitor endpoints are for internal Langflow functionality, primarily related to running flows in the Playground, storing chat history, and generating flow logs.","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/bundles-aiml":{"id":"Components/bundles-aiml","title":"AI/ML API","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-amazon":{"id":"Components/bundles-amazon","title":"Amazon","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-anthropic":{"id":"Components/bundles-anthropic","title":"Anthropic","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-arxiv":{"id":"Components/bundles-arxiv","title":"arXiv","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-azure":{"id":"Components/bundles-azure","title":"Azure","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-baidu":{"id":"Components/bundles-baidu","title":"Baidu","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-bing":{"id":"Components/bundles-bing","title":"Bing","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-cloudflare":{"id":"Components/bundles-cloudflare","title":"Cloudflare","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-cohere":{"id":"Components/bundles-cohere","title":"Cohere","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-datastax":{"id":"Components/bundles-datastax","title":"DataStax","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-deepseek":{"id":"Components/bundles-deepseek","title":"DeepSeek","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-duckduckgo":{"id":"Components/bundles-duckduckgo","title":"DuckDuckGo","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-exa":{"id":"Components/bundles-exa","title":"Exa","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-glean":{"id":"Components/bundles-glean","title":"Glean","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-google":{"id":"Components/bundles-google","title":"Google components","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-groq":{"id":"Components/bundles-groq","title":"Groq","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-huggingface":{"id":"Components/bundles-huggingface","title":"Hugging Face","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-ibm":{"id":"Components/bundles-ibm","title":"IBM","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-icosacomputing":{"id":"Components/bundles-icosacomputing","title":"Icosa Computing","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-langchain":{"id":"Components/bundles-langchain","title":"LangChain","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-lmstudio":{"id":"Components/bundles-lmstudio","title":"LM Studio","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-maritalk":{"id":"Components/bundles-maritalk","title":"MariTalk","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-mem0":{"id":"Components/bundles-mem0","title":"Mem0","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-mistralai":{"id":"Components/bundles-mistralai","title":"MistralAI","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-novita":{"id":"Components/bundles-novita","title":"Novita","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-nvidia":{"id":"Components/bundles-nvidia","title":"NVIDIA components","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-ollama":{"id":"Components/bundles-ollama","title":"Ollama","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-openai":{"id":"Components/bundles-openai","title":"OpenAI","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-openrouter":{"id":"Components/bundles-openrouter","title":"OpenRouter","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-perplexity":{"id":"Components/bundles-perplexity","title":"Perplexity","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-redis":{"id":"Components/bundles-redis","title":"Redis","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-sambanova":{"id":"Components/bundles-sambanova","title":"SambaNova","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-searchapi":{"id":"Components/bundles-searchapi","title":"SearchApi","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-vertexai":{"id":"Components/bundles-vertexai","title":"Vertex AI","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-wikipedia":{"id":"Components/bundles-wikipedia","title":"Wikipedia","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-xai":{"id":"Components/bundles-xai","title":"xAI","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/components-agents":{"id":"Components/components-agents","title":"Agents","description":"Langflow\'s Agent and MCP Tools components are critical for building agent flows.","sidebar":"docs"},"Components/components-bundles":{"id":"Components/components-bundles","title":"About bundles","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","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":"You can use Langflow\'s Data components to bring data into your flows from various sources like files, API endpoints, and URLs.","sidebar":"docs"},"Components/components-embedding-models":{"id":"Components/components-embedding-models","title":"Embedding Model","description":"Embedding Model components in Langflow generate text embeddings using a specified Large Language Model (LLM).","sidebar":"docs"},"Components/components-helpers":{"id":"Components/components-helpers","title":"Helpers","description":"Helper components provide utility functions to help manage data and perform simple tasks in your flow.","sidebar":"docs"},"Components/components-io":{"id":"Components/components-io","title":"Input / Output","description":"Langflow\'s Input and Output components define where data enters and exits your flow, but they don\'t have identical functionality.","sidebar":"docs"},"Components/components-logic":{"id":"Components/components-logic","title":"Logic","description":"Langflow\'s Logic components provide functionalities for routing, conditional processing, and flow management.","sidebar":"docs"},"Components/components-memories":{"id":"Components/components-memories","title":"Memories","description":"In Langflow version 1.5, the Memory category was removed.","sidebar":"docs"},"Components/components-models":{"id":"Components/components-models","title":"Language Model","description":"Language Model components in Langflow generate text using a specified Large Language Model (LLM).","sidebar":"docs"},"Components/components-processing":{"id":"Components/components-processing","title":"Processing components","description":"Langflow\'s Processing components process and transform data within a flow.","sidebar":"docs"},"Components/components-prompts":{"id":"Components/components-prompts","title":"Prompt Template","description":"Use the Prompt Template core component to create a prompt that supplies instructions and context to an LLM or agent, separate from other input like chat messages and file uploads.","sidebar":"docs"},"Components/components-tools":{"id":"Components/components-tools","title":"Tools","description":"In Langflow version 1.5, the Tools category was deprecated.","sidebar":"docs"},"Components/components-vector-stores":{"id":"Components/components-vector-stores","title":"Vector Stores","description":"Langflow\'s Vector Store components are used to read and write vector data, including embedding storage, vector search, Graph RAG traversals, and specialized provider-specific search, such as OpenSearch, Elasticsearch, and Vectara.","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":"Each Langflow server has a file management system where you can store files that you want to use in your flows.","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":"Test flows in the Playground","description":"Langflow\'s Playground is a dynamic interface you can use to test your LLM-based flows in real-time.","sidebar":"docs"},"Concepts/concepts-publish":{"id":"Concepts/concepts-publish","title":"Trigger flows with the Langflow API","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":"Use voice mode","description":"You can use Langflow\'s voice mode to interact with your flows verbally through a microphone and speakers.","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/api-keys-and-authentication":{"id":"Configuration/api-keys-and-authentication","title":"API keys and authentication","description":"Never expose Langflow ports directly to the internet without proper security measures.","sidebar":"docs"},"Configuration/configuration-cli":{"id":"Configuration/configuration-cli","title":"Langflow CLI","description":"The Langflow command line interface 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 Langflow projects.","sidebar":"docs"},"Configuration/environment-variables":{"id":"Configuration/environment-variables","title":"Environment variables","description":"Langflow uses environment variables to configure certain settings.","sidebar":"docs"},"Contributing/contributing-bundles":{"id":"Contributing/contributing-bundles","title":"Contribute bundles","description":"Bundles are groups of components that are related to a specific service provider.","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 statistics about feature usage and performance.","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-architecture":{"id":"Deployment/deployment-architecture","title":"Langflow architecture on Kubernetes","description":"There are two broad types of Langflow deployments:","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 how to deploy Langflow on Google Cloud Platform with a Cloud Shell script that walks through the process of setting up a Debian-based VM with the Langflow package, Nginx, and the necessary configurations to run the Langflow development environment in GCP.","sidebar":"docs"},"Deployment/deployment-hugging-face-spaces":{"id":"Deployment/deployment-hugging-face-spaces","title":"Deploy Langflow on Hugging Face Spaces","description":"This guide explains how to deploy Langflow on Hugging Face 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 Langflow API and visual editor.","sidebar":"docs"},"Deployment/deployment-kubernetes-prod":{"id":"Deployment/deployment-kubernetes-prod","title":"Deploy the Langflow production environment on Kubernetes","description":"The Langflow runtime Helm 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":"This section includes the different ways to bring your locally-built flows to the world.","sidebar":"docs"},"Deployment/deployment-prod-best-practices":{"id":"Deployment/deployment-prod-best-practices","title":"Best practices for Langflow on Kubernetes","description":"This guide provides best practices for deploying Langflow in production environments on Kubernetes.","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":"Deploy Langflow to Railway using a one-click template","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":"Containerize a Langflow application","description":"Designing flows in the visual editor is only the first step in building an application that uses Langflow.","sidebar":"docs"},"Develop/enterprise-database-guide":{"id":"Develop/enterprise-database-guide","title":"Langflow database guide for enterprise DBAs","description":"The Langflow database stores data that is essential for more Langflow operations, including startup, flow execution, user interactions, and administrative tasks.","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. This guide covers how to add dependencies for different Langflow installations, including Langflow Desktop and Langflow OSS.","sidebar":"docs"},"Develop/logging":{"id":"Develop/logging","title":"Logs","description":"This page provides information about Langflow logs, including logs for individual flows and the Langflow application itself.","sidebar":"docs"},"Develop/memory":{"id":"Develop/memory","title":"Memory management options","description":"Langflow provides flexible memory management options for storage and retrieval of data relevant to your flows and your Langflow server.","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 with more than 3,000 ready-made cloud tools called Actors.","sidebar":"docs"},"Integrations/Arize/integrations-arize":{"id":"Integrations/Arize/integrations-arize","title":"Arize","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":"Cleanlab","description":"Cleanlab adds automation and trust to every data point going in and every prediction coming out of AI and RAG solutions.","sidebar":"docs"},"Integrations/Composio/integrations-composio":{"id":"Integrations/Composio/integrations-composio","title":"Composio","description":"Composio components in Langflow provide Composio tools to your Agent components.","sidebar":"docs"},"Integrations/Docling/integrations-docling":{"id":"Integrations/Docling/integrations-docling","title":"Docling","description":"Langflow integrates with Docling through a bundle of components for parsing documents.","sidebar":"docs"},"Integrations/Google/integrations-google-big-query":{"id":"Integrations/Google/integrations-google-big-query","title":"Google BigQuery","description":"Langflow integrates with Google BigQuery through the BigQuery component in the Google bundle, allowing you to execute SQL queries and retrieve data from your BigQuery datasets.","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 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, including workflow builders and runtimes 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":"LangWatch is an all-in-one LLMOps platform for monitoring, observability, analytics, evaluations and alerting for getting user insights and improve your LLM workflows.","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":"This guide demonstrates how to use Langflow as an MCP client by using the MCP Tools component to run a DataStax Astra DB MCP server in an agent flow.","sidebar":"docs"},"Integrations/Notion/integrations-notion":{"id":"Integrations/Notion/integrations-notion","title":"Set up a Notion App","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":"The NVIDIA G-Assist 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":"The NVIDIA Retriever Extraction component integrates with the NVIDIA nv-ingest microservice for data ingestion, processing, and extraction of text files.","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":"IBM Elite Support for Langflow","description":"IBM Elite Support offers enterprise support for Langflow to help you 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"},"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 servers to your applications using Langflow\'s MCP Tools component.","sidebar":"docs"}}}}')}}]); \ No newline at end of file +"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":"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":"category","label":"Run flows","items":[{"type":"link","label":"Trigger flows with the Langflow API","href":"/concepts-publish","docId":"Concepts/concepts-publish","unlisted":false},{"type":"link","label":"Trigger flows with webhooks","href":"/webhook","docId":"Develop/webhook","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"link","label":"Test flows","href":"/concepts-playground","docId":"Concepts/concepts-playground","unlisted":false},{"type":"link","label":"Import and export flows","href":"/concepts-flows-import","docId":"Concepts/concepts-flows-import","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 client","href":"/mcp-client","docId":"Components/mcp-client","unlisted":false},{"type":"link","label":"Use Langflow as an MCP server","href":"/mcp-server","docId":"Concepts/mcp-server","unlisted":false},{"type":"link","label":"Connect an Astra DB MCP server to Langflow","href":"/mcp-component-astra","docId":"Integrations/mcp-component-astra","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Develop","items":[{"type":"link","label":"API keys and authentication","href":"/api-keys-and-authentication","docId":"Configuration/api-keys-and-authentication","unlisted":false},{"type":"link","label":"Install custom dependencies","href":"/install-custom-dependencies","docId":"Develop/install-custom-dependencies","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":"category","label":"Storage and memory","items":[{"type":"link","label":"Manage files","href":"/concepts-file-management","docId":"Concepts/concepts-file-management","unlisted":false},{"type":"link","label":"Manage memory","href":"/memory","docId":"Develop/memory","unlisted":false},{"type":"link","label":"Use Session IDs","href":"/session-id","docId":"Develop/session-id","unlisted":false},{"type":"link","label":"Configure an external PostgreSQL database","href":"/configuration-custom-database","docId":"Configuration/configuration-custom-database","unlisted":false},{"type":"link","label":"Database guide for enterprise administrators","href":"/enterprise-database-guide","docId":"Develop/enterprise-database-guide","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Observability","items":[{"type":"link","label":"Logs","href":"/logging","docId":"Develop/logging","unlisted":false},{"type":"category","label":"Monitoring","items":[{"type":"link","label":"Arize","href":"/integrations-arize","docId":"Integrations/Arize/integrations-arize","unlisted":false},{"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}],"collapsed":true,"collapsible":true},{"type":"link","label":"Telemetry","href":"/contributing-telemetry","docId":"Contributing/contributing-telemetry","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"link","label":"Use Langflow data types","href":"/data-types","docId":"Concepts/data-types","unlisted":false},{"type":"link","label":"Use voice mode","href":"/concepts-voice-mode","docId":"Concepts/concepts-voice-mode","unlisted":false},{"type":"link","label":"Use the Langflow CLI","href":"/configuration-cli","docId":"Configuration/configuration-cli","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Deploy","items":[{"type":"link","label":"Langflow deployment overview","href":"/deployment-overview","docId":"Deployment/deployment-overview","unlisted":false},{"type":"link","label":"Deploy a public Langflow server","href":"/deployment-public-server","docId":"Deployment/deployment-public-server","unlisted":false},{"type":"category","label":"Containerized deployments","items":[{"type":"link","label":"Containerize a Langflow application","href":"/develop-application","docId":"Develop/develop-application","unlisted":false},{"type":"link","label":"Langflow Docker images","href":"/deployment-docker","docId":"Deployment/deployment-docker","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":"Deployment architecture","href":"/deployment-architecture","docId":"Deployment/deployment-architecture","unlisted":false},{"type":"link","label":"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}],"collapsed":true,"collapsible":true},{"type":"category","label":"Cloud platforms","items":[{"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}],"collapsed":true,"collapsible":true},{"type":"category","label":"Components reference","items":[{"type":"link","label":"Components overview","href":"/concepts-components","docId":"Concepts/concepts-components","unlisted":false},{"type":"category","label":"Core components","items":[{"type":"link","label":"Input / Output","href":"/components-io","docId":"Components/components-io","unlisted":false},{"type":"link","label":"Agents","href":"/components-agents","docId":"Components/components-agents","unlisted":false},{"type":"category","label":"Models","items":[{"type":"link","label":"Language Model","href":"/components-models","docId":"Components/components-models","unlisted":false},{"type":"link","label":"Embedding Model","href":"/components-embedding-models","docId":"Components/components-embedding-models","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"link","label":"Data","href":"/components-data","docId":"Components/components-data","unlisted":false},{"type":"link","label":"Vector Stores","href":"/components-vector-stores","docId":"Components/components-vector-stores","unlisted":false},{"type":"category","label":"Processing","items":[{"type":"link","label":"Processing components","href":"/components-processing","docId":"Components/components-processing","unlisted":false},{"type":"link","label":"Prompt Template","href":"/components-prompts","docId":"Components/components-prompts","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"link","label":"Logic","href":"/components-logic","docId":"Components/components-logic","unlisted":false},{"type":"link","label":"Helpers","href":"/components-helpers","docId":"Components/components-helpers","unlisted":false},{"type":"link","label":"Tools","href":"/components-tools","docId":"Components/components-tools","unlisted":false},{"type":"link","label":"Memories","href":"/components-memories","docId":"Components/components-memories","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Bundles","items":[{"type":"link","label":"About bundles","href":"/components-bundle-components","docId":"Components/components-bundles","unlisted":false},{"type":"link","label":"AI/ML API","href":"/bundles-aiml","docId":"Components/bundles-aiml","unlisted":false},{"type":"link","label":"Amazon","href":"/bundles-amazon","docId":"Components/bundles-amazon","unlisted":false},{"type":"link","label":"Anthropic","href":"/bundles-anthropic","docId":"Components/bundles-anthropic","unlisted":false},{"type":"link","label":"Apify","href":"/integrations-apify","docId":"Integrations/Apify/integrations-apify","unlisted":false},{"type":"link","label":"arXiv","href":"/bundles-arxiv","docId":"Components/bundles-arxiv","unlisted":false},{"type":"link","label":"AssemblyAI","href":"/integrations-assemblyai","docId":"Integrations/integrations-assemblyai","unlisted":false},{"type":"link","label":"Azure","href":"/bundles-azure","docId":"Components/bundles-azure","unlisted":false},{"type":"link","label":"Baidu","href":"/bundles-baidu","docId":"Components/bundles-baidu","unlisted":false},{"type":"link","label":"Bing","href":"/bundles-bing","docId":"Components/bundles-bing","unlisted":false},{"type":"link","label":"Cleanlab","href":"/integrations-cleanlab","docId":"Integrations/Cleanlab/integrations-cleanlab","unlisted":false},{"type":"link","label":"Cloudflare","href":"/bundles-cloudflare","docId":"Components/bundles-cloudflare","unlisted":false},{"type":"link","label":"Cohere","href":"/bundles-cohere","docId":"Components/bundles-cohere","unlisted":false},{"type":"link","label":"Composio","href":"/integrations-composio","docId":"Integrations/Composio/integrations-composio","unlisted":false},{"type":"link","label":"DataStax","href":"/bundles-datastax","docId":"Components/bundles-datastax","unlisted":false},{"type":"link","label":"DeepSeek","href":"/bundles-deepseek","docId":"Components/bundles-deepseek","unlisted":false},{"type":"link","label":"Docling","href":"/integrations-docling","docId":"Integrations/Docling/integrations-docling","unlisted":false},{"type":"link","label":"DuckDuckGo","href":"/bundles-duckduckgo","docId":"Components/bundles-duckduckgo","unlisted":false},{"type":"link","label":"Exa","href":"/bundles-exa","docId":"Components/bundles-exa","unlisted":false},{"type":"link","label":"Glean","href":"/bundles-glean","docId":"Components/bundles-glean","unlisted":false},{"type":"category","label":"Google","items":[{"type":"link","label":"Google components","href":"/bundles-google","docId":"Components/bundles-google","unlisted":false},{"type":"link","label":"Google BigQuery","href":"/integrations-google-big-query","docId":"Integrations/Google/integrations-google-big-query","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"link","label":"Groq","href":"/bundles-groq","docId":"Components/bundles-groq","unlisted":false},{"type":"link","label":"Hugging Face","href":"/bundles-huggingface","docId":"Components/bundles-huggingface","unlisted":false},{"type":"link","label":"IBM","href":"/bundles-ibm","docId":"Components/bundles-ibm","unlisted":false},{"type":"link","label":"Icosa Computing","href":"/bundles-icosacomputing","docId":"Components/bundles-icosacomputing","unlisted":false},{"type":"link","label":"LangChain","href":"/bundles-langchain","docId":"Components/bundles-langchain","unlisted":false},{"type":"link","label":"LM Studio","href":"/bundles-lmstudio","docId":"Components/bundles-lmstudio","unlisted":false},{"type":"link","label":"MariTalk","href":"/bundles-maritalk","docId":"Components/bundles-maritalk","unlisted":false},{"type":"link","label":"Mem0","href":"/bundles-mem0","docId":"Components/bundles-mem0","unlisted":false},{"type":"link","label":"MistralAI","href":"/bundles-mistralai","docId":"Components/bundles-mistralai","unlisted":false},{"type":"category","label":"Notion","items":[{"type":"link","label":"Set up a Notion App","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":"link","label":"Novita","href":"/bundles-novita","docId":"Components/bundles-novita","unlisted":false},{"type":"category","label":"NVIDIA","items":[{"type":"link","label":"NVIDIA components","href":"/bundles-nvidia","docId":"Components/bundles-nvidia","unlisted":false},{"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},{"type":"link","label":"Ollama","href":"/bundles-ollama","docId":"Components/bundles-ollama","unlisted":false},{"type":"link","label":"OpenAI","href":"/bundles-openai","docId":"Components/bundles-openai","unlisted":false},{"type":"link","label":"OpenRouter","href":"/bundles-openrouter","docId":"Components/bundles-openrouter","unlisted":false},{"type":"link","label":"Perplexity","href":"/bundles-perplexity","docId":"Components/bundles-perplexity","unlisted":false},{"type":"link","label":"Redis","href":"/bundles-redis","docId":"Components/bundles-redis","unlisted":false},{"type":"link","label":"SambaNova","href":"/bundles-sambanova","docId":"Components/bundles-sambanova","unlisted":false},{"type":"link","label":"SearchApi","href":"/bundles-searchapi","docId":"Components/bundles-searchapi","unlisted":false},{"type":"link","label":"Vertex AI","href":"/bundles-vertexai","docId":"Components/bundles-vertexai","unlisted":false},{"type":"link","label":"Wikipedia","href":"/bundles-wikipedia","docId":"Components/bundles-wikipedia","unlisted":false},{"type":"link","label":"xAI","href":"/bundles-xai","docId":"Components/bundles-xai","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"link","label":"Create custom Python components","href":"/components-custom-components","docId":"Components/components-custom-components","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":"Use the TypeScript client","href":"/typescript-client","docId":"Develop/Clients/typescript-client","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":"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":"IBM Elite Support for Langflow","href":"/luna-for-langflow","docId":"Support/luna-for-langflow","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"html","className":"sidebar-ad","value":"\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n
\\n Get started in minutes\\n Download Langflow Desktop\\n
\\n
\\n "}]},"docs":{"Agents/agents":{"id":"Agents/agents","title":"Use Langflow agents","description":"Langflow\'s Agent component is critical for building agent flows.","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 visual editor 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":"The /monitor endpoints are for internal Langflow functionality, primarily related to running flows in the Playground, storing chat history, and generating flow logs.","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/bundles-aiml":{"id":"Components/bundles-aiml","title":"AI/ML API","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-amazon":{"id":"Components/bundles-amazon","title":"Amazon","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-anthropic":{"id":"Components/bundles-anthropic","title":"Anthropic","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-arxiv":{"id":"Components/bundles-arxiv","title":"arXiv","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-azure":{"id":"Components/bundles-azure","title":"Azure","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-baidu":{"id":"Components/bundles-baidu","title":"Baidu","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-bing":{"id":"Components/bundles-bing","title":"Bing","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-cloudflare":{"id":"Components/bundles-cloudflare","title":"Cloudflare","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-cohere":{"id":"Components/bundles-cohere","title":"Cohere","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-datastax":{"id":"Components/bundles-datastax","title":"DataStax","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-deepseek":{"id":"Components/bundles-deepseek","title":"DeepSeek","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-duckduckgo":{"id":"Components/bundles-duckduckgo","title":"DuckDuckGo","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-exa":{"id":"Components/bundles-exa","title":"Exa","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-glean":{"id":"Components/bundles-glean","title":"Glean","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-google":{"id":"Components/bundles-google","title":"Google components","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-groq":{"id":"Components/bundles-groq","title":"Groq","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-huggingface":{"id":"Components/bundles-huggingface","title":"Hugging Face","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-ibm":{"id":"Components/bundles-ibm","title":"IBM","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-icosacomputing":{"id":"Components/bundles-icosacomputing","title":"Icosa Computing","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-langchain":{"id":"Components/bundles-langchain","title":"LangChain","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-lmstudio":{"id":"Components/bundles-lmstudio","title":"LM Studio","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-maritalk":{"id":"Components/bundles-maritalk","title":"MariTalk","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-mem0":{"id":"Components/bundles-mem0","title":"Mem0","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-mistralai":{"id":"Components/bundles-mistralai","title":"MistralAI","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-novita":{"id":"Components/bundles-novita","title":"Novita","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-nvidia":{"id":"Components/bundles-nvidia","title":"NVIDIA components","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-ollama":{"id":"Components/bundles-ollama","title":"Ollama","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-openai":{"id":"Components/bundles-openai","title":"OpenAI","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-openrouter":{"id":"Components/bundles-openrouter","title":"OpenRouter","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-perplexity":{"id":"Components/bundles-perplexity","title":"Perplexity","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-redis":{"id":"Components/bundles-redis","title":"Redis","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-sambanova":{"id":"Components/bundles-sambanova","title":"SambaNova","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-searchapi":{"id":"Components/bundles-searchapi","title":"SearchApi","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-vertexai":{"id":"Components/bundles-vertexai","title":"Vertex AI","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-wikipedia":{"id":"Components/bundles-wikipedia","title":"Wikipedia","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/bundles-xai":{"id":"Components/bundles-xai","title":"xAI","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","sidebar":"docs"},"Components/components-agents":{"id":"Components/components-agents","title":"Agents","description":"Langflow\'s Agent and MCP Tools components are critical for building agent flows.","sidebar":"docs"},"Components/components-bundles":{"id":"Components/components-bundles","title":"About bundles","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","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":"You can use Langflow\'s Data components to bring data into your flows from various sources like files, API endpoints, and URLs.","sidebar":"docs"},"Components/components-embedding-models":{"id":"Components/components-embedding-models","title":"Embedding Model","description":"Embedding Model components in Langflow generate text embeddings using a specified Large Language Model (LLM).","sidebar":"docs"},"Components/components-helpers":{"id":"Components/components-helpers","title":"Helpers","description":"Helper components provide utility functions to help manage data and perform simple tasks in your flow.","sidebar":"docs"},"Components/components-io":{"id":"Components/components-io","title":"Input / Output","description":"Langflow\'s Input and Output components define where data enters and exits your flow, but they don\'t have identical functionality.","sidebar":"docs"},"Components/components-logic":{"id":"Components/components-logic","title":"Logic","description":"Langflow\'s Logic components provide functionalities for routing, conditional processing, and flow management.","sidebar":"docs"},"Components/components-memories":{"id":"Components/components-memories","title":"Memories","description":"In Langflow version 1.5, the Memory category was removed.","sidebar":"docs"},"Components/components-models":{"id":"Components/components-models","title":"Language Model","description":"Language Model components in Langflow generate text using a specified Large Language Model (LLM).","sidebar":"docs"},"Components/components-processing":{"id":"Components/components-processing","title":"Processing components","description":"Langflow\'s Processing components process and transform data within a flow.","sidebar":"docs"},"Components/components-prompts":{"id":"Components/components-prompts","title":"Prompt Template","description":"Use the Prompt Template core component to create a prompt that supplies instructions and context to an LLM or agent, separate from other input like chat messages and file uploads.","sidebar":"docs"},"Components/components-tools":{"id":"Components/components-tools","title":"Tools","description":"In Langflow version 1.5, the Tools category was deprecated.","sidebar":"docs"},"Components/components-vector-stores":{"id":"Components/components-vector-stores","title":"Vector Stores","description":"Langflow\'s Vector Store components are used to read and write vector data, including embedding storage, vector search, Graph RAG traversals, and specialized provider-specific search, such as OpenSearch, Elasticsearch, and Vectara.","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":"Each Langflow server has a file management system where you can store files that you want to use in your flows.","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":"Test flows in the Playground","description":"Langflow\'s Playground is a dynamic interface you can use to test your LLM-based flows in real-time.","sidebar":"docs"},"Concepts/concepts-publish":{"id":"Concepts/concepts-publish","title":"Trigger flows with the Langflow API","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":"Use voice mode","description":"You can use Langflow\'s voice mode to interact with your flows verbally through a microphone and speakers.","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/api-keys-and-authentication":{"id":"Configuration/api-keys-and-authentication","title":"API keys and authentication","description":"Never expose Langflow ports directly to the internet without proper security measures.","sidebar":"docs"},"Configuration/configuration-cli":{"id":"Configuration/configuration-cli","title":"Langflow CLI","description":"The Langflow command line interface 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 Langflow projects.","sidebar":"docs"},"Configuration/environment-variables":{"id":"Configuration/environment-variables","title":"Environment variables","description":"Langflow uses environment variables to configure certain settings.","sidebar":"docs"},"Contributing/contributing-bundles":{"id":"Contributing/contributing-bundles","title":"Contribute bundles","description":"Bundles are groups of components that are related to a specific service provider.","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 statistics about feature usage and performance.","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-architecture":{"id":"Deployment/deployment-architecture","title":"Langflow architecture on Kubernetes","description":"There are two broad types of Langflow deployments:","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 how to deploy Langflow on Google Cloud Platform with a Cloud Shell script that walks through the process of setting up a Debian-based VM with the Langflow package, Nginx, and the necessary configurations to run the Langflow development environment in GCP.","sidebar":"docs"},"Deployment/deployment-hugging-face-spaces":{"id":"Deployment/deployment-hugging-face-spaces","title":"Deploy Langflow on Hugging Face Spaces","description":"This guide explains how to deploy Langflow on Hugging Face 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 Langflow API and visual editor.","sidebar":"docs"},"Deployment/deployment-kubernetes-prod":{"id":"Deployment/deployment-kubernetes-prod","title":"Deploy the Langflow production environment on Kubernetes","description":"The Langflow runtime Helm 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":"This section includes the different ways to bring your locally-built flows to the world.","sidebar":"docs"},"Deployment/deployment-prod-best-practices":{"id":"Deployment/deployment-prod-best-practices","title":"Best practices for Langflow on Kubernetes","description":"This guide provides best practices for deploying Langflow in production environments on Kubernetes.","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":"Deploy Langflow to Railway using a one-click template","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":"Containerize a Langflow application","description":"Designing flows in the visual editor is only the first step in building an application that uses Langflow.","sidebar":"docs"},"Develop/enterprise-database-guide":{"id":"Develop/enterprise-database-guide","title":"Langflow database guide for enterprise DBAs","description":"The Langflow database stores data that is essential for more Langflow operations, including startup, flow execution, user interactions, and administrative tasks.","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. This guide covers how to add dependencies for different Langflow installations, including Langflow Desktop and Langflow OSS.","sidebar":"docs"},"Develop/logging":{"id":"Develop/logging","title":"Logs","description":"This page provides information about Langflow logs, including logs for individual flows and the Langflow application itself.","sidebar":"docs"},"Develop/memory":{"id":"Develop/memory","title":"Memory management options","description":"Langflow provides flexible memory management options for storage and retrieval of data relevant to your flows and your Langflow server.","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 with more than 3,000 ready-made cloud tools called Actors.","sidebar":"docs"},"Integrations/Arize/integrations-arize":{"id":"Integrations/Arize/integrations-arize","title":"Arize","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":"Cleanlab","description":"Cleanlab adds automation and trust to every data point going in and every prediction coming out of AI and RAG solutions.","sidebar":"docs"},"Integrations/Composio/integrations-composio":{"id":"Integrations/Composio/integrations-composio","title":"Composio","description":"Composio components in Langflow provide Composio tools to your Agent components.","sidebar":"docs"},"Integrations/Docling/integrations-docling":{"id":"Integrations/Docling/integrations-docling","title":"Docling","description":"Langflow integrates with Docling through a bundle of components for parsing documents.","sidebar":"docs"},"Integrations/Google/integrations-google-big-query":{"id":"Integrations/Google/integrations-google-big-query","title":"Google BigQuery","description":"Langflow integrates with Google BigQuery through the BigQuery component in the Google bundle, allowing you to execute SQL queries and retrieve data from your BigQuery datasets.","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 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, including workflow builders and runtimes 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":"LangWatch is an all-in-one LLMOps platform for monitoring, observability, analytics, evaluations and alerting for getting user insights and improve your LLM workflows.","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":"This guide demonstrates how to use Langflow as an MCP client by using the MCP Tools component to run a DataStax Astra DB MCP server in an agent flow.","sidebar":"docs"},"Integrations/Notion/integrations-notion":{"id":"Integrations/Notion/integrations-notion","title":"Set up a Notion App","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":"The NVIDIA System-Assist component integrates your flows with NVIDIA G-Assist, enabling interaction with NVIDIA GPU drivers through natural language prompts.","sidebar":"docs"},"Integrations/Nvidia/integrations-nvidia-ingest":{"id":"Integrations/Nvidia/integrations-nvidia-ingest","title":"Integrate NVIDIA Retriever Extraction with Langflow","description":"The NVIDIA Retriever Extraction component integrates with the NVIDIA nv-ingest microservice for data ingestion, processing, and extraction of text files.","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":"IBM Elite Support for Langflow","description":"IBM Elite Support offers enterprise support for Langflow to help you 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"},"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 servers to your applications using Langflow\'s MCP Tools component.","sidebar":"docs"}}}}')}}]); \ No newline at end of file diff --git a/assets/js/230d5fdc.59155fa1.js b/assets/js/230d5fdc.59155fa1.js deleted file mode 100644 index 27cdaa2772..0000000000 --- a/assets/js/230d5fdc.59155fa1.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[9976],{17886:(e,t,n)=>{n.d(t,{A:()=>i});n(96540);var r=n(64058),s=n(74848);function i({name:e,...t}){const n=r[e];return n?(0,s.jsx)(n,{...t}):null}},25791:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>l,default:()=>x,frontMatter:()=>a,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"Components/bundles-vertexai","title":"Vertex AI","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-vertexai.mdx","sourceDirName":"Components","slug":"/bundles-vertexai","permalink":"/bundles-vertexai","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Vertex AI","slug":"/bundles-vertexai"},"sidebar":"docs","previous":{"title":"SearchApi","permalink":"/bundles-searchapi"},"next":{"title":"Wikipedia","permalink":"/bundles-wikipedia"}}');var s=n(74848),i=n(28453),o=n(17886);const a={title:"Vertex AI",slug:"/bundles-vertexai"},l=void 0,d={},c=[{value:"Vertex AI text generation",id:"vertex-ai-text-generation",level:2},{value:"Vertex AI text generation parameters",id:"vertex-ai-text-generation-parameters",level:3},{value:"Vertex AI Embeddings",id:"vertex-ai-embeddings",level:2},{value:"Vertex AI Embeddings parameters",id:"vertex-ai-embeddings-parameters",level:3},{value:"Create a service account for Vertex AI authentication",id:"vertexai-credentials",level:2}];function h(e){const t={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};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,s.jsxs)(t.p,{children:["This page describes the components that are available in the ",(0,s.jsx)(t.strong,{children:"Vertex AI"})," bundle."]}),"\n",(0,s.jsxs)(t.p,{children:["For more information about Vertex AI features and functionality used by Vertex AI components, see the ",(0,s.jsx)(t.a,{href:"https://cloud.google.com/vertex-ai",children:"Vertex AI documentation"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["For other Google components, see the ",(0,s.jsxs)(t.a,{href:"/bundles-google",children:[(0,s.jsx)(t.strong,{children:"Google"})," bundle"]}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"vertex-ai-text-generation",children:"Vertex AI text generation"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.strong,{children:"Vertex AI"})," component generates text using Google Vertex AI models."]}),"\n",(0,s.jsxs)(t.p,{children:["It can output either a ",(0,s.jsx)(t.strong,{children:"Model Response"})," (",(0,s.jsx)(t.a,{href:"/data-types#message",children:(0,s.jsx)(t.code,{children:"Message"})}),") or a ",(0,s.jsx)(t.strong,{children:"Language Model"})," (",(0,s.jsx)(t.a,{href:"/data-types#languagemodel",children:(0,s.jsx)(t.code,{children:"LanguageModel"})}),")."]}),"\n",(0,s.jsxs)(t.p,{children:["Use the ",(0,s.jsx)(t.strong,{children:"Language Model"})," output when you want to use a Vertex AI model as the LLM for another LLM-driven component, such as a ",(0,s.jsx)(t.strong,{children:"Language Model"})," or ",(0,s.jsx)(t.strong,{children:"Smart Function"})," component."]}),"\n",(0,s.jsxs)(t.p,{children:["For more information, see ",(0,s.jsxs)(t.a,{href:"/components-models",children:[(0,s.jsx)(t.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"vertex-ai-text-generation-parameters",children:"Vertex AI text generation parameters"}),"\n",(0,s.jsxs)(t.p,{children:["Many ",(0,s.jsx)(t.strong,{children:"Vertex AI"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,s.jsx)(o.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(t.strong,{children:"Controls"})," in the ",(0,s.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Type"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"credentials"}),(0,s.jsx)(t.td,{children:"File"}),(0,s.jsxs)(t.td,{children:["Input parameter. JSON credentials file. Leave empty to fall back to environment variables. File type: JSON. For more information, see ",(0,s.jsx)(t.a,{href:"#vertexai-credentials",children:"Create a service account for Vertex AI authentication"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"model_name"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsx)(t.td,{children:'Input parameter. The name of the Vertex AI model to use. Default: "gemini-1.5-pro".'})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"project"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsx)(t.td,{children:"Input parameter. The project ID (advanced)."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"location"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsx)(t.td,{children:'Input parameter. The location for the Vertex AI API. Default: "us-central1" (advanced).'})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"max_output_tokens"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsx)(t.td,{children:"Input parameter. The maximum number of tokens to generate (advanced)."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"max_retries"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsx)(t.td,{children:"Input parameter. Maximum number of retries for API calls. Default: 1 (advanced)."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"temperature"}),(0,s.jsx)(t.td,{children:"Float"}),(0,s.jsx)(t.td,{children:"Input parameter. Controls randomness in the output. Default: 0.0."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"top_k"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsx)(t.td,{children:"Input parameter. The number of highest-probability vocabulary tokens to keep for top-k-filtering (advanced)."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"top_p"}),(0,s.jsx)(t.td,{children:"Float"}),(0,s.jsx)(t.td,{children:"Input parameter. The cumulative probability of all highest-probability vocabulary tokens that are kept for nucleus sampling. Default: 0.95 (advanced)."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"verbose"}),(0,s.jsx)(t.td,{children:"Boolean"}),(0,s.jsx)(t.td,{children:"Input parameter. Whether to print verbose output. Default: False (advanced)."})]})]})]}),"\n",(0,s.jsxs)(t.p,{children:["For more information about Vertex AI text generation parameters, see the ",(0,s.jsx)(t.a,{href:"https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/content-generation-parameters#token-sampling-parameters",children:"Vertex AI content generation parameters documentation"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"vertex-ai-embeddings",children:"Vertex AI Embeddings"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.strong,{children:"Vertex AI Embeddings"})," component is a wrapper around the ",(0,s.jsx)(t.a,{href:"https://cloud.google.com/vertex-ai/docs/generative-ai/embeddings/get-text-embeddings",children:"Google Vertex AI Embeddings API"})," for embedding generation."]}),"\n",(0,s.jsxs)(t.p,{children:["For more information about using embedding model components in flows, see ",(0,s.jsxs)(t.a,{href:"/components-embedding-models",children:[(0,s.jsx)(t.strong,{children:"Embedding Model"})," components"]}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"vertex-ai-embeddings-parameters",children:"Vertex AI Embeddings parameters"}),"\n",(0,s.jsxs)(t.p,{children:["Many ",(0,s.jsx)(t.strong,{children:"Vertex AI Embeddings"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,s.jsx)(o.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(t.strong,{children:"Controls"})," in the ",(0,s.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Type"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"credentials"}),(0,s.jsx)(t.td,{children:"Credentials"}),(0,s.jsxs)(t.td,{children:["Input parameter. JSON credentials file. Leave empty to fall back to environment variables. File type: JSON. For more information, see ",(0,s.jsx)(t.a,{href:"#vertexai-credentials",children:"Create a service account for Vertex AI authentication"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"location"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsxs)(t.td,{children:["Input parameter. The default location to use when making API calls. Default: ",(0,s.jsx)(t.code,{children:"us-central1"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"max_output_tokens"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsxs)(t.td,{children:["Input parameter. The token limit determines the maximum amount of text output from one prompt. Default: ",(0,s.jsx)(t.code,{children:"128"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"model_name"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsxs)(t.td,{children:["Input parameter. The name of the Vertex AI large language model. Default: ",(0,s.jsx)(t.code,{children:"text-bison"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"project"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsx)(t.td,{children:"Input parameter. The default GCP project to use when making Vertex API calls."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"request_parallelism"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsxs)(t.td,{children:["Input parameter. The amount of parallelism allowed for requests issued to Vertex AI models. Default: ",(0,s.jsx)(t.code,{children:"5"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"temperature"}),(0,s.jsx)(t.td,{children:"Float"}),(0,s.jsxs)(t.td,{children:["Input parameter. Tunes the degree of randomness in text generations. Should be a non-negative value. Default: ",(0,s.jsx)(t.code,{children:"0"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"top_k"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsxs)(t.td,{children:["Input parameter. How the model selects tokens for output. The next token is selected from the top ",(0,s.jsx)(t.code,{children:"k"})," tokens. Default: ",(0,s.jsx)(t.code,{children:"40"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"top_p"}),(0,s.jsx)(t.td,{children:"Float"}),(0,s.jsxs)(t.td,{children:["Input parameter. Tokens are selected from the most probable to least until the sum of their probabilities exceeds the top ",(0,s.jsx)(t.code,{children:"p"})," value. Default: ",(0,s.jsx)(t.code,{children:"0.95"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"tuned_model_name"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsxs)(t.td,{children:["Input parameter. The name of a tuned model. If provided, ",(0,s.jsx)(t.code,{children:"model_name"})," is ignored."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"verbose"}),(0,s.jsx)(t.td,{children:"Boolean"}),(0,s.jsx)(t.td,{children:"Input parameter. This parameter controls the level of detail in the output. When set to true, it prints internal states of the chain to help debug. Default: false."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"embeddings"}),(0,s.jsx)(t.td,{children:"Embeddings"}),(0,s.jsx)(t.td,{children:"Output parameter. An instance for generating embeddings using Vertex AI."})]})]})]}),"\n",(0,s.jsx)(t.h2,{id:"vertexai-credentials",children:"Create a service account for Vertex AI authentication"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.strong,{children:"Vertex AI Embeddings"})," and ",(0,s.jsx)(t.strong,{children:"Vertex AI"})," components authenticate with the ",(0,s.jsx)(t.a,{href:"https://console.cloud.google.com/marketplace/product/google/aiplatform.googleapis.com",children:"Google Vertex AI API"})," using a service account JSON file."]}),"\n",(0,s.jsxs)(t.p,{children:["These components require that you provide a service account JSON file in the ",(0,s.jsx)(t.strong,{children:"Credentials"})," parameter (",(0,s.jsx)(t.code,{children:"credentials"}),").\nYou can either provide the file directly in your component's settings or you can use a ",(0,s.jsxs)(t.a,{href:"https://cloud.google.com/docs/authentication/application-default-credentials",children:[(0,s.jsx)(t.code,{children:"GOOGLE_APPLICATION_CREDENTIALS"})," environment variable"]})," to reference the path to your JSON file."]}),"\n",(0,s.jsx)(t.p,{children:"The following steps explain how to create a service account for Langflow, create a service account JSON key file, and then use the JSON key file in Langflow:"}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["If you haven't done so already, ",(0,s.jsx)(t.a,{href:"https://cloud.google.com/vertex-ai/docs/start/cloud-environment",children:"enable the Vertex AI APIs in your Google Cloud project"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Create a ",(0,s.jsx)(t.a,{href:"https://cloud.google.com/iam/docs/service-account-overview",children:"service account"})," in your Google Cloud project."]}),"\n",(0,s.jsxs)(t.p,{children:["It is recommended that you ",(0,s.jsx)(t.a,{href:"https://cloud.google.com/vertex-ai/docs/general/custom-service-account",children:"create a custom service account for Vertex AI"})," because Langflow uses this account to access the Vertex AI APIs."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Assign the ",(0,s.jsx)(t.strong,{children:"Vertex AI Service Agent"})," role to the service account."]}),"\n",(0,s.jsxs)(t.p,{children:["This role allows Langflow to access Vertex AI resources.\nFor more information, see ",(0,s.jsx)(t.a,{href:"https://cloud.google.com/vertex-ai/docs/general/access-control",children:"Vertex AI access control with IAM"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"https://cloud.google.com/iam/docs/keys-create-delete#console",children:"Create a service account key"})," in JSON format for your Langflow Vertex AI service account."]}),"\n",(0,s.jsxs)(t.p,{children:["When you click ",(0,s.jsx)(t.strong,{children:"Create"}),", the JSON key file is downloaded."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["In Langflow, create or open a flow with the ",(0,s.jsx)(t.strong,{children:"Vertex AI"})," or ",(0,s.jsx)(t.strong,{children:"Vertex AI Embeddings"})," component."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["In the component's ",(0,s.jsx)(t.strong,{children:"Credentials"})," field, do one of the following:"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"Select your service account JSON file directly."}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Leave the ",(0,s.jsx)(t.strong,{children:"Credentials"})," field empty if you want to pull the key file from an environment variable.\nThen, you must provide the path to your JSON file in a ",(0,s.jsx)(t.code,{children:"GOOGLE_APPLICATION_CREDENTIALS"})," environment variable that is set somewhere relative to your Langflow instance.\nFor example, you can set the environment variable in your terminal, your Langflow ",(0,s.jsx)(t.code,{children:".env"})," file, or otherwise in the environment where your Langflow server or application runs."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"Select a local JSON key file for the Vertex AI component",src:n(65180).A+"",width:"1913",height:"819"})}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"Run your flow to verify that Langflow can use the service account credentials successfully."}),"\n",(0,s.jsxs)(t.p,{children:["For example, in a flow with ",(0,s.jsx)(t.strong,{children:"Chat Input"}),", ",(0,s.jsx)(t.strong,{children:"Chat Output"}),", and ",(0,s.jsx)(t.strong,{children:"Vertex AI"})," components, you can open the ",(0,s.jsx)(t.strong,{children:"Playground"})," and try chatting with the LLM.\nIf the LLM responds, then the credentials are configured correctly."]}),"\n"]}),"\n"]})]})}function x(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},65180:(e,t,n)=>{n.d(t,{A:()=>r});const r=n.p+"assets/images/configure-vertex-ai-credentials-in-langflow-10c417c45f725fee46d4ef5f740316b3.gif"}}]); \ No newline at end of file diff --git a/assets/js/230d5fdc.bdc0515f.js b/assets/js/230d5fdc.bdc0515f.js new file mode 100644 index 0000000000..59ee99106f --- /dev/null +++ b/assets/js/230d5fdc.bdc0515f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[9976],{17886:(e,t,n)=>{n.d(t,{A:()=>i});n(96540);var r=n(64058),s=n(74848);function i({name:e,...t}){const n=r[e];return n?(0,s.jsx)(n,{...t}):null}},25791:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>a,default:()=>x,frontMatter:()=>l,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"Components/bundles-vertexai","title":"Vertex AI","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-vertexai.mdx","sourceDirName":"Components","slug":"/bundles-vertexai","permalink":"/bundles-vertexai","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Vertex AI","slug":"/bundles-vertexai"},"sidebar":"docs","previous":{"title":"SearchApi","permalink":"/bundles-searchapi"},"next":{"title":"Wikipedia","permalink":"/bundles-wikipedia"}}');var s=n(74848),i=n(28453),o=(n(17886),n(31929));const l={title:"Vertex AI",slug:"/bundles-vertexai"},a=void 0,d={},c=[{value:"Vertex AI text generation",id:"vertex-ai-text-generation",level:2},{value:"Vertex AI text generation parameters",id:"vertex-ai-text-generation-parameters",level:3},...o.RM,{value:"Vertex AI Embeddings",id:"vertex-ai-embeddings",level:2},{value:"Vertex AI Embeddings parameters",id:"vertex-ai-embeddings-parameters",level:3},...o.RM,{value:"Create a service account for Vertex AI authentication",id:"vertexai-credentials",level:2}];function h(e){const t={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};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,s.jsxs)(t.p,{children:["This page describes the components that are available in the ",(0,s.jsx)(t.strong,{children:"Vertex AI"})," bundle."]}),"\n",(0,s.jsxs)(t.p,{children:["For more information about Vertex AI features and functionality used by Vertex AI components, see the ",(0,s.jsx)(t.a,{href:"https://cloud.google.com/vertex-ai",children:"Vertex AI documentation"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["For other Google components, see the ",(0,s.jsxs)(t.a,{href:"/bundles-google",children:[(0,s.jsx)(t.strong,{children:"Google"})," bundle"]}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"vertex-ai-text-generation",children:"Vertex AI text generation"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.strong,{children:"Vertex AI"})," component generates text using Google Vertex AI models."]}),"\n",(0,s.jsxs)(t.p,{children:["It can output either a ",(0,s.jsx)(t.strong,{children:"Model Response"})," (",(0,s.jsx)(t.a,{href:"/data-types#message",children:(0,s.jsx)(t.code,{children:"Message"})}),") or a ",(0,s.jsx)(t.strong,{children:"Language Model"})," (",(0,s.jsx)(t.a,{href:"/data-types#languagemodel",children:(0,s.jsx)(t.code,{children:"LanguageModel"})}),")."]}),"\n",(0,s.jsxs)(t.p,{children:["Use the ",(0,s.jsx)(t.strong,{children:"Language Model"})," output when you want to use a Vertex AI model as the LLM for another LLM-driven component, such as an ",(0,s.jsx)(t.strong,{children:"Agent"})," or ",(0,s.jsx)(t.strong,{children:"Smart Function"})," component."]}),"\n",(0,s.jsxs)(t.p,{children:["For more information, see ",(0,s.jsxs)(t.a,{href:"/components-models",children:[(0,s.jsx)(t.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"vertex-ai-text-generation-parameters",children:"Vertex AI text generation parameters"}),"\n",(0,s.jsx)(o.Ay,{}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Type"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"credentials"}),(0,s.jsx)(t.td,{children:"File"}),(0,s.jsxs)(t.td,{children:["Input parameter. JSON credentials file. Leave empty to fall back to environment variables. File type: JSON. For more information, see ",(0,s.jsx)(t.a,{href:"#vertexai-credentials",children:"Create a service account for Vertex AI authentication"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"model_name"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsx)(t.td,{children:'Input parameter. The name of the Vertex AI model to use. Default: "gemini-1.5-pro".'})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"project"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsx)(t.td,{children:"Input parameter. The project ID (advanced)."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"location"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsx)(t.td,{children:'Input parameter. The location for the Vertex AI API. Default: "us-central1" (advanced).'})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"max_output_tokens"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsx)(t.td,{children:"Input parameter. The maximum number of tokens to generate (advanced)."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"max_retries"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsx)(t.td,{children:"Input parameter. Maximum number of retries for API calls. Default: 1 (advanced)."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"temperature"}),(0,s.jsx)(t.td,{children:"Float"}),(0,s.jsx)(t.td,{children:"Input parameter. Controls randomness in the output. Default: 0.0."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"top_k"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsx)(t.td,{children:"Input parameter. The number of highest-probability vocabulary tokens to keep for top-k-filtering (advanced)."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"top_p"}),(0,s.jsx)(t.td,{children:"Float"}),(0,s.jsx)(t.td,{children:"Input parameter. The cumulative probability of all highest-probability vocabulary tokens that are kept for nucleus sampling. Default: 0.95 (advanced)."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"verbose"}),(0,s.jsx)(t.td,{children:"Boolean"}),(0,s.jsx)(t.td,{children:"Input parameter. Whether to print verbose output. Default: False (advanced)."})]})]})]}),"\n",(0,s.jsxs)(t.p,{children:["For more information about Vertex AI text generation parameters, see the ",(0,s.jsx)(t.a,{href:"https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/content-generation-parameters#token-sampling-parameters",children:"Vertex AI content generation parameters documentation"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"vertex-ai-embeddings",children:"Vertex AI Embeddings"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.strong,{children:"Vertex AI Embeddings"})," component is a wrapper around the ",(0,s.jsx)(t.a,{href:"https://cloud.google.com/vertex-ai/docs/generative-ai/embeddings/get-text-embeddings",children:"Google Vertex AI Embeddings API"})," for embedding generation."]}),"\n",(0,s.jsxs)(t.p,{children:["For more information about using embedding model components in flows, see ",(0,s.jsxs)(t.a,{href:"/components-embedding-models",children:[(0,s.jsx)(t.strong,{children:"Embedding Model"})," components"]}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"vertex-ai-embeddings-parameters",children:"Vertex AI Embeddings parameters"}),"\n",(0,s.jsx)(o.Ay,{}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Type"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"credentials"}),(0,s.jsx)(t.td,{children:"Credentials"}),(0,s.jsxs)(t.td,{children:["Input parameter. JSON credentials file. Leave empty to fall back to environment variables. File type: JSON. For more information, see ",(0,s.jsx)(t.a,{href:"#vertexai-credentials",children:"Create a service account for Vertex AI authentication"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"location"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsxs)(t.td,{children:["Input parameter. The default location to use when making API calls. Default: ",(0,s.jsx)(t.code,{children:"us-central1"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"max_output_tokens"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsxs)(t.td,{children:["Input parameter. The token limit determines the maximum amount of text output from one prompt. Default: ",(0,s.jsx)(t.code,{children:"128"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"model_name"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsxs)(t.td,{children:["Input parameter. The name of the Vertex AI large language model. Default: ",(0,s.jsx)(t.code,{children:"text-bison"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"project"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsx)(t.td,{children:"Input parameter. The default GCP project to use when making Vertex API calls."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"request_parallelism"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsxs)(t.td,{children:["Input parameter. The amount of parallelism allowed for requests issued to Vertex AI models. Default: ",(0,s.jsx)(t.code,{children:"5"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"temperature"}),(0,s.jsx)(t.td,{children:"Float"}),(0,s.jsxs)(t.td,{children:["Input parameter. Tunes the degree of randomness in text generations. Should be a non-negative value. Default: ",(0,s.jsx)(t.code,{children:"0"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"top_k"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsxs)(t.td,{children:["Input parameter. How the model selects tokens for output. The next token is selected from the top ",(0,s.jsx)(t.code,{children:"k"})," tokens. Default: ",(0,s.jsx)(t.code,{children:"40"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"top_p"}),(0,s.jsx)(t.td,{children:"Float"}),(0,s.jsxs)(t.td,{children:["Input parameter. Tokens are selected from the most probable to least until the sum of their probabilities exceeds the top ",(0,s.jsx)(t.code,{children:"p"})," value. Default: ",(0,s.jsx)(t.code,{children:"0.95"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"tuned_model_name"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsxs)(t.td,{children:["Input parameter. The name of a tuned model. If provided, ",(0,s.jsx)(t.code,{children:"model_name"})," is ignored."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"verbose"}),(0,s.jsx)(t.td,{children:"Boolean"}),(0,s.jsx)(t.td,{children:"Input parameter. This parameter controls the level of detail in the output. When set to true, it prints internal states of the chain to help debug. Default: false."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"embeddings"}),(0,s.jsx)(t.td,{children:"Embeddings"}),(0,s.jsx)(t.td,{children:"Output parameter. An instance for generating embeddings using Vertex AI."})]})]})]}),"\n",(0,s.jsx)(t.h2,{id:"vertexai-credentials",children:"Create a service account for Vertex AI authentication"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.strong,{children:"Vertex AI Embeddings"})," and ",(0,s.jsx)(t.strong,{children:"Vertex AI"})," components authenticate with the ",(0,s.jsx)(t.a,{href:"https://console.cloud.google.com/marketplace/product/google/aiplatform.googleapis.com",children:"Google Vertex AI API"})," using a service account JSON file."]}),"\n",(0,s.jsxs)(t.p,{children:["These components require that you provide a service account JSON file in the ",(0,s.jsx)(t.strong,{children:"Credentials"})," parameter (",(0,s.jsx)(t.code,{children:"credentials"}),").\nYou can either provide the file directly in your component's settings or you can use a ",(0,s.jsxs)(t.a,{href:"https://cloud.google.com/docs/authentication/application-default-credentials",children:[(0,s.jsx)(t.code,{children:"GOOGLE_APPLICATION_CREDENTIALS"})," environment variable"]})," to reference the path to your JSON file."]}),"\n",(0,s.jsx)(t.p,{children:"The following steps explain how to create a service account for Langflow, create a service account JSON key file, and then use the JSON key file in Langflow:"}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["If you haven't done so already, ",(0,s.jsx)(t.a,{href:"https://cloud.google.com/vertex-ai/docs/start/cloud-environment",children:"enable the Vertex AI APIs in your Google Cloud project"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Create a ",(0,s.jsx)(t.a,{href:"https://cloud.google.com/iam/docs/service-account-overview",children:"service account"})," in your Google Cloud project."]}),"\n",(0,s.jsxs)(t.p,{children:["It is recommended that you ",(0,s.jsx)(t.a,{href:"https://cloud.google.com/vertex-ai/docs/general/custom-service-account",children:"create a custom service account for Vertex AI"})," because Langflow uses this account to access the Vertex AI APIs."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Assign the ",(0,s.jsx)(t.strong,{children:"Vertex AI Service Agent"})," role to the service account."]}),"\n",(0,s.jsxs)(t.p,{children:["This role allows Langflow to access Vertex AI resources.\nFor more information, see ",(0,s.jsx)(t.a,{href:"https://cloud.google.com/vertex-ai/docs/general/access-control",children:"Vertex AI access control with IAM"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"https://cloud.google.com/iam/docs/keys-create-delete#console",children:"Create a service account key"})," in JSON format for your Langflow Vertex AI service account."]}),"\n",(0,s.jsxs)(t.p,{children:["When you click ",(0,s.jsx)(t.strong,{children:"Create"}),", the JSON key file is downloaded."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["In Langflow, create or open a flow with the ",(0,s.jsx)(t.strong,{children:"Vertex AI"})," or ",(0,s.jsx)(t.strong,{children:"Vertex AI Embeddings"})," component."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["In the component's ",(0,s.jsx)(t.strong,{children:"Credentials"})," field, do one of the following:"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"Select your service account JSON file directly."}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Leave the ",(0,s.jsx)(t.strong,{children:"Credentials"})," field empty if you want to pull the key file from an environment variable.\nThen, you must provide the path to your JSON file in a ",(0,s.jsx)(t.code,{children:"GOOGLE_APPLICATION_CREDENTIALS"})," environment variable that is set somewhere relative to your Langflow instance.\nFor example, you can set the environment variable in your terminal, your Langflow ",(0,s.jsx)(t.code,{children:".env"})," file, or otherwise in the environment where your Langflow server or application runs."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"Select a local JSON key file for the Vertex AI component",src:n(65180).A+"",width:"1913",height:"819"})}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"Run your flow to verify that Langflow can use the service account credentials successfully."}),"\n",(0,s.jsxs)(t.p,{children:["For example, in a flow with ",(0,s.jsx)(t.strong,{children:"Chat Input"}),", ",(0,s.jsx)(t.strong,{children:"Chat Output"}),", and ",(0,s.jsx)(t.strong,{children:"Vertex AI"})," components, you can open the ",(0,s.jsx)(t.strong,{children:"Playground"})," and try chatting with the LLM.\nIf the LLM responds, then the credentials are configured correctly."]}),"\n"]}),"\n"]})]})}function x(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},31929:(e,t,n)=>{n.d(t,{Ay:()=>a,RM:()=>o});var r=n(74848),s=n(28453),i=n(17886);const o=[];function l(e){const t={a:"a",p:"p",strong:"strong",...(0,s.R)(),...e.components};return(0,r.jsxs)(t.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,r.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Controls"})," in the ",(0,r.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function a(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},65180:(e,t,n)=>{n.d(t,{A:()=>r});const r=n.p+"assets/images/configure-vertex-ai-credentials-in-langflow-10c417c45f725fee46d4ef5f740316b3.gif"}}]); \ No newline at end of file diff --git a/assets/js/238e6167.166f30e1.js b/assets/js/238e6167.ca32a726.js similarity index 90% rename from assets/js/238e6167.166f30e1.js rename to assets/js/238e6167.ca32a726.js index bdad891791..42c76e60a1 100644 --- a/assets/js/238e6167.166f30e1.js +++ b/assets/js/238e6167.ca32a726.js @@ -1 +1 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[3953],{17886:(e,n,t)=>{t.d(n,{A:()=>o});t(96540);var i=t(64058),s=t(74848);function o({name:e,...n}){const t=i[e];return t?(0,s.jsx)(t,{...n}):null}},29750:(e,n,t)=>{t.d(n,{A:()=>i});const i=t.p+"assets/images/notion_meeting_agent_part_2-cbaa61a7a2dc7af1fc8541bfae8491ac.png"},43725:(e,n,t)=>{t.d(n,{A:()=>i});const i=t.p+"assets/images/notion_meeting_agent_part_1-58b920a4f8129f18bbf4483b3e3255a5.png"},63398:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>a,default:()=>p,frontMatter:()=>l,metadata:()=>i,toc:()=>c});const i=JSON.parse('{"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.","source":"@site/docs/Integrations/Notion/notion-agent-meeting-notes.mdx","sourceDirName":"Integrations/Notion","slug":"/integrations/notion/notion-agent-meeting-notes","permalink":"/integrations/notion/notion-agent-meeting-notes","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Notion Meeting Notes Agent","slug":"/integrations/notion/notion-agent-meeting-notes"},"sidebar":"docs","previous":{"title":"Notion Conversational Agent","permalink":"/integrations/notion/notion-agent-conversational"},"next":{"title":"Novita","permalink":"/bundles-novita"}}');var s=t(74848),o=t(28453),r=t(17886);const l={title:"Notion Meeting Notes Agent",slug:"/integrations/notion/notion-agent-meeting-notes"},a=void 0,d={},c=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Components",id:"components",level:2},{value:"Meeting Transcript (text input)",id:"meeting-transcript-text-input",level:3},{value:"List Users (Notion component)",id:"list-users-notion-component",level:3},{value:"List Databases (Notion component)",id:"list-databases-notion-component",level:3},{value:"Prompt Template",id:"prompt-template",level:3},{value:"Meeting Summarizer (Tool Calling Agent)",id:"meeting-summarizer-tool-calling-agent",level:3},{value:"Notion Agent (Tool Calling Agent)",id:"notion-agent-tool-calling-agent",level:3},{value:"Notion components (tools)",id:"notion-components-tools",level:3},{value:"List Database Properties",id:"list-database-properties",level:4},{value:"Create Page",id:"create-page",level:4},{value:"Update Page Property",id:"update-page-property",level:4},{value:"Add Content to Page",id:"add-content-to-page",level:4},{value:"Chat Output",id:"chat-output",level:3},{value:"Flow Process",id:"flow-process",level:2},{value:"Run the Notion Meeting Notes flow",id:"run-the-notion-meeting-notes-flow",level:2},{value:"Customization",id:"customization",level:2},{value:"Troubleshooting",id:"troubleshooting",level:2}];function h(e){const n={a:"a",admonition:"admonition",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"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."}),"\n",(0,s.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/integrations/notion/setup",children:"A Notion App"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://www.notion.so/my-integrations",children:"A Notion API key"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://platform.openai.com/account/api-keys",children:"An OpenAI API key"})}),"\n",(0,s.jsxs)(n.li,{children:["Recommended: ",(0,s.jsx)(n.a,{target:"_blank","data-noBrokenLinkCheck":!0,href:t(86924).A+"",children:"Download the Meeting Agent Flow JSON"}),", and then ",(0,s.jsx)(n.a,{href:"/concepts-flows-import",children:"import the flow"})," into Langflow."]}),"\n"]}),"\n",(0,s.jsx)(n.admonition,{type:"important",children:(0,s.jsx)(n.p,{children:"Treat all keys and other credentials as sensitive information. Use secure references, and don't share them publicly."})}),"\n",(0,s.jsx)(n.h2,{id:"components",children:"Components"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Notion Meeting Agent Part 1",src:t(43725).A+"",width:"1427",height:"645"})}),"\n",(0,s.jsx)(n.h3,{id:"meeting-transcript-text-input",children:"Meeting Transcript (text input)"}),"\n",(0,s.jsx)(n.p,{children:"This component allows users to input the meeting transcript directly into the flow."}),"\n",(0,s.jsx)(n.h3,{id:"list-users-notion-component",children:"List Users (Notion component)"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Purpose"}),": Retrieves a list of users from the Notion workspace."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Input"}),": Notion Secret (API key)"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Output"}),": List of user data"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"list-databases-notion-component",children:"List Databases (Notion component)"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Purpose"}),": Searches and lists all databases in the Notion workspace."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Input"}),":","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Notion Secret (API key)"}),"\n",(0,s.jsx)(n.li,{children:"Query (optional)"}),"\n",(0,s.jsx)(n.li,{children:"Filter Type (default: database)"}),"\n",(0,s.jsx)(n.li,{children:"Sort Direction"}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Output"}),": List of database data"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"prompt-template",children:"Prompt Template"}),"\n",(0,s.jsx)(n.p,{children:"This component creates a dynamic prompt template using the following inputs:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Meeting Transcript"}),"\n",(0,s.jsx)(n.li,{children:"List of Users"}),"\n",(0,s.jsx)(n.li,{children:"List of Databases"}),"\n",(0,s.jsx)(n.li,{children:"Current Date"}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"meeting-summarizer-tool-calling-agent",children:"Meeting Summarizer (Tool Calling Agent)"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Purpose"}),": Analyzes the meeting transcript and identifies tasks and action items."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Inputs"}),":","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["System Prompt (from the ",(0,s.jsx)(n.strong,{children:"Prompt Template"})," component)"]}),"\n",(0,s.jsx)(n.li,{children:"Language Model (OpenAI)"}),"\n",(0,s.jsxs)(n.li,{children:["Tools:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Notion Search"}),"\n",(0,s.jsx)(n.li,{children:"List Database Properties"}),"\n",(0,s.jsx)(n.li,{children:"Create Page"}),"\n",(0,s.jsx)(n.li,{children:"Update Page Property"}),"\n",(0,s.jsx)(n.li,{children:"Add Content to Page"}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Notion Meeting Agent Part 2",src:t(29750).A+"",width:"1362",height:"819"})}),"\n",(0,s.jsx)(n.h3,{id:"notion-agent-tool-calling-agent",children:"Notion Agent (Tool Calling Agent)"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Purpose"}),": Executes actions in Notion based on the meeting summary."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Inputs"}),":","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["System Prompt (from the second ",(0,s.jsx)(n.strong,{children:"Prompt Template"})," component)"]}),"\n",(0,s.jsx)(n.li,{children:"Language Model (OpenAI)"}),"\n",(0,s.jsxs)(n.li,{children:["Tools:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"List Database Properties"}),"\n",(0,s.jsx)(n.li,{children:"Create Page"}),"\n",(0,s.jsx)(n.li,{children:"Update Page Property"}),"\n",(0,s.jsx)(n.li,{children:"Add Content to Page"}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"notion-components-tools",children:"Notion components (tools)"}),"\n",(0,s.jsx)(n.h4,{id:"list-database-properties",children:"List Database Properties"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Purpose"}),": Retrieves the properties of a specified Notion database."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Input"}),":","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Database ID"}),"\n",(0,s.jsx)(n.li,{children:"Notion Secret (API key)"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"create-page",children:"Create Page"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Purpose"}),": Creates a new page in a Notion database."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Inputs"}),":","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Database ID"}),"\n",(0,s.jsx)(n.li,{children:"Notion Secret (API key)"}),"\n",(0,s.jsx)(n.li,{children:"Properties (JSON)"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"update-page-property",children:"Update Page Property"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Purpose"}),": Updates the properties of an existing Notion page."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Inputs"}),":","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Page ID"}),"\n",(0,s.jsx)(n.li,{children:"Notion Secret (API key)"}),"\n",(0,s.jsx)(n.li,{children:"Properties to update"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"add-content-to-page",children:"Add Content to Page"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Purpose"}),": Converts markdown text to Notion blocks and appends them to a specified Notion page."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Inputs"}),":","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Page/Block ID"}),"\n",(0,s.jsx)(n.li,{children:"Notion Secret (API key)"}),"\n",(0,s.jsx)(n.li,{children:"Markdown text"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"chat-output",children:"Chat Output"}),"\n",(0,s.jsx)(n.p,{children:"Displays the final output of the Notion Agent in the Playground."}),"\n",(0,s.jsx)(n.h2,{id:"flow-process",children:"Flow Process"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"The user inputs a meeting transcript."}),"\n",(0,s.jsx)(n.li,{children:"The flow retrieves the list of Notion users and databases."}),"\n",(0,s.jsx)(n.li,{children:"A prompt is generated using the transcript, user list, database list, and current date."}),"\n",(0,s.jsx)(n.li,{children:"The Meeting Summarizer analyzes the transcript and identifies tasks and action items."}),"\n",(0,s.jsxs)(n.li,{children:["The Notion Agent uses the meeting summary to:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Create new pages for new tasks"}),"\n",(0,s.jsx)(n.li,{children:"Update existing pages for existing tasks"}),"\n",(0,s.jsx)(n.li,{children:"Add content to pages with meeting notes"}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.li,{children:"The Chat Output displays a summary of actions taken in Notion."}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"run-the-notion-meeting-notes-flow",children:"Run the Notion Meeting Notes flow"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Create a flow manually or import a pre-built flow JSON file:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Recommended: ",(0,s.jsx)(n.a,{target:"_blank","data-noBrokenLinkCheck":!0,href:t(86924).A+"",children:"Download the Meeting Agent flow JSON"})," and then ",(0,s.jsx)(n.a,{href:"/concepts-flows-import",children:"import the flow"})," into Langflow."]}),"\n",(0,s.jsx)(n.li,{children:"Create a blank flow, and then add the previously described components to your flow, connecting them as shown in the flow diagram."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Input the Notion and OpenAI API keys in their respective components."}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Paste your meeting transcript into the ",(0,s.jsx)(n.strong,{children:"Meeting Transcript"})," component."]}),"\n",(0,s.jsx)(n.p,{children:"For optimal results, use detailed meeting transcripts. The quality of the output depends on the comprehensiveness of the input provided."}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Run the flow by clicking ",(0,s.jsx)(r.A,{name:"Play","aria-hidden":"True"})," ",(0,s.jsx)(n.strong,{children:"Run component"})," on the ",(0,s.jsx)(n.strong,{children:"Chat Output"})," component or open the ",(0,s.jsx)(n.strong,{children:"Playground"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Review the output summarizing the actions taken in your Notion workspace."}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"customization",children:"Customization"}),"\n",(0,s.jsx)(n.p,{children:"The flow can be customized to meet your team's specific needs."}),"\n",(0,s.jsx)(n.p,{children:"Customize this flow by:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Adjusting the system prompt to change the agent's behavior or knowledge base."}),"\n",(0,s.jsx)(n.li,{children:"Adding or removing Notion tools based on your specific needs."}),"\n",(0,s.jsx)(n.li,{children:"Modifying the OpenAI model parameters (e.g., temperature) to adjust the agent's response style."}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"troubleshooting",children:"Troubleshooting"}),"\n",(0,s.jsx)(n.p,{children:"If you encounter issues:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Ensure all API keys are correctly set and have the necessary permissions."}),"\n",(0,s.jsx)(n.li,{children:"Check that your Notion integration has access to the relevant pages and databases."}),"\n",(0,s.jsx)(n.li,{children:"Verify that all components are properly connected in the flow."}),"\n",(0,s.jsx)(n.li,{children:"Review the Langflow logs for any error messages."}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["For more advanced usage and integration options, refer to the ",(0,s.jsx)(n.a,{href:"https://developers.notion.com/",children:"Notion API documentation"})," and ",(0,s.jsx)(n.a,{href:"/",children:"Langflow documentation"}),"."]})]})}function p(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},86924:(e,n,t)=>{t.d(n,{A:()=>i});const i=t.p+"assets/files/Meeting_Notes_Agent-b29188c0cb70736d19dd52965db5f352.json"}}]); \ No newline at end of file +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[3953],{17886:(e,n,t)=>{t.d(n,{A:()=>o});t(96540);var i=t(64058),s=t(74848);function o({name:e,...n}){const t=i[e];return t?(0,s.jsx)(t,{...n}):null}},29750:(e,n,t)=>{t.d(n,{A:()=>i});const i=t.p+"assets/images/notion_meeting_agent_part_2-cbaa61a7a2dc7af1fc8541bfae8491ac.png"},43725:(e,n,t)=>{t.d(n,{A:()=>i});const i=t.p+"assets/images/notion_meeting_agent_part_1-58b920a4f8129f18bbf4483b3e3255a5.png"},63398:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>a,default:()=>p,frontMatter:()=>l,metadata:()=>i,toc:()=>c});const i=JSON.parse('{"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.","source":"@site/docs/Integrations/Notion/notion-agent-meeting-notes.mdx","sourceDirName":"Integrations/Notion","slug":"/integrations/notion/notion-agent-meeting-notes","permalink":"/integrations/notion/notion-agent-meeting-notes","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Notion Meeting Notes Agent","slug":"/integrations/notion/notion-agent-meeting-notes"},"sidebar":"docs","previous":{"title":"Notion Conversational Agent","permalink":"/integrations/notion/notion-agent-conversational"},"next":{"title":"Novita","permalink":"/bundles-novita"}}');var s=t(74848),o=t(28453),r=t(17886);const l={title:"Notion Meeting Notes Agent",slug:"/integrations/notion/notion-agent-meeting-notes"},a=void 0,d={},c=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Components",id:"components",level:2},{value:"Meeting Transcript (text input)",id:"meeting-transcript-text-input",level:3},{value:"List Users (Notion component)",id:"list-users-notion-component",level:3},{value:"List Databases (Notion component)",id:"list-databases-notion-component",level:3},{value:"Prompt Template",id:"prompt-template",level:3},{value:"Meeting Summarizer (Tool Calling Agent)",id:"meeting-summarizer-tool-calling-agent",level:3},{value:"Notion Agent (Tool Calling Agent)",id:"notion-agent-tool-calling-agent",level:3},{value:"Notion components (tools)",id:"notion-components-tools",level:3},{value:"List Database Properties",id:"list-database-properties",level:4},{value:"Create Page",id:"create-page",level:4},{value:"Update Page Property",id:"update-page-property",level:4},{value:"Add Content to Page",id:"add-content-to-page",level:4},{value:"Chat Output",id:"chat-output",level:3},{value:"Flow Process",id:"flow-process",level:2},{value:"Run the Notion Meeting Notes flow",id:"run-the-notion-meeting-notes-flow",level:2},{value:"Customization",id:"customization",level:2},{value:"Troubleshooting",id:"troubleshooting",level:2}];function h(e){const n={a:"a",admonition:"admonition",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"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."}),"\n",(0,s.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/integrations/notion/setup",children:"A Notion App"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://www.notion.so/my-integrations",children:"A Notion API key"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://platform.openai.com/account/api-keys",children:"An OpenAI API key"})}),"\n",(0,s.jsxs)(n.li,{children:["Recommended: ",(0,s.jsx)(n.a,{target:"_blank","data-noBrokenLinkCheck":!0,href:t(86924).A+"",children:"Download the Meeting Agent Flow JSON"}),", and then ",(0,s.jsx)(n.a,{href:"/concepts-flows-import",children:"import the flow"})," into Langflow."]}),"\n"]}),"\n",(0,s.jsx)(n.admonition,{type:"important",children:(0,s.jsx)(n.p,{children:"Treat all keys and other credentials as sensitive information. Use secure references, and don't share them publicly."})}),"\n",(0,s.jsx)(n.h2,{id:"components",children:"Components"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Notion Meeting Agent Part 1",src:t(43725).A+"",width:"1427",height:"645"})}),"\n",(0,s.jsx)(n.h3,{id:"meeting-transcript-text-input",children:"Meeting Transcript (text input)"}),"\n",(0,s.jsx)(n.p,{children:"This component allows users to input the meeting transcript directly into the flow."}),"\n",(0,s.jsx)(n.h3,{id:"list-users-notion-component",children:"List Users (Notion component)"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Purpose"}),": Retrieves a list of users from the Notion workspace."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Input"}),": Notion Secret (API key)"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Output"}),": List of user data"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"list-databases-notion-component",children:"List Databases (Notion component)"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Purpose"}),": Searches and lists all databases in the Notion workspace."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Input"}),":","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Notion Secret (API key)"}),"\n",(0,s.jsx)(n.li,{children:"Query (optional)"}),"\n",(0,s.jsx)(n.li,{children:"Filter Type (default: database)"}),"\n",(0,s.jsx)(n.li,{children:"Sort Direction"}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Output"}),": List of database data"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"prompt-template",children:"Prompt Template"}),"\n",(0,s.jsx)(n.p,{children:"This component creates a dynamic prompt template using the following inputs:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Meeting Transcript"}),"\n",(0,s.jsx)(n.li,{children:"List of Users"}),"\n",(0,s.jsx)(n.li,{children:"List of Databases"}),"\n",(0,s.jsx)(n.li,{children:"Current Date"}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"meeting-summarizer-tool-calling-agent",children:"Meeting Summarizer (Tool Calling Agent)"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Purpose"}),": Analyzes the meeting transcript and identifies tasks and action items."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Inputs"}),":","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["System Prompt (from the ",(0,s.jsx)(n.strong,{children:"Prompt Template"})," component)"]}),"\n",(0,s.jsx)(n.li,{children:"Language Model (OpenAI)"}),"\n",(0,s.jsxs)(n.li,{children:["Tools:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Notion Search"}),"\n",(0,s.jsx)(n.li,{children:"List Database Properties"}),"\n",(0,s.jsx)(n.li,{children:"Create Page"}),"\n",(0,s.jsx)(n.li,{children:"Update Page Property"}),"\n",(0,s.jsx)(n.li,{children:"Add Content to Page"}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Notion Meeting Agent Part 2",src:t(29750).A+"",width:"1362",height:"819"})}),"\n",(0,s.jsx)(n.h3,{id:"notion-agent-tool-calling-agent",children:"Notion Agent (Tool Calling Agent)"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Purpose"}),": Executes actions in Notion based on the meeting summary."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Inputs"}),":","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["System Prompt (from the second ",(0,s.jsx)(n.strong,{children:"Prompt Template"})," component)"]}),"\n",(0,s.jsx)(n.li,{children:"Language Model (OpenAI)"}),"\n",(0,s.jsxs)(n.li,{children:["Tools:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"List Database Properties"}),"\n",(0,s.jsx)(n.li,{children:"Create Page"}),"\n",(0,s.jsx)(n.li,{children:"Update Page Property"}),"\n",(0,s.jsx)(n.li,{children:"Add Content to Page"}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"notion-components-tools",children:"Notion components (tools)"}),"\n",(0,s.jsx)(n.h4,{id:"list-database-properties",children:"List Database Properties"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Purpose"}),": Retrieves the properties of a specified Notion database."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Input"}),":","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Database ID"}),"\n",(0,s.jsx)(n.li,{children:"Notion Secret (API key)"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"create-page",children:"Create Page"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Purpose"}),": Creates a new page in a Notion database."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Inputs"}),":","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Database ID"}),"\n",(0,s.jsx)(n.li,{children:"Notion Secret (API key)"}),"\n",(0,s.jsx)(n.li,{children:"Properties (JSON)"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"update-page-property",children:"Update Page Property"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Purpose"}),": Updates the properties of an existing Notion page."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Inputs"}),":","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Page ID"}),"\n",(0,s.jsx)(n.li,{children:"Notion Secret (API key)"}),"\n",(0,s.jsx)(n.li,{children:"Properties to update"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h4,{id:"add-content-to-page",children:"Add Content to Page"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Purpose"}),": Converts markdown text to Notion blocks and appends them to a specified Notion page."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Inputs"}),":","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Page/Block ID"}),"\n",(0,s.jsx)(n.li,{children:"Notion Secret (API key)"}),"\n",(0,s.jsx)(n.li,{children:"Markdown text"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"chat-output",children:"Chat Output"}),"\n",(0,s.jsx)(n.p,{children:"Displays the final output of the Notion Agent in the Playground."}),"\n",(0,s.jsx)(n.h2,{id:"flow-process",children:"Flow Process"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"The user inputs a meeting transcript."}),"\n",(0,s.jsx)(n.li,{children:"The flow retrieves the list of Notion users and databases."}),"\n",(0,s.jsx)(n.li,{children:"A prompt is generated using the transcript, user list, database list, and current date."}),"\n",(0,s.jsx)(n.li,{children:"The Meeting Summarizer analyzes the transcript and identifies tasks and action items."}),"\n",(0,s.jsxs)(n.li,{children:["The Notion Agent uses the meeting summary to:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Create new pages for new tasks"}),"\n",(0,s.jsx)(n.li,{children:"Update existing pages for existing tasks"}),"\n",(0,s.jsx)(n.li,{children:"Add content to pages with meeting notes"}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.li,{children:"The Chat Output displays a summary of actions taken in Notion."}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"run-the-notion-meeting-notes-flow",children:"Run the Notion Meeting Notes flow"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Create a flow manually or import a pre-built flow JSON file:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Recommended: ",(0,s.jsx)(n.a,{target:"_blank","data-noBrokenLinkCheck":!0,href:t(86924).A+"",children:"Download the Meeting Agent flow JSON"})," and then ",(0,s.jsx)(n.a,{href:"/concepts-flows-import",children:"import the flow"})," into Langflow."]}),"\n",(0,s.jsx)(n.li,{children:"Create a blank flow, and then add the previously described components to your flow, connecting them as shown in the flow diagram."}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Input the Notion and OpenAI API keys in their respective components."}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Paste your meeting transcript into the ",(0,s.jsx)(n.strong,{children:"Meeting Transcript"})," component."]}),"\n",(0,s.jsx)(n.p,{children:"For optimal results, use detailed meeting transcripts. The quality of the output depends on the comprehensiveness of the input provided."}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Run the flow by clicking ",(0,s.jsx)(r.A,{name:"Play","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Run component"})," on the ",(0,s.jsx)(n.strong,{children:"Chat Output"})," component or open the ",(0,s.jsx)(n.strong,{children:"Playground"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Review the output summarizing the actions taken in your Notion workspace."}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"customization",children:"Customization"}),"\n",(0,s.jsx)(n.p,{children:"The flow can be customized to meet your team's specific needs."}),"\n",(0,s.jsx)(n.p,{children:"Customize this flow by:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Adjusting the system prompt to change the agent's behavior or context."}),"\n",(0,s.jsx)(n.li,{children:"Adding or removing Notion tools based on your specific needs."}),"\n",(0,s.jsx)(n.li,{children:"Modifying the OpenAI model parameters (e.g., temperature) to adjust the agent's response style."}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"troubleshooting",children:"Troubleshooting"}),"\n",(0,s.jsx)(n.p,{children:"If you encounter issues:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Ensure all API keys are correctly set and have the necessary permissions."}),"\n",(0,s.jsx)(n.li,{children:"Check that your Notion integration has access to the relevant pages and databases."}),"\n",(0,s.jsx)(n.li,{children:"Verify that all components are properly connected in the flow."}),"\n",(0,s.jsx)(n.li,{children:"Review the Langflow logs for any error messages."}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["For more advanced usage and integration options, refer to the ",(0,s.jsx)(n.a,{href:"https://developers.notion.com/",children:"Notion API documentation"})," and ",(0,s.jsx)(n.a,{href:"/",children:"Langflow documentation"}),"."]})]})}function p(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},86924:(e,n,t)=>{t.d(n,{A:()=>i});const i=t.p+"assets/files/Meeting_Notes_Agent-b29188c0cb70736d19dd52965db5f352.json"}}]); \ No newline at end of file diff --git a/assets/js/2ab0d4f5.c73c2a8c.js b/assets/js/2ab0d4f5.269437ea.js similarity index 50% rename from assets/js/2ab0d4f5.c73c2a8c.js rename to assets/js/2ab0d4f5.269437ea.js index f7bee4d429..13baf94f0d 100644 --- a/assets/js/2ab0d4f5.c73c2a8c.js +++ b/assets/js/2ab0d4f5.269437ea.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.1"},"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 \\"enim_70\\": \\"\\",\\n \\"fugiat_c\\": \\"\\"\\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.1"},"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 \\"irure22c\\": \\"\\"\\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/2ea623f2.13e0e74f.js b/assets/js/2ea623f2.13e0e74f.js new file mode 100644 index 0000000000..165b7c5f2a --- /dev/null +++ b/assets/js/2ea623f2.13e0e74f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[7356],{17886:(e,n,t)=>{t.d(n,{A:()=>d});t(96540);var r=t(64058),s=t(74848);function d({name:e,...n}){const t=r[e];return t?(0,s.jsx)(t,{...n}):null}},31929:(e,n,t)=>{t.d(n,{Ay:()=>c,RM:()=>o});var r=t(74848),s=t(28453),d=t(17886);const o=[];function i(e){const n={a:"a",p:"p",strong:"strong",...(0,s.R)(),...e.components};return(0,r.jsxs)(n.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,r.jsx)(d.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Controls"})," in the ",(0,r.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function c(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(i,{...e})}):i(e)}},93792:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>m,frontMatter:()=>i,metadata:()=>r,toc:()=>l});const r=JSON.parse('{"id":"Components/bundles-amazon","title":"Amazon","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-amazon.mdx","sourceDirName":"Components","slug":"/bundles-amazon","permalink":"/bundles-amazon","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Amazon","slug":"/bundles-amazon"},"sidebar":"docs","previous":{"title":"AI/ML API","permalink":"/bundles-aiml"},"next":{"title":"Anthropic","permalink":"/bundles-anthropic"}}');var s=t(74848),d=t(28453),o=(t(17886),t(31929));const i={title:"Amazon",slug:"/bundles-amazon"},c=void 0,a={},l=[{value:"Amazon Bedrock",id:"amazon-bedrock",level:2},{value:"Amazon Bedrock parameters",id:"amazon-bedrock-parameters",level:3},...o.RM,{value:"Amazon Bedrock Embeddings",id:"amazon-bedrock-embeddings",level:2},{value:"Amazon Bedrock Embeddings parameters",id:"amazon-bedrock-embeddings-parameters",level:3},...o.RM];function h(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,d.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,s.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,s.jsx)(n.strong,{children:"Amazon"})," bundle."]}),"\n",(0,s.jsx)(n.h2,{id:"amazon-bedrock",children:"Amazon Bedrock"}),"\n",(0,s.jsxs)(n.p,{children:["This component generates text using ",(0,s.jsx)(n.a,{href:"https://docs.aws.amazon.com/bedrock",children:"Amazon Bedrock LLMs"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["It can output either a ",(0,s.jsx)(n.strong,{children:"Model Response"})," (",(0,s.jsx)(n.a,{href:"/data-types#message",children:(0,s.jsx)(n.code,{children:"Message"})}),") or a ",(0,s.jsx)(n.strong,{children:"Language Model"})," (",(0,s.jsx)(n.a,{href:"/data-types#languagemodel",children:(0,s.jsx)(n.code,{children:"LanguageModel"})}),").\nSpecifically, the ",(0,s.jsx)(n.strong,{children:"Language Model"})," output is an instance of ",(0,s.jsx)(n.a,{href:"https://python.langchain.com/docs/integrations/chat/bedrock/",children:(0,s.jsx)(n.code,{children:"ChatBedrock"})})," configured according to the component's parameters."]}),"\n",(0,s.jsxs)(n.p,{children:["Use the ",(0,s.jsx)(n.strong,{children:"Language Model"})," output when you want to use an Amazon Bedrock model as the LLM for another LLM-driven component, such as an ",(0,s.jsx)(n.strong,{children:"Agent"})," or ",(0,s.jsx)(n.strong,{children:"Smart Function"})," component."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information, see ",(0,s.jsxs)(n.a,{href:"/components-models",children:[(0,s.jsx)(n.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"amazon-bedrock-parameters",children:"Amazon Bedrock parameters"}),"\n",(0,s.jsx)(o.Ay,{}),"\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:"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:"input"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The input string for text generation."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"system_message"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. A system message to pass to the model."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"stream"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"Input parameter. Whether to stream the response. Only works in chat. Default: false."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"model_id"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The Amazon Bedrock model to use."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"aws_access_key_id"}),(0,s.jsx)(n.td,{children:"SecretString"}),(0,s.jsx)(n.td,{children:"Input parameter. AWS Access Key for authentication."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"aws_secret_access_key"}),(0,s.jsx)(n.td,{children:"SecretString"}),(0,s.jsx)(n.td,{children:"Input parameter. AWS Secret Key for authentication."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"aws_session_token"}),(0,s.jsx)(n.td,{children:"SecretString"}),(0,s.jsx)(n.td,{children:"Input parameter. The session key for your AWS account."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"credentials_profile_name"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. Name of the AWS credentials profile to use."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"region_name"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. AWS region where your Bedrock resources are located. Default: ",(0,s.jsx)(n.code,{children:"us-east-1"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"model_kwargs"}),(0,s.jsx)(n.td,{children:"Dictionary"}),(0,s.jsx)(n.td,{children:"Input parameter. Additional keyword arguments to pass to the model."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"endpoint_url"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. Custom endpoint URL for a Bedrock service."})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"amazon-bedrock-embeddings",children:"Amazon Bedrock Embeddings"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Amazon Bedrock Embeddings"})," component is used to load embedding models from ",(0,s.jsx)(n.a,{href:"https://aws.amazon.com/bedrock/",children:"Amazon Bedrock"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information about using embedding model components in flows, see ",(0,s.jsxs)(n.a,{href:"/components-embedding-models",children:[(0,s.jsx)(n.strong,{children:"Embedding Model"})," components"]}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"amazon-bedrock-embeddings-parameters",children:"Amazon Bedrock Embeddings parameters"}),"\n",(0,s.jsx)(o.Ay,{}),"\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:"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:"model_id"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. The ID of the model to call, such as ",(0,s.jsx)(n.code,{children:"amazon.titan-embed-text-v1"}),". This is equivalent to the ",(0,s.jsx)(n.code,{children:"modelId"})," property in the ",(0,s.jsx)(n.code,{children:"list-foundation-models"})," API."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"aws_access_key_id"}),(0,s.jsx)(n.td,{children:"SecretString"}),(0,s.jsx)(n.td,{children:"Input parameter. AWS Access Key for authentication."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"aws_secret_access_key"}),(0,s.jsx)(n.td,{children:"SecretString"}),(0,s.jsx)(n.td,{children:"Input parameter. AWS Secret Key for authentication."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"aws_session_token"}),(0,s.jsx)(n.td,{children:"SecretString"}),(0,s.jsx)(n.td,{children:"Input parameter. The session key for your AWS account."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"credentials_profile_name"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. The name of the AWS credentials profile in ",(0,s.jsx)(n.code,{children:"~/.aws/credentials"})," or ",(0,s.jsx)(n.code,{children:"~/.aws/config"}),", which has access keys or role information."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"region_name"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. The AWS region to use, such as ",(0,s.jsx)(n.code,{children:"us-west-2"}),". Falls back to the ",(0,s.jsx)(n.code,{children:"AWS_DEFAULT_REGION"})," environment variable or region specified in ",(0,s.jsx)(n.code,{children:"~/.aws/config"})," if not provided."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"endpoint_url"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The URL to set a specific service endpoint other than the default AWS endpoint."})]})]})]})]})}function m(e={}){const{wrapper:n}={...(0,d.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/2ea623f2.d381c765.js b/assets/js/2ea623f2.d381c765.js deleted file mode 100644 index b60727d539..0000000000 --- a/assets/js/2ea623f2.d381c765.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[7356],{17886:(e,n,r)=>{r.d(n,{A:()=>d});r(96540);var t=r(64058),s=r(74848);function d({name:e,...n}){const r=t[e];return r?(0,s.jsx)(r,{...n}):null}},93792:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>m,frontMatter:()=>i,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"Components/bundles-amazon","title":"Amazon","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-amazon.mdx","sourceDirName":"Components","slug":"/bundles-amazon","permalink":"/bundles-amazon","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Amazon","slug":"/bundles-amazon"},"sidebar":"docs","previous":{"title":"AI/ML API","permalink":"/bundles-aiml"},"next":{"title":"Anthropic","permalink":"/bundles-anthropic"}}');var s=r(74848),d=r(28453),o=r(17886);const i={title:"Amazon",slug:"/bundles-amazon"},a=void 0,c={},l=[{value:"Amazon Bedrock",id:"amazon-bedrock",level:2},{value:"Amazon Bedrock parameters",id:"amazon-bedrock-parameters",level:3},{value:"Amazon Bedrock Embeddings",id:"amazon-bedrock-embeddings",level:2},{value:"Amazon Bedrock Embeddings parameters",id:"amazon-bedrock-embeddings-parameters",level:3}];function h(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,d.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,s.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,s.jsx)(n.strong,{children:"Amazon"})," bundle."]}),"\n",(0,s.jsx)(n.h2,{id:"amazon-bedrock",children:"Amazon Bedrock"}),"\n",(0,s.jsxs)(n.p,{children:["This component generates text using ",(0,s.jsx)(n.a,{href:"https://docs.aws.amazon.com/bedrock",children:"Amazon Bedrock LLMs"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["It can output either a ",(0,s.jsx)(n.strong,{children:"Model Response"})," (",(0,s.jsx)(n.a,{href:"/data-types#message",children:(0,s.jsx)(n.code,{children:"Message"})}),") or a ",(0,s.jsx)(n.strong,{children:"Language Model"})," (",(0,s.jsx)(n.a,{href:"/data-types#languagemodel",children:(0,s.jsx)(n.code,{children:"LanguageModel"})}),").\nSpecifically, the ",(0,s.jsx)(n.strong,{children:"Language Model"})," output is an instance of ",(0,s.jsx)(n.a,{href:"https://python.langchain.com/docs/integrations/chat/bedrock/",children:(0,s.jsx)(n.code,{children:"ChatBedrock"})})," configured according to the component's parameters."]}),"\n",(0,s.jsxs)(n.p,{children:["Use the ",(0,s.jsx)(n.strong,{children:"Language Model"})," output when you want to use an Amazon Bedrock model as the LLM for another LLM-driven component, such as a ",(0,s.jsx)(n.strong,{children:"Language Model"})," or ",(0,s.jsx)(n.strong,{children:"Smart Function"})," component."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information, see ",(0,s.jsxs)(n.a,{href:"/components-models",children:[(0,s.jsx)(n.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"amazon-bedrock-parameters",children:"Amazon Bedrock parameters"}),"\n",(0,s.jsxs)(n.p,{children:["Many ",(0,s.jsx)(n.strong,{children:"Amazon Bedrock"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,s.jsx)(o.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Controls"})," in the ",(0,s.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\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:"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:"model_id"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The ID of the Amazon Bedrock model to use. Options include various models."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"aws_access_key"}),(0,s.jsx)(n.td,{children:"SecretString"}),(0,s.jsx)(n.td,{children:"Input parameter. AWS Access Key for authentication."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"aws_secret_key"}),(0,s.jsx)(n.td,{children:"SecretString"}),(0,s.jsx)(n.td,{children:"Input parameter. AWS Secret Key for authentication."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"aws_session_token"}),(0,s.jsx)(n.td,{children:"SecretString"}),(0,s.jsx)(n.td,{children:"Input parameter. The session key for your AWS account."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"credentials_profile_name"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. Name of the AWS credentials profile to use."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"region_name"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. AWS region name. Default: ",(0,s.jsx)(n.code,{children:"us-east-1"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"model_kwargs"}),(0,s.jsx)(n.td,{children:"Dictionary"}),(0,s.jsx)(n.td,{children:"Input parameter. Additional keyword arguments for the model."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"endpoint_url"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. Custom endpoint URL for the Bedrock service."})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"amazon-bedrock-embeddings",children:"Amazon Bedrock Embeddings"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Amazon Bedrock Embeddings"})," component is used to load embedding models from ",(0,s.jsx)(n.a,{href:"https://aws.amazon.com/bedrock/",children:"Amazon Bedrock"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information about using embedding model components in flows, see ",(0,s.jsxs)(n.a,{href:"/components-embedding-models",children:[(0,s.jsx)(n.strong,{children:"Embedding Model"})," components"]}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"amazon-bedrock-embeddings-parameters",children:"Amazon Bedrock Embeddings parameters"}),"\n",(0,s.jsxs)(n.p,{children:["Some ",(0,s.jsx)(n.strong,{children:"Amazon Bedrock Embeddings"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,s.jsx)(o.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Controls"})," in the ",(0,s.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\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:"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:"credentials_profile_name"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. The name of the AWS credentials profile in ",(0,s.jsx)(n.code,{children:"~/.aws/credentials"})," or ",(0,s.jsx)(n.code,{children:"~/.aws/config"}),", which has access keys or role information."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"model_id"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. The ID of the model to call, such as ",(0,s.jsx)(n.code,{children:"amazon.titan-embed-text-v1"}),". This is equivalent to the ",(0,s.jsx)(n.code,{children:"modelId"})," property in the ",(0,s.jsx)(n.code,{children:"list-foundation-models"})," API."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"endpoint_url"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The URL to set a specific service endpoint other than the default AWS endpoint."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"region_name"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. The AWS region to use, such as ",(0,s.jsx)(n.code,{children:"us-west-2"}),". Falls back to the ",(0,s.jsx)(n.code,{children:"AWS_DEFAULT_REGION"})," environment variable or region specified in ",(0,s.jsx)(n.code,{children:"~/.aws/config"})," if not provided."]})]})]})]})]})}function m(e={}){const{wrapper:n}={...(0,d.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/2fc7e024.4a9c7470.js b/assets/js/2fc7e024.4a9c7470.js deleted file mode 100644 index acf7477b08..0000000000 --- a/assets/js/2fc7e024.4a9c7470.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[1408],{11470:(e,t,o)=>{o.d(t,{A:()=>k});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 f({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 y(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]=f({queryString:o,groupId:s}),[y,m]=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??y;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),m(e)},[d,m,r]),tabValues:r}}var m=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 x({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 j(e){const t=y(e);return(0,g.jsxs)("div",{className:(0,s.A)("tabs-container",D.tabList),children:[(0,g.jsx)(F,{...t,...e}),(0,g.jsx)(x,{...t,...e})]})}function k(e){const t=(0,m.A)();return(0,g.jsx)(j,{...e,children:d(e.children)},String(t))}},17886:(e,t,o)=>{o.d(t,{A:()=>r});o(96540);var n=o(64058),s=o(74848);function r({name:e,...t}){const o=n[e];return o?(0,s.jsx)(o,{...t}):null}},19365:(e,t,o)=>{o.d(t,{A:()=>l});o(96540);var n=o(18215);const s={tabItem:"tabItem_Ymn6"};var r=o(74848);function l({children:e,hidden:t,className:o}){return(0,r.jsx)("div",{role:"tabpanel",className:(0,n.A)(s.tabItem,o),hidden:t,children:e})}},47617:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/tutorial-chat-file-loader-099f2f4c5e4343412557b1a78c4b9209.png"},57844:(e,t,o)=>{o.r(t),o.d(t,{CH:()=>d,assets:()=>p,chCodeConfig:()=>h,contentTitle:()=>i,default:()=>y,frontMatter:()=>a,metadata:()=>n,toc:()=>u});const n=JSON.parse('{"id":"Tutorials/chat-with-files","title":"Create a chatbot that can ingest files","description":"This tutorial shows you how to build a chatbot that can read and answer questions about files you upload, such as meeting notes or job applications.","source":"@site/docs/Tutorials/chat-with-files.mdx","sourceDirName":"Tutorials","slug":"/chat-with-files","permalink":"/chat-with-files","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Create a chatbot that can ingest files","slug":"/chat-with-files"},"sidebar":"docs","previous":{"title":"Create a vector RAG chatbot","permalink":"/chat-with-rag"},"next":{"title":"Connect applications to agents","permalink":"/agent-tutorial"}}');var s=o(74848),r=o(28453),l=o(24754),c=o(17886);o(11470),o(19365);const a={title:"Create a chatbot that can ingest files",slug:"/chat-with-files"},i=void 0,p={},d={annotations:l.hk,Code:l.Cy},h={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},u=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Create a flow that accepts file input",id:"create-a-flow-that-accepts-file-input",level:2},{value:"Send requests to your flow from a Python application",id:"send-requests-to-your-flow-from-a-python-application",level:2},{value:"Next steps",id:"next-steps",level:2},{value:"Process multiple files loaded at runtime",id:"process-multiple-files-loaded-at-runtime",level:3},{value:"Upload external files at runtime",id:"upload-external-files-at-runtime",level:3},{value:"Preload files outside the chat session",id:"preload-files-outside-the-chat-session",level:3}];function f(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components},{Details:n}=t;return d||m("CH",!1),d.Code||m("CH.Code",!0),n||m("Details",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n","\n",(0,s.jsx)(t.p,{children:"This tutorial shows you how to build a chatbot that can read and answer questions about files you upload, such as meeting notes or job applications."}),"\n",(0,s.jsx)(t.p,{children:"For example, you could upload a contract and ask, \u201cWhat are the termination clauses in this agreement?\u201d Or upload a resume and ask, \u201cDoes this candidate have experience with marketing analytics?\u201d"}),"\n",(0,s.jsx)(t.p,{children:"The main focus of this tutorial is to show you how to provide files as input to a Langflow flow, so your chatbot can use the content of those files in its responses."}),"\n",(0,s.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.a,{href:"/get-started-installation",children:"Install and start Langflow"})}),"\n",(0,s.jsxs)(t.li,{children:["Create a ",(0,s.jsx)(t.a,{href:"/api-keys-and-authentication",children:"Langflow API key"})]}),"\n",(0,s.jsxs)(t.li,{children:["Create an ",(0,s.jsx)(t.a,{href:"https://platform.openai.com/api-keys",children:"OpenAI API key"})]}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"This tutorial uses an OpenAI LLM. If you want to use a different provider, you need a valid credential for that provider."}),"\n",(0,s.jsx)(t.h2,{id:"create-a-flow-that-accepts-file-input",children:"Create a flow that accepts file input"}),"\n",(0,s.jsxs)(t.p,{children:["To ingest files, your flow must have a ",(0,s.jsx)(t.strong,{children:"File"})," component attached to a component that receives input, such as a ",(0,s.jsx)(t.strong,{children:"Prompt Template"})," or ",(0,s.jsx)(t.strong,{children:"Agent"})," component."]}),"\n",(0,s.jsxs)(t.p,{children:["The following steps modify the ",(0,s.jsx)(t.strong,{children:"Basic Prompting"})," template to accept file input:"]}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["In Langflow, click ",(0,s.jsx)(t.strong,{children:"New Flow"}),", and then select the ",(0,s.jsx)(t.strong,{children:"Basic Prompting"})," template."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["In the ",(0,s.jsx)(t.strong,{children:"Language Model"})," component, enter your OpenAI API key."]}),"\n",(0,s.jsxs)(t.p,{children:["If you want to use a different provider or model, edit the ",(0,s.jsx)(t.strong,{children:"Model Provider"}),", ",(0,s.jsx)(t.strong,{children:"Model Name"}),", and ",(0,s.jsx)(t.strong,{children:"API Key"})," fields accordingly."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["To verify that your API key is valid, click ",(0,s.jsx)(c.A,{name:"Play","aria-hidden":"true"})," ",(0,s.jsx)(t.strong,{children:"Playground"}),", and then ask the LLM a question.\nThe LLM should respond according to the specifications in the ",(0,s.jsx)(t.strong,{children:"Prompt Template"})," component's ",(0,s.jsx)(t.strong,{children:"Template"})," field."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Exit the ",(0,s.jsx)(t.strong,{children:"Playground"}),", and then modify the ",(0,s.jsx)(t.strong,{children:"Prompt Template"})," component to accept file input in addition to chat input.\nTo do this, edit the ",(0,s.jsx)(t.strong,{children:"Template"})," field, and then replace the default prompt with the following text:"]}),"\n",(0,s.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"ChatInput:",props:{}}]},{tokens:[{content:"{chat-input}",props:{}}]},{tokens:[{content:"File:",props:{}}]},{tokens:[{content:"{file}",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsxs)(t.admonition,{type:"tip",children:[(0,s.jsxs)(t.p,{children:["You can use any string to name your template variables.\nThese strings become the names of the fields (input ports) on the ",(0,s.jsx)(t.strong,{children:"Prompt Template"})," component."]}),(0,s.jsxs)(t.p,{children:["For this tutorial, the variables are named after the components that connect to them: ",(0,s.jsx)(t.strong,{children:"chat-input"})," for the ",(0,s.jsx)(t.strong,{children:"Chat Input"})," component and ",(0,s.jsx)(t.strong,{children:"file"})," for the ",(0,s.jsx)(t.strong,{children:"File"})," component."]})]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Add a ",(0,s.jsxs)(t.a,{href:"/components-data#file",children:[(0,s.jsx)(t.strong,{children:"File"})," component"]})," to the flow, and then connect the ",(0,s.jsx)(t.strong,{children:"Raw Content"})," output port to the ",(0,s.jsx)(t.strong,{children:"Prompt Template"})," component's ",(0,s.jsx)(t.strong,{children:"file"})," input port.\nTo connect ports, click and drag from one port to the other."]}),"\n",(0,s.jsxs)(t.p,{children:["You can add files directly to the ",(0,s.jsx)(t.strong,{children:"File"})," component to pre-load input before running the flow, or you can load files at runtime. The next section of this tutorial covers runtime file uploads."]}),"\n",(0,s.jsxs)(t.p,{children:["At this point your flow has five components. The ",(0,s.jsx)(t.strong,{children:"Chat Input"})," and ",(0,s.jsx)(t.strong,{children:"File"})," components are connected to the ",(0,s.jsx)(t.strong,{children:"Prompt Template"})," component's input ports. Then, the ",(0,s.jsx)(t.strong,{children:"Prompt Template"})," component's output port is connected to the ",(0,s.jsx)(t.strong,{children:"Language Model"})," component's input port. Finally, the ",(0,s.jsx)(t.strong,{children:"Language Model"})," component's output port is connected to the ",(0,s.jsx)(t.strong,{children:"Chat Output"})," component, which returns the final response to the user."]}),"\n",(0,s.jsx)(t.p,{children:(0,s.jsx)(t.img,{alt:"File loader chat flow",src:o(47617).A+"",width:"4000",height:"1564"})}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"send-requests-to-your-flow-from-a-python-application",children:"Send requests to your flow from a Python application"}),"\n",(0,s.jsx)(t.p,{children:"This section of the tutorial demonstrates how you can send file input to a flow from an application."}),"\n",(0,s.jsxs)(t.p,{children:["To do this, your application must send a ",(0,s.jsx)(t.code,{children:"POST /run"})," request to your Langflow server with the file you want to upload and a text prompt.\nThe result includes the outcome of the flow run and the LLM's response."]}),"\n",(0,s.jsxs)(t.p,{children:["This example uses a local Langflow instance, and it asks the LLM to evaluate a sample resume.\nIf you don't have a resume on hand, you can download ",(0,s.jsx)(t.a,{target:"_blank","data-noBrokenLinkCheck":!0,href:o(87481).A+"",children:"fake-resume.txt"}),"."]}),"\n",(0,s.jsx)(t.admonition,{type:"tip",children:(0,s.jsxs)(t.p,{children:["For help with constructing file upload requests in Python, JavaScript, and curl, see the ",(0,s.jsx)(t.a,{href:"https://langflow-file-upload-examples.onrender.com",children:"Langflow File Upload Utility"}),"."]})}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"To construct the request, gather the following information:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"LANGFLOW_SERVER_ADDRESS"}),": Your Langflow server's domain. The default value is ",(0,s.jsx)(t.code,{children:"127.0.0.1:7860"}),". You can get this value from the code snippets on your flow's ",(0,s.jsxs)(t.a,{href:"/concepts-publish#api-access",children:[(0,s.jsx)(t.strong,{children:"API access"})," pane"]}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"FLOW_ID"}),": Your flow's UUID or custom endpoint name. You can get this value from the code snippets on your flow's ",(0,s.jsxs)(t.a,{href:"/concepts-publish#api-access",children:[(0,s.jsx)(t.strong,{children:"API access"})," pane"]}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"FILE_COMPONENT_ID"}),": The UUID of the ",(0,s.jsx)(t.strong,{children:"File"})," component in your flow, such as ",(0,s.jsx)(t.code,{children:"File-KZP68"}),". To find the component ID, open your flow in Langflow, click the ",(0,s.jsx)(t.strong,{children:"File"})," component, and then click ",(0,s.jsx)(t.strong,{children:"Controls"}),". The component ID is at the top of the ",(0,s.jsx)(t.strong,{children:"Controls"})," pane."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"CHAT_INPUT"}),": The message you want to send to the Chat Input of your flow, such as ",(0,s.jsx)(t.code,{children:"Evaluate this resume for a job opening in my Marketing department."})]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"FILE_NAME"})," and ",(0,s.jsx)(t.code,{children:"FILE_PATH"}),": The name and path to the local file that you want to send to your flow."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"LANGFLOW_API_KEY"}),": A valid ",(0,s.jsx)(t.a,{href:"/api-keys-and-authentication",children:"Langflow API key"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"Copy the following script into a Python file, and then replace the placeholders with the information you gathered in the previous step:"}),"\n",(0,s.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"# Python example using requests",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" requests",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" json",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# 1. Set the upload URL",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"url ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"http://LANGFLOW_SERVER_ADDRESS/api/v2/files/"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# 2. Prepare the file and payload",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"payload ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"files ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" (",props:{style:{color:"#C9D1D9"}}},{content:"'file'",props:{style:{color:"#A5D6FF"}}},{content:", (",props:{style:{color:"#C9D1D9"}}},{content:"'FILE_PATH'",props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"open",props:{style:{color:"#79C0FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'FILE_NAME'",props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"'rb'",props:{style:{color:"#A5D6FF"}}},{content:"), ",props:{style:{color:"#C9D1D9"}}},{content:"'application/octet-stream'",props:{style:{color:"#A5D6FF"}}},{content:"))",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"headers ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" 'Accept'",props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"'application/json'",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" 'x-api-key'",props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"'LANGFLOW_API_KEY'",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# 3. Upload the file to Langflow",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"response ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" requests.request(",props:{style:{color:"#C9D1D9"}}},{content:'"POST"',props:{style:{color:"#A5D6FF"}}},{content:", url, ",props:{style:{color:"#C9D1D9"}}},{content:"headers",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"headers, ",props:{style:{color:"#C9D1D9"}}},{content:"data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"payload, ",props:{style:{color:"#C9D1D9"}}},{content:"files",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"files)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"print",props:{style:{color:"#79C0FF"}}},{content:"(response.text)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# 4. Get the uploaded file path from the response",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"uploaded_data ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" response.json()",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"uploaded_path ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" uploaded_data.get(",props:{style:{color:"#C9D1D9"}}},{content:"'path'",props:{style:{color:"#A5D6FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# 5. Call the Langflow run endpoint with the uploaded file path",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"run_url ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"run_payload ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "input_value"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"CHAT_INPUT"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "output_type"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"chat"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "input_type"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"chat"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "tweaks"',props:{style:{color:"#A5D6FF"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "FILE_COMPONENT_ID"',props:{style:{color:"#A5D6FF"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "path"',props:{style:{color:"#A5D6FF"}}},{content:": uploaded_path",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"run_headers ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" 'Content-Type'",props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"'application/json'",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" 'Accept'",props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"'application/json'",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" 'x-api-key'",props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"'LANGFLOW_API_KEY'",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"run_response ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" requests.post(run_url, ",props:{style:{color:"#C9D1D9"}}},{content:"headers",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"run_headers, ",props:{style:{color:"#C9D1D9"}}},{content:"data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"json.dumps(run_payload))",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"langflow_data ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" run_response.json()",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# Output only the message",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"message ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"None",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:"try",props:{style:{color:"#FF7B72"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" message ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" langflow_data[",props:{style:{color:"#C9D1D9"}}},{content:"'outputs'",props:{style:{color:"#A5D6FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:"0",props:{style:{color:"#79C0FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:"'outputs'",props:{style:{color:"#A5D6FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:"0",props:{style:{color:"#79C0FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:"'results'",props:{style:{color:"#A5D6FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:"'message'",props:{style:{color:"#A5D6FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:"'data'",props:{style:{color:"#A5D6FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:"'text'",props:{style:{color:"#A5D6FF"}}},{content:"]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"except",props:{style:{color:"#FF7B72"}}},{content:" (",props:{style:{color:"#C9D1D9"}}},{content:"KeyError",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"IndexError",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"TypeError",props:{style:{color:"#79C0FF"}}},{content:"):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" pass",props:{style:{color:"#FF7B72"}}}]},{tokens:[{content:"print",props:{style:{color:"#79C0FF"}}},{content:"(message)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(t.p,{children:"This script contains two requests."}),"\n",(0,s.jsxs)(t.p,{children:["The first request uploads a file, such as ",(0,s.jsx)(t.code,{children:"fake-resume.txt"}),", to your Langflow server at the ",(0,s.jsx)(t.code,{children:"/v2/files"})," endpoint. This request returns a file path that can be referenced in subsequent Langflow requests, such as ",(0,s.jsx)(t.code,{children:"02791d46-812f-4988-ab1c-7c430214f8d5/fake-resume.txt"})]}),"\n",(0,s.jsxs)(t.p,{children:["The second request sends a chat message to the Langflow flow at the ",(0,s.jsx)(t.code,{children:"/v1/run/"})," endpoint.\nThe ",(0,s.jsx)(t.code,{children:"tweaks"})," parameter includes the path to the uploaded file as the variable ",(0,s.jsx)(t.code,{children:"uploaded_path"}),", and sends this file directly to the ",(0,s.jsx)(t.strong,{children:"File"})," component."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"Save and run the script to send the requests and test the flow."}),"\n",(0,s.jsx)(t.p,{children:"The initial output contains the JSON response object from the file upload endpoint, including the internal path where Langflow stores the file.\nThen, the LLM retrieves the file and evaluates its content, in this case the suitability of the resume for a job position."}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(t.p,{children:"The following is an example response from this tutorial's flow. Due to the nature of LLMs and variations in your inputs, your response might be different."}),(0,s.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:'{"id":"793ba3d8-5e7a-4499-8b89-d9a7b6325fee","name":"fake-resume (1)","path":"02791d46-812f-4988-ab1c-7c430214f8d5/fake-resume.txt","size":1779,"provider":null}',props:{}}]},{tokens:[{content:"The resume for Emily J. Wilson presents a strong candidate for a position in your Marketing department. Here are some key points to consider:",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"### Strengths:",props:{}}]},{tokens:[{content:"1. **Experience**: With over 8 years in marketing, Emily has held progressively responsible positions, culminating in her current role as Marketing Director. This indicates a solid foundation in the field.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"2. **Quantifiable Achievements**: The resume highlights specific accomplishments, such as a 25% increase in brand recognition and a 30% sales increase after launching new product lines. These metrics demonstrate her ability to drive results.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"3. **Diverse Skill Set**: Emily's skills encompass various aspects of marketing, including strategy development, team management, social media marketing, event planning, and data analysis. This versatility can be beneficial in a dynamic marketing environment.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"4. **Educational Background**: Her MBA and a Bachelor's degree in Marketing provide a strong academic foundation, which is often valued in marketing roles.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"5. **Certifications**: The Certified Marketing Professional (CMP) and Google Analytics Certification indicate a commitment to professional development and staying current with industry standards.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"### Areas for Improvement:",props:{}}]},{tokens:[{content:"1. **Specificity in Skills**: While the skills listed are relevant, providing examples of how she has applied these skills in her previous roles could strengthen her resume further.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"2. **References**: While stating that references are available upon request is standard, including a couple of testimonials or notable endorsements could enhance credibility.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"3. **Formatting**: Ensure that the resume is visually appealing and easy to read. Clear headings and bullet points help in quickly identifying key information.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"### Conclusion:",props:{}}]},{tokens:[{content:"Overall, Emily J. Wilson's resume reflects a well-rounded marketing professional with a proven track record of success. If her experience aligns with the specific needs of your Marketing department, she could be a valuable addition to your team. Consider inviting her for an interview to further assess her fit for the role.",props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,s.jsx)(t.p,{children:"To continue building on this tutorial, try these next steps."}),"\n",(0,s.jsx)(t.h3,{id:"process-multiple-files-loaded-at-runtime",children:"Process multiple files loaded at runtime"}),"\n",(0,s.jsxs)(t.p,{children:["To process multiple files in a single flow run, add a separate ",(0,s.jsx)(t.strong,{children:"File"})," component for each file you want to ingest. Then, modify your script to upload each file, retrieve each returned file path, and then pass a unique file path to each ",(0,s.jsx)(t.strong,{children:"File"})," component ID."]}),"\n",(0,s.jsxs)(t.p,{children:["For example, you can modify ",(0,s.jsx)(t.code,{children:"tweaks"})," to accept multiple ",(0,s.jsx)(t.strong,{children:"File"})," components.\nThe following code is just an example; it isn't working code:"]}),"\n",(0,s.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"## set multiple file paths",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"file_paths ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" FILE_COMPONENT_1",props:{style:{color:"#79C0FF"}}},{content:": uploaded_path_1,",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" FILE_COMPONENT_2",props:{style:{color:"#79C0FF"}}},{content:": uploaded_path_2",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"chat_with_flow",props:{style:{color:"#D2A8FF"}}},{content:"(input_message, file_paths):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' """Compare the contents of these two files."""',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" run_url ",props:{style:{color:"#C9D1D9"}}},{content:"= f",props:{style:{color:"#FF7B72"}}},{content:'"',props:{style:{color:"#A5D6FF"}}},{content:"{LANGFLOW_SERVER_ADDRESS}",props:{style:{color:"#79C0FF"}}},{content:"/api/v1/run/",props:{style:{color:"#A5D6FF"}}},{content:"{FLOW_ID}",props:{style:{color:"#79C0FF"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" # Prepare tweaks with both file paths",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" tweaks ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" for",props:{style:{color:"#FF7B72"}}},{content:" component_id, file_path ",props:{style:{color:"#C9D1D9"}}},{content:"in",props:{style:{color:"#FF7B72"}}},{content:" file_paths.items():",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" tweaks[component_id] ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}},{content:'"path"',props:{style:{color:"#A5D6FF"}}},{content:": file_path}",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsxs)(t.p,{children:["You can also use a ",(0,s.jsxs)(t.a,{href:"/components-data#directory",children:[(0,s.jsx)(t.strong,{children:"Directory"})," component"]})," to load all files in a directory or pass an archive file to the ",(0,s.jsx)(t.strong,{children:"File"})," component."]}),"\n",(0,s.jsx)(t.h3,{id:"upload-external-files-at-runtime",children:"Upload external files at runtime"}),"\n",(0,s.jsxs)(t.p,{children:["To upload files from another machine that isn't your local environment, your Langflow server must first be accessible over the internet. Then, authenticated users can upload files to your public Langflow server's ",(0,s.jsx)(t.code,{children:"/v2/files/"})," endpoint, as shown in the tutorial. For more information, see ",(0,s.jsx)(t.a,{href:"/deployment-overview",children:"Langflow deployment overview"}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"preload-files-outside-the-chat-session",children:"Preload files outside the chat session"}),"\n",(0,s.jsxs)(t.p,{children:["You can use the ",(0,s.jsx)(t.strong,{children:"File"})," component to load files anywhere in a flow, not just in a chat session."]}),"\n",(0,s.jsxs)(t.p,{children:["In the visual editor, you can preload files to the ",(0,s.jsx)(t.strong,{children:"File"})," component by selecting them from your local machine or ",(0,s.jsx)(t.a,{href:"/concepts-file-management",children:"Langflow file management"}),"."]}),"\n",(0,s.jsx)(t.p,{children:"For example, you can preload an instructions file for a prompt template, or you can preload a vector store with documents that you want to query in a Retrieval Augmented Generation (RAG) flow."}),"\n",(0,s.jsxs)(t.p,{children:["For more information about the ",(0,s.jsx)(t.strong,{children:"File"})," component and other data loading components, see ",(0,s.jsxs)(t.a,{href:"/components-data",children:[(0,s.jsx)(t.strong,{children:"Data"})," components"]}),"."]})]})}function y(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(f,{...e})}):f(e)}function m(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},87481:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/files/fake-resume-fa337cbdb18306bd29e3168f73409745.txt"}}]); \ No newline at end of file diff --git a/assets/js/2fc7e024.dc12de8f.js b/assets/js/2fc7e024.dc12de8f.js new file mode 100644 index 0000000000..29f863c300 --- /dev/null +++ b/assets/js/2fc7e024.dc12de8f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[1408],{17886:(e,o,t)=>{t.d(o,{A:()=>r});t(96540);var n=t(64058),s=t(74848);function r({name:e,...o}){const t=n[e];return t?(0,s.jsx)(t,{...o}):null}},47617:(e,o,t)=>{t.d(o,{A:()=>n});const n=t.p+"assets/images/tutorial-chat-file-loader-099f2f4c5e4343412557b1a78c4b9209.png"},57844:(e,o,t)=>{t.r(o),t.d(o,{CH:()=>d,assets:()=>a,chCodeConfig:()=>h,contentTitle:()=>p,default:()=>f,frontMatter:()=>i,metadata:()=>n,toc:()=>u});const n=JSON.parse('{"id":"Tutorials/chat-with-files","title":"Create a chatbot that can ingest files","description":"This tutorial shows you how to build a chatbot that can read and answer questions about files you upload, such as meeting notes or job applications.","source":"@site/docs/Tutorials/chat-with-files.mdx","sourceDirName":"Tutorials","slug":"/chat-with-files","permalink":"/chat-with-files","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Create a chatbot that can ingest files","slug":"/chat-with-files"},"sidebar":"docs","previous":{"title":"Create a vector RAG chatbot","permalink":"/chat-with-rag"},"next":{"title":"Connect applications to agents","permalink":"/agent-tutorial"}}');var s=t(74848),r=t(28453),l=t(24754),c=t(17886);const i={title:"Create a chatbot that can ingest files",slug:"/chat-with-files"},p=void 0,a={},d={annotations:l.hk,Code:l.Cy},h={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},u=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Create a flow that accepts file input",id:"create-a-flow-that-accepts-file-input",level:2},{value:"Send requests to your flow from a Python application",id:"send-requests-to-your-flow-from-a-python-application",level:2},{value:"Next steps",id:"next-steps",level:2},{value:"Process multiple files loaded at runtime",id:"process-multiple-files-loaded-at-runtime",level:3},{value:"Upload external files at runtime",id:"upload-external-files-at-runtime",level:3},{value:"Preload files outside the chat session",id:"preload-files-outside-the-chat-session",level:3}];function y(e){const o={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components},{Details:n}=o;return d||D("CH",!1),d.Code||D("CH.Code",!0),n||D("Details",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n","\n",(0,s.jsx)(o.p,{children:"This tutorial shows you how to build a chatbot that can read and answer questions about files you upload, such as meeting notes or job applications."}),"\n",(0,s.jsx)(o.p,{children:"For example, you could upload a contract and ask, \u201cWhat are the termination clauses in this agreement?\u201d Or upload a resume and ask, \u201cDoes this candidate have experience with marketing analytics?\u201d"}),"\n",(0,s.jsx)(o.p,{children:"The main focus of this tutorial is to show you how to provide files as input to a Langflow flow, so your chatbot can use the content of those files in its responses."}),"\n",(0,s.jsx)(o.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsxs)(o.ul,{children:["\n",(0,s.jsx)(o.li,{children:(0,s.jsx)(o.a,{href:"/get-started-installation",children:"Install and start Langflow"})}),"\n",(0,s.jsxs)(o.li,{children:["Create a ",(0,s.jsx)(o.a,{href:"/api-keys-and-authentication",children:"Langflow API key"})]}),"\n",(0,s.jsxs)(o.li,{children:["Create an ",(0,s.jsx)(o.a,{href:"https://platform.openai.com/api-keys",children:"OpenAI API key"})]}),"\n"]}),"\n",(0,s.jsx)(o.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)(o.h2,{id:"create-a-flow-that-accepts-file-input",children:"Create a flow that accepts file input"}),"\n",(0,s.jsxs)(o.p,{children:["To ingest files, your flow must have a ",(0,s.jsx)(o.strong,{children:"File"})," component attached to a component that receives input, such as a ",(0,s.jsx)(o.strong,{children:"Prompt Template"})," or ",(0,s.jsx)(o.strong,{children:"Agent"})," component."]}),"\n",(0,s.jsxs)(o.p,{children:["The following steps modify the ",(0,s.jsx)(o.strong,{children:"Basic Prompting"})," template to accept file input:"]}),"\n",(0,s.jsxs)(o.ol,{children:["\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["In Langflow, click ",(0,s.jsx)(o.strong,{children:"New Flow"}),", and then select the ",(0,s.jsx)(o.strong,{children:"Basic Prompting"})," template."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["In the ",(0,s.jsx)(o.strong,{children:"Language Model"})," component, enter your OpenAI API key."]}),"\n",(0,s.jsxs)(o.p,{children:["If you want to use a different provider or model, edit the ",(0,s.jsx)(o.strong,{children:"Model Provider"}),", ",(0,s.jsx)(o.strong,{children:"Model Name"}),", and ",(0,s.jsx)(o.strong,{children:"API Key"})," fields accordingly."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["To verify that your API key is valid, click ",(0,s.jsx)(c.A,{name:"Play","aria-hidden":"true"})," ",(0,s.jsx)(o.strong,{children:"Playground"}),", and then ask the LLM a question.\nThe LLM should respond according to the specifications in the ",(0,s.jsx)(o.strong,{children:"Prompt Template"})," component's ",(0,s.jsx)(o.strong,{children:"Template"})," field."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Exit the ",(0,s.jsx)(o.strong,{children:"Playground"}),", and then modify the ",(0,s.jsx)(o.strong,{children:"Prompt Template"})," component to accept file input in addition to chat input.\nTo do this, edit the ",(0,s.jsx)(o.strong,{children:"Template"})," field, and then replace the default prompt with the following text:"]}),"\n",(0,s.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"ChatInput:",props:{}}]},{tokens:[{content:"{chat-input}",props:{}}]},{tokens:[{content:"File:",props:{}}]},{tokens:[{content:"{file}",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsxs)(o.admonition,{type:"tip",children:[(0,s.jsxs)(o.p,{children:["You can use any string to name your template variables.\nThese strings become the names of the fields (input ports) on the ",(0,s.jsx)(o.strong,{children:"Prompt Template"})," component."]}),(0,s.jsxs)(o.p,{children:["For this tutorial, the variables are named after the components that connect to them: ",(0,s.jsx)(o.strong,{children:"chat-input"})," for the ",(0,s.jsx)(o.strong,{children:"Chat Input"})," component and ",(0,s.jsx)(o.strong,{children:"file"})," for the ",(0,s.jsx)(o.strong,{children:"File"})," component."]})]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Add a ",(0,s.jsxs)(o.a,{href:"/components-data#file",children:[(0,s.jsx)(o.strong,{children:"File"})," component"]})," to the flow, and then connect the ",(0,s.jsx)(o.strong,{children:"Raw Content"})," output port to the ",(0,s.jsx)(o.strong,{children:"Prompt Template"})," component's ",(0,s.jsx)(o.strong,{children:"file"})," input port.\nTo connect ports, click and drag from one port to the other."]}),"\n",(0,s.jsxs)(o.p,{children:["You can add files directly to the ",(0,s.jsx)(o.strong,{children:"File"})," component to pre-load input before running the flow, or you can load files at runtime. The next section of this tutorial covers runtime file uploads."]}),"\n",(0,s.jsxs)(o.p,{children:["At this point your flow has five components. The ",(0,s.jsx)(o.strong,{children:"Chat Input"})," and ",(0,s.jsx)(o.strong,{children:"File"})," components are connected to the ",(0,s.jsx)(o.strong,{children:"Prompt Template"})," component's input ports. Then, the ",(0,s.jsx)(o.strong,{children:"Prompt Template"})," component's output port is connected to the ",(0,s.jsx)(o.strong,{children:"Language Model"})," component's input port. Finally, the ",(0,s.jsx)(o.strong,{children:"Language Model"})," component's output port is connected to the ",(0,s.jsx)(o.strong,{children:"Chat Output"})," component, which returns the final response to the user."]}),"\n",(0,s.jsx)(o.p,{children:(0,s.jsx)(o.img,{alt:"File loader chat flow",src:t(47617).A+"",width:"4000",height:"1564"})}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(o.h2,{id:"send-requests-to-your-flow-from-a-python-application",children:"Send requests to your flow from a Python application"}),"\n",(0,s.jsx)(o.p,{children:"This section of the tutorial demonstrates how you can send file input to a flow from an application."}),"\n",(0,s.jsxs)(o.p,{children:["To do this, your application must send a ",(0,s.jsx)(o.code,{children:"POST /run"})," request to your Langflow server with the file you want to upload and a text prompt.\nThe result includes the outcome of the flow run and the LLM's response."]}),"\n",(0,s.jsxs)(o.p,{children:["This example uses a local Langflow instance, and it asks the LLM to evaluate a sample resume.\nIf you don't have a resume on hand, you can download ",(0,s.jsx)(o.a,{target:"_blank","data-noBrokenLinkCheck":!0,href:t(87481).A+"",children:"fake-resume.txt"}),"."]}),"\n",(0,s.jsx)(o.admonition,{type:"tip",children:(0,s.jsxs)(o.p,{children:["For help with constructing file upload requests in Python, JavaScript, and curl, see the ",(0,s.jsx)(o.a,{href:"https://langflow-file-upload-examples.onrender.com",children:"Langflow File Upload Utility"}),"."]})}),"\n",(0,s.jsxs)(o.ol,{children:["\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsx)(o.p,{children:"To construct the request, gather the following information:"}),"\n",(0,s.jsxs)(o.ul,{children:["\n",(0,s.jsxs)(o.li,{children:[(0,s.jsx)(o.code,{children:"LANGFLOW_SERVER_ADDRESS"}),": Your Langflow server's domain. The default value is ",(0,s.jsx)(o.code,{children:"127.0.0.1:7860"}),". You can get this value from the code snippets on your flow's ",(0,s.jsxs)(o.a,{href:"/concepts-publish#api-access",children:[(0,s.jsx)(o.strong,{children:"API access"})," pane"]}),"."]}),"\n",(0,s.jsxs)(o.li,{children:[(0,s.jsx)(o.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)(o.a,{href:"/concepts-publish#api-access",children:[(0,s.jsx)(o.strong,{children:"API access"})," pane"]}),"."]}),"\n",(0,s.jsxs)(o.li,{children:[(0,s.jsx)(o.code,{children:"FILE_COMPONENT_ID"}),": The UUID of the ",(0,s.jsx)(o.strong,{children:"File"})," component in your flow, such as ",(0,s.jsx)(o.code,{children:"File-KZP68"}),". To find the component ID, open your flow in Langflow, click the ",(0,s.jsx)(o.strong,{children:"File"})," component, and then click ",(0,s.jsx)(o.strong,{children:"Controls"}),". The component ID is at the top of the ",(0,s.jsx)(o.strong,{children:"Controls"})," pane."]}),"\n",(0,s.jsxs)(o.li,{children:[(0,s.jsx)(o.code,{children:"CHAT_INPUT"}),": The message you want to send to the Chat Input of your flow, such as ",(0,s.jsx)(o.code,{children:"Evaluate this resume for a job opening in my Marketing department."})]}),"\n",(0,s.jsxs)(o.li,{children:[(0,s.jsx)(o.code,{children:"FILE_NAME"})," and ",(0,s.jsx)(o.code,{children:"FILE_PATH"}),": The name and path to the local file that you want to send to your flow."]}),"\n",(0,s.jsxs)(o.li,{children:[(0,s.jsx)(o.code,{children:"LANGFLOW_API_KEY"}),": A valid ",(0,s.jsx)(o.a,{href:"/api-keys-and-authentication",children:"Langflow API key"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsx)(o.p,{children:"Copy the following script into a Python file, and then replace the placeholders with the information you gathered in the previous step:"}),"\n",(0,s.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"# Python example using requests",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" requests",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" json",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# 1. Set the upload URL",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"url ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"http://LANGFLOW_SERVER_ADDRESS/api/v2/files/"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# 2. Prepare the file and payload",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"payload ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"files ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" (",props:{style:{color:"#C9D1D9"}}},{content:"'file'",props:{style:{color:"#A5D6FF"}}},{content:", (",props:{style:{color:"#C9D1D9"}}},{content:"'FILE_PATH'",props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"open",props:{style:{color:"#79C0FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'FILE_NAME'",props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"'rb'",props:{style:{color:"#A5D6FF"}}},{content:"), ",props:{style:{color:"#C9D1D9"}}},{content:"'application/octet-stream'",props:{style:{color:"#A5D6FF"}}},{content:"))",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"headers ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" 'Accept'",props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"'application/json'",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" 'x-api-key'",props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"'LANGFLOW_API_KEY'",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# 3. Upload the file to Langflow",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"response ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" requests.request(",props:{style:{color:"#C9D1D9"}}},{content:'"POST"',props:{style:{color:"#A5D6FF"}}},{content:", url, ",props:{style:{color:"#C9D1D9"}}},{content:"headers",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"headers, ",props:{style:{color:"#C9D1D9"}}},{content:"data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"payload, ",props:{style:{color:"#C9D1D9"}}},{content:"files",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"files)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"print",props:{style:{color:"#79C0FF"}}},{content:"(response.text)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# 4. Get the uploaded file path from the response",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"uploaded_data ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" response.json()",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"uploaded_path ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" uploaded_data.get(",props:{style:{color:"#C9D1D9"}}},{content:"'path'",props:{style:{color:"#A5D6FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# 5. Call the Langflow run endpoint with the uploaded file path",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"run_url ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"run_payload ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "input_value"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"CHAT_INPUT"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "output_type"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"chat"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "input_type"',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"chat"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "tweaks"',props:{style:{color:"#A5D6FF"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "FILE_COMPONENT_ID"',props:{style:{color:"#A5D6FF"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "path"',props:{style:{color:"#A5D6FF"}}},{content:": uploaded_path",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"run_headers ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" 'Content-Type'",props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"'application/json'",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" 'Accept'",props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"'application/json'",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" 'x-api-key'",props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"'LANGFLOW_API_KEY'",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"run_response ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" requests.post(run_url, ",props:{style:{color:"#C9D1D9"}}},{content:"headers",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"run_headers, ",props:{style:{color:"#C9D1D9"}}},{content:"data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"json.dumps(run_payload))",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"langflow_data ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" run_response.json()",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# Output only the message",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"message ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"None",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:"try",props:{style:{color:"#FF7B72"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" message ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" langflow_data[",props:{style:{color:"#C9D1D9"}}},{content:"'outputs'",props:{style:{color:"#A5D6FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:"0",props:{style:{color:"#79C0FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:"'outputs'",props:{style:{color:"#A5D6FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:"0",props:{style:{color:"#79C0FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:"'results'",props:{style:{color:"#A5D6FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:"'message'",props:{style:{color:"#A5D6FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:"'data'",props:{style:{color:"#A5D6FF"}}},{content:"][",props:{style:{color:"#C9D1D9"}}},{content:"'text'",props:{style:{color:"#A5D6FF"}}},{content:"]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"except",props:{style:{color:"#FF7B72"}}},{content:" (",props:{style:{color:"#C9D1D9"}}},{content:"KeyError",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"IndexError",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"TypeError",props:{style:{color:"#79C0FF"}}},{content:"):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" pass",props:{style:{color:"#FF7B72"}}}]},{tokens:[{content:"print",props:{style:{color:"#79C0FF"}}},{content:"(message)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsx)(o.p,{children:"This script contains two requests."}),"\n",(0,s.jsxs)(o.p,{children:["The first request uploads a file, such as ",(0,s.jsx)(o.code,{children:"fake-resume.txt"}),", to your Langflow server at the ",(0,s.jsx)(o.code,{children:"/v2/files"})," endpoint. This request returns a file path that can be referenced in subsequent Langflow requests, such as ",(0,s.jsx)(o.code,{children:"02791d46-812f-4988-ab1c-7c430214f8d5/fake-resume.txt"})]}),"\n",(0,s.jsxs)(o.p,{children:["The second request sends a chat message to the Langflow flow at the ",(0,s.jsx)(o.code,{children:"/v1/run/"})," endpoint.\nThe ",(0,s.jsx)(o.code,{children:"tweaks"})," parameter includes the path to the uploaded file as the variable ",(0,s.jsx)(o.code,{children:"uploaded_path"}),", and sends this file directly to the ",(0,s.jsx)(o.strong,{children:"File"})," component."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsx)(o.p,{children:"Save and run the script to send the requests and test the flow."}),"\n",(0,s.jsx)(o.p,{children:"The initial output contains the JSON response object from the file upload endpoint, including the internal path where Langflow stores the file.\nThen, the LLM retrieves the file and evaluates its content, in this case the suitability of the resume for a job position."}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(o.p,{children:"The following is an example response from this tutorial's flow. Due to the nature of LLMs and variations in your inputs, your response might be different."}),(0,s.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:'{"id":"793ba3d8-5e7a-4499-8b89-d9a7b6325fee","name":"fake-resume (1)","path":"02791d46-812f-4988-ab1c-7c430214f8d5/fake-resume.txt","size":1779,"provider":null}',props:{}}]},{tokens:[{content:"The resume for Emily J. Wilson presents a strong candidate for a position in your Marketing department. Here are some key points to consider:",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"### Strengths:",props:{}}]},{tokens:[{content:"1. **Experience**: With over 8 years in marketing, Emily has held progressively responsible positions, culminating in her current role as Marketing Director. This indicates a solid foundation in the field.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"2. **Quantifiable Achievements**: The resume highlights specific accomplishments, such as a 25% increase in brand recognition and a 30% sales increase after launching new product lines. These metrics demonstrate her ability to drive results.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"3. **Diverse Skill Set**: Emily's skills encompass various aspects of marketing, including strategy development, team management, social media marketing, event planning, and data analysis. This versatility can be beneficial in a dynamic marketing environment.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"4. **Educational Background**: Her MBA and a Bachelor's degree in Marketing provide a strong academic foundation, which is often valued in marketing roles.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"5. **Certifications**: The Certified Marketing Professional (CMP) and Google Analytics Certification indicate a commitment to professional development and staying current with industry standards.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"### Areas for Improvement:",props:{}}]},{tokens:[{content:"1. **Specificity in Skills**: While the skills listed are relevant, providing examples of how she has applied these skills in her previous roles could strengthen her resume further.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"2. **References**: While stating that references are available upon request is standard, including a couple of testimonials or notable endorsements could enhance credibility.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"3. **Formatting**: Ensure that the resume is visually appealing and easy to read. Clear headings and bullet points help in quickly identifying key information.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"### Conclusion:",props:{}}]},{tokens:[{content:"Overall, Emily J. Wilson's resume reflects a well-rounded marketing professional with a proven track record of success. If her experience aligns with the specific needs of your Marketing department, she could be a valuable addition to your team. Consider inviting her for an interview to further assess her fit for the role.",props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(o.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,s.jsx)(o.p,{children:"To continue building on this tutorial, try these next steps."}),"\n",(0,s.jsx)(o.h3,{id:"process-multiple-files-loaded-at-runtime",children:"Process multiple files loaded at runtime"}),"\n",(0,s.jsxs)(o.p,{children:["To process multiple files in a single flow run, add a separate ",(0,s.jsx)(o.strong,{children:"File"})," component for each file you want to ingest. Then, modify your script to upload each file, retrieve each returned file path, and then pass a unique file path to each ",(0,s.jsx)(o.strong,{children:"File"})," component ID."]}),"\n",(0,s.jsxs)(o.p,{children:["For example, you can modify ",(0,s.jsx)(o.code,{children:"tweaks"})," to accept multiple ",(0,s.jsx)(o.strong,{children:"File"})," components.\nThe following code is just an example; it isn't working code:"]}),"\n",(0,s.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"## set multiple file paths",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"file_paths ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" FILE_COMPONENT_1",props:{style:{color:"#79C0FF"}}},{content:": uploaded_path_1,",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" FILE_COMPONENT_2",props:{style:{color:"#79C0FF"}}},{content:": uploaded_path_2",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"def ",props:{style:{color:"#FF7B72"}}},{content:"chat_with_flow",props:{style:{color:"#D2A8FF"}}},{content:"(input_message, file_paths):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' """Compare the contents of these two files."""',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" run_url ",props:{style:{color:"#C9D1D9"}}},{content:"= f",props:{style:{color:"#FF7B72"}}},{content:'"',props:{style:{color:"#A5D6FF"}}},{content:"{LANGFLOW_SERVER_ADDRESS}",props:{style:{color:"#79C0FF"}}},{content:"/api/v1/run/",props:{style:{color:"#A5D6FF"}}},{content:"{FLOW_ID}",props:{style:{color:"#79C0FF"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" # Prepare tweaks with both file paths",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" tweaks ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" for",props:{style:{color:"#FF7B72"}}},{content:" component_id, file_path ",props:{style:{color:"#C9D1D9"}}},{content:"in",props:{style:{color:"#FF7B72"}}},{content:" file_paths.items():",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" tweaks[component_id] ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}},{content:'"path"',props:{style:{color:"#A5D6FF"}}},{content:": file_path}",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,s.jsxs)(o.p,{children:["You can also use a ",(0,s.jsxs)(o.a,{href:"/components-data#directory",children:[(0,s.jsx)(o.strong,{children:"Directory"})," component"]})," to load all files in a directory or pass an archive file to the ",(0,s.jsx)(o.strong,{children:"File"})," component."]}),"\n",(0,s.jsx)(o.h3,{id:"upload-external-files-at-runtime",children:"Upload external files at runtime"}),"\n",(0,s.jsxs)(o.p,{children:["To upload files from another machine that isn't your local environment, your Langflow server must first be accessible over the internet. Then, authenticated users can upload files to your public Langflow server's ",(0,s.jsx)(o.code,{children:"/v2/files/"})," endpoint, as shown in the tutorial. For more information, see ",(0,s.jsx)(o.a,{href:"/deployment-overview",children:"Langflow deployment overview"}),"."]}),"\n",(0,s.jsx)(o.h3,{id:"preload-files-outside-the-chat-session",children:"Preload files outside the chat session"}),"\n",(0,s.jsxs)(o.p,{children:["You can use the ",(0,s.jsx)(o.strong,{children:"File"})," component to load files anywhere in a flow, not just in a chat session."]}),"\n",(0,s.jsxs)(o.p,{children:["In the visual editor, you can preload files to the ",(0,s.jsx)(o.strong,{children:"File"})," component by selecting them from your local machine or ",(0,s.jsx)(o.a,{href:"/concepts-file-management",children:"Langflow file management"}),"."]}),"\n",(0,s.jsx)(o.p,{children:"For example, you can preload an instructions file for a prompt template, or you can preload a vector store with documents that you want to query in a Retrieval Augmented Generation (RAG) flow."}),"\n",(0,s.jsxs)(o.p,{children:["For more information about the ",(0,s.jsx)(o.strong,{children:"File"})," component and other data loading components, see ",(0,s.jsxs)(o.a,{href:"/components-data",children:[(0,s.jsx)(o.strong,{children:"Data"})," components"]}),"."]})]})}function f(e={}){const{wrapper:o}={...(0,r.R)(),...e.components};return o?(0,s.jsx)(o,{...e,children:(0,s.jsx)(y,{...e})}):y(e)}function D(e,o){throw new Error("Expected "+(o?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},87481:(e,o,t)=>{t.d(o,{A:()=>n});const n=t.p+"assets/files/fake-resume-fa337cbdb18306bd29e3168f73409745.txt"}}]); \ No newline at end of file diff --git a/assets/js/393c45a3.984d3040.js b/assets/js/393c45a3.984d3040.js new file mode 100644 index 0000000000..e1c9ce6100 --- /dev/null +++ b/assets/js/393c45a3.984d3040.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[692],{10734:(e,n,t)=>{t.r(n),t.d(n,{CH:()=>p,assets:()=>u,chCodeConfig:()=>f,contentTitle:()=>h,default:()=>x,frontMatter:()=>d,metadata:()=>s,toc:()=>g});const s=JSON.parse('{"id":"Configuration/api-keys-and-authentication","title":"API keys and authentication","description":"Never expose Langflow ports directly to the internet without proper security measures.","source":"@site/docs/Configuration/api-keys-and-authentication.mdx","sourceDirName":"Configuration","slug":"/api-keys-and-authentication","permalink":"/api-keys-and-authentication","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"API keys and authentication","slug":"/api-keys-and-authentication"},"sidebar":"docs","previous":{"title":"Connect an Astra DB MCP server to Langflow","permalink":"/mcp-component-astra"},"next":{"title":"Install custom dependencies","permalink":"/install-custom-dependencies"}}');var o=t(74848),r=t(28453),a=t(24754),i=t(11470),l=t(19365),c=t(17886);const d={title:"API keys and authentication",slug:"/api-keys-and-authentication"},h=void 0,u={},p={annotations:a.hk,Code:a.Cy},f={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},g=[{value:"Langflow API keys",id:"langflow-api-keys",level:2},{value:"Langflow API key permissions",id:"langflow-api-key-permissions",level:3},{value:"Create a Langflow API key",id:"create-a-langflow-api-key",level:3},{value:"Use a Langflow API key",id:"use-a-langflow-api-key",level:3},{value:"Revoke an API key",id:"revoke-an-api-key",level:3},{value:"Component API keys",id:"component-api-keys",level:2},{value:"Authentication environment variables",id:"authentication-environment-variables",level:2},{value:"LANGFLOW_AUTO_LOGIN",id:"langflow-auto-login",level:3},{value:"AUTO_LOGIN and API authentication in version 1.5 and later",id:"auto_login-and-api-authentication-in-version-15-and-later",level:4},{value:"LANGFLOW_ENABLE_SUPERUSER_CLI",id:"langflow-enable-superuser-cli",level:3},{value:"LANGFLOW_SUPERUSER and LANGFLOW_SUPERUSER_PASSWORD",id:"langflow-superuser",level:3},{value:"LANGFLOW_SECRET_KEY",id:"langflow-secret-key",level:3},{value:"LANGFLOW_NEW_USER_IS_ACTIVE",id:"langflow-new-user-is-active",level:3},{value:"Start a Langflow server with authentication enabled",id:"start-a-langflow-server-with-authentication-enabled",level:2},{value:"Start the Langflow server",id:"start-the-langflow-server",level:3},{value:"Manage users as an administrator",id:"manage-users-as-an-administrator",level:3}];function y(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components},{Details:t}=n;return p||m("CH",!1),p.Code||m("CH.Code",!0),t||m("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)(n.admonition,{type:"warning",children:(0,o.jsxs)(n.p,{children:["Never expose Langflow ports directly to the internet without proper security measures.\nSet ",(0,o.jsx)(n.code,{children:"LANGFLOW_AUTO_LOGIN=False"}),", use a non-default ",(0,o.jsx)(n.code,{children:"LANGFLOW_SECRET_KEY"}),", and deploy your Langflow server behind a reverse proxy with authentication enabled.\nFor more information, see ",(0,o.jsx)(n.a,{href:"#start-a-langflow-server-with-authentication-enabled",children:"Start a Langflow server with authentication enabled"}),"."]})}),"\n",(0,o.jsx)(n.p,{children:"Authentication credentials help prevent unauthorized access to your Langflow server, flows, and services connected through components."}),"\n",(0,o.jsx)(n.p,{children:"There are three types of credentials that you use in Langflow:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"#langflow-api-keys",children:"Langflow API keys"}),": For authentication with the Langflow API and authorizing server-side Langflow actions like running flows and uploading files."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"#component-api-keys",children:"Component API keys"}),": For authentication between Langflow and a service connected through a component, such as a model provider or third-party API."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"#authentication-environment-variables",children:"Authentication environment variables"}),": These environment variables configure how Langflow handles user authentication and authorization."]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"langflow-api-keys",children:"Langflow API keys"}),"\n",(0,o.jsx)(n.p,{children:"You can use Langflow API keys to interact with Langflow programmatically."}),"\n",(0,o.jsxs)(n.p,{children:["In Langflow version 1.5 and later, most API endpoints require a Langflow API key, even when ",(0,o.jsx)(n.code,{children:"LANGFLOW_AUTO_LOGIN"})," is ",(0,o.jsx)(n.code,{children:"True"}),".\nFor more information, see ",(0,o.jsx)(n.a,{href:"#langflow-auto-login",children:(0,o.jsx)(n.code,{children:"LANGFLOW_AUTO_LOGIN"})}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"langflow-api-key-permissions",children:"Langflow API key permissions"}),"\n",(0,o.jsx)(n.p,{children:"A Langflow API key adopts the privileges of the user who created it.\nThis means that API keys you create have the same permissions and access that you do, including access to your flows, components, and Langflow database.\nA Langflow API key cannot be used to access resources outside of your own Langflow server."}),"\n",(0,o.jsx)(n.p,{children:"In single-user environments, you are always a superuser, and your Langflow API keys always have superuser privileges."}),"\n",(0,o.jsxs)(n.p,{children:["In multi-user environments, users who aren't superusers cannot use their API keys to access other users' resources.\nYou must ",(0,o.jsx)(n.a,{href:"#start-a-langflow-server-with-authentication-enabled",children:"start your Langflow server with authentication enabled"})," to allow user management and creation of non-superuser accounts."]}),"\n",(0,o.jsx)(n.h3,{id:"create-a-langflow-api-key",children:"Create a Langflow API key"}),"\n",(0,o.jsxs)(n.p,{children:["You can generate a Langflow API key in your Langflow ",(0,o.jsx)(n.strong,{children:"Settings"})," or with the Langflow CLI."]}),"\n",(0,o.jsxs)(n.p,{children:["The CLI option is required if your Langflow server is running in ",(0,o.jsx)(n.code,{children:"--backend-only"})," mode."]}),"\n",(0,o.jsxs)(i.A,{children:[(0,o.jsx)(l.A,{value:"settings",label:"Langflow Settings",default:!0,children:(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["In the Langflow header, click your profile icon, and then select ",(0,o.jsx)(n.strong,{children:"Settings"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["Click ",(0,o.jsx)(n.strong,{children:"Langflow API Keys"}),", and then click ",(0,o.jsx)(n.strong,{children:"Add New"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["Name your key, and then click ",(0,o.jsx)(n.strong,{children:"Create API Key"}),"."]}),"\n",(0,o.jsx)(n.li,{children:"Copy the API key and store it securely."}),"\n"]})}),(0,o.jsxs)(l.A,{value:"Langflow CLI",label:"Langflow CLI",children:[(0,o.jsxs)(n.p,{children:["If you're serving your flow with ",(0,o.jsx)(n.code,{children:"--backend-only=true"}),", you can't create API keys in your Langflow ",(0,o.jsx)(n.strong,{children:"Settings"})," because the frontend isn't running.\nIn this case, you must create API keys with the Langflow CLI."]}),(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Recommended: ",(0,o.jsx)(n.a,{href:"#start-a-langflow-server-with-authentication-enabled",children:"Start your Langflow server with authentication enabled"}),"."]}),"\n",(0,o.jsx)(n.p,{children:"This configuration is recommended for security reasons to prevent unauthorized API key and superuser creation, especially in production environments."}),"\n",(0,o.jsxs)(n.p,{children:["However, if authentication isn't enabled (",(0,o.jsx)(n.code,{children:"LANGFLOW_AUTO_LOGIN=True"}),"), all users are effectively superusers, and they can create API keys with the Langflow CLI."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Create an API key with ",(0,o.jsx)(n.a,{href:"/configuration-cli#langflow-api-key",children:(0,o.jsx)(n.code,{children:"langflow api-key"})}),":"]}),"\n",(0,o.jsx)(p.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"uv ",props:{style:{color:"#FFA657"}}},{content:"run langflow api-key",props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]}),"\n",(0,o.jsx)(n.p,{children:"All API keys created with the Langflow CLI have superuser privileges because the command requires superuser authentication, and Langflow API keys adopt the privileges of the user who created them."}),"\n"]}),"\n"]})]})]}),"\n",(0,o.jsx)(n.h3,{id:"use-a-langflow-api-key",children:"Use a Langflow API key"}),"\n",(0,o.jsxs)(n.p,{children:["To authenticate Langflow API requests, pass your Langflow API key an ",(0,o.jsx)(n.code,{children:"x-api-key"})," header or query parameter."]}),"\n",(0,o.jsxs)(i.A,{children:[(0,o.jsx)(l.A,{value:"header",label:"HTTP header",default:!0,children:(0,o.jsx)(p.Code,{codeConfig:f,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://',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_SERVER_ADDRESS",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/run/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'?stream=false" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:'\'{"inputs": {"text":""}, "tweaks": {}}\'',props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]})}),(0,o.jsx)(l.A,{value:"parameter",label:"Query parameter",children:(0,o.jsx)(p.Code,{codeConfig:f,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://',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_SERVER_ADDRESS",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/run/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:"?x-api-key=",props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',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:" -d ",props:{style:{color:"#79C0FF"}}},{content:'\'{"inputs": {"text":""}, "tweaks": {}}\'',props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]})})]}),"\n",(0,o.jsxs)(n.p,{children:["For more information about forming Langflow API requests, see ",(0,o.jsx)(n.a,{href:"/api-reference-api-examples",children:"Get started with the Langflow API"})," and ",(0,o.jsx)(n.a,{href:"/concepts-publish",children:"Trigger flows with the Langflow API"}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"revoke-an-api-key",children:"Revoke an API key"}),"\n",(0,o.jsx)(n.p,{children:"To revoke and delete an API key, do the following:"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["In the Langflow header, click your profile icon, and then select ",(0,o.jsx)(n.strong,{children:"Settings"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["Click ",(0,o.jsx)(n.strong,{children:"Langflow API Keys"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["Select the keys you want to delete, and then click ",(0,o.jsx)(c.A,{name:"Trash2","aria-hidden":"true"})," ",(0,o.jsx)(n.strong,{children:"Delete"}),"."]}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:"This action immediately invalidates the key and prevents it from being used again."}),"\n",(0,o.jsx)(n.h2,{id:"component-api-keys",children:"Component API keys"}),"\n",(0,o.jsx)(n.p,{children:"Component API keys authorize access to external services that are called by components in your flows, such as model providers, databases, or third-party APIs.\nThese aren't Langflow API keys or general application credentials."}),"\n",(0,o.jsxs)(n.p,{children:["In Langflow, you can store component API keys in global variables in your ",(0,o.jsx)(n.strong,{children:"Settings"})," or import them from your Langflow ",(0,o.jsx)(n.code,{children:".env"})," file.\nWhen creating global variables, use the ",(0,o.jsx)(n.strong,{children:"Credential"})," type for secure handling of sensitive information.\nFor more information, see ",(0,o.jsx)(n.a,{href:"/configuration-global-variables",children:"Global variables"}),"."]}),"\n",(0,o.jsx)(n.p,{children:"You create and manage component API keys within the service provider's platform.\nLangflow only stores the encrypted key value or a secure reference to a key stored elsewhere; it doesn't manage the actual credentials at the source.\nThis means that deleting a global variable from Langflow doesn't delete or invalidate the actual API key in the service provider's system.\nYou must delete or rotate component API keys directly using the service provider's interface or API."}),"\n",(0,o.jsx)(n.h2,{id:"authentication-environment-variables",children:"Authentication environment variables"}),"\n",(0,o.jsx)(n.p,{children:"This section describes the available authentication configuration variables."}),"\n",(0,o.jsxs)(n.p,{children:["You can use the ",(0,o.jsx)(n.a,{href:"https://github.com/langflow-ai/langflow/blob/main/.env.example",children:(0,o.jsx)(n.code,{children:".env.example"})})," file in the Langflow repository as a template for your own ",(0,o.jsx)(n.code,{children:".env"})," file."]}),"\n",(0,o.jsx)(n.h3,{id:"langflow-auto-login",children:"LANGFLOW_AUTO_LOGIN"}),"\n",(0,o.jsx)(n.p,{children:"This variable controls whether authentication is required to access your Langflow server, including the visual editor and API:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["If ",(0,o.jsx)(n.code,{children:"LANGFLOW_AUTO_LOGIN=False"}),", automatic login is disabled. Users must sign in to the visual editor and use a Langflow API key for Langflow API requests.\nIf false, you must also set ",(0,o.jsxs)(n.a,{href:"#langflow-superuser",children:[(0,o.jsx)(n.code,{children:"LANGFLOW_SUPERUSER"})," and ",(0,o.jsx)(n.code,{children:"LANGFLOW_SUPERUSER_PASSWORD"})]}),"."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["If ",(0,o.jsx)(n.code,{children:"LANGFLOW_AUTO_LOGIN=True"}),", Langflow bypasses authentication for the visual editor and API requests.\nAll users can access the same environment without password protection.\nIf you don't have user management enabled, all users are effectively superusers."]}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["Langflow doesn't allow users to simultaneously edit the same flow in real time.\nIf two users edit the same flow, Langflow saves only the work of the most recent editor based on the state of that user's ",(0,o.jsx)(n.a,{href:"/concepts-overview#workspace",children:"workspace"}),". Any changes made by the other user in the interim are overwritten."]}),"\n",(0,o.jsx)(n.h4,{id:"auto_login-and-api-authentication-in-version-15-and-later",children:"AUTO_LOGIN and API authentication in version 1.5 and later"}),"\n",(0,o.jsxs)(n.p,{children:["In Langflow versions 1.5 and later, most API endpoints require a Langflow API key, even when ",(0,o.jsx)(n.code,{children:"AUTO_LOGIN"})," is true.\nThe only exceptions are the MCP endpoints ",(0,o.jsx)(n.code,{children:"/v1/mcp"}),", ",(0,o.jsx)(n.code,{children:"/v1/mcp-projects"}),", and ",(0,o.jsx)(n.code,{children:"/v2/mcp"}),", which never require authentication."]}),"\n",(0,o.jsxs)(t,{children:[(0,o.jsx)("summary",{children:"LANGFLOW_AUTO_LOGIN and LANGFLOW_SKIP_AUTH_AUTO_LOGIN options"}),(0,o.jsxs)(n.p,{children:["In Langflow versions earlier than 1.5, if ",(0,o.jsx)(n.code,{children:"LANGFLOW_AUTO_LOGIN=True"}),", then Langflow automatically logs users in as a superuser without requiring authentication.\nIn this case, API requests don't require a Langflow API key."]}),(0,o.jsxs)(n.p,{children:["In Langflow version 1.5, you can set ",(0,o.jsx)(n.code,{children:"LANGFLOW_SKIP_AUTH_AUTO_LOGIN=True"})," ",(0,o.jsx)(n.em,{children:"and"})," ",(0,o.jsx)(n.code,{children:"LANGFLOW_AUTO_LOGIN=True"})," to skip authentication for API requests ",(0,o.jsx)(n.em,{children:"and"})," allow automatic login as a superuser for all users.\nThis is a temporary bypass for backwards compatibility, and the ",(0,o.jsx)(n.code,{children:"LANGFLOW_SKIP_AUTH_AUTO_LOGIN"})," option will be removed in a future release."]}),(0,o.jsxs)(n.p,{children:["If either ",(0,o.jsx)(n.code,{children:"LANGFLOW_AUTO_LOGIN"})," or ",(0,o.jsx)(n.code,{children:"LANGFLOW_SKIP_AUTH_AUTO_LOGIN"})," are false, then authentication is required."]})]}),"\n",(0,o.jsx)(n.h3,{id:"langflow-enable-superuser-cli",children:"LANGFLOW_ENABLE_SUPERUSER_CLI"}),"\n",(0,o.jsxs)(n.p,{children:["Controls the availability of the ",(0,o.jsx)(n.code,{children:"langflow superuser"})," command in the Langflow CLI.\nThe default is true, but false is recommended to prevent unrestricted superuser creation.\nFor more information, see ",(0,o.jsx)(n.a,{href:"/configuration-cli#langflow-superuser",children:(0,o.jsx)(n.code,{children:"langflow superuser"})}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"langflow-superuser",children:"LANGFLOW_SUPERUSER and LANGFLOW_SUPERUSER_PASSWORD"}),"\n",(0,o.jsx)(n.p,{children:"These variables specify the username and password for the Langflow server's superuser."}),"\n",(0,o.jsx)(p.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"LANGFLOW_SUPERUSER=administrator",props:{}}]},{tokens:[{content:"LANGFLOW_SUPERUSER_PASSWORD=securepassword",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,o.jsxs)(n.p,{children:["They are required if ",(0,o.jsx)(n.code,{children:"LANGFLOW_AUTO_LOGIN=False"}),".\nOtherwise, they aren't relevant."]}),"\n",(0,o.jsxs)(n.p,{children:["When you ",(0,o.jsx)(n.a,{href:"#start-a-langflow-server-with-authentication-enabled",children:"start a Langflow server with authentication enabled"}),", if these variables are required but ",(0,o.jsx)(n.em,{children:"not"})," set, then Langflow uses the default values of ",(0,o.jsx)(n.code,{children:"langflow"})," and ",(0,o.jsx)(n.code,{children:"langflow"}),".\nThese defaults don't apply when using the Langflow CLI command ",(0,o.jsx)(n.a,{href:"/configuration-cli#langflow-superuser",children:(0,o.jsx)(n.code,{children:"langflow superuser"})}),"."]}),"\n",(0,o.jsx)(n.h3,{id:"langflow-secret-key",children:"LANGFLOW_SECRET_KEY"}),"\n",(0,o.jsxs)(n.p,{children:["This environment variable stores a secret key used for encrypting sensitive data like API keys.\nLangflow uses the ",(0,o.jsx)(n.a,{href:"https://pypi.org/project/cryptography/",children:"Fernet"})," library for secret key encryption."]}),"\n",(0,o.jsx)(n.p,{children:"If no secret key is provided, Langflow automatically generates one."}),"\n",(0,o.jsx)(n.p,{children:"However, you should generate and explicitly set your own key in production environments.\nThis is particularly important for multi-instance deployments like Kubernetes to ensure consistent encryption across instances."}),"\n",(0,o.jsxs)(n.p,{children:["To generate a secret encryption key for ",(0,o.jsx)(n.code,{children:"LANGFLOW_SECRET_KEY"}),", do the following:"]}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"Run the command to generate and copy a secret to the clipboard."}),"\n",(0,o.jsxs)(i.A,{children:[(0,o.jsx)(l.A,{value:"unix",label:"macOS or Linux",children:(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"macOS"}),": Generate a secret key and copy it to the clipboard:"]}),"\n",(0,o.jsx)(p.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"python3 ",props:{style:{color:"#FFA657"}}},{content:"-c ",props:{style:{color:"#79C0FF"}}},{content:"\"from secrets import token_urlsafe; print(f'LANGFLOW_SECRET_KEY={token_urlsafe(32)}')\" ",props:{style:{color:"#A5D6FF"}}},{content:"| ",props:{style:{color:"#FF7B72"}}},{content:"pbcopy",props:{style:{color:"#FFA657"}}}]}],lang:"bash"},annotations:[]}]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Linux"}),": Generate a secret key and copy it to the clipboard:"]}),"\n",(0,o.jsx)(p.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"python3 ",props:{style:{color:"#FFA657"}}},{content:"-c ",props:{style:{color:"#79C0FF"}}},{content:"\"from secrets import token_urlsafe; print(f'LANGFLOW_SECRET_KEY={token_urlsafe(32)}')\" ",props:{style:{color:"#A5D6FF"}}},{content:"| ",props:{style:{color:"#FF7B72"}}},{content:"xclip ",props:{style:{color:"#FFA657"}}},{content:"-selection ",props:{style:{color:"#79C0FF"}}},{content:"clipboard",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Unix"}),": Generate a secret key and print it to the terminal to manually copy it:"]}),"\n",(0,o.jsx)(p.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"python3 ",props:{style:{color:"#FFA657"}}},{content:"-c ",props:{style:{color:"#79C0FF"}}},{content:"\"from secrets import token_urlsafe; print(f'LANGFLOW_SECRET_KEY={token_urlsafe(32)}')\"",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n"]}),"\n"]})}),(0,o.jsx)(l.A,{value:"windows",label:"Windows",children:(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"Generate a secret key and copy it to the clipboard:"}),"\n",(0,o.jsx)(p.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"python ",props:{style:{color:"#FFA657"}}},{content:"-c ",props:{style:{color:"#79C0FF"}}},{content:"\"from secrets import token_urlsafe; print(f'LANGFLOW_SECRET_KEY={token_urlsafe(32)}')\"",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"Generate a secret key and print it to the terminal to manually copy it:"}),"\n",(0,o.jsx)(p.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# Or just print",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"python ",props:{style:{color:"#FFA657"}}},{content:"-c ",props:{style:{color:"#79C0FF"}}},{content:"\"from secrets import token_urlsafe; print(f'LANGFLOW_SECRET_KEY={token_urlsafe(32)}')\"",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n"]}),"\n"]})})]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Paste the value into your ",(0,o.jsx)(n.code,{children:".env"})," file:"]}),"\n",(0,o.jsx)(p.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"LANGFLOW_SECRET_KEY=dBuu...2kM2_fb",props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"langflow-new-user-is-active",children:"LANGFLOW_NEW_USER_IS_ACTIVE"}),"\n",(0,o.jsxs)(n.p,{children:["When ",(0,o.jsx)(n.code,{children:"LANGFLOW_NEW_USER_IS_ACTIVE=False"})," (default), a superuser must explicitly activate a new user's account before they can sign in to the visual editor.\nThe superuser can also deactivate a user's account as needed."]}),"\n",(0,o.jsxs)(n.p,{children:["When ",(0,o.jsx)(n.code,{children:"LANGFLOW_NEW_USER_IS_ACTIVE=True"}),", new user accounts are automatically activated."]}),"\n",(0,o.jsx)(p.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"LANGFLOW_NEW_USER_IS_ACTIVE=False",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,o.jsxs)(n.p,{children:["Only superusers can manage user accounts for a Langflow server, but user management only matters if your server has authentication enabled.\nFor more information, see ",(0,o.jsx)(n.a,{href:"#start-a-langflow-server-with-authentication-enabled",children:"Start a Langflow server with authentication enabled"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"start-a-langflow-server-with-authentication-enabled",children:"Start a Langflow server with authentication enabled"}),"\n",(0,o.jsxs)(n.p,{children:["This section shows you how to use the ",(0,o.jsx)(n.a,{href:"/api-keys-and-authentication#authentication-environment-variables",children:"authentication environment variables"})," to deploy a Langflow server with authentication enabled.\nThis involves disabling automatic login, setting superuser credentials, generating a secret encryption key, and enabling user management."]}),"\n",(0,o.jsx)(n.p,{children:"This configuration is recommended for any deployment where Langflow is exposed to a shared or public network, or where multiple users access the same Langflow server."}),"\n",(0,o.jsxs)(n.p,{children:["With authentication enabled, all users must sign in to the visual editor with valid credentials, and API requests require authentication with a Langflow API key.\nAdditionally, you must sign in as a superuser to manage users and ",(0,o.jsx)(n.a,{href:"#create-a-langflow-api-key",children:"create a Langflow API key"})," with superuser privileges."]}),"\n",(0,o.jsx)(n.h3,{id:"start-the-langflow-server",children:"Start the Langflow server"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Create a ",(0,o.jsx)(n.code,{children:".env"})," file with the following variables:"]}),"\n",(0,o.jsx)(p.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"LANGFLOW_AUTO_LOGIN=False",props:{}}]},{tokens:[{content:"LANGFLOW_SUPERUSER=",props:{}}]},{tokens:[{content:"LANGFLOW_SUPERUSER_PASSWORD=",props:{}}]},{tokens:[{content:"LANGFLOW_SECRET_KEY=",props:{}}]},{tokens:[{content:"LANGFLOW_NEW_USER_IS_ACTIVE=False",props:{}}]},{tokens:[{content:"LANGFLOW_ENABLE_SUPERUSER_CLI=False",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,o.jsxs)(n.p,{children:["Your ",(0,o.jsx)(n.code,{children:".env"})," file can have other environment variables.\nThis example focuses on authentication variables."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Set ",(0,o.jsx)(n.code,{children:"LANGFLOW_SUPERUSER"})," and ",(0,o.jsx)(n.code,{children:"LANGFLOW_SUPERUSER_PASSWORD"})," to your desired superuser credentials."]}),"\n",(0,o.jsxs)(n.p,{children:["For a one-time test, you can use basic credentials like ",(0,o.jsx)(n.code,{children:"administrator"})," and ",(0,o.jsx)(n.code,{children:"password"}),".\nStrong, securely-stored credentials are recommended in genuine development and production environments."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Recommended: Generate and set a ",(0,o.jsx)(n.code,{children:"LANGFLOW_SECRET_KEY"})," for encrypting sensitive data."]}),"\n",(0,o.jsx)(n.p,{children:"If you don't set a secret key, Langflow generates one automatically, but this isn't recommended for production environments."}),"\n",(0,o.jsxs)(n.p,{children:["For instructions on generating at setting a secret key, see ",(0,o.jsx)(n.a,{href:"#langflow-secret-key",children:(0,o.jsx)(n.code,{children:"LANGFLOW_SECRET_KEY"})}),"."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Save your ",(0,o.jsx)(n.code,{children:".env"})," file with the populated variables. For example:"]}),"\n",(0,o.jsx)(p.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"LANGFLOW_AUTO_LOGIN=False",props:{}}]},{tokens:[{content:"LANGFLOW_SUPERUSER=administrator",props:{}}]},{tokens:[{content:"LANGFLOW_SUPERUSER_PASSWORD=securepassword",props:{}}]},{tokens:[{content:"LANGFLOW_SECRET_KEY=dBuu...2kM2_fb",props:{}}]},{tokens:[{content:"LANGFLOW_NEW_USER_IS_ACTIVE=False",props:{}}]},{tokens:[{content:"LANGFLOW_ENABLE_SUPERUSER_CLI=False",props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Start Langflow with the configuration from your ",(0,o.jsx)(n.code,{children:".env"})," file:"]}),"\n",(0,o.jsx)(p.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"uv run langflow run --env-file .env",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,o.jsxs)(n.p,{children:["Starting Langflow with a ",(0,o.jsx)(n.code,{children:".env"})," file automatically authenticates you as the superuser set in ",(0,o.jsx)(n.code,{children:"LANGFLOW_SUPERUSER"})," and ",(0,o.jsx)(n.code,{children:"LANGFLOW_SUPERUSER_PASSWORD"}),".\nIf you don't explicitly set these variables, the default values are ",(0,o.jsx)(n.code,{children:"langflow"})," and ",(0,o.jsx)(n.code,{children:"langflow"})," for system auto-login."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Verify the server is running. The default location is ",(0,o.jsx)(n.code,{children:"http://localhost:7860"}),"."]}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:"Next, you can add users to your Langflow server to collaborate with others on flows."}),"\n",(0,o.jsx)(n.h3,{id:"manage-users-as-an-administrator",children:"Manage users as an administrator"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["To complete your first-time login as a superuser, go to ",(0,o.jsx)(n.code,{children:"http://localhost:7860/login"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["If you aren't using the default location, replace ",(0,o.jsx)(n.code,{children:"localhost:7860"})," with your server's address."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Log in with the superuser credentials you set in your ",(0,o.jsx)(n.code,{children:".env"})," (",(0,o.jsx)(n.code,{children:"LANGFLOW_SUPERUSER"})," and ",(0,o.jsx)(n.code,{children:"LANGFLOW_SUPERUSER_PASSWORD"}),")."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["To manage users on your server, navigate to ",(0,o.jsx)(n.code,{children:"/admin"}),", such as ",(0,o.jsx)(n.code,{children:"http://localhost:7860/admin"}),", click your profile icon, and then click ",(0,o.jsx)(n.strong,{children:"Admin Page"}),"."]}),"\n",(0,o.jsx)(n.p,{children:"As a superuser, you can add users, set permissions, reset passwords, and delete accounts."}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["To add a user, click ",(0,o.jsx)(n.strong,{children:"New User"}),", and then complete the user account form:"]}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsx)(n.li,{children:"Enter a username and password."}),"\n",(0,o.jsxs)(n.li,{children:["To activate the account immediately, select ",(0,o.jsx)(n.strong,{children:"Active"}),". Inactive users cannot sign in or access flows they created before becoming inactive."]}),"\n",(0,o.jsxs)(n.li,{children:["Deselect ",(0,o.jsx)(n.strong,{children:"Superuser"})," if you don't want the user to have full administrative privileges."]}),"\n",(0,o.jsxs)(n.li,{children:["Click ",(0,o.jsx)(n.strong,{children:"Save"}),". The new user appears in the ",(0,o.jsx)(n.strong,{children:"Admin Page"}),"."]}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"To test the new user's access, sign out of Langflow, and then sign in with the new user's credentials."}),"\n",(0,o.jsxs)(n.p,{children:["Try to access the ",(0,o.jsx)(n.code,{children:"/admin"})," page.\nYou are redirected to the ",(0,o.jsx)(n.code,{children:"/flows"})," page if the new user isn't a superuser."]}),"\n"]}),"\n"]})]})}function x(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(y,{...e})}):y(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.")}},11470:(e,n,t)=>{t.d(n,{A:()=>L});var s=t(96540),o=t(18215),r=t(23104),a=t(56347),i=t(205),l=t(57485),c=t(31682),d=t(70679);function h(e){return s.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,s.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,s.useMemo)(()=>{const e=n??function(e){return h(e).map(({props:{value:e,label:n,attributes:t,default:s}})=>({value:e,label:n,attributes:t,default:s}))}(t);return function(e){const n=(0,c.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 p({value:e,tabValues:n}){return n.some(n=>n.value===e)}function f({queryString:e=!1,groupId:n}){const t=(0,a.W6)(),o=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,l.aZ)(o),(0,s.useCallback)(e=>{if(!o)return;const n=new URLSearchParams(t.location.search);n.set(o,e),t.replace({...t.location,search:n.toString()})},[o,t])]}function g(e){const{defaultValue:n,queryString:t=!1,groupId:o}=e,r=u(e),[a,l]=(0,s.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(!p({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:r})),[c,h]=f({queryString:t,groupId:o}),[g,y]=function({groupId:e}){const n=function(e){return e?`docusaurus.tab.${e}`:null}(e),[t,o]=(0,d.Dv)(n);return[t,(0,s.useCallback)(e=>{n&&o.set(e)},[n,o])]}({groupId:o}),x=(()=>{const e=c??g;return p({value:e,tabValues:r})?e:null})();(0,i.A)(()=>{x&&l(x)},[x]);return{selectedValue:a,selectValue:(0,s.useCallback)(e=>{if(!p({value:e,tabValues:r}))throw new Error(`Can't select invalid tab value=${e}`);l(e),h(e),y(e)},[h,y,r]),tabValues:r}}var y=t(92303);const x={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var m=t(74848);function v({className:e,block:n,selectedValue:t,selectValue:s,tabValues:a}){const i=[],{blockElementScrollPositionUntilNextRender:l}=(0,r.a_)(),c=e=>{const n=e.currentTarget,o=i.indexOf(n),r=a[o].value;r!==t&&(l(n),s(r))},d=e=>{let n=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const t=i.indexOf(e.currentTarget)+1;n=i[t]??i[0];break}case"ArrowLeft":{const t=i.indexOf(e.currentTarget)-1;n=i[t]??i[i.length-1];break}}n?.focus()};return(0,m.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.A)("tabs",{"tabs--block":n},e),children:a.map(({value:e,label:n,attributes:s})=>(0,m.jsx)("li",{role:"tab",tabIndex:t===e?0:-1,"aria-selected":t===e,ref:e=>{i.push(e)},onKeyDown:d,onClick:c,...s,className:(0,o.A)("tabs__item",x.tabItem,s?.className,{"tabs__item--active":t===e}),children:n??e},e))})}function j({lazy:e,children:n,selectedValue:t}){const r=(Array.isArray(n)?n:[n]).filter(Boolean);if(e){const e=r.find(e=>e.props.value===t);return e?(0,s.cloneElement)(e,{className:(0,o.A)("margin-top--md",e.props.className)}):null}return(0,m.jsx)("div",{className:"margin-top--md",children:r.map((e,n)=>(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==t}))})}function w(e){const n=g(e);return(0,m.jsxs)("div",{className:(0,o.A)("tabs-container",x.tabList),children:[(0,m.jsx)(v,{...n,...e}),(0,m.jsx)(j,{...n,...e})]})}function L(e){const n=(0,y.A)();return(0,m.jsx)(w,{...e,children:h(e.children)},String(n))}},17886:(e,n,t)=>{t.d(n,{A:()=>r});t(96540);var s=t(64058),o=t(74848);function r({name:e,...n}){const t=s[e];return t?(0,o.jsx)(t,{...n}):null}},19365:(e,n,t)=>{t.d(n,{A:()=>a});t(96540);var s=t(18215);const o={tabItem:"tabItem_Ymn6"};var r=t(74848);function a({children:e,hidden:n,className:t}){return(0,r.jsx)("div",{role:"tabpanel",className:(0,s.A)(o.tabItem,t),hidden:n,children:e})}}}]); \ No newline at end of file diff --git a/assets/js/393c45a3.a88f2240.js b/assets/js/393c45a3.a88f2240.js deleted file mode 100644 index f7ded940f3..0000000000 --- a/assets/js/393c45a3.a88f2240.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[692],{10734:(e,n,t)=>{t.r(n),t.d(n,{CH:()=>p,assets:()=>u,chCodeConfig:()=>f,contentTitle:()=>h,default:()=>x,frontMatter:()=>d,metadata:()=>o,toc:()=>g});const o=JSON.parse('{"id":"Configuration/api-keys-and-authentication","title":"API keys and authentication","description":"Never expose Langflow ports directly to the internet without proper security measures.","source":"@site/docs/Configuration/api-keys-and-authentication.mdx","sourceDirName":"Configuration","slug":"/api-keys-and-authentication","permalink":"/api-keys-and-authentication","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"API keys and authentication","slug":"/api-keys-and-authentication"},"sidebar":"docs","previous":{"title":"Connect an Astra DB MCP server to Langflow","permalink":"/mcp-component-astra"},"next":{"title":"Install custom dependencies","permalink":"/install-custom-dependencies"}}');var s=t(74848),r=t(28453),a=t(24754),i=t(11470),l=t(19365),c=t(17886);const d={title:"API keys and authentication",slug:"/api-keys-and-authentication"},h=void 0,u={},p={annotations:a.hk,Code:a.Cy},f={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},g=[{value:"Langflow API keys",id:"langflow-api-keys",level:2},{value:"Langflow API key permissions",id:"langflow-api-key-permissions",level:3},{value:"Create a Langflow API key",id:"create-a-langflow-api-key",level:3},{value:"Use a Langflow API key",id:"use-a-langflow-api-key",level:3},{value:"Revoke an API key",id:"revoke-an-api-key",level:3},{value:"Component API keys",id:"component-api-keys",level:2},{value:"Authentication environment variables",id:"authentication-environment-variables",level:2},{value:"LANGFLOW_AUTO_LOGIN",id:"langflow-auto-login",level:3},{value:"AUTO_LOGIN and API authentication in version 1.5 and later",id:"auto_login-and-api-authentication-in-version-15-and-later",level:4},{value:"LANGFLOW_ENABLE_SUPERUSER_CLI",id:"langflow-enable-superuser-cli",level:3},{value:"LANGFLOW_SUPERUSER and LANGFLOW_SUPERUSER_PASSWORD",id:"langflow-superuser",level:3},{value:"LANGFLOW_SECRET_KEY",id:"langflow-secret-key",level:3},{value:"LANGFLOW_NEW_USER_IS_ACTIVE",id:"langflow-new-user-is-active",level:3},{value:"Start a Langflow server with authentication enabled",id:"start-a-langflow-server-with-authentication-enabled",level:2},{value:"Start the Langflow server",id:"start-the-langflow-server",level:3},{value:"Manage users as an administrator",id:"manage-users-as-an-administrator",level:3}];function y(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components},{Details:t}=n;return p||m("CH",!1),p.Code||m("CH.Code",!0),t||m("Details",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n","\n",(0,s.jsx)(n.admonition,{type:"warning",children:(0,s.jsxs)(n.p,{children:["Never expose Langflow ports directly to the internet without proper security measures.\nSet ",(0,s.jsx)(n.code,{children:"LANGFLOW_AUTO_LOGIN=False"}),", use a non-default ",(0,s.jsx)(n.code,{children:"LANGFLOW_SECRET_KEY"}),", and deploy your Langflow server behind a reverse proxy with authentication enabled.\nFor more information, see ",(0,s.jsx)(n.a,{href:"#start-a-langflow-server-with-authentication-enabled",children:"Start a Langflow server with authentication enabled"}),"."]})}),"\n",(0,s.jsx)(n.p,{children:"Authentication credentials help prevent unauthorized access to your Langflow server, flows, and services connected through components."}),"\n",(0,s.jsx)(n.p,{children:"There are three types of credentials that you use in Langflow:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"#langflow-api-keys",children:"Langflow API keys"}),": For authentication with the Langflow API and authorizing server-side Langflow actions like running flows and uploading files."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"#component-api-keys",children:"Component API keys"}),": For authentication between Langflow and a service connected through a component, such as a model provider or third-party API."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.a,{href:"#authentication-environment-variables",children:"Authentication environment variables"}),": These environment variables configure how Langflow handles user authentication and authorization."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"langflow-api-keys",children:"Langflow API keys"}),"\n",(0,s.jsx)(n.p,{children:"You can use Langflow API keys to interact with Langflow programmatically."}),"\n",(0,s.jsxs)(n.p,{children:["In Langflow version 1.5 and later, most API endpoints require a Langflow API key, even when ",(0,s.jsx)(n.code,{children:"LANGFLOW_AUTO_LOGIN"})," is ",(0,s.jsx)(n.code,{children:"True"}),".\nFor more information, see ",(0,s.jsx)(n.a,{href:"#langflow-auto-login",children:(0,s.jsx)(n.code,{children:"LANGFLOW_AUTO_LOGIN"})}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"langflow-api-key-permissions",children:"Langflow API key permissions"}),"\n",(0,s.jsx)(n.p,{children:"A Langflow API key adopts the privileges of the user who created it.\nThis means that API keys you create have the same permissions and access that you do, including access to your flows, components, and Langflow database.\nA Langflow API key cannot be used to access resources outside of your own Langflow server."}),"\n",(0,s.jsx)(n.p,{children:"In single-user environments, you are always a superuser, and your Langflow API keys always have superuser privileges."}),"\n",(0,s.jsxs)(n.p,{children:["In multi-user environments, users who aren't superusers cannot use their API keys to access other users' resources.\nYou must ",(0,s.jsx)(n.a,{href:"#start-a-langflow-server-with-authentication-enabled",children:"start your Langflow server with authentication enabled"})," to allow user management and creation of non-superuser accounts."]}),"\n",(0,s.jsx)(n.h3,{id:"create-a-langflow-api-key",children:"Create a Langflow API key"}),"\n",(0,s.jsxs)(n.p,{children:["You can generate a Langflow API key in your Langflow ",(0,s.jsx)(n.strong,{children:"Settings"})," or with the Langflow CLI."]}),"\n",(0,s.jsxs)(n.p,{children:["The CLI option is required if your Langflow server is running in ",(0,s.jsx)(n.code,{children:"--backend-only"})," mode."]}),"\n",(0,s.jsxs)(i.A,{children:[(0,s.jsx)(l.A,{value:"settings",label:"Langflow Settings",default:!0,children:(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["In the Langflow header, click your profile icon, and then select ",(0,s.jsx)(n.strong,{children:"Settings"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Click ",(0,s.jsx)(n.strong,{children:"Langflow API Keys"}),", and then click ",(0,s.jsx)(n.strong,{children:"Add New"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Name your key, and then click ",(0,s.jsx)(n.strong,{children:"Create API Key"}),"."]}),"\n",(0,s.jsx)(n.li,{children:"Copy the API key and store it securely."}),"\n"]})}),(0,s.jsxs)(l.A,{value:"Langflow CLI",label:"Langflow CLI",children:[(0,s.jsxs)(n.p,{children:["If you're serving your flow with ",(0,s.jsx)(n.code,{children:"--backend-only=true"}),", you can't create API keys in your Langflow ",(0,s.jsx)(n.strong,{children:"Settings"})," because the frontend isn't running.\nIn this case, you must create API keys with the Langflow CLI."]}),(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Recommended: ",(0,s.jsx)(n.a,{href:"#start-a-langflow-server-with-authentication-enabled",children:"Start your Langflow server with authentication enabled"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"This configuration is recommended for security reasons to prevent unauthorized API key and superuser creation, especially in production environments."}),"\n",(0,s.jsxs)(n.p,{children:["However, if authentication isn't enabled (",(0,s.jsx)(n.code,{children:"LANGFLOW_AUTO_LOGIN=True"}),"), all users are effectively superusers, and they can create API keys with the Langflow CLI."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Create an API key with ",(0,s.jsx)(n.a,{href:"/configuration-cli#langflow-api-key",children:(0,s.jsx)(n.code,{children:"langflow api-key"})}),":"]}),"\n",(0,s.jsx)(p.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"uv ",props:{style:{color:"#FFA657"}}},{content:"run langflow api-key",props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]}),"\n",(0,s.jsx)(n.p,{children:"All API keys created with the Langflow CLI have superuser privileges because the command requires superuser authentication, and Langflow API keys adopt the privileges of the user who created them."}),"\n"]}),"\n"]})]})]}),"\n",(0,s.jsx)(n.h3,{id:"use-a-langflow-api-key",children:"Use a Langflow API key"}),"\n",(0,s.jsxs)(n.p,{children:["To authenticate Langflow API requests, pass your Langflow API key an ",(0,s.jsx)(n.code,{children:"x-api-key"})," header or query parameter."]}),"\n",(0,s.jsxs)(i.A,{children:[(0,s.jsx)(l.A,{value:"header",label:"HTTP header",default:!0,children:(0,s.jsx)(p.Code,{codeConfig:f,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://',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_SERVER_ADDRESS",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/run/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'?stream=false" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:'\'{"inputs": {"text":""}, "tweaks": {}}\'',props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]})}),(0,s.jsx)(l.A,{value:"parameter",label:"Query parameter",children:(0,s.jsx)(p.Code,{codeConfig:f,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://',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_SERVER_ADDRESS",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/run/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:"?x-api-key=",props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',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:" -d ",props:{style:{color:"#79C0FF"}}},{content:'\'{"inputs": {"text":""}, "tweaks": {}}\'',props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]})})]}),"\n",(0,s.jsxs)(n.p,{children:["For more information about forming Langflow API requests, see ",(0,s.jsx)(n.a,{href:"/api-reference-api-examples",children:"Get started with the Langflow API"})," and ",(0,s.jsx)(n.a,{href:"/concepts-publish",children:"Trigger flows with the Langflow API"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"revoke-an-api-key",children:"Revoke an API key"}),"\n",(0,s.jsx)(n.p,{children:"To revoke and delete an API key, do the following:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["In the Langflow header, click your profile icon, and then select ",(0,s.jsx)(n.strong,{children:"Settings"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Click ",(0,s.jsx)(n.strong,{children:"Langflow API Keys"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Select the keys you want to delete, and then click ",(0,s.jsx)(c.A,{name:"Trash2","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Delete"}),"."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"This action immediately invalidates the key and prevents it from being used again."}),"\n",(0,s.jsx)(n.h2,{id:"component-api-keys",children:"Component API keys"}),"\n",(0,s.jsx)(n.p,{children:"Component API keys authorize access to external services that are called by components in your flows, such as model providers, databases, or third-party APIs.\nThese aren't Langflow API keys or general application credentials."}),"\n",(0,s.jsxs)(n.p,{children:["In Langflow, you can store component API keys in global variables in your ",(0,s.jsx)(n.strong,{children:"Settings"})," or import them from your Langflow ",(0,s.jsx)(n.code,{children:".env"})," file.\nWhen creating global variables, use the ",(0,s.jsx)(n.strong,{children:"Credential"})," type for secure handling of sensitive information.\nFor more information, see ",(0,s.jsx)(n.a,{href:"/configuration-global-variables",children:"Global variables"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"You create and manage component API keys within the service provider's platform.\nLangflow only stores the encrypted key value or a secure reference to a key stored elsewhere; it doesn't manage the actual credentials at the source.\nThis means that deleting a global variable from Langflow doesn't delete or invalidate the actual API key in the service provider's system.\nYou must delete or rotate component API keys directly using the service provider's interface or API."}),"\n",(0,s.jsx)(n.h2,{id:"authentication-environment-variables",children:"Authentication environment variables"}),"\n",(0,s.jsx)(n.p,{children:"This section describes the available authentication configuration variables."}),"\n",(0,s.jsxs)(n.p,{children:["You can use the ",(0,s.jsx)(n.a,{href:"https://github.com/langflow-ai/langflow/blob/main/.env.example",children:(0,s.jsx)(n.code,{children:".env.example"})})," file in the Langflow repository as a template for your own ",(0,s.jsx)(n.code,{children:".env"})," file."]}),"\n",(0,s.jsx)(n.h3,{id:"langflow-auto-login",children:"LANGFLOW_AUTO_LOGIN"}),"\n",(0,s.jsx)(n.p,{children:"This variable controls whether authentication is required to access your Langflow server, including the visual editor and API:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["If ",(0,s.jsx)(n.code,{children:"LANGFLOW_AUTO_LOGIN=False"}),", automatic login is disabled. Users must sign in to the visual editor and use a Langflow API key for Langflow API requests.\nIf false, you must also set ",(0,s.jsxs)(n.a,{href:"#langflow-superuser",children:[(0,s.jsx)(n.code,{children:"LANGFLOW_SUPERUSER"})," and ",(0,s.jsx)(n.code,{children:"LANGFLOW_SUPERUSER_PASSWORD"})]}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["If ",(0,s.jsx)(n.code,{children:"LANGFLOW_AUTO_LOGIN=True"}),", Langflow bypasses authentication for the visual editor and API requests.\nAll users can access the same environment without password protection.\nIf you don't have user management enabled, all users are effectively superusers."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["Langflow doesn't allow users to simultaneously edit the same flow in real time.\nIf two users edit the same flow, Langflow saves only the work of the most recent editor based on the state of that user's ",(0,s.jsx)(n.a,{href:"/concepts-overview#workspace",children:"workspace"}),". Any changes made by the other user in the interim are overwritten."]}),"\n",(0,s.jsx)(n.h4,{id:"auto_login-and-api-authentication-in-version-15-and-later",children:"AUTO_LOGIN and API authentication in version 1.5 and later"}),"\n",(0,s.jsxs)(n.p,{children:["In Langflow versions 1.5 and later, most API endpoints require a Langflow API key, even when ",(0,s.jsx)(n.code,{children:"AUTO_LOGIN"})," is true.\nThe only exceptions are the MCP endpoints ",(0,s.jsx)(n.code,{children:"/v1/mcp"}),", ",(0,s.jsx)(n.code,{children:"/v1/mcp-projects"}),", and ",(0,s.jsx)(n.code,{children:"/v2/mcp"}),", which never require authentication."]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"LANGFLOW_AUTO_LOGIN and LANGFLOW_SKIP_AUTH_AUTO_LOGIN options"}),(0,s.jsxs)(n.p,{children:["In Langflow versions earlier than 1.5, if ",(0,s.jsx)(n.code,{children:"LANGFLOW_AUTO_LOGIN=True"}),", then Langflow automatically logs users in as a superuser without requiring authentication.\nIn this case, API requests don't require a Langflow API key."]}),(0,s.jsxs)(n.p,{children:["In Langflow version 1.5, you can set ",(0,s.jsx)(n.code,{children:"LANGFLOW_SKIP_AUTH_AUTO_LOGIN=True"})," ",(0,s.jsx)(n.em,{children:"and"})," ",(0,s.jsx)(n.code,{children:"LANGFLOW_AUTO_LOGIN=True"})," to skip authentication for API requests ",(0,s.jsx)(n.em,{children:"and"})," allow automatic login as a superuser for all users.\nThis is a temporary bypass for backwards compatibility, and the ",(0,s.jsx)(n.code,{children:"LANGFLOW_SKIP_AUTH_AUTO_LOGIN"})," option will be removed in a future release."]}),(0,s.jsxs)(n.p,{children:["If either ",(0,s.jsx)(n.code,{children:"LANGFLOW_AUTO_LOGIN"})," or ",(0,s.jsx)(n.code,{children:"LANGFLOW_SKIP_AUTH_AUTO_LOGIN"})," are false, then authentication is required."]})]}),"\n",(0,s.jsx)(n.h3,{id:"langflow-enable-superuser-cli",children:"LANGFLOW_ENABLE_SUPERUSER_CLI"}),"\n",(0,s.jsxs)(n.p,{children:["Controls the availability of the ",(0,s.jsx)(n.code,{children:"langflow superuser"})," command in the Langflow CLI.\nThe default is true, but false is recommended to prevent unrestricted superuser creation.\nFor more information, see ",(0,s.jsx)(n.a,{href:"/configuration-cli#langflow-superuser",children:(0,s.jsx)(n.code,{children:"langflow superuser"})}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"langflow-superuser",children:"LANGFLOW_SUPERUSER and LANGFLOW_SUPERUSER_PASSWORD"}),"\n",(0,s.jsx)(n.p,{children:"These variables specify the username and password for the Langflow server's superuser."}),"\n",(0,s.jsx)(p.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"LANGFLOW_SUPERUSER=administrator",props:{}}]},{tokens:[{content:"LANGFLOW_SUPERUSER_PASSWORD=securepassword",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsxs)(n.p,{children:["They are required if ",(0,s.jsx)(n.code,{children:"LANGFLOW_AUTO_LOGIN=False"}),".\nOtherwise, they aren't relevant."]}),"\n",(0,s.jsxs)(n.p,{children:["If required and not set in when you ",(0,s.jsx)(n.a,{href:"#start-a-langflow-server-with-authentication-enabled",children:"start a Langflow server with authentication enabled"}),", then the default values are ",(0,s.jsx)(n.code,{children:"langflow"})," and ",(0,s.jsx)(n.code,{children:"langflow"})," for system auto-login behavior.\nThese defaults don't apply when using the Langflow CLI command ",(0,s.jsx)(n.a,{href:"/configuration-cli#langflow-superuser",children:(0,s.jsx)(n.code,{children:"langflow superuser"})}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"langflow-secret-key",children:"LANGFLOW_SECRET_KEY"}),"\n",(0,s.jsxs)(n.p,{children:["This environment variable stores a secret key used for encrypting sensitive data like API keys.\nLangflow uses the ",(0,s.jsx)(n.a,{href:"https://pypi.org/project/cryptography/",children:"Fernet"})," library for secret key encryption."]}),"\n",(0,s.jsx)(n.p,{children:"If no secret key is provided, Langflow automatically generates one."}),"\n",(0,s.jsx)(n.p,{children:"However, you should generate and explicitly set your own key in production environments.\nThis is particularly important for multi-instance deployments like Kubernetes to ensure consistent encryption across instances."}),"\n",(0,s.jsxs)(n.p,{children:["To generate a secret encryption key for ",(0,s.jsx)(n.code,{children:"LANGFLOW_SECRET_KEY"}),", do the following:"]}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Run the command to generate and copy a secret to the clipboard."}),"\n",(0,s.jsxs)(i.A,{children:[(0,s.jsx)(l.A,{value:"unix",label:"macOS or Linux",children:(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:"macOS"}),": Generate a secret key and copy it to the clipboard:"]}),"\n",(0,s.jsx)(p.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"python3 ",props:{style:{color:"#FFA657"}}},{content:"-c ",props:{style:{color:"#79C0FF"}}},{content:"\"from secrets import token_urlsafe; print(f'LANGFLOW_SECRET_KEY={token_urlsafe(32)}')\" ",props:{style:{color:"#A5D6FF"}}},{content:"| ",props:{style:{color:"#FF7B72"}}},{content:"pbcopy",props:{style:{color:"#FFA657"}}}]}],lang:"bash"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Linux"}),": Generate a secret key and copy it to the clipboard:"]}),"\n",(0,s.jsx)(p.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"python3 ",props:{style:{color:"#FFA657"}}},{content:"-c ",props:{style:{color:"#79C0FF"}}},{content:"\"from secrets import token_urlsafe; print(f'LANGFLOW_SECRET_KEY={token_urlsafe(32)}')\" ",props:{style:{color:"#A5D6FF"}}},{content:"| ",props:{style:{color:"#FF7B72"}}},{content:"xclip ",props:{style:{color:"#FFA657"}}},{content:"-selection ",props:{style:{color:"#79C0FF"}}},{content:"clipboard",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Unix"}),": Generate a secret key and print it to the terminal to manually copy it:"]}),"\n",(0,s.jsx)(p.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"python3 ",props:{style:{color:"#FFA657"}}},{content:"-c ",props:{style:{color:"#79C0FF"}}},{content:"\"from secrets import token_urlsafe; print(f'LANGFLOW_SECRET_KEY={token_urlsafe(32)}')\"",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n"]}),"\n"]})}),(0,s.jsx)(l.A,{value:"windows",label:"Windows",children:(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Generate a secret key and copy it to the clipboard:"}),"\n",(0,s.jsx)(p.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"python ",props:{style:{color:"#FFA657"}}},{content:"-c ",props:{style:{color:"#79C0FF"}}},{content:"\"from secrets import token_urlsafe; print(f'LANGFLOW_SECRET_KEY={token_urlsafe(32)}')\"",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Generate a secret key and print it to the terminal to manually copy it:"}),"\n",(0,s.jsx)(p.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# Or just print",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"python ",props:{style:{color:"#FFA657"}}},{content:"-c ",props:{style:{color:"#79C0FF"}}},{content:"\"from secrets import token_urlsafe; print(f'LANGFLOW_SECRET_KEY={token_urlsafe(32)}')\"",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n"]}),"\n"]})})]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Paste the value into your ",(0,s.jsx)(n.code,{children:".env"})," file:"]}),"\n",(0,s.jsx)(p.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"LANGFLOW_SECRET_KEY=dBuu...2kM2_fb",props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"langflow-new-user-is-active",children:"LANGFLOW_NEW_USER_IS_ACTIVE"}),"\n",(0,s.jsxs)(n.p,{children:["When ",(0,s.jsx)(n.code,{children:"LANGFLOW_NEW_USER_IS_ACTIVE=False"})," (default), a superuser must explicitly activate a new user's account before they can sign in to the visual editor.\nThe superuser can also deactivate a user's account as needed."]}),"\n",(0,s.jsxs)(n.p,{children:["When ",(0,s.jsx)(n.code,{children:"LANGFLOW_NEW_USER_IS_ACTIVE=True"}),", new user accounts are automatically activated."]}),"\n",(0,s.jsx)(p.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"LANGFLOW_NEW_USER_IS_ACTIVE=False",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsxs)(n.p,{children:["Only superusers can manage user accounts for a Langflow server, but user management only matters if your server has authentication enabled.\nFor more information, see ",(0,s.jsx)(n.a,{href:"#start-a-langflow-server-with-authentication-enabled",children:"Start a Langflow server with authentication enabled"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"start-a-langflow-server-with-authentication-enabled",children:"Start a Langflow server with authentication enabled"}),"\n",(0,s.jsxs)(n.p,{children:["This section shows you how to use the ",(0,s.jsx)(n.a,{href:"/api-keys-and-authentication#authentication-environment-variables",children:"authentication environment variables"})," to deploy a Langflow server with authentication enabled.\nThis involves disabling automatic login, setting superuser credentials, generating a secret encryption key, and enabling user management."]}),"\n",(0,s.jsx)(n.p,{children:"This configuration is recommended for any deployment where Langflow is exposed to a shared or public network, or where multiple users access the same Langflow server."}),"\n",(0,s.jsxs)(n.p,{children:["With authentication enabled, all users must sign in to the visual editor with valid credentials, and API requests require authentication with a Langflow API key.\nAdditionally, you must sign in as a superuser to manage users and ",(0,s.jsx)(n.a,{href:"#create-a-langflow-api-key",children:"create a Langflow API key"})," with superuser privileges."]}),"\n",(0,s.jsx)(n.h3,{id:"start-the-langflow-server",children:"Start the Langflow server"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Create a ",(0,s.jsx)(n.code,{children:".env"})," file with the following variables:"]}),"\n",(0,s.jsx)(p.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"LANGFLOW_AUTO_LOGIN=False",props:{}}]},{tokens:[{content:"LANGFLOW_SUPERUSER=",props:{}}]},{tokens:[{content:"LANGFLOW_SUPERUSER_PASSWORD=",props:{}}]},{tokens:[{content:"LANGFLOW_SECRET_KEY=",props:{}}]},{tokens:[{content:"LANGFLOW_NEW_USER_IS_ACTIVE=False",props:{}}]},{tokens:[{content:"LANGFLOW_ENABLE_SUPERUSER_CLI=False",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsxs)(n.p,{children:["Your ",(0,s.jsx)(n.code,{children:".env"})," file can have other environment variables.\nThis example focuses on authentication variables."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Set ",(0,s.jsx)(n.code,{children:"LANGFLOW_SUPERUSER"})," and ",(0,s.jsx)(n.code,{children:"LANGFLOW_SUPERUSER_PASSWORD"})," to your desired superuser credentials."]}),"\n",(0,s.jsxs)(n.p,{children:["For a one-time test, you can use basic credentials like ",(0,s.jsx)(n.code,{children:"administrator"})," and ",(0,s.jsx)(n.code,{children:"password"}),".\nStrong, securely-stored credentials are recommended in genuine development and production environments."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Recommended: Generate and set a ",(0,s.jsx)(n.code,{children:"LANGFLOW_SECRET_KEY"})," for encrypting sensitive data."]}),"\n",(0,s.jsx)(n.p,{children:"If you don't set a secret key, Langflow generates one automatically, but this isn't recommended for production environments."}),"\n",(0,s.jsxs)(n.p,{children:["For instructions on generating at setting a secret key, see ",(0,s.jsx)(n.a,{href:"#langflow-secret-key",children:(0,s.jsx)(n.code,{children:"LANGFLOW_SECRET_KEY"})}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Save your ",(0,s.jsx)(n.code,{children:".env"})," file with the populated variables. For example:"]}),"\n",(0,s.jsx)(p.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"LANGFLOW_AUTO_LOGIN=False",props:{}}]},{tokens:[{content:"LANGFLOW_SUPERUSER=administrator",props:{}}]},{tokens:[{content:"LANGFLOW_SUPERUSER_PASSWORD=securepassword",props:{}}]},{tokens:[{content:"LANGFLOW_SECRET_KEY=dBuu...2kM2_fb",props:{}}]},{tokens:[{content:"LANGFLOW_NEW_USER_IS_ACTIVE=False",props:{}}]},{tokens:[{content:"LANGFLOW_ENABLE_SUPERUSER_CLI=False",props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Start Langflow with the configuration from your ",(0,s.jsx)(n.code,{children:".env"})," file:"]}),"\n",(0,s.jsx)(p.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"uv run langflow run --env-file .env",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsxs)(n.p,{children:["Starting Langflow with a ",(0,s.jsx)(n.code,{children:".env"})," file automatically authenticates you as the superuser set in ",(0,s.jsx)(n.code,{children:"LANGFLOW_SUPERUSER"})," and ",(0,s.jsx)(n.code,{children:"LANGFLOW_SUPERUSER_PASSWORD"}),".\nIf you don't explicitly set these variables, the default values are ",(0,s.jsx)(n.code,{children:"langflow"})," and ",(0,s.jsx)(n.code,{children:"langflow"})," for system auto-login."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Verify the server is running. The default location is ",(0,s.jsx)(n.code,{children:"http://localhost:7860"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"Next, you can add users to your Langflow server to collaborate with others on flows."}),"\n",(0,s.jsx)(n.h3,{id:"manage-users-as-an-administrator",children:"Manage users as an administrator"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["To complete your first-time login as a superuser, go to ",(0,s.jsx)(n.code,{children:"http://localhost:7860/login"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["If you aren't using the default location, replace ",(0,s.jsx)(n.code,{children:"localhost:7860"})," with your server's address."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Log in with the superuser credentials you set in your ",(0,s.jsx)(n.code,{children:".env"})," (",(0,s.jsx)(n.code,{children:"LANGFLOW_SUPERUSER"})," and ",(0,s.jsx)(n.code,{children:"LANGFLOW_SUPERUSER_PASSWORD"}),")."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["To manage users on your server, navigate to ",(0,s.jsx)(n.code,{children:"/admin"}),", such as ",(0,s.jsx)(n.code,{children:"http://localhost:7860/admin"}),", click your profile icon, and then click ",(0,s.jsx)(n.strong,{children:"Admin Page"}),"."]}),"\n",(0,s.jsx)(n.p,{children:"As a superuser, you can add users, set permissions, reset passwords, and delete accounts."}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["To add a user, click ",(0,s.jsx)(n.strong,{children:"New User"}),", and then complete the user account form:"]}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Enter a username and password."}),"\n",(0,s.jsxs)(n.li,{children:["To activate the account immediately, select ",(0,s.jsx)(n.strong,{children:"Active"}),". Inactive users cannot sign in or access flows they created before becoming inactive."]}),"\n",(0,s.jsxs)(n.li,{children:["Deselect ",(0,s.jsx)(n.strong,{children:"Superuser"})," if you don't want the user to have full administrative privileges."]}),"\n",(0,s.jsxs)(n.li,{children:["Click ",(0,s.jsx)(n.strong,{children:"Save"}),". The new user appears in the ",(0,s.jsx)(n.strong,{children:"Admin Page"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"To test the new user's access, sign out of Langflow, and then sign in with the new user's credentials."}),"\n",(0,s.jsxs)(n.p,{children:["Try to access the ",(0,s.jsx)(n.code,{children:"/admin"})," page.\nYou are redirected to the ",(0,s.jsx)(n.code,{children:"/flows"})," page if the new user isn't a superuser."]}),"\n"]}),"\n"]})]})}function x(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(y,{...e})}):y(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.")}},11470:(e,n,t)=>{t.d(n,{A:()=>L});var o=t(96540),s=t(18215),r=t(23104),a=t(56347),i=t(205),l=t(57485),c=t(31682),d=t(70679);function h(e){return o.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,o.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,o.useMemo)(()=>{const e=n??function(e){return h(e).map(({props:{value:e,label:n,attributes:t,default:o}})=>({value:e,label:n,attributes:t,default:o}))}(t);return function(e){const n=(0,c.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 p({value:e,tabValues:n}){return n.some(n=>n.value===e)}function f({queryString:e=!1,groupId:n}){const t=(0,a.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,l.aZ)(s),(0,o.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 g(e){const{defaultValue:n,queryString:t=!1,groupId:s}=e,r=u(e),[a,l]=(0,o.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(!p({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:r})),[c,h]=f({queryString:t,groupId:s}),[g,y]=function({groupId:e}){const n=function(e){return e?`docusaurus.tab.${e}`:null}(e),[t,s]=(0,d.Dv)(n);return[t,(0,o.useCallback)(e=>{n&&s.set(e)},[n,s])]}({groupId:s}),x=(()=>{const e=c??g;return p({value:e,tabValues:r})?e:null})();(0,i.A)(()=>{x&&l(x)},[x]);return{selectedValue:a,selectValue:(0,o.useCallback)(e=>{if(!p({value:e,tabValues:r}))throw new Error(`Can't select invalid tab value=${e}`);l(e),h(e),y(e)},[h,y,r]),tabValues:r}}var y=t(92303);const x={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var m=t(74848);function v({className:e,block:n,selectedValue:t,selectValue:o,tabValues:a}){const i=[],{blockElementScrollPositionUntilNextRender:l}=(0,r.a_)(),c=e=>{const n=e.currentTarget,s=i.indexOf(n),r=a[s].value;r!==t&&(l(n),o(r))},d=e=>{let n=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const t=i.indexOf(e.currentTarget)+1;n=i[t]??i[0];break}case"ArrowLeft":{const t=i.indexOf(e.currentTarget)-1;n=i[t]??i[i.length-1];break}}n?.focus()};return(0,m.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":n},e),children:a.map(({value:e,label:n,attributes:o})=>(0,m.jsx)("li",{role:"tab",tabIndex:t===e?0:-1,"aria-selected":t===e,ref:e=>{i.push(e)},onKeyDown:d,onClick:c,...o,className:(0,s.A)("tabs__item",x.tabItem,o?.className,{"tabs__item--active":t===e}),children:n??e},e))})}function j({lazy:e,children:n,selectedValue:t}){const r=(Array.isArray(n)?n:[n]).filter(Boolean);if(e){const e=r.find(e=>e.props.value===t);return e?(0,o.cloneElement)(e,{className:(0,s.A)("margin-top--md",e.props.className)}):null}return(0,m.jsx)("div",{className:"margin-top--md",children:r.map((e,n)=>(0,o.cloneElement)(e,{key:n,hidden:e.props.value!==t}))})}function w(e){const n=g(e);return(0,m.jsxs)("div",{className:(0,s.A)("tabs-container",x.tabList),children:[(0,m.jsx)(v,{...n,...e}),(0,m.jsx)(j,{...n,...e})]})}function L(e){const n=(0,y.A)();return(0,m.jsx)(w,{...e,children:h(e.children)},String(n))}},17886:(e,n,t)=>{t.d(n,{A:()=>r});t(96540);var o=t(64058),s=t(74848);function r({name:e,...n}){const t=o[e];return t?(0,s.jsx)(t,{...n}):null}},19365:(e,n,t)=>{t.d(n,{A:()=>a});t(96540);var o=t(18215);const s={tabItem:"tabItem_Ymn6"};var r=t(74848);function a({children:e,hidden:n,className:t}){return(0,r.jsx)("div",{role:"tabpanel",className:(0,o.A)(s.tabItem,t),hidden:n,children:e})}}}]); \ No newline at end of file diff --git a/assets/js/3b25a2ae.8d5d1da2.js b/assets/js/3b25a2ae.8d5d1da2.js deleted file mode 100644 index b80e12d0a5..0000000000 --- a/assets/js/3b25a2ae.8d5d1da2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[9640],{11470:(o,t,e)=>{e.d(t,{A:()=>m});var s=e(96540),n=e(18215),r=e(23104),l=e(56347),c=e(205),p=e(57485),a=e(31682),i=e(70679);function y(o){return s.Children.toArray(o).filter(o=>"\n"!==o).map(o=>{if(!o||(0,s.isValidElement)(o)&&function(o){const{props:t}=o;return!!t&&"object"==typeof t&&"value"in t}(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 D(o){const{values:t,children:e}=o;return(0,s.useMemo)(()=>{const o=t??function(o){return y(o).map(({props:{value:o,label:t,attributes:e,default:s}})=>({value:o,label:t,attributes:e,default:s}))}(e);return function(o){const t=(0,a.XI)(o,(o,t)=>o.value===t.value);if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map(o=>o.value).join(", ")}" found in . Every value needs to be unique.`)}(o),o},[t,e])}function u({value:o,tabValues:t}){return t.some(t=>t.value===o)}function d({queryString:o=!1,groupId:t}){const e=(0,l.W6)(),n=function({queryString:o=!1,groupId:t}){if("string"==typeof o)return o;if(!1===o)return null;if(!0===o&&!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:o,groupId:t});return[(0,p.aZ)(n),(0,s.useCallback)(o=>{if(!n)return;const t=new URLSearchParams(e.location.search);t.set(n,o),e.replace({...e.location,search:t.toString()})},[n,e])]}function F(o){const{defaultValue:t,queryString:e=!1,groupId:n}=o,r=D(o),[l,p]=(0,s.useState)(()=>function({defaultValue:o,tabValues:t}){if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(o){if(!u({value:o,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${o}" but none of its children has the corresponding value. Available values are: ${t.map(o=>o.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return o}const e=t.find(o=>o.default)??t[0];if(!e)throw new Error("Unexpected error: 0 tabValues");return e.value}({defaultValue:t,tabValues:r})),[a,y]=d({queryString:e,groupId:n}),[F,C]=function({groupId:o}){const t=function(o){return o?`docusaurus.tab.${o}`:null}(o),[e,n]=(0,i.Dv)(t);return[e,(0,s.useCallback)(o=>{t&&n.set(o)},[t,n])]}({groupId:n}),h=(()=>{const o=a??F;return u({value:o,tabValues:r})?o:null})();(0,c.A)(()=>{h&&p(h)},[h]);return{selectedValue:l,selectValue:(0,s.useCallback)(o=>{if(!u({value:o,tabValues:r}))throw new Error(`Can't select invalid tab value=${o}`);p(o),y(o),C(o)},[y,C,r]),tabValues:r}}var C=e(92303);const h={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var k=e(74848);function E({className:o,block:t,selectedValue:e,selectValue:s,tabValues:l}){const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,r.a_)(),a=o=>{const t=o.currentTarget,n=c.indexOf(t),r=l[n].value;r!==e&&(p(t),s(r))},i=o=>{let t=null;switch(o.key){case"Enter":a(o);break;case"ArrowRight":{const e=c.indexOf(o.currentTarget)+1;t=c[e]??c[0];break}case"ArrowLeft":{const e=c.indexOf(o.currentTarget)-1;t=c[e]??c[c.length-1];break}}t?.focus()};return(0,k.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,n.A)("tabs",{"tabs--block":t},o),children:l.map(({value:o,label:t,attributes:s})=>(0,k.jsx)("li",{role:"tab",tabIndex:e===o?0:-1,"aria-selected":e===o,ref:o=>{c.push(o)},onKeyDown:i,onClick:a,...s,className:(0,n.A)("tabs__item",h.tabItem,s?.className,{"tabs__item--active":e===o}),children:t??o},o))})}function f({lazy:o,children:t,selectedValue:e}){const r=(Array.isArray(t)?t:[t]).filter(Boolean);if(o){const o=r.find(o=>o.props.value===e);return o?(0,s.cloneElement)(o,{className:(0,n.A)("margin-top--md",o.props.className)}):null}return(0,k.jsx)("div",{className:"margin-top--md",children:r.map((o,t)=>(0,s.cloneElement)(o,{key:t,hidden:o.props.value!==e}))})}function g(o){const t=F(o);return(0,k.jsxs)("div",{className:(0,n.A)("tabs-container",h.tabList),children:[(0,k.jsx)(E,{...t,...o}),(0,k.jsx)(f,{...t,...o})]})}function m(o){const t=(0,C.A)();return(0,k.jsx)(g,{...o,children:y(o.children)},String(t))}},19365:(o,t,e)=>{e.d(t,{A:()=>l});e(96540);var s=e(18215);const n={tabItem:"tabItem_Ymn6"};var r=e(74848);function l({children:o,hidden:t,className:e}){return(0,r.jsx)("div",{role:"tabpanel",className:(0,s.A)(n.tabItem,e),hidden:t,children:o})}},28453:(o,t,e)=>{e.d(t,{R:()=>l,x:()=>c});var s=e(96540);const n={},r=s.createContext(n);function l(o){const t=s.useContext(r);return s.useMemo(function(){return"function"==typeof o?o(t):{...t,...o}},[t,o])}function c(o){let t;return t=o.disableParentContext?"function"==typeof o.components?o.components(n):o.components||n:l(o.components),s.createElement(r.Provider,{value:t},o.children)}},65061:(o,t,e)=>{e.r(t),e.d(t,{CH:()=>i,assets:()=>a,chCodeConfig:()=>y,contentTitle:()=>p,default:()=>d,frontMatter:()=>c,metadata:()=>s,toc:()=>D});const s=JSON.parse('{"id":"API-Reference/api-users","title":"Users endpoints","description":"Use the /users endpoint to manage user accounts in Langflow.","source":"@site/docs/API-Reference/api-users.mdx","sourceDirName":"API-Reference","slug":"/api-users","permalink":"/api-users","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Users endpoints","slug":"/api-users"},"sidebar":"docs","previous":{"title":"Build endpoints","permalink":"/api-build"},"next":{"title":"Join the Langflow community","permalink":"/contributing-community"}}');var n=e(74848),r=e(28453),l=e(24754);e(11470),e(19365);const c={title:"Users endpoints",slug:"/api-users"},p=void 0,a={},i={annotations:l.hk,Code:l.Cy},y={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},D=[{value:"Add user",id:"add-user",level:2},{value:"Get current user",id:"get-current-user",level:2},{value:"List all users",id:"list-all-users",level:2},{value:"Update user",id:"update-user",level:2},{value:"Reset password",id:"reset-password",level:2},{value:"Delete user",id:"delete-user",level:2}];function u(o){const t={code:"code",h2:"h2",p:"p",...(0,r.R)(),...o.components},{Details:e}=t;return i||F("CH",!1),i.Code||F("CH.Code",!0),e||F("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.jsxs)(t.p,{children:["Use the ",(0,n.jsx)(t.code,{children:"/users"})," endpoint to manage user accounts in Langflow."]}),"\n",(0,n.jsx)(t.h2,{id:"add-user",children:"Add user"}),"\n",(0,n.jsx)(t.p,{children:"Create a new user account with a given username and password."}),"\n",(0,n.jsx)(t.p,{children:"Requires authentication as a superuser if the Langflow server has authentication enabled."}),"\n",(0,n.jsx)(i.Code,{codeConfig:y,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/users/" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "username": "newuser2",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "password": "securepassword123"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,n.jsxs)(t.p,{children:["The request returns an object describing the new user.\nThe user's UUID is stored in ",(0,n.jsx)(t.code,{children:"user_id"})," in the Langflow database, and returned as ",(0,n.jsx)(t.code,{children:"id"})," in the ",(0,n.jsx)(t.code,{children:"/users"})," API response.\nThis ",(0,n.jsx)(t.code,{children:"user_id"})," key is specifically for Langflow user management."]}),"\n",(0,n.jsxs)(e,{children:[(0,n.jsx)("summary",{children:"Result"}),(0,n.jsx)(i.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"10c1c6a2-ab8a-4748-8700-0e4832fd5ce8"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "username"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"newuser2"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "profile_image"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "store_api_key"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "is_active"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "is_superuser"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "create_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-29T16:02:20.132436"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "updated_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-29T16:02:20.132442"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "last_login_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "optins"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "github_starred"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "dialog_dismissed"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "discord_clicked"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,n.jsx)(t.h2,{id:"get-current-user",children:"Get current user"}),"\n",(0,n.jsx)(t.p,{children:"Retrieve information about the authenticated user."}),"\n",(0,n.jsx)(i.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/users/whoami" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,n.jsxs)(e,{children:[(0,n.jsx)("summary",{children:"Result"}),(0,n.jsx)(i.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"07e5b864-e367-4f52-b647-a48035ae7e5e"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "username"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"langflow"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "profile_image"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "store_api_key"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "is_active"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "is_superuser"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "create_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-08T17:59:07.855965"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "updated_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-29T15:06:56.157860"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "last_login_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-29T15:06:56.157016"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,n.jsx)(t.h2,{id:"list-all-users",children:"List all users"}),"\n",(0,n.jsx)(t.p,{children:"Get a paginated list of all users in the system."}),"\n",(0,n.jsx)(t.p,{children:"Requires authentication as a superuser if the Langflow server has authentication enabled."}),"\n",(0,n.jsx)(i.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/users/?skip=0&limit=10" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,n.jsxs)(e,{children:[(0,n.jsx)("summary",{children:"Result"}),(0,n.jsx)(i.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "total_count"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"3",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "users"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"07e5b864-e367-4f52-b647-a48035ae7e5e"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "username"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"langflow"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "profile_image"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "store_api_key"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "is_active"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "is_superuser"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "create_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-08T17:59:07.855965"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "updated_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-29T15:06:56.157860"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "last_login_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-29T15:06:56.157016"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "optins"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "github_starred"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "dialog_dismissed"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "discord_clicked"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "mcp_dialog_dismissed"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"c48a1f68-cc7e-491a-a507-a1a627708470"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "username"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"newuser"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "profile_image"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "store_api_key"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "is_active"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "is_superuser"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "create_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-29T16:00:33.483386"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "updated_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-29T16:00:33.483392"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "last_login_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "optins"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "github_starred"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "dialog_dismissed"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "discord_clicked"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"10c1c6a2-ab8a-4748-8700-0e4832fd5ce8"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "username"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"newuser2"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "profile_image"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "store_api_key"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "is_active"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "is_superuser"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "create_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-29T16:02:20.132436"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "updated_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-29T16:02:20.132442"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "last_login_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "optins"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "github_starred"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "dialog_dismissed"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "discord_clicked"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}}]},{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:"json"},annotations:[]}]})]}),"\n",(0,n.jsx)(t.h2,{id:"update-user",children:"Update user"}),"\n",(0,n.jsx)(t.p,{children:"Modify an existing user's information with a PATCH request."}),"\n",(0,n.jsx)(t.p,{children:"Requires authentication as a superuser if the Langflow server has authentication enabled."}),"\n",(0,n.jsx)(t.p,{children:"This example activates the specified user's account and makes them a superuser:"}),"\n",(0,n.jsx)(i.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"PATCH ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/users/10c1c6a2-ab8a-4748-8700-0e4832fd5ce8" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "is_active": true,',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "is_superuser": true',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,n.jsxs)(e,{children:[(0,n.jsx)("summary",{children:"Result"}),(0,n.jsx)(i.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"10c1c6a2-ab8a-4748-8700-0e4832fd5ce8"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "username"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"newuser2"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "profile_image"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "store_api_key"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "is_active"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "is_superuser"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "create_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-29T16:02:20.132436"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "updated_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-29T16:19:03.514527Z"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "last_login_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "optins"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "github_starred"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "dialog_dismissed"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "discord_clicked"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,n.jsx)(t.h2,{id:"reset-password",children:"Reset password"}),"\n",(0,n.jsx)(t.p,{children:"Change the specified user's password to a new secure value."}),"\n",(0,n.jsx)(t.p,{children:"Requires authentication as the target user."}),"\n",(0,n.jsx)(i.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"PATCH ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/users/10c1c6a2-ab8a-4748-8700-0e4832fd5ce8/reset-password" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "password": "newsecurepassword123"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,n.jsxs)(e,{children:[(0,n.jsx)("summary",{children:"Result"}),(0,n.jsx)(i.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"10c1c6a2-ab8a-4748-8700-0e4832fd5ce8"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "username"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"langflow"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "profile_image"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "store_api_key"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "is_active"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "is_superuser"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "create_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-08T17:59:07.855965"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "updated_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-29T15:06:56.157860"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "last_login_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-29T15:06:56.157016"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "optins"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "github_starred"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "dialog_dismissed"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "discord_clicked"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,n.jsx)(t.h2,{id:"delete-user",children:"Delete user"}),"\n",(0,n.jsx)(t.p,{children:"Remove a user account from the system."}),"\n",(0,n.jsx)(t.p,{children:"Requires authentication as a superuser if the Langflow server has authentication enabled."}),"\n",(0,n.jsx)(i.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"DELETE ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/users/10c1c6a2-ab8a-4748-8700-0e4832fd5ce8" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,n.jsxs)(e,{children:[(0,n.jsx)("summary",{children:"Result"}),(0,n.jsx)(i.Code,{codeConfig:y,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "detail"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"User deleted"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]})]})}function d(o={}){const{wrapper:t}={...(0,r.R)(),...o.components};return t?(0,n.jsx)(t,{...o,children:(0,n.jsx)(u,{...o})}):u(o)}function F(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/3b25a2ae.b4e56f6c.js b/assets/js/3b25a2ae.b4e56f6c.js new file mode 100644 index 0000000000..f8dc3f4253 --- /dev/null +++ b/assets/js/3b25a2ae.b4e56f6c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[9640],{28453:(o,t,e)=>{e.d(t,{R:()=>c,x:()=>l});var s=e(96540);const n={},r=s.createContext(n);function c(o){const t=s.useContext(r);return s.useMemo(function(){return"function"==typeof o?o(t):{...t,...o}},[t,o])}function l(o){let t;return t=o.disableParentContext?"function"==typeof o.components?o.components(n):o.components||n:c(o.components),s.createElement(r.Provider,{value:t},o.children)}},65061:(o,t,e)=>{e.r(t),e.d(t,{CH:()=>D,assets:()=>y,chCodeConfig:()=>a,contentTitle:()=>p,default:()=>C,frontMatter:()=>l,metadata:()=>s,toc:()=>i});const s=JSON.parse('{"id":"API-Reference/api-users","title":"Users endpoints","description":"Use the /users endpoint to manage user accounts in Langflow.","source":"@site/docs/API-Reference/api-users.mdx","sourceDirName":"API-Reference","slug":"/api-users","permalink":"/api-users","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Users endpoints","slug":"/api-users"},"sidebar":"docs","previous":{"title":"Build endpoints","permalink":"/api-build"},"next":{"title":"Join the Langflow community","permalink":"/contributing-community"}}');var n=e(74848),r=e(28453),c=e(24754);const l={title:"Users endpoints",slug:"/api-users"},p=void 0,y={},D={annotations:c.hk,Code:c.Cy},a={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},i=[{value:"Add user",id:"add-user",level:2},{value:"Get current user",id:"get-current-user",level:2},{value:"List all users",id:"list-all-users",level:2},{value:"Update user",id:"update-user",level:2},{value:"Reset password",id:"reset-password",level:2},{value:"Delete user",id:"delete-user",level:2}];function F(o){const t={code:"code",h2:"h2",p:"p",...(0,r.R)(),...o.components},{Details:e}=t;return D||d("CH",!1),D.Code||d("CH.Code",!0),e||d("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",(0,n.jsxs)(t.p,{children:["Use the ",(0,n.jsx)(t.code,{children:"/users"})," endpoint to manage user accounts in Langflow."]}),"\n",(0,n.jsx)(t.h2,{id:"add-user",children:"Add user"}),"\n",(0,n.jsx)(t.p,{children:"Create a new user account with a given username and password."}),"\n",(0,n.jsx)(t.p,{children:"Requires authentication as a superuser if the Langflow server has authentication enabled."}),"\n",(0,n.jsx)(D.Code,{codeConfig:a,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/users/" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "username": "newuser2",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "password": "securepassword123"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,n.jsxs)(t.p,{children:["The request returns an object describing the new user.\nThe user's UUID is stored in ",(0,n.jsx)(t.code,{children:"user_id"})," in the Langflow database, and returned as ",(0,n.jsx)(t.code,{children:"id"})," in the ",(0,n.jsx)(t.code,{children:"/users"})," API response.\nThis ",(0,n.jsx)(t.code,{children:"user_id"})," key is specifically for Langflow user management."]}),"\n",(0,n.jsxs)(e,{children:[(0,n.jsx)("summary",{children:"Result"}),(0,n.jsx)(D.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"10c1c6a2-ab8a-4748-8700-0e4832fd5ce8"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "username"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"newuser2"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "profile_image"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "store_api_key"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "is_active"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "is_superuser"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "create_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-29T16:02:20.132436"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "updated_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-29T16:02:20.132442"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "last_login_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "optins"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "github_starred"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "dialog_dismissed"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "discord_clicked"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,n.jsx)(t.h2,{id:"get-current-user",children:"Get current user"}),"\n",(0,n.jsx)(t.p,{children:"Retrieve information about the authenticated user."}),"\n",(0,n.jsx)(D.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/users/whoami" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,n.jsxs)(e,{children:[(0,n.jsx)("summary",{children:"Result"}),(0,n.jsx)(D.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"07e5b864-e367-4f52-b647-a48035ae7e5e"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "username"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"langflow"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "profile_image"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "store_api_key"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "is_active"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "is_superuser"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "create_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-08T17:59:07.855965"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "updated_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-29T15:06:56.157860"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "last_login_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-29T15:06:56.157016"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,n.jsx)(t.h2,{id:"list-all-users",children:"List all users"}),"\n",(0,n.jsx)(t.p,{children:"Get a paginated list of all users in the system."}),"\n",(0,n.jsx)(t.p,{children:"Requires authentication as a superuser if the Langflow server has authentication enabled."}),"\n",(0,n.jsx)(D.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/users/?skip=0&limit=10" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,n.jsxs)(e,{children:[(0,n.jsx)("summary",{children:"Result"}),(0,n.jsx)(D.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "total_count"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"3",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "users"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"07e5b864-e367-4f52-b647-a48035ae7e5e"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "username"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"langflow"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "profile_image"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "store_api_key"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "is_active"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "is_superuser"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "create_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-08T17:59:07.855965"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "updated_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-29T15:06:56.157860"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "last_login_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-29T15:06:56.157016"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "optins"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "github_starred"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "dialog_dismissed"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "discord_clicked"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "mcp_dialog_dismissed"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"c48a1f68-cc7e-491a-a507-a1a627708470"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "username"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"newuser"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "profile_image"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "store_api_key"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "is_active"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "is_superuser"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "create_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-29T16:00:33.483386"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "updated_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-29T16:00:33.483392"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "last_login_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "optins"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "github_starred"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "dialog_dismissed"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "discord_clicked"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"10c1c6a2-ab8a-4748-8700-0e4832fd5ce8"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "username"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"newuser2"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "profile_image"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "store_api_key"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "is_active"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "is_superuser"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "create_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-29T16:02:20.132436"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "updated_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-29T16:02:20.132442"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "last_login_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "optins"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "github_starred"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "dialog_dismissed"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "discord_clicked"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}}]},{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:"json"},annotations:[]}]})]}),"\n",(0,n.jsx)(t.h2,{id:"update-user",children:"Update user"}),"\n",(0,n.jsx)(t.p,{children:"Modify an existing user's information with a PATCH request."}),"\n",(0,n.jsx)(t.p,{children:"Requires authentication as a superuser if the Langflow server has authentication enabled."}),"\n",(0,n.jsx)(t.p,{children:"This example activates the specified user's account and makes them a superuser:"}),"\n",(0,n.jsx)(D.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"PATCH ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/users/10c1c6a2-ab8a-4748-8700-0e4832fd5ce8" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "is_active": true,',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "is_superuser": true',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,n.jsxs)(e,{children:[(0,n.jsx)("summary",{children:"Result"}),(0,n.jsx)(D.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"10c1c6a2-ab8a-4748-8700-0e4832fd5ce8"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "username"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"newuser2"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "profile_image"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "store_api_key"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "is_active"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "is_superuser"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "create_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-29T16:02:20.132436"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "updated_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-29T16:19:03.514527Z"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "last_login_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "optins"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "github_starred"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "dialog_dismissed"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "discord_clicked"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,n.jsx)(t.h2,{id:"reset-password",children:"Reset password"}),"\n",(0,n.jsx)(t.p,{children:"Change the specified user's password to a new secure value."}),"\n",(0,n.jsx)(t.p,{children:"Requires authentication as the target user."}),"\n",(0,n.jsx)(D.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"PATCH ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/users/10c1c6a2-ab8a-4748-8700-0e4832fd5ce8/reset-password" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "password": "newsecurepassword123"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,n.jsxs)(e,{children:[(0,n.jsx)("summary",{children:"Result"}),(0,n.jsx)(D.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"10c1c6a2-ab8a-4748-8700-0e4832fd5ce8"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "username"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"langflow"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "profile_image"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "store_api_key"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "is_active"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "is_superuser"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "create_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-08T17:59:07.855965"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "updated_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-29T15:06:56.157860"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "last_login_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-05-29T15:06:56.157016"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "optins"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "github_starred"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "dialog_dismissed"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "discord_clicked"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,n.jsx)(t.h2,{id:"delete-user",children:"Delete user"}),"\n",(0,n.jsx)(t.p,{children:"Remove a user account from the system."}),"\n",(0,n.jsx)(t.p,{children:"Requires authentication as a superuser if the Langflow server has authentication enabled."}),"\n",(0,n.jsx)(D.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"DELETE ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/users/10c1c6a2-ab8a-4748-8700-0e4832fd5ce8" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,n.jsxs)(e,{children:[(0,n.jsx)("summary",{children:"Result"}),(0,n.jsx)(D.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "detail"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"User deleted"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]})]})}function C(o={}){const{wrapper:t}={...(0,r.R)(),...o.components};return t?(0,n.jsx)(t,{...o,children:(0,n.jsx)(F,{...o})}):F(o)}function d(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/41d45d82.5a4c1534.js b/assets/js/41d45d82.5a4c1534.js deleted file mode 100644 index 3cd9997f06..0000000000 --- a/assets/js/41d45d82.5a4c1534.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[1303],{28453:(o,t,e)=>{e.d(t,{R:()=>c,x:()=>l});var n=e(96540);const r={},s=n.createContext(r);function c(o){const t=n.useContext(s);return n.useMemo(function(){return"function"==typeof o?o(t):{...t,...o}},[t,o])}function l(o){let t;return t=o.disableParentContext?"function"==typeof o.components?o.components(r):o.components||r:c(o.components),n.createElement(s.Provider,{value:t},o.children)}},61787:(o,t,e)=>{e.r(t),e.d(t,{CH:()=>i,assets:()=>d,chCodeConfig:()=>a,contentTitle:()=>p,default:()=>F,frontMatter:()=>l,metadata:()=>n,toc:()=>h});const n=JSON.parse('{"id":"Contributing/contributing-bundles","title":"Contribute bundles","description":"Bundles are groups of components that are related to a specific service provider.","source":"@site/docs/Contributing/contributing-bundles.mdx","sourceDirName":"Contributing","slug":"/contributing-bundles","permalink":"/contributing-bundles","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Contribute bundles","slug":"/contributing-bundles"},"sidebar":"docs","previous":{"title":"Contribute templates","permalink":"/contributing-templates"},"next":{"title":"Release notes","permalink":"/release-notes"}}');var r=e(74848),s=e(28453),c=e(24754);const l={title:"Contribute bundles",slug:"/contributing-bundles"},p=void 0,d={},i={annotations:c.hk,Code:c.Cy},a={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},h=[{value:"Add the bundle to the backend folder",id:"add-the-bundle-to-the-backend-folder",level:2},{value:"Add the bundle to the frontend folder",id:"add-the-bundle-to-the-frontend-folder",level:2},{value:"Update bundle components with icons",id:"update-bundle-components-with-icons",level:2},{value:"Ensure the application builds your component bundle",id:"ensure-the-application-builds-your-component-bundle",level:2}];function y(o){const t={a:"a",admonition:"admonition",br:"br",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...o.components};return i||D("CH",!1),i.Code||D("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.p,{children:"Bundles are groups of components that are related to a specific service provider."}),"\n",(0,r.jsxs)(t.p,{children:["Follow these steps to add components to the ",(0,r.jsx)(t.strong,{children:"Bundles"})," section of the ",(0,r.jsx)(t.strong,{children:"Components"})," menu in the Langflow visual editor."]}),"\n",(0,r.jsxs)(t.p,{children:["Example adds a new bundle named ",(0,r.jsx)(t.code,{children:"DarthVader"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"add-the-bundle-to-the-backend-folder",children:"Add the bundle to the backend folder"}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Navigate to the backend directory in the Langflow repository and create a new folder for your bundle.\nThe path for your new component is ",(0,r.jsx)(t.code,{children:"src > backend > base > langflow > components > darth_vader"}),".\nYou can view the ",(0,r.jsx)(t.a,{href:"https://github.com/langflow-ai/langflow/tree/main/src/backend/base/langflow/components",children:"components folder"})," in the Langflow repository."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Within the newly created ",(0,r.jsx)(t.code,{children:"darth_vader"})," folder, add the following files:"]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"darth_vader_component.py"})," \u2014 This file contains the backend logic for the new bundle. Create multiple ",(0,r.jsx)(t.code,{children:".py"})," files for multiple components."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"__init__.py"})," \u2014 This file initializes the bundle components. You can use any existing ",(0,r.jsx)(t.code,{children:"__init__.py"})," as an example to see how it should be structured."]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["For an example of adding multiple components in a bundle, see the ",(0,r.jsx)(t.a,{href:"https://github.com/langflow-ai/langflow/tree/main/src/backend/base/langflow/components/Notion",children:"Notion"})," bundle."]}),"\n",(0,r.jsx)(t.h2,{id:"add-the-bundle-to-the-frontend-folder",children:"Add the bundle to the frontend folder"}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Navigate to the frontend directory in the Langflow repository to add your bundle's icon.\nThe path for your new component icon is ",(0,r.jsx)(t.code,{children:"src > frontend > src > icons > DarthVader"}),"\nYou can view the ",(0,r.jsx)(t.a,{href:"https://github.com/langflow-ai/langflow/tree/main/src/frontend/src/icons",children:"icons folder"})," in the Langflow repository.\nTo add your icon, create ",(0,r.jsx)(t.strong,{children:"three"})," files inside the ",(0,r.jsx)(t.code,{children:"icons/darth_vader"})," folder."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["In the ",(0,r.jsx)(t.code,{children:"icons/darth_vader"})," folder, add the raw SVG file of your icon, such as ",(0,r.jsx)(t.code,{children:"darth_vader-icon.svg"}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsx)(t.p,{children:"To convert the SVG file to JSX format, you can use an online tool like SVG to JSX.\nIt's highly recommended to use the original, lighter version of the SVG."})}),"\n",(0,r.jsxs)(t.ol,{start:"3",children:["\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.code,{children:"icons/darth_vader"})," folder, add the icon as a React component in JSX format, such as ",(0,r.jsx)(t.code,{children:"DarthVaderIcon.jsx"}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Update the JSX file to include the correct component name and structure.\nEnsure you include the ",(0,r.jsx)(t.code,{children:"{...props}"})," spread operator in your JSX file.\nFor example, here is ",(0,r.jsx)(t.code,{children:"DarthVaderIcon.jsx"}),":"]}),"\n"]}),"\n",(0,r.jsx)(i.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"const ",props:{style:{color:"#FF7B72"}}},{content:"DarthVaderIcon ",props:{style:{color:"#D2A8FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" (",props:{style:{color:"#C9D1D9"}}},{content:"props",props:{style:{color:"#FFA657"}}},{content:") ",props:{style:{color:"#C9D1D9"}}},{content:"=>",props:{style:{color:"#FF7B72"}}},{content:" (",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" <",props:{style:{color:"#C9D1D9"}}},{content:"svg",props:{style:{color:"#7EE787"}}}]},{tokens:[{content:" xmlns",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"http://www.w3.org/2000/svg"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" width",props:{style:{color:"#79C0FF"}}},{content:"={",props:{style:{color:"#FF7B72"}}},{content:"24",props:{style:{color:"#79C0FF"}}},{content:"}",props:{style:{color:"#FF7B72"}}}]},{tokens:[{content:" height",props:{style:{color:"#79C0FF"}}},{content:"={",props:{style:{color:"#FF7B72"}}},{content:"24",props:{style:{color:"#79C0FF"}}},{content:"}",props:{style:{color:"#FF7B72"}}}]},{tokens:[{content:" viewBox",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"0 0 32 32"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" fill",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"none"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" style",props:{style:{color:"#79C0FF"}}},{content:"={",props:{style:{color:"#FF7B72"}}},{content:"{ backgroundColor: ",props:{style:{color:"#C9D1D9"}}},{content:'"#9100ff"',props:{style:{color:"#A5D6FF"}}},{content:", borderRadius: ",props:{style:{color:"#C9D1D9"}}},{content:'"6px"',props:{style:{color:"#A5D6FF"}}},{content:" }",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#FF7B72"}}}]},{tokens:[{content:" {...",props:{style:{color:"#FF7B72"}}},{content:"props",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#FF7B72"}}}]},{tokens:[{content:" >",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" <",props:{style:{color:"#C9D1D9"}}},{content:"g ",props:{style:{color:"#7EE787"}}},{content:"transform",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"translate(7, 7)"',props:{style:{color:"#A5D6FF"}}},{content:">",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" <",props:{style:{color:"#C9D1D9"}}},{content:"path",props:{style:{color:"#7EE787"}}}]},{tokens:[{content:" fillRule",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"evenodd"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" clipRule",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"evenodd"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" d",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"M6.27406 0.685082C8.46664 -0.228361 10.9302 -0.228361 13.1229 0.685082C14.6773 1.33267 16.0054 2.40178 16.9702 3.75502C17.6126 4.65574 17.0835 5.84489 16.045 6.21613L13.5108 7.12189C12.9962 7.30585 12.4289 7.26812 11.9429 7.01756C11.8253 6.95701 11.7298 6.86089 11.6696 6.74266L10.2591 3.97469C10.0249 3.51519 9.37195 3.51519 9.13783 3.97469L7.72731 6.74274C7.66714 6.86089 7.57155 6.95701 7.454 7.01756L4.70187 8.43618C4.24501 8.67169 4.24501 9.3284 4.70187 9.56391L7.454 10.9825C7.57155 11.0431 7.66714 11.1392 7.72731 11.2574L9.13783 14.0254C9.37195 14.4849 10.0249 14.4849 10.2591 14.0254L11.6696 11.2574C11.7298 11.1392 11.8253 11.0431 11.9428 10.9825C12.429 10.7319 12.9965 10.6942 13.5112 10.8781L16.045 11.7838C17.0835 12.1551 17.6126 13.3442 16.9704 14.245C16.0054 15.5982"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" fill",props:{style:{color:"#79C0FF"}}},{content:"={",props:{style:{color:"#FF7B72"}}},{content:"props.isdark ",props:{style:{color:"#C9D1D9"}}},{content:"=== ",props:{style:{color:"#FF7B72"}}},{content:'"true" ',props:{style:{color:"#A5D6FF"}}},{content:"? ",props:{style:{color:"#FF7B72"}}},{content:'"white" ',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#FF7B72"}}},{content:'"black"',props:{style:{color:"#A5D6FF"}}},{content:"}",props:{style:{color:"#FF7B72"}}}]},{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:"export default ",props:{style:{color:"#FF7B72"}}},{content:"DarthVaderIcon;",props:{style:{color:"#C9D1D9"}}}]}],lang:"javascript"},annotations:[]}]}),"\n",(0,r.jsxs)(t.ol,{start:"5",children:["\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.code,{children:"icons/darth_vader"})," folder, add the React component itself in TypeScript format, such as ",(0,r.jsx)(t.code,{children:"index.tsx"}),".\nEnsure the icon\u2019s React component name corresponds to the JSX component you just created, such as ",(0,r.jsx)(t.code,{children:"DarthVaderIcon"}),"."]}),"\n"]}),"\n",(0,r.jsx)(i.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" { useDarkStore } ",props:{style:{color:"#C9D1D9"}}},{content:"from ",props:{style:{color:"#FF7B72"}}},{content:'"@/stores/darkStore"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" React, { forwardRef } ",props:{style:{color:"#C9D1D9"}}},{content:"from ",props:{style:{color:"#FF7B72"}}},{content:'"react"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" DarthVaderIconSVG ",props:{style:{color:"#C9D1D9"}}},{content:"from ",props:{style:{color:"#FF7B72"}}},{content:'"./DarthVaderIcon"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"export const ",props:{style:{color:"#FF7B72"}}},{content:"DarthVaderIcon ",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" forwardRef",props:{style:{color:"#C9D1D9"}}},{content:"<",props:{style:{color:"#FF7B72"}}}]},{tokens:[{content:" SVGSVGElement,",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" React.PropsWithChildren",props:{style:{color:"#C9D1D9"}}},{content:"<",props:{style:{color:"#FF7B72"}}},{content:"{}",props:{style:{color:"#C9D1D9"}}},{content:">",props:{style:{color:"#FF7B72"}}}]},{tokens:[{content:">",props:{style:{color:"#FF7B72"}}},{content:"((",props:{style:{color:"#C9D1D9"}}},{content:"props",props:{style:{color:"#FFA657"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"ref",props:{style:{color:"#FFA657"}}},{content:") ",props:{style:{color:"#C9D1D9"}}},{content:"=>",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" const ",props:{style:{color:"#FF7B72"}}},{content:"isdark ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"useDarkStore",props:{style:{color:"#D2A8FF"}}},{content:"((",props:{style:{color:"#C9D1D9"}}},{content:"state",props:{style:{color:"#FFA657"}}},{content:") ",props:{style:{color:"#C9D1D9"}}},{content:"=>",props:{style:{color:"#FF7B72"}}},{content:" state.dark).",props:{style:{color:"#C9D1D9"}}},{content:"toString",props:{style:{color:"#D2A8FF"}}},{content:"();",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" <",props:{style:{color:"#C9D1D9"}}},{content:"DarthVaderIconSVG ref",props:{style:{color:"#FFA657"}}},{content:"={",props:{style:{color:"#C9D1D9"}}},{content:"ref",props:{style:{color:"#FFA657"}}},{content:"} ",props:{style:{color:"#C9D1D9"}}},{content:"isdark",props:{style:{color:"#FFA657"}}},{content:"={",props:{style:{color:"#C9D1D9"}}},{content:"isdark",props:{style:{color:"#FFA657"}}},{content:"} {",props:{style:{color:"#C9D1D9"}}},{content:"...",props:{style:{color:"#FF7B72"}}},{content:"props",props:{style:{color:"#FFA657"}}},{content:"} />;",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"});",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"export default ",props:{style:{color:"#FF7B72"}}},{content:"DarthVaderIcon;",props:{style:{color:"#C9D1D9"}}}]}],lang:"typescript"},annotations:[]}]}),"\n",(0,r.jsxs)(t.ol,{start:"6",children:["\n",(0,r.jsxs)(t.li,{children:["To link your new bundle to the frontend, open ",(0,r.jsx)(t.code,{children:"/src/frontend/src/icons/lazyIconImports.ts"}),".\nYou can view the ",(0,r.jsx)(t.a,{href:"https://github.com/langflow-ai/langflow/blob/main/src/frontend/src/icons/lazyIconImports.ts",children:"lazyIconImports.ts"})," in the Langflow repository."]}),"\n",(0,r.jsxs)(t.li,{children:["Add the name of your icon, which should match the icon name you used in the ",(0,r.jsx)(t.code,{children:".tsx"})," file.\nFor example:"]}),"\n"]}),"\n",(0,r.jsx)(i.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:" CrewAI",props:{style:{color:"#FFA657"}}},{content:": () ",props:{style:{color:"#C9D1D9"}}},{content:"=>",props:{style:{color:"#FF7B72"}}}]},{tokens:[{content:" import",props:{style:{color:"#FF7B72"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:'"@/icons/CrewAI"',props:{style:{color:"#A5D6FF"}}},{content:").",props:{style:{color:"#C9D1D9"}}},{content:"then",props:{style:{color:"#D2A8FF"}}},{content:"((",props:{style:{color:"#C9D1D9"}}},{content:"mod",props:{style:{color:"#FFA657"}}},{content:") ",props:{style:{color:"#C9D1D9"}}},{content:"=>",props:{style:{color:"#FF7B72"}}},{content:" ({ default: mod.CrewAiIcon })),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" DarthVader",props:{style:{color:"#FFA657"}}},{content:": () ",props:{style:{color:"#C9D1D9"}}},{content:"=>",props:{style:{color:"#FF7B72"}}}]},{tokens:[{content:" import",props:{style:{color:"#FF7B72"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:'"@/icons/DarthVader"',props:{style:{color:"#A5D6FF"}}},{content:").",props:{style:{color:"#C9D1D9"}}},{content:"then",props:{style:{color:"#D2A8FF"}}},{content:"((",props:{style:{color:"#C9D1D9"}}},{content:"mod",props:{style:{color:"#FFA657"}}},{content:") ",props:{style:{color:"#C9D1D9"}}},{content:"=>",props:{style:{color:"#FF7B72"}}},{content:" ({ default: mod.DarthVaderIcon })),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" DeepSeek",props:{style:{color:"#FFA657"}}},{content:": () ",props:{style:{color:"#C9D1D9"}}},{content:"=>",props:{style:{color:"#FF7B72"}}}]},{tokens:[{content:" import",props:{style:{color:"#FF7B72"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:'"@/icons/DeepSeek"',props:{style:{color:"#A5D6FF"}}},{content:").",props:{style:{color:"#C9D1D9"}}},{content:"then",props:{style:{color:"#D2A8FF"}}},{content:"((",props:{style:{color:"#C9D1D9"}}},{content:"mod",props:{style:{color:"#FFA657"}}},{content:") ",props:{style:{color:"#C9D1D9"}}},{content:"=>",props:{style:{color:"#FF7B72"}}},{content:" ({ default: mod.DeepSeekIcon })),",props:{style:{color:"#C9D1D9"}}}]}],lang:"typescript"},annotations:[]}]}),"\n",(0,r.jsxs)(t.ol,{start:"8",children:["\n",(0,r.jsxs)(t.li,{children:["To update the ",(0,r.jsx)(t.strong,{children:"Bundles"})," section in the ",(0,r.jsx)(t.strong,{children:"Components"})," menu, add the new icon to the ",(0,r.jsx)(t.code,{children:"SIDEBAR_BUNDLES"})," array in ",(0,r.jsx)(t.code,{children:"src > frontend > src > utils > styleUtils.ts"}),".\nYou can view the ",(0,r.jsx)(t.a,{href:"https://github.com/langflow-ai/langflow/blob/main/src/frontend/src/utils/styleUtils.ts#L231",children:"SIDEBAR_BUNDLES array"})," in the Langflow repository.",(0,r.jsx)(t.br,{}),"\n","The ",(0,r.jsx)(t.code,{children:"name"})," must point to the folder you created within the ",(0,r.jsx)(t.code,{children:"src > backend > base > langflow > components"})," directory.\nFor example:"]}),"\n"]}),"\n",(0,r.jsx)(i.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{ ",props:{style:{color:"#C9D1D9"}}},{content:"display_name",props:{style:{color:"#FFA657"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"AssemblyAI"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"name",props:{style:{color:"#FFA657"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"assemblyai"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"icon",props:{style:{color:"#FFA657"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"AssemblyAI"',props:{style:{color:"#A5D6FF"}}},{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"{ ",props:{style:{color:"#C9D1D9"}}},{content:"display_name",props:{style:{color:"#FFA657"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"DarthVader"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"name",props:{style:{color:"#FFA657"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"darth_vader"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"icon",props:{style:{color:"#FFA657"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"DarthVader"',props:{style:{color:"#A5D6FF"}}},{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"{ ",props:{style:{color:"#C9D1D9"}}},{content:"display_name",props:{style:{color:"#FFA657"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"DataStax"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"name",props:{style:{color:"#FFA657"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"astra_assistants"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"icon",props:{style:{color:"#FFA657"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"DarthVader"',props:{style:{color:"#A5D6FF"}}},{content:" },",props:{style:{color:"#C9D1D9"}}}]}],lang:"typescript"},annotations:[]}]}),"\n",(0,r.jsx)(t.h2,{id:"update-bundle-components-with-icons",children:"Update bundle components with icons"}),"\n",(0,r.jsx)(t.p,{children:"In your component bundle, associate the icon variable with your new bundle."}),"\n",(0,r.jsxs)(t.p,{children:["In your ",(0,r.jsx)(t.code,{children:"darth_vader_component.py"})," file, in the component class, include the icon that you defined in the frontend.\nThe ",(0,r.jsx)(t.code,{children:"icon"})," must point to the directory you created for your icons within the ",(0,r.jsx)(t.code,{children:"src > frontend > src > icons"})," directory.\nFor example:"]}),"\n",(0,r.jsx)(i.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"class DarthVaderAPIComponent(LCToolComponent):",props:{}}]},{tokens:[{content:' display_name: str = "Darth Vader Tools"',props:{}}]},{tokens:[{content:' description: str = "Use the force to run actions with your agent"',props:{}}]},{tokens:[{content:' name = "DarthVaderAPI"',props:{}}]},{tokens:[{content:' icon = "DarthVader"',props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsx)(t.h2,{id:"ensure-the-application-builds-your-component-bundle",children:"Ensure the application builds your component bundle"}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["To rebuild the backend and frontend, run ",(0,r.jsx)(t.code,{children:"make install_frontend && make build_frontend && make install_backend && uv run langflow run --port 7860"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Refresh the frontend application.\nYour new bundle called ",(0,r.jsx)(t.code,{children:"DarthVader"})," is available in the ",(0,r.jsx)(t.strong,{children:"Components"})," menu in the visual editor."]}),"\n"]}),"\n"]})]})}function F(o={}){const{wrapper:t}={...(0,s.R)(),...o.components};return t?(0,r.jsx)(t,{...o,children:(0,r.jsx)(y,{...o})}):y(o)}function D(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/41d45d82.61261f80.js b/assets/js/41d45d82.61261f80.js new file mode 100644 index 0000000000..08d51fa041 --- /dev/null +++ b/assets/js/41d45d82.61261f80.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[1303],{28453:(o,e,t)=>{t.d(e,{R:()=>c,x:()=>l});var n=t(96540);const r={},s=n.createContext(r);function c(o){const e=n.useContext(s);return n.useMemo(function(){return"function"==typeof o?o(e):{...e,...o}},[e,o])}function l(o){let e;return e=o.disableParentContext?"function"==typeof o.components?o.components(r):o.components||r:c(o.components),n.createElement(s.Provider,{value:e},o.children)}},61787:(o,e,t)=>{t.r(e),t.d(e,{CH:()=>i,assets:()=>d,chCodeConfig:()=>a,contentTitle:()=>p,default:()=>F,frontMatter:()=>l,metadata:()=>n,toc:()=>h});const n=JSON.parse('{"id":"Contributing/contributing-bundles","title":"Contribute bundles","description":"Bundles are groups of components that are related to a specific service provider.","source":"@site/docs/Contributing/contributing-bundles.mdx","sourceDirName":"Contributing","slug":"/contributing-bundles","permalink":"/contributing-bundles","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Contribute bundles","slug":"/contributing-bundles"},"sidebar":"docs","previous":{"title":"Contribute templates","permalink":"/contributing-templates"},"next":{"title":"Release notes","permalink":"/release-notes"}}');var r=t(74848),s=t(28453),c=t(24754);const l={title:"Contribute bundles",slug:"/contributing-bundles"},p=void 0,d={},i={annotations:c.hk,Code:c.Cy},a={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},h=[{value:"Add the bundle to the backend folder",id:"add-the-bundle-to-the-backend-folder",level:2},{value:"Add the bundle to the frontend folder",id:"add-the-bundle-to-the-frontend-folder",level:2},{value:"Update bundle components with icons",id:"update-bundle-components-with-icons",level:2},{value:"Ensure the application builds your component bundle",id:"ensure-the-application-builds-your-component-bundle",level:2}];function y(o){const e={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...o.components};return i||D("CH",!1),i.Code||D("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)(e.p,{children:"Bundles are groups of components that are related to a specific service provider."}),"\n",(0,r.jsxs)(e.p,{children:["Follow these steps to add components to the ",(0,r.jsx)(e.strong,{children:"Bundles"})," section of the ",(0,r.jsx)(e.strong,{children:"Components"})," menu in the Langflow visual editor."]}),"\n",(0,r.jsxs)(e.p,{children:["Example adds a new bundle named ",(0,r.jsx)(e.code,{children:"DarthVader"}),"."]}),"\n",(0,r.jsx)(e.h2,{id:"add-the-bundle-to-the-backend-folder",children:"Add the bundle to the backend folder"}),"\n",(0,r.jsxs)(e.ol,{children:["\n",(0,r.jsxs)(e.li,{children:["\n",(0,r.jsxs)(e.p,{children:["Navigate to the backend directory in the Langflow repository and create a new folder for your bundle.\nThe path for your new component is ",(0,r.jsx)(e.code,{children:"src > backend > base > langflow > components > darth_vader"}),".\nYou can view the ",(0,r.jsx)(e.a,{href:"https://github.com/langflow-ai/langflow/tree/main/src/backend/base/langflow/components",children:"components folder"})," in the Langflow repository."]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["\n",(0,r.jsxs)(e.p,{children:["Within the newly created ",(0,r.jsx)(e.code,{children:"darth_vader"})," folder, add the following files:"]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.code,{children:"darth_vader_component.py"})," \u2014 This file contains the backend logic for the new bundle. Create multiple ",(0,r.jsx)(e.code,{children:".py"})," files for multiple components."]}),"\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.code,{children:"__init__.py"})," \u2014 This file initializes the bundle components. You can use any existing ",(0,r.jsx)(e.code,{children:"__init__.py"})," as an example to see how it should be structured."]}),"\n"]}),"\n",(0,r.jsxs)(e.p,{children:["For an example of adding multiple components in a bundle, see the ",(0,r.jsx)(e.a,{href:"https://github.com/langflow-ai/langflow/tree/main/src/backend/base/langflow/components/Notion",children:"Notion"})," bundle."]}),"\n",(0,r.jsx)(e.h2,{id:"add-the-bundle-to-the-frontend-folder",children:"Add the bundle to the frontend folder"}),"\n",(0,r.jsxs)(e.ol,{children:["\n",(0,r.jsxs)(e.li,{children:["\n",(0,r.jsxs)(e.p,{children:["Navigate to the frontend directory in the Langflow repository to add your bundle's icon.\nThe path for your new component icon is ",(0,r.jsx)(e.code,{children:"src > frontend > src > icons > DarthVader"}),"\nYou can view the ",(0,r.jsx)(e.a,{href:"https://github.com/langflow-ai/langflow/tree/main/src/frontend/src/icons",children:"icons folder"})," in the Langflow repository.\nTo add your icon, create ",(0,r.jsx)(e.strong,{children:"three"})," files inside the ",(0,r.jsx)(e.code,{children:"icons/darth_vader"})," folder."]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["\n",(0,r.jsxs)(e.p,{children:["In the ",(0,r.jsx)(e.code,{children:"icons/darth_vader"})," folder, add the raw SVG file of your icon, such as ",(0,r.jsx)(e.code,{children:"darth_vader-icon.svg"}),"."]}),"\n",(0,r.jsx)(e.admonition,{type:"tip",children:(0,r.jsx)(e.p,{children:"To convert the SVG file to JSX format, you can use an online tool like SVG to JSX.\nIt's highly recommended to use the original, lighter version of the SVG."})}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["\n",(0,r.jsxs)(e.p,{children:["In the ",(0,r.jsx)(e.code,{children:"icons/darth_vader"})," folder, add the icon as a React component in JSX format, such as ",(0,r.jsx)(e.code,{children:"DarthVaderIcon.jsx"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["\n",(0,r.jsxs)(e.p,{children:["Update the JSX file to include the correct component name and structure.\nEnsure you include the ",(0,r.jsx)(e.code,{children:"{...props}"})," spread operator in your JSX file.\nFor example, here is ",(0,r.jsx)(e.code,{children:"DarthVaderIcon.jsx"}),":"]}),"\n",(0,r.jsx)(i.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"const ",props:{style:{color:"#FF7B72"}}},{content:"DarthVaderIcon ",props:{style:{color:"#D2A8FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" (",props:{style:{color:"#C9D1D9"}}},{content:"props",props:{style:{color:"#FFA657"}}},{content:") ",props:{style:{color:"#C9D1D9"}}},{content:"=>",props:{style:{color:"#FF7B72"}}},{content:" (",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" <",props:{style:{color:"#C9D1D9"}}},{content:"svg",props:{style:{color:"#7EE787"}}}]},{tokens:[{content:" xmlns",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"http://www.w3.org/2000/svg"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" width",props:{style:{color:"#79C0FF"}}},{content:"={",props:{style:{color:"#FF7B72"}}},{content:"24",props:{style:{color:"#79C0FF"}}},{content:"}",props:{style:{color:"#FF7B72"}}}]},{tokens:[{content:" height",props:{style:{color:"#79C0FF"}}},{content:"={",props:{style:{color:"#FF7B72"}}},{content:"24",props:{style:{color:"#79C0FF"}}},{content:"}",props:{style:{color:"#FF7B72"}}}]},{tokens:[{content:" viewBox",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"0 0 32 32"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" fill",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"none"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" style",props:{style:{color:"#79C0FF"}}},{content:"={",props:{style:{color:"#FF7B72"}}},{content:"{ backgroundColor: ",props:{style:{color:"#C9D1D9"}}},{content:'"#9100ff"',props:{style:{color:"#A5D6FF"}}},{content:", borderRadius: ",props:{style:{color:"#C9D1D9"}}},{content:'"6px"',props:{style:{color:"#A5D6FF"}}},{content:" }",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#FF7B72"}}}]},{tokens:[{content:" {...",props:{style:{color:"#FF7B72"}}},{content:"props",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#FF7B72"}}}]},{tokens:[{content:" >",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" <",props:{style:{color:"#C9D1D9"}}},{content:"g ",props:{style:{color:"#7EE787"}}},{content:"transform",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"translate(7, 7)"',props:{style:{color:"#A5D6FF"}}},{content:">",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" <",props:{style:{color:"#C9D1D9"}}},{content:"path",props:{style:{color:"#7EE787"}}}]},{tokens:[{content:" fillRule",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"evenodd"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" clipRule",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"evenodd"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" d",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"M6.27406 0.685082C8.46664 -0.228361 10.9302 -0.228361 13.1229 0.685082C14.6773 1.33267 16.0054 2.40178 16.9702 3.75502C17.6126 4.65574 17.0835 5.84489 16.045 6.21613L13.5108 7.12189C12.9962 7.30585 12.4289 7.26812 11.9429 7.01756C11.8253 6.95701 11.7298 6.86089 11.6696 6.74266L10.2591 3.97469C10.0249 3.51519 9.37195 3.51519 9.13783 3.97469L7.72731 6.74274C7.66714 6.86089 7.57155 6.95701 7.454 7.01756L4.70187 8.43618C4.24501 8.67169 4.24501 9.3284 4.70187 9.56391L7.454 10.9825C7.57155 11.0431 7.66714 11.1392 7.72731 11.2574L9.13783 14.0254C9.37195 14.4849 10.0249 14.4849 10.2591 14.0254L11.6696 11.2574C11.7298 11.1392 11.8253 11.0431 11.9428 10.9825C12.429 10.7319 12.9965 10.6942 13.5112 10.8781L16.045 11.7838C17.0835 12.1551 17.6126 13.3442 16.9704 14.245C16.0054 15.5982"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" fill",props:{style:{color:"#79C0FF"}}},{content:"={",props:{style:{color:"#FF7B72"}}},{content:"props.isdark ",props:{style:{color:"#C9D1D9"}}},{content:"=== ",props:{style:{color:"#FF7B72"}}},{content:'"true" ',props:{style:{color:"#A5D6FF"}}},{content:"? ",props:{style:{color:"#FF7B72"}}},{content:'"white" ',props:{style:{color:"#A5D6FF"}}},{content:": ",props:{style:{color:"#FF7B72"}}},{content:'"black"',props:{style:{color:"#A5D6FF"}}},{content:"}",props:{style:{color:"#FF7B72"}}}]},{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:"export default ",props:{style:{color:"#FF7B72"}}},{content:"DarthVaderIcon;",props:{style:{color:"#C9D1D9"}}}]}],lang:"javascript"},annotations:[]}]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["\n",(0,r.jsxs)(e.p,{children:["In the ",(0,r.jsx)(e.code,{children:"icons/darth_vader"})," folder, add the React component itself in TypeScript format, such as ",(0,r.jsx)(e.code,{children:"index.tsx"}),".\nEnsure the icon's React component name corresponds to the JSX component you just created, such as ",(0,r.jsx)(e.code,{children:"DarthVaderIcon"}),":"]}),"\n",(0,r.jsx)(i.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" { useDarkStore } ",props:{style:{color:"#C9D1D9"}}},{content:"from ",props:{style:{color:"#FF7B72"}}},{content:'"@/stores/darkStore"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" React, { forwardRef } ",props:{style:{color:"#C9D1D9"}}},{content:"from ",props:{style:{color:"#FF7B72"}}},{content:'"react"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" DarthVaderIconSVG ",props:{style:{color:"#C9D1D9"}}},{content:"from ",props:{style:{color:"#FF7B72"}}},{content:'"./DarthVaderIcon"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"export const ",props:{style:{color:"#FF7B72"}}},{content:"DarthVaderIcon ",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" forwardRef",props:{style:{color:"#C9D1D9"}}},{content:"<",props:{style:{color:"#FF7B72"}}}]},{tokens:[{content:" SVGSVGElement,",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" React.PropsWithChildren",props:{style:{color:"#C9D1D9"}}},{content:"<",props:{style:{color:"#FF7B72"}}},{content:"{}",props:{style:{color:"#C9D1D9"}}},{content:">",props:{style:{color:"#FF7B72"}}}]},{tokens:[{content:">",props:{style:{color:"#FF7B72"}}},{content:"((",props:{style:{color:"#C9D1D9"}}},{content:"props",props:{style:{color:"#FFA657"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"ref",props:{style:{color:"#FFA657"}}},{content:") ",props:{style:{color:"#C9D1D9"}}},{content:"=>",props:{style:{color:"#FF7B72"}}},{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" const ",props:{style:{color:"#FF7B72"}}},{content:"isdark ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"useDarkStore",props:{style:{color:"#D2A8FF"}}},{content:"((",props:{style:{color:"#C9D1D9"}}},{content:"state",props:{style:{color:"#FFA657"}}},{content:") ",props:{style:{color:"#C9D1D9"}}},{content:"=>",props:{style:{color:"#FF7B72"}}},{content:" state.dark).",props:{style:{color:"#C9D1D9"}}},{content:"toString",props:{style:{color:"#D2A8FF"}}},{content:"();",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" <",props:{style:{color:"#C9D1D9"}}},{content:"DarthVaderIconSVG ref",props:{style:{color:"#FFA657"}}},{content:"={",props:{style:{color:"#C9D1D9"}}},{content:"ref",props:{style:{color:"#FFA657"}}},{content:"} ",props:{style:{color:"#C9D1D9"}}},{content:"isdark",props:{style:{color:"#FFA657"}}},{content:"={",props:{style:{color:"#C9D1D9"}}},{content:"isdark",props:{style:{color:"#FFA657"}}},{content:"} {",props:{style:{color:"#C9D1D9"}}},{content:"...",props:{style:{color:"#FF7B72"}}},{content:"props",props:{style:{color:"#FFA657"}}},{content:"} />;",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"});",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"export default ",props:{style:{color:"#FF7B72"}}},{content:"DarthVaderIcon;",props:{style:{color:"#C9D1D9"}}}]}],lang:"typescript"},annotations:[]}]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["\n",(0,r.jsxs)(e.p,{children:["To link your new bundle to the frontend, open ",(0,r.jsx)(e.code,{children:"/src/frontend/src/icons/lazyIconImports.ts"}),".\nYou can view the ",(0,r.jsx)(e.a,{href:"https://github.com/langflow-ai/langflow/blob/main/src/frontend/src/icons/lazyIconImports.ts",children:"lazyIconImports.ts"})," in the Langflow repository."]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["\n",(0,r.jsxs)(e.p,{children:["Add the name of your icon, which should match the icon name you used in the ",(0,r.jsx)(e.code,{children:".tsx"})," file.\nFor example:"]}),"\n",(0,r.jsx)(i.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:" CrewAI",props:{style:{color:"#FFA657"}}},{content:": () ",props:{style:{color:"#C9D1D9"}}},{content:"=>",props:{style:{color:"#FF7B72"}}}]},{tokens:[{content:" import",props:{style:{color:"#FF7B72"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:'"@/icons/CrewAI"',props:{style:{color:"#A5D6FF"}}},{content:").",props:{style:{color:"#C9D1D9"}}},{content:"then",props:{style:{color:"#D2A8FF"}}},{content:"((",props:{style:{color:"#C9D1D9"}}},{content:"mod",props:{style:{color:"#FFA657"}}},{content:") ",props:{style:{color:"#C9D1D9"}}},{content:"=>",props:{style:{color:"#FF7B72"}}},{content:" ({ default: mod.CrewAiIcon })),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" DarthVader",props:{style:{color:"#FFA657"}}},{content:": () ",props:{style:{color:"#C9D1D9"}}},{content:"=>",props:{style:{color:"#FF7B72"}}}]},{tokens:[{content:" import",props:{style:{color:"#FF7B72"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:'"@/icons/DarthVader"',props:{style:{color:"#A5D6FF"}}},{content:").",props:{style:{color:"#C9D1D9"}}},{content:"then",props:{style:{color:"#D2A8FF"}}},{content:"((",props:{style:{color:"#C9D1D9"}}},{content:"mod",props:{style:{color:"#FFA657"}}},{content:") ",props:{style:{color:"#C9D1D9"}}},{content:"=>",props:{style:{color:"#FF7B72"}}},{content:" ({ default: mod.DarthVaderIcon })),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" DeepSeek",props:{style:{color:"#FFA657"}}},{content:": () ",props:{style:{color:"#C9D1D9"}}},{content:"=>",props:{style:{color:"#FF7B72"}}}]},{tokens:[{content:" import",props:{style:{color:"#FF7B72"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:'"@/icons/DeepSeek"',props:{style:{color:"#A5D6FF"}}},{content:").",props:{style:{color:"#C9D1D9"}}},{content:"then",props:{style:{color:"#D2A8FF"}}},{content:"((",props:{style:{color:"#C9D1D9"}}},{content:"mod",props:{style:{color:"#FFA657"}}},{content:") ",props:{style:{color:"#C9D1D9"}}},{content:"=>",props:{style:{color:"#FF7B72"}}},{content:" ({ default: mod.DeepSeekIcon })),",props:{style:{color:"#C9D1D9"}}}]}],lang:"typescript"},annotations:[]}]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["\n",(0,r.jsxs)(e.p,{children:["To add your bundle to the ",(0,r.jsx)(e.strong,{children:"Bundles"})," menu, edit the ",(0,r.jsxs)(e.a,{href:"https://github.com/langflow-ai/langflow/blob/main/src/frontend/src/utils/styleUtils.ts#L231",children:[(0,r.jsx)(e.code,{children:"SIDEBAR_BUNDLES"})," array"]})," in ",(0,r.jsx)(e.code,{children:"/src/frontend/src/utils/styleUtils.ts"}),"."]}),"\n",(0,r.jsx)(e.p,{children:"Add an object to the array with the following keys:"}),"\n",(0,r.jsxs)(e.ul,{children:["\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.code,{children:"display_name"}),": The text label shown in the Langflow visual editor"]}),"\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.code,{children:"name"}),": The name of the folder you created within the ",(0,r.jsx)(e.code,{children:"/src/backend/base/langflow/components"})," directory"]}),"\n",(0,r.jsxs)(e.li,{children:[(0,r.jsx)(e.code,{children:"icon"}),": The name of the bundle's icon that you defined in the previous steps"]}),"\n"]}),"\n",(0,r.jsx)(e.p,{children:"For example:"}),"\n",(0,r.jsx)(i.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{ ",props:{style:{color:"#C9D1D9"}}},{content:"display_name",props:{style:{color:"#FFA657"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"AssemblyAI"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"name",props:{style:{color:"#FFA657"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"assemblyai"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"icon",props:{style:{color:"#FFA657"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"AssemblyAI"',props:{style:{color:"#A5D6FF"}}},{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"{ ",props:{style:{color:"#C9D1D9"}}},{content:"display_name",props:{style:{color:"#FFA657"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"DarthVader"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"name",props:{style:{color:"#FFA657"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"darth_vader"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"icon",props:{style:{color:"#FFA657"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"DarthVader"',props:{style:{color:"#A5D6FF"}}},{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"{ ",props:{style:{color:"#C9D1D9"}}},{content:"display_name",props:{style:{color:"#FFA657"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"DataStax"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"name",props:{style:{color:"#FFA657"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"astra_assistants"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"icon",props:{style:{color:"#FFA657"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"DarthVader"',props:{style:{color:"#A5D6FF"}}},{content:" },",props:{style:{color:"#C9D1D9"}}}]}],lang:"typescript"},annotations:[]}]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(e.h2,{id:"update-bundle-components-with-icons",children:"Update bundle components with icons"}),"\n",(0,r.jsx)(e.p,{children:"In your component bundle, associate the icon variable with your new bundle."}),"\n",(0,r.jsxs)(e.p,{children:["In your ",(0,r.jsx)(e.code,{children:"darth_vader_component.py"})," file, in the component class, include the icon that you defined in the frontend.\nThe ",(0,r.jsx)(e.code,{children:"icon"})," must point to the directory you created for your icons within the ",(0,r.jsx)(e.code,{children:"src > frontend > src > icons"})," directory.\nFor example:"]}),"\n",(0,r.jsx)(i.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"class DarthVaderAPIComponent(LCToolComponent):",props:{}}]},{tokens:[{content:' display_name: str = "Darth Vader Tools"',props:{}}]},{tokens:[{content:' description: str = "Use the force to run actions with your agent"',props:{}}]},{tokens:[{content:' name = "DarthVaderAPI"',props:{}}]},{tokens:[{content:' icon = "DarthVader"',props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsx)(e.h2,{id:"ensure-the-application-builds-your-component-bundle",children:"Ensure the application builds your component bundle"}),"\n",(0,r.jsxs)(e.ol,{children:["\n",(0,r.jsxs)(e.li,{children:["\n",(0,r.jsxs)(e.p,{children:["To rebuild the backend and frontend, run ",(0,r.jsx)(e.code,{children:"make install_frontend && make build_frontend && make install_backend && uv run langflow run --port 7860"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(e.li,{children:["\n",(0,r.jsxs)(e.p,{children:["Refresh the frontend application.\nYour new bundle called ",(0,r.jsx)(e.code,{children:"DarthVader"})," is available in the ",(0,r.jsx)(e.strong,{children:"Components"})," menu in the visual editor."]}),"\n"]}),"\n"]})]})}function F(o={}){const{wrapper:e}={...(0,s.R)(),...o.components};return e?(0,r.jsx)(e,{...o,children:(0,r.jsx)(y,{...o})}):y(o)}function D(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/42962acd.021175a9.js b/assets/js/42962acd.021175a9.js new file mode 100644 index 0000000000..9f12355527 --- /dev/null +++ b/assets/js/42962acd.021175a9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[8702],{17886:(e,t,n)=>{n.d(t,{A:()=>a});n(96540);var r=n(64058),s=n(74848);function a({name:e,...t}){const n=r[e];return n?(0,s.jsx)(n,{...t}):null}},21994:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>l,default:()=>m,frontMatter:()=>o,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"Components/bundles-maritalk","title":"MariTalk","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-maritalk.mdx","sourceDirName":"Components","slug":"/bundles-maritalk","permalink":"/bundles-maritalk","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"MariTalk","slug":"/bundles-maritalk"},"sidebar":"docs","previous":{"title":"LM Studio","permalink":"/bundles-lmstudio"},"next":{"title":"Mem0","permalink":"/bundles-mem0"}}');var s=n(74848),a=n(28453),i=(n(17886),n(31929));const o={title:"MariTalk",slug:"/bundles-maritalk"},l=void 0,d={},c=[{value:"MariTalk text generation",id:"maritalk-text-generation",level:2},{value:"MariTalk text generation parameters",id:"maritalk-text-generation-parameters",level:3},...i.RM];function h(e){const t={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,s.jsxs)(t.p,{children:["This page describes the components that are available in the ",(0,s.jsx)(t.strong,{children:"MariTalk"})," bundle."]}),"\n",(0,s.jsxs)(t.p,{children:["For more information, see the ",(0,s.jsx)(t.a,{href:"https://www.maritalk.com/",children:"MariTalk documentation"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"maritalk-text-generation",children:"MariTalk text generation"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.strong,{children:"MariTalk"})," component generates text using MariTalk LLMs."]}),"\n",(0,s.jsxs)(t.p,{children:["It can output either a ",(0,s.jsx)(t.strong,{children:"Model Response"})," (",(0,s.jsx)(t.a,{href:"/data-types#message",children:(0,s.jsx)(t.code,{children:"Message"})}),") or a ",(0,s.jsx)(t.strong,{children:"Language Model"})," (",(0,s.jsx)(t.a,{href:"/data-types#languagemodel",children:(0,s.jsx)(t.code,{children:"LanguageModel"})}),")."]}),"\n",(0,s.jsxs)(t.p,{children:["Use the ",(0,s.jsx)(t.strong,{children:"Language Model"})," output when you want to use a MariTalk model as the LLM for another LLM-driven component, such as an ",(0,s.jsx)(t.strong,{children:"Agent"})," or ",(0,s.jsx)(t.strong,{children:"Smart Function"})," component."]}),"\n",(0,s.jsxs)(t.p,{children:["For more information, see ",(0,s.jsxs)(t.a,{href:"/components-models",children:[(0,s.jsx)(t.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"maritalk-text-generation-parameters",children:"MariTalk text generation parameters"}),"\n",(0,s.jsx)(i.Ay,{}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Type"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"max_tokens"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsxs)(t.td,{children:["Input parameter. The maximum number of tokens to generate. Set to ",(0,s.jsx)(t.code,{children:"0"})," for unlimited tokens. Default: ",(0,s.jsx)(t.code,{children:"512"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"model_name"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsxs)(t.td,{children:["Input parameter. The name of the MariTalk model to use. Options: ",(0,s.jsx)(t.code,{children:"sabia-2-small"}),", ",(0,s.jsx)(t.code,{children:"sabia-2-medium"}),". Default: ",(0,s.jsx)(t.code,{children:"sabia-2-small"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"api_key"}),(0,s.jsx)(t.td,{children:"SecretString"}),(0,s.jsx)(t.td,{children:"Input parameter. The MariTalk API Key to use for authentication."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"temperature"}),(0,s.jsx)(t.td,{children:"Float"}),(0,s.jsxs)(t.td,{children:["Input parameter. Controls randomness in the output. Range: ",(0,s.jsx)(t.code,{children:"[0.0, 1.0]"}),". Default: ",(0,s.jsx)(t.code,{children:"0.5"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"endpoint_url"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsxs)(t.td,{children:["Input parameter. The MariTalk API endpoint. Default: ",(0,s.jsx)(t.code,{children:"https://api.maritalk.com"}),"."]})]})]})]})]})}function m(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},31929:(e,t,n)=>{n.d(t,{Ay:()=>l,RM:()=>i});var r=n(74848),s=n(28453),a=n(17886);const i=[];function o(e){const t={a:"a",p:"p",strong:"strong",...(0,s.R)(),...e.components};return(0,r.jsxs)(t.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,r.jsx)(a.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Controls"})," in the ",(0,r.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function l(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(o,{...e})}):o(e)}}}]); \ No newline at end of file diff --git a/assets/js/42962acd.a7523d67.js b/assets/js/42962acd.a7523d67.js deleted file mode 100644 index fdd1ccbca2..0000000000 --- a/assets/js/42962acd.a7523d67.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[8702],{17886:(e,t,n)=>{n.d(t,{A:()=>a});n(96540);var r=n(64058),s=n(74848);function a({name:e,...t}){const n=r[e];return n?(0,s.jsx)(n,{...t}):null}},21994:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>o,default:()=>m,frontMatter:()=>l,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"Components/bundles-maritalk","title":"MariTalk","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-maritalk.mdx","sourceDirName":"Components","slug":"/bundles-maritalk","permalink":"/bundles-maritalk","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"MariTalk","slug":"/bundles-maritalk"},"sidebar":"docs","previous":{"title":"LM Studio","permalink":"/bundles-lmstudio"},"next":{"title":"Mem0","permalink":"/bundles-mem0"}}');var s=n(74848),a=n(28453),i=n(17886);const l={title:"MariTalk",slug:"/bundles-maritalk"},o=void 0,d={},c=[{value:"MariTalk text generation",id:"maritalk-text-generation",level:2},{value:"MariTalk text generation parameters",id:"maritalk-text-generation-parameters",level:3}];function h(e){const t={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,a.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,s.jsxs)(t.p,{children:["This page describes the components that are available in the ",(0,s.jsx)(t.strong,{children:"MariTalk"})," bundle."]}),"\n",(0,s.jsxs)(t.p,{children:["For more information, see the ",(0,s.jsx)(t.a,{href:"https://www.maritalk.com/",children:"MariTalk documentation"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"maritalk-text-generation",children:"MariTalk text generation"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.strong,{children:"MariTalk"})," component generates text using MariTalk LLMs."]}),"\n",(0,s.jsxs)(t.p,{children:["It can output either a ",(0,s.jsx)(t.strong,{children:"Model Response"})," (",(0,s.jsx)(t.a,{href:"/data-types#message",children:(0,s.jsx)(t.code,{children:"Message"})}),") or a ",(0,s.jsx)(t.strong,{children:"Language Model"})," (",(0,s.jsx)(t.a,{href:"/data-types#languagemodel",children:(0,s.jsx)(t.code,{children:"LanguageModel"})}),")."]}),"\n",(0,s.jsxs)(t.p,{children:["Use the ",(0,s.jsx)(t.strong,{children:"Language Model"})," output when you want to use a MariTalk model as the LLM for another LLM-driven component, such as a ",(0,s.jsx)(t.strong,{children:"Language Model"})," or ",(0,s.jsx)(t.strong,{children:"Smart Function"})," component."]}),"\n",(0,s.jsxs)(t.p,{children:["For more information, see ",(0,s.jsxs)(t.a,{href:"/components-models",children:[(0,s.jsx)(t.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"maritalk-text-generation-parameters",children:"MariTalk text generation parameters"}),"\n",(0,s.jsxs)(t.p,{children:["Many ",(0,s.jsx)(t.strong,{children:"MariTalk"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,s.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(t.strong,{children:"Controls"})," in the ",(0,s.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Type"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"max_tokens"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsxs)(t.td,{children:["Input parameter. The maximum number of tokens to generate. Set to ",(0,s.jsx)(t.code,{children:"0"})," for unlimited tokens. Default: ",(0,s.jsx)(t.code,{children:"512"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"model_name"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsxs)(t.td,{children:["Input parameter. The name of the MariTalk model to use. Options: ",(0,s.jsx)(t.code,{children:"sabia-2-small"}),", ",(0,s.jsx)(t.code,{children:"sabia-2-medium"}),". Default: ",(0,s.jsx)(t.code,{children:"sabia-2-small"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"api_key"}),(0,s.jsx)(t.td,{children:"SecretString"}),(0,s.jsx)(t.td,{children:"Input parameter. The MariTalk API Key to use for authentication."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"temperature"}),(0,s.jsx)(t.td,{children:"Float"}),(0,s.jsxs)(t.td,{children:["Input parameter. Controls randomness in the output. Range: ",(0,s.jsx)(t.code,{children:"[0.0, 1.0]"}),". Default: ",(0,s.jsx)(t.code,{children:"0.5"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"endpoint_url"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsxs)(t.td,{children:["Input parameter. The MariTalk API endpoint. Default: ",(0,s.jsx)(t.code,{children:"https://api.maritalk.com"}),"."]})]})]})]})]})}function m(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}}}]); \ No newline at end of file diff --git a/assets/js/444a6da6.45ad0c8d.js b/assets/js/444a6da6.45ad0c8d.js new file mode 100644 index 0000000000..7c401f3ec4 --- /dev/null +++ b/assets/js/444a6da6.45ad0c8d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[1193],{28453:(e,o,t)=>{t.d(o,{R:()=>c,x:()=>l});var n=t(96540);const s={},r=n.createContext(s);function c(e){const o=n.useContext(r);return n.useMemo(function(){return"function"==typeof e?e(o):{...o,...e}},[o,e])}function l(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:c(e.components),n.createElement(r.Provider,{value:o},e.children)}},64742:(e,o,t)=>{t.r(o),t.d(o,{CH:()=>a,assets:()=>i,chCodeConfig:()=>d,contentTitle:()=>p,default:()=>y,frontMatter:()=>l,metadata:()=>n,toc:()=>h});const n=JSON.parse('{"id":"API-Reference/api-flows-run","title":"Flow trigger endpoints","description":"Use the /run and /webhook endpoints to run flows.","source":"@site/docs/API-Reference/api-flows-run.mdx","sourceDirName":"API-Reference","slug":"/api-flows-run","permalink":"/api-flows-run","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Flow trigger endpoints","slug":"/api-flows-run"},"sidebar":"docs","previous":{"title":"Use the TypeScript client","permalink":"/typescript-client"},"next":{"title":"Flow management endpoints","permalink":"/api-flows"}}');var s=t(74848),r=t(28453),c=t(24754);const l={title:"Flow trigger endpoints",slug:"/api-flows-run"},p=void 0,i={},a={annotations:c.hk,Code:c.Cy},d={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},h=[{value:"Run flow",id:"run-flow",level:2},{value:"Stream LLM token responses",id:"stream-llm-token-responses",level:3},{value:"Run endpoint headers",id:"run-endpoint-headers",level:3},{value:"Run endpoint parameters",id:"run-endpoint-parameters",level:3},{value:"Request example with all headers and parameters",id:"request-example-with-all-headers-and-parameters",level:3},{value:"Webhook run flow",id:"webhook-run-flow",level:2},{value:"Deprecated flow trigger endpoints",id:"deprecated-flow-trigger-endpoints",level:2}];function u(e){const o={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components},{Details:t}=o;return a||F("CH",!1),a.Code||F("CH.Code",!0),t||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",(0,s.jsxs)(o.p,{children:["Use the ",(0,s.jsx)(o.code,{children:"/run"})," and ",(0,s.jsx)(o.code,{children:"/webhook"})," endpoints to run flows."]}),"\n",(0,s.jsxs)(o.p,{children:["To create, read, update, and delete flows, see ",(0,s.jsx)(o.a,{href:"/api-flows",children:"Flow management endpoints"}),"."]}),"\n",(0,s.jsx)(o.h2,{id:"run-flow",children:"Run flow"}),"\n",(0,s.jsx)(o.admonition,{type:"tip",children:(0,s.jsxs)(o.p,{children:["Langflow automatically generates Python, JavaScript, and curl code snippets for the ",(0,s.jsx)(o.code,{children:"/v1/run/$FLOW_ID"})," endpoint for all flows.\nFor more information, see ",(0,s.jsx)(o.a,{href:"/concepts-publish#generate-api-code-snippets",children:"Generate API code snippets"}),"."]})}),"\n",(0,s.jsxs)(o.p,{children:["Execute a specified flow by ID or name.\nFlow IDs can be found on the code snippets on the ",(0,s.jsxs)(o.a,{href:"/concepts-publish#api-access",children:[(0,s.jsx)(o.strong,{children:"API access"})," pane"]})," or in a flow's URL."]}),"\n",(0,s.jsxs)(o.p,{children:["The following example runs the ",(0,s.jsx)(o.strong,{children:"Basic Prompting"})," template flow with flow parameters passed in the request body.\nThis flow requires a chat input string (",(0,s.jsx)(o.code,{children:"input_value"}),"), and uses default values for all other parameters."]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_SERVER_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/run/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_value": "Tell me about something interesting!",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "session_id": "chat-123",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_type": "chat",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "output_type": "chat",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "output_component": "",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "tweaks": null',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(o.p,{children:["The response from ",(0,s.jsx)(o.code,{children:"/v1/run/$FLOW_ID"})," includes metadata, inputs, and outputs for the run."]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(o.p,{children:"The following example illustrates a response from a Basic Prompting flow:"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "session_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"chat-123"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "outputs"',props:{style:{color:"#7EE787"}}},{content:": [{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "inputs"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "input_value"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Tell me about something interesting!"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "outputs"',props:{style:{color:"#7EE787"}}},{content:": [{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "results"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Sure! Have you ever heard of the phenomenon known as ',props:{style:{color:"#A5D6FF"}}},{content:'\\"',props:{style:{color:"#79C0FF"}}},{content:"bioluminescence",props:{style:{color:"#A5D6FF"}}},{content:'\\"',props:{style:{color:"#79C0FF"}}},{content:"? It's a fascinating natural occurrence where living organisms produce and emit light. This ability is found in various species, including certain types of jellyfish, fireflies, and deep-sea creatures like anglerfish.",props:{style:{color:"#A5D6FF"}}},{content:"\\n\\n",props:{style:{color:"#79C0FF"}}},{content:"Bioluminescence occurs through a chemical reaction in which a light-emitting molecule called luciferin reacts with oxygen, catalyzed by an enzyme called luciferase. The result is a beautiful glow that can serve various purposes, such as attracting mates, deterring predators, or luring prey.",props:{style:{color:"#A5D6FF"}}},{content:"\\n\\n",props:{style:{color:"#79C0FF"}}},{content:"One of the most stunning displays of bioluminescence can be seen in the ocean, where certain plankton emit light when disturbed, creating a mesmerizing blue glow in the water. This phenomenon is often referred to as ",props:{style:{color:"#A5D6FF"}}},{content:'\\"',props:{style:{color:"#79C0FF"}}},{content:"sea sparkle",props:{style:{color:"#A5D6FF"}}},{content:'\\"',props:{style:{color:"#79C0FF"}}},{content:" and can be seen in coastal areas around the world.",props:{style:{color:"#A5D6FF"}}},{content:"\\n\\n",props:{style:{color:"#79C0FF"}}},{content:"Bioluminescence not only captivates our imagination but also has practical applications in science and medicine, including the development of biosensors and imaging techniques. It's a remarkable example of nature's creativity and complexity!\"",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Machine"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"AI"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "session_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"chat-123"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timestamp"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-03-03T17:17:37+00:00"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"d2bbd92b-187e-4c84-b2d4-5df365704201"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "properties"',props:{style:{color:"#7EE787"}}},{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:'"OpenAIModel-d1wOZ"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "display_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"OpenAI"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "source"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"gpt-4o-mini"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "icon"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"OpenAI"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "component_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"ChatOutput-ylMzN"',props:{style:{color:"#A5D6FF"}}}]},{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"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsxs)(o.p,{children:["If you are parsing the response in an application, you most likely need to extract the relevant content from the response, rather than pass the entire response back to the user.\nFor an example of a script that extracts data from a Langflow API response, see the ",(0,s.jsx)(o.a,{href:"/get-started-quickstart",children:"Quickstart"}),"."]}),"\n",(0,s.jsx)(o.h3,{id:"stream-llm-token-responses",children:"Stream LLM token responses"}),"\n",(0,s.jsxs)(o.p,{children:["With ",(0,s.jsx)(o.code,{children:"/v1/run/$FLOW_ID"}),", the flow is executed as a batch with optional LLM token response streaming."]}),"\n",(0,s.jsxs)(o.p,{children:["To stream LLM token responses, append the ",(0,s.jsx)(o.code,{children:"?stream=true"})," query parameter to the request:"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_SERVER_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/run/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'?stream=true" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "message": "Tell me something interesting!",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "session_id": "chat-123"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(o.p,{children:["LLM chat responses are streamed back as ",(0,s.jsx)(o.code,{children:"token"})," events, culminating in a final ",(0,s.jsx)(o.code,{children:"end"})," event that closes the connection."]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsxs)(o.p,{children:["The following example is truncated to illustrate a series of ",(0,s.jsx)(o.code,{children:"token"})," events as well as the final ",(0,s.jsx)(o.code,{children:"end"})," event that closes the LLM's token streaming response:"]}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:'{"event": "add_message", "data": {"timestamp": "2025-03-03T17:20:18", "sender": "User", "sender_name": "User", "session_id": "chat-123", "text": "Tell me about something interesting!", "files": [], "error": false, "edit": false, "properties": {"text_color": "", "background_color": "", "edited": false, "source": {"id": null, "display_name": null, "source": null}, "icon": "", "allow_markdown": false, "positive_feedback": null, "state": "complete", "targets": []}, "category": "message", "content_blocks": [], "id": "0103a21b-ebf7-4c02-9d72-017fb297f812", "flow_id": "d2bbd92b-187e-4c84-b2d4-5df365704201"}}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"event": "add_message", "data": {"timestamp": "2025-03-03T17:20:18", "sender": "Machine", "sender_name": "AI", "session_id": "chat-123", "text": "", "files": [], "error": false, "edit": false, "properties": {"text_color": "", "background_color": "", "edited": false, "source": {"id": "OpenAIModel-d1wOZ", "display_name": "OpenAI", "source": "gpt-4o-mini"}, "icon": "OpenAI", "allow_markdown": false, "positive_feedback": null, "state": "complete", "targets": []}, "category": "message", "content_blocks": [], "id": "27b66789-e673-4c65-9e81-021752925161", "flow_id": "d2bbd92b-187e-4c84-b2d4-5df365704201"}}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"event": "token", "data": {"chunk": " Have", "id": "27b66789-e673-4c65-9e81-021752925161", "timestamp": "2025-03-03 17:20:18 UTC"}}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"event": "token", "data": {"chunk": " you", "id": "27b66789-e673-4c65-9e81-021752925161", "timestamp": "2025-03-03 17:20:18 UTC"}}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"event": "token", "data": {"chunk": " ever", "id": "27b66789-e673-4c65-9e81-021752925161", "timestamp": "2025-03-03 17:20:18 UTC"}}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"event": "token", "data": {"chunk": " heard", "id": "27b66789-e673-4c65-9e81-021752925161", "timestamp": "2025-03-03 17:20:18 UTC"}}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"event": "token", "data": {"chunk": " of", "id": "27b66789-e673-4c65-9e81-021752925161", "timestamp": "2025-03-03 17:20:18 UTC"}}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"event": "token", "data": {"chunk": " the", "id": "27b66789-e673-4c65-9e81-021752925161", "timestamp": "2025-03-03 17:20:18 UTC"}}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"event": "token", "data": {"chunk": " phenomenon", "id": "27b66789-e673-4c65-9e81-021752925161", "timestamp": "2025-03-03 17:20:18 UTC"}}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"event": "end", "data": {"result": {"session_id": "chat-123", "message": "Sure! Have you ever heard of the phenomenon known as \\"bioluminescence\\"?..."}}}',props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n",(0,s.jsx)(o.h3,{id:"run-endpoint-headers",children:"Run endpoint headers"}),"\n",(0,s.jsxs)(o.table,{children:[(0,s.jsx)(o.thead,{children:(0,s.jsxs)(o.tr,{children:[(0,s.jsx)(o.th,{children:"Header"}),(0,s.jsx)(o.th,{children:"Info"}),(0,s.jsx)(o.th,{children:"Example"})]})}),(0,s.jsxs)(o.tbody,{children:[(0,s.jsxs)(o.tr,{children:[(0,s.jsx)(o.td,{children:"Content-Type"}),(0,s.jsx)(o.td,{children:"Required. Specifies the JSON format."}),(0,s.jsx)(o.td,{children:'"application/json"'})]}),(0,s.jsxs)(o.tr,{children:[(0,s.jsx)(o.td,{children:"accept"}),(0,s.jsx)(o.td,{children:"Optional. Specifies the response format."}),(0,s.jsx)(o.td,{children:'"application/json"'})]}),(0,s.jsxs)(o.tr,{children:[(0,s.jsx)(o.td,{children:"x-api-key"}),(0,s.jsx)(o.td,{children:"Optional. Required only if authentication is enabled."}),(0,s.jsx)(o.td,{children:'"sk-..."'})]})]})]}),"\n",(0,s.jsx)(o.h3,{id:"run-endpoint-parameters",children:"Run endpoint parameters"}),"\n",(0,s.jsxs)(o.table,{children:[(0,s.jsx)(o.thead,{children:(0,s.jsxs)(o.tr,{children:[(0,s.jsx)(o.th,{children:"Parameter"}),(0,s.jsx)(o.th,{children:"Type"}),(0,s.jsx)(o.th,{children:"Info"})]})}),(0,s.jsxs)(o.tbody,{children:[(0,s.jsxs)(o.tr,{children:[(0,s.jsx)(o.td,{children:"flow_id"}),(0,s.jsx)(o.td,{children:"UUID/string"}),(0,s.jsxs)(o.td,{children:["Required. Part of URL: ",(0,s.jsx)(o.code,{children:"/run/$FLOW_ID"})]})]}),(0,s.jsxs)(o.tr,{children:[(0,s.jsx)(o.td,{children:"stream"}),(0,s.jsx)(o.td,{children:"Boolean"}),(0,s.jsxs)(o.td,{children:["Optional. Query parameter: ",(0,s.jsx)(o.code,{children:"/run/$FLOW_ID?stream=true"})]})]}),(0,s.jsxs)(o.tr,{children:[(0,s.jsx)(o.td,{children:"input_value"}),(0,s.jsx)(o.td,{children:"string"}),(0,s.jsxs)(o.td,{children:["Optional. JSON body field. Main input text/prompt. Default: ",(0,s.jsx)(o.code,{children:"null"})]})]}),(0,s.jsxs)(o.tr,{children:[(0,s.jsx)(o.td,{children:"input_type"}),(0,s.jsx)(o.td,{children:"string"}),(0,s.jsxs)(o.td,{children:['Optional. JSON body field. Input type ("chat" or "text"). Default: ',(0,s.jsx)(o.code,{children:'"chat"'})]})]}),(0,s.jsxs)(o.tr,{children:[(0,s.jsx)(o.td,{children:"output_type"}),(0,s.jsx)(o.td,{children:"string"}),(0,s.jsxs)(o.td,{children:['Optional. JSON body field. Output type ("chat", "any", "debug"). Default: ',(0,s.jsx)(o.code,{children:'"chat"'})]})]}),(0,s.jsxs)(o.tr,{children:[(0,s.jsx)(o.td,{children:"output_component"}),(0,s.jsx)(o.td,{children:"string"}),(0,s.jsxs)(o.td,{children:["Optional. JSON body field. Target component for output. Default: ",(0,s.jsx)(o.code,{children:'""'})]})]}),(0,s.jsxs)(o.tr,{children:[(0,s.jsx)(o.td,{children:"tweaks"}),(0,s.jsx)(o.td,{children:"object"}),(0,s.jsxs)(o.td,{children:["Optional. JSON body field. Component adjustments. Default: ",(0,s.jsx)(o.code,{children:"null"})]})]}),(0,s.jsxs)(o.tr,{children:[(0,s.jsx)(o.td,{children:"session_id"}),(0,s.jsx)(o.td,{children:"string"}),(0,s.jsxs)(o.td,{children:["Optional. JSON body field. Conversation context ID. See ",(0,s.jsx)(o.a,{href:"/session-id",children:"Session ID"}),". Default: ",(0,s.jsx)(o.code,{children:"null"})]})]})]})]}),"\n",(0,s.jsx)(o.h3,{id:"request-example-with-all-headers-and-parameters",children:"Request example with all headers and parameters"}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_SERVER_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/run/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'?stream=true" ',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:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_value": "Tell me a story",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_type": "chat",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "output_type": "chat",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "output_component": "chat_output",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "session_id": "chat-123",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "tweaks": {',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "component_id": {',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "parameter_name": "value"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsx)(o.h2,{id:"webhook-run-flow",children:"Webhook run flow"}),"\n",(0,s.jsxs)(o.p,{children:["Use the ",(0,s.jsx)(o.code,{children:"/webhook"})," endpoint to start a flow by sending an HTTP ",(0,s.jsx)(o.code,{children:"POST"})," request."]}),"\n",(0,s.jsx)(o.admonition,{type:"tip",children:(0,s.jsxs)(o.p,{children:["After you add a ",(0,s.jsxs)(o.a,{href:"/components-data#webhook",children:[(0,s.jsx)(o.strong,{children:"Webhook"})," component"]})," to a flow, open the ",(0,s.jsxs)(o.a,{href:"/concepts-publish",children:[(0,s.jsx)(o.strong,{children:"API access"})," pane"]}),", and then click the ",(0,s.jsx)(o.strong,{children:"Webhook curl"})," tab to get an automatically generated ",(0,s.jsx)(o.code,{children:"POST /webhook"})," request for your flow.\nFor more information, see ",(0,s.jsx)(o.a,{href:"/webhook",children:"Trigger flows with webhooks"}),"."]})}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_SERVER_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/webhook/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:'\'{"data": "example-data"}\'',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Task started in the background"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "status"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"in progress"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(o.h2,{id:"deprecated-flow-trigger-endpoints",children:"Deprecated flow trigger endpoints"}),"\n",(0,s.jsxs)(o.p,{children:["The following endpoints are deprecated and replaced by the ",(0,s.jsx)(o.code,{children:"/run"})," endpoint:"]}),"\n",(0,s.jsxs)(o.ul,{children:["\n",(0,s.jsx)(o.li,{children:(0,s.jsx)(o.code,{children:"/process"})}),"\n",(0,s.jsx)(o.li,{children:(0,s.jsx)(o.code,{children:"/predict"})}),"\n"]})]})}function y(e={}){const{wrapper:o}={...(0,r.R)(),...e.components};return o?(0,s.jsx)(o,{...e,children:(0,s.jsx)(u,{...e})}):u(e)}function F(e,o){throw new Error("Expected "+(o?"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/444a6da6.fe9ec445.js b/assets/js/444a6da6.fe9ec445.js deleted file mode 100644 index e6bd6c8e75..0000000000 --- a/assets/js/444a6da6.fe9ec445.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[1193],{11470:(e,t,o)=>{o.d(t,{A:()=>b});var n=o(96540),s=o(18215),r=o(23104),l=o(56347),c=o(205),a=o(57485),p=o(31682),i=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 u(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,p.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 h({value:e,tabValues:t}){return t.some(t=>t.value===e)}function y({queryString:e=!1,groupId:t}){const o=(0,l.W6)(),s=function({queryString:e=!1,groupId:t}){if("string"==typeof e)return e;if(!1===e)return null;if(!0===e&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:e,groupId:t});return[(0,a.aZ)(s),(0,n.useCallback)(e=>{if(!s)return;const t=new URLSearchParams(o.location.search);t.set(s,e),o.replace({...o.location,search:t.toString()})},[s,o])]}function F(e){const{defaultValue:t,queryString:o=!1,groupId:s}=e,r=u(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(!h({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})),[p,d]=y({queryString:o,groupId:s}),[F,f]=function({groupId:e}){const t=function(e){return e?`docusaurus.tab.${e}`:null}(e),[o,s]=(0,i.Dv)(t);return[o,(0,n.useCallback)(e=>{t&&s.set(e)},[t,s])]}({groupId:s}),m=(()=>{const e=p??F;return h({value:e,tabValues:r})?e:null})();(0,c.A)(()=>{m&&a(m)},[m]);return{selectedValue:l,selectValue:(0,n.useCallback)(e=>{if(!h({value:e,tabValues:r}))throw new Error(`Can't select invalid tab value=${e}`);a(e),d(e),f(e)},[d,f,r]),tabValues:r}}var f=o(92303);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var D=o(74848);function k({className:e,block:t,selectedValue:o,selectValue:n,tabValues:l}){const c=[],{blockElementScrollPositionUntilNextRender:a}=(0,r.a_)(),p=e=>{const t=e.currentTarget,s=c.indexOf(t),r=l[s].value;r!==o&&(a(t),n(r))},i=e=>{let t=null;switch(e.key){case"Enter":p(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,D.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,D.jsx)("li",{role:"tab",tabIndex:o===e?0:-1,"aria-selected":o===e,ref:e=>{c.push(e)},onKeyDown:i,onClick:p,...n,className:(0,s.A)("tabs__item",m.tabItem,n?.className,{"tabs__item--active":o===e}),children:t??e},e))})}function x({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,D.jsx)("div",{className:"margin-top--md",children:r.map((e,t)=>(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==o}))})}function g(e){const t=F(e);return(0,D.jsxs)("div",{className:(0,s.A)("tabs-container",m.tabList),children:[(0,D.jsx)(k,{...t,...e}),(0,D.jsx)(x,{...t,...e})]})}function b(e){const t=(0,f.A)();return(0,D.jsx)(g,{...e,children:d(e.children)},String(t))}},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})}},28453:(e,t,o)=>{o.d(t,{R:()=>l,x:()=>c});var n=o(96540);const s={},r=n.createContext(s);function l(e){const t=n.useContext(r);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:l(e.components),n.createElement(r.Provider,{value:t},e.children)}},64742:(e,t,o)=>{o.r(t),o.d(t,{CH:()=>i,assets:()=>p,chCodeConfig:()=>d,contentTitle:()=>a,default:()=>y,frontMatter:()=>c,metadata:()=>n,toc:()=>u});const n=JSON.parse('{"id":"API-Reference/api-flows-run","title":"Flow trigger endpoints","description":"Use the /run and /webhook endpoints to run flows.","source":"@site/docs/API-Reference/api-flows-run.mdx","sourceDirName":"API-Reference","slug":"/api-flows-run","permalink":"/api-flows-run","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Flow trigger endpoints","slug":"/api-flows-run"},"sidebar":"docs","previous":{"title":"Use the TypeScript client","permalink":"/typescript-client"},"next":{"title":"Flow management endpoints","permalink":"/api-flows"}}');var s=o(74848),r=o(28453),l=o(24754);o(11470),o(19365);const c={title:"Flow trigger endpoints",slug:"/api-flows-run"},a=void 0,p={},i={annotations:l.hk,Code:l.Cy},d={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},u=[{value:"Run flow",id:"run-flow",level:2},{value:"Stream LLM token responses",id:"stream-llm-token-responses",level:3},{value:"Run endpoint headers",id:"run-endpoint-headers",level:3},{value:"Run endpoint parameters",id:"run-endpoint-parameters",level:3},{value:"Request example with all headers and parameters",id:"request-example-with-all-headers-and-parameters",level:3},{value:"Webhook run flow",id:"webhook-run-flow",level:2},{value:"Deprecated flow trigger endpoints",id:"deprecated-flow-trigger-endpoints",level:2}];function h(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components},{Details:o}=t;return i||F("CH",!1),i.Code||F("CH.Code",!0),o||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)(t.p,{children:["Use the ",(0,s.jsx)(t.code,{children:"/run"})," and ",(0,s.jsx)(t.code,{children:"/webhook"})," endpoints to run flows."]}),"\n",(0,s.jsxs)(t.p,{children:["To create, read, update, and delete flows, see ",(0,s.jsx)(t.a,{href:"/api-flows",children:"Flow management endpoints"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"run-flow",children:"Run flow"}),"\n",(0,s.jsx)(t.admonition,{type:"tip",children:(0,s.jsxs)(t.p,{children:["Langflow automatically generates Python, JavaScript, and curl code snippets for the ",(0,s.jsx)(t.code,{children:"/v1/run/$FLOW_ID"})," endpoint for all flows.\nFor more information, see ",(0,s.jsx)(t.a,{href:"/concepts-publish#generate-api-code-snippets",children:"Generate API code snippets"}),"."]})}),"\n",(0,s.jsxs)(t.p,{children:["Execute a specified flow by ID or name.\nFlow IDs can be found on the code snippets on the ",(0,s.jsxs)(t.a,{href:"/concepts-publish#api-access",children:[(0,s.jsx)(t.strong,{children:"API access"})," pane"]})," or in a flow's URL."]}),"\n",(0,s.jsxs)(t.p,{children:["The following example runs the ",(0,s.jsx)(t.strong,{children:"Basic Prompting"})," template flow with flow parameters passed in the request body.\nThis flow requires a chat input string (",(0,s.jsx)(t.code,{children:"input_value"}),"), and uses default values for all other parameters."]}),"\n",(0,s.jsx)(i.Code,{codeConfig:d,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_SERVER_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/run/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_value": "Tell me about something interesting!",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "session_id": "chat-123",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_type": "chat",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "output_type": "chat",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "output_component": "",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "tweaks": null',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t.p,{children:["The response from ",(0,s.jsx)(t.code,{children:"/v1/run/$FLOW_ID"})," includes metadata, inputs, and outputs for the run."]}),"\n",(0,s.jsxs)(o,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(t.p,{children:"The following example illustrates a response from a Basic Prompting flow:"}),(0,s.jsx)(i.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "session_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"chat-123"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "outputs"',props:{style:{color:"#7EE787"}}},{content:": [{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "inputs"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "input_value"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Tell me about something interesting!"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "outputs"',props:{style:{color:"#7EE787"}}},{content:": [{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "results"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Sure! Have you ever heard of the phenomenon known as ',props:{style:{color:"#A5D6FF"}}},{content:'\\"',props:{style:{color:"#79C0FF"}}},{content:"bioluminescence",props:{style:{color:"#A5D6FF"}}},{content:'\\"',props:{style:{color:"#79C0FF"}}},{content:"? It's a fascinating natural occurrence where living organisms produce and emit light. This ability is found in various species, including certain types of jellyfish, fireflies, and deep-sea creatures like anglerfish.",props:{style:{color:"#A5D6FF"}}},{content:"\\n\\n",props:{style:{color:"#79C0FF"}}},{content:"Bioluminescence occurs through a chemical reaction in which a light-emitting molecule called luciferin reacts with oxygen, catalyzed by an enzyme called luciferase. The result is a beautiful glow that can serve various purposes, such as attracting mates, deterring predators, or luring prey.",props:{style:{color:"#A5D6FF"}}},{content:"\\n\\n",props:{style:{color:"#79C0FF"}}},{content:"One of the most stunning displays of bioluminescence can be seen in the ocean, where certain plankton emit light when disturbed, creating a mesmerizing blue glow in the water. This phenomenon is often referred to as ",props:{style:{color:"#A5D6FF"}}},{content:'\\"',props:{style:{color:"#79C0FF"}}},{content:"sea sparkle",props:{style:{color:"#A5D6FF"}}},{content:'\\"',props:{style:{color:"#79C0FF"}}},{content:" and can be seen in coastal areas around the world.",props:{style:{color:"#A5D6FF"}}},{content:"\\n\\n",props:{style:{color:"#79C0FF"}}},{content:"Bioluminescence not only captivates our imagination but also has practical applications in science and medicine, including the development of biosensors and imaging techniques. It's a remarkable example of nature's creativity and complexity!\"",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Machine"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"AI"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "session_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"chat-123"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timestamp"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-03-03T17:17:37+00:00"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"d2bbd92b-187e-4c84-b2d4-5df365704201"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "properties"',props:{style:{color:"#7EE787"}}},{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:'"OpenAIModel-d1wOZ"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "display_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"OpenAI"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "source"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"gpt-4o-mini"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "icon"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"OpenAI"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "component_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"ChatOutput-ylMzN"',props:{style:{color:"#A5D6FF"}}}]},{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"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsxs)(t.p,{children:["If you are parsing the response in an application, you most likely need to extract the relevant content from the response, rather than pass the entire response back to the user.\nFor an example of a script that extracts data from a Langflow API response, see the ",(0,s.jsx)(t.a,{href:"/get-started-quickstart",children:"Quickstart"}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"stream-llm-token-responses",children:"Stream LLM token responses"}),"\n",(0,s.jsxs)(t.p,{children:["With ",(0,s.jsx)(t.code,{children:"/v1/run/$FLOW_ID"}),", the flow is executed as a batch with optional LLM token response streaming."]}),"\n",(0,s.jsxs)(t.p,{children:["To stream LLM token responses, append the ",(0,s.jsx)(t.code,{children:"?stream=true"})," query parameter to the request:"]}),"\n",(0,s.jsx)(i.Code,{codeConfig:d,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_SERVER_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/run/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'?stream=true" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "message": "Tell me something interesting!",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "session_id": "chat-123"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t.p,{children:["LLM chat responses are streamed back as ",(0,s.jsx)(t.code,{children:"token"})," events, culminating in a final ",(0,s.jsx)(t.code,{children:"end"})," event that closes the connection."]}),"\n",(0,s.jsxs)(o,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsxs)(t.p,{children:["The following example is truncated to illustrate a series of ",(0,s.jsx)(t.code,{children:"token"})," events as well as the final ",(0,s.jsx)(t.code,{children:"end"})," event that closes the LLM's token streaming response:"]}),(0,s.jsx)(i.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:'{"event": "add_message", "data": {"timestamp": "2025-03-03T17:20:18", "sender": "User", "sender_name": "User", "session_id": "chat-123", "text": "Tell me about something interesting!", "files": [], "error": false, "edit": false, "properties": {"text_color": "", "background_color": "", "edited": false, "source": {"id": null, "display_name": null, "source": null}, "icon": "", "allow_markdown": false, "positive_feedback": null, "state": "complete", "targets": []}, "category": "message", "content_blocks": [], "id": "0103a21b-ebf7-4c02-9d72-017fb297f812", "flow_id": "d2bbd92b-187e-4c84-b2d4-5df365704201"}}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"event": "add_message", "data": {"timestamp": "2025-03-03T17:20:18", "sender": "Machine", "sender_name": "AI", "session_id": "chat-123", "text": "", "files": [], "error": false, "edit": false, "properties": {"text_color": "", "background_color": "", "edited": false, "source": {"id": "OpenAIModel-d1wOZ", "display_name": "OpenAI", "source": "gpt-4o-mini"}, "icon": "OpenAI", "allow_markdown": false, "positive_feedback": null, "state": "complete", "targets": []}, "category": "message", "content_blocks": [], "id": "27b66789-e673-4c65-9e81-021752925161", "flow_id": "d2bbd92b-187e-4c84-b2d4-5df365704201"}}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"event": "token", "data": {"chunk": " Have", "id": "27b66789-e673-4c65-9e81-021752925161", "timestamp": "2025-03-03 17:20:18 UTC"}}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"event": "token", "data": {"chunk": " you", "id": "27b66789-e673-4c65-9e81-021752925161", "timestamp": "2025-03-03 17:20:18 UTC"}}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"event": "token", "data": {"chunk": " ever", "id": "27b66789-e673-4c65-9e81-021752925161", "timestamp": "2025-03-03 17:20:18 UTC"}}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"event": "token", "data": {"chunk": " heard", "id": "27b66789-e673-4c65-9e81-021752925161", "timestamp": "2025-03-03 17:20:18 UTC"}}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"event": "token", "data": {"chunk": " of", "id": "27b66789-e673-4c65-9e81-021752925161", "timestamp": "2025-03-03 17:20:18 UTC"}}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"event": "token", "data": {"chunk": " the", "id": "27b66789-e673-4c65-9e81-021752925161", "timestamp": "2025-03-03 17:20:18 UTC"}}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"event": "token", "data": {"chunk": " phenomenon", "id": "27b66789-e673-4c65-9e81-021752925161", "timestamp": "2025-03-03 17:20:18 UTC"}}',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'{"event": "end", "data": {"result": {"session_id": "chat-123", "message": "Sure! Have you ever heard of the phenomenon known as \\"bioluminescence\\"?..."}}}',props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n",(0,s.jsx)(t.h3,{id:"run-endpoint-headers",children:"Run endpoint headers"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Header"}),(0,s.jsx)(t.th,{children:"Info"}),(0,s.jsx)(t.th,{children:"Example"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"Content-Type"}),(0,s.jsx)(t.td,{children:"Required. Specifies the JSON format."}),(0,s.jsx)(t.td,{children:'"application/json"'})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"accept"}),(0,s.jsx)(t.td,{children:"Optional. Specifies the response format."}),(0,s.jsx)(t.td,{children:'"application/json"'})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"x-api-key"}),(0,s.jsx)(t.td,{children:"Optional. Required only if authentication is enabled."}),(0,s.jsx)(t.td,{children:'"sk-..."'})]})]})]}),"\n",(0,s.jsx)(t.h3,{id:"run-endpoint-parameters",children:"Run endpoint parameters"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Parameter"}),(0,s.jsx)(t.th,{children:"Type"}),(0,s.jsx)(t.th,{children:"Info"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"flow_id"}),(0,s.jsx)(t.td,{children:"UUID/string"}),(0,s.jsxs)(t.td,{children:["Required. Part of URL: ",(0,s.jsx)(t.code,{children:"/run/$FLOW_ID"})]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"stream"}),(0,s.jsx)(t.td,{children:"Boolean"}),(0,s.jsxs)(t.td,{children:["Optional. Query parameter: ",(0,s.jsx)(t.code,{children:"/run/$FLOW_ID?stream=true"})]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"input_value"}),(0,s.jsx)(t.td,{children:"string"}),(0,s.jsxs)(t.td,{children:["Optional. JSON body field. Main input text/prompt. Default: ",(0,s.jsx)(t.code,{children:"null"})]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"input_type"}),(0,s.jsx)(t.td,{children:"string"}),(0,s.jsxs)(t.td,{children:['Optional. JSON body field. Input type ("chat" or "text"). Default: ',(0,s.jsx)(t.code,{children:'"chat"'})]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"output_type"}),(0,s.jsx)(t.td,{children:"string"}),(0,s.jsxs)(t.td,{children:['Optional. JSON body field. Output type ("chat", "any", "debug"). Default: ',(0,s.jsx)(t.code,{children:'"chat"'})]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"output_component"}),(0,s.jsx)(t.td,{children:"string"}),(0,s.jsxs)(t.td,{children:["Optional. JSON body field. Target component for output. Default: ",(0,s.jsx)(t.code,{children:'""'})]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"tweaks"}),(0,s.jsx)(t.td,{children:"object"}),(0,s.jsxs)(t.td,{children:["Optional. JSON body field. Component adjustments. Default: ",(0,s.jsx)(t.code,{children:"null"})]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"session_id"}),(0,s.jsx)(t.td,{children:"string"}),(0,s.jsxs)(t.td,{children:["Optional. JSON body field. Conversation context ID. See ",(0,s.jsx)(t.a,{href:"/session-id",children:"Session ID"}),". Default: ",(0,s.jsx)(t.code,{children:"null"})]})]})]})]}),"\n",(0,s.jsx)(t.h3,{id:"request-example-with-all-headers-and-parameters",children:"Request example with all headers and parameters"}),"\n",(0,s.jsx)(i.Code,{codeConfig:d,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_SERVER_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/run/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'?stream=true" ',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:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_value": "Tell me a story",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_type": "chat",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "output_type": "chat",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "output_component": "chat_output",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "session_id": "chat-123",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "tweaks": {',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "component_id": {',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "parameter_name": "value"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsx)(t.h2,{id:"webhook-run-flow",children:"Webhook run flow"}),"\n",(0,s.jsxs)(t.p,{children:["Use the ",(0,s.jsx)(t.code,{children:"/webhook"})," endpoint to start a flow by sending an HTTP ",(0,s.jsx)(t.code,{children:"POST"})," request."]}),"\n",(0,s.jsx)(t.admonition,{type:"tip",children:(0,s.jsxs)(t.p,{children:["After you add a ",(0,s.jsxs)(t.a,{href:"/components-data#webhook",children:[(0,s.jsx)(t.strong,{children:"Webhook"})," component"]})," to a flow, open the ",(0,s.jsxs)(t.a,{href:"/concepts-publish",children:[(0,s.jsx)(t.strong,{children:"API access"})," pane"]}),", and then click the ",(0,s.jsx)(t.strong,{children:"Webhook curl"})," tab to get an automatically generated ",(0,s.jsx)(t.code,{children:"POST /webhook"})," request for your flow.\nFor more information, see ",(0,s.jsx)(t.a,{href:"/webhook",children:"Trigger flows with webhooks"}),"."]})}),"\n",(0,s.jsx)(i.Code,{codeConfig:d,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_SERVER_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/webhook/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:'\'{"data": "example-data"}\'',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(o,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(i.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Task started in the background"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "status"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"in progress"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(t.h2,{id:"deprecated-flow-trigger-endpoints",children:"Deprecated flow trigger endpoints"}),"\n",(0,s.jsxs)(t.p,{children:["The following endpoints are deprecated and replaced by the ",(0,s.jsx)(t.code,{children:"/run"})," endpoint:"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.code,{children:"/process"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.code,{children:"/predict"})}),"\n"]})]})}function y(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}function F(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/44691977.0577edc0.js b/assets/js/44691977.0577edc0.js deleted file mode 100644 index 5a5e97b43c..0000000000 --- a/assets/js/44691977.0577edc0.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[4876],{17886:(e,n,t)=>{t.d(n,{A:()=>o});t(96540);var r=t(64058),s=t(74848);function o({name:e,...n}){const t=r[e];return t?(0,s.jsx)(t,{...n}):null}},84753:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>i,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"Components/bundles-openrouter","title":"OpenRouter","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-openrouter.mdx","sourceDirName":"Components","slug":"/bundles-openrouter","permalink":"/bundles-openrouter","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"OpenRouter","slug":"/bundles-openrouter"},"sidebar":"docs","previous":{"title":"OpenAI","permalink":"/bundles-openai"},"next":{"title":"Perplexity","permalink":"/bundles-perplexity"}}');var s=t(74848),o=t(28453),d=t(17886);const i={title:"OpenRouter",slug:"/bundles-openrouter"},a=void 0,l={},c=[{value:"OpenRouter text generation",id:"openrouter-text-generation",level:2},{value:"OpenRouter text generation parameters",id:"openrouter-text-generation-parameters",level:3}];function p(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,s.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,s.jsx)(n.strong,{children:"OpenRouter"})," bundle."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information about OpenRouter features and functionality used by OpenRouter components, see the ",(0,s.jsx)(n.a,{href:"https://openrouter.ai/docs",children:"OpenRouter documentation"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"openrouter-text-generation",children:"OpenRouter text generation"}),"\n",(0,s.jsx)(n.p,{children:"This component generates text using OpenRouter's unified API for multiple AI models from different providers."}),"\n",(0,s.jsxs)(n.p,{children:["It can output either a ",(0,s.jsx)(n.strong,{children:"Model Response"})," (",(0,s.jsx)(n.a,{href:"/data-types#message",children:(0,s.jsx)(n.code,{children:"Message"})}),") or a ",(0,s.jsx)(n.strong,{children:"Language Model"})," (",(0,s.jsx)(n.a,{href:"/data-types#languagemodel",children:(0,s.jsx)(n.code,{children:"LanguageModel"})}),")."]}),"\n",(0,s.jsxs)(n.p,{children:["Use the ",(0,s.jsx)(n.strong,{children:"Language Model"})," output when you want to use an OpenRouter model as the LLM for another LLM-driven component, such as a ",(0,s.jsx)(n.strong,{children:"Language Model"})," or ",(0,s.jsx)(n.strong,{children:"Smart Function"})," component."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information, see ",(0,s.jsxs)(n.a,{href:"/components-models",children:[(0,s.jsx)(n.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"openrouter-text-generation-parameters",children:"OpenRouter text generation parameters"}),"\n",(0,s.jsxs)(n.p,{children:["Many ",(0,s.jsx)(n.strong,{children:"OpenRouter"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,s.jsx)(d.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Controls"})," in the ",(0,s.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\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:"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:"api_key"}),(0,s.jsx)(n.td,{children:"SecretString"}),(0,s.jsx)(n.td,{children:"Input parameter. Your OpenRouter API key for authentication."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"site_url"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. Your site URL for OpenRouter rankings (advanced)."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"app_name"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. Your app name for OpenRouter rankings (advanced)."})]}),(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:"Input parameter. The AI model provider to use."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"model_name"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The specific model to use for chat completion."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"temperature"}),(0,s.jsx)(n.td,{children:"Float"}),(0,s.jsx)(n.td,{children:"Input parameter. Controls randomness in the output. Range: [0.0, 2.0]. Default: 0.7."})]}),(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:"Input parameter. The maximum number of tokens to generate (advanced)."})]})]})]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(p,{...e})}):p(e)}}}]); \ No newline at end of file diff --git a/assets/js/44691977.86f58a3f.js b/assets/js/44691977.86f58a3f.js new file mode 100644 index 0000000000..e40c07ace3 --- /dev/null +++ b/assets/js/44691977.86f58a3f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[4876],{17886:(e,n,t)=>{t.d(n,{A:()=>o});t(96540);var r=t(64058),s=t(74848);function o({name:e,...n}){const t=r[e];return t?(0,s.jsx)(t,{...n}):null}},31929:(e,n,t)=>{t.d(n,{Ay:()=>a,RM:()=>d});var r=t(74848),s=t(28453),o=t(17886);const d=[];function i(e){const n={a:"a",p:"p",strong:"strong",...(0,s.R)(),...e.components};return(0,r.jsxs)(n.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,r.jsx)(o.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Controls"})," in the ",(0,r.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function a(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(i,{...e})}):i(e)}},84753:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>i,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"Components/bundles-openrouter","title":"OpenRouter","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-openrouter.mdx","sourceDirName":"Components","slug":"/bundles-openrouter","permalink":"/bundles-openrouter","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"OpenRouter","slug":"/bundles-openrouter"},"sidebar":"docs","previous":{"title":"OpenAI","permalink":"/bundles-openai"},"next":{"title":"Perplexity","permalink":"/bundles-perplexity"}}');var s=t(74848),o=t(28453),d=(t(17886),t(31929));const i={title:"OpenRouter",slug:"/bundles-openrouter"},a=void 0,l={},c=[{value:"OpenRouter text generation",id:"openrouter-text-generation",level:2},{value:"OpenRouter text generation parameters",id:"openrouter-text-generation-parameters",level:3},...d.RM];function p(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,s.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,s.jsx)(n.strong,{children:"OpenRouter"})," bundle."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information about OpenRouter features and functionality used by OpenRouter components, see the ",(0,s.jsx)(n.a,{href:"https://openrouter.ai/docs",children:"OpenRouter documentation"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"openrouter-text-generation",children:"OpenRouter text generation"}),"\n",(0,s.jsx)(n.p,{children:"This component generates text using OpenRouter's unified API for multiple AI models from different providers."}),"\n",(0,s.jsxs)(n.p,{children:["It can output either a ",(0,s.jsx)(n.strong,{children:"Model Response"})," (",(0,s.jsx)(n.a,{href:"/data-types#message",children:(0,s.jsx)(n.code,{children:"Message"})}),") or a ",(0,s.jsx)(n.strong,{children:"Language Model"})," (",(0,s.jsx)(n.a,{href:"/data-types#languagemodel",children:(0,s.jsx)(n.code,{children:"LanguageModel"})}),")."]}),"\n",(0,s.jsxs)(n.p,{children:["Use the ",(0,s.jsx)(n.strong,{children:"Language Model"})," output when you want to use an OpenRouter model as the LLM for another LLM-driven component, such as an ",(0,s.jsx)(n.strong,{children:"Agent"})," or ",(0,s.jsx)(n.strong,{children:"Smart Function"})," component."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information, see ",(0,s.jsxs)(n.a,{href:"/components-models",children:[(0,s.jsx)(n.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"openrouter-text-generation-parameters",children:"OpenRouter text generation parameters"}),"\n",(0,s.jsx)(d.Ay,{}),"\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:"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:"api_key"}),(0,s.jsx)(n.td,{children:"SecretString"}),(0,s.jsx)(n.td,{children:"Input parameter. Your OpenRouter API key for authentication."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"site_url"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. Your site URL for OpenRouter rankings (advanced)."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"app_name"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. Your app name for OpenRouter rankings (advanced)."})]}),(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:"Input parameter. The AI model provider to use."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"model_name"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The specific model to use for chat completion."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"temperature"}),(0,s.jsx)(n.td,{children:"Float"}),(0,s.jsx)(n.td,{children:"Input parameter. Controls randomness in the output. Range: [0.0, 2.0]. Default: 0.7."})]}),(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:"Input parameter. The maximum number of tokens to generate (advanced)."})]})]})]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(p,{...e})}):p(e)}}}]); \ No newline at end of file diff --git a/assets/js/453ae64a.37a1ad59.js b/assets/js/453ae64a.37a1ad59.js new file mode 100644 index 0000000000..08def3352a --- /dev/null +++ b/assets/js/453ae64a.37a1ad59.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[9610],{6137:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>x,frontMatter:()=>o,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"Components/bundles-ibm","title":"IBM","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-ibm.mdx","sourceDirName":"Components","slug":"/bundles-ibm","permalink":"/bundles-ibm","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"IBM","slug":"/bundles-ibm"},"sidebar":"docs","previous":{"title":"Hugging Face","permalink":"/bundles-huggingface"},"next":{"title":"Icosa Computing","permalink":"/bundles-icosacomputing"}}');var i=t(74848),d=t(28453),r=(t(17886),t(31929));const o={title:"IBM",slug:"/bundles-ibm"},a=void 0,l={},c=[{value:"IBM watsonx.ai",id:"ibm-watsonxai",level:2},{value:"IBM watsonx.ai parameters",id:"ibm-watsonxai-parameters",level:3},...r.RM,{value:"IBM watsonx.ai output",id:"ibm-watsonxai-output",level:3},{value:"IBM watsonx.ai Embeddings",id:"ibm-watsonxai-embeddings",level:2},{value:"IBM watsonx.ai Embeddings parameters",id:"ibm-watsonxai-embeddings-parameters",level:3},...r.RM,{value:"Default embedding models",id:"default-embedding-models",level:3},{value:"See also",id:"see-also",level:2}];function h(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,d.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.strong,{children:"IBM"})," bundle provides access to IBM watsonx.ai models for text and embedding generation.\nThese components require an IBM watsonx.ai deployment and watsonx API credentials."]}),"\n",(0,i.jsx)(n.h2,{id:"ibm-watsonxai",children:"IBM watsonx.ai"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.strong,{children:"IBM watsonx.ai"})," component generates text using ",(0,i.jsx)(n.a,{href:"https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/fm-models.html?context=wx",children:"supported foundation models"})," in ",(0,i.jsx)(n.a,{href:"https://www.ibm.com/products/watsonx-ai",children:"IBM watsonx.ai"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"You can use this component anywhere you need a language model in a flow."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"A basic prompting flow using the IBM watsonx.ai component as the central Language Model component.",src:t(68799).A+"",width:"2364",height:"1562"})}),"\n",(0,i.jsx)(n.h3,{id:"ibm-watsonxai-parameters",children:"IBM watsonx.ai parameters"}),"\n",(0,i.jsx)(r.Ay,{}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Name"}),(0,i.jsx)(n.th,{children:"Type"}),(0,i.jsx)(n.th,{children:"Description"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"url"}),(0,i.jsx)(n.td,{children:"String"}),(0,i.jsxs)(n.td,{children:["Input parameter. The ",(0,i.jsx)(n.a,{href:"https://cloud.ibm.com/apidocs/watsonx-ai#endpoint-url",children:"watsonx API base URL"})," for your deployment and region."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"project_id"}),(0,i.jsx)(n.td,{children:"String"}),(0,i.jsxs)(n.td,{children:["Input parameter. Your ",(0,i.jsx)(n.a,{href:"https://www.ibm.com/docs/en/watsonx/saas?topic=projects",children:"watsonx Project ID"}),"."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"api_key"}),(0,i.jsx)(n.td,{children:"SecretString"}),(0,i.jsxs)(n.td,{children:["Input parameter. A ",(0,i.jsx)(n.a,{href:"https://www.ibm.com/docs/en/watsonx/saas?topic=administration-managing-user-api-key",children:"watsonx API key"})," to authenticate watsonx API access to the specified watsonx.ai deployment and model."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"model_name"}),(0,i.jsx)(n.td,{children:"String"}),(0,i.jsx)(n.td,{children:"Input parameter. The name of the watsonx model to use. Options are dynamically fetched from the API."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"max_tokens"}),(0,i.jsx)(n.td,{children:"Integer"}),(0,i.jsxs)(n.td,{children:["Input parameter. The maximum number of tokens to generate. Default: ",(0,i.jsx)(n.code,{children:"1000"}),"."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"stop_sequence"}),(0,i.jsx)(n.td,{children:"String"}),(0,i.jsx)(n.td,{children:"Input parameter. The sequence where generation should stop."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"temperature"}),(0,i.jsx)(n.td,{children:"Float"}),(0,i.jsxs)(n.td,{children:["Input parameter. Controls randomness in the output. Default: ",(0,i.jsx)(n.code,{children:"0.1"}),"."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"top_p"}),(0,i.jsx)(n.td,{children:"Float"}),(0,i.jsxs)(n.td,{children:["Input parameter. Controls nucleus sampling, which limits the model to tokens whose probability is below the ",(0,i.jsx)(n.code,{children:"top_p"})," value. Range: Default: ",(0,i.jsx)(n.code,{children:"0.9"}),"."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"frequency_penalty"}),(0,i.jsx)(n.td,{children:"Float"}),(0,i.jsxs)(n.td,{children:["Input parameter. Controls frequency penalty. A positive value decreases the probability of repeating tokens, and a negative value increases the probability. Range: Default: ",(0,i.jsx)(n.code,{children:"0.5"}),"."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"presence_penalty"}),(0,i.jsx)(n.td,{children:"Float"}),(0,i.jsxs)(n.td,{children:["Input parameter. Controls presence penalty. A positive value increases the likelihood of new topics being introduced. Default: ",(0,i.jsx)(n.code,{children:"0.3"}),"."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"seed"}),(0,i.jsx)(n.td,{children:"Integer"}),(0,i.jsxs)(n.td,{children:["Input parameter. A random seed for the model. Default: ",(0,i.jsx)(n.code,{children:"8"}),"."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"logprobs"}),(0,i.jsx)(n.td,{children:"Boolean"}),(0,i.jsx)(n.td,{children:"Input parameter. Whether to return log probabilities of output tokens or not. Default: true."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"top_logprobs"}),(0,i.jsx)(n.td,{children:"Integer"}),(0,i.jsxs)(n.td,{children:["Input parameter. The number of most likely tokens to return at each position. Default: ",(0,i.jsx)(n.code,{children:"3"}),"."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"logit_bias"}),(0,i.jsx)(n.td,{children:"String"}),(0,i.jsx)(n.td,{children:"Input parameter. A JSON string of token IDs to bias or suppress."})]})]})]}),"\n",(0,i.jsx)(n.h3,{id:"ibm-watsonxai-output",children:"IBM watsonx.ai output"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.strong,{children:"IBM watsonx.ai"})," component can output either a ",(0,i.jsx)(n.strong,{children:"Model Response"})," (",(0,i.jsx)(n.a,{href:"/data-types#message",children:(0,i.jsx)(n.code,{children:"Message"})}),") or a ",(0,i.jsx)(n.strong,{children:"Language Model"})," (",(0,i.jsx)(n.a,{href:"/data-types#languagemodel",children:(0,i.jsx)(n.code,{children:"LanguageModel"})}),")."]}),"\n",(0,i.jsxs)(n.p,{children:["Use the ",(0,i.jsx)(n.strong,{children:"Language Model"})," output when you want to use an IBM watsonx.ai model as the LLM for another LLM-driven component, such as an ",(0,i.jsx)(n.strong,{children:"Agent"})," or ",(0,i.jsx)(n.strong,{children:"Smart Function"})," component.\nFor more information, see ",(0,i.jsxs)(n.a,{href:"/components-models",children:[(0,i.jsx)(n.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"LanguageModel"})," output from the ",(0,i.jsx)(n.strong,{children:"IBM watsonx.ai"})," component is an instance of ",(0,i.jsx)(n.a,{href:"https://python.langchain.com/docs/integrations/chat/ibm_watsonx/",children:"ChatWatsonx"})," configured according to the ",(0,i.jsx)(n.a,{href:"#ibm-watsonxai-parameters",children:"component's parameters"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"ibm-watsonxai-embeddings",children:"IBM watsonx.ai Embeddings"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.strong,{children:"IBM watsonx.ai Embeddings"})," component uses the ",(0,i.jsx)(n.a,{href:"https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/fm-models.html?context=wx",children:"supported foundation models"})," in ",(0,i.jsx)(n.a,{href:"https://www.ibm.com/products/watsonx-ai",children:"IBM watsonx.ai"})," for embedding generation."]}),"\n",(0,i.jsxs)(n.p,{children:["The output is ",(0,i.jsx)(n.a,{href:"/data-types#embeddings",children:(0,i.jsx)(n.code,{children:"Embeddings"})})," generated with ",(0,i.jsx)(n.a,{href:"https://python.langchain.com/docs/integrations/text_embedding/ibm_watsonx/",children:(0,i.jsx)(n.code,{children:"WatsonxEmbeddings"})}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["For more information about using embedding model components in flows, see ",(0,i.jsxs)(n.a,{href:"/components-embedding-models",children:[(0,i.jsx)(n.strong,{children:"Embedding Model"})," components"]}),"."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"A basic embedding generation flow using the IBM watsonx.ai Embeddings component",src:t(96425).A+"",width:"1714",height:"1486"})}),"\n",(0,i.jsx)(n.h3,{id:"ibm-watsonxai-embeddings-parameters",children:"IBM watsonx.ai Embeddings parameters"}),"\n",(0,i.jsx)(r.Ay,{}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Name"}),(0,i.jsx)(n.th,{children:"Display Name"}),(0,i.jsx)(n.th,{children:"Info"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"url"}),(0,i.jsx)(n.td,{children:"watsonx API Endpoint"}),(0,i.jsxs)(n.td,{children:["Input parameter. The ",(0,i.jsx)(n.a,{href:"https://cloud.ibm.com/apidocs/watsonx-ai#endpoint-url",children:"watsonx API base URL"})," for your deployment and region."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"project_id"}),(0,i.jsx)(n.td,{children:"watsonx project id"}),(0,i.jsxs)(n.td,{children:["Input parameter. Your ",(0,i.jsx)(n.a,{href:"https://www.ibm.com/docs/en/watsonx/saas?topic=projects",children:"watsonx Project ID"}),"."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"api_key"}),(0,i.jsx)(n.td,{children:"API Key"}),(0,i.jsxs)(n.td,{children:["Input parameter. A ",(0,i.jsx)(n.a,{href:"https://www.ibm.com/docs/en/watsonx/saas?topic=administration-managing-user-api-key",children:"watsonx API key"})," to authenticate watsonx API access to the specified watsonx.ai deployment and model."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"model_name"}),(0,i.jsx)(n.td,{children:"Model Name"}),(0,i.jsxs)(n.td,{children:["Input parameter. The name of the embedding model to use. Supports ",(0,i.jsx)(n.a,{href:"#default-embedding-models",children:"default embedding models"})," and automatically updates after connecting to your watsonx.ai deployment."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"truncate_input_tokens"}),(0,i.jsx)(n.td,{children:"Truncate Input Tokens"}),(0,i.jsxs)(n.td,{children:["Input parameter. The maximum number of tokens to process. Default: ",(0,i.jsx)(n.code,{children:"200"}),"."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"input_text"}),(0,i.jsx)(n.td,{children:"Include the original text in the output"}),(0,i.jsx)(n.td,{children:"Input parameter. Determines if the original text is included in the output. Default: true."})]})]})]}),"\n",(0,i.jsx)(n.h3,{id:"default-embedding-models",children:"Default embedding models"}),"\n",(0,i.jsxs)(n.p,{children:["By default, the ",(0,i.jsx)(n.strong,{children:"IBM watsonx.ai Embeddings"})," component supports the following default models:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"sentence-transformers/all-minilm-l12-v2"}),": 384-dimensional embeddings"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"ibm/slate-125m-english-rtrvr-v2"}),": 768-dimensional embeddings"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"ibm/slate-30m-english-rtrvr-v2"}),": 768-dimensional embeddings"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"intfloat/multilingual-e5-large"}),": 1024-dimensional embeddings"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"After entering your API endpoint and credentials, the component automatically fetches the list of available models from your watsonx.ai deployment."}),"\n",(0,i.jsx)(n.h2,{id:"see-also",children:"See also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://cloud.ibm.com/docs",children:"IBM documentation"})}),"\n"]})]})}function x(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},17886:(e,n,t)=>{t.d(n,{A:()=>d});t(96540);var s=t(64058),i=t(74848);function d({name:e,...n}){const t=s[e];return t?(0,i.jsx)(t,{...n}):null}},31929:(e,n,t)=>{t.d(n,{Ay:()=>a,RM:()=>r});var s=t(74848),i=t(28453),d=t(17886);const r=[];function o(e){const n={a:"a",p:"p",strong:"strong",...(0,i.R)(),...e.components};return(0,s.jsxs)(n.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,s.jsx)(d.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Controls"})," in the ",(0,s.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function a(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(o,{...e})}):o(e)}},68799:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/component-watsonx-model-2f388a824b49f1c49287f07bc8738d0f.png"},96425:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/component-watsonx-embeddings-chroma-591e45d59ab635d1e1e68ab8036cfed7.png"}}]); \ No newline at end of file diff --git a/assets/js/453ae64a.5b9bae34.js b/assets/js/453ae64a.5b9bae34.js deleted file mode 100644 index 3c990dad59..0000000000 --- a/assets/js/453ae64a.5b9bae34.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[9610],{6137:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>m,frontMatter:()=>r,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"Components/bundles-ibm","title":"IBM","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-ibm.mdx","sourceDirName":"Components","slug":"/bundles-ibm","permalink":"/bundles-ibm","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"IBM","slug":"/bundles-ibm"},"sidebar":"docs","previous":{"title":"Hugging Face","permalink":"/bundles-huggingface"},"next":{"title":"Icosa Computing","permalink":"/bundles-icosacomputing"}}');var i=t(74848),d=t(28453),o=t(17886);const r={title:"IBM",slug:"/bundles-ibm"},a=void 0,l={},c=[{value:"IBM watsonx.ai",id:"ibm-watsonxai",level:2},{value:"IBM watsonx.ai parameters",id:"ibm-watsonxai-parameters",level:3},{value:"IBM watsonx.ai output",id:"ibm-watsonxai-output",level:3},{value:"IBM watsonx.ai Embeddings",id:"ibm-watsonxai-embeddings",level:2},{value:"IBM watsonx.ai Embeddings parameters",id:"ibm-watsonxai-embeddings-parameters",level:3},{value:"Default embedding models",id:"default-embedding-models",level:3},{value:"See also",id:"see-also",level:2}];function h(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,d.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.strong,{children:"IBM"})," bundle provides access to IBM watsonx.ai models for text and embedding generation.\nThese components require an IBM watsonx.ai deployment and watsonx API credentials."]}),"\n",(0,i.jsx)(n.h2,{id:"ibm-watsonxai",children:"IBM watsonx.ai"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.strong,{children:"IBM watsonx.ai"})," component generates text using ",(0,i.jsx)(n.a,{href:"https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/fm-models.html?context=wx",children:"supported foundation models"})," in ",(0,i.jsx)(n.a,{href:"https://www.ibm.com/products/watsonx-ai",children:"IBM watsonx.ai"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"You can use this component anywhere you need a language model in a flow."}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"A basic prompting flow using the IBM watsonx.ai component as the central Language Model component.",src:t(68799).A+"",width:"2364",height:"1562"})}),"\n",(0,i.jsx)(n.h3,{id:"ibm-watsonxai-parameters",children:"IBM watsonx.ai parameters"}),"\n",(0,i.jsxs)(n.p,{children:["Many ",(0,i.jsx)(n.strong,{children:"IBM watsonx.ai"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,i.jsx)(o.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,i.jsx)(n.strong,{children:"Controls"})," in the ",(0,i.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Name"}),(0,i.jsx)(n.th,{children:"Type"}),(0,i.jsx)(n.th,{children:"Description"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"url"}),(0,i.jsx)(n.td,{children:"String"}),(0,i.jsxs)(n.td,{children:["Input parameter. The ",(0,i.jsx)(n.a,{href:"https://cloud.ibm.com/apidocs/watsonx-ai#endpoint-url",children:"watsonx API base URL"})," for your deployment and region."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"project_id"}),(0,i.jsx)(n.td,{children:"String"}),(0,i.jsxs)(n.td,{children:["Input parameter. Your ",(0,i.jsx)(n.a,{href:"https://www.ibm.com/docs/en/watsonx/saas?topic=projects",children:"watsonx Project ID"}),"."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"api_key"}),(0,i.jsx)(n.td,{children:"SecretString"}),(0,i.jsxs)(n.td,{children:["Input parameter. A ",(0,i.jsx)(n.a,{href:"https://www.ibm.com/docs/en/watsonx/saas?topic=administration-managing-user-api-key",children:"watsonx API key"})," to authenticate watsonx API access to the specified watsonx.ai deployment and model."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"model_name"}),(0,i.jsx)(n.td,{children:"String"}),(0,i.jsx)(n.td,{children:"Input parameter. The name of the watsonx model to use. Options are dynamically fetched from the API."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"max_tokens"}),(0,i.jsx)(n.td,{children:"Integer"}),(0,i.jsxs)(n.td,{children:["Input parameter. The maximum number of tokens to generate. Default: ",(0,i.jsx)(n.code,{children:"1000"}),"."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"stop_sequence"}),(0,i.jsx)(n.td,{children:"String"}),(0,i.jsx)(n.td,{children:"Input parameter. The sequence where generation should stop."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"temperature"}),(0,i.jsx)(n.td,{children:"Float"}),(0,i.jsxs)(n.td,{children:["Input parameter. Controls randomness in the output. Default: ",(0,i.jsx)(n.code,{children:"0.1"}),"."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"top_p"}),(0,i.jsx)(n.td,{children:"Float"}),(0,i.jsxs)(n.td,{children:["Input parameter. Controls nucleus sampling, which limits the model to tokens whose probability is below the ",(0,i.jsx)(n.code,{children:"top_p"})," value. Range: Default: ",(0,i.jsx)(n.code,{children:"0.9"}),"."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"frequency_penalty"}),(0,i.jsx)(n.td,{children:"Float"}),(0,i.jsxs)(n.td,{children:["Input parameter. Controls frequency penalty. A positive value decreases the probability of repeating tokens, and a negative value increases the probability. Range: Default: ",(0,i.jsx)(n.code,{children:"0.5"}),"."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"presence_penalty"}),(0,i.jsx)(n.td,{children:"Float"}),(0,i.jsxs)(n.td,{children:["Input parameter. Controls presence penalty. A positive value increases the likelihood of new topics being introduced. Default: ",(0,i.jsx)(n.code,{children:"0.3"}),"."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"seed"}),(0,i.jsx)(n.td,{children:"Integer"}),(0,i.jsxs)(n.td,{children:["Input parameter. A random seed for the model. Default: ",(0,i.jsx)(n.code,{children:"8"}),"."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"logprobs"}),(0,i.jsx)(n.td,{children:"Boolean"}),(0,i.jsx)(n.td,{children:"Input parameter. Whether to return log probabilities of output tokens or not. Default: true."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"top_logprobs"}),(0,i.jsx)(n.td,{children:"Integer"}),(0,i.jsxs)(n.td,{children:["Input parameter. The number of most likely tokens to return at each position. Default: ",(0,i.jsx)(n.code,{children:"3"}),"."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"logit_bias"}),(0,i.jsx)(n.td,{children:"String"}),(0,i.jsx)(n.td,{children:"Input parameter. A JSON string of token IDs to bias or suppress."})]})]})]}),"\n",(0,i.jsx)(n.h3,{id:"ibm-watsonxai-output",children:"IBM watsonx.ai output"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.strong,{children:"IBM watsonx.ai"})," component can output either a ",(0,i.jsx)(n.strong,{children:"Model Response"})," (",(0,i.jsx)(n.a,{href:"/data-types#message",children:(0,i.jsx)(n.code,{children:"Message"})}),") or a ",(0,i.jsx)(n.strong,{children:"Language Model"})," (",(0,i.jsx)(n.a,{href:"/data-types#languagemodel",children:(0,i.jsx)(n.code,{children:"LanguageModel"})}),")."]}),"\n",(0,i.jsxs)(n.p,{children:["Use the ",(0,i.jsx)(n.strong,{children:"Language Model"})," output when you want to use an IBM watsonx.ai model as the LLM for another LLM-driven component, such as a ",(0,i.jsx)(n.strong,{children:"Language Model"})," or ",(0,i.jsx)(n.strong,{children:"Smart Function"})," component.\nFor more information, see ",(0,i.jsxs)(n.a,{href:"/components-models",children:[(0,i.jsx)(n.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.code,{children:"LanguageModel"})," output from the ",(0,i.jsx)(n.strong,{children:"IBM watsonx.ai"})," component is an instance of ",(0,i.jsx)(n.a,{href:"https://python.langchain.com/docs/integrations/chat/ibm_watsonx/",children:"ChatWatsonx"})," configured according to the ",(0,i.jsx)(n.a,{href:"#ibm-watsonxai-parameters",children:"component's parameters"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"ibm-watsonxai-embeddings",children:"IBM watsonx.ai Embeddings"}),"\n",(0,i.jsxs)(n.p,{children:["The ",(0,i.jsx)(n.strong,{children:"IBM watsonx.ai Embeddings"})," component uses the ",(0,i.jsx)(n.a,{href:"https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/fm-models.html?context=wx",children:"supported foundation models"})," in ",(0,i.jsx)(n.a,{href:"https://www.ibm.com/products/watsonx-ai",children:"IBM watsonx.ai"})," for embedding generation."]}),"\n",(0,i.jsxs)(n.p,{children:["The output is ",(0,i.jsx)(n.a,{href:"/data-types#embeddings",children:(0,i.jsx)(n.code,{children:"Embeddings"})})," generated with ",(0,i.jsx)(n.a,{href:"https://python.langchain.com/docs/integrations/text_embedding/ibm_watsonx/",children:(0,i.jsx)(n.code,{children:"WatsonxEmbeddings"})}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["For more information about using embedding model components in flows, see ",(0,i.jsxs)(n.a,{href:"/components-embedding-models",children:[(0,i.jsx)(n.strong,{children:"Embedding Model"})," components"]}),"."]}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"A basic embedding generation flow using the IBM watsonx.ai Embeddings component",src:t(96425).A+"",width:"1714",height:"1486"})}),"\n",(0,i.jsx)(n.h3,{id:"ibm-watsonxai-embeddings-parameters",children:"IBM watsonx.ai Embeddings parameters"}),"\n",(0,i.jsxs)(n.p,{children:["Some ",(0,i.jsx)(n.strong,{children:"IBM watsonx.ai Embeddings"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,i.jsx)(o.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,i.jsx)(n.strong,{children:"Controls"})," in the ",(0,i.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Name"}),(0,i.jsx)(n.th,{children:"Display Name"}),(0,i.jsx)(n.th,{children:"Info"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"url"}),(0,i.jsx)(n.td,{children:"watsonx API Endpoint"}),(0,i.jsxs)(n.td,{children:["Input parameter. The ",(0,i.jsx)(n.a,{href:"https://cloud.ibm.com/apidocs/watsonx-ai#endpoint-url",children:"watsonx API base URL"})," for your deployment and region."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"project_id"}),(0,i.jsx)(n.td,{children:"watsonx project id"}),(0,i.jsxs)(n.td,{children:["Input parameter. Your ",(0,i.jsx)(n.a,{href:"https://www.ibm.com/docs/en/watsonx/saas?topic=projects",children:"watsonx Project ID"}),"."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"api_key"}),(0,i.jsx)(n.td,{children:"API Key"}),(0,i.jsxs)(n.td,{children:["Input parameter. A ",(0,i.jsx)(n.a,{href:"https://www.ibm.com/docs/en/watsonx/saas?topic=administration-managing-user-api-key",children:"watsonx API key"})," to authenticate watsonx API access to the specified watsonx.ai deployment and model."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"model_name"}),(0,i.jsx)(n.td,{children:"Model Name"}),(0,i.jsxs)(n.td,{children:["Input parameter. The name of the embedding model to use. Supports ",(0,i.jsx)(n.a,{href:"#default-embedding-models",children:"default embedding models"})," and automatically updates after connecting to your watsonx.ai deployment."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"truncate_input_tokens"}),(0,i.jsx)(n.td,{children:"Truncate Input Tokens"}),(0,i.jsxs)(n.td,{children:["Input parameter. The maximum number of tokens to process. Default: ",(0,i.jsx)(n.code,{children:"200"}),"."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:"input_text"}),(0,i.jsx)(n.td,{children:"Include the original text in the output"}),(0,i.jsx)(n.td,{children:"Input parameter. Determines if the original text is included in the output. Default: true."})]})]})]}),"\n",(0,i.jsx)(n.h3,{id:"default-embedding-models",children:"Default embedding models"}),"\n",(0,i.jsxs)(n.p,{children:["By default, the ",(0,i.jsx)(n.strong,{children:"IBM watsonx.ai Embeddings"})," component supports the following default models:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"sentence-transformers/all-minilm-l12-v2"}),": 384-dimensional embeddings"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"ibm/slate-125m-english-rtrvr-v2"}),": 768-dimensional embeddings"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"ibm/slate-30m-english-rtrvr-v2"}),": 768-dimensional embeddings"]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.code,{children:"intfloat/multilingual-e5-large"}),": 1024-dimensional embeddings"]}),"\n"]}),"\n",(0,i.jsx)(n.p,{children:"After entering your API endpoint and credentials, the component automatically fetches the list of available models from your watsonx.ai deployment."}),"\n",(0,i.jsx)(n.h2,{id:"see-also",children:"See also"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:(0,i.jsx)(n.a,{href:"https://cloud.ibm.com/docs",children:"IBM documentation"})}),"\n"]})]})}function m(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}},17886:(e,n,t)=>{t.d(n,{A:()=>d});t(96540);var s=t(64058),i=t(74848);function d({name:e,...n}){const t=s[e];return t?(0,i.jsx)(t,{...n}):null}},68799:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/component-watsonx-model-2f388a824b49f1c49287f07bc8738d0f.png"},96425:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/component-watsonx-embeddings-chroma-591e45d59ab635d1e1e68ab8036cfed7.png"}}]); \ No newline at end of file diff --git a/assets/js/46abd5bb.27675ca8.js b/assets/js/46abd5bb.27675ca8.js deleted file mode 100644 index aeebc5f371..0000000000 --- a/assets/js/46abd5bb.27675ca8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[2457],{17886:(e,t,n)=>{n.d(t,{A:()=>i});n(96540);var r=n(64058),s=n(74848);function i({name:e,...t}){const n=r[e];return n?(0,s.jsx)(n,{...t}):null}},76505:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>a,default:()=>h,frontMatter:()=>l,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"Components/bundles-perplexity","title":"Perplexity","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-perplexity.mdx","sourceDirName":"Components","slug":"/bundles-perplexity","permalink":"/bundles-perplexity","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Perplexity","slug":"/bundles-perplexity"},"sidebar":"docs","previous":{"title":"OpenRouter","permalink":"/bundles-openrouter"},"next":{"title":"Redis","permalink":"/bundles-redis"}}');var s=n(74848),i=n(28453),o=n(17886);const l={title:"Perplexity",slug:"/bundles-perplexity"},a=void 0,d={},c=[{value:"Perplexity text generation",id:"perplexity-text-generation",level:2},{value:"Perplexity text generation parameters",id:"perplexity-text-generation-parameters",level:3}];function p(e){const t={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,s.jsxs)(t.p,{children:["This page describes the components that are available in the ",(0,s.jsx)(t.strong,{children:"Perplexity"})," bundle."]}),"\n",(0,s.jsxs)(t.p,{children:["For more information about Perplexity features and functionality used by Perplexity components, see the ",(0,s.jsx)(t.a,{href:"https://perplexity.ai/",children:"Perplexity documentation"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"perplexity-text-generation",children:"Perplexity text generation"}),"\n",(0,s.jsx)(t.p,{children:"This component generates text using Perplexity's language models."}),"\n",(0,s.jsxs)(t.p,{children:["It can output either a ",(0,s.jsx)(t.strong,{children:"Model Response"})," (",(0,s.jsx)(t.a,{href:"/data-types#message",children:(0,s.jsx)(t.code,{children:"Message"})}),") or a ",(0,s.jsx)(t.strong,{children:"Language Model"})," (",(0,s.jsx)(t.a,{href:"/data-types#languagemodel",children:(0,s.jsx)(t.code,{children:"LanguageModel"})}),")."]}),"\n",(0,s.jsxs)(t.p,{children:["Use the ",(0,s.jsx)(t.strong,{children:"Language Model"})," output when you want to use a Perplexity model as the LLM for another LLM-driven component, such as a ",(0,s.jsx)(t.strong,{children:"Language Model"})," or ",(0,s.jsx)(t.strong,{children:"Smart Function"})," component."]}),"\n",(0,s.jsxs)(t.p,{children:["For more information, see ",(0,s.jsxs)(t.a,{href:"/components-models",children:[(0,s.jsx)(t.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"perplexity-text-generation-parameters",children:"Perplexity text generation parameters"}),"\n",(0,s.jsxs)(t.p,{children:["Many ",(0,s.jsx)(t.strong,{children:"Perplexity"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,s.jsx)(o.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(t.strong,{children:"Controls"})," in the ",(0,s.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Type"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"model_name"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsx)(t.td,{children:"Input parameter. The name of the Perplexity model to use. Options include various Llama 3.1 models."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"max_tokens"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsx)(t.td,{children:"Input parameter. The maximum number of tokens to generate."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"api_key"}),(0,s.jsx)(t.td,{children:"SecretString"}),(0,s.jsx)(t.td,{children:"Input parameter. The Perplexity API Key for authentication."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"temperature"}),(0,s.jsx)(t.td,{children:"Float"}),(0,s.jsx)(t.td,{children:"Input parameter. Controls randomness in the output. Default: 0.75."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"top_p"}),(0,s.jsx)(t.td,{children:"Float"}),(0,s.jsx)(t.td,{children:"Input parameter. The maximum cumulative probability of tokens to consider when sampling (advanced)."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"n"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsx)(t.td,{children:"Input parameter. Number of chat completions to generate for each prompt (advanced)."})]})]})]})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(p,{...e})}):p(e)}}}]); \ No newline at end of file diff --git a/assets/js/46abd5bb.d3b58293.js b/assets/js/46abd5bb.d3b58293.js new file mode 100644 index 0000000000..02cc42f9c4 --- /dev/null +++ b/assets/js/46abd5bb.d3b58293.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[2457],{17886:(e,t,n)=>{n.d(t,{A:()=>i});n(96540);var r=n(64058),s=n(74848);function i({name:e,...t}){const n=r[e];return n?(0,s.jsx)(n,{...t}):null}},31929:(e,t,n)=>{n.d(t,{Ay:()=>l,RM:()=>o});var r=n(74848),s=n(28453),i=n(17886);const o=[];function a(e){const t={a:"a",p:"p",strong:"strong",...(0,s.R)(),...e.components};return(0,r.jsxs)(t.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,r.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Controls"})," in the ",(0,r.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function l(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}},76505:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>l,default:()=>h,frontMatter:()=>a,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"Components/bundles-perplexity","title":"Perplexity","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-perplexity.mdx","sourceDirName":"Components","slug":"/bundles-perplexity","permalink":"/bundles-perplexity","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Perplexity","slug":"/bundles-perplexity"},"sidebar":"docs","previous":{"title":"OpenRouter","permalink":"/bundles-openrouter"},"next":{"title":"Redis","permalink":"/bundles-redis"}}');var s=n(74848),i=n(28453),o=(n(17886),n(31929));const a={title:"Perplexity",slug:"/bundles-perplexity"},l=void 0,d={},c=[{value:"Perplexity text generation",id:"perplexity-text-generation",level:2},{value:"Perplexity text generation parameters",id:"perplexity-text-generation-parameters",level:3},...o.RM];function p(e){const t={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,s.jsxs)(t.p,{children:["This page describes the components that are available in the ",(0,s.jsx)(t.strong,{children:"Perplexity"})," bundle."]}),"\n",(0,s.jsxs)(t.p,{children:["For more information about Perplexity features and functionality used by Perplexity components, see the ",(0,s.jsx)(t.a,{href:"https://perplexity.ai/",children:"Perplexity documentation"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"perplexity-text-generation",children:"Perplexity text generation"}),"\n",(0,s.jsx)(t.p,{children:"This component generates text using Perplexity's language models."}),"\n",(0,s.jsxs)(t.p,{children:["It can output either a ",(0,s.jsx)(t.strong,{children:"Model Response"})," (",(0,s.jsx)(t.a,{href:"/data-types#message",children:(0,s.jsx)(t.code,{children:"Message"})}),") or a ",(0,s.jsx)(t.strong,{children:"Language Model"})," (",(0,s.jsx)(t.a,{href:"/data-types#languagemodel",children:(0,s.jsx)(t.code,{children:"LanguageModel"})}),")."]}),"\n",(0,s.jsxs)(t.p,{children:["Use the ",(0,s.jsx)(t.strong,{children:"Language Model"})," output when you want to use a Perplexity model as the LLM for another LLM-driven component, such as an ",(0,s.jsx)(t.strong,{children:"Agent"})," or ",(0,s.jsx)(t.strong,{children:"Smart Function"})," component."]}),"\n",(0,s.jsxs)(t.p,{children:["For more information, see ",(0,s.jsxs)(t.a,{href:"/components-models",children:[(0,s.jsx)(t.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"perplexity-text-generation-parameters",children:"Perplexity text generation parameters"}),"\n",(0,s.jsx)(o.Ay,{}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Type"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"model_name"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsx)(t.td,{children:"Input parameter. The name of the Perplexity model to use. Options include various Llama 3.1 models."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"max_tokens"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsx)(t.td,{children:"Input parameter. The maximum number of tokens to generate."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"api_key"}),(0,s.jsx)(t.td,{children:"SecretString"}),(0,s.jsx)(t.td,{children:"Input parameter. The Perplexity API Key for authentication."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"temperature"}),(0,s.jsx)(t.td,{children:"Float"}),(0,s.jsx)(t.td,{children:"Input parameter. Controls randomness in the output. Default: 0.75."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"top_p"}),(0,s.jsx)(t.td,{children:"Float"}),(0,s.jsx)(t.td,{children:"Input parameter. The maximum cumulative probability of tokens to consider when sampling (advanced)."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"n"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsx)(t.td,{children:"Input parameter. Number of chat completions to generate for each prompt (advanced)."})]})]})]})]})}function h(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(p,{...e})}):p(e)}}}]); \ No newline at end of file diff --git a/assets/js/46d346a5.cf5052ec.js b/assets/js/46d346a5.7813004f.js similarity index 99% rename from assets/js/46d346a5.cf5052ec.js rename to assets/js/46d346a5.7813004f.js index 8ee1ee4436..05c2cfdca7 100644 --- a/assets/js/46d346a5.cf5052ec.js +++ b/assets/js/46d346a5.7813004f.js @@ -1 +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),c=o(56347),a=o(205),l=o(57485),i=o(31682),d=o(70679);function p(e){return n.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)})?.filter(Boolean)??[]}function h(e){const{values:t,children:o}=e;return(0,n.useMemo)(()=>{const e=t??function(e){return p(e).map(({props:{value:e,label:t,attributes:o,default:n}})=>({value:e,label:t,attributes:o,default:n}))}(o);return function(e){const t=(0,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 m({queryString:e=!1,groupId:t}){const o=(0,c.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,l.aZ)(s),(0,n.useCallback)(e=>{if(!s)return;const t=new URLSearchParams(o.location.search);t.set(s,e),o.replace({...o.location,search:t.toString()})},[s,o])]}function y(e){const{defaultValue:t,queryString:o=!1,groupId:s}=e,r=h(e),[c,l]=(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,p]=m({queryString:o,groupId:s}),[y,x]=function({groupId:e}){const t=function(e){return e?`docusaurus.tab.${e}`:null}(e),[o,s]=(0,d.Dv)(t);return[o,(0,n.useCallback)(e=>{t&&s.set(e)},[t,s])]}({groupId:s}),g=(()=>{const e=i??y;return u({value:e,tabValues:r})?e:null})();(0,a.A)(()=>{g&&l(g)},[g]);return{selectedValue:c,selectValue:(0,n.useCallback)(e=>{if(!u({value:e,tabValues:r}))throw new Error(`Can't select invalid tab value=${e}`);l(e),p(e),x(e)},[p,x,r]),tabValues:r}}var x=o(92303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var j=o(74848);function f({className:e,block:t,selectedValue:o,selectValue:n,tabValues:c}){const a=[],{blockElementScrollPositionUntilNextRender:l}=(0,r.a_)(),i=e=>{const t=e.currentTarget,s=a.indexOf(t),r=c[s].value;r!==o&&(l(t),n(r))},d=e=>{let t=null;switch(e.key){case"Enter":i(e);break;case"ArrowRight":{const o=a.indexOf(e.currentTarget)+1;t=a[o]??a[0];break}case"ArrowLeft":{const o=a.indexOf(e.currentTarget)-1;t=a[o]??a[a.length-1];break}}t?.focus()};return(0,j.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":t},e),children:c.map(({value:e,label:t,attributes:n})=>(0,j.jsx)("li",{role:"tab",tabIndex:o===e?0:-1,"aria-selected":o===e,ref:e=>{a.push(e)},onKeyDown:d,onClick:i,...n,className:(0,s.A)("tabs__item",g.tabItem,n?.className,{"tabs__item--active":o===e}),children:t??e},e))})}function D({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,j.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=y(e);return(0,j.jsxs)("div",{className:(0,s.A)("tabs-container",g.tabList),children:[(0,j.jsx)(f,{...t,...e}),(0,j.jsx)(D,{...t,...e})]})}function C(e){const t=(0,x.A)();return(0,j.jsx)(b,{...e,children:p(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:()=>c});o(96540);var n=o(18215);const s={tabItem:"tabItem_Ymn6"};var r=o(74848);function c({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:()=>m,contentTitle:()=>p,default:()=>g,frontMatter:()=>d,metadata:()=>n,toc:()=>y});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":"Telemetry","permalink":"/contributing-telemetry"},"next":{"title":"Use voice mode","permalink":"/concepts-voice-mode"}}');var s=o(74848),r=o(28453),c=o(24754),a=o(11470),l=o(19365),i=o(17886);const d={title:"Langflow data types",slug:"/data-types"},p=void 0,h={},u={annotations:c.hk,Code:c.Cy},m={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},y=[{value:"Data",id:"data",level:2},{value:"Schema and attributes",id:"schema-and-attributes",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, structure, and attributes",id:"schema-structure-and-attributes",level:3},{value:"Message data in Input and Output components",id:"message-data-in-input-and-output-components",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},{Details:o}=t;return u||j("CH",!1),u.Code||j("CH.Code",!0),o||j("Details",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n","\n",(0,s.jsx)(t.p,{children:"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.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["In the ",(0,s.jsx)(t.a,{href:"/concepts-overview#workspace",children:"workspace"}),", hover over a port to see connection details for that port."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Click a port to filter the ",(0,s.jsx)(t.strong,{children:"Components"})," menu by compatible components."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["If two components have incompatible data types, you can use a processing component like the ",(0,s.jsxs)(t.a,{href:"/components-processing#type-convert",children:[(0,s.jsx)(t.strong,{children:"Type Convert"})," component"]})," to convert the data between components."]}),"\n"]}),"\n"]})}),"\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 ",(0,s.jsx)(t.code,{children:"Data"})," object stores key-value pairs within the ",(0,s.jsx)(t.code,{children:".data"})," attribute. This is the ",(0,s.jsx)(t.code,{children:"Data"})," object's core dictionary. Each key is a field name, and the values can be any supported data type."]}),"\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)(u.Code,{codeConfig:m,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"}}}]},{tokens:[{content:" data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"{",props:{style:{color:"#C9D1D9"}}}]},{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"}}}]},{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.\nFor example, when serialized into JSON, the previous Python example becomes the following JSON object:"]}),"\n",(0,s.jsx)(u.Code,{codeConfig:m,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:'"Hello world"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Charlie"',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"}}}]},{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:m,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:m,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"}})," emit or ingest vector embeddings to support functions like similarity search."]}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"Embeddings"})," data type is used specifically by components that either produce or consume vector embeddings, such as the ",(0,s.jsxs)(t.a,{href:"/components-embedding-models",children:[(0,s.jsx)(t.strong,{children:"Embedding Model"})," components"]})," and ",(0,s.jsxs)(t.a,{href:"/components-vector-stores",children:[(0,s.jsx)(t.strong,{children:"Vector Store"})," components"]}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["For example, ",(0,s.jsx)(t.strong,{children:"Embedding Model"})," components output ",(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 ",(0,s.jsx)(t.strong,{children:"Vector Store"})," component."]}),"\n",(0,s.jsxs)(t.p,{children:["For information about the underlying Python classes that produce ",(0,s.jsx)(t.code,{children:"Embeddings"}),", see the ",(0,s.jsx)(t.a,{href:"https://python.langchain.com/docs/integrations/text_embedding/",children:"LangChain Embedding models documentation"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"languagemodel",children:"LanguageModel"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"LanguageModel"})," type is a specific data type that can be produced by ",(0,s.jsx)(t.strong,{children:"Language Model"})," components and accepted by components that use an LLM."]}),"\n",(0,s.jsxs)(t.p,{children:["When you change a ",(0,s.jsx)(t.strong,{children:"Language Model"})," component's output type from ",(0,s.jsx)(t.strong,{children:"Model Response"})," to ",(0,s.jsx)(t.strong,{children:"Language Model"}),", 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"}}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["Then, you connect the outgoing ",(0,s.jsx)(t.strong,{children:"Language Model"})," port to a ",(0,s.jsx)(t.strong,{children:"Language Model"})," input port on a compatible component, such as a ",(0,s.jsx)(t.strong,{children:"Smart Function"})," component."]}),"\n",(0,s.jsxs)(t.p,{children:["For more information about using these components in flows and toggling ",(0,s.jsx)(t.code,{children:"LanguageModel"})," output, see ",(0,s.jsxs)(t.a,{href:"/components-models#language-model-output-types",children:[(0,s.jsx)(t.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,s.jsxs)(o,{children:[(0,s.jsx)("summary",{children:"LanguageModel is an instance of LangChain ChatModel"}),(0,s.jsxs)(t.p,{children:["Because Langflow is built on LangChain, ",(0,s.jsx)(t.code,{children:"LanguageModel"})," is actually an instance of a ",(0,s.jsx)(t.a,{href:"https://python.langchain.com/docs/concepts/chat_models/",children:"LangChain chat model"})," that uses the configuration parameters set in the originating component."]}),(0,s.jsxs)(t.p,{children:["Often, components produce an instance of an ",(0,s.jsx)(t.a,{href:"https://python.langchain.com/docs/integrations/chat/",children:"integrated chat model"})," that is designed to support the specific model provider, such as ",(0,s.jsx)(t.a,{href:"https://python.langchain.com/docs/integrations/chat/openai/",children:(0,s.jsx)(t.code,{children:"ChatOpenAI"})})," or ",(0,s.jsx)(t.a,{href:"https://python.langchain.com/docs/integrations/chat/anthropic/",children:(0,s.jsx)(t.code,{children:"ChatAnthropic"})}),"."]}),(0,s.jsxs)(t.p,{children:["You can inspect the ",(0,s.jsx)(t.a,{href:"/concepts-components#component-code",children:"component code"})," to see the specific ",(0,s.jsx)(t.code,{children:"Chat"})," instance it produces."]})]}),"\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 used to integrate a ",(0,s.jsx)(t.strong,{children:"Message History"})," component with external chat memory storage."]}),"\n",(0,s.jsxs)(t.p,{children:["For more information, see the ",(0,s.jsxs)(t.a,{href:"/components-helpers#message-history",children:[(0,s.jsx)(t.strong,{children:"Message History"})," component"]}),"."]}),"\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.jsx)(t.p,{children:"This data type is used by many components."}),"\n",(0,s.jsxs)(t.admonition,{type:"tip",children:[(0,s.jsxs)(t.p,{children:["Components that accept or produce ",(0,s.jsx)(t.code,{children:"Message"})," data may not include all attributes in the incoming or outgoing ",(0,s.jsx)(t.code,{children:"Message"})," data.\nAs long as the data is compatible with the ",(0,s.jsx)(t.code,{children:"Message"})," schema, it can be valid."]}),(0,s.jsx)(t.p,{children:"When building flows, focus on the fields shown on each component in the workspace, rather than the data types passed between components.\nThe details of a particular data type are often only relevant when you are debugging a flow or component that isn't producing the expected output."}),(0,s.jsxs)(t.p,{children:["For example, a ",(0,s.jsx)(t.strong,{children:"Chat Input"})," component only requires the content of the ",(0,s.jsx)(t.strong,{children:"Input Text"})," (",(0,s.jsx)(t.code,{children:"input_value"}),") field.\nThe component then constructs a complete ",(0,s.jsx)(t.code,{children:"Message"})," object before passing the data to other components in the flow."]})]}),"\n",(0,s.jsx)(t.h3,{id:"schema-structure-and-attributes",children:"Schema, structure, and attributes"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"Message"})," 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"})}),".\nSome ",(0,s.jsx)(t.code,{children:"Message"})," attributes have their own schema definitions, such as ",(0,s.jsx)(t.a,{href:"https://github.com/langflow-ai/langflow/blob/main/src/backend/base/langflow/schema/content_block.py",children:(0,s.jsx)(t.code,{children:"content_block.py"})}),"."]}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.code,{children:"Message"})," data is structured as a JSON object.\nFor example:"]}),"\n",(0,s.jsx)(u.Code,{codeConfig:m,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.jsxs)(t.p,{children:["The attributes included in a specific ",(0,s.jsx)(t.code,{children:"Message"})," object depend on the context, including the component type, flow activity, and whether the message is a query or response.\nSome common attributes include the following:"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"text"}),": The main message content."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"sender"}),": Identifies the originator of a chat message as either ",(0,s.jsx)(t.code,{children:"User"})," or ",(0,s.jsx)(t.code,{children:"Language Model"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"sender_name"}),": The display name for the sender. Defaults to ",(0,s.jsx)(t.code,{children:"User"})," or ",(0,s.jsx)(t.code,{children:"Language Model"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"session_id"}),": The chat ",(0,s.jsx)(t.a,{href:"/session-id",children:"session identifier"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"flow_id"}),": The ID of the flow that the message is associated with. ",(0,s.jsx)(t.code,{children:"flow_id"})," and ",(0,s.jsx)(t.code,{children:"session_id"})," are the same if the flow doesn't use custom session IDs."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"timestamp"}),": The UTC timestamp that the message was sent."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"files"}),": A 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"}),": Container for rich content input, such as text, media, or code. Also contains error message information if the LLM can't process the input."]}),"\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.p,{children:"Not all attributes are required, and some components accept message-compatible input, such as raw text input.\nThe strictness depends on the component."}),"\n",(0,s.jsx)(t.h3,{id:"message-data-in-input-and-output-components",children:"Message data in Input and Output components"}),"\n",(0,s.jsxs)(t.p,{children:["In flows with ",(0,s.jsxs)(t.a,{href:"/components-io#chat-io",children:[(0,s.jsx)(t.strong,{children:"Chat Input and Output"})," components"]}),", ",(0,s.jsx)(t.code,{children:"Message"})," data provides a consistent structure for chat interactions, and it is ideal for chatbots, conversational analysis, and other use cases based on a dialogue with an LLM or agent.\nIn these flows, the ",(0,s.jsx)(t.strong,{children:"Playground"})," chat interface prints only the ",(0,s.jsx)(t.code,{children:"Message"})," attributes that are relevant to the conversation, such as ",(0,s.jsx)(t.code,{children:"text"}),", ",(0,s.jsx)(t.code,{children:"files"}),", and error messages from ",(0,s.jsx)(t.code,{children:"content_blocks"}),".\nTo see all ",(0,s.jsx)(t.code,{children:"Message"})," attributes, inspect the message logs in the ",(0,s.jsx)(t.strong,{children:"Playground"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["In flows with ",(0,s.jsxs)(t.a,{href:"/components-io#text-io",children:[(0,s.jsx)(t.strong,{children:"Text Input and Output"})," components"]}),", ",(0,s.jsx)(t.code,{children:"Message"})," data is used to pass simple text strings without the chat-related metadata.\nThese components handle ",(0,s.jsx)(t.code,{children:"Message"})," data as independent text strings, not as part of an ongoing conversation.\nFor this reason, a flow with only ",(0,s.jsx)(t.strong,{children:"Text Input and Output"})," components isn't compatible with the ",(0,s.jsx)(t.strong,{children:"Playground"}),".\nFor more information, see ",(0,s.jsxs)(t.a,{href:"/components-io",children:[(0,s.jsx)(t.strong,{children:"Input and Output"})," components"]}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["When using the Langflow API, the response includes the ",(0,s.jsx)(t.code,{children:"Message"})," object along with other response data from the flow run.\nLangflow API responses can be extremely verbose, so your applications must include code to extract relevant data from the response to return to the user.\nFor an example, see the ",(0,s.jsx)(t.a,{href:"/get-started-quickstart",children:"Langflow quickstart"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["Additionally, input sent to the input port of input/output components does ",(0,s.jsx)(t.em,{children:"not"})," need to be a complete ",(0,s.jsx)(t.code,{children:"Message"})," object because the component constructs the ",(0,s.jsx)(t.code,{children:"Message"})," object that is then passed to other components in the flow or returned as flow output.\nIn fact, some components shouldn't receive a complete ",(0,s.jsx)(t.code,{children:"Message"})," object because some attributes, like ",(0,s.jsx)(t.code,{children:"timestamp"})," should be added by the component for accuracy."]}),"\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"}),", they can be the dedicated ",(0,s.jsx)(t.strong,{children:"MCP Tools"})," component, or they can be other components that only support ",(0,s.jsx)(t.strong,{children:"Tool Mode"}),".\nMultiple tools can be connected to the same ",(0,s.jsx)(t.strong,{children:"Agent"})," component at the same port."]}),"\n",(0,s.jsxs)(t.p,{children:["Functionally, ",(0,s.jsx)(t.code,{children:"Tool"})," data is a LangChain ",(0,s.jsx)(t.code,{children:"StructuredTool"})," object that can be used in agent flows."]}),"\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.jsxs)(t.a,{href:"/components-processing#type-convert",children:[(0,s.jsx)(t.strong,{children:"Type Convert"})," component"]}),", which can convert data from one type to another:"]}),"\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)(a.A,{children:[(0,s.jsx)(l.A,{value:"Message",label:"Message",default:!0,children:(0,s.jsx)(u.Code,{codeConfig:m,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Input text",props:{}}]}],lang:"text"},annotations:[]}]})}),(0,s.jsx)(l.A,{value:"Data",label:"Data",children:(0,s.jsx)(u.Code,{codeConfig:m,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)(l.A,{value:"DataFrame",label:"DataFrame",children:(0,s.jsx)(u.Code,{codeConfig:m,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.jsxs)(t.a,{href:"/components-processing",children:[(0,s.jsx)(t.strong,{children:"Processing"})," components"]})}),"\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 g(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 j(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 +"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),c=o(56347),a=o(205),l=o(57485),i=o(31682),d=o(70679);function p(e){return n.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)})?.filter(Boolean)??[]}function h(e){const{values:t,children:o}=e;return(0,n.useMemo)(()=>{const e=t??function(e){return p(e).map(({props:{value:e,label:t,attributes:o,default:n}})=>({value:e,label:t,attributes:o,default:n}))}(o);return function(e){const t=(0,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 m({queryString:e=!1,groupId:t}){const o=(0,c.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,l.aZ)(s),(0,n.useCallback)(e=>{if(!s)return;const t=new URLSearchParams(o.location.search);t.set(s,e),o.replace({...o.location,search:t.toString()})},[s,o])]}function y(e){const{defaultValue:t,queryString:o=!1,groupId:s}=e,r=h(e),[c,l]=(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,p]=m({queryString:o,groupId:s}),[y,x]=function({groupId:e}){const t=function(e){return e?`docusaurus.tab.${e}`:null}(e),[o,s]=(0,d.Dv)(t);return[o,(0,n.useCallback)(e=>{t&&s.set(e)},[t,s])]}({groupId:s}),g=(()=>{const e=i??y;return u({value:e,tabValues:r})?e:null})();(0,a.A)(()=>{g&&l(g)},[g]);return{selectedValue:c,selectValue:(0,n.useCallback)(e=>{if(!u({value:e,tabValues:r}))throw new Error(`Can't select invalid tab value=${e}`);l(e),p(e),x(e)},[p,x,r]),tabValues:r}}var x=o(92303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var j=o(74848);function f({className:e,block:t,selectedValue:o,selectValue:n,tabValues:c}){const a=[],{blockElementScrollPositionUntilNextRender:l}=(0,r.a_)(),i=e=>{const t=e.currentTarget,s=a.indexOf(t),r=c[s].value;r!==o&&(l(t),n(r))},d=e=>{let t=null;switch(e.key){case"Enter":i(e);break;case"ArrowRight":{const o=a.indexOf(e.currentTarget)+1;t=a[o]??a[0];break}case"ArrowLeft":{const o=a.indexOf(e.currentTarget)-1;t=a[o]??a[a.length-1];break}}t?.focus()};return(0,j.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":t},e),children:c.map(({value:e,label:t,attributes:n})=>(0,j.jsx)("li",{role:"tab",tabIndex:o===e?0:-1,"aria-selected":o===e,ref:e=>{a.push(e)},onKeyDown:d,onClick:i,...n,className:(0,s.A)("tabs__item",g.tabItem,n?.className,{"tabs__item--active":o===e}),children:t??e},e))})}function D({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,j.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=y(e);return(0,j.jsxs)("div",{className:(0,s.A)("tabs-container",g.tabList),children:[(0,j.jsx)(f,{...t,...e}),(0,j.jsx)(D,{...t,...e})]})}function C(e){const t=(0,x.A)();return(0,j.jsx)(b,{...e,children:p(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:()=>c});o(96540);var n=o(18215);const s={tabItem:"tabItem_Ymn6"};var r=o(74848);function c({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:()=>m,contentTitle:()=>p,default:()=>g,frontMatter:()=>d,metadata:()=>n,toc:()=>y});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":"Telemetry","permalink":"/contributing-telemetry"},"next":{"title":"Use voice mode","permalink":"/concepts-voice-mode"}}');var s=o(74848),r=o(28453),c=o(24754),a=o(11470),l=o(19365),i=o(17886);const d={title:"Langflow data types",slug:"/data-types"},p=void 0,h={},u={annotations:c.hk,Code:c.Cy},m={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},y=[{value:"Data",id:"data",level:2},{value:"Schema and attributes",id:"schema-and-attributes",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, structure, and attributes",id:"schema-structure-and-attributes",level:3},{value:"Message data in Input and Output components",id:"message-data-in-input-and-output-components",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},{Details:o}=t;return u||j("CH",!1),u.Code||j("CH.Code",!0),o||j("Details",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n","\n",(0,s.jsx)(t.p,{children:"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.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["In the ",(0,s.jsx)(t.a,{href:"/concepts-overview#workspace",children:"workspace"}),", hover over a port to see connection details for that port."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Click a port to filter the ",(0,s.jsx)(t.strong,{children:"Components"})," menu by compatible components."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["If two components have incompatible data types, you can use a processing component like the ",(0,s.jsxs)(t.a,{href:"/components-processing#type-convert",children:[(0,s.jsx)(t.strong,{children:"Type Convert"})," component"]})," to convert the data between components."]}),"\n"]}),"\n"]})}),"\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 ",(0,s.jsx)(t.code,{children:"Data"})," object stores key-value pairs within the ",(0,s.jsx)(t.code,{children:".data"})," attribute. This is the ",(0,s.jsx)(t.code,{children:"Data"})," object's core dictionary. Each key is a field name, and the values can be any supported data type."]}),"\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)(u.Code,{codeConfig:m,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"}}}]},{tokens:[{content:" data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"{",props:{style:{color:"#C9D1D9"}}}]},{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"}}}]},{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.\nFor example, when serialized into JSON, the previous Python example becomes the following JSON object:"]}),"\n",(0,s.jsx)(u.Code,{codeConfig:m,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:'"Hello world"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Charlie"',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"}}}]},{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:m,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:m,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"}})," emit or ingest vector embeddings to support functions like similarity search."]}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"Embeddings"})," data type is used specifically by components that either produce or consume vector embeddings, such as the ",(0,s.jsxs)(t.a,{href:"/components-embedding-models",children:[(0,s.jsx)(t.strong,{children:"Embedding Model"})," components"]})," and ",(0,s.jsxs)(t.a,{href:"/components-vector-stores",children:[(0,s.jsx)(t.strong,{children:"Vector Store"})," components"]}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["For example, ",(0,s.jsx)(t.strong,{children:"Embedding Model"})," components output ",(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 ",(0,s.jsx)(t.strong,{children:"Vector Store"})," component."]}),"\n",(0,s.jsxs)(t.p,{children:["For information about the underlying Python classes that produce ",(0,s.jsx)(t.code,{children:"Embeddings"}),", see the ",(0,s.jsx)(t.a,{href:"https://python.langchain.com/docs/integrations/text_embedding/",children:"LangChain Embedding models documentation"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"languagemodel",children:"LanguageModel"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"LanguageModel"})," type is a specific data type that can be produced by ",(0,s.jsx)(t.strong,{children:"Language Model"})," components and accepted by components that use an LLM."]}),"\n",(0,s.jsxs)(t.p,{children:["When you change a ",(0,s.jsx)(t.strong,{children:"Language Model"})," component's output type from ",(0,s.jsx)(t.strong,{children:"Model Response"})," to ",(0,s.jsx)(t.strong,{children:"Language Model"}),", 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"}}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["Then, you connect the outgoing ",(0,s.jsx)(t.strong,{children:"Language Model"})," port to a ",(0,s.jsx)(t.strong,{children:"Language Model"})," input port on a compatible component, such as a ",(0,s.jsx)(t.strong,{children:"Smart Function"})," component."]}),"\n",(0,s.jsxs)(t.p,{children:["For more information about using these components in flows and toggling ",(0,s.jsx)(t.code,{children:"LanguageModel"})," output, see ",(0,s.jsxs)(t.a,{href:"/components-models#language-model-output-types",children:[(0,s.jsx)(t.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,s.jsxs)(o,{children:[(0,s.jsx)("summary",{children:"LanguageModel is an instance of LangChain ChatModel"}),(0,s.jsxs)(t.p,{children:["Because Langflow is built on LangChain, ",(0,s.jsx)(t.code,{children:"LanguageModel"})," is actually an instance of a ",(0,s.jsx)(t.a,{href:"https://python.langchain.com/docs/concepts/chat_models/",children:"LangChain chat model"})," that uses the configuration parameters set in the originating component."]}),(0,s.jsxs)(t.p,{children:["Often, components produce an instance of an ",(0,s.jsx)(t.a,{href:"https://python.langchain.com/docs/integrations/chat/",children:"integrated chat model"})," that is designed to support the specific model provider, such as ",(0,s.jsx)(t.a,{href:"https://python.langchain.com/docs/integrations/chat/openai/",children:(0,s.jsx)(t.code,{children:"ChatOpenAI"})})," or ",(0,s.jsx)(t.a,{href:"https://python.langchain.com/docs/integrations/chat/anthropic/",children:(0,s.jsx)(t.code,{children:"ChatAnthropic"})}),"."]}),(0,s.jsxs)(t.p,{children:["You can inspect the ",(0,s.jsx)(t.a,{href:"/concepts-components#component-code",children:"component code"})," to see the specific ",(0,s.jsx)(t.code,{children:"Chat"})," instance it produces."]})]}),"\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 used to integrate a ",(0,s.jsx)(t.strong,{children:"Message History"})," component with external chat memory storage."]}),"\n",(0,s.jsxs)(t.p,{children:["For more information, see the ",(0,s.jsxs)(t.a,{href:"/components-helpers#message-history",children:[(0,s.jsx)(t.strong,{children:"Message History"})," component"]}),"."]}),"\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.jsx)(t.p,{children:"This data type is used by many components."}),"\n",(0,s.jsxs)(t.admonition,{type:"tip",children:[(0,s.jsxs)(t.p,{children:["Components that accept or produce ",(0,s.jsx)(t.code,{children:"Message"})," data may not include all attributes in the incoming or outgoing ",(0,s.jsx)(t.code,{children:"Message"})," data.\nAs long as the data is compatible with the ",(0,s.jsx)(t.code,{children:"Message"})," schema, it can be valid."]}),(0,s.jsx)(t.p,{children:"When building flows, focus on the fields shown on each component in the workspace, rather than the data types passed between components.\nThe details of a particular data type are often only relevant when you are debugging a flow or component that isn't producing the expected output."}),(0,s.jsxs)(t.p,{children:["For example, a ",(0,s.jsx)(t.strong,{children:"Chat Input"})," component only requires the content of the ",(0,s.jsx)(t.strong,{children:"Input Text"})," (",(0,s.jsx)(t.code,{children:"input_value"}),") field.\nThe component then constructs a complete ",(0,s.jsx)(t.code,{children:"Message"})," object before passing the data to other components in the flow."]})]}),"\n",(0,s.jsx)(t.h3,{id:"schema-structure-and-attributes",children:"Schema, structure, and attributes"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"Message"})," 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"})}),".\nSome ",(0,s.jsx)(t.code,{children:"Message"})," attributes have their own schema definitions, such as ",(0,s.jsx)(t.a,{href:"https://github.com/langflow-ai/langflow/blob/main/src/backend/base/langflow/schema/content_block.py",children:(0,s.jsx)(t.code,{children:"content_block.py"})}),"."]}),"\n",(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.code,{children:"Message"})," data is structured as a JSON object.\nFor example:"]}),"\n",(0,s.jsx)(u.Code,{codeConfig:m,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.jsxs)(t.p,{children:["The attributes included in a specific ",(0,s.jsx)(t.code,{children:"Message"})," object depend on the context, including the component type, flow activity, and whether the message is a query or response.\nSome common attributes include the following:"]}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"text"}),": The main message content."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"sender"}),": Identifies the originator of a chat message as either ",(0,s.jsx)(t.code,{children:"User"})," or ",(0,s.jsx)(t.code,{children:"Language Model"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"sender_name"}),": The display name for the sender. Defaults to ",(0,s.jsx)(t.code,{children:"User"})," or ",(0,s.jsx)(t.code,{children:"Language Model"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"session_id"}),": The chat ",(0,s.jsx)(t.a,{href:"/session-id",children:"session identifier"}),"."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"flow_id"}),": The ID of the flow that the message is associated with. ",(0,s.jsx)(t.code,{children:"flow_id"})," and ",(0,s.jsx)(t.code,{children:"session_id"})," are the same if the flow doesn't use custom session IDs."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"timestamp"}),": The UTC timestamp that the message was sent."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"files"}),": A 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"}),": Container for rich content input, such as text, media, or code. Also contains error message information if the LLM can't process the input."]}),"\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.p,{children:"Not all attributes are required, and some components accept message-compatible input, such as raw text input.\nThe strictness depends on the component."}),"\n",(0,s.jsx)(t.h3,{id:"message-data-in-input-and-output-components",children:"Message data in Input and Output components"}),"\n",(0,s.jsxs)(t.p,{children:["In flows with ",(0,s.jsxs)(t.a,{href:"/components-io#chat-io",children:[(0,s.jsx)(t.strong,{children:"Chat Input and Output"})," components"]}),", ",(0,s.jsx)(t.code,{children:"Message"})," data provides a consistent structure for chat interactions, and it is ideal for chatbots, conversational analysis, and other use cases based on a dialogue with an LLM or agent.\nIn these flows, the ",(0,s.jsx)(t.strong,{children:"Playground"})," chat interface prints only the ",(0,s.jsx)(t.code,{children:"Message"})," attributes that are relevant to the conversation, such as ",(0,s.jsx)(t.code,{children:"text"}),", ",(0,s.jsx)(t.code,{children:"files"}),", and error messages from ",(0,s.jsx)(t.code,{children:"content_blocks"}),".\nTo see all ",(0,s.jsx)(t.code,{children:"Message"})," attributes, inspect the message logs in the ",(0,s.jsx)(t.strong,{children:"Playground"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["In flows with ",(0,s.jsxs)(t.a,{href:"/components-io#text-io",children:[(0,s.jsx)(t.strong,{children:"Text Input and Output"})," components"]}),", ",(0,s.jsx)(t.code,{children:"Message"})," data is used to pass simple text strings without the chat-related metadata.\nThese components handle ",(0,s.jsx)(t.code,{children:"Message"})," data as independent text strings, not as part of an ongoing conversation.\nFor this reason, a flow with only ",(0,s.jsx)(t.strong,{children:"Text Input and Output"})," components isn't compatible with the ",(0,s.jsx)(t.strong,{children:"Playground"}),".\nFor more information, see ",(0,s.jsxs)(t.a,{href:"/components-io",children:[(0,s.jsx)(t.strong,{children:"Input and Output"})," components"]}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["When using the Langflow API, the response includes the ",(0,s.jsx)(t.code,{children:"Message"})," object along with other response data from the flow run.\nLangflow API responses can be extremely verbose, so your applications must include code to extract relevant data from the response to return to the user.\nFor an example, see the ",(0,s.jsx)(t.a,{href:"/get-started-quickstart",children:"Langflow quickstart"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["Additionally, input sent to the input port of input/output components does ",(0,s.jsx)(t.em,{children:"not"})," need to be a complete ",(0,s.jsx)(t.code,{children:"Message"})," object because the component constructs the ",(0,s.jsx)(t.code,{children:"Message"})," object that is then passed to other components in the flow or returned as flow output.\nIn fact, some components shouldn't receive a complete ",(0,s.jsx)(t.code,{children:"Message"})," object because some attributes, like ",(0,s.jsx)(t.code,{children:"timestamp"})," should be added by the component for accuracy."]}),"\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"}),", they can be the dedicated ",(0,s.jsx)(t.strong,{children:"MCP Tools"})," component, or they can be other components that only support ",(0,s.jsx)(t.strong,{children:"Tool Mode"}),".\nMultiple tools can be connected to the same ",(0,s.jsx)(t.strong,{children:"Agent"})," component at the same port."]}),"\n",(0,s.jsxs)(t.p,{children:["Functionally, ",(0,s.jsx)(t.code,{children:"Tool"})," data is a LangChain ",(0,s.jsx)(t.code,{children:"StructuredTool"})," object that can be used in agent flows."]}),"\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.jsxs)(t.a,{href:"/components-processing#type-convert",children:[(0,s.jsx)(t.strong,{children:"Type Convert"})," component"]}),", which can convert data from one type to another:"]}),"\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)(a.A,{children:[(0,s.jsx)(l.A,{value:"Message",label:"Message",default:!0,children:(0,s.jsx)(u.Code,{codeConfig:m,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Input text",props:{}}]}],lang:"text"},annotations:[]}]})}),(0,s.jsx)(l.A,{value:"Data",label:"Data",children:(0,s.jsx)(u.Code,{codeConfig:m,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)(l.A,{value:"DataFrame",label:"DataFrame",children:(0,s.jsx)(u.Code,{codeConfig:m,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.jsxs)(t.a,{href:"/components-processing",children:[(0,s.jsx)(t.strong,{children:"Processing"})," components"]})}),"\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 g(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 j(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/4e56251d.625c5c7c.js b/assets/js/4e56251d.625c5c7c.js deleted file mode 100644 index 4c29417cdc..0000000000 --- a/assets/js/4e56251d.625c5c7c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[3147],{28453:(s,e,n)=>{n.d(e,{R:()=>r,x:()=>a});var t=n(96540);const i={},o=t.createContext(i);function r(s){const e=t.useContext(o);return t.useMemo(function(){return"function"==typeof s?s(e):{...e,...s}},[e,s])}function a(s){let e;return e=s.disableParentContext?"function"==typeof s.components?s.components(i):s.components||i:r(s.components),t.createElement(o.Provider,{value:e},s.children)}},70723:(s,e,n)=>{n.r(e),n.d(e,{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":"The NVIDIA G-Assist 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":"Ollama","permalink":"/bundles-ollama"}}');var i=n(74848),o=n(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 e={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)(e.admonition,{type:"important",children:(0,i.jsxs)(e.p,{children:["The ",(0,i.jsx)(e.strong,{children:"NVIDIA G-Assist"})," component is available only for Langflow users with NVIDIA GPUs on Windows systems."]})}),"\n",(0,i.jsxs)(e.p,{children:["The ",(0,i.jsx)(e.strong,{children:"NVIDIA G-Assist"})," component enables interaction with NVIDIA GPU drivers through natural language prompts.\nFor example, prompt G-Assist with ",(0,i.jsx)(e.code,{children:'"What is my current GPU temperature?"'})," or ",(0,i.jsx)(e.code,{children:'"Show me the available GPU memory"'})," to get information, and then tell G-Assist to modify your GPU settings.\nFor more information, see the ",(0,i.jsx)(e.a,{href:"https://github.com/NVIDIA/g-assist",children:"NVIDIA G-Assist repository"}),"."]}),"\n",(0,i.jsx)(e.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsx)(e.li,{children:"Windows operating system"}),"\n",(0,i.jsx)(e.li,{children:"NVIDIA GPU"}),"\n",(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.code,{children:"gassist.rise"})," package installed. This package is included in your ",(0,i.jsx)(e.a,{href:"/get-started-installation",children:"Langflow installation"}),"."]}),"\n"]}),"\n",(0,i.jsx)(e.h2,{id:"use-the-g-assist-component-in-a-flow",children:"Use the G-Assist component in a flow"}),"\n",(0,i.jsxs)(e.ol,{children:["\n",(0,i.jsxs)(e.li,{children:["Create a flow with ",(0,i.jsx)(e.strong,{children:"Chat Input"})," component, ",(0,i.jsx)(e.strong,{children:"G-Assist"})," component, and ",(0,i.jsx)(e.strong,{children:"Chat Output"})," components."]}),"\n",(0,i.jsxs)(e.li,{children:["Connect the ",(0,i.jsx)(e.strong,{children:"Chat Input"})," component to the ",(0,i.jsx)(e.strong,{children:"G-Assist"})," component's ",(0,i.jsx)(e.strong,{children:"Prompt"})," input."]}),"\n",(0,i.jsxs)(e.li,{children:["Connect the ",(0,i.jsx)(e.strong,{children:"G-Assist"})," component's output to the ",(0,i.jsx)(e.strong,{children:"Chat Output"})," component."]}),"\n",(0,i.jsxs)(e.li,{children:["Open the ",(0,i.jsx)(e.strong,{children:"Playground"}),", and then ask a question about your GPU. For example, ",(0,i.jsx)(e.code,{children:'"What is my current GPU temperature?"'}),".\nThe ",(0,i.jsx)(e.strong,{children:"G-Assist"})," component queries your GPU, and the response appears in the ",(0,i.jsx)(e.strong,{children:"Playground"}),"."]}),"\n"]}),"\n",(0,i.jsx)(e.h3,{id:"inputs",children:"Inputs"}),"\n",(0,i.jsxs)(e.p,{children:["The ",(0,i.jsx)(e.strong,{children:"NVIDIA G-Assist"})," component accepts a single input:"]}),"\n",(0,i.jsxs)(e.ul,{children:["\n",(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.code,{children:"prompt"}),": A human-readable prompt processed by NVIDIA G-Assist."]}),"\n"]}),"\n",(0,i.jsx)(e.h3,{id:"outputs",children:"Outputs"}),"\n",(0,i.jsxs)(e.p,{children:["The ",(0,i.jsx)(e.strong,{children:"NVIDIA G-Assist"})," component outputs a ",(0,i.jsx)(e.a,{href:"/data-types#message",children:(0,i.jsx)(e.code,{children:"Message"})})," object that contains the NVIDIA G-Assist response.\nThe string response with the completed operation result is available in the ",(0,i.jsx)(e.code,{children:"text"})," field of the ",(0,i.jsx)(e.code,{children:"Message"})," object."]})]})}function h(s={}){const{wrapper:e}={...(0,o.R)(),...s.components};return e?(0,i.jsx)(e,{...s,children:(0,i.jsx)(d,{...s})}):d(s)}}}]); \ No newline at end of file diff --git a/assets/js/4e56251d.a2691196.js b/assets/js/4e56251d.a2691196.js new file mode 100644 index 0000000000..aca7dbbdf6 --- /dev/null +++ b/assets/js/4e56251d.a2691196.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[3147],{28453:(s,e,t)=>{t.d(e,{R:()=>r,x:()=>a});var n=t(96540);const i={},o=n.createContext(i);function r(s){const e=n.useContext(o);return n.useMemo(function(){return"function"==typeof s?s(e):{...e,...s}},[e,s])}function a(s){let e;return e=s.disableParentContext?"function"==typeof s.components?s.components(i):s.components||i:r(s.components),n.createElement(o.Provider,{value:e},s.children)}},70723:(s,e,t)=>{t.r(e),t.d(e,{assets:()=>l,contentTitle:()=>a,default:()=>d,frontMatter:()=>r,metadata:()=>n,toc:()=>c});const n=JSON.parse('{"id":"Integrations/Nvidia/integrations-nvidia-g-assist","title":"Integrate NVIDIA G-Assist with Langflow","description":"The NVIDIA System-Assist component integrates your flows with NVIDIA G-Assist, enabling interaction with NVIDIA GPU drivers through natural language prompts.","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":"Ollama","permalink":"/bundles-ollama"}}');var i=t(74848),o=t(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 NVIDIA G-Assist in a flow",id:"use-nvidia-g-assist-in-a-flow",level:2}];function h(s){const e={a:"a",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",strong:"strong",...(0,o.R)(),...s.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(e.p,{children:["The ",(0,i.jsx)(e.strong,{children:"NVIDIA System-Assist"})," component integrates your flows with NVIDIA G-Assist, enabling interaction with NVIDIA GPU drivers through natural language prompts.\nFor example, prompt G-Assist with ",(0,i.jsx)(e.code,{children:'"What is my current GPU temperature?"'})," or ",(0,i.jsx)(e.code,{children:'"Show me the available GPU memory"'})," to get information, and then tell G-Assist to modify your GPU settings.\nFor more information, see the ",(0,i.jsx)(e.a,{href:"https://github.com/NVIDIA/g-assist",children:"NVIDIA G-Assist repository"}),"."]}),"\n",(0,i.jsx)(e.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,i.jsxs)(e.p,{children:["The ",(0,i.jsx)(e.strong,{children:"NVIDIA System-Assist"})," component requires an NVIDIA GPU on a Windows operating system."]}),"\n",(0,i.jsxs)(e.p,{children:["It uses the ",(0,i.jsx)(e.code,{children:"gassist.rise"})," package, which is installed with all Langflow versions that include this component."]}),"\n",(0,i.jsx)(e.h2,{id:"use-nvidia-g-assist-in-a-flow",children:"Use NVIDIA G-Assist in a flow"}),"\n",(0,i.jsxs)(e.ol,{children:["\n",(0,i.jsxs)(e.li,{children:["\n",(0,i.jsxs)(e.p,{children:["Create a flow with a ",(0,i.jsx)(e.strong,{children:"Chat Input"})," component, ",(0,i.jsx)(e.strong,{children:"NVIDIA System-Assist"})," component, and ",(0,i.jsx)(e.strong,{children:"Chat Output"})," components."]}),"\n",(0,i.jsx)(e.p,{children:"This is a simplified example that uses only three components.\nDepending on your use case, your flow might use more components or different inputs and outputs."}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["\n",(0,i.jsxs)(e.p,{children:["Connect the ",(0,i.jsx)(e.strong,{children:"Chat Input"})," component to the ",(0,i.jsx)(e.strong,{children:"NVIDIA System-Assist"})," component's ",(0,i.jsx)(e.strong,{children:"Prompt"})," input."]}),"\n",(0,i.jsxs)(e.p,{children:["The ",(0,i.jsx)(e.strong,{children:"Prompt"})," parameter accepts a natural language prompt that is processed by the NVIDIA G-Assist AI Assistant.\nIn this example, you'll provide the prompt as chat input.\nYou could also enter a prompt directly in the ",(0,i.jsx)(e.strong,{children:"Prompt"})," input or connect another input component."]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["\n",(0,i.jsxs)(e.p,{children:["Connect the ",(0,i.jsx)(e.strong,{children:"NVIDIA System-Assist"})," component's output to the ",(0,i.jsx)(e.strong,{children:"Chat Output"})," component."]}),"\n"]}),"\n",(0,i.jsxs)(e.li,{children:["\n",(0,i.jsxs)(e.p,{children:["To test the flow, open the ",(0,i.jsx)(e.strong,{children:"Playground"}),", and then ask a question about your GPU.\nFor example, ",(0,i.jsx)(e.code,{children:'"What is my current GPU temperature?"'}),"."]}),"\n",(0,i.jsxs)(e.p,{children:["Through the ",(0,i.jsx)(e.strong,{children:"NVIDIA System-Assist"})," component, NVIDIA G-Assist queries your GPU based on the prompt, and then prints the response to the ",(0,i.jsx)(e.strong,{children:"Playground"}),"."]}),"\n",(0,i.jsxs)(e.p,{children:["The component's output is a ",(0,i.jsx)(e.a,{href:"/data-types#message",children:(0,i.jsx)(e.code,{children:"Message"})})," containing the NVIDIA G-Assist response.\nThe string response with the completed operation result is available in the ",(0,i.jsx)(e.code,{children:"text"})," key in the ",(0,i.jsx)(e.code,{children:"Message"})," object."]}),"\n"]}),"\n"]})]})}function d(s={}){const{wrapper:e}={...(0,o.R)(),...s.components};return e?(0,i.jsx)(e,{...s,children:(0,i.jsx)(h,{...s})}):h(s)}}}]); \ No newline at end of file diff --git a/assets/js/5015646b.61eb2fc0.js b/assets/js/5015646b.6772f6d8.js similarity index 52% rename from assets/js/5015646b.61eb2fc0.js rename to assets/js/5015646b.6772f6d8.js index 47eaf22cbe..0335fc5a47 100644 --- a/assets/js/5015646b.61eb2fc0.js +++ b/assets/js/5015646b.6772f6d8.js @@ -1 +1 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[824],{11470:(e,n,t)=>{t.d(n,{A:()=>w});var s=t(96540),r=t(18215),o=t(23104),a=t(56347),i=t(205),c=t(57485),l=t(31682),d=t(70679);function h(e){return s.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,s.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 p(e){const{values:n,children:t}=e;return(0,s.useMemo)(()=>{const e=n??function(e){return h(e).map(({props:{value:e,label:n,attributes:t,default:s}})=>({value:e,label:n,attributes:t,default:s}))}(t);return function(e){const n=(0,l.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 m({value:e,tabValues:n}){return n.some(n=>n.value===e)}function u({queryString:e=!1,groupId:n}){const t=(0,a.W6)(),r=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)(r),(0,s.useCallback)(e=>{if(!r)return;const n=new URLSearchParams(t.location.search);n.set(r,e),t.replace({...t.location,search:n.toString()})},[r,t])]}function x(e){const{defaultValue:n,queryString:t=!1,groupId:r}=e,o=p(e),[a,c]=(0,s.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(!m({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:o})),[l,h]=u({queryString:t,groupId:r}),[x,j]=function({groupId:e}){const n=function(e){return e?`docusaurus.tab.${e}`:null}(e),[t,r]=(0,d.Dv)(n);return[t,(0,s.useCallback)(e=>{n&&r.set(e)},[n,r])]}({groupId:r}),g=(()=>{const e=l??x;return m({value:e,tabValues:o})?e:null})();(0,i.A)(()=>{g&&c(g)},[g]);return{selectedValue:a,selectValue:(0,s.useCallback)(e=>{if(!m({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);c(e),h(e),j(e)},[h,j,o]),tabValues:o}}var j=t(92303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var f=t(74848);function y({className:e,block:n,selectedValue:t,selectValue:s,tabValues:a}){const i=[],{blockElementScrollPositionUntilNextRender:c}=(0,o.a_)(),l=e=>{const n=e.currentTarget,r=i.indexOf(n),o=a[r].value;o!==t&&(c(n),s(o))},d=e=>{let n=null;switch(e.key){case"Enter":l(e);break;case"ArrowRight":{const t=i.indexOf(e.currentTarget)+1;n=i[t]??i[0];break}case"ArrowLeft":{const t=i.indexOf(e.currentTarget)-1;n=i[t]??i[i.length-1];break}}n?.focus()};return(0,f.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":n},e),children:a.map(({value:e,label:n,attributes:s})=>(0,f.jsx)("li",{role:"tab",tabIndex:t===e?0:-1,"aria-selected":t===e,ref:e=>{i.push(e)},onKeyDown:d,onClick:l,...s,className:(0,r.A)("tabs__item",g.tabItem,s?.className,{"tabs__item--active":t===e}),children:n??e},e))})}function b({lazy:e,children:n,selectedValue:t}){const o=(Array.isArray(n)?n:[n]).filter(Boolean);if(e){const e=o.find(e=>e.props.value===t);return e?(0,s.cloneElement)(e,{className:(0,r.A)("margin-top--md",e.props.className)}):null}return(0,f.jsx)("div",{className:"margin-top--md",children:o.map((e,n)=>(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==t}))})}function v(e){const n=x(e);return(0,f.jsxs)("div",{className:(0,r.A)("tabs-container",g.tabList),children:[(0,f.jsx)(y,{...n,...e}),(0,f.jsx)(b,{...n,...e})]})}function w(e){const n=(0,j.A)();return(0,f.jsx)(v,{...e,children:h(e.children)},String(n))}},17886:(e,n,t)=>{t.d(n,{A:()=>o});t(96540);var s=t(64058),r=t(74848);function o({name:e,...n}){const t=s[e];return t?(0,r.jsx)(t,{...n}):null}},19365:(e,n,t)=>{t.d(n,{A:()=>a});t(96540);var s=t(18215);const r={tabItem:"tabItem_Ymn6"};var o=t(74848);function a({children:e,hidden:n,className:t}){return(0,o.jsx)("div",{role:"tabpanel",className:(0,s.A)(r.tabItem,t),hidden:n,children:e})}},28838:(e,n,t)=>{t.r(n),t.d(n,{CH:()=>m,assets:()=>p,chCodeConfig:()=>u,contentTitle:()=>h,default:()=>g,frontMatter:()=>d,metadata:()=>s,toc:()=>x});const s=JSON.parse('{"id":"Components/components-helpers","title":"Helpers","description":"Helper components provide utility functions to help manage data and perform simple tasks in your flow.","source":"@site/docs/Components/components-helpers.mdx","sourceDirName":"Components","slug":"/components-helpers","permalink":"/components-helpers","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Helpers","slug":"/components-helpers"},"sidebar":"docs","previous":{"title":"Logic","permalink":"/components-logic"},"next":{"title":"Tools","permalink":"/components-tools"}}');var r=t(74848),o=t(28453),a=t(24754),i=t(17886),c=t(11470),l=t(19365);const d={title:"Helpers",slug:"/components-helpers"},h=void 0,p={},m={annotations:a.hk,Code:a.Cy},u={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},x=[{value:"Calculator",id:"calculator",level:2},{value:"Calculator parameters",id:"calculator-parameters",level:3},{value:"Current Date",id:"current-date",level:2},{value:"Current Date parameters",id:"current-date-parameters",level:3},{value:"Message History",id:"message-history",level:2},{value:"Use the Message History component in a flow",id:"use-the-message-history-component-in-a-flow",level:3},{value:"Message History parameters",id:"message-history-parameters",level:3},{value:"Legacy Helper components",id:"legacy-helper-components",level:2}];function j(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,o.R)(),...e.components},{Details:s}=n;return m||f("CH",!1),m.Code||f("CH.Code",!0),s||f("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)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Helper"})," components provide utility functions to help manage data and perform simple tasks in your flow."]}),"\n",(0,r.jsx)(n.h2,{id:"calculator",children:"Calculator"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Calculator"})," component performs basic arithmetic operations on mathematical expressions.\nIt supports addition, subtraction, multiplication, division, and exponentiation operations."]}),"\n",(0,r.jsxs)(n.p,{children:["For an example of using this component in a flow, see the ",(0,r.jsxs)(n.a,{href:"/components-processing#python-interpreter",children:[(0,r.jsx)(n.strong,{children:"Python Interpreter"})," component"]}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"calculator-parameters",children:"Calculator parameters"}),"\n",(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:"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:"expression"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsxs)(n.td,{children:["Input parameter. The arithmetic expression to evaluate, such as ",(0,r.jsx)(n.code,{children:"4*4*(33/22)+12-20"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"result"}),(0,r.jsx)(n.td,{children:"Data"}),(0,r.jsxs)(n.td,{children:["Output parameter. The calculation result as a ",(0,r.jsxs)(n.a,{href:"/data-types",children:[(0,r.jsx)(n.code,{children:"Data"})," object"]})," containing the evaluated expression."]})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"current-date",children:"Current Date"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Current Date"})," component returns the current date and time in a selected timezone. This component provides a flexible way to obtain timezone-specific date and time information within a Langflow pipeline."]}),"\n",(0,r.jsx)(n.h3,{id:"current-date-parameters",children:"Current Date parameters"}),"\n",(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:"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:"timezone"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:"Input parameter. The timezone for the current date and time."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"current_date"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:"Output parameter. The resulting current date and time in the selected timezone."})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"message-history",children:"Message History"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Message History"})," component provides combined chat history and message storage functionality.\nIt can store and retrieve chat messages from either ",(0,r.jsx)(n.a,{href:"/memory",children:"Langflow storage"})," ",(0,r.jsx)(n.em,{children:"or"})," a dedicated chat memory database like Mem0 or Redis."]}),"\n",(0,r.jsxs)(n.admonition,{type:"important",children:[(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Agent"})," component has built-in chat memory that is enabled by default and uses Langflow storage.\nThis built-in chat memory functionality is sufficient for most use cases."]}),(0,r.jsxs)(n.p,{children:["Use the ",(0,r.jsx)(n.strong,{children:"Message History"})," component for the following use cases:"]}),(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"You need to store and retrieve chat memory for a language model component (not an agent)."}),"\n",(0,r.jsx)(n.li,{children:"You need to retrieve chat memories outside the chat context, such as a sentiment analysis flow that retrieves and analyzes recently stored memories."}),"\n",(0,r.jsx)(n.li,{children:"You want to store memories in a specific database that is separate from Langflow storage."}),"\n"]}),(0,r.jsxs)(n.p,{children:["For more information, see ",(0,r.jsx)(n.a,{href:"/memory#store-chat-memory",children:"Store chat memory"}),"."]})]}),"\n",(0,r.jsx)(n.h3,{id:"use-the-message-history-component-in-a-flow",children:"Use the Message History component in a flow"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Message History"})," component has two modes, depending on where you want to use it in your flow:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Retrieve mode"}),": The component retrieves chat messages from your Langflow database or external memory."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Store mode"}),": The component stores chat messages in your Langflow database or external memory."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["This means that you need multiple ",(0,r.jsx)(n.strong,{children:"Message History"})," components in your flow if you want to both store and retrieve chat messages."]}),"\n",(0,r.jsxs)(c.A,{children:[(0,r.jsxs)(l.A,{value:"langflow",label:"Use Langflow storage",default:!0,children:[(0,r.jsxs)(n.p,{children:["The following steps explain how to create a chat-based flow that uses ",(0,r.jsx)(n.strong,{children:"Message History"})," components to store and retrieve chat memory from your Langflow installation's database:"]}),(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Create or edit a flow where you want to use chat memory."}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["At the beginning of the flow, add a ",(0,r.jsx)(n.strong,{children:"Message History"})," component, and then set it to ",(0,r.jsx)(n.strong,{children:"Retrieve"})," mode."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Optional: In the ",(0,r.jsx)(n.strong,{children:"Message History"})," ",(0,r.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),", click ",(0,r.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Controls"})," to enable parameters for memory sorting, filtering, and limits."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Add a ",(0,r.jsxs)(n.a,{href:"/components-prompts",children:[(0,r.jsx)(n.strong,{children:"Prompt Template"})," component"]}),", add a ",(0,r.jsx)(n.code,{children:"{memory}"})," variable to the ",(0,r.jsx)(n.strong,{children:"Template"})," field, and then connect the ",(0,r.jsx)(n.strong,{children:"Message History"})," output to the ",(0,r.jsx)(n.strong,{children:"memory"})," input."]}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," component supplies instructions and context to LLMs, separate from chat messages passed through a ",(0,r.jsx)(n.strong,{children:"Chat Input"})," component.\nThe template can include any text and variables that you want to supply to the LLM, for example:"]}),"\n",(0,r.jsx)(m.Code,{codeConfig:u,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"You are a helpful assistant that answers questions.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"Use markdown to format your answer, properly embedding images and urls.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"History:",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"{memory}",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(n.p,{children:["Variables (",(0,r.jsx)(n.code,{children:"{variable}"}),") in the template dynamically add fields to the ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," component so that your flow can receive definitions for those values from elsewhere, such as other components, Langflow global variables, or runtime input."]}),"\n",(0,r.jsxs)(n.p,{children:["In this example, the ",(0,r.jsx)(n.code,{children:"{memory}"})," variable is populated by the retrieved chat memories, which are then passed to a ",(0,r.jsx)(n.strong,{children:"Language Model"})," or ",(0,r.jsx)(n.strong,{children:"Agent"})," component to provide additional context to the LLM."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Connect the ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," component's output to a ",(0,r.jsx)(n.strong,{children:"Language Model"})," component's ",(0,r.jsx)(n.strong,{children:"System Message"})," input."]}),"\n",(0,r.jsxs)(n.p,{children:["This example uses the ",(0,r.jsx)(n.strong,{children:"Language Model"})," core component as the central chat driver, but you can also use another language model component or the ",(0,r.jsx)(n.strong,{children:"Agent"})," component."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Add a ",(0,r.jsx)(n.strong,{children:"Chat Input"})," component, and then connect it to the ",(0,r.jsx)(n.strong,{children:"Language Model"})," component's ",(0,r.jsx)(n.strong,{children:"Input"})," field."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Connect the ",(0,r.jsx)(n.strong,{children:"Language Model"})," component's output 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:["At the end of the flow, add another ",(0,r.jsx)(n.strong,{children:"Message History"})," component, and then set it to ",(0,r.jsx)(n.strong,{children:"Store"})," mode."]}),"\n",(0,r.jsxs)(n.p,{children:["Configure any additional parameters in the second ",(0,r.jsx)(n.strong,{children:"Message History"})," component as needed, taking into consideration that this particular component will store chat messages rather than retrieve them."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Connect the ",(0,r.jsx)(n.strong,{children:"Chat Output"})," component's output to the ",(0,r.jsx)(n.strong,{children:"Message History"})," component's ",(0,r.jsx)(n.strong,{children:"Message"})," input."]}),"\n",(0,r.jsxs)(n.p,{children:["Each response from the LLM is output from the ",(0,r.jsx)(n.strong,{children:"Language Model"})," component to the ",(0,r.jsx)(n.strong,{children:"Chat Output"})," component, and then stored in chat memory by the final ",(0,r.jsx)(n.strong,{children:"Message History"})," component."]}),"\n"]}),"\n"]})]}),(0,r.jsxs)(l.A,{value:"external",label:"Use external chat memory",children:[(0,r.jsxs)(n.p,{children:["To store and retrieve chat memory from a dedicated, external chat memory database, use the ",(0,r.jsx)(n.strong,{children:"Message History"})," component ",(0,r.jsx)(n.em,{children:"and"})," a provider-specific chat memory component."]}),(0,r.jsxs)(n.p,{children:["The following steps explain how to create a flow that stores and retrieves chat memory with a ",(0,r.jsxs)(n.a,{href:"/bundles-redis",children:[(0,r.jsx)(n.strong,{children:"Redis Chat Memory"})," component"]}),".\nOther options include the ",(0,r.jsxs)(n.a,{href:"/bundles-mem0",children:[(0,r.jsx)(n.strong,{children:"Mem0 Chat Memory"})," component"]})," and ",(0,r.jsxs)(n.a,{href:"/bundles-datastax#cassandra-chat-memory",children:[(0,r.jsx)(n.strong,{children:"Cassandra Chat Memory"})," component"]}),"."]}),(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Create or edit a flow where you want to use chat memory."}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["At the beginning of the flow, add ",(0,r.jsx)(n.strong,{children:"Message History"})," and ",(0,r.jsx)(n.strong,{children:"Redis Chat Memory"})," components:"]}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Configure the ",(0,r.jsx)(n.strong,{children:"Redis Chat Memory"})," component to connect to your Redis database. For more information, see the ",(0,r.jsx)(n.a,{href:"https://redis.io/docs/latest/",children:"Redis documentation"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Set the ",(0,r.jsx)(n.strong,{children:"Message History"})," component to ",(0,r.jsx)(n.strong,{children:"Retrieve"})," mode."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["In the ",(0,r.jsx)(n.strong,{children:"Message History"})," ",(0,r.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),", click ",(0,r.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Controls"}),", enable ",(0,r.jsx)(n.strong,{children:"External Memory"}),", and then click ",(0,r.jsx)(n.strong,{children:"Close"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["In ",(0,r.jsx)(n.strong,{children:"Controls"}),", you can also enable parameters for memory sorting, filtering, and limits."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Connect the ",(0,r.jsx)(n.strong,{children:"Redis Chat Memory"})," component's output to the ",(0,r.jsx)(n.strong,{children:"Message History"})," component's ",(0,r.jsx)(n.strong,{children:"External Memory"})," input."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Add a ",(0,r.jsxs)(n.a,{href:"/components-prompts",children:[(0,r.jsx)(n.strong,{children:"Prompt Template"})," component"]}),", add a ",(0,r.jsx)(n.code,{children:"{memory}"})," variable to the ",(0,r.jsx)(n.strong,{children:"Template"})," field, and then connect the ",(0,r.jsx)(n.strong,{children:"Message History"})," output to the ",(0,r.jsx)(n.strong,{children:"memory"})," input."]}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," component supplies instructions and context to LLMs, separate from chat messages passed through a ",(0,r.jsx)(n.strong,{children:"Chat Input"})," component.\nThe template can include any text and variables that you want to supply to the LLM, for example:"]}),"\n",(0,r.jsx)(m.Code,{codeConfig:u,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"You are a helpful assistant that answers questions.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"Use markdown to format your answer, properly embedding images and urls.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"History:",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"{memory}",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(n.p,{children:["Variables (",(0,r.jsx)(n.code,{children:"{variable}"}),") in the template dynamically add fields to the ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," component so that your flow can receive definitions for those values from elsewhere, such as other components, Langflow global variables, or runtime input."]}),"\n",(0,r.jsxs)(n.p,{children:["In this example, the ",(0,r.jsx)(n.code,{children:"{memory}"})," variable is populated by the retrieved chat memories, which are then passed to a ",(0,r.jsx)(n.strong,{children:"Language Model"})," or ",(0,r.jsx)(n.strong,{children:"Agent"})," component to provide additional context to the LLM."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Connect the ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," component's output to a ",(0,r.jsx)(n.strong,{children:"Language Model"})," component's ",(0,r.jsx)(n.strong,{children:"System Message"})," input."]}),"\n",(0,r.jsxs)(n.p,{children:["This example uses a ",(0,r.jsx)(n.strong,{children:"Language Model"})," component as the central chat driver, but you can also use an ",(0,r.jsx)(n.strong,{children:"Agent"})," component."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Add a ",(0,r.jsx)(n.strong,{children:"Chat Input"})," component, and then connect it to the ",(0,r.jsx)(n.strong,{children:"Language Model"})," component's ",(0,r.jsx)(n.strong,{children:"Input"})," input."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Connect the ",(0,r.jsx)(n.strong,{children:"Language Model"})," component's output 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:["At the end of the flow, add another pair of ",(0,r.jsx)(n.strong,{children:"Message History"})," and ",(0,r.jsx)(n.strong,{children:"Redis Chat Memory"})," components:"]}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Configure the ",(0,r.jsx)(n.strong,{children:"Redis Chat Memory"})," component to connect to your Redis database."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Set the ",(0,r.jsx)(n.strong,{children:"Message History"})," component to ",(0,r.jsx)(n.strong,{children:"Store"})," mode."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["In the ",(0,r.jsx)(n.strong,{children:"Message History"})," ",(0,r.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),", click ",(0,r.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Controls"}),", enable ",(0,r.jsx)(n.strong,{children:"External Memory"}),", and then click ",(0,r.jsx)(n.strong,{children:"Close"}),"."]}),"\n",(0,r.jsx)(n.p,{children:"Configure any additional parameters in this component as needed, taking into consideration that this particular component will store chat messages rather than retrieve them."}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Connect the ",(0,r.jsx)(n.strong,{children:"Redis Chat Memory"})," component to the ",(0,r.jsx)(n.strong,{children:"Message History"})," component's ",(0,r.jsx)(n.strong,{children:"External Memory"})," input."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Connect the ",(0,r.jsx)(n.strong,{children:"Chat Output"})," component's output to the ",(0,r.jsx)(n.strong,{children:"Message History"})," component's ",(0,r.jsx)(n.strong,{children:"Message"})," input."]}),"\n",(0,r.jsxs)(n.p,{children:["Each response from the LLM is output from the ",(0,r.jsx)(n.strong,{children:"Language Model"})," component to the ",(0,r.jsx)(n.strong,{children:"Chat Output"})," component, and then stored in chat memory by passing it to the final ",(0,r.jsx)(n.strong,{children:"Message History"})," and ",(0,r.jsx)(n.strong,{children:"Redis Chat Memory"})," components."]}),"\n"]}),"\n"]}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"A flow with Message History and Redis Chat Memory components",src:t(96841).A+"",width:"4000",height:"1768"})})]})]}),"\n",(0,r.jsx)(n.h3,{id:"message-history-parameters",children:"Message History parameters"}),"\n",(0,r.jsxs)(n.p,{children:["Many ",(0,r.jsx)(n.strong,{children:"Message History"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,r.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Controls"})," in the ",(0,r.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(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:"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:"memory"}),(0,r.jsx)(n.td,{children:"Memory"}),(0,r.jsx)(n.td,{children:"Input parameter. Retrieve messages from an external memory. If empty, the Langflow tables are used."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"sender"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:"Input parameter. Filter by sender type."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"sender_name"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:"Input parameter. Filter by sender name."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"n_messages"}),(0,r.jsx)(n.td,{children:"Integer"}),(0,r.jsx)(n.td,{children:"Input parameter. The number of messages to retrieve."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"session_id"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsxs)(n.td,{children:["Input parameter. The ",(0,r.jsx)(n.a,{href:"/session-id",children:"session ID"})," of the chat memories to store or retrieve. If omitted or empty, the current session ID for the flow run is used. Use custom session IDs if you need to segregate chat memory for different users or applications that run the same flow."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"order"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:"Input parameter. The order of the messages."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"template"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsxs)(n.td,{children:["Input parameter. The template to use for formatting the data. It can contain the keys ",(0,r.jsx)(n.code,{children:"{text}"}),", ",(0,r.jsx)(n.code,{children:"{sender}"})," or any other key in the message data."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"messages"}),(0,r.jsx)(n.td,{children:"Message"}),(0,r.jsxs)(n.td,{children:["Output parameter. The retrieved memories as ",(0,r.jsx)(n.code,{children:"Message"})," objects, including ",(0,r.jsx)(n.code,{children:"messages_text"})," containing retrieved chat message text. This is the typical output format used to pass memories ",(0,r.jsx)(n.em,{children:"as chat messages"})," to another component."]})]}),(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:["Output parameter. A ",(0,r.jsx)(n.code,{children:"DataFrame"})," containing the message data. Useful for cases where you need to retrieve memories in a tabular format rather than as chat messages."]})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"legacy-helper-components",children:"Legacy Helper components"}),"\n",(0,r.jsx)(n.p,{children:"The following components are legacy components.\nYou can use these components in your flows, but they are no longer maintained and may be removed in a future release.\nIt is recommended that you replace legacy components with the recommended alternatives as soon as possible."}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Chat History"}),": Replaced by the ",(0,r.jsxs)(n.a,{href:"#message-history",children:[(0,r.jsx)(n.strong,{children:"Message History"})," component"]})]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Message Store"}),": Replaced by the ",(0,r.jsxs)(n.a,{href:"#message-history",children:[(0,r.jsx)(n.strong,{children:"Message History"})," component"]})]}),"\n"]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Create List"}),(0,r.jsx)(n.p,{children:"This component dynamically creates a record with a specified number of fields."}),(0,r.jsx)(n.p,{children:"It accepts the following parameters:"}),(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:"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:"n_fields"}),(0,r.jsx)(n.td,{children:"Integer"}),(0,r.jsx)(n.td,{children:"Input parameter. The number of fields to be added to the record."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"text_key"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:"Input parameter. The key used as text."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"list"}),(0,r.jsx)(n.td,{children:"List"}),(0,r.jsx)(n.td,{children:"Output parameter. The dynamically created list with the specified number of fields."})]})]})]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"ID Generator"}),(0,r.jsx)(n.p,{children:"This component generates a unique ID."}),(0,r.jsx)(n.p,{children:"It accepts the following parameters:"}),(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:"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:"unique_id"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:"Input parameter. The generated unique ID."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"id"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:"Output parameter. The generated unique ID."})]})]})]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Output Parser"}),(0,r.jsxs)(n.p,{children:["Replace the legacy ",(0,r.jsx)(n.strong,{children:"Output Parser"})," component with the ",(0,r.jsxs)(n.a,{href:"/components-processing#structured-output",children:[(0,r.jsx)(n.strong,{children:"Structured Output"})," component"]})," and ",(0,r.jsxs)(n.a,{href:"/components-processing#parser",children:[(0,r.jsx)(n.strong,{children:"Parser"})," component"]}),".\nThe components you need depend on the data types and complexity of the parsing task."]}),(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Output Parser"})," component transforms the output of a language model into comma-separated values (CSV) format, such as ",(0,r.jsx)(n.code,{children:'["item1", "item2", "item3"]'}),", using LangChain's ",(0,r.jsx)(n.code,{children:"CommaSeparatedListOutputParser"}),".\nThe ",(0,r.jsx)(n.strong,{children:"Structured Output"})," component is a good alternative for this component because it also formats LLM responses with support for custom schemas and more complex parsing."]}),(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Parsing"})," components only provide formatting instructions and parsing functionality.\n",(0,r.jsx)(n.em,{children:"They don't include prompts."}),"\nYou must connect parsers to ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," components to create prompts that LLMs can use."]}),(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Open a flow that has a ",(0,r.jsx)(n.strong,{children:"Chat Input"}),", ",(0,r.jsx)(n.strong,{children:"Language Model"}),", 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:["Add ",(0,r.jsx)(n.strong,{children:"Output Parser"})," and ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," components to your flow."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Define your LLM's prompt in the ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," component's ",(0,r.jsx)(n.strong,{children:"Template"}),", including all instructions and pre-loaded context.\nMake sure to include a ",(0,r.jsx)(n.code,{children:"{format_instructions}"})," variable where you will inject the formatting instructions from the ",(0,r.jsx)(n.strong,{children:"Output Parser"})," component.\nFor example:"]}),"\n",(0,r.jsx)(m.Code,{codeConfig:u,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"You are a helpful assistant that provides lists of information.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"{format_instructions}",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(n.p,{children:["Variables in the template dynamically add fields to the ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," component so that your flow can receive definitions for those values from other components, Langflow global variables, or fixed input."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Connect the ",(0,r.jsx)(n.strong,{children:"Output Parser"})," component's output to the ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," component's ",(0,r.jsx)(n.strong,{children:"format instructions"})," input."]}),"\n"]}),"\n"]}),(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Output Parser"})," component accepts the following parameters:"]}),(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:"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:"parser_type"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:'Input parameter. Sets the parser type as "CSV".'})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"format_instructions"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:"Output parameter. Pass to a prompt template to include formatting instructions for LLM responses."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"output_parser"}),(0,r.jsx)(n.td,{children:"Parser"}),(0,r.jsx)(n.td,{children:"Output parameter. The constructed output parser that can be used to parse LLM responses."})]})]})]})]})]})}function g(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(j,{...e})}):j(e)}function f(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},96841:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.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([[824],{11470:(e,n,t)=>{t.d(n,{A:()=>w});var s=t(96540),r=t(18215),o=t(23104),a=t(56347),i=t(205),c=t(57485),l=t(31682),d=t(70679);function h(e){return s.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,s.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 p(e){const{values:n,children:t}=e;return(0,s.useMemo)(()=>{const e=n??function(e){return h(e).map(({props:{value:e,label:n,attributes:t,default:s}})=>({value:e,label:n,attributes:t,default:s}))}(t);return function(e){const n=(0,l.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 m({value:e,tabValues:n}){return n.some(n=>n.value===e)}function u({queryString:e=!1,groupId:n}){const t=(0,a.W6)(),r=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)(r),(0,s.useCallback)(e=>{if(!r)return;const n=new URLSearchParams(t.location.search);n.set(r,e),t.replace({...t.location,search:n.toString()})},[r,t])]}function x(e){const{defaultValue:n,queryString:t=!1,groupId:r}=e,o=p(e),[a,c]=(0,s.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(!m({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:o})),[l,h]=u({queryString:t,groupId:r}),[x,j]=function({groupId:e}){const n=function(e){return e?`docusaurus.tab.${e}`:null}(e),[t,r]=(0,d.Dv)(n);return[t,(0,s.useCallback)(e=>{n&&r.set(e)},[n,r])]}({groupId:r}),g=(()=>{const e=l??x;return m({value:e,tabValues:o})?e:null})();(0,i.A)(()=>{g&&c(g)},[g]);return{selectedValue:a,selectValue:(0,s.useCallback)(e=>{if(!m({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);c(e),h(e),j(e)},[h,j,o]),tabValues:o}}var j=t(92303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var f=t(74848);function y({className:e,block:n,selectedValue:t,selectValue:s,tabValues:a}){const i=[],{blockElementScrollPositionUntilNextRender:c}=(0,o.a_)(),l=e=>{const n=e.currentTarget,r=i.indexOf(n),o=a[r].value;o!==t&&(c(n),s(o))},d=e=>{let n=null;switch(e.key){case"Enter":l(e);break;case"ArrowRight":{const t=i.indexOf(e.currentTarget)+1;n=i[t]??i[0];break}case"ArrowLeft":{const t=i.indexOf(e.currentTarget)-1;n=i[t]??i[i.length-1];break}}n?.focus()};return(0,f.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":n},e),children:a.map(({value:e,label:n,attributes:s})=>(0,f.jsx)("li",{role:"tab",tabIndex:t===e?0:-1,"aria-selected":t===e,ref:e=>{i.push(e)},onKeyDown:d,onClick:l,...s,className:(0,r.A)("tabs__item",g.tabItem,s?.className,{"tabs__item--active":t===e}),children:n??e},e))})}function b({lazy:e,children:n,selectedValue:t}){const o=(Array.isArray(n)?n:[n]).filter(Boolean);if(e){const e=o.find(e=>e.props.value===t);return e?(0,s.cloneElement)(e,{className:(0,r.A)("margin-top--md",e.props.className)}):null}return(0,f.jsx)("div",{className:"margin-top--md",children:o.map((e,n)=>(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==t}))})}function v(e){const n=x(e);return(0,f.jsxs)("div",{className:(0,r.A)("tabs-container",g.tabList),children:[(0,f.jsx)(y,{...n,...e}),(0,f.jsx)(b,{...n,...e})]})}function w(e){const n=(0,j.A)();return(0,f.jsx)(v,{...e,children:h(e.children)},String(n))}},17886:(e,n,t)=>{t.d(n,{A:()=>o});t(96540);var s=t(64058),r=t(74848);function o({name:e,...n}){const t=s[e];return t?(0,r.jsx)(t,{...n}):null}},19365:(e,n,t)=>{t.d(n,{A:()=>a});t(96540);var s=t(18215);const r={tabItem:"tabItem_Ymn6"};var o=t(74848);function a({children:e,hidden:n,className:t}){return(0,o.jsx)("div",{role:"tabpanel",className:(0,s.A)(r.tabItem,t),hidden:n,children:e})}},28838:(e,n,t)=>{t.r(n),t.d(n,{CH:()=>m,assets:()=>p,chCodeConfig:()=>u,contentTitle:()=>h,default:()=>g,frontMatter:()=>d,metadata:()=>s,toc:()=>x});const s=JSON.parse('{"id":"Components/components-helpers","title":"Helpers","description":"Helper components provide utility functions to help manage data and perform simple tasks in your flow.","source":"@site/docs/Components/components-helpers.mdx","sourceDirName":"Components","slug":"/components-helpers","permalink":"/components-helpers","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Helpers","slug":"/components-helpers"},"sidebar":"docs","previous":{"title":"Logic","permalink":"/components-logic"},"next":{"title":"Tools","permalink":"/components-tools"}}');var r=t(74848),o=t(28453),a=t(24754),i=t(17886),c=t(11470),l=t(19365);const d={title:"Helpers",slug:"/components-helpers"},h=void 0,p={},m={annotations:a.hk,Code:a.Cy},u={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},x=[{value:"Calculator",id:"calculator",level:2},{value:"Calculator parameters",id:"calculator-parameters",level:3},{value:"Current Date",id:"current-date",level:2},{value:"Current Date parameters",id:"current-date-parameters",level:3},{value:"Message History",id:"message-history",level:2},{value:"Use the Message History component in a flow",id:"use-the-message-history-component-in-a-flow",level:3},{value:"Message History parameters",id:"message-history-parameters",level:3},{value:"Legacy Helper components",id:"legacy-helper-components",level:2}];function j(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,o.R)(),...e.components},{Details:s}=n;return m||f("CH",!1),m.Code||f("CH.Code",!0),s||f("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)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Helper"})," components provide utility functions to help manage data and perform simple tasks in your flow."]}),"\n",(0,r.jsx)(n.h2,{id:"calculator",children:"Calculator"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Calculator"})," component performs basic arithmetic operations on mathematical expressions.\nIt supports addition, subtraction, multiplication, division, and exponentiation operations."]}),"\n",(0,r.jsxs)(n.p,{children:["For an example of using this component in a flow, see the ",(0,r.jsxs)(n.a,{href:"/components-processing#python-interpreter",children:[(0,r.jsx)(n.strong,{children:"Python Interpreter"})," component"]}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"calculator-parameters",children:"Calculator parameters"}),"\n",(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:"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:"expression"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsxs)(n.td,{children:["Input parameter. The arithmetic expression to evaluate, such as ",(0,r.jsx)(n.code,{children:"4*4*(33/22)+12-20"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"result"}),(0,r.jsx)(n.td,{children:"Data"}),(0,r.jsxs)(n.td,{children:["Output parameter. The calculation result as a ",(0,r.jsxs)(n.a,{href:"/data-types",children:[(0,r.jsx)(n.code,{children:"Data"})," object"]})," containing the evaluated expression."]})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"current-date",children:"Current Date"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Current Date"})," component returns the current date and time in a selected timezone. This component provides a flexible way to obtain timezone-specific date and time information within a Langflow pipeline."]}),"\n",(0,r.jsx)(n.h3,{id:"current-date-parameters",children:"Current Date parameters"}),"\n",(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:"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:"timezone"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:"Input parameter. The timezone for the current date and time."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"current_date"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:"Output parameter. The resulting current date and time in the selected timezone."})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"message-history",children:"Message History"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Message History"})," component provides combined chat history and message storage functionality.\nIt can store and retrieve chat messages from either ",(0,r.jsx)(n.a,{href:"/memory",children:"Langflow storage"})," ",(0,r.jsx)(n.em,{children:"or"})," a dedicated chat memory database like Mem0 or Redis."]}),"\n",(0,r.jsxs)(n.admonition,{type:"important",children:[(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Agent"})," component has built-in chat memory that is enabled by default and uses Langflow storage.\nThis built-in chat memory functionality is sufficient for most use cases."]}),(0,r.jsxs)(n.p,{children:["Use the ",(0,r.jsx)(n.strong,{children:"Message History"})," component for the following use cases:"]}),(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:"You need to store and retrieve chat memory for a language model component (not an agent)."}),"\n",(0,r.jsx)(n.li,{children:"You need to retrieve chat memories outside the chat context, such as a sentiment analysis flow that retrieves and analyzes recently stored memories."}),"\n",(0,r.jsx)(n.li,{children:"You want to store memories in a specific database that is separate from Langflow storage."}),"\n"]}),(0,r.jsxs)(n.p,{children:["For more information, see ",(0,r.jsx)(n.a,{href:"/memory#store-chat-memory",children:"Store chat memory"}),"."]})]}),"\n",(0,r.jsx)(n.h3,{id:"use-the-message-history-component-in-a-flow",children:"Use the Message History component in a flow"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Message History"})," component has two modes, depending on where you want to use it in your flow:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Retrieve mode"}),": The component retrieves chat messages from your Langflow database or external memory."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Store mode"}),": The component stores chat messages in your Langflow database or external memory."]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["This means that you need multiple ",(0,r.jsx)(n.strong,{children:"Message History"})," components in your flow if you want to both store and retrieve chat messages."]}),"\n",(0,r.jsxs)(c.A,{children:[(0,r.jsxs)(l.A,{value:"langflow",label:"Use Langflow storage",default:!0,children:[(0,r.jsxs)(n.p,{children:["The following steps explain how to create a chat-based flow that uses ",(0,r.jsx)(n.strong,{children:"Message History"})," components to store and retrieve chat memory from your Langflow installation's database:"]}),(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Create or edit a flow where you want to use chat memory."}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["At the beginning of the flow, add a ",(0,r.jsx)(n.strong,{children:"Message History"})," component, and then set it to ",(0,r.jsx)(n.strong,{children:"Retrieve"})," mode."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Optional: In the ",(0,r.jsx)(n.strong,{children:"Message History"})," ",(0,r.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),", click ",(0,r.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Controls"})," to enable parameters for memory sorting, filtering, and limits."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Add a ",(0,r.jsxs)(n.a,{href:"/components-prompts",children:[(0,r.jsx)(n.strong,{children:"Prompt Template"})," component"]}),", add a ",(0,r.jsx)(n.code,{children:"{memory}"})," variable to the ",(0,r.jsx)(n.strong,{children:"Template"})," field, and then connect the ",(0,r.jsx)(n.strong,{children:"Message History"})," output to the ",(0,r.jsx)(n.strong,{children:"memory"})," input."]}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," component supplies instructions and context to LLMs, separate from chat messages passed through a ",(0,r.jsx)(n.strong,{children:"Chat Input"})," component.\nThe template can include any text and variables that you want to supply to the LLM, for example:"]}),"\n",(0,r.jsx)(m.Code,{codeConfig:u,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"You are a helpful assistant that answers questions.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"Use markdown to format your answer, properly embedding images and urls.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"History:",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"{memory}",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(n.p,{children:["Variables (",(0,r.jsx)(n.code,{children:"{variable}"}),") in the template dynamically add fields to the ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," component so that your flow can receive definitions for those values from elsewhere, such as other components, Langflow global variables, or runtime input."]}),"\n",(0,r.jsxs)(n.p,{children:["In this example, the ",(0,r.jsx)(n.code,{children:"{memory}"})," variable is populated by the retrieved chat memories, which are then passed to a ",(0,r.jsx)(n.strong,{children:"Language Model"})," or ",(0,r.jsx)(n.strong,{children:"Agent"})," component to provide additional context to the LLM."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Connect the ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," component's output to a ",(0,r.jsx)(n.strong,{children:"Language Model"})," component's ",(0,r.jsx)(n.strong,{children:"System Message"})," input."]}),"\n",(0,r.jsxs)(n.p,{children:["This example uses the ",(0,r.jsx)(n.strong,{children:"Language Model"})," core component as the central chat driver, but you can also use another language model component or the ",(0,r.jsx)(n.strong,{children:"Agent"})," component."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Add a ",(0,r.jsx)(n.strong,{children:"Chat Input"})," component, and then connect it to the ",(0,r.jsx)(n.strong,{children:"Language Model"})," component's ",(0,r.jsx)(n.strong,{children:"Input"})," field."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Connect the ",(0,r.jsx)(n.strong,{children:"Language Model"})," component's output 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:["At the end of the flow, add another ",(0,r.jsx)(n.strong,{children:"Message History"})," component, and then set it to ",(0,r.jsx)(n.strong,{children:"Store"})," mode."]}),"\n",(0,r.jsxs)(n.p,{children:["Configure any additional parameters in the second ",(0,r.jsx)(n.strong,{children:"Message History"})," component as needed, taking into consideration that this particular component will store chat messages rather than retrieve them."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Connect the ",(0,r.jsx)(n.strong,{children:"Chat Output"})," component's output to the ",(0,r.jsx)(n.strong,{children:"Message History"})," component's ",(0,r.jsx)(n.strong,{children:"Message"})," input."]}),"\n",(0,r.jsxs)(n.p,{children:["Each response from the LLM is output from the ",(0,r.jsx)(n.strong,{children:"Language Model"})," component to the ",(0,r.jsx)(n.strong,{children:"Chat Output"})," component, and then stored in chat memory by the final ",(0,r.jsx)(n.strong,{children:"Message History"})," component."]}),"\n"]}),"\n"]})]}),(0,r.jsxs)(l.A,{value:"external",label:"Use external chat memory",children:[(0,r.jsxs)(n.p,{children:["To store and retrieve chat memory from a dedicated, external chat memory database, use the ",(0,r.jsx)(n.strong,{children:"Message History"})," component ",(0,r.jsx)(n.em,{children:"and"})," a provider-specific chat memory component."]}),(0,r.jsxs)(n.p,{children:["The following steps explain how to create a flow that stores and retrieves chat memory with a ",(0,r.jsxs)(n.a,{href:"/bundles-redis",children:[(0,r.jsx)(n.strong,{children:"Redis Chat Memory"})," component"]}),".\nOther options include the ",(0,r.jsxs)(n.a,{href:"/bundles-mem0",children:[(0,r.jsx)(n.strong,{children:"Mem0 Chat Memory"})," component"]})," and ",(0,r.jsxs)(n.a,{href:"/bundles-datastax#cassandra-chat-memory",children:[(0,r.jsx)(n.strong,{children:"Cassandra Chat Memory"})," component"]}),"."]}),(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Create or edit a flow where you want to use chat memory."}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["At the beginning of the flow, add a ",(0,r.jsx)(n.strong,{children:"Message History"})," component and a ",(0,r.jsx)(n.strong,{children:"Redis Chat Memory"})," component:"]}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Configure the ",(0,r.jsx)(n.strong,{children:"Redis Chat Memory"})," component to connect to your Redis database. For more information, see the ",(0,r.jsx)(n.a,{href:"https://redis.io/docs/latest/",children:"Redis documentation"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Set the ",(0,r.jsx)(n.strong,{children:"Message History"})," component to ",(0,r.jsx)(n.strong,{children:"Retrieve"})," mode."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["In the ",(0,r.jsx)(n.strong,{children:"Message History"})," ",(0,r.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),", click ",(0,r.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Controls"}),", enable ",(0,r.jsx)(n.strong,{children:"External Memory"}),", and then click ",(0,r.jsx)(n.strong,{children:"Close"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["In ",(0,r.jsx)(n.strong,{children:"Controls"}),", you can also enable parameters for memory sorting, filtering, and limits."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Connect the ",(0,r.jsx)(n.strong,{children:"Redis Chat Memory"})," component's output to the ",(0,r.jsx)(n.strong,{children:"Message History"})," component's ",(0,r.jsx)(n.strong,{children:"External Memory"})," input."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Add a ",(0,r.jsxs)(n.a,{href:"/components-prompts",children:[(0,r.jsx)(n.strong,{children:"Prompt Template"})," component"]}),", add a ",(0,r.jsx)(n.code,{children:"{memory}"})," variable to the ",(0,r.jsx)(n.strong,{children:"Template"})," field, and then connect the ",(0,r.jsx)(n.strong,{children:"Message History"})," output to the ",(0,r.jsx)(n.strong,{children:"memory"})," input."]}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," component supplies instructions and context to LLMs, separate from chat messages passed through a ",(0,r.jsx)(n.strong,{children:"Chat Input"})," component.\nThe template can include any text and variables that you want to supply to the LLM, for example:"]}),"\n",(0,r.jsx)(m.Code,{codeConfig:u,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"You are a helpful assistant that answers questions.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"Use markdown to format your answer, properly embedding images and urls.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"History:",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"{memory}",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(n.p,{children:["Variables (",(0,r.jsx)(n.code,{children:"{variable}"}),") in the template dynamically add fields to the ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," component so that your flow can receive definitions for those values from elsewhere, such as other components, Langflow global variables, or runtime input."]}),"\n",(0,r.jsxs)(n.p,{children:["In this example, the ",(0,r.jsx)(n.code,{children:"{memory}"})," variable is populated by the retrieved chat memories, which are then passed to a ",(0,r.jsx)(n.strong,{children:"Language Model"})," or ",(0,r.jsx)(n.strong,{children:"Agent"})," component to provide additional context to the LLM."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Connect the ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," component's output to a ",(0,r.jsx)(n.strong,{children:"Language Model"})," component's ",(0,r.jsx)(n.strong,{children:"System Message"})," input."]}),"\n",(0,r.jsxs)(n.p,{children:["This example uses a ",(0,r.jsx)(n.strong,{children:"Language Model"})," component as the central chat driver, but you can also use an ",(0,r.jsx)(n.strong,{children:"Agent"})," component."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Add a ",(0,r.jsx)(n.strong,{children:"Chat Input"})," component, and then connect it to the ",(0,r.jsx)(n.strong,{children:"Language Model"})," component's ",(0,r.jsx)(n.strong,{children:"Input"})," input."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Connect the ",(0,r.jsx)(n.strong,{children:"Language Model"})," component's output 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:["At the end of the flow, add another pair of ",(0,r.jsx)(n.strong,{children:"Message History"})," and ",(0,r.jsx)(n.strong,{children:"Redis Chat Memory"})," components:"]}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Configure the ",(0,r.jsx)(n.strong,{children:"Redis Chat Memory"})," component to connect to your Redis database."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Set the ",(0,r.jsx)(n.strong,{children:"Message History"})," component to ",(0,r.jsx)(n.strong,{children:"Store"})," mode."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["In the ",(0,r.jsx)(n.strong,{children:"Message History"})," ",(0,r.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),", click ",(0,r.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Controls"}),", enable ",(0,r.jsx)(n.strong,{children:"External Memory"}),", and then click ",(0,r.jsx)(n.strong,{children:"Close"}),"."]}),"\n",(0,r.jsx)(n.p,{children:"Configure any additional parameters in this component as needed, taking into consideration that this particular component will store chat messages rather than retrieve them."}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Connect the ",(0,r.jsx)(n.strong,{children:"Redis Chat Memory"})," component to the ",(0,r.jsx)(n.strong,{children:"Message History"})," component's ",(0,r.jsx)(n.strong,{children:"External Memory"})," input."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Connect the ",(0,r.jsx)(n.strong,{children:"Chat Output"})," component's output to the ",(0,r.jsx)(n.strong,{children:"Message History"})," component's ",(0,r.jsx)(n.strong,{children:"Message"})," input."]}),"\n",(0,r.jsxs)(n.p,{children:["Each response from the LLM is output from the ",(0,r.jsx)(n.strong,{children:"Language Model"})," component to the ",(0,r.jsx)(n.strong,{children:"Chat Output"})," component, and then stored in chat memory by passing it to the final ",(0,r.jsx)(n.strong,{children:"Message History"})," and ",(0,r.jsx)(n.strong,{children:"Redis Chat Memory"})," components."]}),"\n"]}),"\n"]}),(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"A flow with Message History and Redis Chat Memory components",src:t(96841).A+"",width:"4000",height:"1768"})})]})]}),"\n",(0,r.jsx)(n.h3,{id:"message-history-parameters",children:"Message History parameters"}),"\n",(0,r.jsxs)(n.p,{children:["Many ",(0,r.jsx)(n.strong,{children:"Message History"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,r.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Controls"})," in the ",(0,r.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(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:"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:"memory"}),(0,r.jsx)(n.td,{children:"Memory"}),(0,r.jsx)(n.td,{children:"Input parameter. Retrieve messages from an external memory. If empty, the Langflow tables are used."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"sender"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:"Input parameter. Filter by sender type."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"sender_name"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:"Input parameter. Filter by sender name."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"n_messages"}),(0,r.jsx)(n.td,{children:"Integer"}),(0,r.jsx)(n.td,{children:"Input parameter. The number of messages to retrieve."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"session_id"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsxs)(n.td,{children:["Input parameter. The ",(0,r.jsx)(n.a,{href:"/session-id",children:"session ID"})," of the chat memories to store or retrieve. If omitted or empty, the current session ID for the flow run is used. Use custom session IDs if you need to segregate chat memory for different users or applications that run the same flow."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"order"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:"Input parameter. The order of the messages."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"template"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsxs)(n.td,{children:["Input parameter. The template to use for formatting the data. It can contain the keys ",(0,r.jsx)(n.code,{children:"{text}"}),", ",(0,r.jsx)(n.code,{children:"{sender}"})," or any other key in the message data."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"messages"}),(0,r.jsx)(n.td,{children:"Message"}),(0,r.jsxs)(n.td,{children:["Output parameter. The retrieved memories as ",(0,r.jsx)(n.code,{children:"Message"})," objects, including ",(0,r.jsx)(n.code,{children:"messages_text"})," containing retrieved chat message text. This is the typical output format used to pass memories ",(0,r.jsx)(n.em,{children:"as chat messages"})," to another component."]})]}),(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:["Output parameter. A ",(0,r.jsx)(n.code,{children:"DataFrame"})," containing the message data. Useful for cases where you need to retrieve memories in a tabular format rather than as chat messages."]})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"legacy-helper-components",children:"Legacy Helper components"}),"\n",(0,r.jsx)(n.p,{children:"The following components are legacy components.\nYou can use these components in your flows, but they are no longer maintained and may be removed in a future release.\nIt is recommended that you replace legacy components with the recommended alternatives as soon as possible."}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Chat History"}),": Replaced by the ",(0,r.jsxs)(n.a,{href:"#message-history",children:[(0,r.jsx)(n.strong,{children:"Message History"})," component"]})]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Message Store"}),": Replaced by the ",(0,r.jsxs)(n.a,{href:"#message-history",children:[(0,r.jsx)(n.strong,{children:"Message History"})," component"]})]}),"\n"]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Create List"}),(0,r.jsx)(n.p,{children:"This component dynamically creates a record with a specified number of fields."}),(0,r.jsx)(n.p,{children:"It accepts the following parameters:"}),(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:"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:"n_fields"}),(0,r.jsx)(n.td,{children:"Integer"}),(0,r.jsx)(n.td,{children:"Input parameter. The number of fields to be added to the record."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"text_key"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:"Input parameter. The key used as text."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"list"}),(0,r.jsx)(n.td,{children:"List"}),(0,r.jsx)(n.td,{children:"Output parameter. The dynamically created list with the specified number of fields."})]})]})]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"ID Generator"}),(0,r.jsx)(n.p,{children:"This component generates a unique ID."}),(0,r.jsx)(n.p,{children:"It accepts the following parameters:"}),(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:"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:"unique_id"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:"Input parameter. The generated unique ID."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"id"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:"Output parameter. The generated unique ID."})]})]})]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Output Parser"}),(0,r.jsxs)(n.p,{children:["Replace the legacy ",(0,r.jsx)(n.strong,{children:"Output Parser"})," component with the ",(0,r.jsxs)(n.a,{href:"/components-processing#structured-output",children:[(0,r.jsx)(n.strong,{children:"Structured Output"})," component"]})," and ",(0,r.jsxs)(n.a,{href:"/components-processing#parser",children:[(0,r.jsx)(n.strong,{children:"Parser"})," component"]}),".\nThe components you need depend on the data types and complexity of the parsing task."]}),(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Output Parser"})," component transforms the output of a language model into comma-separated values (CSV) format, such as ",(0,r.jsx)(n.code,{children:'["item1", "item2", "item3"]'}),", using LangChain's ",(0,r.jsx)(n.code,{children:"CommaSeparatedListOutputParser"}),".\nThe ",(0,r.jsx)(n.strong,{children:"Structured Output"})," component is a good alternative for this component because it also formats LLM responses with support for custom schemas and more complex parsing."]}),(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Parsing"})," components only provide formatting instructions and parsing functionality.\n",(0,r.jsx)(n.em,{children:"They don't include prompts."}),"\nYou must connect parsers to ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," components to create prompts that LLMs can use."]}),(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Open a flow that has a ",(0,r.jsx)(n.strong,{children:"Chat Input"}),", ",(0,r.jsx)(n.strong,{children:"Language Model"}),", 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:["Add ",(0,r.jsx)(n.strong,{children:"Output Parser"})," and ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," components to your flow."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Define your LLM's prompt in the ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," component's ",(0,r.jsx)(n.strong,{children:"Template"}),", including all instructions and pre-loaded context.\nMake sure to include a ",(0,r.jsx)(n.code,{children:"{format_instructions}"})," variable where you will inject the formatting instructions from the ",(0,r.jsx)(n.strong,{children:"Output Parser"})," component.\nFor example:"]}),"\n",(0,r.jsx)(m.Code,{codeConfig:u,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"You are a helpful assistant that provides lists of information.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"{format_instructions}",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(n.p,{children:["Variables in the template dynamically add fields to the ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," component so that your flow can receive definitions for those values from other components, Langflow global variables, or fixed input."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Connect the ",(0,r.jsx)(n.strong,{children:"Output Parser"})," component's output to the ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," component's ",(0,r.jsx)(n.strong,{children:"format instructions"})," input."]}),"\n"]}),"\n"]}),(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Output Parser"})," component accepts the following parameters:"]}),(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:"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:"parser_type"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:'Input parameter. Sets the parser type as "CSV".'})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"format_instructions"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:"Output parameter. Pass to a prompt template to include formatting instructions for LLM responses."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"output_parser"}),(0,r.jsx)(n.td,{children:"Parser"}),(0,r.jsx)(n.td,{children:"Output parameter. The constructed output parser that can be used to parse LLM responses."})]})]})]})]})]})}function g(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(j,{...e})}):j(e)}function f(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},96841:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/component-message-history-external-memory-7e32402d0b6e819f5539adfbfbd3620f.png"}}]); \ No newline at end of file diff --git a/assets/js/56c23a02.7edd1f17.js b/assets/js/56c23a02.7edd1f17.js new file mode 100644 index 0000000000..0048057d45 --- /dev/null +++ b/assets/js/56c23a02.7edd1f17.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[8963],{17886:(e,n,t)=>{t.d(n,{A:()=>o});t(96540);var s=t(64058),r=t(74848);function o({name:e,...n}){const t=s[e];return t?(0,r.jsx)(t,{...n}):null}},31929:(e,n,t)=>{t.d(n,{Ay:()=>a,RM:()=>i});var s=t(74848),r=t(28453),o=t(17886);const i=[];function d(e){const n={a:"a",p:"p",strong:"strong",...(0,r.R)(),...e.components};return(0,s.jsxs)(n.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,s.jsx)(o.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Controls"})," in the ",(0,s.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function a(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},99987:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>x,frontMatter:()=>d,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"Components/bundles-xai","title":"xAI","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-xai.mdx","sourceDirName":"Components","slug":"/bundles-xai","permalink":"/bundles-xai","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"xAI","slug":"/bundles-xai"},"sidebar":"docs","previous":{"title":"Wikipedia","permalink":"/bundles-wikipedia"},"next":{"title":"Create custom Python components","permalink":"/components-custom-components"}}');var r=t(74848),o=t(28453),i=(t(17886),t(31929));const d={title:"xAI",slug:"/bundles-xai"},a=void 0,l={},c=[{value:"xAI text generation",id:"xai-text-generation",level:2},{value:"xAI text generation parameters",id:"xai-text-generation-parameters",level:3},...i.RM];function h(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,r.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,r.jsx)(n.strong,{children:"xAI"})," bundle."]}),"\n",(0,r.jsxs)(n.p,{children:["For more information about xAI features and functionality used by xAI components, see the ",(0,r.jsx)(n.a,{href:"https://x.ai/",children:"xAI documentation"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"xai-text-generation",children:"xAI text generation"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"xAI"})," component generates text using xAI models like ",(0,r.jsx)(n.a,{href:"https://x.ai/grok",children:"Grok"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["It can output either a ",(0,r.jsx)(n.strong,{children:"Model Response"})," (",(0,r.jsx)(n.a,{href:"/data-types#message",children:(0,r.jsx)(n.code,{children:"Message"})}),") or a ",(0,r.jsx)(n.strong,{children:"Language Model"})," (",(0,r.jsx)(n.a,{href:"/data-types#languagemodel",children:(0,r.jsx)(n.code,{children:"LanguageModel"})}),")."]}),"\n",(0,r.jsxs)(n.p,{children:["Use the ",(0,r.jsx)(n.strong,{children:"Language Model"})," output when you want to use an xAI model as the LLM for another LLM-driven component, such as an ",(0,r.jsx)(n.strong,{children:"Agent"})," or ",(0,r.jsx)(n.strong,{children:"Smart Function"})," component."]}),"\n",(0,r.jsxs)(n.p,{children:["For more information, see ",(0,r.jsxs)(n.a,{href:"/components-models",children:[(0,r.jsx)(n.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"xai-text-generation-parameters",children:"xAI text generation parameters"}),"\n",(0,r.jsx)(i.Ay,{}),"\n",(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:"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:"max_tokens"}),(0,r.jsx)(n.td,{children:"Integer"}),(0,r.jsxs)(n.td,{children:["Input parameter. Maximum number of tokens to generate. Set to ",(0,r.jsx)(n.code,{children:"0"})," for unlimited. Range: ",(0,r.jsx)(n.code,{children:"0-128000"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"model_kwargs"}),(0,r.jsx)(n.td,{children:"Dictionary"}),(0,r.jsx)(n.td,{children:"Input parameter. Additional keyword arguments for the model."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"json_mode"}),(0,r.jsx)(n.td,{children:"Boolean"}),(0,r.jsx)(n.td,{children:"Input parameter. If true, outputs JSON regardless of passing a schema."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"model_name"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsxs)(n.td,{children:["Input parameter. The xAI model to use. Default: ",(0,r.jsx)(n.code,{children:"grok-2-latest"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"base_url"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsxs)(n.td,{children:["Input parameter. Base URL for API requests. Default: ",(0,r.jsx)(n.code,{children:"https://api.x.ai/v1"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"api_key"}),(0,r.jsx)(n.td,{children:"SecretString"}),(0,r.jsx)(n.td,{children:"Input parameter. Your xAI API key for authentication."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"temperature"}),(0,r.jsx)(n.td,{children:"Float"}),(0,r.jsxs)(n.td,{children:["Input parameter. Controls randomness in the output. Range: ",(0,r.jsx)(n.code,{children:"[0.0, 2.0]"}),". Default: ",(0,r.jsx)(n.code,{children:"0.1"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"seed"}),(0,r.jsx)(n.td,{children:"Integer"}),(0,r.jsx)(n.td,{children:"Input parameter. Controls reproducibility of the job."})]})]})]})]})}function x(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}}}]); \ No newline at end of file diff --git a/assets/js/56c23a02.bfa09799.js b/assets/js/56c23a02.bfa09799.js deleted file mode 100644 index 8a65be8838..0000000000 --- a/assets/js/56c23a02.bfa09799.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[8963],{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}},99987:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>a,default:()=>x,frontMatter:()=>d,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"Components/bundles-xai","title":"xAI","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-xai.mdx","sourceDirName":"Components","slug":"/bundles-xai","permalink":"/bundles-xai","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"xAI","slug":"/bundles-xai"},"sidebar":"docs","previous":{"title":"Wikipedia","permalink":"/bundles-wikipedia"},"next":{"title":"Create custom Python components","permalink":"/components-custom-components"}}');var r=n(74848),o=n(28453),i=n(17886);const d={title:"xAI",slug:"/bundles-xai"},a=void 0,l={},c=[{value:"xAI text generation",id:"xai-text-generation",level:2},{value:"xAI text generation parameters",id:"xai-text-generation-parameters",level:3}];function h(e){const t={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,r.jsxs)(t.p,{children:["This page describes the components that are available in the ",(0,r.jsx)(t.strong,{children:"xAI"})," bundle."]}),"\n",(0,r.jsxs)(t.p,{children:["For more information about xAI features and functionality used by xAI components, see the ",(0,r.jsx)(t.a,{href:"https://x.ai/",children:"xAI documentation"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"xai-text-generation",children:"xAI text generation"}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"xAI"})," component generates text using xAI models like ",(0,r.jsx)(t.a,{href:"https://x.ai/grok",children:"Grok"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["It can output either a ",(0,r.jsx)(t.strong,{children:"Model Response"})," (",(0,r.jsx)(t.a,{href:"/data-types#message",children:(0,r.jsx)(t.code,{children:"Message"})}),") or a ",(0,r.jsx)(t.strong,{children:"Language Model"})," (",(0,r.jsx)(t.a,{href:"/data-types#languagemodel",children:(0,r.jsx)(t.code,{children:"LanguageModel"})}),")."]}),"\n",(0,r.jsxs)(t.p,{children:["Use the ",(0,r.jsx)(t.strong,{children:"Language Model"})," output when you want to use an xAI model as the LLM for another LLM-driven component, such as a ",(0,r.jsx)(t.strong,{children:"Language Model"})," or ",(0,r.jsx)(t.strong,{children:"Smart Function"})," component."]}),"\n",(0,r.jsxs)(t.p,{children:["For more information, see ",(0,r.jsxs)(t.a,{href:"/components-models",children:[(0,r.jsx)(t.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,r.jsx)(t.h3,{id:"xai-text-generation-parameters",children:"xAI text generation parameters"}),"\n",(0,r.jsxs)(t.p,{children:["Many ",(0,r.jsx)(t.strong,{children:"xAI"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,r.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Controls"})," in the ",(0,r.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\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:"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:"max_tokens"}),(0,r.jsx)(t.td,{children:"Integer"}),(0,r.jsxs)(t.td,{children:["Input parameter. Maximum number of tokens to generate. Set to ",(0,r.jsx)(t.code,{children:"0"})," for unlimited. Range: ",(0,r.jsx)(t.code,{children:"0-128000"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"model_kwargs"}),(0,r.jsx)(t.td,{children:"Dictionary"}),(0,r.jsx)(t.td,{children:"Input parameter. Additional keyword arguments for the model."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"json_mode"}),(0,r.jsx)(t.td,{children:"Boolean"}),(0,r.jsx)(t.td,{children:"Input parameter. If true, outputs JSON regardless of passing a schema."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"model_name"}),(0,r.jsx)(t.td,{children:"String"}),(0,r.jsxs)(t.td,{children:["Input parameter. The xAI model to use. Default: ",(0,r.jsx)(t.code,{children:"grok-2-latest"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"base_url"}),(0,r.jsx)(t.td,{children:"String"}),(0,r.jsxs)(t.td,{children:["Input parameter. Base URL for API requests. Default: ",(0,r.jsx)(t.code,{children:"https://api.x.ai/v1"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"api_key"}),(0,r.jsx)(t.td,{children:"SecretString"}),(0,r.jsx)(t.td,{children:"Input parameter. Your xAI API key for authentication."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"temperature"}),(0,r.jsx)(t.td,{children:"Float"}),(0,r.jsxs)(t.td,{children:["Input parameter. Controls randomness in the output. Range: ",(0,r.jsx)(t.code,{children:"[0.0, 2.0]"}),". Default: ",(0,r.jsx)(t.code,{children:"0.1"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"seed"}),(0,r.jsx)(t.td,{children:"Integer"}),(0,r.jsx)(t.td,{children:"Input parameter. Controls reproducibility of the job."})]})]})]})]})}function x(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}}}]); \ No newline at end of file diff --git a/assets/js/593d9d00.a94b7977.js b/assets/js/593d9d00.a94b7977.js deleted file mode 100644 index 8e222b0ea6..0000000000 --- a/assets/js/593d9d00.a94b7977.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[7859],{1175:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>i,contentTitle:()=>s,default:()=>d,frontMatter:()=>l,metadata:()=>t,toc:()=>u});const t=JSON.parse('{"id":"Deployment/deployment-overview","title":"Langflow deployment overview","description":"This section includes the different ways to bring your locally-built flows to the world.","source":"@site/docs/Deployment/deployment-overview.mdx","sourceDirName":"Deployment","slug":"/deployment-overview","permalink":"/deployment-overview","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Langflow deployment overview","slug":"/deployment-overview"},"sidebar":"docs","previous":{"title":"Use the Langflow CLI","permalink":"/configuration-cli"},"next":{"title":"Deploy a public Langflow server","permalink":"/deployment-public-server"}}');var o=r(74848),a=r(28453);r(11470),r(19365);const l={title:"Langflow deployment overview",slug:"/deployment-overview"},s=void 0,i={},u=[];function c(e){const n={a:"a",li:"li",p:"p",ul:"ul",...(0,a.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.p,{children:"This section includes the different ways to bring your locally-built flows to the world."}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["To self-host your local server through an Ngrok gateway, see ",(0,o.jsx)(n.a,{href:"/deployment-public-server",children:"Deploy a public Langflow server"}),".\nThis approach uses ",(0,o.jsx)(n.a,{href:"https://ngrok.com/docs/getting-started/",children:"ngrok"})," to forward traffic and share your local Langflow server over the internet, without deploying to a cloud provider or exposing your network directly."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["To build and deploy a Langflow container that includes your flow files, see ",(0,o.jsx)(n.a,{href:"develop-application",children:"Containerize a Langflow application"}),".\nThis approach bundles your flows and dependencies into a portable, reproducible Docker image for easy deployment across different environments."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["To deploy a Langflow server on a remote server with Docker and Caddy, see ",(0,o.jsx)(n.a,{href:"/deployment-caddyfile",children:"Deploy Langflow on a remote server"}),".\nThis approach is good for hosting your own Langflow instance on a remote server with secure web access, using Docker containers and Caddy as a reverse proxy for HTTPS support."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["To deploy Langflow on Kubernetes, see ",(0,o.jsx)(n.a,{href:"/deployment-prod-best-practices",children:"Langflow Kubernetes architecture and best practices"}),"\nThis approach creates production-grade deployments with high availability, scalability, and robust orchestration."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["For cloud provider-specific deployment guides, see your cloud provider's documentation.\nThe Langflow documentation provides a few examples, such as ",(0,o.jsx)(n.a,{href:"/deployment-gcp",children:"Google Cloud Platform"})," and ",(0,o.jsx)(n.a,{href:"/deployment-hugging-face-spaces",children:"Hugging Face Spaces"}),", to help you get started."]}),"\n"]}),"\n"]})]})}function d(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},11470:(e,n,r)=>{r.d(n,{A:()=>j});var t=r(96540),o=r(18215),a=r(23104),l=r(56347),s=r(205),i=r(57485),u=r(31682),c=r(70679);function d(e){return t.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,t.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 p(e){const{values:n,children:r}=e;return(0,t.useMemo)(()=>{const e=n??function(e){return d(e).map(({props:{value:e,label:n,attributes:r,default:t}})=>({value:e,label:n,attributes:r,default:t}))}(r);return function(e){const n=(0,u.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,r])}function f({value:e,tabValues:n}){return n.some(n=>n.value===e)}function h({queryString:e=!1,groupId:n}){const r=(0,l.W6)(),o=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,i.aZ)(o),(0,t.useCallback)(e=>{if(!o)return;const n=new URLSearchParams(r.location.search);n.set(o,e),r.replace({...r.location,search:n.toString()})},[o,r])]}function m(e){const{defaultValue:n,queryString:r=!1,groupId:o}=e,a=p(e),[l,i]=(0,t.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(!f({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 r=n.find(e=>e.default)??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:n,tabValues:a})),[u,d]=h({queryString:r,groupId:o}),[m,v]=function({groupId:e}){const n=function(e){return e?`docusaurus.tab.${e}`:null}(e),[r,o]=(0,c.Dv)(n);return[r,(0,t.useCallback)(e=>{n&&o.set(e)},[n,o])]}({groupId:o}),b=(()=>{const e=u??m;return f({value:e,tabValues:a})?e:null})();(0,s.A)(()=>{b&&i(b)},[b]);return{selectedValue:l,selectValue:(0,t.useCallback)(e=>{if(!f({value:e,tabValues:a}))throw new Error(`Can't select invalid tab value=${e}`);i(e),d(e),v(e)},[d,v,a]),tabValues:a}}var v=r(92303);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=r(74848);function y({className:e,block:n,selectedValue:r,selectValue:t,tabValues:l}){const s=[],{blockElementScrollPositionUntilNextRender:i}=(0,a.a_)(),u=e=>{const n=e.currentTarget,o=s.indexOf(n),a=l[o].value;a!==r&&(i(n),t(a))},c=e=>{let n=null;switch(e.key){case"Enter":u(e);break;case"ArrowRight":{const r=s.indexOf(e.currentTarget)+1;n=s[r]??s[0];break}case"ArrowLeft":{const r=s.indexOf(e.currentTarget)-1;n=s[r]??s[s.length-1];break}}n?.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.A)("tabs",{"tabs--block":n},e),children:l.map(({value:e,label:n,attributes:t})=>(0,g.jsx)("li",{role:"tab",tabIndex:r===e?0:-1,"aria-selected":r===e,ref:e=>{s.push(e)},onKeyDown:c,onClick:u,...t,className:(0,o.A)("tabs__item",b.tabItem,t?.className,{"tabs__item--active":r===e}),children:n??e},e))})}function w({lazy:e,children:n,selectedValue:r}){const a=(Array.isArray(n)?n:[n]).filter(Boolean);if(e){const e=a.find(e=>e.props.value===r);return e?(0,t.cloneElement)(e,{className:(0,o.A)("margin-top--md",e.props.className)}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:a.map((e,n)=>(0,t.cloneElement)(e,{key:n,hidden:e.props.value!==r}))})}function x(e){const n=m(e);return(0,g.jsxs)("div",{className:(0,o.A)("tabs-container",b.tabList),children:[(0,g.jsx)(y,{...n,...e}),(0,g.jsx)(w,{...n,...e})]})}function j(e){const n=(0,v.A)();return(0,g.jsx)(x,{...e,children:d(e.children)},String(n))}},19365:(e,n,r)=>{r.d(n,{A:()=>l});r(96540);var t=r(18215);const o={tabItem:"tabItem_Ymn6"};var a=r(74848);function l({children:e,hidden:n,className:r}){return(0,a.jsx)("div",{role:"tabpanel",className:(0,t.A)(o.tabItem,r),hidden:n,children:e})}},28453:(e,n,r)=>{r.d(n,{R:()=>l,x:()=>s});var t=r(96540);const o={},a=t.createContext(o);function l(e){const n=t.useContext(a);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function s(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:l(e.components),t.createElement(a.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/593d9d00.bfb7b6ef.js b/assets/js/593d9d00.bfb7b6ef.js new file mode 100644 index 0000000000..b3fd5c9441 --- /dev/null +++ b/assets/js/593d9d00.bfb7b6ef.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[7859],{1175:(e,o,n)=>{n.r(o),n.d(o,{assets:()=>a,contentTitle:()=>i,default:()=>p,frontMatter:()=>l,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"Deployment/deployment-overview","title":"Langflow deployment overview","description":"This section includes the different ways to bring your locally-built flows to the world.","source":"@site/docs/Deployment/deployment-overview.mdx","sourceDirName":"Deployment","slug":"/deployment-overview","permalink":"/deployment-overview","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Langflow deployment overview","slug":"/deployment-overview"},"sidebar":"docs","previous":{"title":"Use the Langflow CLI","permalink":"/configuration-cli"},"next":{"title":"Deploy a public Langflow server","permalink":"/deployment-public-server"}}');var t=n(74848),s=n(28453);const l={title:"Langflow deployment overview",slug:"/deployment-overview"},i=void 0,a={},c=[];function d(e){const o={a:"a",li:"li",p:"p",ul:"ul",...(0,s.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o.p,{children:"This section includes the different ways to bring your locally-built flows to the world."}),"\n",(0,t.jsxs)(o.ul,{children:["\n",(0,t.jsxs)(o.li,{children:["\n",(0,t.jsxs)(o.p,{children:["To self-host your local server through an ngrok gateway, see ",(0,t.jsx)(o.a,{href:"/deployment-public-server",children:"Deploy a public Langflow server"}),".\nThis approach uses ",(0,t.jsx)(o.a,{href:"https://ngrok.com/docs/getting-started/",children:"ngrok"})," to forward traffic and share your local Langflow server over the internet, without deploying to a cloud provider or exposing your network directly."]}),"\n"]}),"\n",(0,t.jsxs)(o.li,{children:["\n",(0,t.jsxs)(o.p,{children:["To build and deploy a Langflow container that includes your flow files, see ",(0,t.jsx)(o.a,{href:"develop-application",children:"Containerize a Langflow application"}),".\nThis approach bundles your flows and dependencies into a portable, reproducible Docker image for easy deployment across different environments."]}),"\n"]}),"\n",(0,t.jsxs)(o.li,{children:["\n",(0,t.jsxs)(o.p,{children:["To deploy a Langflow server on a remote server with Docker and Caddy, see ",(0,t.jsx)(o.a,{href:"/deployment-caddyfile",children:"Deploy Langflow on a remote server"}),".\nThis approach is good for hosting your own Langflow instance on a remote server with secure web access, using Docker containers and Caddy as a reverse proxy for HTTPS support."]}),"\n"]}),"\n",(0,t.jsxs)(o.li,{children:["\n",(0,t.jsxs)(o.p,{children:["To deploy Langflow on Kubernetes, see ",(0,t.jsx)(o.a,{href:"/deployment-prod-best-practices",children:"Langflow Kubernetes architecture and best practices"}),"\nThis approach creates production-grade deployments with high availability, scalability, and robust orchestration."]}),"\n"]}),"\n",(0,t.jsxs)(o.li,{children:["\n",(0,t.jsxs)(o.p,{children:["For cloud provider-specific deployment guides, see your cloud provider's documentation.\nThe Langflow documentation provides a few examples, such as ",(0,t.jsx)(o.a,{href:"/deployment-gcp",children:"Google Cloud Platform"})," and ",(0,t.jsx)(o.a,{href:"/deployment-hugging-face-spaces",children:"Hugging Face Spaces"}),", to help you get started."]}),"\n"]}),"\n"]})]})}function p(e={}){const{wrapper:o}={...(0,s.R)(),...e.components};return o?(0,t.jsx)(o,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},28453:(e,o,n)=>{n.d(o,{R:()=>l,x:()=>i});var r=n(96540);const t={},s=r.createContext(t);function l(e){const o=r.useContext(s);return r.useMemo(function(){return"function"==typeof e?e(o):{...o,...e}},[o,e])}function i(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:l(e.components),r.createElement(s.Provider,{value:o},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/5f1a63c6.0f204179.js b/assets/js/5f1a63c6.0f204179.js new file mode 100644 index 0000000000..382ae340a8 --- /dev/null +++ b/assets/js/5f1a63c6.0f204179.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[8990],{17886:(e,n,s)=>{s.d(n,{A:()=>a});s(96540);var r=s(64058),t=s(74848);function a({name:e,...n}){const s=r[e];return s?(0,t.jsx)(s,{...n}):null}},31929:(e,n,s)=>{s.d(n,{Ay:()=>l,RM:()=>i});var r=s(74848),t=s(28453),a=s(17886);const i=[];function c(e){const n={a:"a",p:"p",strong:"strong",...(0,t.R)(),...e.components};return(0,r.jsxs)(n.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,r.jsx)(a.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Controls"})," in the ",(0,r.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function l(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},76010:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>h,contentTitle:()=>l,default:()=>p,frontMatter:()=>c,metadata:()=>r,toc:()=>d});const r=JSON.parse('{"id":"Components/bundles-searchapi","title":"SearchApi","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-searchapi.mdx","sourceDirName":"Components","slug":"/bundles-searchapi","permalink":"/bundles-searchapi","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"SearchApi","slug":"/bundles-searchapi"},"sidebar":"docs","previous":{"title":"SambaNova","permalink":"/bundles-sambanova"},"next":{"title":"Vertex AI","permalink":"/bundles-vertexai"}}');var t=s(74848),a=s(28453),i=s(31929);const c={title:"SearchApi",slug:"/bundles-searchapi"},l=void 0,h={},d=[{value:"SearchApi web search",id:"searchapi-web-search",level:2},{value:"SearchApi web search parameters",id:"searchapi-web-search-parameters",level:3},...i.RM,{value:"See also",id:"see-also",level:2}];function o(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,t.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,t.jsx)(n.strong,{children:"SearchApi"})," bundle."]}),"\n",(0,t.jsxs)(n.p,{children:["For more information, see the ",(0,t.jsx)(n.a,{href:"https://www.searchapi.io/docs/google",children:"SearchApi documentation"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"searchapi-web-search",children:"SearchApi web search"}),"\n",(0,t.jsx)(n.p,{children:"This component calls the SearchApi API to run Google, Bing, and DuckDuckGo web searches."}),"\n",(0,t.jsxs)(n.p,{children:["It returns a list of search results as a ",(0,t.jsx)(n.a,{href:"/data-types#dataframe",children:(0,t.jsx)(n.code,{children:"DataFrame"})}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"searchapi-web-search-parameters",children:"SearchApi web search parameters"}),"\n",(0,t.jsx)(i.Ay,{}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Name"}),(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"engine"}),(0,t.jsx)(n.td,{children:"String"}),(0,t.jsxs)(n.td,{children:["Input parameter. The search engine to use. Default: ",(0,t.jsx)(n.code,{children:"google"}),"."]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"api_key"}),(0,t.jsx)(n.td,{children:"SecretString"}),(0,t.jsx)(n.td,{children:"Input parameter. The API key for authenticating with SearchApi."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"input_value"}),(0,t.jsx)(n.td,{children:"String"}),(0,t.jsx)(n.td,{children:"Input parameter. The search query or input for the API call."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"max_results"}),(0,t.jsx)(n.td,{children:"Integer"}),(0,t.jsxs)(n.td,{children:["Input parameter. The maximum number of search results to return. Default: ",(0,t.jsx)(n.code,{children:"5"}),"."]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"max_snippet_length"}),(0,t.jsx)(n.td,{children:"Integer"}),(0,t.jsxs)(n.td,{children:["Input parameter. The maximum length of the snippet to return. Default: ",(0,t.jsx)(n.code,{children:"100"}),"."]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"search_params"}),(0,t.jsx)(n.td,{children:"Dict"}),(0,t.jsx)(n.td,{children:"Input parameter. Additional key-value pairs to customize the request."})]})]})]}),"\n",(0,t.jsx)(n.h2,{id:"see-also",children:"See also"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsxs)(n.a,{href:"/components-data#web-search",children:[(0,t.jsx)(n.strong,{children:"Web Search"})," component"]})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsxs)(n.a,{href:"/bundles-google",children:[(0,t.jsx)(n.strong,{children:"Google"})," bundle"]})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsxs)(n.a,{href:"/bundles-bing",children:[(0,t.jsx)(n.strong,{children:"Bing"})," bundle"]})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsxs)(n.a,{href:"/bundles-duckduckgo",children:[(0,t.jsx)(n.strong,{children:"DuckDuckGo"})," bundle"]})}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(o,{...e})}):o(e)}}}]); \ No newline at end of file diff --git a/assets/js/5f1a63c6.55e64b78.js b/assets/js/5f1a63c6.55e64b78.js deleted file mode 100644 index 4b4ee4a9be..0000000000 --- a/assets/js/5f1a63c6.55e64b78.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[8990],{17886:(e,n,s)=>{s.d(n,{A:()=>a});s(96540);var r=s(64058),t=s(74848);function a({name:e,...n}){const s=r[e];return s?(0,t.jsx)(s,{...n}):null}},76010:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>l,contentTitle:()=>h,default:()=>p,frontMatter:()=>c,metadata:()=>r,toc:()=>d});const r=JSON.parse('{"id":"Components/bundles-searchapi","title":"SearchApi","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-searchapi.mdx","sourceDirName":"Components","slug":"/bundles-searchapi","permalink":"/bundles-searchapi","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"SearchApi","slug":"/bundles-searchapi"},"sidebar":"docs","previous":{"title":"SambaNova","permalink":"/bundles-sambanova"},"next":{"title":"Vertex AI","permalink":"/bundles-vertexai"}}');var t=s(74848),a=s(28453),i=s(17886);const c={title:"SearchApi",slug:"/bundles-searchapi"},h=void 0,l={},d=[{value:"SearchApi web search",id:"searchapi-web-search",level:2},{value:"SearchApi web search parameters",id:"searchapi-web-search-parameters",level:3},{value:"See also",id:"see-also",level:2}];function o(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,t.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,t.jsx)(n.strong,{children:"SearchApi"})," bundle."]}),"\n",(0,t.jsxs)(n.p,{children:["For more information, see the ",(0,t.jsx)(n.a,{href:"https://www.searchapi.io/docs/google",children:"SearchApi documentation"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"searchapi-web-search",children:"SearchApi web search"}),"\n",(0,t.jsx)(n.p,{children:"This component calls the SearchApi API to run Google, Bing, and DuckDuckGo web searches."}),"\n",(0,t.jsxs)(n.p,{children:["It returns a list of search results as a ",(0,t.jsx)(n.a,{href:"/data-types#dataframe",children:(0,t.jsx)(n.code,{children:"DataFrame"})}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"searchapi-web-search-parameters",children:"SearchApi web search parameters"}),"\n",(0,t.jsxs)(n.p,{children:["Some ",(0,t.jsx)(n.strong,{children:"SearchApi"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,t.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"Controls"})," in the ",(0,t.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Name"}),(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"engine"}),(0,t.jsx)(n.td,{children:"String"}),(0,t.jsxs)(n.td,{children:["Input parameter. The search engine to use. Default: ",(0,t.jsx)(n.code,{children:"google"}),"."]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"api_key"}),(0,t.jsx)(n.td,{children:"SecretString"}),(0,t.jsx)(n.td,{children:"Input parameter. The API key for authenticating with SearchApi."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"input_value"}),(0,t.jsx)(n.td,{children:"String"}),(0,t.jsx)(n.td,{children:"Input parameter. The search query or input for the API call."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"max_results"}),(0,t.jsx)(n.td,{children:"Integer"}),(0,t.jsxs)(n.td,{children:["Input parameter. The maximum number of search results to return. Default: ",(0,t.jsx)(n.code,{children:"5"}),"."]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"max_snippet_length"}),(0,t.jsx)(n.td,{children:"Integer"}),(0,t.jsxs)(n.td,{children:["Input parameter. The maximum length of the snippet to return. Default: ",(0,t.jsx)(n.code,{children:"100"}),"."]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"search_params"}),(0,t.jsx)(n.td,{children:"Dict"}),(0,t.jsx)(n.td,{children:"Input parameter. Additional key-value pairs to customize the request."})]})]})]}),"\n",(0,t.jsx)(n.h2,{id:"see-also",children:"See also"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsxs)(n.a,{href:"/components-data#web-search",children:[(0,t.jsx)(n.strong,{children:"Web Search"})," component"]})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsxs)(n.a,{href:"/bundles-google",children:[(0,t.jsx)(n.strong,{children:"Google"})," bundle"]})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsxs)(n.a,{href:"/bundles-bing",children:[(0,t.jsx)(n.strong,{children:"Bing"})," bundle"]})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsxs)(n.a,{href:"/bundles-duckduckgo",children:[(0,t.jsx)(n.strong,{children:"DuckDuckGo"})," bundle"]})}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(o,{...e})}):o(e)}}}]); \ No newline at end of file diff --git a/assets/js/619c7267.5b0ca992.js b/assets/js/619c7267.5b0ca992.js new file mode 100644 index 0000000000..502b596e8d --- /dev/null +++ b/assets/js/619c7267.5b0ca992.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[7902],{17886:(e,n,t)=>{t.d(n,{A:()=>o});t(96540);var r=t(64058),s=t(74848);function o({name:e,...n}){const t=r[e];return t?(0,s.jsx)(t,{...n}):null}},31929:(e,n,t)=>{t.d(n,{Ay:()=>c,RM:()=>d});var r=t(74848),s=t(28453),o=t(17886);const d=[];function i(e){const n={a:"a",p:"p",strong:"strong",...(0,s.R)(),...e.components};return(0,r.jsxs)(n.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,r.jsx)(o.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Controls"})," in the ",(0,r.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function c(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(i,{...e})}):i(e)}},98406:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>h,contentTitle:()=>c,default:()=>m,frontMatter:()=>i,metadata:()=>r,toc:()=>a});const r=JSON.parse('{"id":"Components/bundles-cohere","title":"Cohere","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-cohere.mdx","sourceDirName":"Components","slug":"/bundles-cohere","permalink":"/bundles-cohere","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Cohere","slug":"/bundles-cohere"},"sidebar":"docs","previous":{"title":"Cloudflare","permalink":"/bundles-cloudflare"},"next":{"title":"Composio","permalink":"/integrations-composio"}}');var s=t(74848),o=t(28453),d=(t(17886),t(31929));const i={title:"Cohere",slug:"/bundles-cohere"},c=void 0,h={},a=[{value:"Cohere text generation",id:"cohere-text-generation",level:2},{value:"Cohere text generation parameters",id:"cohere-text-generation-parameters",level:3},...d.RM,{value:"Cohere Embeddings",id:"cohere-embeddings",level:2},{value:"Cohere Embeddings parameters",id:"cohere-embeddings-parameters",level:3},...d.RM];function l(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,s.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,s.jsx)(n.strong,{children:"Cohere"})," bundle."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information about Cohere features and functionality used by Cohere components, see the ",(0,s.jsx)(n.a,{href:"https://cohere.ai/",children:"Cohere documentation"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"cohere-text-generation",children:"Cohere text generation"}),"\n",(0,s.jsx)(n.p,{children:"This component generates text using Cohere's language models."}),"\n",(0,s.jsxs)(n.p,{children:["It can output either a ",(0,s.jsx)(n.strong,{children:"Model Response"})," (",(0,s.jsx)(n.a,{href:"/data-types#message",children:(0,s.jsx)(n.code,{children:"Message"})}),") or a ",(0,s.jsx)(n.strong,{children:"Language Model"})," (",(0,s.jsx)(n.a,{href:"/data-types#languagemodel",children:(0,s.jsx)(n.code,{children:"LanguageModel"})}),")."]}),"\n",(0,s.jsxs)(n.p,{children:["Use the ",(0,s.jsx)(n.strong,{children:"Language Model"})," output when you want to use a Cohere model as the LLM for another LLM-driven component, such as an ",(0,s.jsx)(n.strong,{children:"Agent"})," or ",(0,s.jsx)(n.strong,{children:"Smart Function"})," component."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information, see ",(0,s.jsxs)(n.a,{href:"/components-models",children:[(0,s.jsx)(n.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"cohere-text-generation-parameters",children:"Cohere text generation parameters"}),"\n",(0,s.jsx)(d.Ay,{}),"\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:"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:"Input"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. Specifies the input text for text generation."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"System Message"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. A ",(0,s.jsx)(n.a,{href:"https://docs.cohere.com/docs/system-instructions",children:"system message"})," to pass to the model."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Stream"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"Input parameter. Whether to stream the response. Only works in chat. Default: false."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Cohere API Key"}),(0,s.jsx)(n.td,{children:"SecretString"}),(0,s.jsx)(n.td,{children:"Input parameter. Your Cohere API key."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Temperature"}),(0,s.jsx)(n.td,{children:"Float"}),(0,s.jsxs)(n.td,{children:["Input parameter. Specifies the randomness of sampling. Lower values (near 0) are more deterministic, and higher values (near 1) are more creative. Defaults to ",(0,s.jsx)(n.code,{children:"0.75"}),"."]})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"cohere-embeddings",children:"Cohere Embeddings"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Cohere Embeddings"})," component is used to load embedding models from Cohere."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information about using embedding model components in flows, see ",(0,s.jsxs)(n.a,{href:"/components-embedding-models",children:[(0,s.jsx)(n.strong,{children:"Embedding Model"})," components"]}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"cohere-embeddings-parameters",children:"Cohere Embeddings parameters"}),"\n",(0,s.jsx)(d.Ay,{}),"\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:"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:"cohere_api_key"}),(0,s.jsx)(n.td,{children:"SecretString"}),(0,s.jsx)(n.td,{children:"Input parameter. The API key required to authenticate with the Cohere service."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"model"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. The language model used for embedding text documents and performing queries. Default: ",(0,s.jsx)(n.code,{children:"embed-english-v2.0"})]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"truncate"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsxs)(n.td,{children:["Input parameter. How to handle input that exceeds the model's token limit. One of ",(0,s.jsx)(n.code,{children:"NONE"}),", ",(0,s.jsx)(n.code,{children:"START"}),", or ",(0,s.jsx)(n.code,{children:"END"})," (default). For more information, see the ",(0,s.jsxs)(n.a,{href:"https://docs.cohere.com/reference/embed#request.body.truncate",children:["Cohere ",(0,s.jsx)(n.code,{children:"truncate"})," API reference"]}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"max_retries"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsxs)(n.td,{children:["Input parameter. The maximum number of retry attempts for failed requests. Default: ",(0,s.jsx)(n.code,{children:"3"})]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"user_agent"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. A user agent string to include in requests. Default: ",(0,s.jsx)(n.code,{children:"langchain"})]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"request_timeout"}),(0,s.jsx)(n.td,{children:"Float"}),(0,s.jsxs)(n.td,{children:["Input parameter. The timeout duration for requests in milliseconds. Default: ",(0,s.jsx)(n.code,{children:"10000"})]})]})]})]})]})}function m(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}}}]); \ No newline at end of file diff --git a/assets/js/619c7267.e75cc5aa.js b/assets/js/619c7267.e75cc5aa.js deleted file mode 100644 index 3dfde5e7e9..0000000000 --- a/assets/js/619c7267.e75cc5aa.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[7902],{17886:(e,n,t)=>{t.d(n,{A:()=>o});t(96540);var r=t(64058),s=t(74848);function o({name:e,...n}){const t=r[e];return t?(0,s.jsx)(t,{...n}):null}},98406:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>h,default:()=>p,frontMatter:()=>i,metadata:()=>r,toc:()=>l});const r=JSON.parse('{"id":"Components/bundles-cohere","title":"Cohere","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-cohere.mdx","sourceDirName":"Components","slug":"/bundles-cohere","permalink":"/bundles-cohere","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Cohere","slug":"/bundles-cohere"},"sidebar":"docs","previous":{"title":"Cloudflare","permalink":"/bundles-cloudflare"},"next":{"title":"Composio","permalink":"/integrations-composio"}}');var s=t(74848),o=t(28453),d=t(17886);const i={title:"Cohere",slug:"/bundles-cohere"},h=void 0,a={},l=[{value:"Cohere text generation",id:"cohere-text-generation",level:3},{value:"Cohere text generation parameters",id:"cohere-text-generation-parameters",level:3},{value:"Cohere Embeddings",id:"cohere-embeddings",level:3},{value:"Cohere Embeddings parameters",id:"cohere-embeddings-parameters",level:3}];function c(e){const n={a:"a",code:"code",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,s.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,s.jsx)(n.strong,{children:"Cohere"})," bundle."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information about Cohere features and functionality used by Cohere components, see the ",(0,s.jsx)(n.a,{href:"https://cohere.ai/",children:"Cohere documentation"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"cohere-text-generation",children:"Cohere text generation"}),"\n",(0,s.jsx)(n.p,{children:"This component generates text using Cohere's language models."}),"\n",(0,s.jsxs)(n.p,{children:["It can output either a ",(0,s.jsx)(n.strong,{children:"Model Response"})," (",(0,s.jsx)(n.a,{href:"/data-types#message",children:(0,s.jsx)(n.code,{children:"Message"})}),") or a ",(0,s.jsx)(n.strong,{children:"Language Model"})," (",(0,s.jsx)(n.a,{href:"/data-types#languagemodel",children:(0,s.jsx)(n.code,{children:"LanguageModel"})}),")."]}),"\n",(0,s.jsxs)(n.p,{children:["Use the ",(0,s.jsx)(n.strong,{children:"Language Model"})," output when you want to use a Cohere model as the LLM for another LLM-driven component, such as a ",(0,s.jsx)(n.strong,{children:"Language Model"})," or ",(0,s.jsx)(n.strong,{children:"Smart Function"})," component."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information, see ",(0,s.jsxs)(n.a,{href:"/components-models",children:[(0,s.jsx)(n.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"cohere-text-generation-parameters",children:"Cohere text generation parameters"}),"\n",(0,s.jsxs)(n.p,{children:["Many ",(0,s.jsx)(n.strong,{children:"Cohere"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,s.jsx)(d.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Controls"})," in the ",(0,s.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\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:"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:"Cohere API Key"}),(0,s.jsx)(n.td,{children:"SecretString"}),(0,s.jsx)(n.td,{children:"Input parameter. Your Cohere API key."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Max Tokens"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsxs)(n.td,{children:["Input parameter. Specifies the maximum number of tokens to generate. Defaults to ",(0,s.jsx)(n.code,{children:"256"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Temperature"}),(0,s.jsx)(n.td,{children:"Float"}),(0,s.jsxs)(n.td,{children:["Input parameter. Specifies the sampling temperature. Defaults to ",(0,s.jsx)(n.code,{children:"0.75"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Input Value"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. Specifies the input text for text generation."})]})]})]}),"\n",(0,s.jsx)(n.h3,{id:"cohere-embeddings",children:"Cohere Embeddings"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Cohere Embeddings"})," component is used to load embedding models from Cohere."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information about using embedding model components in flows, see ",(0,s.jsxs)(n.a,{href:"/components-embedding-models",children:[(0,s.jsx)(n.strong,{children:"Embedding Model"})," components"]}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"cohere-embeddings-parameters",children:"Cohere Embeddings parameters"}),"\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:"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:"cohere_api_key"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The API key required to authenticate with the Cohere service."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"model"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. The language model used for embedding text documents and performing queries. Default: ",(0,s.jsx)(n.code,{children:"embed-english-v2.0"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"truncate"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"Input parameter. Whether to truncate the input text to fit within the model's constraints. Default: false."})]})]})]})]})}function p(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}}}]); \ No newline at end of file diff --git a/assets/js/622bdc6f.2afcdb64.js b/assets/js/622bdc6f.2afcdb64.js new file mode 100644 index 0000000000..1da2f4dafb --- /dev/null +++ b/assets/js/622bdc6f.2afcdb64.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[4384],{17886:(e,n,t)=>{t.d(n,{A:()=>r});t(96540);var i=t(64058),s=t(74848);function r({name:e,...n}){const t=i[e];return t?(0,s.jsx)(t,{...n}):null}},35775:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>o,contentTitle:()=>a,default:()=>h,frontMatter:()=>d,metadata:()=>i,toc:()=>c});const i=JSON.parse('{"id":"Components/bundles-nvidia","title":"NVIDIA components","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-nvidia.mdx","sourceDirName":"Components","slug":"/bundles-nvidia","permalink":"/bundles-nvidia","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"NVIDIA components","slug":"/bundles-nvidia"},"sidebar":"docs","previous":{"title":"Novita","permalink":"/bundles-novita"},"next":{"title":"NVIDIA Ingest","permalink":"/integrations-nvidia-ingest"}}');var s=t(74848),r=t(28453);t(17886);const d={title:"NVIDIA components",slug:"/bundles-nvidia"},a=void 0,o={},c=[{value:"NVIDIA",id:"nvidia",level:2},{value:"NVIDIA parameters",id:"nvidia-parameters",level:3},{value:"NVIDIA Embeddings",id:"nvidia-embeddings",level:2},{value:"NVIDIA Embeddings parameters",id:"nvidia-embeddings-parameters",level:3},{value:"NVIDIA Rerank",id:"nvidia-rerank",level:2},{value:"NVIDIA Retriever Extraction",id:"nvidia-retriever-extraction",level:2},{value:"NVIDIA System-Assist",id:"nvidia-system-assist",level:2}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,s.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,s.jsx)(n.strong,{children:"NVIDIA"})," bundle."]}),"\n",(0,s.jsx)(n.h2,{id:"nvidia",children:"NVIDIA"}),"\n",(0,s.jsxs)(n.p,{children:["This component generates text using NVIDIA LLMs.\nFor more information about NVIDIA LLMs, see the ",(0,s.jsx)(n.a,{href:"https://developer.nvidia.com/generative-ai",children:"NVIDIA AI documentation"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["For an example of this component in a flow, see ",(0,s.jsx)(n.a,{href:"/integrations-nvidia-ingest-wsl2",children:"Integrate NVIDIA NIMs with Langflow"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"nvidia-parameters",children:"NVIDIA parameters"}),"\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:"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:"max_tokens"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsxs)(n.td,{children:["Input parameter. The maximum number of tokens to generate. Set to ",(0,s.jsx)(n.code,{children:"0"})," for unlimited tokens (advanced)."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"model_name"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. The name of the NVIDIA model to use. Default: ",(0,s.jsx)(n.code,{children:"mistralai/mixtral-8x7b-instruct-v0.1"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"base_url"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. The base URL of the NVIDIA API. Default: ",(0,s.jsx)(n.code,{children:"https://integrate.api.nvidia.com/v1"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"nvidia_api_key"}),(0,s.jsx)(n.td,{children:"SecretString"}),(0,s.jsx)(n.td,{children:"Input parameter. The NVIDIA API Key for authentication."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"temperature"}),(0,s.jsx)(n.td,{children:"Float"}),(0,s.jsxs)(n.td,{children:["Input parameter. Controls randomness in the output. Default: ",(0,s.jsx)(n.code,{children:"0.1"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"seed"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsxs)(n.td,{children:["Input parameter. The seed controls the reproducibility of the job (advanced). Default: ",(0,s.jsx)(n.code,{children:"1"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"model"}),(0,s.jsx)(n.td,{children:"LanguageModel"}),(0,s.jsx)(n.td,{children:"Output parameter. An instance of ChatNVIDIA configured with the specified parameters."})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"nvidia-embeddings",children:"NVIDIA Embeddings"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"NVIDIA Embeddings"})," component generates embeddings using ",(0,s.jsx)(n.a,{href:"https://docs.nvidia.com",children:"NVIDIA models"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information about using embedding model components in flows, see ",(0,s.jsxs)(n.a,{href:"/components-embedding-models",children:[(0,s.jsx)(n.strong,{children:"Embedding Model"})," components"]}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"nvidia-embeddings-parameters",children:"NVIDIA Embeddings parameters"}),"\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:"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:"model"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. The NVIDIA model to use for embeddings, such as ",(0,s.jsx)(n.code,{children:"nvidia/nv-embed-v1"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"base_url"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. The base URL for the NVIDIA API. Default: ",(0,s.jsx)(n.code,{children:"https://integrate.api.nvidia.com/v1"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"nvidia_api_key"}),(0,s.jsx)(n.td,{children:"SecretString"}),(0,s.jsx)(n.td,{children:"Input parameter. The API key for authenticating with NVIDIA's service."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"temperature"}),(0,s.jsx)(n.td,{children:"Float"}),(0,s.jsxs)(n.td,{children:["Input parameter. The model temperature for embedding generation. Default: ",(0,s.jsx)(n.code,{children:"0.1"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"embeddings"}),(0,s.jsx)(n.td,{children:"Embeddings"}),(0,s.jsxs)(n.td,{children:["Output parameter. An ",(0,s.jsx)(n.code,{children:"NVIDIAEmbeddings"})," instance for generating embeddings."]})]})]})]}),"\n",(0,s.jsx)(n.admonition,{title:"Tokenization considerations",type:"tip",children:(0,s.jsxs)(n.p,{children:["Be aware of your embedding model's chunk size limit.\nTokenization errors can occur if your text chunks are too large.\nFor more information, see ",(0,s.jsx)(n.a,{href:"/components-processing#chunk-size",children:"Tokenization errors due to chunk size"}),"."]})}),"\n",(0,s.jsx)(n.h2,{id:"nvidia-rerank",children:"NVIDIA Rerank"}),"\n",(0,s.jsx)(n.p,{children:"This component finds and reranks documents using the NVIDIA API."}),"\n",(0,s.jsx)(n.h2,{id:"nvidia-retriever-extraction",children:"NVIDIA Retriever Extraction"}),"\n",(0,s.jsxs)(n.p,{children:["This component uses the NVIDIA ",(0,s.jsx)(n.code,{children:"nv-ingest"})," microservice for data ingestion, processing, and extraction of text files.\nFor more information, see ",(0,s.jsx)(n.a,{href:"/integrations-nvidia-ingest",children:"Integrate NVIDIA Retriever Extraction with Langflow"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"nvidia-system-assist",children:"NVIDIA System-Assist"}),"\n",(0,s.jsxs)(n.p,{children:["This component requires a specific system environment.\nFor information about this component, see ",(0,s.jsx)(n.a,{href:"/integrations-nvidia-g-assist",children:"Integrate NVIDIA G-Assist with Langflow"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}}}]); \ No newline at end of file diff --git a/assets/js/622bdc6f.e786f853.js b/assets/js/622bdc6f.e786f853.js deleted file mode 100644 index d0451cf428..0000000000 --- a/assets/js/622bdc6f.e786f853.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[4384],{17886:(e,n,i)=>{i.d(n,{A:()=>r});i(96540);var t=i(64058),s=i(74848);function r({name:e,...n}){const i=t[e];return i?(0,s.jsx)(i,{...n}):null}},35775:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>o,contentTitle:()=>a,default:()=>h,frontMatter:()=>d,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"Components/bundles-nvidia","title":"NVIDIA components","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-nvidia.mdx","sourceDirName":"Components","slug":"/bundles-nvidia","permalink":"/bundles-nvidia","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"NVIDIA components","slug":"/bundles-nvidia"},"sidebar":"docs","previous":{"title":"Novita","permalink":"/bundles-novita"},"next":{"title":"NVIDIA Ingest","permalink":"/integrations-nvidia-ingest"}}');var s=i(74848),r=i(28453);i(17886);const d={title:"NVIDIA components",slug:"/bundles-nvidia"},a=void 0,o={},c=[{value:"NVIDIA",id:"nvidia",level:2},{value:"NVIDIA parameters",id:"nvidia-parameters",level:3},{value:"NVIDIA Embeddings",id:"nvidia-embeddings",level:2},{value:"NVIDIA Embeddings parameters",id:"nvidia-embeddings-parameters",level:3},{value:"NVIDIA Rerank",id:"nvidia-rerank",level:2},{value:"NVIDIA Retriever Extraction",id:"nvidia-retriever-extraction",level:2},{value:"NVIDIA G-Assist",id:"nvidia-g-assist",level:2}];function l(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,s.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,s.jsx)(n.strong,{children:"NVIDIA"})," bundle."]}),"\n",(0,s.jsx)(n.h2,{id:"nvidia",children:"NVIDIA"}),"\n",(0,s.jsxs)(n.p,{children:["This component generates text using NVIDIA LLMs.\nFor more information about NVIDIA LLMs, see the ",(0,s.jsx)(n.a,{href:"https://developer.nvidia.com/generative-ai",children:"NVIDIA AI documentation"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["For an example of this component in a flow, see ",(0,s.jsx)(n.a,{href:"/integrations-nvidia-ingest-wsl2",children:"Integrate NVIDIA NIMs with Langflow"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"nvidia-parameters",children:"NVIDIA parameters"}),"\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:"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:"max_tokens"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsxs)(n.td,{children:["Input parameter. The maximum number of tokens to generate. Set to ",(0,s.jsx)(n.code,{children:"0"})," for unlimited tokens (advanced)."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"model_name"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. The name of the NVIDIA model to use. Default: ",(0,s.jsx)(n.code,{children:"mistralai/mixtral-8x7b-instruct-v0.1"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"base_url"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. The base URL of the NVIDIA API. Default: ",(0,s.jsx)(n.code,{children:"https://integrate.api.nvidia.com/v1"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"nvidia_api_key"}),(0,s.jsx)(n.td,{children:"SecretString"}),(0,s.jsx)(n.td,{children:"Input parameter. The NVIDIA API Key for authentication."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"temperature"}),(0,s.jsx)(n.td,{children:"Float"}),(0,s.jsxs)(n.td,{children:["Input parameter. Controls randomness in the output. Default: ",(0,s.jsx)(n.code,{children:"0.1"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"seed"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsxs)(n.td,{children:["Input parameter. The seed controls the reproducibility of the job (advanced). Default: ",(0,s.jsx)(n.code,{children:"1"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"model"}),(0,s.jsx)(n.td,{children:"LanguageModel"}),(0,s.jsx)(n.td,{children:"Output parameter. An instance of ChatNVIDIA configured with the specified parameters."})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"nvidia-embeddings",children:"NVIDIA Embeddings"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"NVIDIA Embeddings"})," component generates embeddings using ",(0,s.jsx)(n.a,{href:"https://docs.nvidia.com",children:"NVIDIA models"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information about using embedding model components in flows, see ",(0,s.jsxs)(n.a,{href:"/components-embedding-models",children:[(0,s.jsx)(n.strong,{children:"Embedding Model"})," components"]}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"nvidia-embeddings-parameters",children:"NVIDIA Embeddings parameters"}),"\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:"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:"model"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. The NVIDIA model to use for embeddings, such as ",(0,s.jsx)(n.code,{children:"nvidia/nv-embed-v1"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"base_url"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. The base URL for the NVIDIA API. Default: ",(0,s.jsx)(n.code,{children:"https://integrate.api.nvidia.com/v1"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"nvidia_api_key"}),(0,s.jsx)(n.td,{children:"SecretString"}),(0,s.jsx)(n.td,{children:"Input parameter. The API key for authenticating with NVIDIA's service."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"temperature"}),(0,s.jsx)(n.td,{children:"Float"}),(0,s.jsxs)(n.td,{children:["Input parameter. The model temperature for embedding generation. Default: ",(0,s.jsx)(n.code,{children:"0.1"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"embeddings"}),(0,s.jsx)(n.td,{children:"Embeddings"}),(0,s.jsxs)(n.td,{children:["Output parameter. An ",(0,s.jsx)(n.code,{children:"NVIDIAEmbeddings"})," instance for generating embeddings."]})]})]})]}),"\n",(0,s.jsx)(n.admonition,{title:"Tokenization considerations",type:"tip",children:(0,s.jsxs)(n.p,{children:["Be aware of your embedding model's chunk size limit.\nTokenization errors can occur if your text chunks are too large.\nFor more information, see ",(0,s.jsx)(n.a,{href:"/components-processing#chunk-size",children:"Tokenization errors due to chunk size"}),"."]})}),"\n",(0,s.jsx)(n.h2,{id:"nvidia-rerank",children:"NVIDIA Rerank"}),"\n",(0,s.jsx)(n.p,{children:"This component finds and reranks documents using the NVIDIA API."}),"\n",(0,s.jsx)(n.h2,{id:"nvidia-retriever-extraction",children:"NVIDIA Retriever Extraction"}),"\n",(0,s.jsxs)(n.p,{children:["This component uses the NVIDIA ",(0,s.jsx)(n.code,{children:"nv-ingest"})," microservice for data ingestion, processing, and extraction of text files.\nFor more information, see ",(0,s.jsx)(n.a,{href:"/integrations-nvidia-ingest",children:"Integrate NVIDIA Retriever Extraction with Langflow"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"nvidia-g-assist",children:"NVIDIA G-Assist"}),"\n",(0,s.jsxs)(n.p,{children:["This component requires a specific system environment.\nFor information about this component, see ",(0,s.jsx)(n.a,{href:"/integrations-nvidia-g-assist",children:"Integrate NVIDIA G-Assist with Langflow"}),"."]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}}}]); \ No newline at end of file diff --git a/assets/js/622fd833.1361199d.js b/assets/js/622fd833.1361199d.js new file mode 100644 index 0000000000..0520664213 --- /dev/null +++ b/assets/js/622fd833.1361199d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[2565],{17886:(n,e,o)=>{o.d(e,{A:()=>r});o(96540);var t=o(64058),s=o(74848);function r({name:n,...e}){const o=t[n];return o?(0,s.jsx)(o,{...e}):null}},31929:(n,e,o)=>{o.d(e,{Ay:()=>a,RM:()=>c});var t=o(74848),s=o(28453),r=o(17886);const c=[];function i(n){const e={a:"a",p:"p",strong:"strong",...(0,s.R)(),...n.components};return(0,t.jsxs)(e.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,t.jsx)(r.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,t.jsx)(e.strong,{children:"Controls"})," in the ",(0,t.jsx)(e.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function a(n={}){const{wrapper:e}={...(0,s.R)(),...n.components};return e?(0,t.jsx)(e,{...n,children:(0,t.jsx)(i,{...n})}):i(n)}},55246:(n,e,o)=>{o.r(e),o.d(e,{assets:()=>d,contentTitle:()=>l,default:()=>u,frontMatter:()=>a,metadata:()=>t,toc:()=>p});const t=JSON.parse('{"id":"Components/components-bundles","title":"About bundles","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/components-bundles.mdx","sourceDirName":"Components","slug":"/components-bundle-components","permalink":"/components-bundle-components","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"About bundles","slug":"/components-bundle-components"},"sidebar":"docs","previous":{"title":"Memories","permalink":"/components-memories"},"next":{"title":"AI/ML API","permalink":"/bundles-aiml"}}');var s=o(74848),r=o(28453),c=o(17886),i=o(31929);const a={title:"About bundles",slug:"/components-bundle-components"},l=void 0,d={},p=[{value:"Bundle maintenance and documentation",id:"bundle-maintenance-and-documentation",level:2},{value:"Component parameters",id:"component-parameters",level:2},...i.RM,{value:"Core components and bundles",id:"core-components-and-bundles",level:2},{value:"Legacy components",id:"legacy-components",level:2},{value:"See also",id:"see-also",level:2}];function m(n){const e={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...n.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e.p,{children:"Bundles contain custom components that support specific third-party integrations with Langflow.\nYou add them to your flows and configure them in the same way as Langflow's core components."}),"\n",(0,s.jsx)(e.h2,{id:"bundle-maintenance-and-documentation",children:"Bundle maintenance and documentation"}),"\n",(0,s.jsx)(e.p,{children:"Many bundled components are developed by third-party contributors to the Langflow codebase."}),"\n",(0,s.jsx)(e.p,{children:"Some providers contribute documentation with their bundles, whereas others document their bundles in their own documentation.\nSome bundles have no documentation."}),"\n",(0,s.jsx)(e.p,{children:"To find documentation for a specific bundled component, browse the Langflow docs and your provider's documentation.\nIf available, you can also find links to relevant documentation, such as API endpoints, through the component itself:"}),"\n",(0,s.jsxs)(e.ol,{children:["\n",(0,s.jsxs)(e.li,{children:["Click the component to expose the ",(0,s.jsx)(e.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(0,s.jsxs)(e.li,{children:["Click ",(0,s.jsx)(c.A,{name:"Ellipsis","aria-hidden":"true"})," ",(0,s.jsx)(e.strong,{children:"More"}),"."]}),"\n",(0,s.jsxs)(e.li,{children:["Select ",(0,s.jsx)(e.strong,{children:"Docs"}),"."]}),"\n"]}),"\n",(0,s.jsx)(e.p,{children:"The Langflow documentation focuses on using bundles within flows.\nFor that reason, it focuses on the Langflow-specific configuration steps for bundled components.\nFor information about provider-specific features or APIs, see the provider's documentation."}),"\n",(0,s.jsx)(e.h2,{id:"component-parameters",children:"Component parameters"}),"\n","\n",(0,s.jsx)(i.Ay,{}),"\n",(0,s.jsx)(e.h2,{id:"core-components-and-bundles",children:"Core components and bundles"}),"\n",(0,s.jsxs)(e.admonition,{type:"tip",children:[(0,s.jsxs)(e.p,{children:["The Langflow documentation doesn't list all bundles or components in bundles.\nFor the most accurate and up-to-date list of bundles and components for your version of Langflow, check the ",(0,s.jsx)(e.strong,{children:"Components"})," menu in Langflow."]}),(0,s.jsxs)(e.p,{children:["If you can't find a component that you used in an earlier version of Langflow, it may have been removed or marked as a ",(0,s.jsx)(e.a,{href:"#legacy-components",children:"legacy component"}),"."]})]}),"\n",(0,s.jsx)(e.p,{children:"Langflow offers core components in addition to third-party, provider-specific bundles."}),"\n",(0,s.jsxs)(e.p,{children:["Core components are meant to support a wide range of use cases and typically aren't tied to a specific provider.\nExceptions include the ",(0,s.jsxs)(e.a,{href:"/components-embedding-models",children:[(0,s.jsx)(e.strong,{children:"Embedding Model"})," core component"]}),", ",(0,s.jsxs)(e.a,{href:"/components-models",children:[(0,s.jsx)(e.strong,{children:"Language Model"})," core component"]}),", and ",(0,s.jsxs)(e.a,{href:"/components-vector-stores",children:[(0,s.jsx)(e.strong,{children:"Vector Store"})," components"]}),", which are integrated with one or more specific providers."]}),"\n",(0,s.jsxs)(e.p,{children:["If you are looking for a specific service or integration, try searching the ",(0,s.jsx)(e.strong,{children:"Components"})," menu or browsing both the core components and bundles."]}),"\n",(0,s.jsxs)(e.p,{children:["If all else fails, you can always create your own ",(0,s.jsx)(e.a,{href:"/components-custom-components",children:"custom components"}),"."]}),"\n",(0,s.jsx)(e.h2,{id:"legacy-components",children:"Legacy components"}),"\n",(0,s.jsx)(e.p,{children:"Legacy components are no longer maintained and can be removed in a future release."}),"\n",(0,s.jsxs)(e.p,{children:["You can still use them in your flows, but you should replace them with non-legacy components as soon as possible.\nComponents marked ",(0,s.jsx)(e.code,{children:"[DEPRECATED]"})," should be replaced immediately."]}),"\n",(0,s.jsxs)(e.p,{children:["In the ",(0,s.jsx)(e.strong,{children:"Components"})," menu, you must enable the ",(0,s.jsx)(e.strong,{children:"Legacy components"})," toggle to view legacy components."]}),"\n",(0,s.jsx)(e.h2,{id:"see-also",children:"See also"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.a,{href:"/integrations-langwatch",children:"LangWatch observability and evaluation"})}),"\n"]})]})}function u(n={}){const{wrapper:e}={...(0,r.R)(),...n.components};return e?(0,s.jsx)(e,{...n,children:(0,s.jsx)(m,{...n})}):m(n)}}}]); \ No newline at end of file diff --git a/assets/js/622fd833.9772c05d.js b/assets/js/622fd833.9772c05d.js deleted file mode 100644 index 508518020f..0000000000 --- a/assets/js/622fd833.9772c05d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[2565],{17886:(n,e,o)=>{o.d(e,{A:()=>i});o(96540);var t=o(64058),s=o(74848);function i({name:n,...e}){const o=t[n];return o?(0,s.jsx)(o,{...e}):null}},55246:(n,e,o)=>{o.r(e),o.d(e,{assets:()=>l,contentTitle:()=>a,default:()=>p,frontMatter:()=>c,metadata:()=>t,toc:()=>d});const t=JSON.parse('{"id":"Components/components-bundles","title":"About bundles","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/components-bundles.mdx","sourceDirName":"Components","slug":"/components-bundle-components","permalink":"/components-bundle-components","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"About bundles","slug":"/components-bundle-components"},"sidebar":"docs","previous":{"title":"Memories","permalink":"/components-memories"},"next":{"title":"AI/ML API","permalink":"/bundles-aiml"}}');var s=o(74848),i=o(28453),r=o(17886);const c={title:"About bundles",slug:"/components-bundle-components"},a=void 0,l={},d=[{value:"Bundle maintenance and documentation",id:"bundle-maintenance-and-documentation",level:2},{value:"Component parameters",id:"component-parameters",level:2},{value:"Core components and bundles",id:"core-components-and-bundles",level:2},{value:"Legacy components",id:"legacy-components",level:2},{value:"See also",id:"see-also",level:2}];function m(n){const e={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...n.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(e.p,{children:"Bundles contain custom components that support specific third-party integrations with Langflow.\nYou add them to your flows and configure them in the same way as Langflow's core components."}),"\n",(0,s.jsx)(e.h2,{id:"bundle-maintenance-and-documentation",children:"Bundle maintenance and documentation"}),"\n",(0,s.jsx)(e.p,{children:"Many bundled components are developed by third-party contributors to the Langflow codebase."}),"\n",(0,s.jsx)(e.p,{children:"Some providers contribute documentation with their bundles, whereas others document their bundles in their own documentation.\nSome bundles have no documentation."}),"\n",(0,s.jsx)(e.p,{children:"To find documentation for a specific bundled component, browse the Langflow docs and your provider's documentation.\nIf available, you can also find links to relevant documentation, such as API endpoints, through the component itself:"}),"\n",(0,s.jsxs)(e.ol,{children:["\n",(0,s.jsxs)(e.li,{children:["Click the component to expose the ",(0,s.jsx)(e.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(0,s.jsxs)(e.li,{children:["Click ",(0,s.jsx)(r.A,{name:"Ellipsis","aria-hidden":"true"})," ",(0,s.jsx)(e.strong,{children:"More"}),"."]}),"\n",(0,s.jsxs)(e.li,{children:["Select ",(0,s.jsx)(e.strong,{children:"Docs"}),"."]}),"\n"]}),"\n",(0,s.jsx)(e.p,{children:"The Langflow documentation focuses on using bundles within flows.\nFor that reason, it focuses on the Langflow-specific configuration steps for bundled components.\nFor information about provider-specific features or APIs, see the provider's documentation."}),"\n",(0,s.jsx)(e.h2,{id:"component-parameters",children:"Component parameters"}),"\n",(0,s.jsxs)(e.p,{children:["Some component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,s.jsx)(r.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(e.strong,{children:"Controls"})," in each ",(0,s.jsx)(e.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(0,s.jsx)(e.h2,{id:"core-components-and-bundles",children:"Core components and bundles"}),"\n",(0,s.jsxs)(e.admonition,{type:"tip",children:[(0,s.jsxs)(e.p,{children:["The Langflow documentation doesn't list all bundles or components in bundles.\nFor the most accurate and up-to-date list of bundles and components for your version of Langflow, check the ",(0,s.jsx)(e.strong,{children:"Components"})," menu in Langflow."]}),(0,s.jsxs)(e.p,{children:["If you can't find a component that you used in an earlier version of Langflow, it may have been removed or marked as a ",(0,s.jsx)(e.a,{href:"#legacy-components",children:"legacy component"}),"."]})]}),"\n",(0,s.jsx)(e.p,{children:"Langflow offers core components in addition to third-party, provider-specific bundles."}),"\n",(0,s.jsxs)(e.p,{children:["Core components are meant to support a wide range of use cases and typically aren't tied to a specific provider.\nExceptions include the ",(0,s.jsxs)(e.a,{href:"/components-embedding-models",children:[(0,s.jsx)(e.strong,{children:"Embedding Model"})," core component"]}),", ",(0,s.jsxs)(e.a,{href:"/components-models",children:[(0,s.jsx)(e.strong,{children:"Language Model"})," core component"]}),", and ",(0,s.jsxs)(e.a,{href:"/components-vector-stores",children:[(0,s.jsx)(e.strong,{children:"Vector Store"})," components"]}),", which are integrated with one or more specific providers."]}),"\n",(0,s.jsxs)(e.p,{children:["If you are looking for a specific service or integration, try searching the ",(0,s.jsx)(e.strong,{children:"Components"})," menu or browsing both the core components and bundles."]}),"\n",(0,s.jsxs)(e.p,{children:["If all else fails, you can always create your own ",(0,s.jsx)(e.a,{href:"/components-custom-components",children:"custom components"}),"."]}),"\n",(0,s.jsx)(e.h2,{id:"legacy-components",children:"Legacy components"}),"\n",(0,s.jsx)(e.p,{children:"Legacy components are no longer maintained and can be removed in a future release."}),"\n",(0,s.jsxs)(e.p,{children:["You can still use them in your flows, but you should replace them with non-legacy components as soon as possible.\nComponents marked ",(0,s.jsx)(e.code,{children:"[DEPRECATED]"})," should be replaced immediately."]}),"\n",(0,s.jsxs)(e.p,{children:["In the ",(0,s.jsx)(e.strong,{children:"Components"})," menu, you must enable the ",(0,s.jsx)(e.strong,{children:"Legacy components"})," toggle to view legacy components."]}),"\n",(0,s.jsx)(e.h2,{id:"see-also",children:"See also"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.a,{href:"/integrations-langwatch",children:"LangWatch observability and evaluation"})}),"\n"]})]})}function p(n={}){const{wrapper:e}={...(0,i.R)(),...n.components};return e?(0,s.jsx)(e,{...n,children:(0,s.jsx)(m,{...n})}):m(n)}}}]); \ No newline at end of file diff --git a/assets/js/62d1268c.255d7637.js b/assets/js/62d1268c.255d7637.js deleted file mode 100644 index e4b3726bf4..0000000000 --- a/assets/js/62d1268c.255d7637.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[9213],{7369:(e,n,s)=>{s.d(n,{A:()=>l});const l=s.p+"assets/images/component-ollama-embeddings-chromadb-c02d6ef9e753b61c274778d90f2a6eec.png"},17287:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>i,default:()=>m,frontMatter:()=>r,metadata:()=>l,toc:()=>c});const l=JSON.parse('{"id":"Components/bundles-ollama","title":"Ollama","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-ollama.mdx","sourceDirName":"Components","slug":"/bundles-ollama","permalink":"/bundles-ollama","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Ollama","slug":"/bundles-ollama"},"sidebar":"docs","previous":{"title":"NVIDIA G-Assist","permalink":"/integrations-nvidia-g-assist"},"next":{"title":"OpenAI","permalink":"/bundles-openai"}}');var o=s(74848),t=s(28453),a=s(17886);const r={title:"Ollama",slug:"/bundles-ollama"},i=void 0,d={},c=[{value:"Ollama text generation",id:"ollama-text-generation",level:2},{value:"Ollama Embeddings",id:"ollama-embeddings",level:2}];function h(e){const n={a:"a",code:"code",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",...(0,t.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,o.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,o.jsx)(n.strong,{children:"Ollama"})," bundle."]}),"\n",(0,o.jsxs)(n.p,{children:["For more information about Ollama features and functionality used by Ollama components, see the ",(0,o.jsx)(n.a,{href:"https://ollama.com/",children:"Ollama documentation"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"ollama-text-generation",children:"Ollama text generation"}),"\n",(0,o.jsxs)(n.p,{children:["This component generates text using ",(0,o.jsx)(n.a,{href:"https://ollama.com/library",children:"Ollama's language models"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["To use the ",(0,o.jsx)(n.strong,{children:"Ollama"})," component in a flow, connect Langflow to your locally running Ollama server and select a model:"]}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Add the ",(0,o.jsx)(n.strong,{children:"Ollama"})," component to your flow."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["In the ",(0,o.jsx)(n.strong,{children:"Base URL"})," field, enter the address for your locally running Ollama server."]}),"\n",(0,o.jsxs)(n.p,{children:["This value is set as the ",(0,o.jsx)(n.code,{children:"OLLAMA_HOST"})," environment variable in Ollama.\nThe default base URL is ",(0,o.jsx)(n.code,{children:"http://127.0.0.1:11434"}),"."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Once the connection is established, select a model in the ",(0,o.jsx)(n.strong,{children:"Model Name"})," field, such as ",(0,o.jsx)(n.code,{children:"llama3.2:latest"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["To refresh the server's list of models, click ",(0,o.jsx)(a.A,{name:"RefreshCw","aria-hidden":"true"})," ",(0,o.jsx)(n.strong,{children:"Refresh"}),"."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Optional: To configure additional parameters, such as temperature or max tokens, click ",(0,o.jsx)(a.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,o.jsx)(n.strong,{children:"Controls"})," in the ",(0,o.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Connect the ",(0,o.jsx)(n.strong,{children:"Ollama"})," component to other components in the flow, depending on how you want to use the model."]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Language Model"})," components can output either a ",(0,o.jsx)(n.strong,{children:"Model Response"})," (",(0,o.jsx)(n.a,{href:"/data-types#message",children:(0,o.jsx)(n.code,{children:"Message"})}),") or a ",(0,o.jsx)(n.strong,{children:"Language Model"})," (",(0,o.jsx)(n.a,{href:"/data-types#languagemodel",children:(0,o.jsx)(n.code,{children:"LanguageModel"})}),"). Use the ",(0,o.jsx)(n.strong,{children:"Language Model"})," output when you want to use an Ollama model as the LLM for another LLM-driven component, such as a ",(0,o.jsx)(n.strong,{children:"Language Model"})," or ",(0,o.jsx)(n.strong,{children:"Smart Function"})," component. For more information, see ",(0,o.jsxs)(n.a,{href:"/components-models",children:[(0,o.jsx)(n.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["In the following example, the flow uses ",(0,o.jsx)(n.code,{children:"LanguageModel"})," output to use an Ollama model as the LLM for an ",(0,o.jsxs)(n.a,{href:"/components-agents",children:[(0,o.jsx)(n.strong,{children:"Agent"})," component"]}),"."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"Ollama component used as the LLM in an agent flow",src:s(92757).A+"",width:"4000",height:"2668"})}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"ollama-embeddings",children:"Ollama Embeddings"}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.strong,{children:"Ollama Embeddings"})," component generates embeddings using ",(0,o.jsx)(n.a,{href:"https://ollama.com/search?c=embedding",children:"Ollama embedding models"}),"."]}),"\n",(0,o.jsx)(n.p,{children:"To use this component in a flow, connect Langflow to your locally running Ollama server and select an embeddings model:"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Add the ",(0,o.jsx)(n.strong,{children:"Ollama Embeddings"})," component to your flow."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["In the ",(0,o.jsx)(n.strong,{children:"Ollama Base URL"})," field, enter the address for your locally running Ollama server."]}),"\n",(0,o.jsxs)(n.p,{children:["This value is set as the ",(0,o.jsx)(n.code,{children:"OLLAMA_HOST"})," environment variable in Ollama.\nThe default base URL is ",(0,o.jsx)(n.code,{children:"http://127.0.0.1:11434"}),"."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Once the connection is established, select a model in the ",(0,o.jsx)(n.strong,{children:"Ollama Model"})," field, such as ",(0,o.jsx)(n.code,{children:"all-minilm:latest"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["To refresh the server's list of models, click ",(0,o.jsx)(a.A,{name:"RefreshCw","aria-hidden":"true"})," ",(0,o.jsx)(n.strong,{children:"Refresh"}),"."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Optional: To configure additional parameters, such as temperature or max tokens, click ",(0,o.jsx)(a.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,o.jsx)(n.strong,{children:"Controls"})," in the ",(0,o.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),".\nAvailable parameters depend on the selected model."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Connect the ",(0,o.jsx)(n.strong,{children:"Ollama Embeddings"})," component to other components in the flow.\nFor more information about using embedding model components in flows, see ",(0,o.jsxs)(n.a,{href:"/components-embedding-models",children:[(0,o.jsx)(n.strong,{children:"Embedding Model"})," components"]}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["This example connects the ",(0,o.jsx)(n.strong,{children:"Ollama Embeddings"})," component to generate embeddings for text chunks extracted from a PDF file, and then stores the embeddings and chunks in a Chroma DB vector store."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"Ollama Embeddings component in an embedding generation flow",src:s(7369).A+"",width:"1098",height:"811"})}),"\n"]}),"\n"]})]})}function m(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},17886:(e,n,s)=>{s.d(n,{A:()=>t});s(96540);var l=s(64058),o=s(74848);function t({name:e,...n}){const s=l[e];return s?(0,o.jsx)(s,{...n}):null}},92757:(e,n,s)=>{s.d(n,{A:()=>l});const l=s.p+"assets/images/component-ollama-model-5755eab19c67fb10ee0533b3f7ade726.png"}}]); \ No newline at end of file diff --git a/assets/js/62d1268c.9067f8f7.js b/assets/js/62d1268c.9067f8f7.js new file mode 100644 index 0000000000..a828680a1e --- /dev/null +++ b/assets/js/62d1268c.9067f8f7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[9213],{7369:(e,n,s)=>{s.d(n,{A:()=>l});const l=s.p+"assets/images/component-ollama-embeddings-chromadb-c02d6ef9e753b61c274778d90f2a6eec.png"},17287:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>i,default:()=>m,frontMatter:()=>r,metadata:()=>l,toc:()=>c});const l=JSON.parse('{"id":"Components/bundles-ollama","title":"Ollama","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-ollama.mdx","sourceDirName":"Components","slug":"/bundles-ollama","permalink":"/bundles-ollama","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Ollama","slug":"/bundles-ollama"},"sidebar":"docs","previous":{"title":"NVIDIA G-Assist","permalink":"/integrations-nvidia-g-assist"},"next":{"title":"OpenAI","permalink":"/bundles-openai"}}');var o=s(74848),t=s(28453),a=s(17886);const r={title:"Ollama",slug:"/bundles-ollama"},i=void 0,d={},c=[{value:"Ollama text generation",id:"ollama-text-generation",level:2},{value:"Ollama Embeddings",id:"ollama-embeddings",level:2}];function h(e){const n={a:"a",code:"code",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",...(0,t.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,o.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,o.jsx)(n.strong,{children:"Ollama"})," bundle."]}),"\n",(0,o.jsxs)(n.p,{children:["For more information about Ollama features and functionality used by Ollama components, see the ",(0,o.jsx)(n.a,{href:"https://ollama.com/",children:"Ollama documentation"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"ollama-text-generation",children:"Ollama text generation"}),"\n",(0,o.jsxs)(n.p,{children:["This component generates text using ",(0,o.jsx)(n.a,{href:"https://ollama.com/library",children:"Ollama's language models"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["To use the ",(0,o.jsx)(n.strong,{children:"Ollama"})," component in a flow, connect Langflow to your locally running Ollama server and select a model:"]}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Add the ",(0,o.jsx)(n.strong,{children:"Ollama"})," component to your flow."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["In the ",(0,o.jsx)(n.strong,{children:"Base URL"})," field, enter the address for your locally running Ollama server."]}),"\n",(0,o.jsxs)(n.p,{children:["This value is set as the ",(0,o.jsx)(n.code,{children:"OLLAMA_HOST"})," environment variable in Ollama.\nThe default base URL is ",(0,o.jsx)(n.code,{children:"http://127.0.0.1:11434"}),"."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Once the connection is established, select a model in the ",(0,o.jsx)(n.strong,{children:"Model Name"})," field, such as ",(0,o.jsx)(n.code,{children:"llama3.2:latest"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["To refresh the server's list of models, click ",(0,o.jsx)(a.A,{name:"RefreshCw","aria-hidden":"true"})," ",(0,o.jsx)(n.strong,{children:"Refresh"}),"."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Optional: To configure additional parameters, such as temperature or max tokens, click ",(0,o.jsx)(a.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,o.jsx)(n.strong,{children:"Controls"})," in the ",(0,o.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Connect the ",(0,o.jsx)(n.strong,{children:"Ollama"})," component to other components in the flow, depending on how you want to use the model."]}),"\n",(0,o.jsxs)(n.p,{children:["Language model components can output either a ",(0,o.jsx)(n.strong,{children:"Model Response"})," (",(0,o.jsx)(n.a,{href:"/data-types#message",children:(0,o.jsx)(n.code,{children:"Message"})}),") or a ",(0,o.jsx)(n.strong,{children:"Language Model"})," (",(0,o.jsx)(n.a,{href:"/data-types#languagemodel",children:(0,o.jsx)(n.code,{children:"LanguageModel"})}),"). Use the ",(0,o.jsx)(n.strong,{children:"Language Model"})," output when you want to use an Ollama model as the LLM for another LLM-driven component, such as an ",(0,o.jsx)(n.strong,{children:"Agent"})," or ",(0,o.jsx)(n.strong,{children:"Smart Function"})," component. For more information, see ",(0,o.jsxs)(n.a,{href:"/components-models",children:[(0,o.jsx)(n.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["In the following example, the flow uses ",(0,o.jsx)(n.code,{children:"LanguageModel"})," output to use an Ollama model as the LLM for an ",(0,o.jsxs)(n.a,{href:"/components-agents",children:[(0,o.jsx)(n.strong,{children:"Agent"})," component"]}),"."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"Ollama component used as the LLM in an agent flow",src:s(92757).A+"",width:"4000",height:"2668"})}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"ollama-embeddings",children:"Ollama Embeddings"}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.strong,{children:"Ollama Embeddings"})," component generates embeddings using ",(0,o.jsx)(n.a,{href:"https://ollama.com/search?c=embedding",children:"Ollama embedding models"}),"."]}),"\n",(0,o.jsx)(n.p,{children:"To use this component in a flow, connect Langflow to your locally running Ollama server and select an embeddings model:"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Add the ",(0,o.jsx)(n.strong,{children:"Ollama Embeddings"})," component to your flow."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["In the ",(0,o.jsx)(n.strong,{children:"Ollama Base URL"})," field, enter the address for your locally running Ollama server."]}),"\n",(0,o.jsxs)(n.p,{children:["This value is set as the ",(0,o.jsx)(n.code,{children:"OLLAMA_HOST"})," environment variable in Ollama.\nThe default base URL is ",(0,o.jsx)(n.code,{children:"http://127.0.0.1:11434"}),"."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Once the connection is established, select a model in the ",(0,o.jsx)(n.strong,{children:"Ollama Model"})," field, such as ",(0,o.jsx)(n.code,{children:"all-minilm:latest"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["To refresh the server's list of models, click ",(0,o.jsx)(a.A,{name:"RefreshCw","aria-hidden":"true"})," ",(0,o.jsx)(n.strong,{children:"Refresh"}),"."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Optional: To configure additional parameters, such as temperature or max tokens, click ",(0,o.jsx)(a.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,o.jsx)(n.strong,{children:"Controls"})," in the ",(0,o.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),".\nAvailable parameters depend on the selected model."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Connect the ",(0,o.jsx)(n.strong,{children:"Ollama Embeddings"})," component to other components in the flow.\nFor more information about using embedding model components in flows, see ",(0,o.jsxs)(n.a,{href:"/components-embedding-models",children:[(0,o.jsx)(n.strong,{children:"Embedding Model"})," components"]}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["This example connects the ",(0,o.jsx)(n.strong,{children:"Ollama Embeddings"})," component to generate embeddings for text chunks extracted from a PDF file, and then stores the embeddings and chunks in a Chroma DB vector store."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"Ollama Embeddings component in an embedding generation flow",src:s(7369).A+"",width:"1098",height:"811"})}),"\n"]}),"\n"]})]})}function m(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},17886:(e,n,s)=>{s.d(n,{A:()=>t});s(96540);var l=s(64058),o=s(74848);function t({name:e,...n}){const s=l[e];return s?(0,o.jsx)(s,{...n}):null}},92757:(e,n,s)=>{s.d(n,{A:()=>l});const l=s.p+"assets/images/component-ollama-model-5755eab19c67fb10ee0533b3f7ade726.png"}}]); \ No newline at end of file diff --git a/assets/js/681e5335.097e3679.js b/assets/js/681e5335.097e3679.js deleted file mode 100644 index 682efb3a99..0000000000 --- a/assets/js/681e5335.097e3679.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[8607],{10939:(e,i,t)=>{t.r(i),t.d(i,{assets:()=>o,contentTitle:()=>l,default:()=>p,frontMatter:()=>d,metadata:()=>n,toc:()=>c});const n=JSON.parse('{"id":"Components/bundles-wikipedia","title":"Wikipedia","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-wikipedia.mdx","sourceDirName":"Components","slug":"/bundles-wikipedia","permalink":"/bundles-wikipedia","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Wikipedia","slug":"/bundles-wikipedia"},"sidebar":"docs","previous":{"title":"Vertex AI","permalink":"/bundles-vertexai"},"next":{"title":"xAI","permalink":"/bundles-xai"}}');var a=t(74848),s=t(28453),r=t(17886);const d={title:"Wikipedia",slug:"/bundles-wikipedia"},l=void 0,o={},c=[{value:"Wikidata API",id:"wikidata-api",level:2},{value:"Wikipedia API",id:"wikipedia-api",level:2},{value:"Wikipedia API parameters",id:"wikipedia-api-parameters",level:3},{value:"See also",id:"see-also",level:2}];function h(e){const i={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.p,{children:[(0,a.jsx)(i.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,a.jsxs)(i.p,{children:["This page describes the components that are available in the ",(0,a.jsx)(i.strong,{children:"Wikipedia"})," bundle."]}),"\n",(0,a.jsxs)(i.admonition,{type:"tip",children:[(0,a.jsxs)(i.p,{children:["Wikipedia components are useful ",(0,a.jsx)(i.a,{href:"/agents-tools",children:"tools for agents"})," that need reliable sources for information retrieval, such as tutoring chatbots or generic research assistants."]}),(0,a.jsx)(i.p,{children:"Rather than broad internet searches or recall from internal model data, these components provide specific data returned from Wikipedia API requests."})]}),"\n",(0,a.jsx)(i.h2,{id:"wikidata-api",children:"Wikidata API"}),"\n",(0,a.jsxs)(i.p,{children:["This component performs a similarity search using the ",(0,a.jsx)(i.a,{href:"https://www.wikidata.org/wiki/Wikidata:REST_API",children:"Wikidata API"}),"."]}),"\n",(0,a.jsxs)(i.p,{children:["It accepts a string text query, and it outputs a ",(0,a.jsx)(i.a,{href:"/data-types#dataframe",children:(0,a.jsx)(i.code,{children:"DataFrame"})})," containing the search results."]}),"\n",(0,a.jsx)(i.h2,{id:"wikipedia-api",children:"Wikipedia API"}),"\n",(0,a.jsxs)(i.p,{children:["This component searches and retrieves information from Wikipedia with the ",(0,a.jsx)(i.a,{href:"https://www.mediawiki.org/wiki/API:Main_page",children:"WikiMedia API"})," search endpoints, and then outputs the response as a ",(0,a.jsx)(i.a,{href:"/data-types#dataframe",children:(0,a.jsx)(i.code,{children:"DataFrame"})}),"."]}),"\n",(0,a.jsx)(i.h3,{id:"wikipedia-api-parameters",children:"Wikipedia API parameters"}),"\n",(0,a.jsxs)(i.p,{children:["Some ",(0,a.jsx)(i.strong,{children:"Wikipedia API"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,a.jsx)(r.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,a.jsx)(i.strong,{children:"Controls"})," in the ",(0,a.jsx)(i.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(0,a.jsxs)(i.table,{children:[(0,a.jsx)(i.thead,{children:(0,a.jsxs)(i.tr,{children:[(0,a.jsx)(i.th,{children:"Name"}),(0,a.jsx)(i.th,{children:"Type"}),(0,a.jsx)(i.th,{children:"Description"})]})}),(0,a.jsxs)(i.tbody,{children:[(0,a.jsxs)(i.tr,{children:[(0,a.jsx)(i.td,{children:"input_value"}),(0,a.jsx)(i.td,{children:"String"}),(0,a.jsx)(i.td,{children:"Input parameter. The search query input."})]}),(0,a.jsxs)(i.tr,{children:[(0,a.jsx)(i.td,{children:"lang"}),(0,a.jsx)(i.td,{children:"String"}),(0,a.jsxs)(i.td,{children:["Input parameter. The language code for Wikipedia. Default: ",(0,a.jsx)(i.code,{children:"en"}),"."]})]}),(0,a.jsxs)(i.tr,{children:[(0,a.jsx)(i.td,{children:"k"}),(0,a.jsx)(i.td,{children:"Integer"}),(0,a.jsx)(i.td,{children:"Input parameter. The number of results to return."})]}),(0,a.jsxs)(i.tr,{children:[(0,a.jsx)(i.td,{children:"load_all_available_meta"}),(0,a.jsx)(i.td,{children:"Boolean"}),(0,a.jsx)(i.td,{children:"Input parameter. Whether to load all available metadata."})]}),(0,a.jsxs)(i.tr,{children:[(0,a.jsx)(i.td,{children:"doc_content_chars_max"}),(0,a.jsx)(i.td,{children:"Integer"}),(0,a.jsx)(i.td,{children:"Input parameter. The maximum number of characters for document content."})]})]})]}),"\n",(0,a.jsx)(i.h2,{id:"see-also",children:"See also"}),"\n",(0,a.jsxs)(i.ul,{children:["\n",(0,a.jsx)(i.li,{children:(0,a.jsxs)(i.a,{href:"/components-data#api-request",children:[(0,a.jsx)(i.strong,{children:"API Request"})," component"]})}),"\n"]})]})}function p(e={}){const{wrapper:i}={...(0,s.R)(),...e.components};return i?(0,a.jsx)(i,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},17886:(e,i,t)=>{t.d(i,{A:()=>s});t(96540);var n=t(64058),a=t(74848);function s({name:e,...i}){const t=n[e];return t?(0,a.jsx)(t,{...i}):null}}}]); \ No newline at end of file diff --git a/assets/js/681e5335.6cbf7b90.js b/assets/js/681e5335.6cbf7b90.js new file mode 100644 index 0000000000..f02f4dc2f5 --- /dev/null +++ b/assets/js/681e5335.6cbf7b90.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[8607],{10939:(e,i,t)=>{t.r(i),t.d(i,{assets:()=>l,contentTitle:()=>o,default:()=>p,frontMatter:()=>d,metadata:()=>n,toc:()=>c});const n=JSON.parse('{"id":"Components/bundles-wikipedia","title":"Wikipedia","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-wikipedia.mdx","sourceDirName":"Components","slug":"/bundles-wikipedia","permalink":"/bundles-wikipedia","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Wikipedia","slug":"/bundles-wikipedia"},"sidebar":"docs","previous":{"title":"Vertex AI","permalink":"/bundles-vertexai"},"next":{"title":"xAI","permalink":"/bundles-xai"}}');var a=t(74848),s=t(28453),r=(t(17886),t(31929));const d={title:"Wikipedia",slug:"/bundles-wikipedia"},o=void 0,l={},c=[{value:"Wikidata API",id:"wikidata-api",level:2},{value:"Wikipedia API",id:"wikipedia-api",level:2},{value:"Wikipedia API parameters",id:"wikipedia-api-parameters",level:3},...r.RM,{value:"See also",id:"see-also",level:2}];function h(e){const i={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(i.p,{children:[(0,a.jsx)(i.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,a.jsxs)(i.p,{children:["This page describes the components that are available in the ",(0,a.jsx)(i.strong,{children:"Wikipedia"})," bundle."]}),"\n",(0,a.jsxs)(i.admonition,{type:"tip",children:[(0,a.jsxs)(i.p,{children:["Wikipedia components are useful ",(0,a.jsx)(i.a,{href:"/agents-tools",children:"tools for agents"})," that need reliable sources for information retrieval, such as tutoring chatbots or generic research assistants."]}),(0,a.jsx)(i.p,{children:"Rather than broad internet searches or recall from internal model data, these components provide specific data returned from Wikipedia API requests."})]}),"\n",(0,a.jsx)(i.h2,{id:"wikidata-api",children:"Wikidata API"}),"\n",(0,a.jsxs)(i.p,{children:["This component performs a similarity search using the ",(0,a.jsx)(i.a,{href:"https://www.wikidata.org/wiki/Wikidata:REST_API",children:"Wikidata API"}),"."]}),"\n",(0,a.jsxs)(i.p,{children:["It accepts a string text query, and it outputs a ",(0,a.jsx)(i.a,{href:"/data-types#dataframe",children:(0,a.jsx)(i.code,{children:"DataFrame"})})," containing the search results."]}),"\n",(0,a.jsx)(i.h2,{id:"wikipedia-api",children:"Wikipedia API"}),"\n",(0,a.jsxs)(i.p,{children:["This component searches and retrieves information from Wikipedia with the ",(0,a.jsx)(i.a,{href:"https://www.mediawiki.org/wiki/API:Main_page",children:"WikiMedia API"})," search endpoints, and then outputs the response as a ",(0,a.jsx)(i.a,{href:"/data-types#dataframe",children:(0,a.jsx)(i.code,{children:"DataFrame"})}),"."]}),"\n",(0,a.jsx)(i.h3,{id:"wikipedia-api-parameters",children:"Wikipedia API parameters"}),"\n",(0,a.jsx)(r.Ay,{}),"\n",(0,a.jsxs)(i.table,{children:[(0,a.jsx)(i.thead,{children:(0,a.jsxs)(i.tr,{children:[(0,a.jsx)(i.th,{children:"Name"}),(0,a.jsx)(i.th,{children:"Type"}),(0,a.jsx)(i.th,{children:"Description"})]})}),(0,a.jsxs)(i.tbody,{children:[(0,a.jsxs)(i.tr,{children:[(0,a.jsx)(i.td,{children:"input_value"}),(0,a.jsx)(i.td,{children:"String"}),(0,a.jsx)(i.td,{children:"Input parameter. The search query input."})]}),(0,a.jsxs)(i.tr,{children:[(0,a.jsx)(i.td,{children:"lang"}),(0,a.jsx)(i.td,{children:"String"}),(0,a.jsxs)(i.td,{children:["Input parameter. The language code for Wikipedia. Default: ",(0,a.jsx)(i.code,{children:"en"}),"."]})]}),(0,a.jsxs)(i.tr,{children:[(0,a.jsx)(i.td,{children:"k"}),(0,a.jsx)(i.td,{children:"Integer"}),(0,a.jsx)(i.td,{children:"Input parameter. The number of results to return."})]}),(0,a.jsxs)(i.tr,{children:[(0,a.jsx)(i.td,{children:"load_all_available_meta"}),(0,a.jsx)(i.td,{children:"Boolean"}),(0,a.jsx)(i.td,{children:"Input parameter. Whether to load all available metadata."})]}),(0,a.jsxs)(i.tr,{children:[(0,a.jsx)(i.td,{children:"doc_content_chars_max"}),(0,a.jsx)(i.td,{children:"Integer"}),(0,a.jsx)(i.td,{children:"Input parameter. The maximum number of characters for document content."})]})]})]}),"\n",(0,a.jsx)(i.h2,{id:"see-also",children:"See also"}),"\n",(0,a.jsxs)(i.ul,{children:["\n",(0,a.jsx)(i.li,{children:(0,a.jsxs)(i.a,{href:"/components-data#api-request",children:[(0,a.jsx)(i.strong,{children:"API Request"})," component"]})}),"\n"]})]})}function p(e={}){const{wrapper:i}={...(0,s.R)(),...e.components};return i?(0,a.jsx)(i,{...e,children:(0,a.jsx)(h,{...e})}):h(e)}},17886:(e,i,t)=>{t.d(i,{A:()=>s});t(96540);var n=t(64058),a=t(74848);function s({name:e,...i}){const t=n[e];return t?(0,a.jsx)(t,{...i}):null}},31929:(e,i,t)=>{t.d(i,{Ay:()=>o,RM:()=>r});var n=t(74848),a=t(28453),s=t(17886);const r=[];function d(e){const i={a:"a",p:"p",strong:"strong",...(0,a.R)(),...e.components};return(0,n.jsxs)(i.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,n.jsx)(s.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,n.jsx)(i.strong,{children:"Controls"})," in the ",(0,n.jsx)(i.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function o(e={}){const{wrapper:i}={...(0,a.R)(),...e.components};return i?(0,n.jsx)(i,{...e,children:(0,n.jsx)(d,{...e})}):d(e)}}}]); \ No newline at end of file diff --git a/assets/js/709203b3.7c36c923.js b/assets/js/709203b3.7c36c923.js deleted file mode 100644 index b14f752106..0000000000 --- a/assets/js/709203b3.7c36c923.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":"Render","permalink":"/deployment-render"},"next":{"title":"Input / Output","permalink":"/components-io"}}');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.jsx)(n.p,{children:"Langflow provides keyboard shortcuts for the 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:"workspace"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Components"})," menu is organized by component type or provider, 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:"Core"}),": The categories near the top of the ",(0,s.jsx)(n.strong,{children:"Components"})," menu are Langflow's core components. They are grouped by purpose, such as ",(0,s.jsx)(n.strong,{children:"Inputs and Outputs"})," or ",(0,s.jsx)(n.strong,{children:"Data"}),". ",(0,s.jsx)(n.strong,{children:"Beta"})," components are newly released and still in development."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Bundles"}),": These components support specific third-party integrations, and they are grouped by provider."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Legacy"}),": 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"]}),"\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.jsx)(n.p,{children:"To access a component's header menu, click the component in your 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 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 visual editor (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 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:"/data-types#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 Template 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.admonition,{type:"tip",children:(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Hover over a port to see connection details for that port."}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Click a port to filter the ",(0,s.jsx)(n.strong,{children:"Components"})," menu by compatible components."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["If two components have incompatible data types, you can use a processing component like the ",(0,s.jsxs)(n.a,{href:"/components-processing#type-convert",children:[(0,s.jsx)(n.strong,{children:"Type Convert"})," component"]})," to convert the data between components."]}),"\n"]}),"\n"]})}),"\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 Template"})," 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 Template 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:"All components produce output that is either sent to another component in the flow or returned as the final flow result."}),"\n",(0,s.jsx)(n.p,{children:"Some components can produce multiple types of output:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["If the component emits all types at once, the component has multiple output ports in the visual editor. In component code, this is represented by ",(0,s.jsx)(n.code,{children:"group_outputs=True"})]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["If the component emits only one type, you must select the output type by clicking the output label near the output port, and then selecting the desired output type. In component code, this is represented by ",(0,s.jsx)(n.code,{children:"group_outputs=False"})," or omitting the ",(0,s.jsx)(n.code,{children:"group_outputs"})," parameter."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["For example, the ",(0,s.jsx)(n.strong,{children:"Language Model"})," component can output ",(0,s.jsx)(n.em,{children:"either"})," a ",(0,s.jsx)(n.strong,{children:"Model Response"})," or ",(0,s.jsx)(n.strong,{children:"Language Model"}),".\nThe ",(0,s.jsx)(n.strong,{children:"Model Response"})," output produces ",(0,s.jsx)(n.a,{href:"/data-types#message",children:(0,s.jsx)(n.code,{children:"Message"})})," data that can be passed to another component's ",(0,s.jsx)(n.code,{children:"Message"})," port.\nThe ",(0,s.jsx)(n.strong,{children:"Language Model"})," output must be connected to a component with a ",(0,s.jsx)(n.strong,{children:"Language Model"})," input, such as the ",(0,s.jsxs)(n.a,{href:"/components-processing#structured-output",children:[(0,s.jsx)(n.strong,{children:"Structured Output"})," component"]}),", that uses the attached LLM to power the receiving component's reasoning."]}),"\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.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 ",(0,s.jsx)(n.a,{href:"/concepts-overview#workspace",children:"workspace"})," 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 visual editor."}),"\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.jsxs)(n.a,{href:"https://github.com/langflow-ai/langflow/blob/main/src/backend/base/langflow/components/langchain_utilities/recursive_character.py",children:[(0,s.jsx)(n.strong,{children:"Recursive Character Text Splitter"})," component"]})," 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:(0,s.jsx)(n.code,{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 workspace as ",(0,s.jsx)(n.a,{href:"#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 visual editor."]}),"\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.jsx)(n.p,{children:"When editing a flow in the 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 it's associated ",(0,s.jsx)(n.strong,{children:"Embeddings Model"})," and ",(0,s.jsx)(n.strong,{children:"Vector Store"})," components."]}),"\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 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 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.87a87a83.js b/assets/js/709203b3.87a87a83.js new file mode 100644 index 0000000000..e8c12486c2 --- /dev/null +++ b/assets/js/709203b3.87a87a83.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:()=>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":"Render","permalink":"/deployment-render"},"next":{"title":"Input / Output","permalink":"/components-io"}}');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:"Component header menus",id:"component-header-menus",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.jsx)(n.p,{children:"Langflow provides keyboard shortcuts for the 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:"workspace"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Components"})," menu is organized by component type or provider, 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:"Core"}),": The categories near the top of the ",(0,s.jsx)(n.strong,{children:"Components"})," menu are Langflow's core components. They are grouped by purpose, such as ",(0,s.jsx)(n.strong,{children:"Inputs and Outputs"})," or ",(0,s.jsx)(n.strong,{children:"Data"}),". ",(0,s.jsx)(n.strong,{children:"Beta"})," components are newly released and still in development."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Bundles"}),": These components support specific third-party integrations, and they are grouped by provider."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Legacy"}),": 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"]}),"\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.jsxs)(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 ",(0,s.jsx)(n.a,{href:"#component-header-menus",children:"component's header menu"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"component-header-menus",children:"Component header menus"}),"\n",(0,s.jsx)(n.p,{children:"To access a component's header menu, click the component in your 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 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 visual editor (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 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:"/data-types#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 Template 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.admonition,{type:"tip",children:(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Hover over a port to see connection details for that port."}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Click a port to filter the ",(0,s.jsx)(n.strong,{children:"Components"})," menu by compatible components."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["If two components have incompatible data types, you can use a processing component like the ",(0,s.jsxs)(n.a,{href:"/components-processing#type-convert",children:[(0,s.jsx)(n.strong,{children:"Type Convert"})," component"]})," to convert the data between components."]}),"\n"]}),"\n"]})}),"\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 Template"})," 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 Template 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:"All components produce output that is either sent to another component in the flow or returned as the final flow result."}),"\n",(0,s.jsx)(n.p,{children:"Some components can produce multiple types of output:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["If the component emits all types at once, the component has multiple output ports in the visual editor. In component code, this is represented by ",(0,s.jsx)(n.code,{children:"group_outputs=True"})]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["If the component emits only one type, you must select the output type by clicking the output label near the output port, and then selecting the desired output type. In component code, this is represented by ",(0,s.jsx)(n.code,{children:"group_outputs=False"})," or omitting the ",(0,s.jsx)(n.code,{children:"group_outputs"})," parameter."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["For example, the ",(0,s.jsx)(n.strong,{children:"Language Model"})," component can output ",(0,s.jsx)(n.em,{children:"either"})," a ",(0,s.jsx)(n.strong,{children:"Model Response"})," or ",(0,s.jsx)(n.strong,{children:"Language Model"}),".\nThe ",(0,s.jsx)(n.strong,{children:"Model Response"})," output produces ",(0,s.jsx)(n.a,{href:"/data-types#message",children:(0,s.jsx)(n.code,{children:"Message"})})," data that can be passed to another component's ",(0,s.jsx)(n.code,{children:"Message"})," port.\nThe ",(0,s.jsx)(n.strong,{children:"Language Model"})," output must be connected to a component with a ",(0,s.jsx)(n.strong,{children:"Language Model"})," input, such as the ",(0,s.jsxs)(n.a,{href:"/components-processing#structured-output",children:[(0,s.jsx)(n.strong,{children:"Structured Output"})," component"]}),", that uses the attached LLM to power the receiving component's reasoning."]}),"\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.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 ",(0,s.jsx)(n.a,{href:"/concepts-overview#workspace",children:"workspace"})," 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 visual editor."}),"\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.jsxs)(n.a,{href:"https://github.com/langflow-ai/langflow/blob/main/src/backend/base/langflow/components/langchain_utilities/recursive_character.py",children:[(0,s.jsx)(n.strong,{children:"Recursive Character Text Splitter"})," component"]})," 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:(0,s.jsx)(n.code,{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 workspace as ",(0,s.jsx)(n.a,{href:"#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 visual editor."]}),"\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.jsx)(n.p,{children:"When editing a flow in the 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 it's associated tools or vector store components."]}),"\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 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 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/7819cc1c.057c63d7.js b/assets/js/7819cc1c.057c63d7.js new file mode 100644 index 0000000000..868c5f774e --- /dev/null +++ b/assets/js/7819cc1c.057c63d7.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"},11470:(e,t,n)=>{n.d(t,{A:()=>v});var s=n(96540),r=n(18215),o=n(23104),a=n(56347),i=n(205),c=n(57485),l=n(31682),d=n(70679);function h(e){return s.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,s.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 p(e){const{values:t,children:n}=e;return(0,s.useMemo)(()=>{const e=t??function(e){return h(e).map(({props:{value:e,label:t,attributes:n,default:s}})=>({value:e,label:t,attributes:n,default:s}))}(n);return function(e){const t=(0,l.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,n])}function x({value:e,tabValues:t}){return t.some(t=>t.value===e)}function u({queryString:e=!1,groupId:t}){const n=(0,a.W6)(),r=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,c.aZ)(r),(0,s.useCallback)(e=>{if(!r)return;const t=new URLSearchParams(n.location.search);t.set(r,e),n.replace({...n.location,search:t.toString()})},[r,n])]}function j(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,o=p(e),[a,c]=(0,s.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(!x({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 n=t.find(e=>e.default)??t[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:o})),[l,h]=u({queryString:n,groupId:r}),[j,m]=function({groupId:e}){const t=function(e){return e?`docusaurus.tab.${e}`:null}(e),[n,r]=(0,d.Dv)(t);return[n,(0,s.useCallback)(e=>{t&&r.set(e)},[t,r])]}({groupId:r}),g=(()=>{const e=l??j;return x({value:e,tabValues:o})?e:null})();(0,i.A)(()=>{g&&c(g)},[g]);return{selectedValue:a,selectValue:(0,s.useCallback)(e=>{if(!x({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);c(e),h(e),m(e)},[h,m,o]),tabValues:o}}var m=n(92303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var f=n(74848);function y({className:e,block:t,selectedValue:n,selectValue:s,tabValues:a}){const i=[],{blockElementScrollPositionUntilNextRender:c}=(0,o.a_)(),l=e=>{const t=e.currentTarget,r=i.indexOf(t),o=a[r].value;o!==n&&(c(t),s(o))},d=e=>{let t=null;switch(e.key){case"Enter":l(e);break;case"ArrowRight":{const n=i.indexOf(e.currentTarget)+1;t=i[n]??i[0];break}case"ArrowLeft":{const n=i.indexOf(e.currentTarget)-1;t=i[n]??i[i.length-1];break}}t?.focus()};return(0,f.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":t},e),children:a.map(({value:e,label:t,attributes:s})=>(0,f.jsx)("li",{role:"tab",tabIndex:n===e?0:-1,"aria-selected":n===e,ref:e=>{i.push(e)},onKeyDown:d,onClick:l,...s,className:(0,r.A)("tabs__item",g.tabItem,s?.className,{"tabs__item--active":n===e}),children:t??e},e))})}function b({lazy:e,children:t,selectedValue:n}){const o=(Array.isArray(t)?t:[t]).filter(Boolean);if(e){const e=o.find(e=>e.props.value===n);return e?(0,s.cloneElement)(e,{className:(0,r.A)("margin-top--md",e.props.className)}):null}return(0,f.jsx)("div",{className:"margin-top--md",children:o.map((e,t)=>(0,s.cloneElement)(e,{key:t,hidden:e.props.value!==n}))})}function D(e){const t=j(e);return(0,f.jsxs)("div",{className:(0,r.A)("tabs-container",g.tabList),children:[(0,f.jsx)(y,{...t,...e}),(0,f.jsx)(b,{...t,...e})]})}function v(e){const t=(0,m.A)();return(0,f.jsx)(D,{...e,children:h(e.children)},String(t))}},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}},19365:(e,t,n)=>{n.d(t,{A:()=>a});n(96540);var s=n(18215);const r={tabItem:"tabItem_Ymn6"};var o=n(74848);function a({children:e,hidden:t,className:n}){return(0,o.jsx)("div",{role:"tabpanel",className:(0,s.A)(r.tabItem,n),hidden:t,children:e})}},31929:(e,t,n)=>{n.d(t,{Ay:()=>c,RM:()=>a});var s=n(74848),r=n(28453),o=n(17886);const a=[];function i(e){const t={a:"a",p:"p",strong:"strong",...(0,r.R)(),...e.components};return(0,s.jsxs)(t.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,s.jsx)(o.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(t.strong,{children:"Controls"})," in the ",(0,s.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function c(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(i,{...e})}):i(e)}},40966:(e,t,n)=>{n.r(t),n.d(t,{CH:()=>u,assets:()=>x,chCodeConfig:()=>j,contentTitle:()=>p,default:()=>f,frontMatter:()=>h,metadata:()=>s,toc:()=>m});const s=JSON.parse('{"id":"Components/components-processing","title":"Processing components","description":"Langflow\'s Processing components process and transform data within a flow.","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 components","slug":"/components-processing"},"sidebar":"docs","previous":{"title":"Vector Stores","permalink":"/components-vector-stores"},"next":{"title":"Prompt Template","permalink":"/components-prompts"}}');var r=n(74848),o=n(28453),a=n(24754),i=n(17886),c=n(11470),l=n(19365),d=n(31929);const h={title:"Processing components",slug:"/components-processing"},p=void 0,x={},u={annotations:a.hk,Code:a.Cy},j={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},m=[{value:"Prompt Template",id:"prompt-template",level:2},{value:"Batch Run",id:"batch-run",level:2},{value:"Use the Batch Run component in a flow",id:"use-the-batch-run-component-in-a-flow",level:3},{value:"Batch Run parameters",id:"batch-run-parameters",level:3},...d.RM,{value:"Data Operations",id:"data-operations",level:2},{value:"Use the Data Operations component in a flow",id:"use-the-data-operations-component-in-a-flow",level:3},{value:"Data Operations parameters",id:"data-operations-parameters",level:3},{value:"Available data operations",id:"available-data-operations",level:4},{value:"DataFrame Operations",id:"dataframe-operations",level:2},{value:"Use the DataFrame Operations component in a flow",id:"use-the-dataframe-operations-component-in-a-flow",level:3},{value:"DataFrame Operations parameters",id:"dataframe-operations-parameters",level:3},{value:"LLM Router",id:"llm-router",level:2},{value:"LLM Router parameters",id:"llm-router-parameters",level:3},...d.RM,{value:"LLM Router outputs",id:"llm-router-outputs",level:3},{value:"Parser",id:"parser",level:2},{value:"Parsing modes",id:"parsing-modes",level:3},...d.RM,...d.RM,{value:"Test and troubleshoot parsed text",id:"test-and-troubleshoot-parsed-text",level:3},{value:"Python Interpreter",id:"python-interpreter",level:2},{value:"Use the Python Interpreter in a flow",id:"use-the-python-interpreter-in-a-flow",level:3},{value:"Python Interpreter parameters",id:"python-interpreter-parameters",level:3},{value:"Save File",id:"save-file",level:2},{value:"Smart Function",id:"smart-function",level:2},{value:"Smart Function parameters",id:"smart-function-parameters",level:3},...d.RM,{value:"Split Text",id:"split-text",level:2},{value:"Split Text parameters",id:"split-text-parameters",level:3},...d.RM,{value:"Tokenization errors due to chunk size",id:"chunk-size",level:3},{value:"Other text splitters",id:"other-text-splitters",level:3},{value:"Structured Output",id:"structured-output",level:2},{value:"Use the Structured Output component in a flow",id:"use-the-structured-output-component-in-a-flow",level:3},{value:"Structured Output parameters",id:"structured-output-parameters",level:3},...d.RM,{value:"Output Schema options",id:"output-schema-options",level:4},{value:"Type Convert",id:"type-convert",level:2},{value:"Use the Type Convert component in a flow",id:"use-the-type-convert-component-in-a-flow",level:3},{value:"Type Convert parameters",id:"type-convert-parameters",level:3},{value:"Legacy Processing components",id:"legacy-processing-components",level:2}];function g(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",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 u||y("CH",!1),u.Code||y("CH.Code",!0),s||y("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:["Langflow's ",(0,r.jsx)(t.strong,{children:"Processing"})," components process and transform data within a flow.\nThey have many uses, including:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["Feed instructions and context to your LLMs and agents with the ",(0,r.jsxs)(t.a,{href:"#prompt-template",children:[(0,r.jsx)(t.strong,{children:"Prompt Template"})," component"]}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Extract content from larger chunks of data with a ",(0,r.jsxs)(t.a,{href:"#parser",children:[(0,r.jsx)(t.strong,{children:"Parser"})," component"]}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Filter data with natural language with the ",(0,r.jsxs)(t.a,{href:"#smart-function",children:[(0,r.jsx)(t.strong,{children:"Smart Function"})," component"]}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Save data to your local machine with the ",(0,r.jsxs)(t.a,{href:"#save-file",children:[(0,r.jsx)(t.strong,{children:"Save File"})," component"]}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Transform data into a different data type with the ",(0,r.jsxs)(t.a,{href:"#type-convert",children:[(0,r.jsx)(t.strong,{children:"Type Convert"})," component"]})," to pass it between incompatible components."]}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"prompt-template",children:"Prompt Template"}),"\n",(0,r.jsxs)(t.p,{children:["See ",(0,r.jsxs)(t.a,{href:"/components-prompts",children:[(0,r.jsx)(t.strong,{children:"Prompt Template"})," component"]}),"."]}),"\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.em,{children:"each row of one text column"})," in a ",(0,r.jsx)(t.a,{href:"/data-types#dataframe",children:(0,r.jsx)(t.code,{children:"DataFrame"})}),", and then returns a new ",(0,r.jsx)(t.code,{children:"DataFrame"})," with the original text and an LLM response.\nThe output 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 ",(0,r.jsx)(t.code,{children:"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 0-indexed processing order for all rows in the ",(0,r.jsx)(t.code,{children:"DataFrame"})]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"metadata"})," (optional): Additional information about the processing"]}),"\n"]}),"\n",(0,r.jsx)(t.h3,{id:"use-the-batch-run-component-in-a-flow",children:"Use the Batch Run component in a flow"}),"\n",(0,r.jsxs)(t.p,{children:["If you pass the ",(0,r.jsx)(t.strong,{children:"Batch Run"})," output to a ",(0,r.jsxs)(t.a,{href:"/components-processing#parser",children:[(0,r.jsx)(t.strong,{children:"Parser"})," component"]}),", you can use variables in the parsing template to reference these keys, such as ",(0,r.jsx)(t.code,{children:"{text_input}"})," and ",(0,r.jsx)(t.code,{children:"{model_response}"}),".\nThis is demonstrated in the following example."]}),"\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,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Connect a ",(0,r.jsx)(t.strong,{children:"Language Model"})," component to a ",(0,r.jsx)(t.strong,{children:"Batch Run"})," component's ",(0,r.jsx)(t.strong,{children:"Language model"})," port."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Connect ",(0,r.jsx)(t.code,{children:"DataFrame"})," output from another component to the ",(0,r.jsx)(t.strong,{children:"Batch Run"})," component's ",(0,r.jsx)(t.strong,{children:"DataFrame"})," input.\nFor example, you could connect a ",(0,r.jsx)(t.strong,{children:"File"})," component with a CSV file."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["In the ",(0,r.jsx)(t.strong,{children:"Batch Run"})," component's ",(0,r.jsx)(t.strong,{children:"Column Name"})," field, enter the name of the column in the incoming ",(0,r.jsx)(t.code,{children:"DataFrame"})," that contains the text to process.\nFor example, if you want to extract text from a ",(0,r.jsx)(t.code,{children:"name"})," column in a CSV file, enter ",(0,r.jsx)(t.code,{children:"name"})," in the ",(0,r.jsx)(t.strong,{children:"Column Name"})," field."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{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."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Optional: In the ",(0,r.jsx)(t.strong,{children:"Batch Run"})," ",(0,r.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),", click ",(0,r.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Controls"}),", enable the ",(0,r.jsx)(t.strong,{children:"System Message"})," parameter, click ",(0,r.jsx)(t.strong,{children:"Close"}),", and then enter an instruction for how you want the LLM to process each cell extracted from the file.\nFor example, ",(0,r.jsx)(t.code,{children:"Create a business card for each name."})]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["In the ",(0,r.jsx)(t.strong,{children:"Parser"})," component's ",(0,r.jsx)(t.strong,{children:"Template"})," field, enter a template for processing the ",(0,r.jsx)(t.strong,{children:"Batch Run"})," component's new ",(0,r.jsx)(t.code,{children:"DataFrame"})," columns (",(0,r.jsx)(t.code,{children:"text_input"}),", ",(0,r.jsx)(t.code,{children:"model_response"}),", and ",(0,r.jsx)(t.code,{children:"batch_index"}),"):"]}),"\n",(0,r.jsxs)(t.p,{children:["For example, this template uses three columns from the resulting, post-batch ",(0,r.jsx)(t.code,{children:"DataFrame"}),":"]}),"\n",(0,r.jsx)(u.Code,{codeConfig:j,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"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["To test the processing, click the ",(0,r.jsx)(t.strong,{children:"Parser"})," component, click ",(0,r.jsx)(i.A,{name:"Play","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Run component"}),", and then click ",(0,r.jsx)(i.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Inspect output"})," to view the final ",(0,r.jsx)(t.code,{children:"DataFrame"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["You can also connect a ",(0,r.jsx)(t.strong,{children:"Chat Output"})," component to the ",(0,r.jsx)(t.strong,{children:"Parser"})," component if you want to see the output in the ",(0,r.jsx)(t.strong,{children:"Playground"}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(t.h3,{id:"batch-run-parameters",children:"Batch Run parameters"}),"\n",(0,r.jsx)(d.Ay,{}),"\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:"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.jsxs)(t.td,{children:["Input parameter. Connect the 'Language Model' output from a ",(0,r.jsx)(t.strong,{children:"Language Model"})," component. 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:"Input parameter. 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:"Input parameter. 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:"Input parameter. 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:["Input parameter. 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:"Input parameter. If True, add metadata to the output DataFrame."})]}),(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:"Output parameter. 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:["The ",(0,r.jsx)(t.strong,{children:"Data Operations"})," component performs operations on ",(0,r.jsx)(t.a,{href:"/data-types#data",children:(0,r.jsx)(t.code,{children:"Data"})})," objects, including extracting, filtering, and editing keys and values in the ",(0,r.jsx)(t.code,{children:"Data"}),".\nFor all options, see ",(0,r.jsx)(t.a,{href:"#available-data-operations",children:"Available data operations"}),".\nThe output is a new ",(0,r.jsx)(t.code,{children:"Data"})," object containing the modified data after running the selected operation."]}),"\n",(0,r.jsx)(t.h3,{id:"use-the-data-operations-component-in-a-flow",children:"Use the Data Operations component in a flow"}),"\n",(0,r.jsxs)(t.p,{children:["The following example demonstrates how to use a ",(0,r.jsx)(t.strong,{children:"Data Operations"})," component in a flow using data from a webhook payload:"]}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Create a flow with a ",(0,r.jsx)(t.strong,{children:"Webhook"})," component and a ",(0,r.jsx)(t.strong,{children:"Data Operations"})," component, and then connect the ",(0,r.jsx)(t.strong,{children:"Webhook"})," component's output to the ",(0,r.jsx)(t.strong,{children:"Data Operations"})," component's ",(0,r.jsx)(t.strong,{children:"Data"})," input."]}),"\n",(0,r.jsxs)(t.p,{children:["All operations in the ",(0,r.jsx)(t.strong,{children:"Data Operations"})," component require at least one ",(0,r.jsx)(t.code,{children:"Data"})," input from another component.\nIf the preceding component doesn't produce ",(0,r.jsx)(t.code,{children:"Data"})," output, you can use another component, such as the ",(0,r.jsx)(t.strong,{children:"Type Convert"})," component, to reformat the data before passing it to the ",(0,r.jsx)(t.strong,{children:"Data Operations"})," component.\nAlternatively, you could consider using a component that is designed to process the original data type, such as the ",(0,r.jsx)(t.strong,{children:"Parser"})," or ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," components."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["In the ",(0,r.jsx)(t.strong,{children:"Operations"})," field, select the operation you want to perform on the incoming ",(0,r.jsx)(t.code,{children:"Data"}),".\nFor this example, select the ",(0,r.jsx)(t.strong,{children:"Select Keys"})," operation."]}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsxs)(t.p,{children:["You can select only one operation.\nIf you need to perform multiple operations on the data, you can chain multiple ",(0,r.jsx)(t.strong,{children:"Data Operations"})," components together to execute each operation in sequence.\nFor more complex multi-step operations, consider using a component like the ",(0,r.jsx)(t.strong,{children:"Smart Function"})," component."]})}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Under ",(0,r.jsx)(t.strong,{children:"Select Keys"}),", add keys for ",(0,r.jsx)(t.code,{children:"name"}),", ",(0,r.jsx)(t.code,{children:"username"}),", and ",(0,r.jsx)(t.code,{children:"email"}),".\nClick ",(0,r.jsx)(i.A,{name:"Plus","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Add more"})," to add a field for each key."]}),"\n",(0,r.jsxs)(t.p,{children:["For this example, assume that the webhook will receive consistent payloads that always contain ",(0,r.jsx)(t.code,{children:"name"}),", ",(0,r.jsx)(t.code,{children:"username"}),", and ",(0,r.jsx)(t.code,{children:"email"})," keys.\nThe ",(0,r.jsx)(t.strong,{children:"Select Keys"})," operation extracts the value of these keys from each incoming payload."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Optional: If you want to view the output in the ",(0,r.jsx)(t.strong,{children:"Playground"}),", connect the ",(0,r.jsx)(t.strong,{children:"Data Operations"})," component's output to a ",(0,r.jsx)(t.strong,{children:"Chat Output"})," component."]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"A flow with Webhook, Data Operations, and Chat Output components",src:n(46445).A+"",width:"4000",height:"1920"})}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["To test the flow, send the following request to your flow's webhook endpoint.\nFor more information about the webhook endpoint, see ",(0,r.jsx)(t.a,{href:"/webhook",children:"Trigger flows with webhooks"}),"."]}),"\n",(0,r.jsx)(u.Code,{codeConfig:j,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://',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_SERVER_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/webhook/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',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": "Main Street",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "suite": "Apt. 556",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "city": "Springfield",',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": "Acme-Corp",',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"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["To view the ",(0,r.jsx)(t.code,{children:"Data"})," resulting from the ",(0,r.jsx)(t.strong,{children:"Select Keys"})," operation, do one of the following:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["If you attached a ",(0,r.jsx)(t.strong,{children:"Chat Output"})," component, open the ",(0,r.jsx)(t.strong,{children:"Playground"})," to see the result as a chat message."]}),"\n",(0,r.jsxs)(t.li,{children:["Click ",(0,r.jsx)(i.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Inspect output"})," on the ",(0,r.jsx)(t.strong,{children:"Data Operations"})," component."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(t.h3,{id:"data-operations-parameters",children:"Data Operations parameters"}),"\n",(0,r.jsxs)(t.p,{children:["Many parameters are conditional based on the selected ",(0,r.jsx)(t.strong,{children:"Operation"})," (",(0,r.jsx)(t.code,{children:"operation"}),")."]}),"\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:"data"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsxs)(t.td,{children:["Input parameter. The ",(0,r.jsx)(t.code,{children:"Data"})," object 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.jsxs)(t.td,{children:["Input parameter. The operation to perform on the data. See ",(0,r.jsx)(t.a,{href:"#available-data-operations",children:"Available data operations"})]})]}),(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:"Input parameter. 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:"Input parameter. 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:"Input parameter. 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:"Input parameter. 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:"Input parameter. 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:"Input parameter. 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:"Input parameter. A list of keys to rename in the data."})]})]})]}),"\n",(0,r.jsx)(t.h4,{id:"available-data-operations",children:"Available data operations"}),"\n",(0,r.jsxs)(t.p,{children:["Options for the ",(0,r.jsx)(t.code,{children:"operations"})," input parameter are as follows.\nAll operations act on an incoming ",(0,r.jsx)(t.code,{children:"Data"})," object."]}),"\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:"Required Inputs"}),(0,r.jsx)(t.th,{children:"Process"})]})}),(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.jsx)(t.h2,{id:"dataframe-operations",children:"DataFrame Operations"}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component performs operations on ",(0,r.jsx)(t.a,{href:"/data-types#dataframe",children:(0,r.jsx)(t.code,{children:"DataFrame"})})," (table) rows and columns, including schema changes, record changes, sorting, and filtering.\nFor all options, see ",(0,r.jsx)(t.a,{href:"#dataframe-operations-parameters",children:"DataFrame Operations parameters"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["The output is a new ",(0,r.jsx)(t.code,{children:"DataFrame"})," containing the modified data after running the selected operation."]}),"\n",(0,r.jsx)(t.h3,{id:"use-the-dataframe-operations-component-in-a-flow",children:"Use the DataFrame Operations component in a flow"}),"\n",(0,r.jsxs)(t.p,{children:["The following steps explain how to configure a ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component in a flow.\nYou can follow along with an example or use your own flow.\nThe only requirement is that the preceding component must create ",(0,r.jsx)(t.code,{children:"DataFrame"})," output that you can pass to the ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component."]}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsx)(t.p,{children:"Create a new flow or use an existing flow."}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Example: API response extraction flow"}),(0,r.jsxs)(t.p,{children:["The following example flow uses five components to extract ",(0,r.jsx)(t.code,{children:"Data"})," from an API response, transform it to a ",(0,r.jsx)(t.code,{children:"DataFrame"}),", and then perform further processing on the tabular data using a ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component.\nThe sixth component, ",(0,r.jsx)(t.strong,{children:"Chat Output"}),", is optional in this example.\nIt only serves as a convenient way for you to view the final output in the ",(0,r.jsx)(t.strong,{children:"Playground"}),", rather than inspecting the component logs."]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"A flow that ingests an API response, extracts it to a DataFrame with a Smart Function component, and the processes it through a DataFrame Operations component",src:n(13533).A+"",width:"4000",height:"2120"})}),(0,r.jsxs)(t.p,{children:["If you want to use this example to test the ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component, do the following:"]}),(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsx)(t.p,{children:"Create a flow with the following components:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.strong,{children:"API Request"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.strong,{children:"Language Model"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.strong,{children:"Smart Function"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.strong,{children:"Type Convert"})}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Configure the ",(0,r.jsxs)(t.a,{href:"#smart-function",children:[(0,r.jsx)(t.strong,{children:"Smart Function"})," component"]})," and its dependencies:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"API Request"}),": Configure the ",(0,r.jsxs)(t.a,{href:"/components-data#api-request",children:[(0,r.jsx)(t.strong,{children:"API Request"})," component"]})," to get JSON data from an endpoint of your choice, and then connect the ",(0,r.jsx)(t.strong,{children:"API Response"})," output to the ",(0,r.jsx)(t.strong,{children:"Smart Function"})," component's ",(0,r.jsx)(t.strong,{children:"Data"})," input."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Language Model"}),": Select your preferred provider and model, and then enter a valid API key.\nChange the output to ",(0,r.jsx)(t.strong,{children:"Language Model"}),", and then connect the ",(0,r.jsx)(t.code,{children:"LanguageModel"})," output to the ",(0,r.jsx)(t.strong,{children:"Smart Function"})," component's ",(0,r.jsx)(t.strong,{children:"Language Model"})," input."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Smart Function"}),": In the ",(0,r.jsx)(t.strong,{children:"Instructions"})," field, enter natural language instructions to extract data from the API response.\nYour instructions depend on the response content and desired outcome.\nFor example, if the response contains a large ",(0,r.jsx)(t.code,{children:"result"})," field, you might provide instructions like ",(0,r.jsx)(t.code,{children:"explode the result field out into a Data object"}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Convert the ",(0,r.jsx)(t.strong,{children:"Smart Function"})," component's ",(0,r.jsx)(t.code,{children:"Data"})," output to ",(0,r.jsx)(t.code,{children:"DataFrame"}),":"]}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["Connect the ",(0,r.jsx)(t.strong,{children:"Filtered Data"})," output to the ",(0,r.jsx)(t.strong,{children:"Type Convert"})," component's ",(0,r.jsx)(t.strong,{children:"Data"})," input."]}),"\n",(0,r.jsxs)(t.li,{children:["Set the ",(0,r.jsx)(t.strong,{children:"Type Convert"})," component's ",(0,r.jsx)(t.strong,{children:"Output Type"})," to ",(0,r.jsx)(t.strong,{children:"DataFrame"}),"."]}),"\n"]}),"\n"]}),"\n"]}),(0,r.jsxs)(t.p,{children:["Now the flow is ready for you to add the ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component."]})]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Add a ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component to the flow, and then connect ",(0,r.jsx)(t.code,{children:"DataFrame"})," output from another component to the ",(0,r.jsx)(t.strong,{children:"DataFrame"})," input."]}),"\n",(0,r.jsxs)(t.p,{children:["All operations in the ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component require at least one ",(0,r.jsx)(t.code,{children:"DataFrame"})," input from another component.\nIf a component doesn't produce ",(0,r.jsx)(t.code,{children:"DataFrame"})," output, you can use another component, such as the ",(0,r.jsx)(t.strong,{children:"Type Convert"})," component, to reformat the data before passing it to the ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component.\nAlternatively, you could consider using a component that is designed to process the original data type, such as the ",(0,r.jsx)(t.strong,{children:"Parser"})," or ",(0,r.jsx)(t.strong,{children:"Data Operations"})," components."]}),"\n",(0,r.jsxs)(t.p,{children:["If you are following along with the example flow, connect the ",(0,r.jsx)(t.strong,{children:"Type Convert"})," component's ",(0,r.jsx)(t.strong,{children:"DataFrame Output"})," port to the ",(0,r.jsx)(t.strong,{children:"DataFrame"})," input."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["In the ",(0,r.jsx)(t.strong,{children:"Operations"})," field, select the operation you want to perform on the incoming ",(0,r.jsx)(t.code,{children:"DataFrame"}),".\nFor example, the ",(0,r.jsx)(t.strong,{children:"Filter"})," operation filters the rows based on a specified column and value."]}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsxs)(t.p,{children:["You can select only one operation.\nIf you need to perform multiple operations on the data, you can chain multiple ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," components together to execute each operation in sequence.\nFor more complex multi-step operations, like dramatic schema changes or pivots, consider using an LLM-powered component, like the ",(0,r.jsx)(t.strong,{children:"Structured Output"})," or ",(0,r.jsx)(t.strong,{children:"Smart Function"})," component, as a replacement or preparation for the ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component."]})}),"\n",(0,r.jsxs)(t.p,{children:["If you're following along with the example flow, select any operation that you want to apply to the data that was extracted by the ",(0,r.jsx)(t.strong,{children:"Smart Function"})," component.\nTo view the contents of the incoming ",(0,r.jsx)(t.code,{children:"DataFrame"}),", click ",(0,r.jsx)(i.A,{name:"Play","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Run component"})," on the ",(0,r.jsx)(t.strong,{children:"Type Convert"})," component, and then ",(0,r.jsx)(i.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Inspect output"}),".\nIf the ",(0,r.jsx)(t.code,{children:"DataFrame"})," seems malformed, click ",(0,r.jsx)(i.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Inspect output"})," on each upstream component to determine where the error occurs, and then modify your flow's configuration as needed.\nFor example, if the ",(0,r.jsx)(t.strong,{children:"Smart Function"})," component didn't extract the expected fields, modify your instructions or verify that the given fields are present in the ",(0,r.jsx)(t.strong,{children:"API Response"})," output."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Configure the operation's parameters.\nThe specific parameters depend on the selected operation.\nFor example, if you select the ",(0,r.jsx)(t.strong,{children:"Filter"})," operation, you must define a filter condition using the ",(0,r.jsx)(t.strong,{children:"Column Name"}),", ",(0,r.jsx)(t.strong,{children:"Filter Value"}),", and ",(0,r.jsx)(t.strong,{children:"Filter Operator"})," parameters.\nFor more information, see ",(0,r.jsx)(t.a,{href:"#dataframe-operations-parameters",children:"DataFrame Operations parameters"})]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["To test the flow, click ",(0,r.jsx)(i.A,{name:"Play","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Run component"})," on the ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component, and then click ",(0,r.jsx)(i.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Inspect output"})," to view the new ",(0,r.jsx)(t.code,{children:"DataFrame"})," created from the ",(0,r.jsx)(t.strong,{children:"Filter"})," operation."]}),"\n",(0,r.jsxs)(t.p,{children:["If you want to view the output in the ",(0,r.jsx)(t.strong,{children:"Playground"}),", connect the ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component's output to a ",(0,r.jsx)(t.strong,{children:"Chat Output"})," component, rerun the ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component, and then click ",(0,r.jsx)(t.strong,{children:"Playground"}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["For another example, see ",(0,r.jsx)(t.a,{href:"/components-logic#conditional-looping",children:"Conditional looping"}),"."]}),"\n",(0,r.jsx)(t.h3,{id:"dataframe-operations-parameters",children:"DataFrame Operations parameters"}),"\n",(0,r.jsxs)(t.p,{children:["Most ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," parameters are conditional because they only apply to specific operations."]}),"\n",(0,r.jsxs)(t.p,{children:["The only permanent parameters are ",(0,r.jsx)(t.strong,{children:"DataFrame"})," (",(0,r.jsx)(t.code,{children:"df"}),"), which is the ",(0,r.jsx)(t.code,{children:"DataFrame"})," input, and ",(0,r.jsx)(t.strong,{children:"Operation"})," (",(0,r.jsx)(t.code,{children:"operation"}),"), which is the operation to perform on the ",(0,r.jsx)(t.code,{children:"DataFrame"}),".\nOnce you select an operation, the conditional parameters for that operation appear on the ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component."]}),"\n",(0,r.jsxs)(c.A,{children:[(0,r.jsxs)(l.A,{value:"addcolumn",label:"Add Column",default:!0,children:[(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Add Column"})," operation allows you to add a new column to the ",(0,r.jsx)(t.code,{children:"DataFrame"})," with a constant value."]}),(0,r.jsxs)(t.p,{children:["The parameters are ",(0,r.jsx)(t.strong,{children:"New Column Name"})," (",(0,r.jsx)(t.code,{children:"new_column_name"}),") and ",(0,r.jsx)(t.strong,{children:"New Column Value"})," (",(0,r.jsx)(t.code,{children:"new_column_value"}),")."]})]}),(0,r.jsx)(l.A,{value:"dropcolumn",label:"Drop Column",children:(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Drop Column"})," operation allows you to remove a column from the ",(0,r.jsx)(t.code,{children:"DataFrame"}),", specified by ",(0,r.jsx)(t.strong,{children:"Column Name"})," (",(0,r.jsx)(t.code,{children:"column_name"}),")."]})}),(0,r.jsxs)(l.A,{value:"filter",label:"Filter",children:[(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Filter"})," operation allows you to filter the ",(0,r.jsx)(t.code,{children:"DataFrame"})," based on a specified condition.\nThe output is a ",(0,r.jsx)(t.code,{children:"DataFrame"})," containing only the rows that matched the filter condition."]}),(0,r.jsx)(t.p,{children:"Provide the following parameters:"}),(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Column Name"})," (",(0,r.jsx)(t.code,{children:"column_name"}),"): The name of the column to filter on."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Filter Value"})," (",(0,r.jsx)(t.code,{children:"filter_value"}),"): The value to filter on."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Filter Operator"})," (",(0,r.jsx)(t.code,{children:"filter_operator"}),"): The operator to use for filtering, one of ",(0,r.jsx)(t.code,{children:"equals"})," (default), ",(0,r.jsx)(t.code,{children:"not equals"}),", ",(0,r.jsx)(t.code,{children:"contains"}),", ",(0,r.jsx)(t.code,{children:"starts with"}),", ",(0,r.jsx)(t.code,{children:"ends with"}),", ",(0,r.jsx)(t.code,{children:"greater than"}),", or ",(0,r.jsx)(t.code,{children:"less than"}),"."]}),"\n"]})]}),(0,r.jsxs)(l.A,{value:"head",label:"Head",children:[(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Head"})," operation allows you to retrieve the first ",(0,r.jsx)(t.code,{children:"n"})," rows of the ",(0,r.jsx)(t.code,{children:"DataFrame"}),", where ",(0,r.jsx)(t.code,{children:"n"})," is set in ",(0,r.jsx)(t.strong,{children:"Number of Rows"})," (",(0,r.jsx)(t.code,{children:"num_rows"}),").\nThe default is ",(0,r.jsx)(t.code,{children:"5"}),"."]}),(0,r.jsxs)(t.p,{children:["The output is a ",(0,r.jsx)(t.code,{children:"DataFrame"})," containing only the selected rows."]})]}),(0,r.jsxs)(l.A,{value:"renamecolumn",label:"Rename Column",children:[(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Rename Column"})," operation allows you to rename an existing column in the ",(0,r.jsx)(t.code,{children:"DataFrame"}),"."]}),(0,r.jsxs)(t.p,{children:["The parameters are ",(0,r.jsx)(t.strong,{children:"Column Name"})," (",(0,r.jsx)(t.code,{children:"column_name"}),"), which is the current name, and ",(0,r.jsx)(t.strong,{children:"New Column Name"})," (",(0,r.jsx)(t.code,{children:"new_column_name"}),")."]})]}),(0,r.jsxs)(l.A,{value:"replacevalue",label:"Replace Value",children:[(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Replace Value"})," operation allows you to replace values in a specific column of the ",(0,r.jsx)(t.code,{children:"DataFrame"}),".\nThis operation replaces a target value with a new value.\nAll cells matching the target value are replaced with the new value in the new ",(0,r.jsx)(t.code,{children:"DataFrame"})," output."]}),(0,r.jsx)(t.p,{children:"Provide the following parameters:"}),(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Column Name"})," (",(0,r.jsx)(t.code,{children:"column_name"}),"): The name of the column to modify."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Value to Replace"})," (",(0,r.jsx)(t.code,{children:"replace_value"}),"): The value that you want to replace."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Replacement Value"})," (",(0,r.jsx)(t.code,{children:"replacement_value"}),"): The new value to use."]}),"\n"]})]}),(0,r.jsxs)(l.A,{value:"selectcolumns",label:"Select Columns",children:[(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Select Columns"})," operation allows you to select one or more specific columns from the ",(0,r.jsx)(t.code,{children:"DataFrame"}),"."]}),(0,r.jsxs)(t.p,{children:["Provide a list of column names in ",(0,r.jsx)(t.strong,{children:"Columns to Select"})," (",(0,r.jsx)(t.code,{children:"columns_to_select"}),").\nIn the visual editor, click ",(0,r.jsx)(i.A,{name:"Plus","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Add More"})," to add multiple fields, and then enter one column name in each field."]}),(0,r.jsxs)(t.p,{children:["The output is a ",(0,r.jsx)(t.code,{children:"DataFrame"})," containing only the specified columns."]})]}),(0,r.jsxs)(l.A,{value:"sort",label:"Sort",children:[(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Sort"})," operation allows you to sort the ",(0,r.jsx)(t.code,{children:"DataFrame"})," on a specific column in ascending or descending order."]}),(0,r.jsx)(t.p,{children:"Provide the following parameters:"}),(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Column Name"})," (",(0,r.jsx)(t.code,{children:"column_name"}),"): The name of the column to sort on."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Sort Ascending"})," (",(0,r.jsx)(t.code,{children:"ascending"}),"): Whether to sort in ascending or descending order. If enabled (true), sorts in ascending order; if disabled (false), sorts in descending order. Default: Enabled (true)"]}),"\n"]})]}),(0,r.jsxs)(l.A,{value:"tail",label:"Tail",children:[(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Tail"})," operation allows you to retrieve the last ",(0,r.jsx)(t.code,{children:"n"})," rows of the ",(0,r.jsx)(t.code,{children:"DataFrame"}),", where ",(0,r.jsx)(t.code,{children:"n"})," is set in ",(0,r.jsx)(t.strong,{children:"Number of Rows"})," (",(0,r.jsx)(t.code,{children:"num_rows"}),").\nThe default is ",(0,r.jsx)(t.code,{children:"5"}),"."]}),(0,r.jsxs)(t.p,{children:["The output is a ",(0,r.jsx)(t.code,{children:"DataFrame"})," containing only the selected rows."]})]}),(0,r.jsxs)(l.A,{value:"dropduplicates",label:"Drop Duplicates",children:[(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Drop Duplicates"})," operation removes rows from the ",(0,r.jsx)(t.code,{children:"DataFrame"})," by identifying all duplicate values within a single column."]}),(0,r.jsxs)(t.p,{children:["The only parameter is the ",(0,r.jsx)(t.strong,{children:"Column Name"})," (",(0,r.jsx)(t.code,{children:"column_name"}),")."]}),(0,r.jsxs)(t.p,{children:["When the flow runs, all rows with duplicate values in the given column are removed.\nThe output is a ",(0,r.jsx)(t.code,{children:"DataFrame"})," containing all columns from the original ",(0,r.jsx)(t.code,{children:"DataFrame"}),", but only rows with non-duplicate values."]})]})]}),"\n",(0,r.jsx)(t.h2,{id:"llm-router",children:"LLM Router"}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"LLM Router"})," 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.jsxs)(t.p,{children:["To use the component in a flow, you connect multiple ",(0,r.jsx)(t.strong,{children:"Language Model"})," components to the ",(0,r.jsx)(t.strong,{children:"LLM Router"})," components.\nOne model is the judge LLM that analyzes input messages to understand the evaluation context, selects the most appropriate model from the other attached LLMs, and then routes the input to the selected model.\nThe selected model processes the input, and then returns the generated response."]}),"\n",(0,r.jsxs)(t.p,{children:["The following example flow has three ",(0,r.jsx)(t.strong,{children:"Language Model"})," components.\nOne is the judge LLM, and the other two are in the LLM pool for request routing.\nThe ",(0,r.jsx)(t.strong,{children:"Chat Input"})," and ",(0,r.jsx)(t.strong,{children:"Chat Output"})," components create a seamless chat interaction where you send a message and receive a response without any user awareness of the underlying routing."]}),"\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.jsx)(t.h3,{id:"llm-router-parameters",children:"LLM Router parameters"}),"\n",(0,r.jsx)(d.Ay,{}),"\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:(0,r.jsx)(t.code,{children:"models"})}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.strong,{children:"Language Models"})}),(0,r.jsxs)(t.td,{children:["Input parameter. Connect ",(0,r.jsx)(t.a,{href:"/data-types#languagemodel",children:(0,r.jsx)(t.code,{children:"LanguageModel"})})," output from multiple ",(0,r.jsxs)(t.a,{href:"/components-models",children:[(0,r.jsx)(t.strong,{children:"Language Model"})," components"]})," to create a pool of models. The ",(0,r.jsx)(t.code,{children:"judge_llm"})," selects models from this pool when routing requests. The first model you connect is the default model if there is a problem with model selection or routing."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"input_value"})}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.strong,{children:"Input"})}),(0,r.jsx)(t.td,{children:"Input parameter. The incoming query to be routed to the model selected by the judge LLM."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"judge_llm"})}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.strong,{children:"Judge LLM"})}),(0,r.jsxs)(t.td,{children:["Input parameter. Connect ",(0,r.jsx)(t.code,{children:"LanguageModel"})," output from ",(0,r.jsx)(t.em,{children:"one"})," ",(0,r.jsx)(t.strong,{children:"Language Model"})," component to serve as the judge LLM for request routing."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"optimization"})}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.strong,{children:"Optimization"})}),(0,r.jsxs)(t.td,{children:["Input parameter. Set a preferred characteristic for model selection by the judge LLM. The options are ",(0,r.jsx)(t.code,{children:"quality"})," (highest response quality), ",(0,r.jsx)(t.code,{children:"speed"})," (fastest response time), ",(0,r.jsx)(t.code,{children:"cost"})," (most cost-effective model), or ",(0,r.jsx)(t.code,{children:"balanced"})," (equal weight for quality, speed, and cost). Default: ",(0,r.jsx)(t.code,{children:"balanced"})]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"use_openrouter_specs"})}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.strong,{children:"Use OpenRouter Specs"})}),(0,r.jsx)(t.td,{children:"Input parameter. Whether to fetch model specifications from the OpenRouter API."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"If false, only the model name is provided to the judge LLM. Default: Enabled (true)"}),(0,r.jsx)(t.td,{}),(0,r.jsx)(t.td,{})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"timeout"})}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.strong,{children:"API Timeout"})}),(0,r.jsxs)(t.td,{children:["Input parameter. Set a timeout duration in seconds for API requests made by the router. Default: ",(0,r.jsx)(t.code,{children:"10"})]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"fallback_to_first"})}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.strong,{children:"Fallback to First Model"})}),(0,r.jsxs)(t.td,{children:["Input parameter. Whether to use the first LLM in ",(0,r.jsx)(t.code,{children:"models"})," as a backup if routing fails to reach the selected model. Default: Enabled (true)"]})]})]})]}),"\n",(0,r.jsx)(t.h3,{id:"llm-router-outputs",children:"LLM Router outputs"}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"LLM Router"})," component provides three output options.\nYou can set the desired output type near the component's output port."]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Output"}),": A ",(0,r.jsx)(t.code,{children:"Message"})," containing the response to the original query as generated by the selected LLM.\nUse this output for regular chat interactions."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Selected Model Info"}),": A ",(0,r.jsx)(t.code,{children:"Data"})," object containing information about the selected model, such as its name and version."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Routing Decision"}),": A ",(0,r.jsx)(t.code,{children:"Message"})," containing the judge model's reasoning for selecting a particular model, including input query length and number of models considered.\nFor example:"]}),"\n",(0,r.jsx)(u.Code,{codeConfig:j,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",(0,r.jsx)(t.p,{children:"This is useful for debugging if you feel the judge model isn't selecting the best model."}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"parser",children:"Parser"}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Parser"})," component extracts text from structured data (",(0,r.jsx)(t.code,{children:"DataFrame"})," or ",(0,r.jsx)(t.code,{children:"Data"}),") using a template or direct stringification.\nThe output is a ",(0,r.jsx)(t.code,{children:"Message"})," containing the parsed text."]}),"\n",(0,r.jsxs)(t.p,{children:["This is a versatile component for data extraction and manipulation in your flows.\nFor examples of ",(0,r.jsx)(t.strong,{children:"Parser"})," components in flows, see the following:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:(0,r.jsxs)(t.a,{href:"#batch-run",children:[(0,r.jsx)(t.strong,{children:"Batch Run"})," component example"]})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsxs)(t.a,{href:"#structured-output",children:[(0,r.jsx)(t.strong,{children:"Structured Output"})," component example"]})}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Financial Report Parser"})," template"]}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.a,{href:"/webhook",children:"Trigger flows with webhooks"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.a,{href:"/chat-with-rag",children:"Create a vector RAG chatbot"})}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"A flow that uses a Parser component to extract text from a Structured Output component.",src:n(96218).A+"",width:"4000",height:"2202"})}),"\n",(0,r.jsx)(t.h3,{id:"parsing-modes",children:"Parsing modes"}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Parser"})," component has two modes: ",(0,r.jsx)(t.strong,{children:"Parser"})," and ",(0,r.jsx)(t.strong,{children:"Stringify"}),"."]}),"\n",(0,r.jsxs)(c.A,{children:[(0,r.jsxs)(l.A,{value:"template",label:"Parser (template) mode",default:!0,children:[(0,r.jsxs)(t.p,{children:["In ",(0,r.jsx)(t.strong,{children:"Parser"})," mode, you create a template for text output that can include literal strings and variables for extracted keys."]}),(0,r.jsxs)(t.p,{children:["Use curly braces to define variables anywhere in the template.\nVariables must match keys in the ",(0,r.jsx)(t.code,{children:"DataFrame"})," or ",(0,r.jsx)(t.code,{children:"Data"})," input, such as column names.\nFor example, ",(0,r.jsx)(t.code,{children:"{name}"})," extracts the value of a ",(0,r.jsx)(t.code,{children:"name"})," key.\nFor more information about the content and structure of ",(0,r.jsx)(t.code,{children:"DataFrame"})," and ",(0,r.jsx)(t.code,{children:"Data"})," objects, see ",(0,r.jsx)(t.a,{href:"/data-types",children:"Langflow data types"}),"."]}),(0,r.jsxs)(t.p,{children:["When the flow runs, the ",(0,r.jsx)(t.strong,{children:"Parser"})," component iterates over the input, producing a ",(0,r.jsx)(t.code,{children:"Message"})," for each parsed item.\nFor example, parsing a ",(0,r.jsx)(t.code,{children:"DataFrame"})," creates a ",(0,r.jsx)(t.code,{children:"Message"})," for each row, populated with the unique values from that row."]}),(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Employee summary template"}),(0,r.jsx)(t.p,{children:"This example template extracts employee data into a natural language summary about an employee's hire date and current role:"}),(0,r.jsx)(u.Code,{codeConfig:j,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{employee_first_name} {employee_last_name} was hired on {start_date}.",props:{}}]},{tokens:[{content:"Their current position is {job_title} ({grade}).",props:{}}]}],lang:"text"},annotations:[]}]}),(0,r.jsxs)(t.p,{children:["The resulting ",(0,r.jsx)(t.code,{children:"Message"})," output replaces the variables with the corresponding extracted values.\nFor example:"]}),(0,r.jsx)(u.Code,{codeConfig:j,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Renlo Kai was hired on 11-July-2017.",props:{}}]},{tokens:[{content:"Their current position is Software Engineer (Principal).",props:{}}]}],lang:"text"},annotations:[]}]})]}),(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Employee profile template"}),(0,r.jsx)(t.p,{children:"This example template uses Markdown syntax and extracted employee data to create an employee profile:"}),(0,r.jsx)(u.Code,{codeConfig:j,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:[]}]}),(0,r.jsxs)(t.p,{children:["When the flow runs, the ",(0,r.jsx)(t.strong,{children:"Parser"})," component iterates over each row of the ",(0,r.jsx)(t.code,{children:"DataFrame"}),", populating the template's variables with the appropriate extracted values.\nThe resulting text for each row is output as a ",(0,r.jsx)(t.a,{href:"/data-types#message",children:(0,r.jsx)(t.code,{children:"Message"})}),"."]})]}),(0,r.jsxs)(t.p,{children:["The following parameters are available in ",(0,r.jsx)(t.strong,{children:"Parser"})," mode."]}),(0,r.jsx)(d.Ay,{}),(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:"Data or DataFrame"}),(0,r.jsxs)(t.td,{children:["Input parameter. The ",(0,r.jsx)(t.code,{children:"Data"})," or ",(0,r.jsx)(t.code,{children:"DataFrame"})," input to parse."]})]}),(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:["Input parameter. The formatting template using plaintext and variables for keys (",(0,r.jsx)(t.code,{children:"{KEY_NAME}"}),"). See the preceding examples for more information."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"sep"}),(0,r.jsx)(t.td,{children:"Separator"}),(0,r.jsxs)(t.td,{children:["Input parameter. A string defining the separator for rows or lines. Default: ",(0,r.jsx)(t.code,{children:"\\n"})," (new line)."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"clean_data"}),(0,r.jsx)(t.td,{children:"Clean Data"}),(0,r.jsxs)(t.td,{children:["Whether to remove empty rows and lines in each cell or key of the ",(0,r.jsx)(t.code,{children:"DataFrame"})," or ",(0,r.jsx)(t.code,{children:"Data"})," input. Default: Enabled (true)"]})]})]})]})]}),(0,r.jsxs)(l.A,{value:"stringify",label:"Stringify mode",children:[(0,r.jsxs)(t.p,{children:["Use ",(0,r.jsx)(t.strong,{children:"Stringify"})," mode to convert the entire input directly to text.\nThis mode doesn't support templates or key selection."]}),(0,r.jsxs)(t.p,{children:["The following parameters are available in ",(0,r.jsx)(t.strong,{children:"Stringify"})," mode."]}),(0,r.jsx)(d.Ay,{}),(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:"Data or DataFrame"}),(0,r.jsxs)(t.td,{children:["Input parameter. The ",(0,r.jsx)(t.code,{children:"Data"})," or ",(0,r.jsx)(t.code,{children:"DataFrame"})," input to parse."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"sep"}),(0,r.jsx)(t.td,{children:"Separator"}),(0,r.jsxs)(t.td,{children:["Input parameter. A string defining the separator for rows or lines. Default: ",(0,r.jsx)(t.code,{children:"\\n"})," (new line)."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"clean_data"}),(0,r.jsx)(t.td,{children:"Clean Data"}),(0,r.jsxs)(t.td,{children:["Whether to remove empty rows and lines in each cell or key of the ",(0,r.jsx)(t.code,{children:"DataFrame"})," or ",(0,r.jsx)(t.code,{children:"Data"})," input. Default: Enabled (true)"]})]})]})]})]})]}),"\n",(0,r.jsx)(t.h3,{id:"test-and-troubleshoot-parsed-text",children:"Test and troubleshoot parsed text"}),"\n",(0,r.jsxs)(t.p,{children:["To test the ",(0,r.jsx)(t.strong,{children:"Parser"})," component, click ",(0,r.jsx)(i.A,{name:"Play","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Run component"}),", and then click ",(0,r.jsx)(i.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Inspect output"})," to see the ",(0,r.jsx)(t.code,{children:"Message"})," output with the parsed text.\nYou can also connect a ",(0,r.jsx)(t.strong,{children:"Chat Output"})," component if you want to view the output in the ",(0,r.jsx)(t.strong,{children:"Playground"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["If the ",(0,r.jsx)(t.code,{children:"Message"})," output from the ",(0,r.jsx)(t.strong,{children:"Parser"})," component has empty or unexpected values, there might be a mapping error between the input and the parsing mode, the input has empty values, or the input isn't suitable for plaintext extraction."]}),"\n",(0,r.jsxs)(t.p,{children:["For example, assume you use the following template to parse a ",(0,r.jsx)(t.code,{children:"DataFrame"}),":"]}),"\n",(0,r.jsx)(u.Code,{codeConfig:j,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{employee_first_name} {employee_last_name} is a {job_title} ({grade}).",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(t.p,{children:["The following ",(0,r.jsx)(t.code,{children:"Message"})," could result from parsing a row where ",(0,r.jsx)(t.code,{children:"employee_first_name"})," was empty and ",(0,r.jsx)(t.code,{children:"grade"})," was ",(0,r.jsx)(t.code,{children:"null"}),":"]}),"\n",(0,r.jsx)(u.Code,{codeConfig:j,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:" Smith is a Software Engineer (null).",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsx)(t.p,{children:"To troubleshoot missing or unexpected values, you can do the following:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Make sure the variables in your template map to keys in the incoming ",(0,r.jsx)(t.code,{children:"Data"})," or ",(0,r.jsx)(t.code,{children:"DataFrame"}),".\nTo see the data being passed directly to the ",(0,r.jsx)(t.strong,{children:"Parser"})," component, click ",(0,r.jsx)(i.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Inspect output"})," on the component that is sending data to the ",(0,r.jsx)(t.strong,{children:"Parser"})," component."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsx)(t.p,{children:"Check the source data for missing or incorrect values.\nThere are several ways you can address these inconsistencies:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:"Rectify the source data directly."}),"\n",(0,r.jsxs)(t.li,{children:["Use other components to amend or filter anomalies before passing the data to the ",(0,r.jsx)(t.strong,{children:"Parser"})," component.\nThere are many components you can use for this depending on your goal, such as the ",(0,r.jsx)(t.strong,{children:"Data Operations"}),", ",(0,r.jsx)(t.strong,{children:"Structured Output"}),", and ",(0,r.jsx)(t.strong,{children:"Smart Function"})," components."]}),"\n",(0,r.jsxs)(t.li,{children:["Enable the ",(0,r.jsx)(t.strong,{children:"Parser"})," component's ",(0,r.jsx)(t.strong,{children:"Clean Data"})," parameter to skip empty rows or lines."]}),"\n"]}),"\n"]}),"\n"]}),"\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.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Python Interpreter"})," component can only import packages that are already installed in your Langflow environment.\nIf you encounter an ",(0,r.jsx)(t.code,{children:"ImportError"})," when trying to use a package, you need to install it first."]}),"\n",(0,r.jsxs)(t.p,{children:["To install custom packages, see ",(0,r.jsx)(t.a,{href:"/install-custom-dependencies",children:"Install custom dependencies"}),"."]}),"\n",(0,r.jsx)(t.h3,{id:"use-the-python-interpreter-in-a-flow",children:"Use the Python Interpreter in a flow"}),"\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:["Optional: Enable ",(0,r.jsx)(t.strong,{children:"Tool Mode"}),", and then connect the ",(0,r.jsx)(t.strong,{children:"Python Interpreter"})," component to an ",(0,r.jsx)(t.strong,{children:"Agent"})," component as a tool.\nFor example, connect a ",(0,r.jsx)(t.strong,{children:"Python Interpreter"})," component and a ",(0,r.jsxs)(t.a,{href:"/components-helpers#calculator",children:[(0,r.jsx)(t.strong,{children:"Calculator"})," component"]})," as tools for an ",(0,r.jsx)(t.strong,{children:"Agent"})," component, and then test how it chooses different tools to solve math problems.\n",(0,r.jsx)(t.img,{alt:"Python Interpreter and Calculator components connected to an Agent component",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)(u.Code,{codeConfig:j,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)(u.Code,{codeConfig:j,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)(u.Code,{codeConfig:j,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 ",(0,r.jsx)(t.strong,{children:"Python Interpreter"})," component in the ",(0,r.jsx)(t.strong,{children:"Global Imports"})," field."]}),"\n",(0,r.jsx)(t.h3,{id:"python-interpreter-parameters",children:"Python Interpreter parameters"}),"\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:"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:["Input parameter. 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:"Input parameter. The Python code to execute. Only modules specified in Global Imports can be used."})]}),(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:"Output parameter. 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:["The ",(0,r.jsx)(t.strong,{children:"Save File"})," component creates a file containing data produced by another component.\nSeveral file formats are supported, and you can store files in ",(0,r.jsx)(t.a,{href:"/memory",children:"Langflow storage"})," or the local file system."]}),"\n",(0,r.jsxs)(t.p,{children:["To configure the ",(0,r.jsx)(t.strong,{children:"Save File"})," component and use it 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 ",(0,r.jsx)(t.a,{href:"/data-types#dataframe",children:(0,r.jsx)(t.code,{children:"DataFrame"})}),", ",(0,r.jsx)(t.a,{href:"/data-types#data",children:(0,r.jsx)(t.code,{children:"Data"})}),", or ",(0,r.jsx)(t.a,{href:"/data-types#message",children:(0,r.jsx)(t.code,{children:"Message"})})," output from another component to the ",(0,r.jsx)(t.strong,{children:"Save File"})," component's ",(0,r.jsx)(t.strong,{children:"Input"})," port."]}),"\n",(0,r.jsxs)(t.p,{children:["You can connect the same output to multiple ",(0,r.jsx)(t.strong,{children:"Save File"})," components if you want to create multiple files, save the data in different file formats, or save files to multiple locations."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["In ",(0,r.jsx)(t.strong,{children:"File Name"}),", enter a file name and an optional path."]}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"File Name"})," parameter controls where the file is saved.\nIt can contain a file name or an entire file path:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Default location"}),": If you only provide a file name, then the file is stored in ",(0,r.jsx)(t.code,{children:".langflow/data"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Subdirectory"}),": To store files in subdirectories, add the path to the ",(0,r.jsx)(t.strong,{children:"File Name"})," parameter.\nFor example, ",(0,r.jsx)(t.code,{children:"subdirectory/my_file"})," creates ",(0,r.jsx)(t.code,{children:"my_file"})," in ",(0,r.jsx)(t.code,{children:".langflow/data/subdirectory"}),".\nIf a given subdirectory doesn't already exist, Langflow automatically creates it."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Absolute or relative path"}),": To store files elsewhere in your ",(0,r.jsx)(t.code,{children:".langflow"})," installation or the local file system, provide the absolute or relative path to the desired location.\nFor example, ",(0,r.jsx)(t.code,{children:"~/Desktop/my_file"})," saves ",(0,r.jsx)(t.code,{children:"my_file"})," to the desktop."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["Don't include an extension in the file name.\nIf you do, the extension is treated as part of the file name; it has no impact on the ",(0,r.jsx)(t.strong,{children:"File Format"})," parameter."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["In the ",(0,r.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),", click ",(0,r.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Controls"}),", select the desired file format, and then click ",(0,r.jsx)(t.strong,{children:"Close"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["The available ",(0,r.jsx)(t.strong,{children:"File Format"})," options depend on the input data type:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.code,{children:"DataFrame"})," can be saved to CSV (default), Excel (requires ",(0,r.jsx)(t.code,{children:"openpyxl"})," ",(0,r.jsx)(t.a,{href:"/install-custom-dependencies",children:"custom dependency"}),"), JSON (fallback default), or Markdown."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.code,{children:"Data"})," can be saved to CSV, Excel (requires ",(0,r.jsx)(t.code,{children:"openpyxl"})," ",(0,r.jsx)(t.a,{href:"/install-custom-dependencies",children:"custom dependency"}),"), JSON (default), or Markdown."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.code,{children:"Message"})," can be saved to TXT, JSON (default), or Markdown."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(t.admonition,{title:"Overwrites allowed",type:"important",children:(0,r.jsxs)(t.p,{children:["If you have multiple ",(0,r.jsx)(t.strong,{children:"Save File"})," components, in one or more flows, with the same file name, path, and extension, the file contains the data from the most recent run only.\nLangflow doesn't block overwrites if a matching file already exists.\nTo avoid unintended overwrites, use unique file names and paths."]})}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["To test the ",(0,r.jsx)(t.strong,{children:"Save File"})," component, click ",(0,r.jsx)(i.A,{name:"Play","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Run component"}),", and then click ",(0,r.jsx)(i.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Inspect output"})," to get the filepath where the file was saved."]}),"\n",(0,r.jsxs)(t.p,{children:["The component's literal output is a ",(0,r.jsx)(t.code,{children:"Message"})," containing the original data type, the file name and extension, and the absolute filepath to the file based on the ",(0,r.jsx)(t.strong,{children:"File Name"})," parameter.\nFor example:"]}),"\n",(0,r.jsx)(u.Code,{codeConfig:j,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"DataFrame saved successfully as 'my_file.csv' at /Users/user.name/.langflow/data/my_file.csv",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(t.p,{children:["If the ",(0,r.jsx)(t.strong,{children:"File Name"})," contains a subdirectory or other non-default path, this is reflected in the ",(0,r.jsx)(t.code,{children:"Message"})," output.\nFor example, a CSV file with the file name ",(0,r.jsx)(t.code,{children:"~/Desktop/my_file"})," could produce the following output:"]}),"\n",(0,r.jsx)(u.Code,{codeConfig:j,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"DataFrame saved successfully as '/Users/user.name/Desktop/my_file.csv' at /Users/user.name/Desktop/my_file.csv",props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsx)(t.p,{children:"Optional: If you want to use the saved file in a flow, you must use an API call or another component to retrieve the file from the given filepath."}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"smart-function",children:"Smart Function"}),"\n",(0,r.jsxs)(t.p,{children:["In Langflow version 1.5, this component was renamed from ",(0,r.jsx)(t.strong,{children:"Lambda Filter"})," to ",(0,r.jsx)(t.strong,{children:"Smart Function"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Smart Function"})," component uses an LLM to generate a Lambda function to filter or transform structured data based on natural language instructions.\nYou must connect this component to a ",(0,r.jsxs)(t.a,{href:"/components-models",children:[(0,r.jsx)(t.strong,{children:"Language Model"})," component"]}),", which is used to generate a function based on the natural language instructions you provide in the ",(0,r.jsx)(t.strong,{children:"Instructions"})," parameter.\nThe LLM runs the function against the data input, and then outputs the results as ",(0,r.jsx)(t.a,{href:"/data-types#data",children:(0,r.jsx)(t.code,{children:"Data"})}),"."]}),"\n",(0,r.jsxs)(t.admonition,{type:"tip",children:[(0,r.jsxs)(t.p,{children:["Provide brief, clear instructions, focusing on the desired outcome or specific actions, such as ",(0,r.jsx)(t.code,{children:"Filter the data to only include items where the 'status' is 'active'"}),".\nOne sentence or less is preferred because end punctuation, like periods, can cause errors or unexpected behavior."]}),(0,r.jsxs)(t.p,{children:["If you need to provide more details instructions that aren't directly relevant to the Lambda function, you can input them in the ",(0,r.jsx)(t.strong,{children:"Language Model"})," component's ",(0,r.jsx)(t.strong,{children:"Input"})," field or through a ",(0,r.jsx)(t.strong,{children:"Prompt Template"})," component."]})]}),"\n",(0,r.jsxs)(t.p,{children:["The following example uses the ",(0,r.jsx)(t.strong,{children:"API Request"})," endpoint to pass JSON data from the ",(0,r.jsx)(t.code,{children:"https://jsonplaceholder.typicode.com/users"})," endpoint to the ",(0,r.jsx)(t.strong,{children:"Smart Function"})," component.\nThen, the ",(0,r.jsx)(t.strong,{children:"Smart Function"})," component passes the data and the instruction ",(0,r.jsx)(t.code,{children:"extract emails"})," to the attached ",(0,r.jsx)(t.strong,{children:"Language Model"})," component.\nFrom there, the LLM generates a filter function that extracts email addresses from the JSON data, returning the filtered data as chat output."]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"A small flow using a Smart Function component to extract data from an API response.",src:n(66539).A+"",width:"4000",height:"1796"})}),"\n",(0,r.jsx)(t.h3,{id:"smart-function-parameters",children:"Smart Function parameters"}),"\n",(0,r.jsx)(d.Ay,{}),"\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:"data"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsx)(t.td,{children:"Input parameter. 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:["Input parameter. Connect ",(0,r.jsx)(t.a,{href:"/data-types#languagemodel",children:(0,r.jsx)(t.code,{children:"LanguageModel"})})," output from a ",(0,r.jsx)(t.strong,{children:"Language 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.jsx)(t.td,{children:"Input parameter. The natural language instructions for how to filter or transform the data. The LLM uses these instructions to create a Lambda function."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"sample_size"}),(0,r.jsx)(t.td,{children:"Sample Size"}),(0,r.jsxs)(t.td,{children:["Input parameter. For large datasets, the number of characters to sample from the dataset head and tail. Only applied if the dataset meets or exceeds ",(0,r.jsx)(t.code,{children:"max_size"}),". Default: ",(0,r.jsx)(t.code,{children:"1000"}),"."]})]}),(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:["Input parameter. The number of characters for the dataset to be considered large, which triggers sampling by the ",(0,r.jsx)(t.code,{children:"sample_size"})," value. Default: ",(0,r.jsx)(t.code,{children:"30000"}),"."]})]})]})]}),"\n",(0,r.jsx)(t.h2,{id:"split-text",children:"Split Text"}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Split Text"})," component splits data into chunks based on parameters like chunk size and separator.\nIt is often used to chunk data to be tokenized and embedded into vector databases.\nFor examples, see ",(0,r.jsx)(t.a,{href:"/components-vector-stores#use-vector-store-components-in-a-flow",children:"Use Vector Store components in a flow"}),", ",(0,r.jsx)(t.a,{href:"/components-embedding-models#use-embedding-model-components-in-a-flow",children:"Use Embedding Model components in a flow"}),", and ",(0,r.jsx)(t.a,{href:"/chat-with-rag",children:"Create a Vector RAG chatbot"}),"."]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"An embedding generation flow that uses a Split Text component to chunk data.",src:n(49823).A+"",width:"4000",height:"2766"})}),"\n",(0,r.jsxs)(t.p,{children:["The component accepts ",(0,r.jsx)(t.code,{children:"Message"}),", ",(0,r.jsx)(t.code,{children:"Data"}),", or ",(0,r.jsx)(t.code,{children:"DataFrame"}),", and then outputs either ",(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 ",(0,r.jsx)(t.a,{href:"/data-types#data",children:(0,r.jsx)(t.code,{children:"Data"})})," objects containing individual text chunks.\nThe ",(0,r.jsx)(t.strong,{children:"DataFrame"})," output returns the list of chunks as a structured ",(0,r.jsx)(t.a,{href:"/data-types#dataframe",children:(0,r.jsx)(t.code,{children:"DataFrame"})})," with additional ",(0,r.jsx)(t.code,{children:"text"})," and ",(0,r.jsx)(t.code,{children:"metadata"})," columns."]}),"\n",(0,r.jsx)(t.h3,{id:"split-text-parameters",children:"Split Text parameters"}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Split Text"})," component's parameters control how the text is split into chunks, specifically the ",(0,r.jsx)(t.code,{children:"chunk_size"}),", ",(0,r.jsx)(t.code,{children:"chunk_overlap"}),", and ",(0,r.jsx)(t.code,{children:"separator"})," parameters."]}),"\n",(0,r.jsxs)(t.p,{children:["To test the chunking behavior, add a ",(0,r.jsx)(t.strong,{children:"Text Input"})," or ",(0,r.jsx)(t.strong,{children:"File"})," component with some sample data to chunk, click ",(0,r.jsx)(i.A,{name:"Play","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Run component"})," on the ",(0,r.jsx)(t.strong,{children:"Split Text"})," component, and then click ",(0,r.jsx)(i.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Inspect output"})," to view the list of chunks and their metadata. The ",(0,r.jsx)(t.strong,{children:"text"})," column contains the actual text chunks created from your chunking settings.\nIf the chunks aren't split as you expect, adjust the parameters, rerun the component, and then inspect the new output."]}),"\n",(0,r.jsx)(d.Ay,{}),"\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:"data_inputs"}),(0,r.jsx)(t.td,{children:"Input"}),(0,r.jsxs)(t.td,{children:["Input parameter. The data to split. Input must be in ",(0,r.jsx)(t.code,{children:"Message"}),", ",(0,r.jsx)(t.code,{children:"Data"}),", or ",(0,r.jsx)(t.code,{children:"DataFrame"})," format."]})]}),(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:["Input parameter. The number of characters to overlap between chunks. This helps maintain context across chunks. When a separator is encountered, the overlap is applied at the point of the separator so that the subsequent chunk contains the last ",(0,r.jsx)(t.em,{children:"n"})," characters of the preceding chunk. 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:["Input parameter. The target length for each chunk after splitting. The data is first split by separator, and then chunks smaller than the ",(0,r.jsx)(t.code,{children:"chunk_size"})," are merged up to this limit. However, if the initial separator split produces any chunks larger than the ",(0,r.jsx)(t.code,{children:"chunk_size"}),", those chunks are neither further subdivided nor combined with any smaller chunks; these chunks will be output as-is even though they exceed the ",(0,r.jsx)(t.code,{children:"chunk_size"}),". Default: ",(0,r.jsx)(t.code,{children:"1000"}),". See ",(0,r.jsx)(t.a,{href:"#chunk-size",children:"Tokenization errors due to chunk size"})," for important considerations."]})]}),(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:["Input parameter. A string defining a character to split on, such as ",(0,r.jsx)(t.code,{children:"\\n"})," to split on new line characters, ",(0,r.jsx)(t.code,{children:"\\n\\n"})," to split at paragraph breaks, or ",(0,r.jsx)(t.code,{children:"},"})," to split at the end of JSON objects. You can directly provide the separator string, or pass a separator string from another component as ",(0,r.jsx)(t.code,{children:"Message"})," input."]})]}),(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:["Input parameter. The key to use for the text column that is extracted from the input and then split. Default: ",(0,r.jsx)(t.code,{children:"text"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"keep_separator"}),(0,r.jsx)(t.td,{children:"Keep Separator"}),(0,r.jsxs)(t.td,{children:["Input parameter. Select how to handle separators in output chunks. If False, separators are omitted from output chunks. Options include ",(0,r.jsx)(t.code,{children:"False"})," (remove separators), ",(0,r.jsx)(t.code,{children:"True"})," (keep separators in chunks without preference for placement), ",(0,r.jsx)(t.code,{children:"Start"})," (place separators at the beginning of chunks), or ",(0,r.jsx)(t.code,{children:"End"})," (place separators at the end of chunks). Default: ",(0,r.jsx)(t.code,{children:"False"}),"."]})]})]})]}),"\n",(0,r.jsx)(t.h3,{id:"chunk-size",children:"Tokenization errors due to chunk size"}),"\n",(0,r.jsxs)(t.p,{children:["When using ",(0,r.jsx)(t.strong,{children:"Split Text"})," with embedding models (especially NVIDIA models like ",(0,r.jsx)(t.code,{children:"nvidia/nv-embed-v1"}),"), you may need to use smaller chunk sizes (",(0,r.jsx)(t.code,{children:"500"})," or less) even though the model supports larger token limits.\nThe ",(0,r.jsx)(t.strong,{children:"Split Text"})," component doesn't always enforce the exact chunk size you set, and individual chunks may exceed your specified limit.\nIf you encounter tokenization errors, modify your text splitting strategy by reducing the chunk size, changing the overlap length, or using a more common separator.\nThen, test your configuration by running the flow and inspecting the component's output."]}),"\n",(0,r.jsx)(t.h3,{id:"other-text-splitters",children:"Other text splitters"}),"\n",(0,r.jsxs)(t.p,{children:["See ",(0,r.jsx)(t.a,{href:"/bundles-langchain#text-splitters",children:"LangChain text splitter components"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"structured-output",children:"Structured Output"}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component uses an LLM to transform any input into structured data (",(0,r.jsx)(t.code,{children:"Data"})," or ",(0,r.jsx)(t.code,{children:"DataFrame"}),") using natural language formatting instructions and an output schema definition.\nFor example, you can extract specific details from documents, like email messages or scientific papers."]}),"\n",(0,r.jsx)(t.h3,{id:"use-the-structured-output-component-in-a-flow",children:"Use the Structured Output component in a flow"}),"\n",(0,r.jsxs)(t.p,{children:["To use the ",(0,r.jsx)(t.strong,{children:"Structured Output"})," 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:["Provide an ",(0,r.jsx)(t.strong,{children:"Input Message"}),", which is the source material from which you want to extract structured data.\nThis can come from practically any component, but it is typically a ",(0,r.jsx)(t.strong,{children:"Chat Input"}),", ",(0,r.jsx)(t.strong,{children:"File"}),", or other component that provides some unstructured or semi-structured input."]}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsxs)(t.p,{children:["Not all source material has to become structured output.\nThe power of the ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component is that you can specify the information you want to extract, even if that data isn't explicitly labeled or an exact keyword match.\nThen, the LLM can use your instructions to analyze the source material, extract the relevant data, and format it according to your specifications.\nAny irrelevant source material isn't included in the structured output."]})}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Define ",(0,r.jsx)(t.strong,{children:"Format Instructions"})," and an ",(0,r.jsx)(t.strong,{children:"Output Schema"})," to specify the data to extract from the source material and how to structure it in the final ",(0,r.jsx)(t.code,{children:"Data"})," or ",(0,r.jsx)(t.code,{children:"DataFrame"})," output."]}),"\n",(0,r.jsx)(t.p,{children:"The instructions are a prompt that tell the LLM what data to extract, how to format it, how to handle exceptions, and any other instructions relevant to preparing the structured data."}),"\n",(0,r.jsxs)(t.p,{children:["The schema is a table that defines the fields (keys) and data types to organize the data extracted by the LLM into a structured ",(0,r.jsx)(t.code,{children:"Data"})," or ",(0,r.jsx)(t.code,{children:"DataFrame"})," object.\nFor more information, see ",(0,r.jsx)(t.a,{href:"#output-schema-options",children:"Output Schema options"})]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Attach a ",(0,r.jsxs)(t.a,{href:"/components-models",children:[(0,r.jsx)(t.strong,{children:"Language Model"})," component"]})," that is set to emit ",(0,r.jsx)(t.a,{href:"/data-types#languagemodel",children:(0,r.jsx)(t.code,{children:"LanguageModel"})})," output."]}),"\n",(0,r.jsxs)(t.p,{children:["The LLM uses the ",(0,r.jsx)(t.strong,{children:"Input Message"})," and ",(0,r.jsx)(t.strong,{children:"Format Instructions"})," from the ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component to extract specific pieces of data from the input text.\nThe output schema is applied to the model's response to produce the final ",(0,r.jsx)(t.code,{children:"Data"})," or ",(0,r.jsx)(t.code,{children:"DataFrame"})," structured object."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Optional: Typically, the structured output is passed to downstream components that use the extracted data for other processes, such as the ",(0,r.jsx)(t.strong,{children:"Parser"})," or ",(0,r.jsx)(t.strong,{children:"Data Operations"})," components."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"A basic flow with Structured Output, Language Model, Type Convert, and Chat Input and Output components.",src:n(82798).A+"",width:"4000",height:"1724"})}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Structured Output example: Financial Report Parser template"}),(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Financial Report Parser"})," template provides an example of how the ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component can be used to extract structured data from unstructured text."]}),(0,r.jsxs)(t.p,{children:["The template's ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component has the following configuration:"]}),(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Input Message"})," comes from a ",(0,r.jsx)(t.strong,{children:"Chat Input"})," component that is preloaded with quotes from sample financial reports"]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Format Instructions"})," are as follows:"]}),"\n",(0,r.jsx)(u.Code,{codeConfig:j,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"You are an AI that extracts structured JSON objects from unstructured text.",props:{}}]},{tokens:[{content:"Use a predefined schema with expected types (str, int, float, bool, dict).",props:{}}]},{tokens:[{content:"Extract ALL relevant instances that match the schema - if multiple patterns exist, capture them all.",props:{}}]},{tokens:[{content:"Fill missing or ambiguous values with defaults: null for missing values.",props:{}}]},{tokens:[{content:"Remove exact duplicates but keep variations that have different field values.",props:{}}]},{tokens:[{content:"Always return valid JSON in the expected format, never throw errors.",props:{}}]},{tokens:[{content:"If multiple objects can be extracted, return them all in the structured format.",props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Output Schema"})," includes keys for ",(0,r.jsx)(t.code,{children:"EBITDA"}),", ",(0,r.jsx)(t.code,{children:"NET_INCOME"}),", and ",(0,r.jsx)(t.code,{children:"GROSS_PROFIT"}),"."]}),"\n"]}),"\n"]}),(0,r.jsxs)(t.p,{children:["The structured ",(0,r.jsx)(t.code,{children:"Data"})," object is passed to a ",(0,r.jsx)(t.strong,{children:"Parser"})," component that produces a text string by mapping the schema keys to variables in the parsing template:"]}),(0,r.jsx)(u.Code,{codeConfig:j,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:[]}]}),(0,r.jsxs)(t.p,{children:["When printed to the ",(0,r.jsx)(t.strong,{children:"Playground"}),", the resulting ",(0,r.jsx)(t.code,{children:"Message"})," replaces the variables with the actual values extracted by the ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component. For example:"]}),(0,r.jsx)(u.Code,{codeConfig:j,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,r.jsx)(t.h3,{id:"structured-output-parameters",children:"Structured Output parameters"}),"\n",(0,r.jsx)(d.Ay,{}),"\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:"Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsxs)(t.td,{children:["Language Model (",(0,r.jsx)(t.code,{children:"llm"}),")"]}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"LanguageModel"})}),(0,r.jsxs)(t.td,{children:["Input parameter. The ",(0,r.jsx)(t.a,{href:"/data-types#languagemodel",children:(0,r.jsx)(t.code,{children:"LanguageModel"})})," output from a ",(0,r.jsx)(t.strong,{children:"Language Model"})," component that defines the LLM to use to analyze, extract, and prepare the structured output."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsxs)(t.td,{children:["Input Message (",(0,r.jsx)(t.code,{children:"input_value"}),")"]}),(0,r.jsx)(t.td,{children:"String"}),(0,r.jsx)(t.td,{children:"Input parameter. The input message containing source material for extraction."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsxs)(t.td,{children:["Format Instructions (",(0,r.jsx)(t.code,{children:"system_prompt"}),")"]}),(0,r.jsx)(t.td,{children:"String"}),(0,r.jsx)(t.td,{children:"Input parameter. The instructions to the language model for extracting and formatting the output."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsxs)(t.td,{children:["Schema Name (",(0,r.jsx)(t.code,{children:"schema_name"}),")"]}),(0,r.jsx)(t.td,{children:"String"}),(0,r.jsxs)(t.td,{children:["Input parameter. An optional title for the ",(0,r.jsx)(t.strong,{children:"Output Schema"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsxs)(t.td,{children:["Output Schema (",(0,r.jsx)(t.code,{children:"output_schema"}),")"]}),(0,r.jsx)(t.td,{children:"Table"}),(0,r.jsxs)(t.td,{children:["Input parameter. A table describing the schema of the desired structured output, ultimately determining the content of the ",(0,r.jsx)(t.code,{children:"Data"})," or ",(0,r.jsx)(t.code,{children:"DataFrame"})," output. See ",(0,r.jsx)(t.a,{href:"#output-schema-options",children:"Output Schema options"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsxs)(t.td,{children:["Structured Output (",(0,r.jsx)(t.code,{children:"structured_output"}),")"]}),(0,r.jsxs)(t.td,{children:[(0,r.jsx)(t.code,{children:"Data"})," or ",(0,r.jsx)(t.code,{children:"DataFrame"})]}),(0,r.jsxs)(t.td,{children:["Output parameter. The final structured output produced by the component. Near the component's output port, you can select the output data type as either ",(0,r.jsx)(t.strong,{children:"Structured Output Data"})," or ",(0,r.jsx)(t.strong,{children:"Structured Output DataFrame"}),". The specific content and structure of the output depends on the input parameters."]})]})]})]}),"\n",(0,r.jsx)(t.h4,{id:"output-schema-options",children:"Output Schema options"}),"\n",(0,r.jsxs)(t.p,{children:["After the LLM extracts the relevant data from the ",(0,r.jsx)(t.strong,{children:"Input Message"})," and ",(0,r.jsx)(t.strong,{children:"Format Instructions"}),", the data is organized according to the ",(0,r.jsx)(t.strong,{children:"Output Schema"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["The schema is a table that defines the fields (keys) and data types for the final ",(0,r.jsx)(t.code,{children:"Data"})," or ",(0,r.jsx)(t.code,{children:"DataFrame"})," output from the ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component."]}),"\n",(0,r.jsxs)(t.p,{children:["The default schema is a single ",(0,r.jsx)(t.code,{children:"field"})," string."]}),"\n",(0,r.jsxs)(t.p,{children:["To add a key to the schema, click ",(0,r.jsx)(i.A,{name:"Plus","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Add a new row"}),", and then edit each column to define the schema:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Name"}),": The name of the output field. Typically a specific key for which you want to extract a value."]}),"\n",(0,r.jsxs)(t.p,{children:["You can reference these keys as variables in downstream components, such as a ",(0,r.jsx)(t.strong,{children:"Parser"})," component's template.\nFor example, the schema key ",(0,r.jsx)(t.code,{children:"NET_INCOME"})," could be referenced by the variable ",(0,r.jsx)(t.code,{children:"{NET_INCOME}"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Description"}),": An optional metadata description of the field's contents and purpose."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Type"}),": The data type of the value stored in the field.\nSupported types are ",(0,r.jsx)(t.code,{children:"str"})," (default), ",(0,r.jsx)(t.code,{children:"int"}),", ",(0,r.jsx)(t.code,{children:"float"}),", ",(0,r.jsx)(t.code,{children:"bool"}),", and ",(0,r.jsx)(t.code,{children:"dict"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"As List"}),": Enable this setting if you want the field to contain a list of values rather than a single value."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["For simple schemas, you might only extract a few ",(0,r.jsx)(t.code,{children:"string"})," or ",(0,r.jsx)(t.code,{children:"int"})," fields.\nFor more complex schemas with lists and dictionaries, it might help to refer to the ",(0,r.jsx)(t.code,{children:"Data"})," and ",(0,r.jsx)(t.code,{children:"DataFrame"})," structures and attributes, as described in ",(0,r.jsx)(t.a,{href:"/data-types",children:"Langflow data types"}),".\nYou can also emit a rough ",(0,r.jsx)(t.code,{children:"Data"})," or ",(0,r.jsx)(t.code,{children:"DataFrame"}),", and then use downstream components for further refinement, such as a ",(0,r.jsx)(t.strong,{children:"Data Operations"})," component."]}),"\n",(0,r.jsx)(t.h2,{id:"type-convert",children:"Type Convert"}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Type Convert"})," component converts data from one type to another.\nIt supports ",(0,r.jsx)(t.code,{children:"Data"}),", ",(0,r.jsx)(t.code,{children:"DataFrame"}),", and ",(0,r.jsx)(t.code,{children:"Message"})," data types."]}),"\n",(0,r.jsxs)(c.A,{children:[(0,r.jsxs)(l.A,{value:"data",label:"Data",default:!0,children:[(0,r.jsxs)(t.p,{children:["A ",(0,r.jsx)(t.code,{children:"Data"})," object is a structured object that contains a primary ",(0,r.jsx)(t.code,{children:"text"})," key and other key-value pairs:"]}),(0,r.jsx)(u.Code,{codeConfig:j,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:'"data"',props:{style:{color:"#A5D6FF"}}},{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"}}}]}],lang:"json"},annotations:[]}]}),(0,r.jsxs)(t.p,{children:["The larger context associated with a component's ",(0,r.jsx)(t.code,{children:"data"})," dictionary also identifies which key is the primary ",(0,r.jsx)(t.code,{children:"text_key"}),", and it can provide an optional default value if the primary key isn't specified.\nFor example:"]}),(0,r.jsx)(u.Code,{codeConfig:j,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:[]}]})]}),(0,r.jsxs)(l.A,{value:"dataframe",label:"DataFrame",children:[(0,r.jsxs)(t.p,{children:["A ",(0,r.jsx)(t.code,{children:"DataFrame"})," is an array that represents a tabular data structure with rows and columns."]}),(0,r.jsxs)(t.p,{children:["It consists of a list (array) of dictionary objects, where each dictionary represents a row.\nEach key in the dictionaries corresponds to a column name.\nFor example, the following ",(0,r.jsx)(t.code,{children:"DataFrame"})," contains two rows with columns for ",(0,r.jsx)(t.code,{children:"name"}),", ",(0,r.jsx)(t.code,{children:"age"}),", and ",(0,r.jsx)(t.code,{children:"email"}),":"]}),(0,r.jsx)(u.Code,{codeConfig:j,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:'"Bobby Othername"',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:'"bobby.othername@example.com"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),(0,r.jsx)(l.A,{value:"message",label:"Message",children:(0,r.jsxs)(t.p,{children:["A ",(0,r.jsx)(t.code,{children:"Message"})," is primarily for passing a ",(0,r.jsx)(t.code,{children:"text"})," string, such as",(0,r.jsx)(t.code,{children:'"Name: Charlie Lastname, Age: 28, Email: charlie.lastname@example.com"'}),".\nHowever, the entire ",(0,r.jsx)(t.code,{children:"Message"})," object can include metadata about the message, particularly when used as chat input or output."]})})]}),"\n",(0,r.jsxs)(t.p,{children:["For more information, see ",(0,r.jsx)(t.a,{href:"/data-types",children:"Langflow data types"}),"."]}),"\n",(0,r.jsx)(t.h3,{id:"use-the-type-convert-component-in-a-flow",children:"Use the Type Convert component in a flow"}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Type Convert"})," component is typically used to transform data into a format required by a downstream component.\nFor example, if a component outputs a ",(0,r.jsx)(t.code,{children:"Message"}),", but the following component requires ",(0,r.jsx)(t.code,{children:"Data"}),", then you can use the ",(0,r.jsx)(t.strong,{children:"Type Convert"})," component to reformat the ",(0,r.jsx)(t.code,{children:"Message"})," as ",(0,r.jsx)(t.code,{children:"Data"})," before passing it to the downstream component."]}),"\n",(0,r.jsxs)(t.p,{children:["The following example uses the ",(0,r.jsx)(t.strong,{children:"Type Convert"})," component to convert the ",(0,r.jsx)(t.code,{children:"DataFrame"})," output from a ",(0,r.jsx)(t.strong,{children:"Web Search"})," component into ",(0,r.jsx)(t.code,{children:"Message"})," data that is passed as text input for an LLM:"]}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Create a flow based on the ",(0,r.jsx)(t.strong,{children:"Basic prompting"})," template."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Add a ",(0,r.jsx)(t.strong,{children:"Web Search"})," component to the flow, and then enter a search query, such as ",(0,r.jsx)(t.code,{children:"environmental news"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["In the ",(0,r.jsx)(t.strong,{children:"Prompt Template"})," component, replace the contents of the ",(0,r.jsx)(t.strong,{children:"Template"})," field with the following text:"]}),"\n",(0,r.jsx)(u.Code,{codeConfig:j,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Answer the user's question using the {context}",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(t.p,{children:["The curly braces define a ",(0,r.jsx)(t.a,{href:"/components-prompts#define-variables-in-prompts",children:"prompt variable"})," that becomes an input field on the ",(0,r.jsx)(t.strong,{children:"Prompt Template"})," component.\nIn this example, you will use the ",(0,r.jsx)(t.strong,{children:"context"})," field to pass the search results into the template, as explained in the next steps."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Add a ",(0,r.jsx)(t.strong,{children:"Type Convert"})," component to the flow, and then set the ",(0,r.jsx)(t.strong,{children:"Output Type"})," to ",(0,r.jsx)(t.strong,{children:"Message"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["Because the ",(0,r.jsx)(t.strong,{children:"Web Search"})," component's ",(0,r.jsx)(t.code,{children:"DataFrame"})," output is incompatible with the ",(0,r.jsx)(t.strong,{children:"context"})," variable's ",(0,r.jsx)(t.code,{children:"Message"})," input, you must use the ",(0,r.jsx)(t.strong,{children:"Type Convert"})," component to change the ",(0,r.jsx)(t.code,{children:"DataFrame"})," to a ",(0,r.jsx)(t.code,{children:"Message"})," in order to pass the search results to the ",(0,r.jsx)(t.strong,{children:"Prompt Template"})," component."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsx)(t.p,{children:"Connect the additional components to the rest of the flow:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["Connect the ",(0,r.jsx)(t.strong,{children:"Web Search"})," component's output to the ",(0,r.jsx)(t.strong,{children:"Type Convert"})," component's input."]}),"\n",(0,r.jsxs)(t.li,{children:["Connect the ",(0,r.jsx)(t.strong,{children:"Type Convert"})," component's output to the ",(0,r.jsx)(t.strong,{children:"Prompt Template"})," component's ",(0,r.jsx)(t.strong,{children:"context"})," input."]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"Convert web search output to text input",src:n(42547).A+"",width:"4000",height:"1826"})}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["In the ",(0,r.jsx)(t.strong,{children:"Language Model"})," component, add your OpenAI API key."]}),"\n",(0,r.jsxs)(t.p,{children:["If you want to use a different provider or model, edit the ",(0,r.jsx)(t.strong,{children:"Model Provider"}),", ",(0,r.jsx)(t.strong,{children:"Model Name"}),", and ",(0,r.jsx)(t.strong,{children:"API Key"})," fields accordingly."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Click ",(0,r.jsx)(t.strong,{children:"Playground"}),", and then ask something relevant to your search query, such as ",(0,r.jsx)(t.code,{children:"latest news"})," or ",(0,r.jsx)(t.code,{children:"what's the latest research on the environment?"}),"."]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Result"}),(0,r.jsx)(t.p,{children:"The LLM uses the search results context, your chat message, and it's built-in training data to respond to your question.\nFor example:"}),(0,r.jsx)(u.Code,{codeConfig:j,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{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"]}),"\n"]}),"\n",(0,r.jsx)(t.h3,{id:"type-convert-parameters",children:"Type Convert parameters"}),"\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:"input_data"}),(0,r.jsx)(t.td,{children:"Input Data"}),(0,r.jsxs)(t.td,{children:["Input parameter. The data to convert. Accepts ",(0,r.jsx)(t.code,{children:"Data"}),", ",(0,r.jsx)(t.code,{children:"DataFrame"}),", or ",(0,r.jsx)(t.code,{children:"Message"})," input."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"output_type"}),(0,r.jsx)(t.td,{children:"Output Type"}),(0,r.jsxs)(t.td,{children:["Input parameter. The desired output type, as one of ",(0,r.jsx)(t.strong,{children:"Data"}),", ",(0,r.jsx)(t.strong,{children:"DataFrame"})," or ",(0,r.jsx)(t.strong,{children:"Message"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"output"}),(0,r.jsx)(t.td,{children:"Output"}),(0,r.jsxs)(t.td,{children:["Output parameter. The converted data in the specified format. The output port changes depending on the selected ",(0,r.jsx)(t.strong,{children:"Output Type"}),"."]})]})]})]}),"\n",(0,r.jsx)(t.h2,{id:"legacy-processing-components",children:"Legacy Processing components"}),"\n",(0,r.jsxs)(t.p,{children:["The following ",(0,r.jsx)(t.strong,{children:"Processing"})," components are legacy components.\nYou can still use them in your flows, but they are no longer supported and can be removed in a future release."]}),"\n",(0,r.jsx)(t.p,{children:"Replace these components with suggested alternatives as soon as possible."}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Alter Metadata"}),(0,r.jsxs)(t.p,{children:["Replace this legacy component with the ",(0,r.jsxs)(t.a,{href:"#data-operations",children:[(0,r.jsx)(t.strong,{children:"Data Operations"})," component"]}),"."]}),(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.code,{children:"Message"})," and ",(0,r.jsx)(t.code,{children:"Data"})," objects, and can also create a new ",(0,r.jsx)(t.code,{children:"Data"})," object from user-provided text."]}),(0,r.jsx)(t.p,{children:"It accepts the following parameters:"}),(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:"Input parameter. 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:["Input parameter. Text input; the value is contained in the 'text' attribute of the ",(0,r.jsx)(t.code,{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:"Input parameter. 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:"Input parameter. Metadata fields to remove."})]}),(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:"Output parameter. List of Input objects, each with added metadata."})]})]})]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Combine Data/Merge Data"}),(0,r.jsxs)(t.p,{children:["Replace this legacy component with the ",(0,r.jsxs)(t.a,{href:"#data-operations",children:[(0,r.jsx)(t.strong,{children:"Data Operations"})," component"]})," or the ",(0,r.jsxs)(t.a,{href:"/components-logic#loop",children:[(0,r.jsx)(t.strong,{children:"Loop"})," component"]}),"."]}),(0,r.jsxs)(t.p,{children:["This component combines multiple data sources into a single unified ",(0,r.jsx)(t.code,{children:"Data"})," object."]}),(0,r.jsxs)(t.p,{children:["The component iterates through a list of ",(0,r.jsx)(t.code,{children:"Data"})," objects, merging them into a single ",(0,r.jsx)(t.code,{children:"Data"})," object (",(0,r.jsx)(t.code,{children:"merged_data"}),").\nIf the input list is empty, it returns an empty data object.\nIf there's only one input data object, it returns that object unchanged."]}),(0,r.jsx)(t.p,{children:"The merging process uses the addition operator to combine data objects."})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Combine Text"}),(0,r.jsxs)(t.p,{children:["Replace this legacy component with the ",(0,r.jsxs)(t.a,{href:"#data-operations",children:[(0,r.jsx)(t.strong,{children:"Data Operations"})," component"]}),"."]}),(0,r.jsxs)(t.p,{children:["This component concatenates two text inputs into a single text chunk using a specified delimiter, outputting a ",(0,r.jsx)(t.code,{children:"Message"})," object with the combined text."]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Create Data"}),(0,r.jsxs)(t.p,{children:["Replace this legacy component with the ",(0,r.jsxs)(t.a,{href:"#data-operations",children:[(0,r.jsx)(t.strong,{children:"Data Operations"})," component"]}),"."]}),(0,r.jsxs)(t.p,{children:["This component dynamically creates a ",(0,r.jsx)(t.code,{children:"Data"})," object with a specified number of fields and a text key."]}),(0,r.jsx)(t.p,{children:"It accepts the following parameters:"}),(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:"Input parameter. 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:"Input parameter. 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:["Input parameter. 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"}),"."]})]})]})]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Extract Key"}),(0,r.jsxs)(t.p,{children:["Replace this legacy component with the ",(0,r.jsxs)(t.a,{href:"#data-operations",children:[(0,r.jsx)(t.strong,{children:"Data Operations"})," component"]}),"."]}),(0,r.jsxs)(t.p,{children:["This component extracts a specific key from a ",(0,r.jsx)(t.code,{children:"Data"})," object and returns the value associated with that key."]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Data to DataFrame/Data to Message"}),(0,r.jsxs)(t.p,{children:["Replace these legacy components with newer ",(0,r.jsx)(t.strong,{children:"Processing"})," components, such as the ",(0,r.jsxs)(t.a,{href:"#data-operations",children:[(0,r.jsx)(t.strong,{children:"Data Operations"})," component"]})," and ",(0,r.jsxs)(t.a,{href:"#type-convert",children:[(0,r.jsx)(t.strong,{children:"Type Convert"})," component"]}),"."]}),(0,r.jsxs)(t.p,{children:["These components converted one or more ",(0,r.jsx)(t.code,{children:"Data"})," objects into a ",(0,r.jsx)(t.code,{children:"DataFrame"})," or ",(0,r.jsx)(t.code,{children:"Message"})," object."]}),(0,r.jsxs)(t.p,{children:["For the ",(0,r.jsx)(t.strong,{children:"Data to DataFrame"})," component, each ",(0,r.jsx)(t.code,{children:"Data"})," object corresponds to one row in the resulting ",(0,r.jsx)(t.code,{children:"DataFrame"}),".\nFields 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 ",(0,r.jsx)(t.code,{children:"text"})," column."]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Filter Data"}),(0,r.jsxs)(t.p,{children:["Replace this legacy component with the ",(0,r.jsxs)(t.a,{href:"#data-operations",children:[(0,r.jsx)(t.strong,{children:"Data Operations"})," component"]}),"."]}),(0,r.jsxs)(t.p,{children:["This component filters a ",(0,r.jsx)(t.code,{children:"Data"})," object based on a list of keys (",(0,r.jsx)(t.code,{children:"filter_criteria"}),"), returning a new ",(0,r.jsx)(t.code,{children:"Data"})," object (",(0,r.jsx)(t.code,{children:"filtered_data"}),") that contains only the key-value pairs that match the filter criteria."]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Filter Values"}),(0,r.jsxs)(t.p,{children:["Replace this legacy component with the ",(0,r.jsxs)(t.a,{href:"#data-operations",children:[(0,r.jsx)(t.strong,{children:"Data Operations"})," component"]}),"."]}),(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."}),(0,r.jsx)(t.p,{children:"It accepts the following parameters:"}),(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:"Input parameter. 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:"Input parameter. 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:"Input parameter. 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:"Input parameter. The operator to apply for comparing the values."})]}),(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:"Output parameter. The resulting list of filtered data items."})]})]})]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"JSON Cleaner"}),(0,r.jsxs)(t.p,{children:["Replace this legacy component with the ",(0,r.jsxs)(t.a,{href:"#parser",children:[(0,r.jsx)(t.strong,{children:"Parser"})," component"]}),"."]}),(0,r.jsx)(t.p,{children:"This component cleans JSON strings to ensure they are fully compliant with the JSON specification."}),(0,r.jsx)(t.p,{children:"It accepts the following parameters:"}),(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:"Input parameter. 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:"Input parameter. 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:"Input parameter. 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:"Input parameter. 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.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:"Output parameter. The resulting cleaned, repaired, and validated JSON string that fully complies with the JSON specification."})]})]})]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Message to Data"}),(0,r.jsxs)(t.p,{children:["Replace this legacy component with the ",(0,r.jsxs)(t.a,{href:"#type-convert",children:[(0,r.jsx)(t.strong,{children:"Type Convert"})," component"]}),"."]}),(0,r.jsxs)(t.p,{children:["This component converts ",(0,r.jsx)(t.code,{children:"Message"})," objects to ",(0,r.jsx)(t.code,{children:"Data"})," objects."]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parse DataFrame"}),(0,r.jsxs)(t.p,{children:["Replace this legacy component with the ",(0,r.jsxs)(t.a,{href:"#dataframe-operations",children:[(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component"]})," or ",(0,r.jsxs)(t.a,{href:"#parser",children:[(0,r.jsx)(t.strong,{children:"Parser"})," component"]}),"."]}),(0,r.jsxs)(t.p,{children:["This component converts ",(0,r.jsx)(t.code,{children:"DataFrame"})," objects into plain text using templates."]}),(0,r.jsx)(t.p,{children:"It accepts the following parameters:"}),(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:"Input parameter. 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:["Input parameter. 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:"Input parameter. String to join rows in output."})]}),(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:"Output parameter. All rows combined into single text."})]})]})]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parse JSON"}),(0,r.jsxs)(t.p,{children:["Replace this legacy component with the ",(0,r.jsxs)(t.a,{href:"#parser",children:[(0,r.jsx)(t.strong,{children:"Parser"})," component"]}),"."]}),(0,r.jsxs)(t.p,{children:["This component converts and extracts JSON fields in ",(0,r.jsx)(t.code,{children:"Message"})," and ",(0,r.jsx)(t.code,{children:"Data"})," objects using JQ queries, then returns ",(0,r.jsx)(t.code,{children:"filtered_data"}),", which is a list of ",(0,r.jsx)(t.code,{children:"Data"})," objects."]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Python REPL"}),(0,r.jsxs)(t.p,{children:["Replace this legacy component with the ",(0,r.jsxs)(t.a,{href:"#python-interpreter",children:[(0,r.jsx)(t.strong,{children:"Python Interpreter"})," component"]})," or another processing or logic component."]}),(0,r.jsx)(t.p,{children:"This component creates a Python REPL (Read-Eval-Print Loop) tool for executing Python code."}),(0,r.jsx)(t.p,{children:"It accepts the following parameters:"}),(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:"name"}),(0,r.jsx)(t.td,{children:"String"}),(0,r.jsxs)(t.td,{children:["Input parameter. The name of the tool. Default: ",(0,r.jsx)(t.code,{children:"python_repl"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"description"}),(0,r.jsx)(t.td,{children:"String"}),(0,r.jsx)(t.td,{children:"Input parameter. A description of the tool's functionality."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"global_imports"}),(0,r.jsx)(t.td,{children:"List[String]"}),(0,r.jsxs)(t.td,{children:["Input parameter. A list of modules to import globally. Default: ",(0,r.jsx)(t.code,{children:"math"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"tool"}),(0,r.jsx)(t.td,{children:"Tool"}),(0,r.jsx)(t.td,{children:"Output parameter. A Python REPL tool for use in LangChain."})]})]})]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Python Code Structured"}),(0,r.jsxs)(t.p,{children:["Replace this legacy component with the ",(0,r.jsxs)(t.a,{href:"#python-interpreter",children:[(0,r.jsx)(t.strong,{children:"Python Interpreter"})," component"]})," or another processing or logic component."]}),(0,r.jsx)(t.p,{children:"This component creates a structured tool from Python code using a dataclass."}),(0,r.jsx)(t.p,{children:"The component dynamically updates its configuration based on the provided Python code, allowing for custom function arguments and descriptions."}),(0,r.jsx)(t.p,{children:"It accepts the following parameters:"}),(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:"tool_code"}),(0,r.jsx)(t.td,{children:"String"}),(0,r.jsx)(t.td,{children:"Input parameter. The Python code for the tool's dataclass."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"tool_name"}),(0,r.jsx)(t.td,{children:"String"}),(0,r.jsx)(t.td,{children:"Input parameter. The name of the tool."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"tool_description"}),(0,r.jsx)(t.td,{children:"String"}),(0,r.jsx)(t.td,{children:"Input parameter. The description of the tool."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"return_direct"}),(0,r.jsx)(t.td,{children:"Boolean"}),(0,r.jsx)(t.td,{children:"Input parameter. Whether to return the function output directly."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"tool_function"}),(0,r.jsx)(t.td,{children:"String"}),(0,r.jsx)(t.td,{children:"Input parameter. The selected function for the tool."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"global_variables"}),(0,r.jsx)(t.td,{children:"Dict"}),(0,r.jsx)(t.td,{children:"Input parameter. Global variables or data for the tool."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"result_tool"}),(0,r.jsx)(t.td,{children:"Tool"}),(0,r.jsx)(t.td,{children:"Output parameter. A structured tool created from the Python code."})]})]})]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Regex Extractor"}),(0,r.jsxs)(t.p,{children:["Replace this legacy component with the ",(0,r.jsxs)(t.a,{href:"#parser",children:[(0,r.jsx)(t.strong,{children:"Parser"})," component"]}),"."]}),(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.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Select Data"}),(0,r.jsxs)(t.p,{children:["Replace this legacy component with the ",(0,r.jsxs)(t.a,{href:"#data-operations",children:[(0,r.jsx)(t.strong,{children:"Data Operations"})," component"]}),"."]}),(0,r.jsxs)(t.p,{children:["This component selects a single ",(0,r.jsx)(t.code,{children:"Data"})," object from a list."]}),(0,r.jsx)(t.p,{children:"It accepts the following parameters:"}),(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:"Input parameter. 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:"Input parameter. Index of the data to select"})]}),(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:["Output parameter. The selected ",(0,r.jsx)(t.code,{children:"Data"})," object."]})]})]})]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Update Data"}),(0,r.jsxs)(t.p,{children:["Replace this legacy component with the ",(0,r.jsxs)(t.a,{href:"#data-operations",children:[(0,r.jsx)(t.strong,{children:"Data Operations"})," component"]}),"."]}),(0,r.jsx)(t.p,{children:"This component dynamically updates or appends data with specified fields."}),(0,r.jsx)(t.p,{children:"It accepts the following parameters:"}),(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:"Input parameter. 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:"Input parameter. 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:"Input parameter. 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:"Input parameter. Validates the text key presence."})]}),(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:"Output parameter. The updated Data objects."})]})]})]})]})]})}function f(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(g,{...e})}):g(e)}function y(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},42547:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/component-type-convert-and-web-search-1eef7b9a7c1a243f4a08d9717728d0e1.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.4fbc21ff.js b/assets/js/7819cc1c.4fbc21ff.js deleted file mode 100644 index 1928860ad1..0000000000 --- a/assets/js/7819cc1c.4fbc21ff.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"},11470:(e,t,n)=>{n.d(t,{A:()=>v});var s=n(96540),r=n(18215),o=n(23104),a=n(56347),i=n(205),c=n(57485),l=n(31682),d=n(70679);function h(e){return s.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,s.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 p(e){const{values:t,children:n}=e;return(0,s.useMemo)(()=>{const e=t??function(e){return h(e).map(({props:{value:e,label:t,attributes:n,default:s}})=>({value:e,label:t,attributes:n,default:s}))}(n);return function(e){const t=(0,l.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,n])}function x({value:e,tabValues:t}){return t.some(t=>t.value===e)}function u({queryString:e=!1,groupId:t}){const n=(0,a.W6)(),r=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,c.aZ)(r),(0,s.useCallback)(e=>{if(!r)return;const t=new URLSearchParams(n.location.search);t.set(r,e),n.replace({...n.location,search:t.toString()})},[r,n])]}function m(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,o=p(e),[a,c]=(0,s.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(!x({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 n=t.find(e=>e.default)??t[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:o})),[l,h]=u({queryString:n,groupId:r}),[m,j]=function({groupId:e}){const t=function(e){return e?`docusaurus.tab.${e}`:null}(e),[n,r]=(0,d.Dv)(t);return[n,(0,s.useCallback)(e=>{t&&r.set(e)},[t,r])]}({groupId:r}),g=(()=>{const e=l??m;return x({value:e,tabValues:o})?e:null})();(0,i.A)(()=>{g&&c(g)},[g]);return{selectedValue:a,selectValue:(0,s.useCallback)(e=>{if(!x({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);c(e),h(e),j(e)},[h,j,o]),tabValues:o}}var j=n(92303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var f=n(74848);function y({className:e,block:t,selectedValue:n,selectValue:s,tabValues:a}){const i=[],{blockElementScrollPositionUntilNextRender:c}=(0,o.a_)(),l=e=>{const t=e.currentTarget,r=i.indexOf(t),o=a[r].value;o!==n&&(c(t),s(o))},d=e=>{let t=null;switch(e.key){case"Enter":l(e);break;case"ArrowRight":{const n=i.indexOf(e.currentTarget)+1;t=i[n]??i[0];break}case"ArrowLeft":{const n=i.indexOf(e.currentTarget)-1;t=i[n]??i[i.length-1];break}}t?.focus()};return(0,f.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":t},e),children:a.map(({value:e,label:t,attributes:s})=>(0,f.jsx)("li",{role:"tab",tabIndex:n===e?0:-1,"aria-selected":n===e,ref:e=>{i.push(e)},onKeyDown:d,onClick:l,...s,className:(0,r.A)("tabs__item",g.tabItem,s?.className,{"tabs__item--active":n===e}),children:t??e},e))})}function b({lazy:e,children:t,selectedValue:n}){const o=(Array.isArray(t)?t:[t]).filter(Boolean);if(e){const e=o.find(e=>e.props.value===n);return e?(0,s.cloneElement)(e,{className:(0,r.A)("margin-top--md",e.props.className)}):null}return(0,f.jsx)("div",{className:"margin-top--md",children:o.map((e,t)=>(0,s.cloneElement)(e,{key:t,hidden:e.props.value!==n}))})}function D(e){const t=m(e);return(0,f.jsxs)("div",{className:(0,r.A)("tabs-container",g.tabList),children:[(0,f.jsx)(y,{...t,...e}),(0,f.jsx)(b,{...t,...e})]})}function v(e){const t=(0,j.A)();return(0,f.jsx)(D,{...e,children:h(e.children)},String(t))}},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}},19365:(e,t,n)=>{n.d(t,{A:()=>a});n(96540);var s=n(18215);const r={tabItem:"tabItem_Ymn6"};var o=n(74848);function a({children:e,hidden:t,className:n}){return(0,o.jsx)("div",{role:"tabpanel",className:(0,s.A)(r.tabItem,n),hidden:t,children:e})}},40966:(e,t,n)=>{n.r(t),n.d(t,{CH:()=>x,assets:()=>p,chCodeConfig:()=>u,contentTitle:()=>h,default:()=>g,frontMatter:()=>d,metadata:()=>s,toc:()=>m});const s=JSON.parse('{"id":"Components/components-processing","title":"Processing components","description":"Langflow\'s Processing components process and transform data within a flow.","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 components","slug":"/components-processing"},"sidebar":"docs","previous":{"title":"Vector Stores","permalink":"/components-vector-stores"},"next":{"title":"Prompt Template","permalink":"/components-prompts"}}');var r=n(74848),o=n(28453),a=n(24754),i=n(17886),c=n(11470),l=n(19365);const d={title:"Processing components",slug:"/components-processing"},h=void 0,p={},x={annotations:a.hk,Code:a.Cy},u={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},m=[{value:"Prompt Template",id:"prompt-template",level:2},{value:"Batch Run",id:"batch-run",level:2},{value:"Use the Batch Run component in a flow",id:"use-the-batch-run-component-in-a-flow",level:3},{value:"Batch Run parameters",id:"batch-run-parameters",level:3},{value:"Data Operations",id:"data-operations",level:2},{value:"Use the Data Operations component in a flow",id:"use-the-data-operations-component-in-a-flow",level:3},{value:"Data Operations parameters",id:"data-operations-parameters",level:3},{value:"Available data operations",id:"available-data-operations",level:4},{value:"DataFrame Operations",id:"dataframe-operations",level:2},{value:"Use the DataFrame Operations component in a flow",id:"use-the-dataframe-operations-component-in-a-flow",level:3},{value:"DataFrame Operations parameters",id:"dataframe-operations-parameters",level:3},{value:"LLM Router",id:"llm-router",level:2},{value:"LLM Router parameters",id:"llm-router-parameters",level:3},{value:"LLM Router outputs",id:"llm-router-outputs",level:3},{value:"Parser",id:"parser",level:2},{value:"Parsing modes",id:"parsing-modes",level:3},{value:"Test and troubleshoot parsed text",id:"test-and-troubleshoot-parsed-text",level:3},{value:"Python Interpreter",id:"python-interpreter",level:2},{value:"Use the Python Interpreter in a flow",id:"use-the-python-interpreter-in-a-flow",level:3},{value:"Python Interpreter parameters",id:"python-interpreter-parameters",level:3},{value:"Save File",id:"save-file",level:2},{value:"Smart Function",id:"smart-function",level:2},{value:"Smart Function parameters",id:"smart-function-parameters",level:3},{value:"Split Text",id:"split-text",level:2},{value:"Split Text parameters",id:"split-text-parameters",level:3},{value:"Tokenization errors due to chunk size",id:"chunk-size",level:3},{value:"Other text splitters",id:"other-text-splitters",level:3},{value:"Structured Output",id:"structured-output",level:2},{value:"Use the Structured Output component in a flow",id:"use-the-structured-output-component-in-a-flow",level:3},{value:"Structured Output parameters",id:"structured-output-parameters",level:3},{value:"Output Schema options",id:"output-schema-options",level:4},{value:"Type Convert",id:"type-convert",level:2},{value:"Use the Type Convert component in a flow",id:"use-the-type-convert-component-in-a-flow",level:3},{value:"Type Convert parameters",id:"type-convert-parameters",level:3},{value:"Legacy Processing components",id:"legacy-processing-components",level:2}];function j(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",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 x||f("CH",!1),x.Code||f("CH.Code",!0),s||f("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:["Langflow's ",(0,r.jsx)(t.strong,{children:"Processing"})," components process and transform data within a flow.\nThey have many uses, including:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["Feed instructions and context to your LLMs and agents with the ",(0,r.jsxs)(t.a,{href:"#prompt-template",children:[(0,r.jsx)(t.strong,{children:"Prompt Template"})," component"]}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Extract content from larger chunks of data with a ",(0,r.jsxs)(t.a,{href:"#parser",children:[(0,r.jsx)(t.strong,{children:"Parser"})," component"]}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Filter data with natural language with the ",(0,r.jsxs)(t.a,{href:"#smart-function",children:[(0,r.jsx)(t.strong,{children:"Smart Function"})," component"]}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Save data to your local machine with the ",(0,r.jsxs)(t.a,{href:"#save-file",children:[(0,r.jsx)(t.strong,{children:"Save File"})," component"]}),"."]}),"\n",(0,r.jsxs)(t.li,{children:["Transform data into a different data type with the ",(0,r.jsxs)(t.a,{href:"#type-convert",children:[(0,r.jsx)(t.strong,{children:"Type Convert"})," component"]})," to pass it between incompatible components."]}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"prompt-template",children:"Prompt Template"}),"\n",(0,r.jsxs)(t.p,{children:["See ",(0,r.jsx)(t.a,{href:"/components-prompts",children:"Prompt Template"}),"."]}),"\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.em,{children:"each row of one text column"})," in a ",(0,r.jsx)(t.a,{href:"/data-types#dataframe",children:(0,r.jsx)(t.code,{children:"DataFrame"})}),", and then returns a new ",(0,r.jsx)(t.code,{children:"DataFrame"})," with the original text and an LLM response.\nThe output 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 ",(0,r.jsx)(t.code,{children:"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 0-indexed processing order for all rows in the ",(0,r.jsx)(t.code,{children:"DataFrame"})]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.code,{children:"metadata"})," (optional): Additional information about the processing"]}),"\n"]}),"\n",(0,r.jsx)(t.h3,{id:"use-the-batch-run-component-in-a-flow",children:"Use the Batch Run component in a flow"}),"\n",(0,r.jsxs)(t.p,{children:["If you pass the ",(0,r.jsx)(t.strong,{children:"Batch Run"})," output to a ",(0,r.jsxs)(t.a,{href:"/components-processing#parser",children:[(0,r.jsx)(t.strong,{children:"Parser"})," component"]}),", you can use variables in the parsing template to reference these keys, such as ",(0,r.jsx)(t.code,{children:"{text_input}"})," and ",(0,r.jsx)(t.code,{children:"{model_response}"}),".\nThis is demonstrated in the following example."]}),"\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,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Connect a ",(0,r.jsx)(t.strong,{children:"Language Model"})," component to a ",(0,r.jsx)(t.strong,{children:"Batch Run"})," component's ",(0,r.jsx)(t.strong,{children:"Language model"})," port."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Connect ",(0,r.jsx)(t.code,{children:"DataFrame"})," output from another component to the ",(0,r.jsx)(t.strong,{children:"Batch Run"})," component's ",(0,r.jsx)(t.strong,{children:"DataFrame"})," input.\nFor example, you could connect a ",(0,r.jsx)(t.strong,{children:"File"})," component with a CSV file."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["In the ",(0,r.jsx)(t.strong,{children:"Batch Run"})," component's ",(0,r.jsx)(t.strong,{children:"Column Name"})," field, enter the name of the column in the incoming ",(0,r.jsx)(t.code,{children:"DataFrame"})," that contains the text to process.\nFor example, if you want to extract text from a ",(0,r.jsx)(t.code,{children:"name"})," column in a CSV file, enter ",(0,r.jsx)(t.code,{children:"name"})," in the ",(0,r.jsx)(t.strong,{children:"Column Name"})," field."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{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."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Optional: In the ",(0,r.jsx)(t.strong,{children:"Batch Run"})," ",(0,r.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),", click ",(0,r.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Controls"}),", enable the ",(0,r.jsx)(t.strong,{children:"System Message"})," parameter, click ",(0,r.jsx)(t.strong,{children:"Close"}),", and then enter an instruction for how you want the LLM to process each cell extracted from the file.\nFor example, ",(0,r.jsx)(t.code,{children:"Create a business card for each name."})]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["In the ",(0,r.jsx)(t.strong,{children:"Parser"})," component's ",(0,r.jsx)(t.strong,{children:"Template"})," field, enter a template for processing the ",(0,r.jsx)(t.strong,{children:"Batch Run"})," component's new ",(0,r.jsx)(t.code,{children:"DataFrame"})," columns (",(0,r.jsx)(t.code,{children:"text_input"}),", ",(0,r.jsx)(t.code,{children:"model_response"}),", and ",(0,r.jsx)(t.code,{children:"batch_index"}),"):"]}),"\n",(0,r.jsxs)(t.p,{children:["For example, this template uses three columns from the resulting, post-batch ",(0,r.jsx)(t.code,{children:"DataFrame"}),":"]}),"\n",(0,r.jsx)(x.Code,{codeConfig:u,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"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["To test the processing, click the ",(0,r.jsx)(t.strong,{children:"Parser"})," component, click ",(0,r.jsx)(i.A,{name:"Play","aria-hidden":"True"})," ",(0,r.jsx)(t.strong,{children:"Run component"}),", and then click ",(0,r.jsx)(i.A,{name:"TextSearch","aria-hidden":"True"})," ",(0,r.jsx)(t.strong,{children:"Inspect output"})," to view the final ",(0,r.jsx)(t.code,{children:"DataFrame"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["You can also connect a ",(0,r.jsx)(t.strong,{children:"Chat Output"})," component to the ",(0,r.jsx)(t.strong,{children:"Parser"})," component if you want to see the output in the ",(0,r.jsx)(t.strong,{children:"Playground"}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(t.h3,{id:"batch-run-parameters",children:"Batch Run parameters"}),"\n",(0,r.jsxs)(t.p,{children:["Some ",(0,r.jsx)(t.strong,{children:"Batch Run"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,r.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Controls"})," in the ",(0,r.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\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:"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.jsxs)(t.td,{children:["Input parameter. Connect the 'Language Model' output from a ",(0,r.jsx)(t.strong,{children:"Language Model"})," component. 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:"Input parameter. 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:"Input parameter. 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:"Input parameter. 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:["Input parameter. 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:"Input parameter. If True, add metadata to the output DataFrame."})]}),(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:"Output parameter. 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:["The ",(0,r.jsx)(t.strong,{children:"Data Operations"})," component performs operations on ",(0,r.jsx)(t.a,{href:"/data-types#data",children:(0,r.jsx)(t.code,{children:"Data"})})," objects, including extracting, filtering, and editing keys and values in the ",(0,r.jsx)(t.code,{children:"Data"}),".\nFor all options, see ",(0,r.jsx)(t.a,{href:"#available-data-operations",children:"Available data operations"}),".\nThe output is a new ",(0,r.jsx)(t.code,{children:"Data"})," object containing the modified data after running the selected operation."]}),"\n",(0,r.jsx)(t.h3,{id:"use-the-data-operations-component-in-a-flow",children:"Use the Data Operations component in a flow"}),"\n",(0,r.jsxs)(t.p,{children:["The following example demonstrates how to use a ",(0,r.jsx)(t.strong,{children:"Data Operations"})," component in a flow using data from a webhook payload:"]}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Create a flow with a ",(0,r.jsx)(t.strong,{children:"Webhook"})," component and a ",(0,r.jsx)(t.strong,{children:"Data Operations"})," component, and then connect the ",(0,r.jsx)(t.strong,{children:"Webhook"})," component's output to the ",(0,r.jsx)(t.strong,{children:"Data Operations"})," component's ",(0,r.jsx)(t.strong,{children:"Data"})," input."]}),"\n",(0,r.jsxs)(t.p,{children:["All operations in the ",(0,r.jsx)(t.strong,{children:"Data Operations"})," component require at least one ",(0,r.jsx)(t.code,{children:"Data"})," input from another component.\nIf the preceding component doesn't produce ",(0,r.jsx)(t.code,{children:"Data"})," output, you can use another component, such as the ",(0,r.jsx)(t.strong,{children:"Type Convert"})," component, to reformat the data before passing it to the ",(0,r.jsx)(t.strong,{children:"Data Operations"})," component.\nAlternatively, you could consider using a component that is designed to process the original data type, such as the ",(0,r.jsx)(t.strong,{children:"Parser"})," or ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," components."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["In the ",(0,r.jsx)(t.strong,{children:"Operations"})," field, select the operation you want to perform on the incoming ",(0,r.jsx)(t.code,{children:"Data"}),".\nFor this example, select the ",(0,r.jsx)(t.strong,{children:"Select Keys"})," operation."]}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsxs)(t.p,{children:["You can select only one operation.\nIf you need to perform multiple operations on the data, you can chain multiple ",(0,r.jsx)(t.strong,{children:"Data Operations"})," components together to execute each operation in sequence.\nFor more complex multi-step operations, consider using a component like the ",(0,r.jsx)(t.strong,{children:"Smart Function"})," component."]})}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Under ",(0,r.jsx)(t.strong,{children:"Select Keys"}),", add keys for ",(0,r.jsx)(t.code,{children:"name"}),", ",(0,r.jsx)(t.code,{children:"username"}),", and ",(0,r.jsx)(t.code,{children:"email"}),".\nClick ",(0,r.jsx)(i.A,{name:"Plus","aria-hidden":"True"})," ",(0,r.jsx)(t.strong,{children:"Add more"})," to add a field for each key."]}),"\n",(0,r.jsxs)(t.p,{children:["For this example, assume that the webhook will receive consistent payloads that always contain ",(0,r.jsx)(t.code,{children:"name"}),", ",(0,r.jsx)(t.code,{children:"username"}),", and ",(0,r.jsx)(t.code,{children:"email"})," keys.\nThe ",(0,r.jsx)(t.strong,{children:"Select Keys"})," operation extracts the value of these keys from each incoming payload."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Optional: If you want to view the output in the ",(0,r.jsx)(t.strong,{children:"Playground"}),", connect the ",(0,r.jsx)(t.strong,{children:"Data Operations"})," component's output to a ",(0,r.jsx)(t.strong,{children:"Chat Output"})," component."]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"A flow with Webhook, Data Operations, and Chat Output components",src:n(46445).A+"",width:"4000",height:"1920"})}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["To test the flow, send the following request to your flow's webhook endpoint.\nFor more information about the webhook endpoint, see ",(0,r.jsx)(t.a,{href:"/webhook",children:"Trigger flows with webhooks"}),"."]}),"\n",(0,r.jsx)(x.Code,{codeConfig:u,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://',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_SERVER_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/webhook/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',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": "Main Street",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "suite": "Apt. 556",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "city": "Springfield",',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": "Acme-Corp",',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"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["To view the ",(0,r.jsx)(t.code,{children:"Data"})," resulting from the ",(0,r.jsx)(t.strong,{children:"Select Keys"})," operation, do one of the following:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["If you attached a ",(0,r.jsx)(t.strong,{children:"Chat Output"})," component, open the ",(0,r.jsx)(t.strong,{children:"Playground"})," to see the result as a chat message."]}),"\n",(0,r.jsxs)(t.li,{children:["Click ",(0,r.jsx)(i.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Inspect output"})," on the ",(0,r.jsx)(t.strong,{children:"Data Operations"})," component."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(t.h3,{id:"data-operations-parameters",children:"Data Operations parameters"}),"\n",(0,r.jsxs)(t.p,{children:["Many ",(0,r.jsx)(t.strong,{children:"Data Operations"})," component input parameters are conditional based on the selected ",(0,r.jsx)(t.strong,{children:"Operation"})," (",(0,r.jsx)(t.code,{children:"operation"}),")."]}),"\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:"data"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsxs)(t.td,{children:["Input parameter. The ",(0,r.jsx)(t.code,{children:"Data"})," object 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.jsxs)(t.td,{children:["Input parameter. The operation to perform on the data. See ",(0,r.jsx)(t.a,{href:"#available-data-operations",children:"Available data operations"})]})]}),(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:"Input parameter. 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:"Input parameter. 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:"Input parameter. 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:"Input parameter. 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:"Input parameter. 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:"Input parameter. 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:"Input parameter. A list of keys to rename in the data."})]})]})]}),"\n",(0,r.jsx)(t.h4,{id:"available-data-operations",children:"Available data operations"}),"\n",(0,r.jsxs)(t.p,{children:["Options for the ",(0,r.jsx)(t.code,{children:"operations"})," input parameter are as follows.\nAll operations act on an incoming ",(0,r.jsx)(t.code,{children:"Data"})," object."]}),"\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:"Required Inputs"}),(0,r.jsx)(t.th,{children:"Process"})]})}),(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.jsx)(t.h2,{id:"dataframe-operations",children:"DataFrame Operations"}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component performs operations on ",(0,r.jsx)(t.a,{href:"/data-types#dataframe",children:(0,r.jsx)(t.code,{children:"DataFrame"})})," (table) rows and columns, including schema changes, record changes, sorting, and filtering.\nFor all options, see ",(0,r.jsx)(t.a,{href:"#dataframe-operations-parameters",children:"DataFrame Operations parameters"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["The output is a new ",(0,r.jsx)(t.code,{children:"DataFrame"})," containing the modified data after running the selected operation."]}),"\n",(0,r.jsx)(t.h3,{id:"use-the-dataframe-operations-component-in-a-flow",children:"Use the DataFrame Operations component in a flow"}),"\n",(0,r.jsxs)(t.p,{children:["The following steps explain how to configure a ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component in a flow.\nYou can follow along with an example or use your own flow.\nThe only requirement is that the preceding component must create ",(0,r.jsx)(t.code,{children:"DataFrame"})," output that you can pass to the ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component."]}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsx)(t.p,{children:"Create a new flow or use an existing flow."}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"API response extraction flow example"}),(0,r.jsxs)(t.p,{children:["The following example flow uses five components to extract ",(0,r.jsx)(t.code,{children:"Data"})," from an API response, transform it to a ",(0,r.jsx)(t.code,{children:"DataFrame"}),", and then perform further processing on the tabular data using a ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component.\nThe sixth component, ",(0,r.jsx)(t.strong,{children:"Chat Output"}),", is optional in this example.\nIt only serves as a convenient way for you to view the final output in the ",(0,r.jsx)(t.strong,{children:"Playground"}),", rather than inspecting the component logs."]}),(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"A flow that ingests an API response, extracts it to a DataFrame with a Smart Function component, and the processes it through a DataFrame Operations component",src:n(13533).A+"",width:"4000",height:"2120"})}),(0,r.jsxs)(t.p,{children:["If you want to use this example to test the ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component, do the following:"]}),(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsx)(t.p,{children:"Create a flow with the following components:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.strong,{children:"API Request"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.strong,{children:"Language Model"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.strong,{children:"Smart Function"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.strong,{children:"Type Convert"})}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Configure the ",(0,r.jsxs)(t.a,{href:"#smart-function",children:[(0,r.jsx)(t.strong,{children:"Smart Function"})," component"]})," and its dependencies:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"API Request"}),": Configure the ",(0,r.jsxs)(t.a,{href:"/components-data#api-request",children:[(0,r.jsx)(t.strong,{children:"API Request"})," component"]})," to get JSON data from an endpoint of your choice, and then connect the ",(0,r.jsx)(t.strong,{children:"API Response"})," output to the ",(0,r.jsx)(t.strong,{children:"Smart Function"})," component's ",(0,r.jsx)(t.strong,{children:"Data"})," input."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Language Model"}),": Select your preferred provider and model, and then enter a valid API key.\nChange the output to ",(0,r.jsx)(t.strong,{children:"Language Model"}),", and then connect the ",(0,r.jsx)(t.code,{children:"LanguageModel"})," output to the ",(0,r.jsx)(t.strong,{children:"Smart Function"})," component's ",(0,r.jsx)(t.strong,{children:"Language Model"})," input."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Smart Function"}),": In the ",(0,r.jsx)(t.strong,{children:"Instructions"})," field, enter natural language instructions to extract data from the API response.\nYour instructions depend on the response content and desired outcome.\nFor example, if the response contains a large ",(0,r.jsx)(t.code,{children:"result"})," field, you might provide instructions like ",(0,r.jsx)(t.code,{children:"explode the result field out into a Data object"}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Convert the ",(0,r.jsx)(t.strong,{children:"Smart Function"})," component's ",(0,r.jsx)(t.code,{children:"Data"})," output to ",(0,r.jsx)(t.code,{children:"DataFrame"}),":"]}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["Connect the ",(0,r.jsx)(t.strong,{children:"Filtered Data"})," output to the ",(0,r.jsx)(t.strong,{children:"Type Convert"})," component's ",(0,r.jsx)(t.strong,{children:"Data"})," input."]}),"\n",(0,r.jsxs)(t.li,{children:["Set the ",(0,r.jsx)(t.strong,{children:"Type Convert"})," component's ",(0,r.jsx)(t.strong,{children:"Output Type"})," to ",(0,r.jsx)(t.strong,{children:"DataFrame"}),"."]}),"\n"]}),"\n"]}),"\n"]}),(0,r.jsxs)(t.p,{children:["Now the flow is ready for you to add the ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component."]})]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Add a ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component to the flow, and then connect ",(0,r.jsx)(t.code,{children:"DataFrame"})," output from another component to the ",(0,r.jsx)(t.strong,{children:"DataFrame"})," input."]}),"\n",(0,r.jsxs)(t.p,{children:["All operations in the ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component require at least one ",(0,r.jsx)(t.code,{children:"DataFrame"})," input from another component.\nIf a component doesn't produce ",(0,r.jsx)(t.code,{children:"DataFrame"})," output, you can use another component, such as the ",(0,r.jsx)(t.strong,{children:"Type Convert"})," component, to reformat the data before passing it to the ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component.\nAlternatively, you could consider using a component that is designed to process the original data type, such as the ",(0,r.jsx)(t.strong,{children:"Parser"})," or ",(0,r.jsx)(t.strong,{children:"Data Operations"})," components."]}),"\n",(0,r.jsxs)(t.p,{children:["If you are following along with the example flow, connect the ",(0,r.jsx)(t.strong,{children:"Type Convert"})," component's ",(0,r.jsx)(t.strong,{children:"DataFrame Output"})," port to the ",(0,r.jsx)(t.strong,{children:"DataFrame"})," input."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["In the ",(0,r.jsx)(t.strong,{children:"Operations"})," field, select the operation you want to perform on the incoming ",(0,r.jsx)(t.code,{children:"DataFrame"}),".\nFor example, the ",(0,r.jsx)(t.strong,{children:"Filter"})," operation filters the rows based on a specified column and value."]}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsxs)(t.p,{children:["You can select only one operation.\nIf you need to perform multiple operations on the data, you can chain multiple ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," components together to execute each operation in sequence.\nFor more complex multi-step operations, like dramatic schema changes or pivots, consider using an LLM-powered component, like the ",(0,r.jsx)(t.strong,{children:"Structured Output"})," or ",(0,r.jsx)(t.strong,{children:"Smart Function"})," component, as a replacement or preparation for the ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component."]})}),"\n",(0,r.jsxs)(t.p,{children:["If you're following along with the example flow, select any operation that you want to apply to the data that was extracted by the ",(0,r.jsx)(t.strong,{children:"Smart Function"})," component.\nTo view the contents of the incoming ",(0,r.jsx)(t.code,{children:"DataFrame"}),", click ",(0,r.jsx)(i.A,{name:"Play","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Run component"})," on the ",(0,r.jsx)(t.strong,{children:"Type Convert"})," component, and then ",(0,r.jsx)(i.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Inspect output"}),".\nIf the ",(0,r.jsx)(t.code,{children:"DataFrame"})," seems malformed, click ",(0,r.jsx)(i.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Inspect output"})," on each upstream component to determine where the error occurs, and then modify your flow's configuration as needed.\nFor example, if the ",(0,r.jsx)(t.strong,{children:"Smart Function"})," component didn't extract the expected fields, modify your instructions or verify that the given fields are present in the ",(0,r.jsx)(t.strong,{children:"API Response"})," output."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Configure the operation's parameters.\nThe specific parameters depend on the selected operation.\nFor example, if you select the ",(0,r.jsx)(t.strong,{children:"Filter"})," operation, you must define a filter condition using the ",(0,r.jsx)(t.strong,{children:"Column Name"}),", ",(0,r.jsx)(t.strong,{children:"Filter Value"}),", and ",(0,r.jsx)(t.strong,{children:"Filter Operator"})," parameters.\nFor more information, see ",(0,r.jsx)(t.a,{href:"#dataframe-operations-parameters",children:"DataFrame Operations parameters"})]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["To test the flow, click ",(0,r.jsx)(i.A,{name:"Play","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Run component"})," on the ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component, and then click ",(0,r.jsx)(i.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Inspect output"})," to view the new ",(0,r.jsx)(t.code,{children:"DataFrame"})," created from the ",(0,r.jsx)(t.strong,{children:"Filter"})," operation."]}),"\n",(0,r.jsxs)(t.p,{children:["If you want to view the output in the ",(0,r.jsx)(t.strong,{children:"Playground"}),", connect the ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component's output to a ",(0,r.jsx)(t.strong,{children:"Chat Output"})," component, rerun the ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component, and then click ",(0,r.jsx)(t.strong,{children:"Playground"}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["For another example, see ",(0,r.jsx)(t.a,{href:"/components-logic#conditional-looping",children:"Conditional looping"}),"."]}),"\n",(0,r.jsx)(t.h3,{id:"dataframe-operations-parameters",children:"DataFrame Operations parameters"}),"\n",(0,r.jsxs)(t.p,{children:["Most ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," parameters are conditional because they only apply to specific operations."]}),"\n",(0,r.jsxs)(t.p,{children:["The only permanent parameters are ",(0,r.jsx)(t.strong,{children:"DataFrame"})," (",(0,r.jsx)(t.code,{children:"df"}),"), which is the ",(0,r.jsx)(t.code,{children:"DataFrame"})," input, and ",(0,r.jsx)(t.strong,{children:"Operation"})," (",(0,r.jsx)(t.code,{children:"operation"}),"), which is the operation to perform on the ",(0,r.jsx)(t.code,{children:"DataFrame"}),".\nOnce you select an operation, the conditional parameters for that operation appear on the ",(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component."]}),"\n",(0,r.jsxs)(c.A,{children:[(0,r.jsxs)(l.A,{value:"addcolumn",label:"Add Column",default:!0,children:[(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Add Column"})," operation allows you to add a new column to the ",(0,r.jsx)(t.code,{children:"DataFrame"})," with a constant value."]}),(0,r.jsxs)(t.p,{children:["The parameters are ",(0,r.jsx)(t.strong,{children:"New Column Name"})," (",(0,r.jsx)(t.code,{children:"new_column_name"}),") and ",(0,r.jsx)(t.strong,{children:"New Column Value"})," (",(0,r.jsx)(t.code,{children:"new_column_value"}),")."]})]}),(0,r.jsx)(l.A,{value:"dropcolumn",label:"Drop Column",children:(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Drop Column"})," operation allows you to remove a column from the ",(0,r.jsx)(t.code,{children:"DataFrame"}),", specified by ",(0,r.jsx)(t.strong,{children:"Column Name"})," (",(0,r.jsx)(t.code,{children:"column_name"}),")."]})}),(0,r.jsxs)(l.A,{value:"filter",label:"Filter",children:[(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Filter"})," operation allows you to filter the ",(0,r.jsx)(t.code,{children:"DataFrame"})," based on a specified condition.\nThe output is a ",(0,r.jsx)(t.code,{children:"DataFrame"})," containing only the rows that matched the filter condition."]}),(0,r.jsx)(t.p,{children:"Provide the following parameters:"}),(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Column Name"})," (",(0,r.jsx)(t.code,{children:"column_name"}),"): The name of the column to filter on."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Filter Value"})," (",(0,r.jsx)(t.code,{children:"filter_value"}),"): The value to filter on."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Filter Operator"})," (",(0,r.jsx)(t.code,{children:"filter_operator"}),"): The operator to use for filtering, one of ",(0,r.jsx)(t.code,{children:"equals"})," (default), ",(0,r.jsx)(t.code,{children:"not equals"}),", ",(0,r.jsx)(t.code,{children:"contains"}),", ",(0,r.jsx)(t.code,{children:"starts with"}),", ",(0,r.jsx)(t.code,{children:"ends with"}),", ",(0,r.jsx)(t.code,{children:"greater than"}),", or ",(0,r.jsx)(t.code,{children:"less than"}),"."]}),"\n"]})]}),(0,r.jsxs)(l.A,{value:"head",label:"Head",children:[(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Head"})," operation allows you to retrieve the first ",(0,r.jsx)(t.code,{children:"n"})," rows of the ",(0,r.jsx)(t.code,{children:"DataFrame"}),", where ",(0,r.jsx)(t.code,{children:"n"})," is set in ",(0,r.jsx)(t.strong,{children:"Number of Rows"})," (",(0,r.jsx)(t.code,{children:"num_rows"}),").\nThe default is ",(0,r.jsx)(t.code,{children:"5"}),"."]}),(0,r.jsxs)(t.p,{children:["The output is a ",(0,r.jsx)(t.code,{children:"DataFrame"})," containing only the selected rows."]})]}),(0,r.jsxs)(l.A,{value:"renamecolumn",label:"Rename Column",children:[(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Rename Column"})," operation allows you to rename an existing column in the ",(0,r.jsx)(t.code,{children:"DataFrame"}),"."]}),(0,r.jsxs)(t.p,{children:["The parameters are ",(0,r.jsx)(t.strong,{children:"Column Name"})," (",(0,r.jsx)(t.code,{children:"column_name"}),"), which is the current name, and ",(0,r.jsx)(t.strong,{children:"New Column Name"})," (",(0,r.jsx)(t.code,{children:"new_column_name"}),")."]})]}),(0,r.jsxs)(l.A,{value:"replacevalue",label:"Replace Value",children:[(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Replace Value"})," operation allows you to replace values in a specific column of the ",(0,r.jsx)(t.code,{children:"DataFrame"}),".\nThis operation replaces a target value with a new value.\nAll cells matching the target value are replaced with the new value in the new ",(0,r.jsx)(t.code,{children:"DataFrame"})," output."]}),(0,r.jsx)(t.p,{children:"Provide the following parameters:"}),(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Column Name"})," (",(0,r.jsx)(t.code,{children:"column_name"}),"): The name of the column to modify."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Value to Replace"})," (",(0,r.jsx)(t.code,{children:"replace_value"}),"): The value that you want to replace."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Replacement Value"})," (",(0,r.jsx)(t.code,{children:"replacement_value"}),"): The new value to use."]}),"\n"]})]}),(0,r.jsxs)(l.A,{value:"selectcolumns",label:"Select Columns",children:[(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Select Columns"})," operation allows you to select one or more specific columns from the ",(0,r.jsx)(t.code,{children:"DataFrame"}),"."]}),(0,r.jsxs)(t.p,{children:["Provide a list of column names in ",(0,r.jsx)(t.strong,{children:"Columns to Select"})," (",(0,r.jsx)(t.code,{children:"columns_to_select"}),").\nIn the visual editor, click ",(0,r.jsx)(i.A,{name:"Plus","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Add More"})," to add multiple fields, and then enter one column name in each field."]}),(0,r.jsxs)(t.p,{children:["The output is a ",(0,r.jsx)(t.code,{children:"DataFrame"})," containing only the specified columns."]})]}),(0,r.jsxs)(l.A,{value:"sort",label:"Sort",children:[(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Sort"})," operation allows you to sort the ",(0,r.jsx)(t.code,{children:"DataFrame"})," on a specific column in ascending or descending order."]}),(0,r.jsx)(t.p,{children:"Provide the following parameters:"}),(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Column Name"})," (",(0,r.jsx)(t.code,{children:"column_name"}),"): The name of the column to sort on."]}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Sort Ascending"})," (",(0,r.jsx)(t.code,{children:"ascending"}),"): Whether to sort in ascending or descending order. If enabled (true), sorts in ascending order; if disabled (false), sorts in descending order. Default: Enabled (true)"]}),"\n"]})]}),(0,r.jsxs)(l.A,{value:"tail",label:"Tail",children:[(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Tail"})," operation allows you to retrieve the last ",(0,r.jsx)(t.code,{children:"n"})," rows of the ",(0,r.jsx)(t.code,{children:"DataFrame"}),", where ",(0,r.jsx)(t.code,{children:"n"})," is set in ",(0,r.jsx)(t.strong,{children:"Number of Rows"})," (",(0,r.jsx)(t.code,{children:"num_rows"}),").\nThe default is ",(0,r.jsx)(t.code,{children:"5"}),"."]}),(0,r.jsxs)(t.p,{children:["The output is a ",(0,r.jsx)(t.code,{children:"DataFrame"})," containing only the selected rows."]})]}),(0,r.jsxs)(l.A,{value:"dropduplicates",label:"Drop Duplicates",children:[(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Drop Duplicates"})," operation removes rows from the ",(0,r.jsx)(t.code,{children:"DataFrame"})," by identifying all duplicate values within a single column."]}),(0,r.jsxs)(t.p,{children:["The only parameter is the ",(0,r.jsx)(t.strong,{children:"Column Name"})," (",(0,r.jsx)(t.code,{children:"column_name"}),")."]}),(0,r.jsxs)(t.p,{children:["When the flow runs, all rows with duplicate values in the given column are removed.\nThe output is a ",(0,r.jsx)(t.code,{children:"DataFrame"})," containing all columns from the original ",(0,r.jsx)(t.code,{children:"DataFrame"}),", but only rows with non-duplicate values."]})]})]}),"\n",(0,r.jsx)(t.h2,{id:"llm-router",children:"LLM Router"}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"LLM Router"})," 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.jsxs)(t.p,{children:["To use the component in a flow, you connect multiple ",(0,r.jsx)(t.strong,{children:"Language Model"})," components to the ",(0,r.jsx)(t.strong,{children:"LLM Router"})," components.\nOne model is the judge LLM that analyzes input messages to understand the evaluation context, selects the most appropriate model from the other attached LLMs, and then routes the input to the selected model.\nThe selected model processes the input, and then returns the generated response."]}),"\n",(0,r.jsxs)(t.p,{children:["The following example flow has three ",(0,r.jsx)(t.strong,{children:"Language Model"})," components.\nOne is the judge LLM, and the other two are in the LLM pool for request routing.\nThe ",(0,r.jsx)(t.strong,{children:"Chat Input"})," and ",(0,r.jsx)(t.strong,{children:"Chat Output"})," components create a seamless chat interaction where you send a message and receive a response without any user awareness of the underlying routing."]}),"\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.jsx)(t.h3,{id:"llm-router-parameters",children:"LLM Router parameters"}),"\n",(0,r.jsxs)(t.p,{children:["Some ",(0,r.jsx)(t.strong,{children:"LLM Router"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,r.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Controls"})," in the ",(0,r.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\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:(0,r.jsx)(t.code,{children:"models"})}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.strong,{children:"Language Models"})}),(0,r.jsxs)(t.td,{children:["Input parameter. Connect ",(0,r.jsx)(t.a,{href:"/data-types#languagemodel",children:(0,r.jsx)(t.code,{children:"LanguageModel"})})," output from multiple ",(0,r.jsxs)(t.a,{href:"/components-models",children:[(0,r.jsx)(t.strong,{children:"Language Model"})," components"]})," to create a pool of models. The ",(0,r.jsx)(t.code,{children:"judge_llm"})," selects models from this pool when routing requests. The first model you connect is the default model if there is a problem with model selection or routing."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"input_value"})}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.strong,{children:"Input"})}),(0,r.jsx)(t.td,{children:"Input parameter. The incoming query to be routed to the model selected by the judge LLM."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"judge_llm"})}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.strong,{children:"Judge LLM"})}),(0,r.jsxs)(t.td,{children:["Input parameter. Connect ",(0,r.jsx)(t.code,{children:"LanguageModel"})," output from ",(0,r.jsx)(t.em,{children:"one"})," ",(0,r.jsx)(t.strong,{children:"Language Model"})," component to serve as the judge LLM for request routing."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"optimization"})}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.strong,{children:"Optimization"})}),(0,r.jsxs)(t.td,{children:["Input parameter. Set a preferred characteristic for model selection by the judge LLM. The options are ",(0,r.jsx)(t.code,{children:"quality"})," (highest response quality), ",(0,r.jsx)(t.code,{children:"speed"})," (fastest response time), ",(0,r.jsx)(t.code,{children:"cost"})," (most cost-effective model), or ",(0,r.jsx)(t.code,{children:"balanced"})," (equal weight for quality, speed, and cost). Default: ",(0,r.jsx)(t.code,{children:"balanced"})]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"use_openrouter_specs"})}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.strong,{children:"Use OpenRouter Specs"})}),(0,r.jsx)(t.td,{children:"Input parameter. Whether to fetch model specifications from the OpenRouter API."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"If false, only the model name is provided to the judge LLM. Default: Enabled (true)"}),(0,r.jsx)(t.td,{}),(0,r.jsx)(t.td,{})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"timeout"})}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.strong,{children:"API Timeout"})}),(0,r.jsxs)(t.td,{children:["Input parameter. Set a timeout duration in seconds for API requests made by the router. Default: ",(0,r.jsx)(t.code,{children:"10"})]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"fallback_to_first"})}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.strong,{children:"Fallback to First Model"})}),(0,r.jsxs)(t.td,{children:["Input parameter. Whether to use the first LLM in ",(0,r.jsx)(t.code,{children:"models"})," as a backup if routing fails to reach the selected model. Default: Enabled (true)"]})]})]})]}),"\n",(0,r.jsx)(t.h3,{id:"llm-router-outputs",children:"LLM Router outputs"}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"LLM Router"})," component provides three output options.\nYou can set the desired output type near the component's output port."]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Output"}),": A ",(0,r.jsx)(t.code,{children:"Message"})," containing the response to the original query as generated by the selected LLM.\nUse this output for regular chat interactions."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Selected Model Info"}),": A ",(0,r.jsx)(t.code,{children:"Data"})," object containing information about the selected model, such as its name and version."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Routing Decision"}),": A ",(0,r.jsx)(t.code,{children:"Message"})," containing the judge model's reasoning for selecting a particular model, including input query length and number of models considered.\nFor example:"]}),"\n",(0,r.jsx)(x.Code,{codeConfig:u,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",(0,r.jsx)(t.p,{children:"This is useful for debugging if you feel the judge model isn't selecting the best model."}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"parser",children:"Parser"}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Parser"})," component extracts text from structured data (",(0,r.jsx)(t.code,{children:"DataFrame"})," or ",(0,r.jsx)(t.code,{children:"Data"}),") using a template or direct stringification.\nThe output is a ",(0,r.jsx)(t.code,{children:"Message"})," containing the parsed text."]}),"\n",(0,r.jsxs)(t.p,{children:["This is a versatile component for data extraction and manipulation in your flows.\nFor examples of ",(0,r.jsx)(t.strong,{children:"Parser"})," components in flows, see the following:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:(0,r.jsxs)(t.a,{href:"#batch-run",children:[(0,r.jsx)(t.strong,{children:"Batch Run"})," component"]})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsxs)(t.a,{href:"#structured-output",children:[(0,r.jsx)(t.strong,{children:"Structured Output"})," component"]})}),"\n",(0,r.jsxs)(t.li,{children:[(0,r.jsx)(t.strong,{children:"Financial Report Parser"})," template"]}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsxs)(t.a,{href:"/components-vector-stores",children:[(0,r.jsx)(t.strong,{children:"Vector Store"})," components"]})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.a,{href:"/webhook",children:"Trigger flows with webhooks"})}),"\n",(0,r.jsx)(t.li,{children:(0,r.jsx)(t.a,{href:"/chat-with-rag",children:"Create a vector RAG chatbot"})}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"A flow that uses a Parser component to extract text from a Structured Output component.",src:n(96218).A+"",width:"4000",height:"2202"})}),"\n",(0,r.jsx)(t.h3,{id:"parsing-modes",children:"Parsing modes"}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Parser"})," component has two modes: ",(0,r.jsx)(t.strong,{children:"Parser"})," and ",(0,r.jsx)(t.strong,{children:"Stringify"}),"."]}),"\n",(0,r.jsxs)(c.A,{children:[(0,r.jsxs)(l.A,{value:"template",label:"Parser (template) mode",default:!0,children:[(0,r.jsxs)(t.p,{children:["In ",(0,r.jsx)(t.strong,{children:"Parser"})," mode, you create a template for text output that can include literal strings and variables for extracted keys."]}),(0,r.jsxs)(t.p,{children:["Use curly braces to define variables anywhere in the template.\nVariables must match keys in the ",(0,r.jsx)(t.code,{children:"DataFrame"})," or ",(0,r.jsx)(t.code,{children:"Data"})," input, such as column names.\nFor example, ",(0,r.jsx)(t.code,{children:"{name}"})," extracts the value of a ",(0,r.jsx)(t.code,{children:"name"})," key.\nFor more information about the content and structure of ",(0,r.jsx)(t.code,{children:"DataFrame"})," and ",(0,r.jsx)(t.code,{children:"Data"})," objects, see ",(0,r.jsx)(t.a,{href:"/data-types",children:"Langflow data types"}),"."]}),(0,r.jsxs)(t.p,{children:["When the flow runs, the ",(0,r.jsx)(t.strong,{children:"Parser"})," component iterates over the input, producing a ",(0,r.jsx)(t.code,{children:"Message"})," for each parsed item.\nFor example, parsing a ",(0,r.jsx)(t.code,{children:"DataFrame"})," creates a ",(0,r.jsx)(t.code,{children:"Message"})," for each row, populated with the unique values from that row."]}),(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Employee summary template"}),(0,r.jsx)(t.p,{children:"This example template extracts employee data into a natural language summary about an employee's hire date and current role:"}),(0,r.jsx)(x.Code,{codeConfig:u,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{employee_first_name} {employee_last_name} was hired on {start_date}.",props:{}}]},{tokens:[{content:"Their current position is {job_title} ({grade}).",props:{}}]}],lang:"text"},annotations:[]}]}),(0,r.jsxs)(t.p,{children:["The resulting ",(0,r.jsx)(t.code,{children:"Message"})," output replaces the variables with the corresponding extracted values.\nFor example:"]}),(0,r.jsx)(x.Code,{codeConfig:u,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Renlo Kai was hired on 11-July-2017.",props:{}}]},{tokens:[{content:"Their current position is Software Engineer (Principal).",props:{}}]}],lang:"text"},annotations:[]}]})]}),(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Employee profile template"}),(0,r.jsx)(t.p,{children:"This example template uses Markdown syntax and extracted employee data to create an employee profile:"}),(0,r.jsx)(x.Code,{codeConfig:u,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:[]}]}),(0,r.jsxs)(t.p,{children:["When the flow runs, the ",(0,r.jsx)(t.strong,{children:"Parser"})," component iterates over each row of the ",(0,r.jsx)(t.code,{children:"DataFrame"}),", populating the template's variables with the appropriate extracted values.\nThe resulting text for each row is output as a ",(0,r.jsx)(t.a,{href:"/data-types#message",children:(0,r.jsx)(t.code,{children:"Message"})}),"."]})]}),(0,r.jsxs)(t.p,{children:["The following parameters are available in ",(0,r.jsx)(t.strong,{children:"Parser"})," mode.\nTo view and edit all available parameters, click ",(0,r.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Controls"})," in the ",(0,r.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),(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:"Data or DataFrame"}),(0,r.jsxs)(t.td,{children:["Input parameter. The ",(0,r.jsx)(t.code,{children:"Data"})," or ",(0,r.jsx)(t.code,{children:"DataFrame"})," input to parse."]})]}),(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:["Input parameter. The formatting template using plaintext and variables for keys (",(0,r.jsx)(t.code,{children:"{KEY_NAME}"}),"). See the preceding examples for more information."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"sep"}),(0,r.jsx)(t.td,{children:"Separator"}),(0,r.jsxs)(t.td,{children:["Input parameter. A string defining the separator for rows or lines. Default: ",(0,r.jsx)(t.code,{children:"\\n"})," (new line)."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"clean_data"}),(0,r.jsx)(t.td,{children:"Clean Data"}),(0,r.jsxs)(t.td,{children:["Whether to remove empty rows and lines in each cell or key of the ",(0,r.jsx)(t.code,{children:"DataFrame"})," or ",(0,r.jsx)(t.code,{children:"Data"})," input. Default: Enabled (true)"]})]})]})]})]}),(0,r.jsxs)(l.A,{value:"stringify",label:"Stringify mode",children:[(0,r.jsxs)(t.p,{children:["Use ",(0,r.jsx)(t.strong,{children:"Stringify"})," mode to convert the entire input directly to text.\nThis mode doesn't support templates or key selection."]}),(0,r.jsxs)(t.p,{children:["The following parameters are available in ",(0,r.jsx)(t.strong,{children:"Stringify"})," mode.\nTo view and edit all available parameters, click ",(0,r.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Controls"})," in the ",(0,r.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),(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:"Data or DataFrame"}),(0,r.jsxs)(t.td,{children:["Input parameter. The ",(0,r.jsx)(t.code,{children:"Data"})," or ",(0,r.jsx)(t.code,{children:"DataFrame"})," input to parse."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"sep"}),(0,r.jsx)(t.td,{children:"Separator"}),(0,r.jsxs)(t.td,{children:["Input parameter. A string defining the separator for rows or lines. Default: ",(0,r.jsx)(t.code,{children:"\\n"})," (new line)."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"clean_data"}),(0,r.jsx)(t.td,{children:"Clean Data"}),(0,r.jsxs)(t.td,{children:["Whether to remove empty rows and lines in each cell or key of the ",(0,r.jsx)(t.code,{children:"DataFrame"})," or ",(0,r.jsx)(t.code,{children:"Data"})," input. Default: Enabled (true)"]})]})]})]})]})]}),"\n",(0,r.jsx)(t.h3,{id:"test-and-troubleshoot-parsed-text",children:"Test and troubleshoot parsed text"}),"\n",(0,r.jsxs)(t.p,{children:["To test the ",(0,r.jsx)(t.strong,{children:"Parser"})," component, click ",(0,r.jsx)(i.A,{name:"Play","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Run component"}),", and then click ",(0,r.jsx)(i.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Inspect output"})," to see the ",(0,r.jsx)(t.code,{children:"Message"})," output with the parsed text.\nYou can also connect a ",(0,r.jsx)(t.strong,{children:"Chat Output"})," component if you want to view the output in the ",(0,r.jsx)(t.strong,{children:"Playground"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["If the ",(0,r.jsx)(t.code,{children:"Message"})," output from the ",(0,r.jsx)(t.strong,{children:"Parser"})," component has empty or unexpected values, there might be a mapping error between the input and the parsing mode, the input has empty values, or the input isn't suitable for plaintext extraction."]}),"\n",(0,r.jsxs)(t.p,{children:["For example, assume you use the following template to parse a ",(0,r.jsx)(t.code,{children:"DataFrame"}),":"]}),"\n",(0,r.jsx)(x.Code,{codeConfig:u,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{employee_first_name} {employee_last_name} is a {job_title} ({grade}).",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(t.p,{children:["The following ",(0,r.jsx)(t.code,{children:"Message"})," could result from parsing a row where ",(0,r.jsx)(t.code,{children:"employee_first_name"})," was empty and ",(0,r.jsx)(t.code,{children:"grade"})," was ",(0,r.jsx)(t.code,{children:"null"}),":"]}),"\n",(0,r.jsx)(x.Code,{codeConfig:u,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:" Smith is a Software Engineer (null).",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsx)(t.p,{children:"To troubleshoot missing or unexpected values, you can do the following:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Make sure the variables in your template map to keys in the incoming ",(0,r.jsx)(t.code,{children:"Data"})," or ",(0,r.jsx)(t.code,{children:"DataFrame"}),".\nTo see the data being passed directly to the ",(0,r.jsx)(t.strong,{children:"Parser"})," component, click ",(0,r.jsx)(i.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Inspect output"})," on the component that is sending data to the ",(0,r.jsx)(t.strong,{children:"Parser"})," component."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsx)(t.p,{children:"Check the source data for missing or incorrect values.\nThere are several ways you can address these inconsistencies:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsx)(t.li,{children:"Rectify the source data directly."}),"\n",(0,r.jsxs)(t.li,{children:["Use other components to amend or filter anomalies before passing the data to the ",(0,r.jsx)(t.strong,{children:"Parser"})," component.\nThere are many components you can use for this depending on your goal, such as the ",(0,r.jsx)(t.strong,{children:"Data Operations"}),", ",(0,r.jsx)(t.strong,{children:"Structured Output"}),", and ",(0,r.jsx)(t.strong,{children:"Smart Function"})," components."]}),"\n",(0,r.jsxs)(t.li,{children:["Enable the ",(0,r.jsx)(t.strong,{children:"Parser"})," component's ",(0,r.jsx)(t.strong,{children:"Clean Data"})," parameter to skip empty rows or lines."]}),"\n"]}),"\n"]}),"\n"]}),"\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.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Python Interpreter"})," component can only import packages that are already installed in your Langflow environment.\nIf you encounter an ",(0,r.jsx)(t.code,{children:"ImportError"})," when trying to use a package, you need to install it first."]}),"\n",(0,r.jsxs)(t.p,{children:["To install custom packages, see ",(0,r.jsx)(t.a,{href:"/install-custom-dependencies",children:"Install custom dependencies"}),"."]}),"\n",(0,r.jsx)(t.h3,{id:"use-the-python-interpreter-in-a-flow",children:"Use the Python Interpreter in a flow"}),"\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:["Optional: Enable ",(0,r.jsx)(t.strong,{children:"Tool Mode"}),", and then connect the ",(0,r.jsx)(t.strong,{children:"Python Interpreter"})," component to an ",(0,r.jsx)(t.strong,{children:"Agent"})," component as a tool.\nFor example, connect a ",(0,r.jsx)(t.strong,{children:"Python Interpreter"})," component and a ",(0,r.jsxs)(t.a,{href:"/components-helpers#calculator",children:[(0,r.jsx)(t.strong,{children:"Calculator"})," component"]})," as tools for an ",(0,r.jsx)(t.strong,{children:"Agent"})," component, and then test how it chooses different tools to solve math problems.\n",(0,r.jsx)(t.img,{alt:"Python Interpreter and Calculator components connected to an Agent component",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)(x.Code,{codeConfig:u,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)(x.Code,{codeConfig:u,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)(x.Code,{codeConfig:u,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 ",(0,r.jsx)(t.strong,{children:"Python Interpreter"})," component in the ",(0,r.jsx)(t.strong,{children:"Global Imports"})," field."]}),"\n",(0,r.jsx)(t.h3,{id:"python-interpreter-parameters",children:"Python Interpreter parameters"}),"\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:"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:["Input parameter. 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:"Input parameter. The Python code to execute. Only modules specified in Global Imports can be used."})]}),(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:"Output parameter. 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:["The ",(0,r.jsx)(t.strong,{children:"Save File"})," component creates a file containing data produced by another component.\nSeveral file formats are supported, and you can store files in ",(0,r.jsx)(t.a,{href:"/memory",children:"Langflow storage"})," or the local file system."]}),"\n",(0,r.jsxs)(t.p,{children:["To configure the ",(0,r.jsx)(t.strong,{children:"Save File"})," component and use it 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 ",(0,r.jsx)(t.a,{href:"/data-types#dataframe",children:(0,r.jsx)(t.code,{children:"DataFrame"})}),", ",(0,r.jsx)(t.a,{href:"/data-types#data",children:(0,r.jsx)(t.code,{children:"Data"})}),", or ",(0,r.jsx)(t.a,{href:"/data-types#message",children:(0,r.jsx)(t.code,{children:"Message"})})," output from another component to the ",(0,r.jsx)(t.strong,{children:"Save File"})," component's ",(0,r.jsx)(t.strong,{children:"Input"})," port."]}),"\n",(0,r.jsxs)(t.p,{children:["You can connect the same output to multiple ",(0,r.jsx)(t.strong,{children:"Save File"})," components if you want to create multiple files, save the data in different file formats, or save files to multiple locations."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["In ",(0,r.jsx)(t.strong,{children:"File Name"}),", enter a file name and an optional path."]}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"File Name"})," parameter controls where the file is saved.\nIt can contain a file name or an entire file path:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Default location"}),": If you only provide a file name, then the file is stored in ",(0,r.jsx)(t.code,{children:".langflow/data"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Subdirectory"}),": To store files in subdirectories, add the path to the ",(0,r.jsx)(t.strong,{children:"File Name"})," parameter.\nFor example, ",(0,r.jsx)(t.code,{children:"subdirectory/my_file"})," creates ",(0,r.jsx)(t.code,{children:"my_file"})," in ",(0,r.jsx)(t.code,{children:".langflow/data/subdirectory"}),".\nIf a given subdirectory doesn't already exist, Langflow automatically creates it."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Absolute or relative path"}),": To store files elsewhere in your ",(0,r.jsx)(t.code,{children:".langflow"})," installation or the local file system, provide the absolute or relative path to the desired location.\nFor example, ",(0,r.jsx)(t.code,{children:"~/Desktop/my_file"})," saves ",(0,r.jsx)(t.code,{children:"my_file"})," to the desktop."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["Don't include an extension in the file name.\nIf you do, the extension is treated as part of the file name; it has no impact on the ",(0,r.jsx)(t.strong,{children:"File Format"})," parameter."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["In the ",(0,r.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),", click ",(0,r.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Controls"}),", select the desired file format, and then click ",(0,r.jsx)(t.strong,{children:"Close"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["The available ",(0,r.jsx)(t.strong,{children:"File Format"})," options depend on the input data type:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.code,{children:"DataFrame"})," can be saved to CSV (default), Excel (requires ",(0,r.jsx)(t.code,{children:"openpyxl"})," ",(0,r.jsx)(t.a,{href:"/install-custom-dependencies",children:"custom dependency"}),"), JSON (fallback default), or Markdown."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.code,{children:"Data"})," can be saved to CSV, Excel (requires ",(0,r.jsx)(t.code,{children:"openpyxl"})," ",(0,r.jsx)(t.a,{href:"/install-custom-dependencies",children:"custom dependency"}),"), JSON (default), or Markdown."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.code,{children:"Message"})," can be saved to TXT, JSON (default), or Markdown."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(t.admonition,{title:"Overwrites allowed",type:"important",children:(0,r.jsxs)(t.p,{children:["If you have multiple ",(0,r.jsx)(t.strong,{children:"Save File"})," components, in one or more flows, with the same file name, path, and extension, the file contains the data from the most recent run only.\nLangflow doesn't block overwrites if a matching file already exists.\nTo avoid unintended overwrites, use unique file names and paths."]})}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["To test the ",(0,r.jsx)(t.strong,{children:"Save File"})," component, click ",(0,r.jsx)(i.A,{name:"Play","aria-hidden":"True"})," ",(0,r.jsx)(t.strong,{children:"Run component"}),", and then click ",(0,r.jsx)(i.A,{name:"TextSearch","aria-hidden":"True"})," ",(0,r.jsx)(t.strong,{children:"Inspect output"})," to get the filepath where the file was saved."]}),"\n",(0,r.jsxs)(t.p,{children:["The component's literal output is a ",(0,r.jsx)(t.code,{children:"Message"})," containing the original data type, the file name and extension, and the absolute filepath to the file based on the ",(0,r.jsx)(t.strong,{children:"File Name"})," parameter.\nFor example:"]}),"\n",(0,r.jsx)(x.Code,{codeConfig:u,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"DataFrame saved successfully as 'my_file.csv' at /Users/user.name/.langflow/data/my_file.csv",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(t.p,{children:["If the ",(0,r.jsx)(t.strong,{children:"File Name"})," contains a subdirectory or other non-default path, this is reflected in the ",(0,r.jsx)(t.code,{children:"Message"})," output.\nFor example, a CSV file with the file name ",(0,r.jsx)(t.code,{children:"~/Desktop/my_file"})," could produce the following output:"]}),"\n",(0,r.jsx)(x.Code,{codeConfig:u,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"DataFrame saved successfully as '/Users/user.name/Desktop/my_file.csv' at /Users/user.name/Desktop/my_file.csv",props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsx)(t.p,{children:"Optional: If you want to use the saved file in a flow, you must use an API call or another component to retrieve the file from the given filepath."}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"smart-function",children:"Smart Function"}),"\n",(0,r.jsxs)(t.p,{children:["In Langflow version 1.5, this component was renamed from ",(0,r.jsx)(t.strong,{children:"Lambda Filter"})," to ",(0,r.jsx)(t.strong,{children:"Smart Function"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Smart Function"})," component uses an LLM to generate a Lambda function to filter or transform structured data based on natural language instructions.\nYou must connect this component to a ",(0,r.jsxs)(t.a,{href:"/components-models",children:[(0,r.jsx)(t.strong,{children:"Language Model"})," component"]}),", which is used to generate a function based on the natural language instructions you provide in the ",(0,r.jsx)(t.strong,{children:"Instructions"})," parameter.\nThe LLM runs the function against the data input, and then outputs the results as ",(0,r.jsx)(t.a,{href:"/data-types#data",children:(0,r.jsx)(t.code,{children:"Data"})}),"."]}),"\n",(0,r.jsxs)(t.admonition,{type:"tip",children:[(0,r.jsxs)(t.p,{children:["Provide brief, clear instructions, focusing on the desired outcome or specific actions, such as ",(0,r.jsx)(t.code,{children:"Filter the data to only include items where the 'status' is 'active'"}),".\nOne sentence or less is preferred because end punctuation, like periods, can cause errors or unexpected behavior."]}),(0,r.jsxs)(t.p,{children:["If you need to provide more details instructions that aren't directly relevant to the Lambda function, you can input them in the ",(0,r.jsx)(t.strong,{children:"Language Model"})," component's ",(0,r.jsx)(t.strong,{children:"Input"})," field or through a ",(0,r.jsx)(t.strong,{children:"Prompt Template"})," component."]})]}),"\n",(0,r.jsxs)(t.p,{children:["The following example uses the ",(0,r.jsx)(t.strong,{children:"API Request"})," endpoint to pass JSON data from the ",(0,r.jsx)(t.code,{children:"https://jsonplaceholder.typicode.com/users"})," endpoint to the ",(0,r.jsx)(t.strong,{children:"Smart Function"})," component.\nThen, the ",(0,r.jsx)(t.strong,{children:"Smart Function"})," component passes the data and the instruction ",(0,r.jsx)(t.code,{children:"extract emails"})," to the attached ",(0,r.jsx)(t.strong,{children:"Language Model"})," component.\nFrom there, the LLM generates a filter function that extracts email addresses from the JSON data, returning the filtered data as chat output."]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"A small flow using a Smart Function component to extract data from an API response.",src:n(66539).A+"",width:"4000",height:"1796"})}),"\n",(0,r.jsx)(t.h3,{id:"smart-function-parameters",children:"Smart Function parameters"}),"\n",(0,r.jsxs)(t.p,{children:["Some ",(0,r.jsx)(t.strong,{children:"Smart Function"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,r.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Controls"})," in the ",(0,r.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\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:"data"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsx)(t.td,{children:"Input parameter. 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:["Input parameter. Connect ",(0,r.jsx)(t.a,{href:"/data-types#languagemodel",children:(0,r.jsx)(t.code,{children:"LanguageModel"})})," output from a ",(0,r.jsx)(t.strong,{children:"Language 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.jsx)(t.td,{children:"Input parameter. The natural language instructions for how to filter or transform the data. The LLM uses these instructions to create a Lambda function."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"sample_size"}),(0,r.jsx)(t.td,{children:"Sample Size"}),(0,r.jsxs)(t.td,{children:["Input parameter. For large datasets, the number of characters to sample from the dataset head and tail. Only applied if the dataset meets or exceeds ",(0,r.jsx)(t.code,{children:"max_size"}),". Default: ",(0,r.jsx)(t.code,{children:"1000"}),"."]})]}),(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:["Input parameter. The number of characters for the dataset to be considered large, which triggers sampling by the ",(0,r.jsx)(t.code,{children:"sample_size"})," value. Default: ",(0,r.jsx)(t.code,{children:"30000"}),"."]})]})]})]}),"\n",(0,r.jsx)(t.h2,{id:"split-text",children:"Split Text"}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Split Text"})," component splits data into chunks based on parameters like chunk size and separator.\nIt is often used to chunk data to be tokenized and embedded into vector databases.\nFor examples, see ",(0,r.jsx)(t.a,{href:"/components-vector-stores#use-vector-store-components-in-a-flow",children:"Use Vector Store components in a flow"}),", ",(0,r.jsx)(t.a,{href:"/components-embedding-models#use-embedding-model-components-in-a-flow",children:"Use Embedding Model components in a flow"}),", and ",(0,r.jsx)(t.a,{href:"/chat-with-rag",children:"Create a Vector RAG chatbot"}),"."]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"An embedding generation flow that uses a Split Text component to chunk data.",src:n(49823).A+"",width:"4000",height:"2766"})}),"\n",(0,r.jsxs)(t.p,{children:["The component accepts ",(0,r.jsx)(t.code,{children:"Message"}),", ",(0,r.jsx)(t.code,{children:"Data"}),", or ",(0,r.jsx)(t.code,{children:"DataFrame"}),", and then outputs either ",(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 ",(0,r.jsx)(t.a,{href:"/data-types#data",children:(0,r.jsx)(t.code,{children:"Data"})})," objects containing individual text chunks.\nThe ",(0,r.jsx)(t.strong,{children:"DataFrame"})," output returns the list of chunks as a structured ",(0,r.jsx)(t.a,{href:"/data-types#dataframe",children:(0,r.jsx)(t.code,{children:"DataFrame"})})," with additional ",(0,r.jsx)(t.code,{children:"text"})," and ",(0,r.jsx)(t.code,{children:"metadata"})," columns."]}),"\n",(0,r.jsx)(t.h3,{id:"split-text-parameters",children:"Split Text parameters"}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Split Text"})," component's parameters control how the text is split into chunks, specifically the ",(0,r.jsx)(t.code,{children:"chunk_size"}),", ",(0,r.jsx)(t.code,{children:"chunk_overlap"}),", and ",(0,r.jsx)(t.code,{children:"separator"})," parameters."]}),"\n",(0,r.jsxs)(t.p,{children:["To test the chunking behavior, add a ",(0,r.jsx)(t.strong,{children:"Text Input"})," or ",(0,r.jsx)(t.strong,{children:"File"})," component with some sample data to chunk, click ",(0,r.jsx)(i.A,{name:"Play","aria-hidden":"True"})," ",(0,r.jsx)(t.strong,{children:"Run component"})," on the ",(0,r.jsx)(t.strong,{children:"Split Text"})," component, and then click ",(0,r.jsx)(i.A,{name:"TextSearch","aria-hidden":"True"})," ",(0,r.jsx)(t.strong,{children:"Inspect output"})," to view the list of chunks and their metadata. The ",(0,r.jsx)(t.strong,{children:"text"})," column contains the actual text chunks created from your chunking settings.\nIf the chunks aren't split as you expect, adjust the parameters, rerun the component, and then inspect the new output."]}),"\n",(0,r.jsxs)(t.p,{children:["Some ",(0,r.jsx)(t.strong,{children:"Split Text"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,r.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Controls"})," in the ",(0,r.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\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:"data_inputs"}),(0,r.jsx)(t.td,{children:"Input"}),(0,r.jsxs)(t.td,{children:["Input parameter. The data to split. Input must be in ",(0,r.jsx)(t.code,{children:"Message"}),", ",(0,r.jsx)(t.code,{children:"Data"}),", or ",(0,r.jsx)(t.code,{children:"DataFrame"})," format."]})]}),(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:["Input parameter. The number of characters to overlap between chunks. This helps maintain context across chunks. When a separator is encountered, the overlap is applied at the point of the separator so that the subsequent chunk contains the last ",(0,r.jsx)(t.em,{children:"n"})," characters of the preceding chunk. 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:["Input parameter. The target length for each chunk after splitting. The data is first split by separator, and then chunks smaller than the ",(0,r.jsx)(t.code,{children:"chunk_size"})," are merged up to this limit. However, if the initial separator split produces any chunks larger than the ",(0,r.jsx)(t.code,{children:"chunk_size"}),", those chunks are neither further subdivided nor combined with any smaller chunks; these chunks will be output as-is even though they exceed the the ",(0,r.jsx)(t.code,{children:"chunk_size"}),". Default: ",(0,r.jsx)(t.code,{children:"1000"}),". See ",(0,r.jsx)(t.a,{href:"#chunk-size",children:"Tokenization errors due to chunk size"})," for important considerations."]})]}),(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:["Input parameter. A string defining a character to split on, such as ",(0,r.jsx)(t.code,{children:"\\n"})," to split on new line characters, ",(0,r.jsx)(t.code,{children:"\\n\\n"})," to split at paragraph breaks, or ",(0,r.jsx)(t.code,{children:"},"})," to split at the end of JSON objects. You can directly provide the separator string, or pass a separator string from another component as ",(0,r.jsx)(t.code,{children:"Message"})," input."]})]}),(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:["Input parameter. The key to use for the text column that is extracted from the input and then split. Default: ",(0,r.jsx)(t.code,{children:"text"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"keep_separator"}),(0,r.jsx)(t.td,{children:"Keep Separator"}),(0,r.jsxs)(t.td,{children:["Input parameter. Select how to handle separators in output chunks. If False, separators are omitted from output chunks. Options include ",(0,r.jsx)(t.code,{children:"False"})," (remove separators), ",(0,r.jsx)(t.code,{children:"True"})," (keep separators in chunks without preference for placement), ",(0,r.jsx)(t.code,{children:"Start"})," (place separators at the beginning of chunks), or ",(0,r.jsx)(t.code,{children:"End"})," (place separators at the end of chunks). Default: ",(0,r.jsx)(t.code,{children:"False"}),"."]})]})]})]}),"\n",(0,r.jsx)(t.h3,{id:"chunk-size",children:"Tokenization errors due to chunk size"}),"\n",(0,r.jsxs)(t.p,{children:["When using ",(0,r.jsx)(t.strong,{children:"Split Text"})," with embedding models (especially NVIDIA models like ",(0,r.jsx)(t.code,{children:"nvidia/nv-embed-v1"}),"), you may need to use smaller chunk sizes (",(0,r.jsx)(t.code,{children:"500"})," or less) even though the model supports larger token limits.\nThe ",(0,r.jsx)(t.strong,{children:"Split Text"})," component doesn't always enforce the exact chunk size you set, and individual chunks may exceed your specified limit.\nIf you encounter tokenization errors, modify your text splitting strategy by reducing the chunk size, changing the overlap length, or using a more common separator.\nThen, test your configuration by running the flow and inspecting the component's output."]}),"\n",(0,r.jsx)(t.h3,{id:"other-text-splitters",children:"Other text splitters"}),"\n",(0,r.jsxs)(t.p,{children:["See ",(0,r.jsx)(t.a,{href:"/bundles-langchain#text-splitters",children:"LangChain text splitter components"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"structured-output",children:"Structured Output"}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component uses an LLM to transform any input into structured data (",(0,r.jsx)(t.code,{children:"Data"})," or ",(0,r.jsx)(t.code,{children:"DataFrame"}),") using natural language formatting instructions and an output schema definition.\nFor example, you can extract specific details from documents, like email messages or scientific papers."]}),"\n",(0,r.jsx)(t.h3,{id:"use-the-structured-output-component-in-a-flow",children:"Use the Structured Output component in a flow"}),"\n",(0,r.jsxs)(t.p,{children:["To use the ",(0,r.jsx)(t.strong,{children:"Structured Output"})," 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:["Provide an ",(0,r.jsx)(t.strong,{children:"Input Message"}),", which is the source material from which you want to extract structured data.\nThis can come from practically any component, but it is typically a ",(0,r.jsx)(t.strong,{children:"Chat Input"}),", ",(0,r.jsx)(t.strong,{children:"File"}),", or other component that provides some unstructured or semi-structured input."]}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsxs)(t.p,{children:["Not all source material has to become structured output.\nThe power of the ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component is that you can specify the information you want to extract, even if that data isn't explicitly labeled or an exact keyword match.\nThen, the LLM can use your instructions to analyze the source material, extract the relevant data, and format it according to your specifications.\nAny irrelevant source material isn't included in the structured output."]})}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Define ",(0,r.jsx)(t.strong,{children:"Format Instructions"})," and an ",(0,r.jsx)(t.strong,{children:"Output Schema"})," to specify the data to extract from the source material and how to structure it in the final ",(0,r.jsx)(t.code,{children:"Data"})," or ",(0,r.jsx)(t.code,{children:"DataFrame"})," output."]}),"\n",(0,r.jsx)(t.p,{children:"The instructions are a prompt that tell the LLM what data to extract, how to format it, how to handle exceptions, and any other instructions relevant to preparing the structured data."}),"\n",(0,r.jsxs)(t.p,{children:["The schema is a table that defines the fields (keys) and data types to organize the data extracted by the LLM into a structured ",(0,r.jsx)(t.code,{children:"Data"})," or ",(0,r.jsx)(t.code,{children:"DataFrame"})," object.\nFor more information, see ",(0,r.jsx)(t.a,{href:"#output-schema-options",children:"Output Schema options"})]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Attach a ",(0,r.jsxs)(t.a,{href:"/components-models",children:[(0,r.jsx)(t.strong,{children:"Language Model"})," component"]})," that is set to emit ",(0,r.jsx)(t.a,{href:"/data-types#languagemodel",children:(0,r.jsx)(t.code,{children:"LanguageModel"})})," output."]}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Language Model"})," component uses the ",(0,r.jsx)(t.strong,{children:"Input Message"})," and ",(0,r.jsx)(t.strong,{children:"Format Instructions"})," from the ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component to extract specific pieces of data from the input text.\nThe output schema is applied to the model's response to produce the final ",(0,r.jsx)(t.code,{children:"Data"})," or ",(0,r.jsx)(t.code,{children:"DataFrame"})," structured object."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Optional: Typically, the structured output is passed to downstream components that use the extracted data for other processes, such as other ",(0,r.jsx)(t.strong,{children:"Processing"})," components like the ",(0,r.jsx)(t.strong,{children:"Parser"})," or ",(0,r.jsx)(t.strong,{children:"Data Operations"})," components."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"A basic flow with Structured Output, Language Model, Type Convert, and Chat Input and Output components.",src:n(82798).A+"",width:"4000",height:"1724"})}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Structured Output example: Financial Report Parser template"}),(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Financial Report Parser"})," template provides an example of how the ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component can be used to extract structured data from unstructured text."]}),(0,r.jsxs)(t.p,{children:["The template's ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component has the following configuration:"]}),(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Input Message"})," comes from a ",(0,r.jsx)(t.strong,{children:"Chat Input"})," component that is preloaded with quotes from sample financial reports"]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Format Instructions"})," are as follows:"]}),"\n",(0,r.jsx)(x.Code,{codeConfig:u,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"You are an AI that extracts structured JSON objects from unstructured text.",props:{}}]},{tokens:[{content:"Use a predefined schema with expected types (str, int, float, bool, dict).",props:{}}]},{tokens:[{content:"Extract ALL relevant instances that match the schema - if multiple patterns exist, capture them all.",props:{}}]},{tokens:[{content:"Fill missing or ambiguous values with defaults: null for missing values.",props:{}}]},{tokens:[{content:"Remove exact duplicates but keep variations that have different field values.",props:{}}]},{tokens:[{content:"Always return valid JSON in the expected format, never throw errors.",props:{}}]},{tokens:[{content:"If multiple objects can be extracted, return them all in the structured format.",props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Output Schema"})," includes keys for ",(0,r.jsx)(t.code,{children:"EBITDA"}),", ",(0,r.jsx)(t.code,{children:"NET_INCOME"}),", and ",(0,r.jsx)(t.code,{children:"GROSS_PROFIT"}),"."]}),"\n"]}),"\n"]}),(0,r.jsxs)(t.p,{children:["The structured ",(0,r.jsx)(t.code,{children:"Data"})," object is passed to a ",(0,r.jsx)(t.strong,{children:"Parser"})," component that produces a text string by mapping the schema keys to variables in the parsing template:"]}),(0,r.jsx)(x.Code,{codeConfig:u,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:[]}]}),(0,r.jsxs)(t.p,{children:["When printed to the ",(0,r.jsx)(t.strong,{children:"Playground"}),", the resulting ",(0,r.jsx)(t.code,{children:"Message"})," replaces the variables with the actual values extracted by the ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component. For example:"]}),(0,r.jsx)(x.Code,{codeConfig:u,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,r.jsx)(t.h3,{id:"structured-output-parameters",children:"Structured Output parameters"}),"\n",(0,r.jsxs)(t.p,{children:["Some ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,r.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Controls"})," in the ",(0,r.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\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:"Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsxs)(t.td,{children:["Language Model (",(0,r.jsx)(t.code,{children:"llm"}),")"]}),(0,r.jsx)(t.td,{children:(0,r.jsx)(t.code,{children:"LanguageModel"})}),(0,r.jsxs)(t.td,{children:["Input parameter. The ",(0,r.jsx)(t.a,{href:"/data-types#languagemodel",children:(0,r.jsx)(t.code,{children:"LanguageModel"})})," output from a ",(0,r.jsx)(t.strong,{children:"Language Model"})," component that defines the LLM to use to analyze, extract, and prepare the structured output."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsxs)(t.td,{children:["Input Message (",(0,r.jsx)(t.code,{children:"input_value"}),")"]}),(0,r.jsx)(t.td,{children:"String"}),(0,r.jsx)(t.td,{children:"Input parameter. The input message containing source material for extraction."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsxs)(t.td,{children:["Format Instructions (",(0,r.jsx)(t.code,{children:"system_prompt"}),")"]}),(0,r.jsx)(t.td,{children:"String"}),(0,r.jsx)(t.td,{children:"Input parameter. The instructions to the language model for extracting and formatting the output."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsxs)(t.td,{children:["Schema Name (",(0,r.jsx)(t.code,{children:"schema_name"}),")"]}),(0,r.jsx)(t.td,{children:"String"}),(0,r.jsxs)(t.td,{children:["Input parameter. An optional title for the ",(0,r.jsx)(t.strong,{children:"Output Schema"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsxs)(t.td,{children:["Output Schema (",(0,r.jsx)(t.code,{children:"output_schema"}),")"]}),(0,r.jsx)(t.td,{children:"Table"}),(0,r.jsxs)(t.td,{children:["Input parameter. A table describing the schema of the desired structured output, ultimately determining the content of the ",(0,r.jsx)(t.code,{children:"Data"})," or ",(0,r.jsx)(t.code,{children:"DataFrame"})," output. See ",(0,r.jsx)(t.a,{href:"#output-schema-options",children:"Output Schema options"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsxs)(t.td,{children:["Structured Output (",(0,r.jsx)(t.code,{children:"structured_output"}),")"]}),(0,r.jsxs)(t.td,{children:[(0,r.jsx)(t.code,{children:"Data"})," or ",(0,r.jsx)(t.code,{children:"DataFrame"})]}),(0,r.jsxs)(t.td,{children:["Output parameter. The final structured output produced by the component. Near the component's output port, you can select the output data type as either ",(0,r.jsx)(t.strong,{children:"Structured Output Data"})," or ",(0,r.jsx)(t.strong,{children:"Structured Output DataFrame"}),". The specific content and structure of the output depends on the input parameters."]})]})]})]}),"\n",(0,r.jsx)(t.h4,{id:"output-schema-options",children:"Output Schema options"}),"\n",(0,r.jsxs)(t.p,{children:["After the LLM extracts the relevant data from the ",(0,r.jsx)(t.strong,{children:"Input Message"})," and ",(0,r.jsx)(t.strong,{children:"Format Instructions"}),", the data is organized according to the ",(0,r.jsx)(t.strong,{children:"Output Schema"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["The schema is a table that defines the fields (keys) and data types for the final ",(0,r.jsx)(t.code,{children:"Data"})," or ",(0,r.jsx)(t.code,{children:"DataFrame"})," output from the ",(0,r.jsx)(t.strong,{children:"Structured Output"})," component."]}),"\n",(0,r.jsxs)(t.p,{children:["The default schema is a single ",(0,r.jsx)(t.code,{children:"field"})," string."]}),"\n",(0,r.jsxs)(t.p,{children:["To add a key to the schema, click ",(0,r.jsx)(i.A,{name:"Plus","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Add a new row"}),", and then edit each column to define the schema:"]}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Name"}),": The name of the output field. Typically a specific key for which you want to extract a value."]}),"\n",(0,r.jsxs)(t.p,{children:["You can reference these keys as variables in downstream components, such as a ",(0,r.jsx)(t.strong,{children:"Parser"})," component's template.\nFor example, the schema key ",(0,r.jsx)(t.code,{children:"NET_INCOME"})," could be referenced by the variable ",(0,r.jsx)(t.code,{children:"{NET_INCOME}"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Description"}),": An optional metadata description of the field's contents and purpose."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"Type"}),": The data type of the value stored in the field.\nSupported types are ",(0,r.jsx)(t.code,{children:"str"})," (default), ",(0,r.jsx)(t.code,{children:"int"}),", ",(0,r.jsx)(t.code,{children:"float"}),", ",(0,r.jsx)(t.code,{children:"bool"}),", and ",(0,r.jsx)(t.code,{children:"dict"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.strong,{children:"As List"}),": Enable this setting if you want the field to contain a list of values rather than a single value."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["For simple schemas, you might only extract a few ",(0,r.jsx)(t.code,{children:"string"})," or ",(0,r.jsx)(t.code,{children:"int"})," fields.\nFor more complex schemas with lists and dictionaries, it might help to refer to the ",(0,r.jsx)(t.code,{children:"Data"})," and ",(0,r.jsx)(t.code,{children:"DataFrame"})," structures and attributes, as described in ",(0,r.jsx)(t.a,{href:"/data-types",children:"Langflow data types"}),".\nYou can also emit a rough ",(0,r.jsx)(t.code,{children:"Data"})," or ",(0,r.jsx)(t.code,{children:"DataFrame"}),", and then use downstream components for further refinement, such as a ",(0,r.jsx)(t.strong,{children:"Data Operations"})," component."]}),"\n",(0,r.jsx)(t.h2,{id:"type-convert",children:"Type Convert"}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Type Convert"})," component converts data from one type to another.\nIt supports ",(0,r.jsx)(t.code,{children:"Data"}),", ",(0,r.jsx)(t.code,{children:"DataFrame"}),", and ",(0,r.jsx)(t.code,{children:"Message"})," data types."]}),"\n",(0,r.jsxs)(c.A,{children:[(0,r.jsxs)(l.A,{value:"data",label:"Data",default:!0,children:[(0,r.jsxs)(t.p,{children:["A ",(0,r.jsx)(t.code,{children:"Data"})," object is a structured object that contains a primary ",(0,r.jsx)(t.code,{children:"text"})," key and other key-value pairs:"]}),(0,r.jsx)(x.Code,{codeConfig:u,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:'"data"',props:{style:{color:"#A5D6FF"}}},{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"}}}]}],lang:"json"},annotations:[]}]}),(0,r.jsxs)(t.p,{children:["The larger context associated with a component's ",(0,r.jsx)(t.code,{children:"data"})," dictionary also identifies which key is the primary ",(0,r.jsx)(t.code,{children:"text_key"}),", and it can provide an optional default value if the primary key isn't specified.\nFor example:"]}),(0,r.jsx)(x.Code,{codeConfig:u,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:[]}]})]}),(0,r.jsxs)(l.A,{value:"dataframe",label:"DataFrame",children:[(0,r.jsxs)(t.p,{children:["A ",(0,r.jsx)(t.code,{children:"DataFrame"})," is an array that represents a tabular data structure with rows and columns."]}),(0,r.jsxs)(t.p,{children:["It consists of a list (array) of dictionary objects, where each dictionary represents a row.\nEach key in the dictionaries corresponds to a column name.\nFor example, the following ",(0,r.jsx)(t.code,{children:"DataFrame"})," contains two rows with columns for ",(0,r.jsx)(t.code,{children:"name"}),", ",(0,r.jsx)(t.code,{children:"age"}),", and ",(0,r.jsx)(t.code,{children:"email"}),":"]}),(0,r.jsx)(x.Code,{codeConfig:u,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:'"Bobby Othername"',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:'"bobby.othername@example.com"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),(0,r.jsx)(l.A,{value:"message",label:"Message",children:(0,r.jsxs)(t.p,{children:["A ",(0,r.jsx)(t.code,{children:"Message"})," is primarily for passing a ",(0,r.jsx)(t.code,{children:"text"})," string, such as",(0,r.jsx)(t.code,{children:'"Name: Charlie Lastname, Age: 28, Email: charlie.lastname@example.com"'}),".\nHowever, the entire ",(0,r.jsx)(t.code,{children:"Message"})," object can include metadata about the message, particularly when used as chat input or output."]})})]}),"\n",(0,r.jsxs)(t.p,{children:["For more information, see ",(0,r.jsx)(t.a,{href:"/data-types",children:"Langflow data types"}),"."]}),"\n",(0,r.jsx)(t.h3,{id:"use-the-type-convert-component-in-a-flow",children:"Use the Type Convert component in a flow"}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Type Convert"})," component is typically used to transform data into a format required by a downstream component.\nFor example, if a component outputs a ",(0,r.jsx)(t.code,{children:"Message"}),", but the following component requires ",(0,r.jsx)(t.code,{children:"Data"}),", then you can use the ",(0,r.jsx)(t.strong,{children:"Type Convert"})," component to reformat the ",(0,r.jsx)(t.code,{children:"Message"})," as ",(0,r.jsx)(t.code,{children:"Data"})," before passing it to the downstream component."]}),"\n",(0,r.jsxs)(t.p,{children:["The following example uses the ",(0,r.jsx)(t.strong,{children:"Type Convert"})," component to convert the ",(0,r.jsx)(t.code,{children:"DataFrame"})," output from a ",(0,r.jsx)(t.strong,{children:"Web Search"})," component into ",(0,r.jsx)(t.code,{children:"Message"})," data that is passed as text input for an LLM:"]}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Create a flow based on the ",(0,r.jsx)(t.strong,{children:"Basic prompting"})," template."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Add a ",(0,r.jsx)(t.strong,{children:"Web Search"})," component to the flow, and then enter a search query, such as ",(0,r.jsx)(t.code,{children:"environmental news"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["In the ",(0,r.jsx)(t.strong,{children:"Prompt Template"})," component, replace the contents of the ",(0,r.jsx)(t.strong,{children:"Template"})," field with the following text:"]}),"\n",(0,r.jsx)(x.Code,{codeConfig:u,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Answer the user's question using the {context}",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(t.p,{children:["The curly braces define a ",(0,r.jsx)(t.a,{href:"/components-prompts#define-variables-in-prompts",children:"prompt variable"})," that becomes an input field on the ",(0,r.jsx)(t.strong,{children:"Prompt Template"})," component.\nIn this example, you will use the ",(0,r.jsx)(t.strong,{children:"context"})," field to pass the search results into the template, as explained in the next steps."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Add a ",(0,r.jsx)(t.strong,{children:"Type Convert"})," component to the flow, and then set the ",(0,r.jsx)(t.strong,{children:"Output Type"})," to ",(0,r.jsx)(t.strong,{children:"Message"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["Because the ",(0,r.jsx)(t.strong,{children:"Web Search"})," component's ",(0,r.jsx)(t.code,{children:"DataFrame"})," output is incompatible with the ",(0,r.jsx)(t.strong,{children:"context"})," variable's ",(0,r.jsx)(t.code,{children:"Message"})," input, you must use the ",(0,r.jsx)(t.strong,{children:"Type Convert"})," component to change the ",(0,r.jsx)(t.code,{children:"DataFrame"})," to a ",(0,r.jsx)(t.code,{children:"Message"})," in order to pass the search results to the ",(0,r.jsx)(t.strong,{children:"Prompt Template"})," component."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsx)(t.p,{children:"Connect the additional components to the rest of the flow:"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["Connect the ",(0,r.jsx)(t.strong,{children:"Web Search"})," component's output to the ",(0,r.jsx)(t.strong,{children:"Type Convert"})," component's input."]}),"\n",(0,r.jsxs)(t.li,{children:["Connect the ",(0,r.jsx)(t.strong,{children:"Type Convert"})," component's output to the ",(0,r.jsx)(t.strong,{children:"Prompt Template"})," component's ",(0,r.jsx)(t.strong,{children:"context"})," input."]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:(0,r.jsx)(t.img,{alt:"Convert web search output to text input",src:n(42547).A+"",width:"4000",height:"1826"})}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["In the ",(0,r.jsx)(t.strong,{children:"Language Model"})," component, add your OpenAI API key."]}),"\n",(0,r.jsxs)(t.p,{children:["If you want to use a different provider or model, edit the ",(0,r.jsx)(t.strong,{children:"Model Provider"}),", ",(0,r.jsx)(t.strong,{children:"Model Name"}),", and ",(0,r.jsx)(t.strong,{children:"API Key"})," fields accordingly."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Click ",(0,r.jsx)(t.strong,{children:"Playground"}),", and then ask something relevant to your search query, such as ",(0,r.jsx)(t.code,{children:"latest news"})," or ",(0,r.jsx)(t.code,{children:"what's the latest research on the environment?"}),"."]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Result"}),(0,r.jsx)(t.p,{children:"The LLM uses the search results context, your chat message, and it's built-in training data to respond to your question.\nFor example:"}),(0,r.jsx)(x.Code,{codeConfig:u,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{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"]}),"\n"]}),"\n",(0,r.jsx)(t.h3,{id:"type-convert-parameters",children:"Type Convert parameters"}),"\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:"input_data"}),(0,r.jsx)(t.td,{children:"Input Data"}),(0,r.jsxs)(t.td,{children:["Input parameter. The data to convert. Accepts ",(0,r.jsx)(t.code,{children:"Data"}),", ",(0,r.jsx)(t.code,{children:"DataFrame"}),", or ",(0,r.jsx)(t.code,{children:"Message"})," input."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"output_type"}),(0,r.jsx)(t.td,{children:"Output Type"}),(0,r.jsxs)(t.td,{children:["Input parameter. The desired output type, as one of ",(0,r.jsx)(t.strong,{children:"Data"}),", ",(0,r.jsx)(t.strong,{children:"DataFrame"})," or ",(0,r.jsx)(t.strong,{children:"Message"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"output"}),(0,r.jsx)(t.td,{children:"Output"}),(0,r.jsxs)(t.td,{children:["Output parameter. The converted data in the specified format. The output port changes depending on the selected ",(0,r.jsx)(t.strong,{children:"Output Type"}),"."]})]})]})]}),"\n",(0,r.jsx)(t.h2,{id:"legacy-processing-components",children:"Legacy Processing components"}),"\n",(0,r.jsxs)(t.p,{children:["The following ",(0,r.jsx)(t.strong,{children:"Processing"})," components are legacy components.\nYou can still use them in your flows, but they are no longer supported and can be removed in a future release."]}),"\n",(0,r.jsx)(t.p,{children:"Replace these components with suggested alternatives as soon as possible."}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Alter Metadata"}),(0,r.jsxs)(t.p,{children:["Replace this legacy component with the ",(0,r.jsxs)(t.a,{href:"#data-operations",children:[(0,r.jsx)(t.strong,{children:"Data Operations"})," component"]}),"."]}),(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.code,{children:"Message"})," and ",(0,r.jsx)(t.code,{children:"Data"})," objects, and can also create a new ",(0,r.jsx)(t.code,{children:"Data"})," object from user-provided text."]}),(0,r.jsx)(t.p,{children:"It accepts the following parameters:"}),(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:"Input parameter. 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:["Input parameter. Text input; the value is contained in the 'text' attribute of the ",(0,r.jsx)(t.code,{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:"Input parameter. 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:"Input parameter. Metadata fields to remove."})]}),(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:"Output parameter. List of Input objects, each with added metadata."})]})]})]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Combine Data/Merge Data"}),(0,r.jsxs)(t.p,{children:["Replace this legacy component with the ",(0,r.jsxs)(t.a,{href:"#data-operations",children:[(0,r.jsx)(t.strong,{children:"Data Operations"})," component"]})," or the ",(0,r.jsxs)(t.a,{href:"/components-logic#loop",children:[(0,r.jsx)(t.strong,{children:"Loop"})," component"]}),"."]}),(0,r.jsxs)(t.p,{children:["This component combines multiple data sources into a single unified ",(0,r.jsx)(t.code,{children:"Data"})," object."]}),(0,r.jsxs)(t.p,{children:["The component iterates through a list of ",(0,r.jsx)(t.code,{children:"Data"})," objects, merging them into a single ",(0,r.jsx)(t.code,{children:"Data"})," object (",(0,r.jsx)(t.code,{children:"merged_data"}),").\nIf the input list is empty, it returns an empty data object.\nIf there's only one input data object, it returns that object unchanged."]}),(0,r.jsx)(t.p,{children:"The merging process uses the addition operator to combine data objects."})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Combine Text"}),(0,r.jsxs)(t.p,{children:["Replace this legacy component with the ",(0,r.jsxs)(t.a,{href:"#data-operations",children:[(0,r.jsx)(t.strong,{children:"Data Operations"})," component"]}),"."]}),(0,r.jsxs)(t.p,{children:["This component concatenates two text inputs into a single text chunk using a specified delimiter, outputting a ",(0,r.jsx)(t.code,{children:"Message"})," object with the combined text."]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Create Data"}),(0,r.jsxs)(t.p,{children:["Replace this legacy component with the ",(0,r.jsxs)(t.a,{href:"#data-operations",children:[(0,r.jsx)(t.strong,{children:"Data Operations"})," component"]}),"."]}),(0,r.jsxs)(t.p,{children:["This component dynamically creates a ",(0,r.jsx)(t.code,{children:"Data"})," object with a specified number of fields and a text key."]}),(0,r.jsx)(t.p,{children:"It accepts the following parameters:"}),(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:"Input parameter. 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:"Input parameter. 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:["Input parameter. 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"}),"."]})]})]})]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Extract Key"}),(0,r.jsxs)(t.p,{children:["Replace this legacy component with the ",(0,r.jsxs)(t.a,{href:"#data-operations",children:[(0,r.jsx)(t.strong,{children:"Data Operations"})," component"]}),"."]}),(0,r.jsxs)(t.p,{children:["This component extracts a specific key from a ",(0,r.jsx)(t.code,{children:"Data"})," object and returns the value associated with that key."]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Data to DataFrame/Data to Message"}),(0,r.jsxs)(t.p,{children:["Replace these legacy components with newer ",(0,r.jsx)(t.strong,{children:"Processing"})," components, such as the ",(0,r.jsxs)(t.a,{href:"#data-operations",children:[(0,r.jsx)(t.strong,{children:"Data Operations"})," component"]})," and ",(0,r.jsxs)(t.a,{href:"#type-convert",children:[(0,r.jsx)(t.strong,{children:"Type Convert"})," component"]}),"."]}),(0,r.jsxs)(t.p,{children:["These components converted one or more ",(0,r.jsx)(t.code,{children:"Data"})," objects into a ",(0,r.jsx)(t.code,{children:"DataFrame"})," or ",(0,r.jsx)(t.code,{children:"Message"})," object."]}),(0,r.jsxs)(t.p,{children:["For the ",(0,r.jsx)(t.strong,{children:"Data to DataFrame"})," component, each ",(0,r.jsx)(t.code,{children:"Data"})," object corresponds to one row in the resulting ",(0,r.jsx)(t.code,{children:"DataFrame"}),".\nFields 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 ",(0,r.jsx)(t.code,{children:"text"})," column."]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Filter Data"}),(0,r.jsxs)(t.p,{children:["Replace this legacy component with the ",(0,r.jsxs)(t.a,{href:"#data-operations",children:[(0,r.jsx)(t.strong,{children:"Data Operations"})," component"]}),"."]}),(0,r.jsxs)(t.p,{children:["This component filters a ",(0,r.jsx)(t.code,{children:"Data"})," object based on a list of keys (",(0,r.jsx)(t.code,{children:"filter_criteria"}),"), returning a new ",(0,r.jsx)(t.code,{children:"Data"})," object (",(0,r.jsx)(t.code,{children:"filtered_data"}),") that contains only the key-value pairs that match the filter criteria."]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Filter Values"}),(0,r.jsxs)(t.p,{children:["Replace this legacy component with the ",(0,r.jsxs)(t.a,{href:"#data-operations",children:[(0,r.jsx)(t.strong,{children:"Data Operations"})," component"]}),"."]}),(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."}),(0,r.jsx)(t.p,{children:"It accepts the following parameters:"}),(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:"Input parameter. 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:"Input parameter. 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:"Input parameter. 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:"Input parameter. The operator to apply for comparing the values."})]}),(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:"Output parameter. The resulting list of filtered data items."})]})]})]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"JSON Cleaner"}),(0,r.jsxs)(t.p,{children:["Replace this legacy component with the ",(0,r.jsxs)(t.a,{href:"#parser",children:[(0,r.jsx)(t.strong,{children:"Parser"})," component"]}),"."]}),(0,r.jsx)(t.p,{children:"This component cleans JSON strings to ensure they are fully compliant with the JSON specification."}),(0,r.jsx)(t.p,{children:"It accepts the following parameters:"}),(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:"Input parameter. 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:"Input parameter. 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:"Input parameter. 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:"Input parameter. 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.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:"Output parameter. The resulting cleaned, repaired, and validated JSON string that fully complies with the JSON specification."})]})]})]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Message to Data"}),(0,r.jsxs)(t.p,{children:["Replace this legacy component with the ",(0,r.jsxs)(t.a,{href:"#type-convert",children:[(0,r.jsx)(t.strong,{children:"Type Convert"})," component"]}),"."]}),(0,r.jsxs)(t.p,{children:["This component converts ",(0,r.jsx)(t.code,{children:"Message"})," objects to ",(0,r.jsx)(t.code,{children:"Data"})," objects."]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parse DataFrame"}),(0,r.jsxs)(t.p,{children:["Replace this legacy component with the ",(0,r.jsxs)(t.a,{href:"#dataframe-operations",children:[(0,r.jsx)(t.strong,{children:"DataFrame Operations"})," component"]})," or ",(0,r.jsxs)(t.a,{href:"#parser",children:[(0,r.jsx)(t.strong,{children:"Parser"})," component"]}),"."]}),(0,r.jsxs)(t.p,{children:["This component converts ",(0,r.jsx)(t.code,{children:"DataFrame"})," objects into plain text using templates."]}),(0,r.jsx)(t.p,{children:"It accepts the following parameters:"}),(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:"Input parameter. 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:["Input parameter. 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:"Input parameter. String to join rows in output."})]}),(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:"Output parameter. All rows combined into single text."})]})]})]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Parse JSON"}),(0,r.jsxs)(t.p,{children:["Replace this legacy component with the ",(0,r.jsxs)(t.a,{href:"#parser",children:[(0,r.jsx)(t.strong,{children:"Parser"})," component"]}),"."]}),(0,r.jsxs)(t.p,{children:["This component converts and extracts JSON fields in ",(0,r.jsx)(t.code,{children:"Message"})," and ",(0,r.jsx)(t.code,{children:"Data"})," objects using JQ queries, then returns ",(0,r.jsx)(t.code,{children:"filtered_data"}),", which is a list of ",(0,r.jsx)(t.code,{children:"Data"})," objects."]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Python REPL"}),(0,r.jsxs)(t.p,{children:["Replace this legacy component with the ",(0,r.jsxs)(t.a,{href:"#python-interpreter",children:[(0,r.jsx)(t.strong,{children:"Python Interpreter"})," component"]})," or another processing or logic component."]}),(0,r.jsx)(t.p,{children:"This component creates a Python REPL (Read-Eval-Print Loop) tool for executing Python code."}),(0,r.jsx)(t.p,{children:"It accepts the following parameters:"}),(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:"name"}),(0,r.jsx)(t.td,{children:"String"}),(0,r.jsxs)(t.td,{children:["Input parameter. The name of the tool. Default: ",(0,r.jsx)(t.code,{children:"python_repl"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"description"}),(0,r.jsx)(t.td,{children:"String"}),(0,r.jsx)(t.td,{children:"Input parameter. A description of the tool's functionality."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"global_imports"}),(0,r.jsx)(t.td,{children:"List[String]"}),(0,r.jsxs)(t.td,{children:["Input parameter. A list of modules to import globally. Default: ",(0,r.jsx)(t.code,{children:"math"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"tool"}),(0,r.jsx)(t.td,{children:"Tool"}),(0,r.jsx)(t.td,{children:"Output parameter. A Python REPL tool for use in LangChain."})]})]})]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Python Code Structured"}),(0,r.jsxs)(t.p,{children:["Replace this legacy component with the ",(0,r.jsxs)(t.a,{href:"#python-interpreter",children:[(0,r.jsx)(t.strong,{children:"Python Interpreter"})," component"]})," or another processing or logic component."]}),(0,r.jsx)(t.p,{children:"This component creates a structured tool from Python code using a dataclass."}),(0,r.jsx)(t.p,{children:"The component dynamically updates its configuration based on the provided Python code, allowing for custom function arguments and descriptions."}),(0,r.jsx)(t.p,{children:"It accepts the following parameters:"}),(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:"tool_code"}),(0,r.jsx)(t.td,{children:"String"}),(0,r.jsx)(t.td,{children:"Input parameter. The Python code for the tool's dataclass."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"tool_name"}),(0,r.jsx)(t.td,{children:"String"}),(0,r.jsx)(t.td,{children:"Input parameter. The name of the tool."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"tool_description"}),(0,r.jsx)(t.td,{children:"String"}),(0,r.jsx)(t.td,{children:"Input parameter. The description of the tool."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"return_direct"}),(0,r.jsx)(t.td,{children:"Boolean"}),(0,r.jsx)(t.td,{children:"Input parameter. Whether to return the function output directly."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"tool_function"}),(0,r.jsx)(t.td,{children:"String"}),(0,r.jsx)(t.td,{children:"Input parameter. The selected function for the tool."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"global_variables"}),(0,r.jsx)(t.td,{children:"Dict"}),(0,r.jsx)(t.td,{children:"Input parameter. Global variables or data for the tool."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"result_tool"}),(0,r.jsx)(t.td,{children:"Tool"}),(0,r.jsx)(t.td,{children:"Output parameter. A structured tool created from the Python code."})]})]})]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Regex Extractor"}),(0,r.jsxs)(t.p,{children:["Replace this legacy component with the ",(0,r.jsxs)(t.a,{href:"#parser",children:[(0,r.jsx)(t.strong,{children:"Parser"})," component"]}),"."]}),(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.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Select Data"}),(0,r.jsxs)(t.p,{children:["Replace this legacy component with the ",(0,r.jsxs)(t.a,{href:"#data-operations",children:[(0,r.jsx)(t.strong,{children:"Data Operations"})," component"]}),"."]}),(0,r.jsxs)(t.p,{children:["This component selects a single ",(0,r.jsx)(t.code,{children:"Data"})," object from a list."]}),(0,r.jsx)(t.p,{children:"It accepts the following parameters:"}),(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:"Input parameter. 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:"Input parameter. Index of the data to select"})]}),(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:["Output parameter. The selected ",(0,r.jsx)(t.code,{children:"Data"})," object."]})]})]})]})]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Update Data"}),(0,r.jsxs)(t.p,{children:["Replace this legacy component with the ",(0,r.jsxs)(t.a,{href:"#data-operations",children:[(0,r.jsx)(t.strong,{children:"Data Operations"})," component"]}),"."]}),(0,r.jsx)(t.p,{children:"This component dynamically updates or appends data with specified fields."}),(0,r.jsx)(t.p,{children:"It accepts the following parameters:"}),(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:"Input parameter. 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:"Input parameter. 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:"Input parameter. 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:"Input parameter. Validates the text key presence."})]}),(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:"Output parameter. The updated Data objects."})]})]})]})]})]})}function g(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 f(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},42547:(e,t,n)=>{n.d(t,{A:()=>s});const s=n.p+"assets/images/component-type-convert-and-web-search-1eef7b9a7c1a243f4a08d9717728d0e1.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/7a88e433.eab03115.js b/assets/js/7a88e433.72fe3438.js similarity index 85% rename from assets/js/7a88e433.eab03115.js rename to assets/js/7a88e433.72fe3438.js index c9628851dc..3cd05f1566 100644 --- a/assets/js/7a88e433.eab03115.js +++ b/assets/js/7a88e433.72fe3438.js @@ -1 +1 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[7414],{27891:(e,n,t)=>{t.r(n),t.d(n,{CH:()=>d,assets:()=>l,chCodeConfig:()=>h,contentTitle:()=>c,default:()=>u,frontMatter:()=>a,metadata:()=>o,toc:()=>p});const o=JSON.parse('{"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.","source":"@site/docs/Integrations/Notion/notion-agent-conversational.mdx","sourceDirName":"Integrations/Notion","slug":"/integrations/notion/notion-agent-conversational","permalink":"/integrations/notion/notion-agent-conversational","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Notion Conversational Agent","slug":"/integrations/notion/notion-agent-conversational"},"sidebar":"docs","previous":{"title":"Set up a Notion App","permalink":"/integrations/notion/setup"},"next":{"title":"Notion Meeting Notes Agent","permalink":"/integrations/notion/notion-agent-meeting-notes"}}');var s=t(74848),i=t(28453),r=t(24754);const a={title:"Notion Conversational Agent",slug:"/integrations/notion/notion-agent-conversational"},c=void 0,l={},d={annotations:r.hk,Code:r.Cy},h={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},p=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Components",id:"components",level:2},{value:"Run the Conversational Notion Agent",id:"run-the-conversational-notion-agent",level:2},{value:"Example Interactions",id:"example-interactions",level:2},{value:"Customization",id:"customization",level:2},{value:"Troubleshooting",id:"troubleshooting",level:2}];function g(e){const n={a:"a",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return d||m("CH",!1),d.Code||m("CH.Code",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n",(0,s.jsx)(n.p,{children:"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."}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Notion Components Toolkit",src:t(84530).A+"",width:"1188",height:"793"})}),"\n",(0,s.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/integrations/notion/setup",children:"A Notion App"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://www.notion.so/my-integrations",children:"A Notion account and API key"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://platform.openai.com/account/api-keys",children:"An OpenAI API key"})}),"\n",(0,s.jsxs)(n.li,{children:["Recommended: ",(0,s.jsx)(n.a,{target:"_blank","data-noBrokenLinkCheck":!0,href:t(54821).A+"",children:"Download the Conversation Agent Flow JSON"}),", and then ",(0,s.jsx)(n.a,{href:"/concepts-flows-import",children:"import the flow"})," into Langflow."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"components",children:"Components"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Chat Input"}),": Accepts user queries and commands"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Chat Output"}),": Displays the agent's responses"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Language Model"}),": Processes user input and generates responses with an OpenAI model"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Tool Calling Agent"}),": Coordinates the use of various Notion tools based on user input"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Toolkit"}),": Combines multiple Notion-specific tools into a single toolkit"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Notion Tools"}),": Various components for interacting with Notion, including:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"List Users"}),"\n",(0,s.jsx)(n.li,{children:"List Database Properties"}),"\n",(0,s.jsx)(n.li,{children:"List Pages"}),"\n",(0,s.jsx)(n.li,{children:"Page Content Viewer"}),"\n",(0,s.jsx)(n.li,{children:"Create Page"}),"\n",(0,s.jsx)(n.li,{children:"Update Page Property"}),"\n",(0,s.jsx)(n.li,{children:"Add Content to Page"}),"\n",(0,s.jsx)(n.li,{children:"Search"}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Message History"}),": Stores conversation history"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Prompt Template"}),": Provides system instructions and context for the agent"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Current Date"}),": Supplies the current date and time for context"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"run-the-conversational-notion-agent",children:"Run the Conversational Notion Agent"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Open Langflow and create a new flow."}),"\n",(0,s.jsxs)(n.li,{children:["Add the components listed above to your flow canvas, or Download the ",(0,s.jsx)(n.a,{target:"_blank","data-noBrokenLinkCheck":!0,href:t(54821).A+"",children:"Conversation Agent Flow"}),"(Download link) and ",(0,s.jsx)(n.strong,{children:"Import"})," the JSON file into Langflow."]}),"\n",(0,s.jsx)(n.li,{children:"Connect the components as shown in the flow diagram."}),"\n",(0,s.jsx)(n.li,{children:"Input the Notion and OpenAI API keys in their respective components."}),"\n",(0,s.jsx)(n.li,{children:'To start the flow, click the "Play" button in Langflow.'}),"\n",(0,s.jsxs)(n.li,{children:["In the chat interface, enter a Notion-related request or question. For example:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:'"Create a new page in my task database"'}),"\n",(0,s.jsx)(n.li,{children:'"Search for pages about project management"'}),"\n",(0,s.jsx)(n.li,{children:'"List all users in my Notion workspace"'}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.li,{children:"The agent will process your request, use the appropriate Notion tools, and provide a response."}),"\n",(0,s.jsx)(n.li,{children:"Continue the conversation, asking follow-up questions or giving new commands as needed."}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"example-interactions",children:"Example Interactions"}),"\n",(0,s.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"User: List all the users in my Notion workspace.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"Agent: Certainly! I'll use the Notion User List tool to retrieve that information for you. One moment please.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"[Agent uses the Notion User List tool]",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"Here's a list of users in your Notion workspace:",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"1. John Doe (john@example.com)",props:{}}]},{tokens:[{content:"2. Jane Smith (jane@example.com)",props:{}}]},{tokens:[{content:"3. Alex Johnson (alex@example.com)",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"Is there anything specific you'd like to know about these users or any other Notion-related task I can help you with?",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'User: Create a new page in my Projects database with the title "Website Redesign".',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"Agent: Certainly! I'd be happy to create a new page in your Projects database with the title \"Website Redesign\". I'll use the Notion Page Creator tool to do this. First, let me check the properties of your Projects database to ensure we include all necessary information.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"[Agent uses the Notion Database Properties tool]",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"I've retrieved the properties for your Projects database. Now, I'll create the new page with the title \"Website Redesign\". One moment please.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"[Agent uses the Notion Page Creator tool]",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'Great news! I\'ve successfully created a new page in your Projects database with the title "Website Redesign". Here are the details:',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"- Title: Website Redesign",props:{}}]},{tokens:[{content:"- Page ID: [page_id_here]",props:{}}]},{tokens:[{content:"- URL: [page_url_here]",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"Is there any additional information you'd like me to add to this new project page, such as a description, due date, or assigned team members?",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'User: Yes, please add a description: "Redesign company website to improve user experience and modernize the look."',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"Agent: Certainly! I'd be happy to add that description to the \"Website Redesign\" project page. I'll use the Add Content to Page tool to update the page with this information.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"[Agent uses the Add Content to Page tool]",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"I've successfully added the description to your \"Website Redesign\" project page. Here's a summary of what I've done:",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'1. Located the "Website Redesign" page using the page ID from our previous interaction.',props:{}}]},{tokens:[{content:"2. Added the following content to the page:",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:" Description: Redesign company website to improve user experience and modernize the look.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"The description has been added as a new text block on the page. Is there anything else you'd like me to add or modify on this project page?",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsx)(n.h2,{id:"customization",children:"Customization"}),"\n",(0,s.jsx)(n.p,{children:"The flow can be customized to meet your team's specific needs.\nFor example:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Adjust the system prompt to change the agent's behavior or knowledge base."}),"\n",(0,s.jsx)(n.li,{children:"Add or remove Notion tools based on your specific needs."}),"\n",(0,s.jsx)(n.li,{children:"Modify the OpenAI model parameters (e.g., temperature) to adjust the agent's response style."}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"troubleshooting",children:"Troubleshooting"}),"\n",(0,s.jsx)(n.p,{children:"If you encounter issues:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Ensure all API keys are correctly set and have the necessary permissions."}),"\n",(0,s.jsx)(n.li,{children:"Check that your Notion integration has access to the relevant pages and databases."}),"\n",(0,s.jsx)(n.li,{children:"Verify that all components are properly connected in the flow."}),"\n",(0,s.jsx)(n.li,{children:"Review the Langflow logs for any error messages."}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["For more advanced usage and integration options, refer to the ",(0,s.jsx)(n.a,{href:"https://developers.notion.com/",children:"Notion API documentation"})," and ",(0,s.jsx)(n.a,{href:"/",children:"Langflow documentation"}),"."]})]})}function u(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(g,{...e})}):g(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.")}},28453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>a});var o=t(96540);const s={},i=o.createContext(s);function r(e){const n=o.useContext(i);return o.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),o.createElement(i.Provider,{value:n},e.children)}},54821:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/files/Conversational_Notion_Agent-29ab60cb11e52e7bbb1a4917f4799629.json"},84530:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/notion_conversational_agent_tools-6952705eb98e10bd4a67b74500a6189d.png"}}]); \ No newline at end of file +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[7414],{27891:(e,n,t)=>{t.r(n),t.d(n,{CH:()=>d,assets:()=>l,chCodeConfig:()=>h,contentTitle:()=>c,default:()=>u,frontMatter:()=>a,metadata:()=>o,toc:()=>p});const o=JSON.parse('{"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.","source":"@site/docs/Integrations/Notion/notion-agent-conversational.mdx","sourceDirName":"Integrations/Notion","slug":"/integrations/notion/notion-agent-conversational","permalink":"/integrations/notion/notion-agent-conversational","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Notion Conversational Agent","slug":"/integrations/notion/notion-agent-conversational"},"sidebar":"docs","previous":{"title":"Set up a Notion App","permalink":"/integrations/notion/setup"},"next":{"title":"Notion Meeting Notes Agent","permalink":"/integrations/notion/notion-agent-meeting-notes"}}');var s=t(74848),i=t(28453),r=t(24754);const a={title:"Notion Conversational Agent",slug:"/integrations/notion/notion-agent-conversational"},c=void 0,l={},d={annotations:r.hk,Code:r.Cy},h={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},p=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Components",id:"components",level:2},{value:"Run the Conversational Notion Agent",id:"run-the-conversational-notion-agent",level:2},{value:"Example Interactions",id:"example-interactions",level:2},{value:"Customization",id:"customization",level:2},{value:"Troubleshooting",id:"troubleshooting",level:2}];function g(e){const n={a:"a",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return d||m("CH",!1),d.Code||m("CH.Code",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n",(0,s.jsx)(n.p,{children:"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."}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Notion Components Toolkit",src:t(84530).A+"",width:"1188",height:"793"})}),"\n",(0,s.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/integrations/notion/setup",children:"A Notion App"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://www.notion.so/my-integrations",children:"A Notion account and API key"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"https://platform.openai.com/account/api-keys",children:"An OpenAI API key"})}),"\n",(0,s.jsxs)(n.li,{children:["Recommended: ",(0,s.jsx)(n.a,{target:"_blank","data-noBrokenLinkCheck":!0,href:t(54821).A+"",children:"Download the Conversation Agent Flow JSON"}),", and then ",(0,s.jsx)(n.a,{href:"/concepts-flows-import",children:"import the flow"})," into Langflow."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"components",children:"Components"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Chat Input"}),": Accepts user queries and commands"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Chat Output"}),": Displays the agent's responses"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Language Model"}),": Processes user input and generates responses with an OpenAI model"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Tool Calling Agent"}),": Coordinates the use of various Notion tools based on user input"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Toolkit"}),": Combines multiple Notion-specific tools into a single toolkit"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Notion Tools"}),": Various components for interacting with Notion, including:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"List Users"}),"\n",(0,s.jsx)(n.li,{children:"List Database Properties"}),"\n",(0,s.jsx)(n.li,{children:"List Pages"}),"\n",(0,s.jsx)(n.li,{children:"Page Content Viewer"}),"\n",(0,s.jsx)(n.li,{children:"Create Page"}),"\n",(0,s.jsx)(n.li,{children:"Update Page Property"}),"\n",(0,s.jsx)(n.li,{children:"Add Content to Page"}),"\n",(0,s.jsx)(n.li,{children:"Search"}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Message History"}),": Stores conversation history"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Prompt Template"}),": Provides system instructions and context for the agent"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Current Date"}),": Supplies the current date and time for context"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"run-the-conversational-notion-agent",children:"Run the Conversational Notion Agent"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Open Langflow and create a new flow."}),"\n",(0,s.jsxs)(n.li,{children:["Add the components listed above to your flow canvas, or Download the ",(0,s.jsx)(n.a,{target:"_blank","data-noBrokenLinkCheck":!0,href:t(54821).A+"",children:"Conversation Agent Flow"}),"(Download link) and ",(0,s.jsx)(n.strong,{children:"Import"})," the JSON file into Langflow."]}),"\n",(0,s.jsx)(n.li,{children:"Connect the components as shown in the flow diagram."}),"\n",(0,s.jsx)(n.li,{children:"Input the Notion and OpenAI API keys in their respective components."}),"\n",(0,s.jsx)(n.li,{children:'To start the flow, click the "Play" button in Langflow.'}),"\n",(0,s.jsxs)(n.li,{children:["In the chat interface, enter a Notion-related request or question. For example:","\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:'"Create a new page in my task database"'}),"\n",(0,s.jsx)(n.li,{children:'"Search for pages about project management"'}),"\n",(0,s.jsx)(n.li,{children:'"List all users in my Notion workspace"'}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.li,{children:"The agent will process your request, use the appropriate Notion tools, and provide a response."}),"\n",(0,s.jsx)(n.li,{children:"Continue the conversation, asking follow-up questions or giving new commands as needed."}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"example-interactions",children:"Example Interactions"}),"\n",(0,s.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"User: List all the users in my Notion workspace.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"Agent: Certainly! I'll use the Notion User List tool to retrieve that information for you. One moment please.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"[Agent uses the Notion User List tool]",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"Here's a list of users in your Notion workspace:",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"1. John Doe (john@example.com)",props:{}}]},{tokens:[{content:"2. Jane Smith (jane@example.com)",props:{}}]},{tokens:[{content:"3. Alex Johnson (alex@example.com)",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"Is there anything specific you'd like to know about these users or any other Notion-related task I can help you with?",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'User: Create a new page in my Projects database with the title "Website Redesign".',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"Agent: Certainly! I'd be happy to create a new page in your Projects database with the title \"Website Redesign\". I'll use the Notion Page Creator tool to do this. First, let me check the properties of your Projects database to ensure we include all necessary information.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"[Agent uses the Notion Database Properties tool]",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"I've retrieved the properties for your Projects database. Now, I'll create the new page with the title \"Website Redesign\". One moment please.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"[Agent uses the Notion Page Creator tool]",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'Great news! I\'ve successfully created a new page in your Projects database with the title "Website Redesign". Here are the details:',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"- Title: Website Redesign",props:{}}]},{tokens:[{content:"- Page ID: [page_id_here]",props:{}}]},{tokens:[{content:"- URL: [page_url_here]",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"Is there any additional information you'd like me to add to this new project page, such as a description, due date, or assigned team members?",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'User: Yes, please add a description: "Redesign company website to improve user experience and modernize the look."',props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"Agent: Certainly! I'd be happy to add that description to the \"Website Redesign\" project page. I'll use the Add Content to Page tool to update the page with this information.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"[Agent uses the Add Content to Page tool]",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"I've successfully added the description to your \"Website Redesign\" project page. Here's a summary of what I've done:",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:'1. Located the "Website Redesign" page using the page ID from our previous interaction.',props:{}}]},{tokens:[{content:"2. Added the following content to the page:",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:" Description: Redesign company website to improve user experience and modernize the look.",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"The description has been added as a new text block on the page. Is there anything else you'd like me to add or modify on this project page?",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsx)(n.h2,{id:"customization",children:"Customization"}),"\n",(0,s.jsx)(n.p,{children:"The flow can be customized to meet your team's specific needs.\nFor example:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Adjust the system prompt to change the agent's behavior or context."}),"\n",(0,s.jsx)(n.li,{children:"Add or remove Notion tools based on your specific needs."}),"\n",(0,s.jsx)(n.li,{children:"Modify the OpenAI model parameters (e.g., temperature) to adjust the agent's response style."}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"troubleshooting",children:"Troubleshooting"}),"\n",(0,s.jsx)(n.p,{children:"If you encounter issues:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsx)(n.li,{children:"Ensure all API keys are correctly set and have the necessary permissions."}),"\n",(0,s.jsx)(n.li,{children:"Check that your Notion integration has access to the relevant pages and databases."}),"\n",(0,s.jsx)(n.li,{children:"Verify that all components are properly connected in the flow."}),"\n",(0,s.jsx)(n.li,{children:"Review the Langflow logs for any error messages."}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["For more advanced usage and integration options, refer to the ",(0,s.jsx)(n.a,{href:"https://developers.notion.com/",children:"Notion API documentation"})," and ",(0,s.jsx)(n.a,{href:"/",children:"Langflow documentation"}),"."]})]})}function u(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(g,{...e})}):g(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.")}},28453:(e,n,t)=>{t.d(n,{R:()=>r,x:()=>a});var o=t(96540);const s={},i=o.createContext(s);function r(e){const n=o.useContext(i);return o.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),o.createElement(i.Provider,{value:n},e.children)}},54821:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/files/Conversational_Notion_Agent-29ab60cb11e52e7bbb1a4917f4799629.json"},84530:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/notion_conversational_agent_tools-6952705eb98e10bd4a67b74500a6189d.png"}}]); \ No newline at end of file diff --git a/assets/js/7de42fc9.4a780e8f.js b/assets/js/7de42fc9.4a780e8f.js new file mode 100644 index 0000000000..e20fa515b0 --- /dev/null +++ b/assets/js/7de42fc9.4a780e8f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[8649],{28453:(o,t,e)=>{e.d(t,{R:()=>c,x:()=>r});var n=e(96540);const s={},l=n.createContext(s);function c(o){const t=n.useContext(l);return n.useMemo(function(){return"function"==typeof o?o(t):{...t,...o}},[t,o])}function r(o){let t;return t=o.disableParentContext?"function"==typeof o.components?o.components(s):o.components||s:c(o.components),n.createElement(l.Provider,{value:t},o.children)}},97117:(o,t,e)=>{e.r(t),e.d(t,{CH:()=>a,assets:()=>F,chCodeConfig:()=>i,contentTitle:()=>p,default:()=>d,frontMatter:()=>r,metadata:()=>n,toc:()=>y});const n=JSON.parse('{"id":"API-Reference/api-flows","title":"Flow management endpoints","description":"Use the /flows endpoint to create, read, update, and delete flows.","source":"@site/docs/API-Reference/api-flows.mdx","sourceDirName":"API-Reference","slug":"/api-flows","permalink":"/api-flows","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Flow management endpoints","slug":"/api-flows"},"sidebar":"docs","previous":{"title":"Flow trigger endpoints","permalink":"/api-flows-run"},"next":{"title":"Files endpoints","permalink":"/api-files"}}');var s=e(74848),l=e(28453),c=e(24754);const r={title:"Flow management endpoints",slug:"/api-flows"},p=void 0,F={},a={annotations:c.hk,Code:c.Cy},i={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},y=[{value:"Create flow",id:"create-flow",level:2},{value:"Create flows",id:"create-flows",level:2},{value:"Read flow",id:"read-flow",level:2},{value:"Read flows",id:"read-flows",level:2},{value:"Read sample flows",id:"read-sample-flows",level:2},{value:"Update flow",id:"update-flow",level:2},{value:"Delete flow",id:"delete-flow",level:2},{value:"Export flows",id:"export-flows",level:2},{value:"Import flows",id:"import-flows",level:2}];function D(o){const t={a:"a",code:"code",h2:"h2",p:"p",...(0,l.R)(),...o.components},{Details:e}=t;return a||f("CH",!1),a.Code||f("CH.Code",!0),e||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",(0,s.jsxs)(t.p,{children:["Use the ",(0,s.jsx)(t.code,{children:"/flows"})," endpoint to create, read, update, and delete flows."]}),"\n",(0,s.jsxs)(t.p,{children:["If you want to use the Langflow API to run a flow, see ",(0,s.jsx)(t.a,{href:"/api-flows-run",children:"Flow trigger endpoints"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"create-flow",children:"Create flow"}),"\n",(0,s.jsx)(t.p,{children:"Creates a new flow."}),"\n",(0,s.jsx)(a.Code,{codeConfig:i,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/flows/" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "name": "string2",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "description": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "icon": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "icon_bg_color": "#FF0000",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "gradient": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "data": {},',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "is_component": false,',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "updated_at": "2024-12-30T15:48:01.519Z",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "webhook": false,',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "endpoint_name": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "tags": [',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "string"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ]",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:i,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:'"string2"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "description"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "icon"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "icon_bg_color"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"#FF0000"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "gradient"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "data"',props:{style:{color:"#7EE787"}}},{content:": {},",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "is_component"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "updated_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-02-04T21:07:36+00:00"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "webhook"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "endpoint_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "tags"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:"],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "locked"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"e8d81c37-714b-49ae-ba82-e61141f020ee"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "user_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"f58396d4-a387-4bb8-b749-f40825c3d9f3"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "project_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"1415de42-8f01-4f36-bf34-539f23e47466"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(t.h2,{id:"create-flows",children:"Create flows"}),"\n",(0,s.jsx)(t.p,{children:"Creates multiple new flows, returning an array of flow objects."}),"\n",(0,s.jsx)(a.Code,{codeConfig:i,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/flows/batch/" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "flows": [',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" {",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "name": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "description": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "icon": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "icon_bg_color": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "gradient": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "data": {},',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "is_component": false,',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "updated_at": "2024-12-30T18:36:02.737Z",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "webhook": false,',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "endpoint_name": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "tags": [',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "string"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ],",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "locked": false,',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "user_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "project_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" {",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "name": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "description": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "icon": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "icon_bg_color": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "gradient": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "data": {},',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "is_component": false,',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "updated_at": "2024-12-30T18:36:02.737Z",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "webhook": false,',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "endpoint_name": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "tags": [',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "string"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ],",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "locked": false,',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "user_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "project_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ]",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsx)(t.h2,{id:"read-flow",children:"Read flow"}),"\n",(0,s.jsx)(t.p,{children:"Retrieves a specific flow by its ID."}),"\n",(0,s.jsx)(a.Code,{codeConfig:i,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/flows/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:i,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:'"Basic Prompting"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "description"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Perform basic prompting with an OpenAI model."',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "icon"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Braces"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "icon_bg_color"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "gradient"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "data"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "nodes"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ...",props:{style:{color:"#FFA198",fontStyle:"italic"}}}]},{tokens:[{content:" ]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(t.h2,{id:"read-flows",children:"Read flows"}),"\n",(0,s.jsx)(t.p,{children:"Returns a JSON object containing a list of flows."}),"\n",(0,s.jsx)(t.p,{children:"Retrieve all flows with pagination:"}),"\n",(0,s.jsx)(a.Code,{codeConfig:i,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/flows/?remove_example_flows=false&components_only=false&get_all=true&header_flows=false&page=1&size=50" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t.p,{children:["To retrieve flows from a specific project, use the ",(0,s.jsx)(t.code,{children:"project_id"})," query parameter:"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:i,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/flows/?remove_example_flows=true&components_only=false&get_all=false&project_id=",props:{style:{color:"#A5D6FF"}}},{content:"$PROJECT_ID",props:{style:{color:"#C9D1D9"}}},{content:'&header_flows=false&page=1&size=1" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsx)(t.h2,{id:"read-sample-flows",children:"Read sample flows"}),"\n",(0,s.jsx)(t.p,{children:"Retrieves a list of sample flows:"}),"\n",(0,s.jsx)(a.Code,{codeConfig:i,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/flows/basic_examples/" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsx)(t.h2,{id:"update-flow",children:"Update flow"}),"\n",(0,s.jsx)(t.p,{children:"Updates an existing flow by its ID."}),"\n",(0,s.jsxs)(t.p,{children:["This example changes the value for ",(0,s.jsx)(t.code,{children:"endpoint_name"})," from a random UUID to ",(0,s.jsx)(t.code,{children:"my_new_endpoint_name"}),"."]}),"\n",(0,s.jsx)(a.Code,{codeConfig:i,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"PATCH ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/flows/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "name": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "description": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "data": {},',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "project_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "endpoint_name": "my_new_endpoint_name",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "locked": true',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:i,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:'"string"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "description"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "icon"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Braces"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "icon_bg_color"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "gradient"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "data"',props:{style:{color:"#7EE787"}}},{content:": {},",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "is_component"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "updated_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2024-12-30T18:30:22+00:00"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "webhook"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "endpoint_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"my_new_endpoint_name"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "tags"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "locked"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "user_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"f58396d4-a387-4bb8-b749-f40825c3d9f3"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "project_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"3fa85f64-5717-4562-b3fc-2c963f66afa6"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(t.h2,{id:"delete-flow",children:"Delete flow"}),"\n",(0,s.jsx)(t.p,{children:"Deletes a specific flow by its ID."}),"\n",(0,s.jsx)(a.Code,{codeConfig:i,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"DELETE ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/flows/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:i,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Flow deleted successfully"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(t.h2,{id:"export-flows",children:"Export flows"}),"\n",(0,s.jsx)(t.p,{children:"Exports specified flows to a ZIP file."}),"\n",(0,s.jsxs)(t.p,{children:["This endpoint downloads a ZIP file containing ",(0,s.jsx)(t.a,{href:"/concepts-flows-import#langflow-json-file-contents",children:"Langflow JSON files"})," for each flow ID listed in the request body."]}),"\n",(0,s.jsx)(a.Code,{codeConfig:i,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/flows/download/" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'[",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "e1e40c77-0541-41a9-88ab-ddb3419398b5",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "92f9a4c5-cfc8-4656-ae63-1f0881163c28"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"]' ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --output ",props:{style:{color:"#79C0FF"}}},{content:"langflow-flows.zip",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:i,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:" % Total % Received % Xferd Average Speed Time Time Time Current",props:{}}]},{tokens:[{content:" Dload Upload Total Spent Left Speed",props:{}}]},{tokens:[{content:"100 76437 0 76353 100 84 4516k 5088 --:--:-- --:--:-- --:--:-- 4665k",props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n",(0,s.jsx)(t.h2,{id:"import-flows",children:"Import flows"}),"\n",(0,s.jsxs)(t.p,{children:["Imports flows by uploading a ",(0,s.jsx)(t.a,{href:"/concepts-flows-import#langflow-json-file-contents",children:"Langflow-compatible JSON file"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["To specify a target project for the flow, include the query parameter ",(0,s.jsx)(t.code,{children:"project_id"}),".\nThe target ",(0,s.jsx)(t.code,{children:"project_id"})," must already exist before uploading a flow. Call the ",(0,s.jsx)(t.a,{href:"/api-projects#read-projects",children:"/api/v1/projects/"})," endpoint for a list of available projects."]}),"\n",(0,s.jsxs)(t.p,{children:["This example uploads a local file named ",(0,s.jsx)(t.code,{children:"agent-with-astra-db-tool.json"})," to a project specified by a ",(0,s.jsx)(t.code,{children:"PROJECT_ID"})," variable:"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:i,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/flows/upload/?project_id=",props:{style:{color:"#A5D6FF"}}},{content:"$PROJECT_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"Content-Type: multipart/form-data" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -F ",props:{style:{color:"#79C0FF"}}},{content:'"file=@agent-with-astra-db-tool.json;type=application/json"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:i,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:'"agent-with-astra-db-tool"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "description"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'""',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "icon"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "icon_bg_color"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "gradient"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "data"',props:{style:{color:"#7EE787"}}},{content:": {}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ...",props:{style:{color:"#FFA198",fontStyle:"italic"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]})]})}function d(o={}){const{wrapper:t}={...(0,l.R)(),...o.components};return t?(0,s.jsx)(t,{...o,children:(0,s.jsx)(D,{...o})}):D(o)}function f(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/7de42fc9.f40201c4.js b/assets/js/7de42fc9.f40201c4.js deleted file mode 100644 index e50a1222ac..0000000000 --- a/assets/js/7de42fc9.f40201c4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[8649],{11470:(o,t,e)=>{e.d(t,{A:()=>m});var n=e(96540),s=e(18215),r=e(23104),l=e(56347),c=e(205),p=e(57485),a=e(31682),i=e(70679);function F(o){return n.Children.toArray(o).filter(o=>"\n"!==o).map(o=>{if(!o||(0,n.isValidElement)(o)&&function(o){const{props:t}=o;return!!t&&"object"==typeof t&&"value"in t}(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 y(o){const{values:t,children:e}=o;return(0,n.useMemo)(()=>{const o=t??function(o){return F(o).map(({props:{value:o,label:t,attributes:e,default:n}})=>({value:o,label:t,attributes:e,default:n}))}(e);return function(o){const t=(0,a.XI)(o,(o,t)=>o.value===t.value);if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map(o=>o.value).join(", ")}" found in . Every value needs to be unique.`)}(o),o},[t,e])}function d({value:o,tabValues:t}){return t.some(t=>t.value===o)}function D({queryString:o=!1,groupId:t}){const e=(0,l.W6)(),s=function({queryString:o=!1,groupId:t}){if("string"==typeof o)return o;if(!1===o)return null;if(!0===o&&!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:o,groupId:t});return[(0,p.aZ)(s),(0,n.useCallback)(o=>{if(!s)return;const t=new URLSearchParams(e.location.search);t.set(s,o),e.replace({...e.location,search:t.toString()})},[s,e])]}function f(o){const{defaultValue:t,queryString:e=!1,groupId:s}=o,r=y(o),[l,p]=(0,n.useState)(()=>function({defaultValue:o,tabValues:t}){if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(o){if(!d({value:o,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${o}" but none of its children has the corresponding value. Available values are: ${t.map(o=>o.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return o}const e=t.find(o=>o.default)??t[0];if(!e)throw new Error("Unexpected error: 0 tabValues");return e.value}({defaultValue:t,tabValues:r})),[a,F]=D({queryString:e,groupId:s}),[f,u]=function({groupId:o}){const t=function(o){return o?`docusaurus.tab.${o}`:null}(o),[e,s]=(0,i.Dv)(t);return[e,(0,n.useCallback)(o=>{t&&s.set(o)},[t,s])]}({groupId:s}),C=(()=>{const o=a??f;return d({value:o,tabValues:r})?o:null})();(0,c.A)(()=>{C&&p(C)},[C]);return{selectedValue:l,selectValue:(0,n.useCallback)(o=>{if(!d({value:o,tabValues:r}))throw new Error(`Can't select invalid tab value=${o}`);p(o),F(o),u(o)},[F,u,r]),tabValues:r}}var u=e(92303);const C={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var h=e(74848);function k({className:o,block:t,selectedValue:e,selectValue:n,tabValues:l}){const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,r.a_)(),a=o=>{const t=o.currentTarget,s=c.indexOf(t),r=l[s].value;r!==e&&(p(t),n(r))},i=o=>{let t=null;switch(o.key){case"Enter":a(o);break;case"ArrowRight":{const e=c.indexOf(o.currentTarget)+1;t=c[e]??c[0];break}case"ArrowLeft":{const e=c.indexOf(o.currentTarget)-1;t=c[e]??c[c.length-1];break}}t?.focus()};return(0,h.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":t},o),children:l.map(({value:o,label:t,attributes:n})=>(0,h.jsx)("li",{role:"tab",tabIndex:e===o?0:-1,"aria-selected":e===o,ref:o=>{c.push(o)},onKeyDown:i,onClick:a,...n,className:(0,s.A)("tabs__item",C.tabItem,n?.className,{"tabs__item--active":e===o}),children:t??o},o))})}function A({lazy:o,children:t,selectedValue:e}){const r=(Array.isArray(t)?t:[t]).filter(Boolean);if(o){const o=r.find(o=>o.props.value===e);return o?(0,n.cloneElement)(o,{className:(0,s.A)("margin-top--md",o.props.className)}):null}return(0,h.jsx)("div",{className:"margin-top--md",children:r.map((o,t)=>(0,n.cloneElement)(o,{key:t,hidden:o.props.value!==e}))})}function g(o){const t=f(o);return(0,h.jsxs)("div",{className:(0,s.A)("tabs-container",C.tabList),children:[(0,h.jsx)(k,{...t,...o}),(0,h.jsx)(A,{...t,...o})]})}function m(o){const t=(0,u.A)();return(0,h.jsx)(g,{...o,children:F(o.children)},String(t))}},19365:(o,t,e)=>{e.d(t,{A:()=>l});e(96540);var n=e(18215);const s={tabItem:"tabItem_Ymn6"};var r=e(74848);function l({children:o,hidden:t,className:e}){return(0,r.jsx)("div",{role:"tabpanel",className:(0,n.A)(s.tabItem,e),hidden:t,children:o})}},28453:(o,t,e)=>{e.d(t,{R:()=>l,x:()=>c});var n=e(96540);const s={},r=n.createContext(s);function l(o){const t=n.useContext(r);return n.useMemo(function(){return"function"==typeof o?o(t):{...t,...o}},[t,o])}function c(o){let t;return t=o.disableParentContext?"function"==typeof o.components?o.components(s):o.components||s:l(o.components),n.createElement(r.Provider,{value:t},o.children)}},97117:(o,t,e)=>{e.r(t),e.d(t,{CH:()=>i,assets:()=>a,chCodeConfig:()=>F,contentTitle:()=>p,default:()=>D,frontMatter:()=>c,metadata:()=>n,toc:()=>y});const n=JSON.parse('{"id":"API-Reference/api-flows","title":"Flow management endpoints","description":"Use the /flows endpoint to create, read, update, and delete flows.","source":"@site/docs/API-Reference/api-flows.mdx","sourceDirName":"API-Reference","slug":"/api-flows","permalink":"/api-flows","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Flow management endpoints","slug":"/api-flows"},"sidebar":"docs","previous":{"title":"Flow trigger endpoints","permalink":"/api-flows-run"},"next":{"title":"Files endpoints","permalink":"/api-files"}}');var s=e(74848),r=e(28453),l=e(24754);e(11470),e(19365);const c={title:"Flow management endpoints",slug:"/api-flows"},p=void 0,a={},i={annotations:l.hk,Code:l.Cy},F={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},y=[{value:"Create flow",id:"create-flow",level:2},{value:"Create flows",id:"create-flows",level:2},{value:"Read flow",id:"read-flow",level:2},{value:"Read flows",id:"read-flows",level:2},{value:"Read sample flows",id:"read-sample-flows",level:2},{value:"Update flow",id:"update-flow",level:2},{value:"Delete flow",id:"delete-flow",level:2},{value:"Export flows",id:"export-flows",level:2},{value:"Import flows",id:"import-flows",level:2}];function d(o){const t={a:"a",code:"code",h2:"h2",p:"p",...(0,r.R)(),...o.components},{Details:e}=t;return i||f("CH",!1),i.Code||f("CH.Code",!0),e||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)(t.p,{children:["Use the ",(0,s.jsx)(t.code,{children:"/flows"})," endpoint to create, read, update, and delete flows."]}),"\n",(0,s.jsxs)(t.p,{children:["If you want to use the Langflow API to run a flow, see ",(0,s.jsx)(t.a,{href:"/api-flows-run",children:"Flow trigger endpoints"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"create-flow",children:"Create flow"}),"\n",(0,s.jsx)(t.p,{children:"Creates a new flow."}),"\n",(0,s.jsx)(i.Code,{codeConfig:F,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/flows/" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "name": "string2",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "description": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "icon": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "icon_bg_color": "#FF0000",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "gradient": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "data": {},',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "is_component": false,',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "updated_at": "2024-12-30T15:48:01.519Z",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "webhook": false,',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "endpoint_name": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "tags": [',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "string"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ]",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(i.Code,{codeConfig:F,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:'"string2"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "description"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "icon"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "icon_bg_color"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"#FF0000"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "gradient"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "data"',props:{style:{color:"#7EE787"}}},{content:": {},",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "is_component"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "updated_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2025-02-04T21:07:36+00:00"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "webhook"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "endpoint_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "tags"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:"],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "locked"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"e8d81c37-714b-49ae-ba82-e61141f020ee"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "user_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"f58396d4-a387-4bb8-b749-f40825c3d9f3"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "project_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"1415de42-8f01-4f36-bf34-539f23e47466"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(t.h2,{id:"create-flows",children:"Create flows"}),"\n",(0,s.jsx)(t.p,{children:"Creates multiple new flows, returning an array of flow objects."}),"\n",(0,s.jsx)(i.Code,{codeConfig:F,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/flows/batch/" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "flows": [',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" {",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "name": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "description": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "icon": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "icon_bg_color": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "gradient": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "data": {},',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "is_component": false,',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "updated_at": "2024-12-30T18:36:02.737Z",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "webhook": false,',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "endpoint_name": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "tags": [',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "string"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ],",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "locked": false,',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "user_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "project_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" {",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "name": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "description": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "icon": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "icon_bg_color": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "gradient": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "data": {},',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "is_component": false,',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "updated_at": "2024-12-30T18:36:02.737Z",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "webhook": false,',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "endpoint_name": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "tags": [',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "string"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ],",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "locked": false,',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "user_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "project_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ]",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsx)(t.h2,{id:"read-flow",children:"Read flow"}),"\n",(0,s.jsx)(t.p,{children:"Retrieves a specific flow by its ID."}),"\n",(0,s.jsx)(i.Code,{codeConfig:F,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/flows/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(i.Code,{codeConfig:F,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:'"Basic Prompting"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "description"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Perform basic prompting with an OpenAI model."',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "icon"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Braces"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "icon_bg_color"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "gradient"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "data"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "nodes"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ...",props:{style:{color:"#FFA198",fontStyle:"italic"}}}]},{tokens:[{content:" ]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(t.h2,{id:"read-flows",children:"Read flows"}),"\n",(0,s.jsx)(t.p,{children:"Returns a JSON object containing a list of flows."}),"\n",(0,s.jsx)(t.p,{children:"Retrieve all flows with pagination:"}),"\n",(0,s.jsx)(i.Code,{codeConfig:F,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/flows/?remove_example_flows=false&components_only=false&get_all=true&header_flows=false&page=1&size=50" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t.p,{children:["To retrieve flows from a specific project, use the ",(0,s.jsx)(t.code,{children:"project_id"})," query parameter:"]}),"\n",(0,s.jsx)(i.Code,{codeConfig:F,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/flows/?remove_example_flows=true&components_only=false&get_all=false&project_id=",props:{style:{color:"#A5D6FF"}}},{content:"$PROJECT_ID",props:{style:{color:"#C9D1D9"}}},{content:'&header_flows=false&page=1&size=1" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsx)(t.h2,{id:"read-sample-flows",children:"Read sample flows"}),"\n",(0,s.jsx)(t.p,{children:"Retrieves a list of sample flows:"}),"\n",(0,s.jsx)(i.Code,{codeConfig:F,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/flows/basic_examples/" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsx)(t.h2,{id:"update-flow",children:"Update flow"}),"\n",(0,s.jsx)(t.p,{children:"Updates an existing flow by its ID."}),"\n",(0,s.jsxs)(t.p,{children:["This example changes the value for ",(0,s.jsx)(t.code,{children:"endpoint_name"})," from a random UUID to ",(0,s.jsx)(t.code,{children:"my_new_endpoint_name"}),"."]}),"\n",(0,s.jsx)(i.Code,{codeConfig:F,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"PATCH ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/flows/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "name": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "description": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "data": {},',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "project_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "endpoint_name": "my_new_endpoint_name",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "locked": true',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(i.Code,{codeConfig:F,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:'"string"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "description"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "icon"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Braces"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "icon_bg_color"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "gradient"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "data"',props:{style:{color:"#7EE787"}}},{content:": {},",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "is_component"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "updated_at"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2024-12-30T18:30:22+00:00"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "webhook"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "endpoint_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"my_new_endpoint_name"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "tags"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "locked"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "user_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"f58396d4-a387-4bb8-b749-f40825c3d9f3"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "project_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"3fa85f64-5717-4562-b3fc-2c963f66afa6"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(t.h2,{id:"delete-flow",children:"Delete flow"}),"\n",(0,s.jsx)(t.p,{children:"Deletes a specific flow by its ID."}),"\n",(0,s.jsx)(i.Code,{codeConfig:F,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"DELETE ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/flows/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(i.Code,{codeConfig:F,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Flow deleted successfully"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(t.h2,{id:"export-flows",children:"Export flows"}),"\n",(0,s.jsx)(t.p,{children:"Exports specified flows to a ZIP file."}),"\n",(0,s.jsxs)(t.p,{children:["This endpoint downloads a ZIP file containing ",(0,s.jsx)(t.a,{href:"/concepts-flows-import#langflow-json-file-contents",children:"Langflow JSON files"})," for each flow ID listed in the request body."]}),"\n",(0,s.jsx)(i.Code,{codeConfig:F,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/flows/download/" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'[",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "e1e40c77-0541-41a9-88ab-ddb3419398b5",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "92f9a4c5-cfc8-4656-ae63-1f0881163c28"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"]' ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --output ",props:{style:{color:"#79C0FF"}}},{content:"langflow-flows.zip",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(i.Code,{codeConfig:F,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:" % Total % Received % Xferd Average Speed Time Time Time Current",props:{}}]},{tokens:[{content:" Dload Upload Total Spent Left Speed",props:{}}]},{tokens:[{content:"100 76437 0 76353 100 84 4516k 5088 --:--:-- --:--:-- --:--:-- 4665k",props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n",(0,s.jsx)(t.h2,{id:"import-flows",children:"Import flows"}),"\n",(0,s.jsxs)(t.p,{children:["Imports flows by uploading a ",(0,s.jsx)(t.a,{href:"/concepts-flows-import#langflow-json-file-contents",children:"Langflow-compatible JSON file"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["To specify a target project for the flow, include the query parameter ",(0,s.jsx)(t.code,{children:"project_id"}),".\nThe target ",(0,s.jsx)(t.code,{children:"project_id"})," must already exist before uploading a flow. Call the ",(0,s.jsx)(t.a,{href:"/api-projects#read-projects",children:"/api/v1/projects/"})," endpoint for a list of available projects."]}),"\n",(0,s.jsxs)(t.p,{children:["This example uploads a local file named ",(0,s.jsx)(t.code,{children:"agent-with-astra-db-tool.json"})," to a project specified by a ",(0,s.jsx)(t.code,{children:"PROJECT_ID"})," variable:"]}),"\n",(0,s.jsx)(i.Code,{codeConfig:F,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/flows/upload/?project_id=",props:{style:{color:"#A5D6FF"}}},{content:"$PROJECT_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"Content-Type: multipart/form-data" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -F ",props:{style:{color:"#79C0FF"}}},{content:'"file=@agent-with-astra-db-tool.json;type=application/json"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(i.Code,{codeConfig:F,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:'"agent-with-astra-db-tool"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "description"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'""',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "icon"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "icon_bg_color"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "gradient"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "data"',props:{style:{color:"#7EE787"}}},{content:": {}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ...",props:{style:{color:"#FFA198",fontStyle:"italic"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]})]})}function D(o={}){const{wrapper:t}={...(0,r.R)(),...o.components};return t?(0,s.jsx)(t,{...o,children:(0,s.jsx)(d,{...o})}):d(o)}function f(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/7e40e6b3.1f2c6944.js b/assets/js/7e40e6b3.1f2c6944.js deleted file mode 100644 index 6ebf50ba5f..0000000000 --- a/assets/js/7e40e6b3.1f2c6944.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[9227],{17886:(e,t,n)=>{n.d(t,{A:()=>i});n(96540);var r=n(64058),s=n(74848);function i({name:e,...t}){const n=r[e];return n?(0,s.jsx)(n,{...t}):null}},78066:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>h,contentTitle:()=>d,default:()=>l,frontMatter:()=>o,metadata:()=>r,toc:()=>m});const r=JSON.parse('{"id":"Components/bundles-mem0","title":"Mem0","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-mem0.mdx","sourceDirName":"Components","slug":"/bundles-mem0","permalink":"/bundles-mem0","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Mem0","slug":"/bundles-mem0"},"sidebar":"docs","previous":{"title":"MariTalk","permalink":"/bundles-maritalk"},"next":{"title":"MistralAI","permalink":"/bundles-mistralai"}}');var s=n(74848),i=n(28453),a=n(17886);const o={title:"Mem0",slug:"/bundles-mem0"},d=void 0,h={},m=[{value:"Mem0 Chat Memory",id:"mem0-chat-memory",level:2},{value:"Mem0 Chat Memory parameters",id:"mem0-chat-memory-parameters",level:3},{value:"Mem0 Chat Memory output",id:"mem0-chat-memory-output",level:3}];function c(e){const t={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,s.jsxs)(t.p,{children:["This page describes the components that are available in the ",(0,s.jsx)(t.strong,{children:"Mem0"})," bundle."]}),"\n",(0,s.jsx)(t.h2,{id:"mem0-chat-memory",children:"Mem0 Chat Memory"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.strong,{children:"Mem0 Chat Memory"})," component retrieves and stores chat messages using Mem0 memory storage."]}),"\n",(0,s.jsx)(t.h3,{id:"mem0-chat-memory-parameters",children:"Mem0 Chat Memory parameters"}),"\n",(0,s.jsxs)(t.p,{children:["Many ",(0,s.jsx)(t.strong,{children:"Mem0 Chat Memory"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,s.jsx)(a.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(t.strong,{children:"Controls"})," in the ",(0,s.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Display Name"}),(0,s.jsx)(t.th,{children:"Info"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"mem0_config"}),(0,s.jsx)(t.td,{children:"Mem0 Configuration"}),(0,s.jsx)(t.td,{children:"Input parameter. The configuration dictionary for initializing the Mem0 memory instance."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"ingest_message"}),(0,s.jsx)(t.td,{children:"Message to Ingest"}),(0,s.jsx)(t.td,{children:"Input parameter. The message content to be ingested into Mem0 memory."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"existing_memory"}),(0,s.jsx)(t.td,{children:"Existing Memory Instance"}),(0,s.jsx)(t.td,{children:"Input parameter. An optional existing Mem0 memory instance."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"user_id"}),(0,s.jsx)(t.td,{children:"User ID"}),(0,s.jsx)(t.td,{children:"Input parameter. The identifier for the user associated with the messages."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"search_query"}),(0,s.jsx)(t.td,{children:"Search Query"}),(0,s.jsx)(t.td,{children:"Input parameter. The input text for searching related memories in Mem0."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"mem0_api_key"}),(0,s.jsx)(t.td,{children:"Mem0 API Key"}),(0,s.jsx)(t.td,{children:"Input parameter. The API key for the Mem0 platform. Leave empty to use the local version."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"metadata"}),(0,s.jsx)(t.td,{children:"Metadata"}),(0,s.jsx)(t.td,{children:"Input parameter. The additional metadata to associate with the ingested message."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"openai_api_key"}),(0,s.jsx)(t.td,{children:"OpenAI API Key"}),(0,s.jsx)(t.td,{children:"Input parameter. The API key for OpenAI. Required when using OpenAI embeddings without a provided configuration."})]})]})]}),"\n",(0,s.jsx)(t.h3,{id:"mem0-chat-memory-output",children:"Mem0 Chat Memory output"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.strong,{children:"Mem0 Chat Memory"})," component can output either ",(0,s.jsx)(t.strong,{children:"Mem0 Memory"})," (",(0,s.jsx)(t.a,{href:"/data-types#memory",children:(0,s.jsx)(t.code,{children:"Memory"})}),") or ",(0,s.jsx)(t.strong,{children:"Search Results"})," (",(0,s.jsx)(t.a,{href:"/data-types#data",children:(0,s.jsx)(t.code,{children:"Data"})}),").\nYou can select the output type near the component's output port."]}),"\n",(0,s.jsxs)(t.p,{children:["Use ",(0,s.jsx)(t.strong,{children:"Mem0 Chat Memory"})," for memory storage and retrieval operations with the ",(0,s.jsxs)(t.a,{href:"/components-helpers#message-history",children:[(0,s.jsx)(t.strong,{children:"Message History"})," component"]}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["Use the ",(0,s.jsx)(t.strong,{children:"Search Results"})," output to retrieve specific memories based on a search query."]})]})}function l(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}}}]); \ No newline at end of file diff --git a/assets/js/7e40e6b3.c1f98c4b.js b/assets/js/7e40e6b3.c1f98c4b.js new file mode 100644 index 0000000000..12c6405a57 --- /dev/null +++ b/assets/js/7e40e6b3.c1f98c4b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[9227],{17886:(e,t,n)=>{n.d(t,{A:()=>i});n(96540);var r=n(64058),s=n(74848);function i({name:e,...t}){const n=r[e];return n?(0,s.jsx)(n,{...t}):null}},31929:(e,t,n)=>{n.d(t,{Ay:()=>d,RM:()=>a});var r=n(74848),s=n(28453),i=n(17886);const a=[];function o(e){const t={a:"a",p:"p",strong:"strong",...(0,s.R)(),...e.components};return(0,r.jsxs)(t.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,r.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Controls"})," in the ",(0,r.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function d(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(o,{...e})}):o(e)}},78066:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>h,contentTitle:()=>d,default:()=>l,frontMatter:()=>o,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"Components/bundles-mem0","title":"Mem0","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-mem0.mdx","sourceDirName":"Components","slug":"/bundles-mem0","permalink":"/bundles-mem0","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Mem0","slug":"/bundles-mem0"},"sidebar":"docs","previous":{"title":"MariTalk","permalink":"/bundles-maritalk"},"next":{"title":"MistralAI","permalink":"/bundles-mistralai"}}');var s=n(74848),i=n(28453),a=(n(17886),n(31929));const o={title:"Mem0",slug:"/bundles-mem0"},d=void 0,h={},c=[{value:"Mem0 Chat Memory",id:"mem0-chat-memory",level:2},{value:"Mem0 Chat Memory parameters",id:"mem0-chat-memory-parameters",level:3},...a.RM,{value:"Mem0 Chat Memory output",id:"mem0-chat-memory-output",level:3}];function m(e){const t={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,s.jsxs)(t.p,{children:["This page describes the components that are available in the ",(0,s.jsx)(t.strong,{children:"Mem0"})," bundle."]}),"\n",(0,s.jsx)(t.h2,{id:"mem0-chat-memory",children:"Mem0 Chat Memory"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.strong,{children:"Mem0 Chat Memory"})," component retrieves and stores chat messages using Mem0 memory storage."]}),"\n",(0,s.jsx)(t.h3,{id:"mem0-chat-memory-parameters",children:"Mem0 Chat Memory parameters"}),"\n",(0,s.jsx)(a.Ay,{}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Display Name"}),(0,s.jsx)(t.th,{children:"Info"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"mem0_config"}),(0,s.jsx)(t.td,{children:"Mem0 Configuration"}),(0,s.jsx)(t.td,{children:"Input parameter. The configuration dictionary for initializing the Mem0 memory instance."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"ingest_message"}),(0,s.jsx)(t.td,{children:"Message to Ingest"}),(0,s.jsx)(t.td,{children:"Input parameter. The message content to be ingested into Mem0 memory."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"existing_memory"}),(0,s.jsx)(t.td,{children:"Existing Memory Instance"}),(0,s.jsx)(t.td,{children:"Input parameter. An optional existing Mem0 memory instance."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"user_id"}),(0,s.jsx)(t.td,{children:"User ID"}),(0,s.jsx)(t.td,{children:"Input parameter. The identifier for the user associated with the messages."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"search_query"}),(0,s.jsx)(t.td,{children:"Search Query"}),(0,s.jsx)(t.td,{children:"Input parameter. The input text for searching related memories in Mem0."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"mem0_api_key"}),(0,s.jsx)(t.td,{children:"Mem0 API Key"}),(0,s.jsx)(t.td,{children:"Input parameter. The API key for the Mem0 platform. Leave empty to use the local version."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"metadata"}),(0,s.jsx)(t.td,{children:"Metadata"}),(0,s.jsx)(t.td,{children:"Input parameter. The additional metadata to associate with the ingested message."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"openai_api_key"}),(0,s.jsx)(t.td,{children:"OpenAI API Key"}),(0,s.jsx)(t.td,{children:"Input parameter. The API key for OpenAI. Required when using OpenAI embeddings without a provided configuration."})]})]})]}),"\n",(0,s.jsx)(t.h3,{id:"mem0-chat-memory-output",children:"Mem0 Chat Memory output"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.strong,{children:"Mem0 Chat Memory"})," component can output either ",(0,s.jsx)(t.strong,{children:"Mem0 Memory"})," (",(0,s.jsx)(t.a,{href:"/data-types#memory",children:(0,s.jsx)(t.code,{children:"Memory"})}),") or ",(0,s.jsx)(t.strong,{children:"Search Results"})," (",(0,s.jsx)(t.a,{href:"/data-types#data",children:(0,s.jsx)(t.code,{children:"Data"})}),").\nYou can select the output type near the component's output port."]}),"\n",(0,s.jsxs)(t.p,{children:["Use ",(0,s.jsx)(t.strong,{children:"Mem0 Chat Memory"})," for memory storage and retrieval operations with the ",(0,s.jsxs)(t.a,{href:"/components-helpers#message-history",children:[(0,s.jsx)(t.strong,{children:"Message History"})," component"]}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["Use the ",(0,s.jsx)(t.strong,{children:"Search Results"})," output to retrieve specific memories based on a search query."]})]})}function l(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(m,{...e})}):m(e)}}}]); \ No newline at end of file diff --git a/assets/js/7f193c41.0846ef5d.js b/assets/js/7f193c41.0846ef5d.js deleted file mode 100644 index 95d541593d..0000000000 --- a/assets/js/7f193c41.0846ef5d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[5761],{14876:(e,n,t)=>{t.r(n),t.d(n,{CH:()=>h,assets:()=>l,chCodeConfig:()=>p,contentTitle:()=>c,default:()=>j,frontMatter:()=>d,metadata:()=>s,toc:()=>x});const s=JSON.parse('{"id":"Components/components-data","title":"Data","description":"You can use Langflow\'s Data components to bring data into your flows from various sources like files, API endpoints, and URLs.","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":"Embedding Model","permalink":"/components-embedding-models"},"next":{"title":"Vector Stores","permalink":"/components-vector-stores"}}');var r=t(74848),o=t(28453),a=t(24754),i=t(17886);const d={title:"Data",slug:"/components-data"},c=void 0,l={},h={annotations:a.hk,Code:a.Cy},p={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},x=[{value:"Use Data components in flows",id:"use-data-components-in-flows",level:2},{value:"API Request",id:"api-request",level:2},{value:"API Request parameters",id:"api-request-parameters",level:3},{value:"Directory",id:"directory",level:2},{value:"Directory parameters",id:"directory-parameters",level:3},{value:"File",id:"file",level:2},{value:"File type and size limits",id:"file-type-and-size-limits",level:3},{value:"File parameters",id:"file-parameters",level:3},{value:"File output",id:"file-output",level:3},{value:"News Search",id:"news-search",level:2},{value:"News Search parameters",id:"news-search-parameters",level:3},{value:"RSS Reader",id:"rss-reader",level:2},{value:"RSS Reader parameters",id:"rss-reader-parameters",level:3},{value:"SQL Database",id:"sql-database",level:2},{value:"Query an SQL database with natural language prompts",id:"query-an-sql-database-with-natural-language-prompts",level:3},{value:"SQL Database parameters",id:"sql-database-parameters",level:3},{value:"URL",id:"url",level:2},{value:"URL parameters",id:"url-parameters",level:3},{value:"URL output",id:"url-output",level:3},{value:"Web Search",id:"web-search",level:2},{value:"Use the Web Search component in a flow",id:"use-the-web-search-component-in-a-flow",level:3},{value:"Web Search parameters",id:"web-search-parameters",level:3},{value:"Web Search output",id:"web-search-output",level:3},{value:"Webhook",id:"webhook",level:2},{value:"Trigger the webhook",id:"trigger-the-webhook",level:3},{value:"Webhook parameters",id:"webhook-parameters",level:3},{value:"Additional Data components",id:"additional-data-components",level:2},{value:"Legacy Data components",id:"legacy-data-components",level:2},{value:"See also",id:"see-also",level:2}];function u(e){const n={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}=n;return h||m("CH",!1),h.Code||m("CH.Code",!0),s||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.jsxs)(n.p,{children:["You can use Langflow's ",(0,r.jsx)(n.strong,{children:"Data"})," components to bring data into your flows from various sources like files, API endpoints, and URLs.\nFor example:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Load files"}),": Import data from a file or directory with the ",(0,r.jsxs)(n.a,{href:"#file",children:[(0,r.jsx)(n.strong,{children:"File"})," component"]})," and ",(0,r.jsxs)(n.a,{href:"#directory",children:[(0,r.jsx)(n.strong,{children:"Directory"})," component"]}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Search the web"}),": Fetch data from the web with components like the ",(0,r.jsxs)(n.a,{href:"#news-search",children:[(0,r.jsx)(n.strong,{children:"News Search"})," component"]}),", ",(0,r.jsxs)(n.a,{href:"#rss-reader",children:[(0,r.jsx)(n.strong,{children:"RSS Reader"})," component"]}),", ",(0,r.jsxs)(n.a,{href:"#web-search",children:[(0,r.jsx)(n.strong,{children:"Web Search"})," component"]}),", and ",(0,r.jsxs)(n.a,{href:"#url",children:[(0,r.jsx)(n.strong,{children:"URL"})," component"]}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Make API calls"}),": Use APIs to trigger flows or perform actions with the ",(0,r.jsxs)(n.a,{href:"#api-request",children:[(0,r.jsx)(n.strong,{children:"API Request"})," component"]})," and ",(0,r.jsxs)(n.a,{href:"#webhook",children:[(0,r.jsx)(n.strong,{children:"Webhook"})," component"]}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Run SQL queries"}),": Query an SQL database with the ",(0,r.jsxs)(n.a,{href:"#sql-database",children:[(0,r.jsx)(n.strong,{children:"SQL Database"})," component"]}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Each component runs different commands for retrieval, processing, and type checking.\nSome components are a minimal wrapper for a command that you provide, and others include built-in scripts to fetch and process data based on variable inputs.\nAdditionally, some components return raw data, whereas others can convert, restructure, or validate the data before outputting it.\nThis means that some similar components might produce different results."}),"\n",(0,r.jsxs)(n.admonition,{type:"tip",children:[(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Data"})," components pair well with ",(0,r.jsxs)(n.a,{href:"/components-processing",children:[(0,r.jsx)(n.strong,{children:"Processing"})," components"]})," that can perform additional parsing, transformation, and validation after retrieving the data."]}),(0,r.jsxs)(n.p,{children:["This can include basic operations, like saving a file in a specific format, or more complex tasks, like using a ",(0,r.jsx)(n.strong,{children:"Text Splitter"})," component to break down a large document into smaller chunks before generating embeddings for vector search."]})]}),"\n",(0,r.jsx)(n.h2,{id:"use-data-components-in-flows",children:"Use Data components in flows"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Data"})," components are used often in flows because they offer a versatile way to perform common, basic functions."]}),"\n",(0,r.jsxs)(n.p,{children:["You can use ",(0,r.jsx)(n.strong,{children:"Data"})," components to perform their base functions as isolated steps in your flow, or you can connect them to an ",(0,r.jsx)(n.strong,{children:"Agent"})," component as tools."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"An agent flow with three Data components connected to the agent as tools",src:t(84987).A+"",width:"4000",height:"3028"})}),"\n",(0,r.jsxs)(n.p,{children:["For examples of ",(0,r.jsx)(n.strong,{children:"Data"})," components in flows, see the following:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/chat-with-files",children:"Create a chatbot that can ingest files"}),": Learn how to use a ",(0,r.jsx)(n.strong,{children:"File"})," component to load a file as context for a chatbot.\nThe file and user input are both passed to the LLM so you can ask questions about the file you uploaded."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/chat-with-rag",children:"Create a vector RAG chatbot"}),": Learn how to ingest files for use in Retrieval-Augmented Generation (RAG), and then set up a chatbot that can use the ingested files as context.\nThe two flows in this tutorial prepare files for RAG, and then let your LLM use vector search to retrieve contextually relevant data during a chat session."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/agents-tools",children:"Configure tools for agents"}),": Learn how to use any component as a tool for an agent.\nWhen used as tools, the agent autonomously decides when to call a component based on the user's query."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/webhook",children:"Trigger flows with webhooks"}),": Learn how to use the ",(0,r.jsx)(n.strong,{children:"Webhook"})," component to trigger a flow run in response to an external event."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"api-request",children:"API Request"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"API Request"})," component constructs and sends an HTTP requests using URLs or curl commands:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"URL mode"}),": Enter one or more comma-separated URLs, and then select the method for the request to each URL."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"curl mode"}),": Enter the curl command to execute."]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"You can enable additional request options and fields in the component's parameters."}),"\n",(0,r.jsxs)(n.p,{children:["Returns a ",(0,r.jsxs)(n.a,{href:"/data-types#data",children:[(0,r.jsx)(n.code,{children:"Data"})," object"]})," containing the response."]}),"\n",(0,r.jsxs)(n.p,{children:["For provider-specific API components, see ",(0,r.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"api-request-parameters",children:"API Request parameters"}),"\n",(0,r.jsxs)(n.p,{children:["Most ",(0,r.jsx)(n.strong,{children:"API Request"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,r.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Controls"})," in the ",(0,r.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(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:"mode"}),(0,r.jsx)(n.td,{children:"Mode"}),(0,r.jsxs)(n.td,{children:["Input parameter. Set the mode to either ",(0,r.jsx)(n.strong,{children:"URL"})," or ",(0,r.jsx)(n.strong,{children:"curl"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"urls"}),(0,r.jsx)(n.td,{children:"URL"}),(0,r.jsx)(n.td,{children:"Input parameter. Enter one or more comma-separated URLs for the request."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"curl"}),(0,r.jsx)(n.td,{children:"curl"}),(0,r.jsxs)(n.td,{children:["Input parameter. ",(0,r.jsx)(n.strong,{children:"curl mode"})," only. Enter a complete curl command. Other component parameters are populated from the command arguments."]})]}),(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:"Input parameter. The HTTP method to use."})]}),(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:"Input parameter. 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.jsx)(n.td,{children:"Input parameter. The body to send with POST, PATCH, and PUT requests as a dictionary."})]}),(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:"Input parameter. 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:"Input parameter. 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:"Input parameter. Whether to follow HTTP redirects. The default is enabled (true). If disabled (false), HTTP redirects aren't followed."})]}),(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:"Input parameter. Whether to save the API response to a temporary file. Default: Disabled/false"})]}),(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:["Input parameter. Whether to 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. Default: Disabled/false"]})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"directory",children:"Directory"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Directory"})," component recursively loads files from a directory, with options for file types, depth, and concurrency."]}),"\n",(0,r.jsxs)(n.p,{children:["Files must be of a ",(0,r.jsx)(n.a,{href:"#file-type-and-size-limits",children:"supported type and size"})," to be loaded."]}),"\n",(0,r.jsxs)(n.p,{children:["Outputs either a ",(0,r.jsx)(n.a,{href:"/data-types#data",children:(0,r.jsx)(n.code,{children:"Data"})})," or ",(0,r.jsx)(n.a,{href:"/data-types#dataframe",children:(0,r.jsx)(n.code,{children:"DataFrame"})})," object, depending on the directory contents."]}),"\n",(0,r.jsx)(n.h3,{id:"directory-parameters",children:"Directory parameters"}),"\n",(0,r.jsxs)(n.p,{children:["Many ",(0,r.jsx)(n.strong,{children:"Directory"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,r.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Controls"})," in the ",(0,r.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(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:"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.jsxs)(n.td,{children:["Input parameter. The path to the directory to load files from. Default: Current directory (",(0,r.jsx)(n.code,{children:"."}),")"]})]}),(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:"Input parameter. The file types to load. Select one or more, or leave empty to attempt to load all files."})]}),(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:"Input parameter. 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:"Input parameter. The maximum concurrency for loading multiple 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:"Input parameter. 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:"Input parameter. 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:"Input parameter. If true, errors don't 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:"Input parameter. If true, multithreading is used."})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"file",children:"File"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"File"})," component loads and parses files, converts the content into a ",(0,r.jsx)(n.code,{children:"Data"}),", ",(0,r.jsx)(n.code,{children:"DataFrame"}),", or ",(0,r.jsx)(n.code,{children:"Message"})," object.\nIt supports multiple file types and provides parameters for parallel processing and error handling."]}),"\n",(0,r.jsxs)(n.p,{children:["You can add files to the ",(0,r.jsx)(n.strong,{children:"File"})," component in the visual editor or at runtime, and you can upload multiple files at once.\nFor more information about uploading files and working with files in flows, see ",(0,r.jsx)(n.a,{href:"/concepts-file-management",children:"File management"})," and ",(0,r.jsx)(n.a,{href:"/chat-with-files",children:"Create a chatbot that can ingest files"}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"file-type-and-size-limits",children:"File type and size limits"}),"\n",(0,r.jsxs)(n.p,{children:["By default, the maximum file size is 100 MB.\nTo modify this value, change the ",(0,r.jsx)(n.code,{children:"--max-file-size-upload"})," ",(0,r.jsx)(n.a,{href:"/environment-variables",children:"environment variable"}),"."]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Supported file types"}),(0,r.jsxs)(n.p,{children:["The following file types are supported by the ",(0,r.jsx)(n.strong,{children:"File"})," component.\nUse archive and compressed formats to bundle multiple files together, or use the ",(0,r.jsxs)(n.a,{href:"#directory",children:[(0,r.jsx)(n.strong,{children:"Directory"})," component"]})," to load all files in a directory."]}),(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".bz2"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".csv"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".docx"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".gz"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".htm"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".html"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".json"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".js"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".md"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".mdx"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".pdf"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".py"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".sh"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".sql"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".tar"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".tgz"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".ts"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".tsx"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".txt"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".xml"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".yaml"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".yml"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".zip"})}),"\n"]})]}),"\n",(0,r.jsx)(n.p,{children:"If you need to load an unsupported file type, you must use a different component that supports that file type and, potentially, parses it outside Langflow, or you must convert it to a supported type before uploading it."}),"\n",(0,r.jsxs)(n.p,{children:["For images, see ",(0,r.jsx)(n.a,{href:"/concepts-file-management#upload-images",children:"Upload images"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["For videos, see the ",(0,r.jsx)(n.strong,{children:"Twelve Labs"})," and ",(0,r.jsx)(n.strong,{children:"YouTube"})," ",(0,r.jsx)(n.a,{href:"/components-bundle-components",children:"bundles"})," in the Langflow ",(0,r.jsx)(n.strong,{children:"Components"})," menu."]}),"\n",(0,r.jsx)(n.h3,{id:"file-parameters",children:"File parameters"}),"\n",(0,r.jsxs)(n.p,{children:["Most ",(0,r.jsx)(n.strong,{children:"File"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,r.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Controls"})," in the ",(0,r.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(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.jsxs)(n.td,{children:["Input parameter. The path to files to load. Can be local or in ",(0,r.jsx)(n.a,{href:"/concepts-file-management",children:"Langflow file management"}),". Supports individual files and 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:["Input parameter. A ",(0,r.jsx)(n.code,{children:"Data"})," object with a ",(0,r.jsx)(n.code,{children:"file_path"})," property pointing to a file in ",(0,r.jsx)(n.a,{href:"/concepts-file-management",children:"Langflow file management"})," or a ",(0,r.jsx)(n.code,{children:"Message"})," object with a path to the file. Supersedes ",(0,r.jsx)(n.strong,{children:"Files"})," (",(0,r.jsx)(n.code,{children:"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.jsxs)(n.td,{children:["Input parameter. The separator to use between multiple outputs in ",(0,r.jsx)(n.code,{children:"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:"Input parameter. If true, errors in the component don't raise an exception. The default is false/disabled."})]}),(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.jsxs)(n.td,{children:["Input parameter. If true (default), the ",(0,r.jsx)(n.strong,{children:"Server File Path"})," (",(0,r.jsx)(n.code,{children:"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.jsxs)(n.td,{children:["Input parameter. If enabled (true), files with unsupported extensions are accepted but not processed. If disabled (false), the ",(0,r.jsx)(n.strong,{children:"File"})," component either can throw an error if an unsupported file type is provided. The default is true."]})]}),(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:["Input parameter. If true, ",(0,r.jsx)(n.code,{children:"Data"})," with no ",(0,r.jsx)(n.code,{children:"file_path"})," property is ignored. If false (default), the component errors when a file isn't specified."]})]}),(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:"Input parameter. The number of files to process concurrently if multiple files are uploaded. Default is 1. Values greater than 1 enable parallel processing for 2 or more files."})]})]})]}),"\n",(0,r.jsx)(n.h3,{id:"file-output",children:"File output"}),"\n",(0,r.jsxs)(n.p,{children:["The output of the ",(0,r.jsx)(n.strong,{children:"File"})," component depends on the number and type of files loaded:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"No files"}),": Throws an error or, if ",(0,r.jsx)(n.strong,{children:"Silent Errors"})," is enabled, produces no output."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"One file"}),": Produces one of the following depending on the file type. If multiple types are available, you can select the output type by clicking the output field (near the component's output port)."]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Structured Content"}),": Available for some tabular and structured data.\nFor ",(0,r.jsx)(n.code,{children:".csv"})," files, produces a ",(0,r.jsx)(n.a,{href:"/data-types#dataframe",children:(0,r.jsx)(n.code,{children:"DataFrame"})})," representing the table data.\nFor ",(0,r.jsx)(n.code,{children:".json"})," files, produces a ",(0,r.jsx)(n.a,{href:"/data-types#data",children:(0,r.jsx)(n.code,{children:"Data"})})," object with the parsed JSON data."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Raw Content"}),": A ",(0,r.jsx)(n.a,{href:"/data-types#message",children:(0,r.jsx)(n.code,{children:"Message"})})," containing the file's raw text content."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"File Path"}),": A ",(0,r.jsx)(n.a,{href:"/data-types#message",children:(0,r.jsx)(n.code,{children:"Message"})})," containing the path to the file in ",(0,r.jsx)(n.a,{href:"/concepts-file-management",children:"Langflow file management"}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Multiple files"}),": Produces a ",(0,r.jsx)(n.strong,{children:"Files"})," ",(0,r.jsx)(n.a,{href:"/data-types#dataframe",children:(0,r.jsx)(n.code,{children:"DataFrame"})})," containing the content and metadata of all selected files."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"news-search",children:"News Search"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"News Search"})," component searches Google News through RSS, and then returns clean article data as a ",(0,r.jsx)(n.a,{href:"/data-types#dataframe",children:(0,r.jsx)(n.code,{children:"DataFrame"})})," containing article titles, links, publication dates, and summaries.\nThe component's ",(0,r.jsx)(n.code,{children:"clean_html"})," method parses the HTML content with the BeautifulSoup library, removes HTML markup, and strips whitespace to output clean data."]}),"\n",(0,r.jsxs)(n.p,{children:["For other RSS feeds, use the ",(0,r.jsxs)(n.a,{href:"#rss-reader",children:[(0,r.jsx)(n.strong,{children:"RSS Reader"})," component"]}),", and for other searches use the ",(0,r.jsxs)(n.a,{href:"#web-search",children:[(0,r.jsx)(n.strong,{children:"Web Search"})," component"]})," or a provider-specific ",(0,r.jsx)(n.a,{href:"/components-bundle-components",children:"bundle"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["When used as a standard component in a flow, the ",(0,r.jsx)(n.strong,{children:"News Search"})," component must be connected to a component that accepts ",(0,r.jsx)(n.code,{children:"DataFrame"})," input.\nYou can connect the ",(0,r.jsx)(n.strong,{children:"News Search"})," component directly to a compatible component, or you can use a ",(0,r.jsxs)(n.a,{href:"/components-processing",children:[(0,r.jsx)(n.strong,{children:"Processing"})," component"]})," to convert or extract data of a different type between components."]}),"\n",(0,r.jsxs)(n.p,{children:["When used in ",(0,r.jsx)(n.strong,{children:"Tool Mode"})," with an ",(0,r.jsx)(n.strong,{children:"Agent"})," component, the ",(0,r.jsx)(n.strong,{children:"News Search"})," component can be connected directly to the ",(0,r.jsx)(n.strong,{children:"Agent"})," component's ",(0,r.jsx)(n.strong,{children:"Tools"})," port without converting the data.\nThe agent decides whether to use the ",(0,r.jsx)(n.strong,{children:"News Search"})," component based on the user's query, and it can process the ",(0,r.jsx)(n.code,{children:"DataFrame"})," output directly."]}),"\n",(0,r.jsx)(n.h3,{id:"news-search-parameters",children:"News Search parameters"}),"\n",(0,r.jsxs)(n.p,{children:["Most ",(0,r.jsx)(n.strong,{children:"News Search"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,r.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Controls"})," in the ",(0,r.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(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:"Input parameter. 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:["Input parameter. 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:["Input parameter. 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:["Input parameter. 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.jsxs)(n.td,{children:["Input parameter. One of: ",(0,r.jsx)(n.code,{children:"WORLD"}),", ",(0,r.jsx)(n.code,{children:"NATION"}),", ",(0,r.jsx)(n.code,{children:"BUSINESS"}),", ",(0,r.jsx)(n.code,{children:"TECHNOLOGY"}),", ",(0,r.jsx)(n.code,{children:"ENTERTAINMENT"}),", ",(0,r.jsx)(n.code,{children:"SCIENCE"}),", ",(0,r.jsx)(n.code,{children:"SPORTS"}),", ",(0,r.jsx)(n.code,{children:"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:"Input parameter. 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:"Input parameter. Timeout for the request in seconds."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"articles"}),(0,r.jsx)(n.td,{children:"News Articles"}),(0,r.jsxs)(n.td,{children:["Output parameter. A ",(0,r.jsx)(n.code,{children:"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.jsx)(n.h2,{id:"rss-reader",children:"RSS Reader"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"RSS Reader"})," component fetches and parses RSS feeds from any valid RSS feed URL, and then returns the feed content as a ",(0,r.jsx)(n.a,{href:"/data-types#dataframe",children:(0,r.jsx)(n.code,{children:"DataFrame"})})," containing article titles, links, publication dates, and summaries."]}),"\n",(0,r.jsxs)(n.p,{children:["When used as a standard component in a flow, the ",(0,r.jsx)(n.strong,{children:"RSS Reader"})," component must be connected to a component that accepts ",(0,r.jsx)(n.code,{children:"DataFrame"})," input.\nYou can connect the ",(0,r.jsx)(n.strong,{children:"RSS Reader"})," component directly to a compatible component, or you can use a ",(0,r.jsxs)(n.a,{href:"/components-processing",children:[(0,r.jsx)(n.strong,{children:"Processing"})," component"]})," to convert or extract data of a different type between components."]}),"\n",(0,r.jsxs)(n.p,{children:["When used in ",(0,r.jsx)(n.strong,{children:"Tool Mode"})," with an ",(0,r.jsx)(n.strong,{children:"Agent"})," component, the ",(0,r.jsx)(n.strong,{children:"RSS Reader"})," component can be connected directly to the ",(0,r.jsx)(n.strong,{children:"Agent"})," component's ",(0,r.jsx)(n.strong,{children:"Tools"})," port without converting the data.\nThe agent decides whether to use the ",(0,r.jsx)(n.strong,{children:"RSS Reader"})," component based on the user's query, and it can process the ",(0,r.jsx)(n.code,{children:"DataFrame"})," output directly."]}),"\n",(0,r.jsx)(n.h3,{id:"rss-reader-parameters",children:"RSS Reader parameters"}),"\n",(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.jsxs)(n.td,{children:["Input parameter. URL of the RSS feed to parse, such as ",(0,r.jsx)(n.code,{children:"https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml"}),"."]})]}),(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:["Input parameter. Timeout for the RSS feed request in seconds. Default: ",(0,r.jsx)(n.code,{children:"5"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"articles"}),(0,r.jsx)(n.td,{children:"Articles"}),(0,r.jsxs)(n.td,{children:["Output parameter. A ",(0,r.jsx)(n.code,{children:"DataFrame"})," containing 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.jsx)(n.h2,{id:"sql-database",children:"SQL Database"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"SQL Database"})," 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, such as PostgreSQL, MySQL, and SQLite."]}),"\n",(0,r.jsxs)(n.p,{children:["For CQL queries, see the ",(0,r.jsxs)(n.a,{href:"/bundles-datastax",children:[(0,r.jsx)(n.strong,{children:"DataStax"})," bundle"]}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"query-an-sql-database-with-natural-language-prompts",children:"Query an SQL database with natural language prompts"}),"\n",(0,r.jsxs)(n.p,{children:["The following example demonstrates how to use the ",(0,r.jsx)(n.strong,{children:"SQL Database"})," component in a flow, and then modify the component to support natural language queries through an ",(0,r.jsx)(n.strong,{children:"Agent"})," component."]}),"\n",(0,r.jsxs)(n.p,{children:["This allows you to use the same ",(0,r.jsx)(n.strong,{children:"SQL Database"})," component for any query, rather than limiting it to a single manually entered query or requiring the user, application, or another component to provide valid SQL syntax as input.\nUsers don't need to master SQL syntax because the ",(0,r.jsx)(n.strong,{children:"Agent"})," component translates the users' natural language prompts into SQL queries, passes the query to the ",(0,r.jsx)(n.strong,{children:"SQL Database"})," component, and then returns the results to the user."]}),"\n",(0,r.jsx)(n.p,{children:"Additionally, input from applications and other components doesn't have to be extracted and transformed to exact SQL queries.\nInstead, you only need to provide enough context for the agent to understand that it should create and run a SQL query according to the incoming data."}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Use your own sample database or create a test database."}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Create a test SQL database"}),(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Create a database called ",(0,r.jsx)(n.code,{children:"test.db"}),":"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:p,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"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Add some values to the database:"}),"\n",(0,r.jsx)(h.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"sqlite3 ",props:{style:{color:"#FFA657"}}},{content:'test.db "',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"CREATE TABLE users (",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" id INTEGER PRIMARY KEY,",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" name TEXT,",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" email TEXT,",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" age INTEGER",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:");",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"INSERT INTO users (name, email, age) VALUES",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ('John Doe', 'john@example.com', 30),",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ('Jane Smith', 'jane@example.com', 25),",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ('Bob Johnson', 'bob@example.com', 35);",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Verify that the database has been created and contains your data:"}),"\n",(0,r.jsx)(h.Code,{codeConfig:p,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:"The result should list the text data you entered in the previous step:"}),"\n",(0,r.jsx)(h.Code,{codeConfig:p,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"]}),"\n"]})]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Add an ",(0,r.jsx)(n.strong,{children:"SQL Database"})," component to your flow."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["In the ",(0,r.jsx)(n.strong,{children:"Database URL"})," field, add the connection string for your database, such as ",(0,r.jsx)(n.code,{children:"sqlite:///test.db"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["At this point, you can enter an SQL query in the ",(0,r.jsx)(n.strong,{children:"SQL Query"})," field or use the ",(0,r.jsx)(n.a,{href:"/concepts-components#component-ports",children:"port"})," to pass a query from another component, such as a ",(0,r.jsx)(n.strong,{children:"Chat Input"})," component.\nIf you need more space, click ",(0,r.jsx)(i.A,{name:"Expand","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Expand"})," to open a full-screen text field."]}),"\n",(0,r.jsxs)(n.p,{children:["However, to make this component more dynamic in an agentic context, use an ",(0,r.jsx)(n.strong,{children:"Agent"})," component to transform natural language input to SQL queries, as explained in the following steps."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Click the ",(0,r.jsx)(n.strong,{children:"SQL Database"})," component to expose the ",(0,r.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),", and then enable ",(0,r.jsx)(n.strong,{children:"Tool Mode"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["You can now use this component as a tool for an agent.\nIn ",(0,r.jsx)(n.strong,{children:"Tool Mode"}),", no query is set in the ",(0,r.jsx)(n.strong,{children:"SQL Database"})," component because the agent will generate and send one if it determines that the tool is required to complete the user's request.\nFor more information, see ",(0,r.jsx)(n.a,{href:"/agents-tools",children:"Configure tools for agents"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Add an ",(0,r.jsx)(n.strong,{children:"Agent"})," component to your flow, and then enter your OpenAI API key."]}),"\n",(0,r.jsxs)(n.p,{children:["The default model is an OpenAI model.\nIf you want to use a different model, edit the ",(0,r.jsx)(n.strong,{children:"Model Provider"}),", ",(0,r.jsx)(n.strong,{children:"Model Name"}),", and ",(0,r.jsx)(n.strong,{children:"API Key"})," fields accordingly."]}),"\n",(0,r.jsxs)(n.p,{children:["If you need to execute highly specialized queries, consider selecting a model that is trained for tasks like advanced SQL queries.\nIf your preferred model isn't in the ",(0,r.jsx)(n.strong,{children:"Agent"})," component's built-in model list, select the ",(0,r.jsx)(n.strong,{children:"Custom"})," model provider, and then use a ",(0,r.jsxs)(n.a,{href:"/components-models",children:[(0,r.jsx)(n.strong,{children:"Language Model"})," component"]})," to attach a specific model."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Connect the ",(0,r.jsx)(n.strong,{children:"SQL Database"})," component's ",(0,r.jsx)(n.strong,{children:"Toolset"})," output to the ",(0,r.jsx)(n.strong,{children:"Agent"})," component's ",(0,r.jsx)(n.strong,{children:"Tools"})," input."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"SQL Database component connected to an Agent component",src:t(52189).A+"",width:"4000",height:"2400"})}),"\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 ask the agent a question about the data in your database, such as ",(0,r.jsx)(n.code,{children:"Which users are in my database?"})]}),"\n",(0,r.jsxs)(n.p,{children:["The agent determines that it needs to query the database to answer the question, uses the LLM to generate an SQL query, and then uses the ",(0,r.jsx)(n.strong,{children:"SQL Database"})," component's ",(0,r.jsx)(n.code,{children:"RUN_SQL_QUERY"})," action to run the query on your database.\nFinally, it returns the results in a conversational format, unless you provide instructions to return raw results or a different format."]}),"\n",(0,r.jsx)(n.p,{children:"The following example queried a test database with little data, but with a more robust dataset you could ask more detailed or complex questions."}),"\n",(0,r.jsx)(h.Code,{codeConfig:p,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:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"sql-database-parameters",children:"SQL Database parameters"}),"\n",(0,r.jsxs)(n.p,{children:["Some ",(0,r.jsx)(n.strong,{children:"SQL Database"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,r.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Controls"})," in the ",(0,r.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(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:"Input parameter. 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.jsxs)(n.td,{children:["Input parameter. The SQL query to execute, which can be entered directly, passed in from another component, or, in ",(0,r.jsx)(n.strong,{children:"Tool Mode"}),", automatically provided by an ",(0,r.jsx)(n.strong,{children:"Agent"})," component."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"include_columns"}),(0,r.jsx)(n.td,{children:"Include Columns"}),(0,r.jsx)(n.td,{children:"Input parameter. Whether to include column names in the result. The default is enabled (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.jsx)(n.td,{children:"Input parameter. If enabled, adds any error messages to the result, if any are returned. The default is disabled (false)."})]}),(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.jsxs)(n.td,{children:["Output parameter. The query results as a ",(0,r.jsx)(n.a,{href:"/data-types#dataframe",children:(0,r.jsx)(n.code,{children:"DataFrame"})}),"."]})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"url",children:"URL"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"URL"})," component fetches content from one or more URLs, processes the content, and returns it in various formats.\nIt follows links recursively to a given depth, and it supports output in plain text or raw HTML."]}),"\n",(0,r.jsx)(n.h3,{id:"url-parameters",children:"URL parameters"}),"\n",(0,r.jsxs)(n.p,{children:["Most ",(0,r.jsx)(n.strong,{children:"URL"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,r.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Controls"})," in the ",(0,r.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(0,r.jsx)(n.p,{children:"Some of the available parameters include the following:"}),"\n",(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.jsxs)(n.td,{children:["Input parameter. One or more URLs to crawl recursively. In the visual editor, click ",(0,r.jsx)(i.A,{name:"Plus","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Add URL"})," to add multiple URLs."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"max_depth"}),(0,r.jsx)(n.td,{children:"Depth"}),(0,r.jsx)(n.td,{children:'Input parameter. Controls link traversal: how many "clicks" away from the initial page the crawler will go. A depth of 1 limits the crawl to the first page at the given URL only. A depth of 2 means the crawler crawls the first page plus each page directly linked from the first page, then stops. This setting exclusively controls link traversal; it doesn\'t limit the number of URL path segments or the domain.'})]}),(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:"Input parameter. If enabled, only crawls URLs within the same domain as the root URL. This prevents the crawler from accessing sites outside the given URL's domain, even if they are linked from one of the crawled pages."})]}),(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:"Input parameter. 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:["Input parameter. Sets the desired output format as ",(0,r.jsx)(n.strong,{children:"Text"})," or ",(0,r.jsx)(n.strong,{children:"HTML"}),". The default is ",(0,r.jsx)(n.strong,{children:"Text"}),". For more information, see ",(0,r.jsx)(n.a,{href:"#url-output",children:"URL output"}),"."]})]}),(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:"Input parameter. 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:"Input parameter. The headers to send with the request if needed for authentication or otherwise."})]})]})]}),"\n",(0,r.jsx)(n.p,{children:"Additional input parameters are available for error handling and encoding."}),"\n",(0,r.jsx)(n.h3,{id:"url-output",children:"URL output"}),"\n",(0,r.jsxs)(n.p,{children:["There are two settings that control the output of the ",(0,r.jsx)(n.strong,{children:"URL"})," component at different stages:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Output Format"}),": This optional parameter controls the content extracted from the crawled pages:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Text (default)"}),": The component extracts only the text from the HTML of the crawled pages."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"HTML"}),": The component extracts the entire raw HTML content of the crawled pages."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Output data type"}),": In the component's output field (near the output port) you can select the structure of the outgoing data when it is passed to other components:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Extracted Pages"}),": Outputs a ",(0,r.jsx)(n.a,{href:"/data-types#dataframe",children:(0,r.jsx)(n.code,{children:"DataFrame"})})," that breaks the crawled pages into columns for the entire page content (",(0,r.jsx)(n.code,{children:"text"}),") and metadata like ",(0,r.jsx)(n.code,{children:"url"})," and ",(0,r.jsx)(n.code,{children:"title"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Raw Content"}),": Outputs a ",(0,r.jsx)(n.a,{href:"/data-types#message",children:(0,r.jsx)(n.code,{children:"Message"})})," containing the entire text or HTML from the crawled pages, including metadata, in a single block of text."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["When used as a standard component in a flow, the ",(0,r.jsx)(n.strong,{children:"URL"})," component must be connected to a component that accepts the selected output data type (",(0,r.jsx)(n.code,{children:"DataFrame"})," or ",(0,r.jsx)(n.code,{children:"Message"}),").\nYou can connect the ",(0,r.jsx)(n.strong,{children:"URL"})," component directly to a compatible component, or you can use a ",(0,r.jsxs)(n.a,{href:"/components-processing#type-convert",children:[(0,r.jsx)(n.strong,{children:"Type Convert"})," component"]})," to convert the output to another type before passing the data to other components if the data types aren't directly compatible."]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Processing"})," components like the ",(0,r.jsx)(n.strong,{children:"Type Convert"})," component are useful with the ",(0,r.jsx)(n.strong,{children:"URL"})," component because it can extract a large amount of data from the crawled pages.\nFor example, if you only want to pass specific fields to other components, you can use a ",(0,r.jsxs)(n.a,{href:"/components-processing#parser",children:[(0,r.jsx)(n.strong,{children:"Parser"})," component"]})," to extract only that data from the crawled pages before passing the data to other components."]}),"\n",(0,r.jsxs)(n.p,{children:["When used in ",(0,r.jsx)(n.strong,{children:"Tool Mode"})," with an ",(0,r.jsx)(n.strong,{children:"Agent"})," component, the ",(0,r.jsx)(n.strong,{children:"URL"})," component can be connected directly to the ",(0,r.jsx)(n.strong,{children:"Agent"})," component's ",(0,r.jsx)(n.strong,{children:"Tools"})," port without converting the data.\nThe agent decides whether to use the ",(0,r.jsx)(n.strong,{children:"URL"})," component based on the user's query, and it can process the ",(0,r.jsx)(n.code,{children:"DataFrame"})," or ",(0,r.jsx)(n.code,{children:"Message"})," output directly."]}),"\n",(0,r.jsx)(n.h2,{id:"web-search",children:"Web Search"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Web Search"})," component performs a basic web search using DuckDuckGo's HTML scraping interface.\nFor other search APIs, see ",(0,r.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"}),"."]}),"\n",(0,r.jsxs)(n.admonition,{type:"important",children:[(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Web Search"})," component uses web scraping that can be subject to rate limits."]}),(0,r.jsxs)(n.p,{children:["For production use, consider using another search component with more robust API support, such as a provider-specific ",(0,r.jsx)(n.a,{href:"/components-bundle-components",children:"bundle"}),"."]})]}),"\n",(0,r.jsx)(n.h3,{id:"use-the-web-search-component-in-a-flow",children:"Use the Web Search component in a flow"}),"\n",(0,r.jsxs)(n.p,{children:["The following steps demonstrate one way that you can use a ",(0,r.jsx)(n.strong,{children:"Web Search"})," component in a flow:"]}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Create a flow based on the ",(0,r.jsx)(n.strong,{children:"Basic Prompting"})," template."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Add a ",(0,r.jsx)(n.strong,{children:"Web Search"})," component, and then enter a search query, such as ",(0,r.jsx)(n.code,{children:"environmental news"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Add a ",(0,r.jsxs)(n.a,{href:"/components-processing#type-convert",children:[(0,r.jsx)(n.strong,{children:"Type Convert"})," component"]}),", set the ",(0,r.jsx)(n.strong,{children:"Output Type"})," to ",(0,r.jsx)(n.strong,{children:"Message"}),", and then connect the ",(0,r.jsx)(n.strong,{children:"Web Search"})," component's output to the ",(0,r.jsx)(n.strong,{children:"Type Convert"})," component's input."]}),"\n",(0,r.jsxs)(n.p,{children:["By default, the ",(0,r.jsx)(n.strong,{children:"Web Search"})," component outputs a ",(0,r.jsx)(n.code,{children:"DataFrame"}),".\nBecause the ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," component only accepts ",(0,r.jsx)(n.code,{children:"Message"})," data, this conversion is required so that the flow can pass the search results to the ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," component.\nFor more information, see ",(0,r.jsx)(n.a,{href:"#web-search-output",children:"Web Search output"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["In the ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," component's ",(0,r.jsx)(n.strong,{children:"Template"})," field, add a variable like ",(0,r.jsx)(n.code,{children:"{searchresults}"})," or ",(0,r.jsx)(n.code,{children:"{context}"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["This adds a field to the ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," component that you can use to pass the converted search results to the prompt."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Connect the ",(0,r.jsx)(n.strong,{children:"Type Convert"})," component's output to the new variable field on the ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," component."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"Type convert web search output to chat",src:t(42547).A+"",width:"4000",height:"1826"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["In the ",(0,r.jsx)(n.strong,{children:"Language Model"})," component, add your OpenAI API key, or select a different provider and model."]}),"\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 enter ",(0,r.jsx)(n.code,{children:"latest news"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["The LLM processes the request, including the context passed through the ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," component, and then prints the response in the ",(0,r.jsx)(n.strong,{children:"Playground"})," chat interface."]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Result"}),(0,r.jsx)(n.p,{children:"The following is an example of a possible response.\nYour response may vary based on the current state of the web, your specific query, the model, and other factors."}),(0,r.jsx)(h.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{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"]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"web-search-parameters",children:"Web Search parameters"}),"\n",(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:"Input parameter. 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:["Input parameter. Timeout for the web search request in seconds. Default: ",(0,r.jsx)(n.code,{children:"5"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"results"}),(0,r.jsx)(n.td,{children:"Search Results"}),(0,r.jsxs)(n.td,{children:["Output parameter. Returns a ",(0,r.jsx)(n.code,{children:"DataFrame"})," containing ",(0,r.jsx)(n.code,{children:"title"}),", ",(0,r.jsx)(n.code,{children:"links"}),", and ",(0,r.jsx)(n.code,{children:"snippets"}),". For more information, see ",(0,r.jsx)(n.a,{href:"#web-search-output",children:"Web Search output"}),"."]})]})]})]}),"\n",(0,r.jsx)(n.h3,{id:"web-search-output",children:"Web Search output"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Web Search"})," component outputs a ",(0,r.jsx)(n.a,{href:"/data-types#dataframe",children:(0,r.jsx)(n.code,{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"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["When used as a standard component in a flow, the ",(0,r.jsx)(n.strong,{children:"Web Search"})," component must be connected to a component that accepts ",(0,r.jsx)(n.code,{children:"DataFrame"})," input, or you must use a ",(0,r.jsxs)(n.a,{href:"/components-processing#type-convert",children:[(0,r.jsx)(n.strong,{children:"Type Convert"})," component"]})," to convert the output to ",(0,r.jsx)(n.code,{children:"Data"})," or ",(0,r.jsx)(n.code,{children:"Message"})," type before passing the data to other components."]}),"\n",(0,r.jsxs)(n.p,{children:["When used in ",(0,r.jsx)(n.strong,{children:"Tool Mode"})," with an ",(0,r.jsx)(n.strong,{children:"Agent"})," component, the ",(0,r.jsx)(n.strong,{children:"Web Search"})," component can be connected directly to the ",(0,r.jsx)(n.strong,{children:"Agent"})," component's ",(0,r.jsx)(n.strong,{children:"Tools"})," port without converting the data.\nThe agent decides whether to use the ",(0,r.jsx)(n.strong,{children:"Web Search"})," component based on the user's query, and it can process the ",(0,r.jsx)(n.code,{children:"DataFrame"})," output directly."]}),"\n",(0,r.jsx)(n.h2,{id:"webhook",children:"Webhook"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Webhook"})," component defines a webhook trigger that runs a flow when it receives an HTTP POST request."]}),"\n",(0,r.jsx)(n.h3,{id:"trigger-the-webhook",children:"Trigger the webhook"}),"\n",(0,r.jsxs)(n.p,{children:["When you add a ",(0,r.jsx)(n.strong,{children:"Webhook"})," component to your flow, a ",(0,r.jsx)(n.strong,{children:"Webhook curl"})," tab is added to the flow's ",(0,r.jsxs)(n.a,{href:"/concepts-publish#api-access",children:[(0,r.jsx)(n.strong,{children:"API Access"})," pane"]}),".\nThis tab automatically generates an HTTP POST request code snippet that you can use to trigger your flow through the ",(0,r.jsx)(n.strong,{children:"Webhook"})," component.\nFor example:"]}),"\n",(0,r.jsx)(h.Code,{codeConfig:p,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://',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_SERVER_ADDRESS",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/webhook/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',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:["For more information, see ",(0,r.jsx)(n.a,{href:"/webhook",children:"Trigger flows with webhooks"}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"webhook-parameters",children:"Webhook parameters"}),"\n",(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:"Input parameter. 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:"Input parameter. 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:"Input parameter. The endpoint URL where this webhook receives requests."})]}),(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:["Output parameter. The processed data from the webhook input. Returns an empty ",(0,r.jsx)(n.a,{href:"/data-types#data",children:(0,r.jsx)(n.code,{children:"Data"})})," object if no input is provided. If the input isn't valid JSON, the ",(0,r.jsx)(n.strong,{children:"Webhook"})," component wraps it in a ",(0,r.jsx)(n.code,{children:"payload"})," object so that it can be accepted as input to trigger the flow."]})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"additional-data-components",children:"Additional Data components"}),"\n",(0,r.jsx)(n.p,{children:"Langflow's core components are meant to be generic and support a range of use cases.\nCore components typically aren't limited to a single provider."}),"\n",(0,r.jsxs)(n.p,{children:["If the core ",(0,r.jsx)(n.strong,{children:"Data"})," components don't meet your needs, you can find provider-specific components in the ",(0,r.jsx)(n.a,{href:"/components-bundle-components",children:(0,r.jsx)(n.strong,{children:"Bundles"})})," section of the ",(0,r.jsx)(n.strong,{children:"Components"})," menu."]}),"\n",(0,r.jsxs)(n.p,{children:["For example, the ",(0,r.jsxs)(n.a,{href:"/bundles-datastax",children:[(0,r.jsx)(n.strong,{children:"DataStax"})," bundle"]})," includes components for CQL queries, and the ",(0,r.jsxs)(n.a,{href:"/bundles-google",children:[(0,r.jsx)(n.strong,{children:"Google"})," bundle"]})," includes components for Google Search APIs."]}),"\n",(0,r.jsx)(n.h2,{id:"legacy-data-components",children:"Legacy Data components"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Load CSV"})," and ",(0,r.jsx)(n.strong,{children:"Load JSON"})," components are legacy components.\nYou can still use them in your flows, but they are no longer maintained and can be removed in a future release."]}),"\n",(0,r.jsxs)(n.p,{children:["Replace these components with the ",(0,r.jsx)(n.strong,{children:"File"})," component, which supports loading CSV and JSON files, as well as many other file types."]}),"\n",(0,r.jsx)(n.h2,{id:"see-also",children:"See also"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/bundles-google",children:"Google components"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/integrations-composio",children:"Composio components"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/concepts-file-management",children:"File management"})}),"\n"]})]})}function j(e={}){const{wrapper:n}={...(0,o.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.")}},17886:(e,n,t)=>{t.d(n,{A:()=>o});t(96540);var s=t(64058),r=t(74848);function o({name:e,...n}){const t=s[e];return t?(0,r.jsx)(t,{...n}):null}},42547:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/component-type-convert-and-web-search-1eef7b9a7c1a243f4a08d9717728d0e1.png"},52189:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/component-sql-database-3d2c985aee2dd9970874cb85e1d2b570.png"},84987:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/connect-data-components-to-agent-a8cd8c94d0474ae434aeb5d507a803e8.png"}}]); \ No newline at end of file diff --git a/assets/js/7f193c41.c7ac6369.js b/assets/js/7f193c41.c7ac6369.js new file mode 100644 index 0000000000..d4daf53bc7 --- /dev/null +++ b/assets/js/7f193c41.c7ac6369.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[5761],{11470:(e,n,t)=>{t.d(n,{A:()=>v});var s=t(96540),r=t(18215),o=t(23104),a=t(56347),i=t(205),c=t(57485),l=t(31682),d=t(70679);function h(e){return s.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,s.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 p(e){const{values:n,children:t}=e;return(0,s.useMemo)(()=>{const e=n??function(e){return h(e).map(({props:{value:e,label:n,attributes:t,default:s}})=>({value:e,label:n,attributes:t,default:s}))}(t);return function(e){const n=(0,l.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 u({value:e,tabValues:n}){return n.some(n=>n.value===e)}function x({queryString:e=!1,groupId:n}){const t=(0,a.W6)(),r=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)(r),(0,s.useCallback)(e=>{if(!r)return;const n=new URLSearchParams(t.location.search);n.set(r,e),t.replace({...t.location,search:n.toString()})},[r,t])]}function j(e){const{defaultValue:n,queryString:t=!1,groupId:r}=e,o=p(e),[a,c]=(0,s.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(!u({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:o})),[l,h]=x({queryString:t,groupId:r}),[j,m]=function({groupId:e}){const n=function(e){return e?`docusaurus.tab.${e}`:null}(e),[t,r]=(0,d.Dv)(n);return[t,(0,s.useCallback)(e=>{n&&r.set(e)},[n,r])]}({groupId:r}),f=(()=>{const e=l??j;return u({value:e,tabValues:o})?e:null})();(0,i.A)(()=>{f&&c(f)},[f]);return{selectedValue:a,selectValue:(0,s.useCallback)(e=>{if(!u({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);c(e),h(e),m(e)},[h,m,o]),tabValues:o}}var m=t(92303);const f={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=t(74848);function y({className:e,block:n,selectedValue:t,selectValue:s,tabValues:a}){const i=[],{blockElementScrollPositionUntilNextRender:c}=(0,o.a_)(),l=e=>{const n=e.currentTarget,r=i.indexOf(n),o=a[r].value;o!==t&&(c(n),s(o))},d=e=>{let n=null;switch(e.key){case"Enter":l(e);break;case"ArrowRight":{const t=i.indexOf(e.currentTarget)+1;n=i[t]??i[0];break}case"ArrowLeft":{const t=i.indexOf(e.currentTarget)-1;n=i[t]??i[i.length-1];break}}n?.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":n},e),children:a.map(({value:e,label:n,attributes:s})=>(0,g.jsx)("li",{role:"tab",tabIndex:t===e?0:-1,"aria-selected":t===e,ref:e=>{i.push(e)},onKeyDown:d,onClick:l,...s,className:(0,r.A)("tabs__item",f.tabItem,s?.className,{"tabs__item--active":t===e}),children:n??e},e))})}function b({lazy:e,children:n,selectedValue:t}){const o=(Array.isArray(n)?n:[n]).filter(Boolean);if(e){const e=o.find(e=>e.props.value===t);return e?(0,s.cloneElement)(e,{className:(0,r.A)("margin-top--md",e.props.className)}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:o.map((e,n)=>(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==t}))})}function w(e){const n=j(e);return(0,g.jsxs)("div",{className:(0,r.A)("tabs-container",f.tabList),children:[(0,g.jsx)(y,{...n,...e}),(0,g.jsx)(b,{...n,...e})]})}function v(e){const n=(0,m.A)();return(0,g.jsx)(w,{...e,children:h(e.children)},String(n))}},14876:(e,n,t)=>{t.r(n),t.d(n,{CH:()=>p,assets:()=>h,chCodeConfig:()=>u,contentTitle:()=>d,default:()=>m,frontMatter:()=>l,metadata:()=>s,toc:()=>x});const s=JSON.parse('{"id":"Components/components-data","title":"Data","description":"You can use Langflow\'s Data components to bring data into your flows from various sources like files, API endpoints, and URLs.","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":"Embedding Model","permalink":"/components-embedding-models"},"next":{"title":"Vector Stores","permalink":"/components-vector-stores"}}');var r=t(74848),o=t(28453),a=t(24754),i=t(17886),c=(t(11470),t(19365),t(31929));const l={title:"Data",slug:"/components-data"},d=void 0,h={},p={annotations:a.hk,Code:a.Cy},u={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},x=[{value:"Use Data components in flows",id:"use-data-components-in-flows",level:2},{value:"API Request",id:"api-request",level:2},{value:"API Request parameters",id:"api-request-parameters",level:3},...c.RM,{value:"Directory",id:"directory",level:2},{value:"Directory parameters",id:"directory-parameters",level:3},...c.RM,{value:"File",id:"file",level:2},{value:"File type and size limits",id:"file-type-and-size-limits",level:3},{value:"File parameters",id:"file-parameters",level:3},...c.RM,{value:"File output",id:"file-output",level:3},{value:"News Search",id:"news-search",level:2},{value:"News Search parameters",id:"news-search-parameters",level:3},...c.RM,{value:"RSS Reader",id:"rss-reader",level:2},{value:"RSS Reader parameters",id:"rss-reader-parameters",level:3},{value:"SQL Database",id:"sql-database",level:2},{value:"Query an SQL database with natural language prompts",id:"query-an-sql-database-with-natural-language-prompts",level:3},{value:"SQL Database parameters",id:"sql-database-parameters",level:3},...c.RM,{value:"URL",id:"url",level:2},{value:"URL parameters",id:"url-parameters",level:3},...c.RM,{value:"URL output",id:"url-output",level:3},{value:"Web Search",id:"web-search",level:2},{value:"Use the Web Search component in a flow",id:"use-the-web-search-component-in-a-flow",level:3},{value:"Web Search parameters",id:"web-search-parameters",level:3},{value:"Web Search output",id:"web-search-output",level:3},{value:"Webhook",id:"webhook",level:2},{value:"Trigger the webhook",id:"trigger-the-webhook",level:3},{value:"Webhook parameters",id:"webhook-parameters",level:3},{value:"Additional Data components",id:"additional-data-components",level:2},{value:"Legacy Data components",id:"legacy-data-components",level:2},{value:"See also",id:"see-also",level:2}];function j(e){const n={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}=n;return p||f("CH",!1),p.Code||f("CH.Code",!0),s||f("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)(n.p,{children:["You can use Langflow's ",(0,r.jsx)(n.strong,{children:"Data"})," components to bring data into your flows from various sources like files, API endpoints, and URLs.\nFor example:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Load files"}),": Import data from a file or directory with the ",(0,r.jsxs)(n.a,{href:"#file",children:[(0,r.jsx)(n.strong,{children:"File"})," component"]})," and ",(0,r.jsxs)(n.a,{href:"#directory",children:[(0,r.jsx)(n.strong,{children:"Directory"})," component"]}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Search the web"}),": Fetch data from the web with components like the ",(0,r.jsxs)(n.a,{href:"#news-search",children:[(0,r.jsx)(n.strong,{children:"News Search"})," component"]}),", ",(0,r.jsxs)(n.a,{href:"#rss-reader",children:[(0,r.jsx)(n.strong,{children:"RSS Reader"})," component"]}),", ",(0,r.jsxs)(n.a,{href:"#web-search",children:[(0,r.jsx)(n.strong,{children:"Web Search"})," component"]}),", and ",(0,r.jsxs)(n.a,{href:"#url",children:[(0,r.jsx)(n.strong,{children:"URL"})," component"]}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Make API calls"}),": Use APIs to trigger flows or perform actions with the ",(0,r.jsxs)(n.a,{href:"#api-request",children:[(0,r.jsx)(n.strong,{children:"API Request"})," component"]})," and ",(0,r.jsxs)(n.a,{href:"#webhook",children:[(0,r.jsx)(n.strong,{children:"Webhook"})," component"]}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Run SQL queries"}),": Query an SQL database with the ",(0,r.jsxs)(n.a,{href:"#sql-database",children:[(0,r.jsx)(n.strong,{children:"SQL Database"})," component"]}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"Each component runs different commands for retrieval, processing, and type checking.\nSome components are a minimal wrapper for a command that you provide, and others include built-in scripts to fetch and process data based on variable inputs.\nAdditionally, some components return raw data, whereas others can convert, restructure, or validate the data before outputting it.\nThis means that some similar components might produce different results."}),"\n",(0,r.jsxs)(n.admonition,{type:"tip",children:[(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Data"})," components pair well with ",(0,r.jsxs)(n.a,{href:"/components-processing",children:[(0,r.jsx)(n.strong,{children:"Processing"})," components"]})," that can perform additional parsing, transformation, and validation after retrieving the data."]}),(0,r.jsxs)(n.p,{children:["This can include basic operations, like saving a file in a specific format, or more complex tasks, like using a ",(0,r.jsx)(n.strong,{children:"Text Splitter"})," component to break down a large document into smaller chunks before generating embeddings for vector search."]})]}),"\n",(0,r.jsx)(n.h2,{id:"use-data-components-in-flows",children:"Use Data components in flows"}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Data"})," components are used often in flows because they offer a versatile way to perform common, basic functions."]}),"\n",(0,r.jsxs)(n.p,{children:["You can use these components to perform their base functions as isolated steps in your flow, or you can connect them to an ",(0,r.jsx)(n.strong,{children:"Agent"})," component as tools."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"An agent flow with three Data components connected to the agent as tools",src:t(84987).A+"",width:"4000",height:"3028"})}),"\n",(0,r.jsx)(n.p,{children:"For example flows, see the following:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/chat-with-files",children:"Create a chatbot that can ingest files"}),": Learn how to use a ",(0,r.jsx)(n.strong,{children:"File"})," component to load a file as context for a chatbot.\nThe file and user input are both passed to the LLM so you can ask questions about the file you uploaded."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/chat-with-rag",children:"Create a vector RAG chatbot"}),": Learn how to ingest files for use in Retrieval-Augmented Generation (RAG), and then set up a chatbot that can use the ingested files as context.\nThe two flows in this tutorial prepare files for RAG, and then let your LLM use vector search to retrieve contextually relevant data during a chat session."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/agents-tools",children:"Configure tools for agents"}),": Learn how to use any component as a tool for an agent.\nWhen used as tools, the agent autonomously decides when to call a component based on the user's query."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/webhook",children:"Trigger flows with webhooks"}),": Learn how to use the ",(0,r.jsx)(n.strong,{children:"Webhook"})," component to trigger a flow run in response to an external event."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"api-request",children:"API Request"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"API Request"})," component constructs and sends HTTP requests using URLs or curl commands:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"URL mode"}),": Enter one or more comma-separated URLs, and then select the method for the request to each URL."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"curl mode"}),": Enter the curl command to execute."]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"You can enable additional request options and fields in the component's parameters."}),"\n",(0,r.jsxs)(n.p,{children:["Returns a ",(0,r.jsxs)(n.a,{href:"/data-types#data",children:[(0,r.jsx)(n.code,{children:"Data"})," object"]})," containing the response."]}),"\n",(0,r.jsxs)(n.p,{children:["For provider-specific API components, see ",(0,r.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"api-request-parameters",children:"API Request parameters"}),"\n",(0,r.jsx)(c.Ay,{}),"\n",(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:"mode"}),(0,r.jsx)(n.td,{children:"Mode"}),(0,r.jsxs)(n.td,{children:["Input parameter. Set the mode to either ",(0,r.jsx)(n.strong,{children:"URL"})," or ",(0,r.jsx)(n.strong,{children:"curl"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"urls"}),(0,r.jsx)(n.td,{children:"URL"}),(0,r.jsx)(n.td,{children:"Input parameter. Enter one or more comma-separated URLs for the request."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"curl"}),(0,r.jsx)(n.td,{children:"curl"}),(0,r.jsxs)(n.td,{children:["Input parameter. ",(0,r.jsx)(n.strong,{children:"curl mode"})," only. Enter a complete curl command. Other component parameters are populated from the command arguments."]})]}),(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:"Input parameter. The HTTP method to use."})]}),(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:"Input parameter. 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.jsx)(n.td,{children:"Input parameter. The body to send with POST, PATCH, and PUT requests as a dictionary."})]}),(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:"Input parameter. 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:"Input parameter. 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:"Input parameter. Whether to follow HTTP redirects. The default is enabled (true). If disabled (false), HTTP redirects aren't followed."})]}),(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:"Input parameter. Whether to save the API response to a temporary file. Default: Disabled/false"})]}),(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:["Input parameter. Whether to 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. Default: Disabled/false"]})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"directory",children:"Directory"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Directory"})," component recursively loads files from a directory, with options for file types, depth, and concurrency."]}),"\n",(0,r.jsxs)(n.p,{children:["Files must be of a ",(0,r.jsx)(n.a,{href:"#file-type-and-size-limits",children:"supported type and size"})," to be loaded."]}),"\n",(0,r.jsxs)(n.p,{children:["Outputs either a ",(0,r.jsx)(n.a,{href:"/data-types#data",children:(0,r.jsx)(n.code,{children:"Data"})})," or ",(0,r.jsx)(n.a,{href:"/data-types#dataframe",children:(0,r.jsx)(n.code,{children:"DataFrame"})})," object, depending on the directory contents."]}),"\n",(0,r.jsx)(n.h3,{id:"directory-parameters",children:"Directory parameters"}),"\n",(0,r.jsx)(c.Ay,{}),"\n",(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:"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.jsxs)(n.td,{children:["Input parameter. The path to the directory to load files from. Default: Current directory (",(0,r.jsx)(n.code,{children:"."}),")"]})]}),(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:"Input parameter. The file types to load. Select one or more, or leave empty to attempt to load all files."})]}),(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:"Input parameter. 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:"Input parameter. The maximum concurrency for loading multiple 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:"Input parameter. 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:"Input parameter. 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:"Input parameter. If true, errors don't 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:"Input parameter. If true, multithreading is used."})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"file",children:"File"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"File"})," component loads and parses files, converts the content into a ",(0,r.jsx)(n.code,{children:"Data"}),", ",(0,r.jsx)(n.code,{children:"DataFrame"}),", or ",(0,r.jsx)(n.code,{children:"Message"})," object.\nIt supports multiple file types and provides parameters for parallel processing and error handling."]}),"\n",(0,r.jsxs)(n.p,{children:["You can add files to the ",(0,r.jsx)(n.strong,{children:"File"})," component in the visual editor or at runtime, and you can upload multiple files at once.\nFor more information about uploading files and working with files in flows, see ",(0,r.jsx)(n.a,{href:"/concepts-file-management",children:"File management"})," and ",(0,r.jsx)(n.a,{href:"/chat-with-files",children:"Create a chatbot that can ingest files"}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"file-type-and-size-limits",children:"File type and size limits"}),"\n",(0,r.jsxs)(n.p,{children:["By default, the maximum file size is 100 MB.\nTo modify this value, change the ",(0,r.jsx)(n.code,{children:"--max-file-size-upload"})," ",(0,r.jsx)(n.a,{href:"/environment-variables",children:"environment variable"}),"."]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Supported file types"}),(0,r.jsxs)(n.p,{children:["The following file types are supported by the ",(0,r.jsx)(n.strong,{children:"File"})," component.\nUse archive and compressed formats to bundle multiple files together, or use the ",(0,r.jsxs)(n.a,{href:"#directory",children:[(0,r.jsx)(n.strong,{children:"Directory"})," component"]})," to load all files in a directory."]}),(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".bz2"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".csv"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".docx"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".gz"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".htm"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".html"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".json"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".js"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".md"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".mdx"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".pdf"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".py"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".sh"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".sql"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".tar"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".tgz"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".ts"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".tsx"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".txt"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".xml"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".yaml"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".yml"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.code,{children:".zip"})}),"\n"]})]}),"\n",(0,r.jsx)(n.p,{children:"If you need to load an unsupported file type, you must use a different component that supports that file type and, potentially, parses it outside Langflow, or you must convert it to a supported type before uploading it."}),"\n",(0,r.jsxs)(n.p,{children:["For images, see ",(0,r.jsx)(n.a,{href:"/concepts-file-management#upload-images",children:"Upload images"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["For videos, see the ",(0,r.jsx)(n.strong,{children:"Twelve Labs"})," and ",(0,r.jsx)(n.strong,{children:"YouTube"})," ",(0,r.jsx)(n.a,{href:"/components-bundle-components",children:"bundles"})," in the Langflow ",(0,r.jsx)(n.strong,{children:"Components"})," menu."]}),"\n",(0,r.jsx)(n.h3,{id:"file-parameters",children:"File parameters"}),"\n",(0,r.jsx)(c.Ay,{}),"\n",(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.jsxs)(n.td,{children:["Input parameter. The path to files to load. Can be local or in ",(0,r.jsx)(n.a,{href:"/concepts-file-management",children:"Langflow file management"}),". Supports individual files and 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:["Input parameter. A ",(0,r.jsx)(n.code,{children:"Data"})," object with a ",(0,r.jsx)(n.code,{children:"file_path"})," property pointing to a file in ",(0,r.jsx)(n.a,{href:"/concepts-file-management",children:"Langflow file management"})," or a ",(0,r.jsx)(n.code,{children:"Message"})," object with a path to the file. Supersedes ",(0,r.jsx)(n.strong,{children:"Files"})," (",(0,r.jsx)(n.code,{children:"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.jsxs)(n.td,{children:["Input parameter. The separator to use between multiple outputs in ",(0,r.jsx)(n.code,{children:"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:"Input parameter. If true, errors in the component don't raise an exception. The default is false/disabled."})]}),(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.jsxs)(n.td,{children:["Input parameter. If true (default), the ",(0,r.jsx)(n.strong,{children:"Server File Path"})," (",(0,r.jsx)(n.code,{children:"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.jsxs)(n.td,{children:["Input parameter. If enabled (true), files with unsupported extensions are accepted but not processed. If disabled (false), the ",(0,r.jsx)(n.strong,{children:"File"})," component either can throw an error if an unsupported file type is provided. The default is true."]})]}),(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:["Input parameter. If true, ",(0,r.jsx)(n.code,{children:"Data"})," with no ",(0,r.jsx)(n.code,{children:"file_path"})," property is ignored. If false (default), the component errors when a file isn't specified."]})]}),(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:"Input parameter. The number of files to process concurrently if multiple files are uploaded. Default is 1. Values greater than 1 enable parallel processing for 2 or more files."})]})]})]}),"\n",(0,r.jsx)(n.h3,{id:"file-output",children:"File output"}),"\n",(0,r.jsxs)(n.p,{children:["The output of the ",(0,r.jsx)(n.strong,{children:"File"})," component depends on the number and type of files loaded:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"No files"}),": Throws an error or, if ",(0,r.jsx)(n.strong,{children:"Silent Errors"})," is enabled, produces no output."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"One file"}),": Produces one of the following depending on the file type. If multiple types are available, you can select the output type by clicking the output field (near the component's output port)."]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Structured Content"}),": Available for some tabular and structured data.\nFor ",(0,r.jsx)(n.code,{children:".csv"})," files, produces a ",(0,r.jsx)(n.a,{href:"/data-types#dataframe",children:(0,r.jsx)(n.code,{children:"DataFrame"})})," representing the table data.\nFor ",(0,r.jsx)(n.code,{children:".json"})," files, produces a ",(0,r.jsx)(n.a,{href:"/data-types#data",children:(0,r.jsx)(n.code,{children:"Data"})})," object with the parsed JSON data."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Raw Content"}),": A ",(0,r.jsx)(n.a,{href:"/data-types#message",children:(0,r.jsx)(n.code,{children:"Message"})})," containing the file's raw text content."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"File Path"}),": A ",(0,r.jsx)(n.a,{href:"/data-types#message",children:(0,r.jsx)(n.code,{children:"Message"})})," containing the path to the file in ",(0,r.jsx)(n.a,{href:"/concepts-file-management",children:"Langflow file management"}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Multiple files"}),": Produces a ",(0,r.jsx)(n.strong,{children:"Files"})," ",(0,r.jsx)(n.a,{href:"/data-types#dataframe",children:(0,r.jsx)(n.code,{children:"DataFrame"})})," containing the content and metadata of all selected files."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"news-search",children:"News Search"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"News Search"})," component searches Google News through RSS, and then returns clean article data as a ",(0,r.jsx)(n.a,{href:"/data-types#dataframe",children:(0,r.jsx)(n.code,{children:"DataFrame"})})," containing article titles, links, publication dates, and summaries.\nThe component's ",(0,r.jsx)(n.code,{children:"clean_html"})," method parses the HTML content with the BeautifulSoup library, removes HTML markup, and strips whitespace to output clean data."]}),"\n",(0,r.jsxs)(n.p,{children:["For other RSS feeds, use the ",(0,r.jsxs)(n.a,{href:"#rss-reader",children:[(0,r.jsx)(n.strong,{children:"RSS Reader"})," component"]}),", and for other searches use the ",(0,r.jsxs)(n.a,{href:"#web-search",children:[(0,r.jsx)(n.strong,{children:"Web Search"})," component"]})," or a provider-specific ",(0,r.jsx)(n.a,{href:"/components-bundle-components",children:"bundle"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["When used as a standard component in a flow, the ",(0,r.jsx)(n.strong,{children:"News Search"})," component must be connected to a component that accepts ",(0,r.jsx)(n.code,{children:"DataFrame"})," input.\nYou can connect the ",(0,r.jsx)(n.strong,{children:"News Search"})," component directly to a compatible component, or you can use a ",(0,r.jsxs)(n.a,{href:"/components-processing",children:[(0,r.jsx)(n.strong,{children:"Processing"})," component"]})," to convert or extract data of a different type between components."]}),"\n",(0,r.jsxs)(n.p,{children:["When used in ",(0,r.jsx)(n.strong,{children:"Tool Mode"})," with an ",(0,r.jsx)(n.strong,{children:"Agent"})," component, the ",(0,r.jsx)(n.strong,{children:"News Search"})," component can be connected directly to the ",(0,r.jsx)(n.strong,{children:"Agent"})," component's ",(0,r.jsx)(n.strong,{children:"Tools"})," port without converting the data.\nThe agent decides whether to use the ",(0,r.jsx)(n.strong,{children:"News Search"})," component based on the user's query, and it can process the ",(0,r.jsx)(n.code,{children:"DataFrame"})," output directly."]}),"\n",(0,r.jsx)(n.h3,{id:"news-search-parameters",children:"News Search parameters"}),"\n",(0,r.jsx)(c.Ay,{}),"\n",(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:"Input parameter. 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:["Input parameter. 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:["Input parameter. 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:["Input parameter. 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.jsxs)(n.td,{children:["Input parameter. One of: ",(0,r.jsx)(n.code,{children:"WORLD"}),", ",(0,r.jsx)(n.code,{children:"NATION"}),", ",(0,r.jsx)(n.code,{children:"BUSINESS"}),", ",(0,r.jsx)(n.code,{children:"TECHNOLOGY"}),", ",(0,r.jsx)(n.code,{children:"ENTERTAINMENT"}),", ",(0,r.jsx)(n.code,{children:"SCIENCE"}),", ",(0,r.jsx)(n.code,{children:"SPORTS"}),", ",(0,r.jsx)(n.code,{children:"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:"Input parameter. 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:"Input parameter. Timeout for the request in seconds."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"articles"}),(0,r.jsx)(n.td,{children:"News Articles"}),(0,r.jsxs)(n.td,{children:["Output parameter. A ",(0,r.jsx)(n.code,{children:"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.jsx)(n.h2,{id:"rss-reader",children:"RSS Reader"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"RSS Reader"})," component fetches and parses RSS feeds from any valid RSS feed URL, and then returns the feed content as a ",(0,r.jsx)(n.a,{href:"/data-types#dataframe",children:(0,r.jsx)(n.code,{children:"DataFrame"})})," containing article titles, links, publication dates, and summaries."]}),"\n",(0,r.jsxs)(n.p,{children:["When used as a standard component in a flow, the ",(0,r.jsx)(n.strong,{children:"RSS Reader"})," component must be connected to a component that accepts ",(0,r.jsx)(n.code,{children:"DataFrame"})," input.\nYou can connect the ",(0,r.jsx)(n.strong,{children:"RSS Reader"})," component directly to a compatible component, or you can use a ",(0,r.jsxs)(n.a,{href:"/components-processing",children:[(0,r.jsx)(n.strong,{children:"Processing"})," component"]})," to convert or extract data of a different type between components."]}),"\n",(0,r.jsxs)(n.p,{children:["When used in ",(0,r.jsx)(n.strong,{children:"Tool Mode"})," with an ",(0,r.jsx)(n.strong,{children:"Agent"})," component, the ",(0,r.jsx)(n.strong,{children:"RSS Reader"})," component can be connected directly to the ",(0,r.jsx)(n.strong,{children:"Agent"})," component's ",(0,r.jsx)(n.strong,{children:"Tools"})," port without converting the data.\nThe agent decides whether to use the ",(0,r.jsx)(n.strong,{children:"RSS Reader"})," component based on the user's query, and it can process the ",(0,r.jsx)(n.code,{children:"DataFrame"})," output directly."]}),"\n",(0,r.jsx)(n.h3,{id:"rss-reader-parameters",children:"RSS Reader parameters"}),"\n",(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.jsxs)(n.td,{children:["Input parameter. URL of the RSS feed to parse, such as ",(0,r.jsx)(n.code,{children:"https://rss.nytimes.com/services/xml/rss/nyt/HomePage.xml"}),"."]})]}),(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:["Input parameter. Timeout for the RSS feed request in seconds. Default: ",(0,r.jsx)(n.code,{children:"5"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"articles"}),(0,r.jsx)(n.td,{children:"Articles"}),(0,r.jsxs)(n.td,{children:["Output parameter. A ",(0,r.jsx)(n.code,{children:"DataFrame"})," containing 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.jsx)(n.h2,{id:"sql-database",children:"SQL Database"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"SQL Database"})," 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, such as PostgreSQL, MySQL, and SQLite."]}),"\n",(0,r.jsxs)(n.p,{children:["For CQL queries, see the ",(0,r.jsxs)(n.a,{href:"/bundles-datastax",children:[(0,r.jsx)(n.strong,{children:"DataStax"})," bundle"]}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"query-an-sql-database-with-natural-language-prompts",children:"Query an SQL database with natural language prompts"}),"\n",(0,r.jsxs)(n.p,{children:["The following example demonstrates how to use the ",(0,r.jsx)(n.strong,{children:"SQL Database"})," component in a flow, and then modify the component to support natural language queries through an ",(0,r.jsx)(n.strong,{children:"Agent"})," component."]}),"\n",(0,r.jsxs)(n.p,{children:["This allows you to use the same ",(0,r.jsx)(n.strong,{children:"SQL Database"})," component for any query, rather than limiting it to a single manually entered query or requiring the user, application, or another component to provide valid SQL syntax as input.\nUsers don't need to master SQL syntax because the ",(0,r.jsx)(n.strong,{children:"Agent"})," component translates the users' natural language prompts into SQL queries, passes the query to the ",(0,r.jsx)(n.strong,{children:"SQL Database"})," component, and then returns the results to the user."]}),"\n",(0,r.jsx)(n.p,{children:"Additionally, input from applications and other components doesn't have to be extracted and transformed to exact SQL queries.\nInstead, you only need to provide enough context for the agent to understand that it should create and run a SQL query according to the incoming data."}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Use your own sample database or create a test database."}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Create a test SQL database"}),(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Create a database called ",(0,r.jsx)(n.code,{children:"test.db"}),":"]}),"\n",(0,r.jsx)(p.Code,{codeConfig:u,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"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Add some values to the database:"}),"\n",(0,r.jsx)(p.Code,{codeConfig:u,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"sqlite3 ",props:{style:{color:"#FFA657"}}},{content:'test.db "',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"CREATE TABLE users (",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" id INTEGER PRIMARY KEY,",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" name TEXT,",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" email TEXT,",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" age INTEGER",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:");",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"INSERT INTO users (name, email, age) VALUES",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ('John Doe', 'john@example.com', 30),",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ('Jane Smith', 'jane@example.com', 25),",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ('Bob Johnson', 'bob@example.com', 35);",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Verify that the database has been created and contains your data:"}),"\n",(0,r.jsx)(p.Code,{codeConfig:u,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:"The result should list the text data you entered in the previous step:"}),"\n",(0,r.jsx)(p.Code,{codeConfig:u,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"]}),"\n"]})]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Add an ",(0,r.jsx)(n.strong,{children:"SQL Database"})," component to your flow."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["In the ",(0,r.jsx)(n.strong,{children:"Database URL"})," field, add the connection string for your database, such as ",(0,r.jsx)(n.code,{children:"sqlite:///test.db"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["At this point, you can enter an SQL query in the ",(0,r.jsx)(n.strong,{children:"SQL Query"})," field or use the ",(0,r.jsx)(n.a,{href:"/concepts-components#component-ports",children:"port"})," to pass a query from another component, such as a ",(0,r.jsx)(n.strong,{children:"Chat Input"})," component.\nIf you need more space, click ",(0,r.jsx)(i.A,{name:"Expand","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Expand"})," to open a full-screen text field."]}),"\n",(0,r.jsxs)(n.p,{children:["However, to make this component more dynamic in an agentic context, use an ",(0,r.jsx)(n.strong,{children:"Agent"})," component to transform natural language input to SQL queries, as explained in the following steps."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Click the ",(0,r.jsx)(n.strong,{children:"SQL Database"})," component to expose the ",(0,r.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),", and then enable ",(0,r.jsx)(n.strong,{children:"Tool Mode"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["You can now use this component as a tool for an agent.\nIn ",(0,r.jsx)(n.strong,{children:"Tool Mode"}),", no query is set in the ",(0,r.jsx)(n.strong,{children:"SQL Database"})," component because the agent will generate and send one if it determines that the tool is required to complete the user's request.\nFor more information, see ",(0,r.jsx)(n.a,{href:"/agents-tools",children:"Configure tools for agents"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Add an ",(0,r.jsx)(n.strong,{children:"Agent"})," component to your flow, and then enter your OpenAI API key."]}),"\n",(0,r.jsxs)(n.p,{children:["The default model is an OpenAI model.\nIf you want to use a different model, edit the ",(0,r.jsx)(n.strong,{children:"Model Provider"}),", ",(0,r.jsx)(n.strong,{children:"Model Name"}),", and ",(0,r.jsx)(n.strong,{children:"API Key"})," fields accordingly."]}),"\n",(0,r.jsxs)(n.p,{children:["If you need to execute highly specialized queries, consider selecting a model that is trained for tasks like advanced SQL queries.\nIf your preferred model isn't in the ",(0,r.jsx)(n.strong,{children:"Agent"})," component's built-in model list, select the ",(0,r.jsx)(n.strong,{children:"Custom"})," model provider, and then use a ",(0,r.jsxs)(n.a,{href:"/components-models",children:[(0,r.jsx)(n.strong,{children:"Language Model"})," component"]})," to attach a specific model."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Connect the ",(0,r.jsx)(n.strong,{children:"SQL Database"})," component's ",(0,r.jsx)(n.strong,{children:"Toolset"})," output to the ",(0,r.jsx)(n.strong,{children:"Agent"})," component's ",(0,r.jsx)(n.strong,{children:"Tools"})," input."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"SQL Database component connected to an Agent component",src:t(52189).A+"",width:"4000",height:"2400"})}),"\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 ask the agent a question about the data in your database, such as ",(0,r.jsx)(n.code,{children:"Which users are in my database?"})]}),"\n",(0,r.jsxs)(n.p,{children:["The agent determines that it needs to query the database to answer the question, uses the LLM to generate an SQL query, and then uses the ",(0,r.jsx)(n.strong,{children:"SQL Database"})," component's ",(0,r.jsx)(n.code,{children:"RUN_SQL_QUERY"})," action to run the query on your database.\nFinally, it returns the results in a conversational format, unless you provide instructions to return raw results or a different format."]}),"\n",(0,r.jsx)(n.p,{children:"The following example queried a test database with little data, but with a more robust dataset you could ask more detailed or complex questions."}),"\n",(0,r.jsx)(p.Code,{codeConfig:u,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:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"sql-database-parameters",children:"SQL Database parameters"}),"\n",(0,r.jsx)(c.Ay,{}),"\n",(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:"Input parameter. 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.jsxs)(n.td,{children:["Input parameter. The SQL query to execute, which can be entered directly, passed in from another component, or, in ",(0,r.jsx)(n.strong,{children:"Tool Mode"}),", automatically provided by an ",(0,r.jsx)(n.strong,{children:"Agent"})," component."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"include_columns"}),(0,r.jsx)(n.td,{children:"Include Columns"}),(0,r.jsx)(n.td,{children:"Input parameter. Whether to include column names in the result. The default is enabled (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.jsx)(n.td,{children:"Input parameter. If enabled, adds any error messages to the result, if any are returned. The default is disabled (false)."})]}),(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.jsxs)(n.td,{children:["Output parameter. The query results as a ",(0,r.jsx)(n.a,{href:"/data-types#dataframe",children:(0,r.jsx)(n.code,{children:"DataFrame"})}),"."]})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"url",children:"URL"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"URL"})," component fetches content from one or more URLs, processes the content, and returns it in various formats.\nIt follows links recursively to a given depth, and it supports output in plain text or raw HTML."]}),"\n",(0,r.jsx)(n.h3,{id:"url-parameters",children:"URL parameters"}),"\n",(0,r.jsx)(c.Ay,{}),"\n",(0,r.jsx)(n.p,{children:"Some of the available parameters include the following:"}),"\n",(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.jsxs)(n.td,{children:["Input parameter. One or more URLs to crawl recursively. In the visual editor, click ",(0,r.jsx)(i.A,{name:"Plus","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Add URL"})," to add multiple URLs."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"max_depth"}),(0,r.jsx)(n.td,{children:"Depth"}),(0,r.jsx)(n.td,{children:'Input parameter. Controls link traversal: how many "clicks" away from the initial page the crawler will go. A depth of 1 limits the crawl to the first page at the given URL only. A depth of 2 means the crawler crawls the first page plus each page directly linked from the first page, then stops. This setting exclusively controls link traversal; it doesn\'t limit the number of URL path segments or the domain.'})]}),(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:"Input parameter. If enabled, only crawls URLs within the same domain as the root URL. This prevents the crawler from accessing sites outside the given URL's domain, even if they are linked from one of the crawled pages."})]}),(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:"Input parameter. 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:["Input parameter. Sets the desired output format as ",(0,r.jsx)(n.strong,{children:"Text"})," or ",(0,r.jsx)(n.strong,{children:"HTML"}),". The default is ",(0,r.jsx)(n.strong,{children:"Text"}),". For more information, see ",(0,r.jsx)(n.a,{href:"#url-output",children:"URL output"}),"."]})]}),(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:"Input parameter. 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:"Input parameter. The headers to send with the request if needed for authentication or otherwise."})]})]})]}),"\n",(0,r.jsx)(n.p,{children:"Additional input parameters are available for error handling and encoding."}),"\n",(0,r.jsx)(n.h3,{id:"url-output",children:"URL output"}),"\n",(0,r.jsxs)(n.p,{children:["There are two settings that control the output of the ",(0,r.jsx)(n.strong,{children:"URL"})," component at different stages:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Output Format"}),": This optional parameter controls the content extracted from the crawled pages:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Text (default)"}),": The component extracts only the text from the HTML of the crawled pages."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"HTML"}),": The component extracts the entire raw HTML content of the crawled pages."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Output data type"}),": In the component's output field (near the output port) you can select the structure of the outgoing data when it is passed to other components:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Extracted Pages"}),": Outputs a ",(0,r.jsx)(n.a,{href:"/data-types#dataframe",children:(0,r.jsx)(n.code,{children:"DataFrame"})})," that breaks the crawled pages into columns for the entire page content (",(0,r.jsx)(n.code,{children:"text"}),") and metadata like ",(0,r.jsx)(n.code,{children:"url"})," and ",(0,r.jsx)(n.code,{children:"title"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)(n.strong,{children:"Raw Content"}),": Outputs a ",(0,r.jsx)(n.a,{href:"/data-types#message",children:(0,r.jsx)(n.code,{children:"Message"})})," containing the entire text or HTML from the crawled pages, including metadata, in a single block of text."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["When used as a standard component in a flow, the ",(0,r.jsx)(n.strong,{children:"URL"})," component must be connected to a component that accepts the selected output data type (",(0,r.jsx)(n.code,{children:"DataFrame"})," or ",(0,r.jsx)(n.code,{children:"Message"}),").\nYou can connect the ",(0,r.jsx)(n.strong,{children:"URL"})," component directly to a compatible component, or you can use a ",(0,r.jsxs)(n.a,{href:"/components-processing#type-convert",children:[(0,r.jsx)(n.strong,{children:"Type Convert"})," component"]})," to convert the output to another type before passing the data to other components if the data types aren't directly compatible."]}),"\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.strong,{children:"Processing"})," components like the ",(0,r.jsx)(n.strong,{children:"Type Convert"})," component are useful with the ",(0,r.jsx)(n.strong,{children:"URL"})," component because it can extract a large amount of data from the crawled pages.\nFor example, if you only want to pass specific fields to other components, you can use a ",(0,r.jsxs)(n.a,{href:"/components-processing#parser",children:[(0,r.jsx)(n.strong,{children:"Parser"})," component"]})," to extract only that data from the crawled pages before passing the data to other components."]}),"\n",(0,r.jsxs)(n.p,{children:["When used in ",(0,r.jsx)(n.strong,{children:"Tool Mode"})," with an ",(0,r.jsx)(n.strong,{children:"Agent"})," component, the ",(0,r.jsx)(n.strong,{children:"URL"})," component can be connected directly to the ",(0,r.jsx)(n.strong,{children:"Agent"})," component's ",(0,r.jsx)(n.strong,{children:"Tools"})," port without converting the data.\nThe agent decides whether to use the ",(0,r.jsx)(n.strong,{children:"URL"})," component based on the user's query, and it can process the ",(0,r.jsx)(n.code,{children:"DataFrame"})," or ",(0,r.jsx)(n.code,{children:"Message"})," output directly."]}),"\n",(0,r.jsx)(n.h2,{id:"web-search",children:"Web Search"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Web Search"})," component performs a basic web search using DuckDuckGo's HTML scraping interface.\nFor other search APIs, see ",(0,r.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"}),"."]}),"\n",(0,r.jsxs)(n.admonition,{type:"important",children:[(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Web Search"})," component uses web scraping that can be subject to rate limits."]}),(0,r.jsx)(n.p,{children:"For production use, consider using another search component with more robust API support, such as provider-specific bundles."})]}),"\n",(0,r.jsx)(n.h3,{id:"use-the-web-search-component-in-a-flow",children:"Use the Web Search component in a flow"}),"\n",(0,r.jsxs)(n.p,{children:["The following steps demonstrate one way that you can use a ",(0,r.jsx)(n.strong,{children:"Web Search"})," component in a flow:"]}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Create a flow based on the ",(0,r.jsx)(n.strong,{children:"Basic Prompting"})," template."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Add a ",(0,r.jsx)(n.strong,{children:"Web Search"})," component, and then enter a search query, such as ",(0,r.jsx)(n.code,{children:"environmental news"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Add a ",(0,r.jsxs)(n.a,{href:"/components-processing#type-convert",children:[(0,r.jsx)(n.strong,{children:"Type Convert"})," component"]}),", set the ",(0,r.jsx)(n.strong,{children:"Output Type"})," to ",(0,r.jsx)(n.strong,{children:"Message"}),", and then connect the ",(0,r.jsx)(n.strong,{children:"Web Search"})," component's output to the ",(0,r.jsx)(n.strong,{children:"Type Convert"})," component's input."]}),"\n",(0,r.jsxs)(n.p,{children:["By default, the ",(0,r.jsx)(n.strong,{children:"Web Search"})," component outputs a ",(0,r.jsx)(n.code,{children:"DataFrame"}),".\nBecause the ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," component only accepts ",(0,r.jsx)(n.code,{children:"Message"})," data, this conversion is required so that the flow can pass the search results to the ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," component.\nFor more information, see ",(0,r.jsx)(n.a,{href:"#web-search-output",children:"Web Search output"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["In the ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," component's ",(0,r.jsx)(n.strong,{children:"Template"})," field, add a variable like ",(0,r.jsx)(n.code,{children:"{searchresults}"})," or ",(0,r.jsx)(n.code,{children:"{context}"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["This adds a field to the ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," component that you can use to pass the converted search results to the prompt."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Connect the ",(0,r.jsx)(n.strong,{children:"Type Convert"})," component's output to the new variable field on the ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," component."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"Type convert web search output to chat",src:t(42547).A+"",width:"4000",height:"1826"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["In the ",(0,r.jsx)(n.strong,{children:"Language Model"})," component, add your OpenAI API key, or select a different provider and model."]}),"\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 enter ",(0,r.jsx)(n.code,{children:"latest news"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["The LLM processes the request, including the context passed through the ",(0,r.jsx)(n.strong,{children:"Prompt Template"})," component, and then prints the response in the ",(0,r.jsx)(n.strong,{children:"Playground"})," chat interface."]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Result"}),(0,r.jsx)(n.p,{children:"The following is an example of a possible response.\nYour response may vary based on the current state of the web, your specific query, the model, and other factors."}),(0,r.jsx)(p.Code,{codeConfig:u,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{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"]}),"\n"]}),"\n",(0,r.jsx)(n.h3,{id:"web-search-parameters",children:"Web Search parameters"}),"\n",(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:"Input parameter. 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:["Input parameter. Timeout for the web search request in seconds. Default: ",(0,r.jsx)(n.code,{children:"5"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"results"}),(0,r.jsx)(n.td,{children:"Search Results"}),(0,r.jsxs)(n.td,{children:["Output parameter. Returns a ",(0,r.jsx)(n.code,{children:"DataFrame"})," containing ",(0,r.jsx)(n.code,{children:"title"}),", ",(0,r.jsx)(n.code,{children:"links"}),", and ",(0,r.jsx)(n.code,{children:"snippets"}),". For more information, see ",(0,r.jsx)(n.a,{href:"#web-search-output",children:"Web Search output"}),"."]})]})]})]}),"\n",(0,r.jsx)(n.h3,{id:"web-search-output",children:"Web Search output"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Web Search"})," component outputs a ",(0,r.jsx)(n.a,{href:"/data-types#dataframe",children:(0,r.jsx)(n.code,{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"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["When used as a standard component in a flow, the ",(0,r.jsx)(n.strong,{children:"Web Search"})," component must be connected to a component that accepts ",(0,r.jsx)(n.code,{children:"DataFrame"})," input, or you must use a ",(0,r.jsxs)(n.a,{href:"/components-processing#type-convert",children:[(0,r.jsx)(n.strong,{children:"Type Convert"})," component"]})," to convert the output to ",(0,r.jsx)(n.code,{children:"Data"})," or ",(0,r.jsx)(n.code,{children:"Message"})," type before passing the data to other components."]}),"\n",(0,r.jsxs)(n.p,{children:["When used in ",(0,r.jsx)(n.strong,{children:"Tool Mode"})," with an ",(0,r.jsx)(n.strong,{children:"Agent"})," component, the ",(0,r.jsx)(n.strong,{children:"Web Search"})," component can be connected directly to the ",(0,r.jsx)(n.strong,{children:"Agent"})," component's ",(0,r.jsx)(n.strong,{children:"Tools"})," port without converting the data.\nThe agent decides whether to use the ",(0,r.jsx)(n.strong,{children:"Web Search"})," component based on the user's query, and it can process the ",(0,r.jsx)(n.code,{children:"DataFrame"})," output directly."]}),"\n",(0,r.jsx)(n.h2,{id:"webhook",children:"Webhook"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Webhook"})," component defines a webhook trigger that runs a flow when it receives an HTTP POST request."]}),"\n",(0,r.jsx)(n.h3,{id:"trigger-the-webhook",children:"Trigger the webhook"}),"\n",(0,r.jsxs)(n.p,{children:["When you add a ",(0,r.jsx)(n.strong,{children:"Webhook"})," component to your flow, a ",(0,r.jsx)(n.strong,{children:"Webhook curl"})," tab is added to the flow's ",(0,r.jsxs)(n.a,{href:"/concepts-publish#api-access",children:[(0,r.jsx)(n.strong,{children:"API Access"})," pane"]}),".\nThis tab automatically generates an HTTP POST request code snippet that you can use to trigger your flow through the ",(0,r.jsx)(n.strong,{children:"Webhook"})," component.\nFor example:"]}),"\n",(0,r.jsx)(p.Code,{codeConfig:u,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://',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_SERVER_ADDRESS",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/webhook/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',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:["For more information, see ",(0,r.jsx)(n.a,{href:"/webhook",children:"Trigger flows with webhooks"}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"webhook-parameters",children:"Webhook parameters"}),"\n",(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:"Input parameter. 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:"Input parameter. 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:"Input parameter. The endpoint URL where this webhook receives requests."})]}),(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:["Output parameter. The processed data from the webhook input. Returns an empty ",(0,r.jsx)(n.a,{href:"/data-types#data",children:(0,r.jsx)(n.code,{children:"Data"})})," object if no input is provided. If the input isn't valid JSON, the ",(0,r.jsx)(n.strong,{children:"Webhook"})," component wraps it in a ",(0,r.jsx)(n.code,{children:"payload"})," object so that it can be accepted as input to trigger the flow."]})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"additional-data-components",children:"Additional Data components"}),"\n",(0,r.jsx)(n.p,{children:"Langflow's core components are meant to be generic and support a range of use cases.\nCore components typically aren't limited to a single provider."}),"\n",(0,r.jsxs)(n.p,{children:["If the core ",(0,r.jsx)(n.strong,{children:"Data"})," components don't meet your needs, you can find provider-specific components in the ",(0,r.jsx)(n.a,{href:"/components-bundle-components",children:(0,r.jsx)(n.strong,{children:"Bundles"})})," section of the ",(0,r.jsx)(n.strong,{children:"Components"})," menu."]}),"\n",(0,r.jsxs)(n.p,{children:["For example, the ",(0,r.jsxs)(n.a,{href:"/bundles-datastax",children:[(0,r.jsx)(n.strong,{children:"DataStax"})," bundle"]})," includes components for CQL queries, and the ",(0,r.jsxs)(n.a,{href:"/bundles-google",children:[(0,r.jsx)(n.strong,{children:"Google"})," bundle"]})," includes components for Google Search APIs."]}),"\n",(0,r.jsx)(n.h2,{id:"legacy-data-components",children:"Legacy Data components"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Load CSV"})," and ",(0,r.jsx)(n.strong,{children:"Load JSON"})," components are legacy components.\nYou can still use them in your flows, but they are no longer maintained and can be removed in a future release."]}),"\n",(0,r.jsxs)(n.p,{children:["Replace these components with the ",(0,r.jsx)(n.strong,{children:"File"})," component, which supports loading CSV and JSON files, as well as many other file types."]}),"\n",(0,r.jsx)(n.h2,{id:"see-also",children:"See also"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsxs)(n.a,{href:"/bundles-google",children:[(0,r.jsx)(n.strong,{children:"Google"})," bundle"]})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsxs)(n.a,{href:"/integrations-composio",children:[(0,r.jsx)(n.strong,{children:"Composio"})," bundle"]})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/concepts-file-management",children:"File management"})}),"\n"]})]})}function m(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(j,{...e})}):j(e)}function f(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},17886:(e,n,t)=>{t.d(n,{A:()=>o});t(96540);var s=t(64058),r=t(74848);function o({name:e,...n}){const t=s[e];return t?(0,r.jsx)(t,{...n}):null}},19365:(e,n,t)=>{t.d(n,{A:()=>a});t(96540);var s=t(18215);const r={tabItem:"tabItem_Ymn6"};var o=t(74848);function a({children:e,hidden:n,className:t}){return(0,o.jsx)("div",{role:"tabpanel",className:(0,s.A)(r.tabItem,t),hidden:n,children:e})}},31929:(e,n,t)=>{t.d(n,{Ay:()=>c,RM:()=>a});var s=t(74848),r=t(28453),o=t(17886);const a=[];function i(e){const n={a:"a",p:"p",strong:"strong",...(0,r.R)(),...e.components};return(0,s.jsxs)(n.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,s.jsx)(o.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Controls"})," in the ",(0,s.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function c(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(i,{...e})}):i(e)}},42547:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/component-type-convert-and-web-search-1eef7b9a7c1a243f4a08d9717728d0e1.png"},52189:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/component-sql-database-3d2c985aee2dd9970874cb85e1d2b570.png"},84987:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/connect-data-components-to-agent-a8cd8c94d0474ae434aeb5d507a803e8.png"}}]); \ No newline at end of file diff --git a/assets/js/7f7a8893.7c73e87e.js b/assets/js/7f7a8893.7c73e87e.js deleted file mode 100644 index bcfccca68b..0000000000 --- a/assets/js/7f7a8893.7c73e87e.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:()=>h,assets:()=>l,chCodeConfig:()=>p,contentTitle:()=>i,default:()=>j,frontMatter:()=>d,metadata:()=>s,toc:()=>u});const s=JSON.parse('{"id":"Components/components-io","title":"Input / Output","description":"Langflow\'s Input and Output components define where data enters and exits your flow, but they don\'t have identical functionality.","source":"@site/docs/Components/components-io.mdx","sourceDirName":"Components","slug":"/components-io","permalink":"/components-io","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Input / Output","slug":"/components-io"},"sidebar":"docs","previous":{"title":"Components overview","permalink":"/concepts-components"},"next":{"title":"Agents","permalink":"/components-agents"}}');var o=n(74848),r=n(28453),c=n(24754),a=n(17886);const d={title:"Input / Output",slug:"/components-io"},i=void 0,l={},h={annotations:c.hk,Code:c.Cy},p={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},u=[{value:"Chat Input and Output",id:"chat-io",level:2},{value:"Chat Input",id:"chat-input",level:3},{value:"Chat Input parameters",id:"chat-input-parameters",level:4},{value:"Chat Output",id:"chat-output",level:3},{value:"Chat Output parameters",id:"chat-output-parameters",level:4},{value:"Use Chat Input and Output components in a flow",id:"use-chat-input-and-output-components-in-a-flow",level:3},{value:"Send chat input with the Langflow API",id:"send-chat-input-with-the-langflow-api",level:3},{value:"Text Input and Output",id:"text-io",level:2},{value:"Text Input",id:"text-input",level:3},{value:"Text Input parameters",id:"text-input-parameters",level:4},{value:"Text Output",id:"text-output",level:3},{value:"Text Output parameters",id:"text-output-parameters",level:4}];function x(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",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 h||m("CH",!1),h.Code||m("CH.Code",!0),s||m("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.jsxs)(t.p,{children:["Langflow's ",(0,o.jsx)(t.strong,{children:"Input and Output"})," components define where data enters and exits your flow, but they don't have identical functionality."]}),"\n",(0,o.jsxs)(t.p,{children:["Specifically, ",(0,o.jsx)(t.strong,{children:"Chat Input and Output"})," components are designed to facilitate conversational interactions where messages are exchanged in a cumulative dialogue.\nThe data handled by these components includes the message text plus additional metadata like senders, session IDs, and timestamps."]}),"\n",(0,o.jsxs)(t.p,{children:["In contrast, ",(0,o.jsx)(t.strong,{children:"Text Input and Output"})," components are designed for simple string input and output that doesn't require the additional context and metadata associated with chat messages.\nThe data handled by these components is pared down to basic text strings."]}),"\n",(0,o.jsx)(t.h2,{id:"chat-io",children:"Chat Input and Output"}),"\n",(0,o.jsx)(t.admonition,{type:"important",children:(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.strong,{children:"Chat Input and Output"})," components are required to chat with your flow in the ",(0,o.jsx)(t.strong,{children:"Playground"}),".\nFor more information, see ",(0,o.jsx)(t.a,{href:"/concepts-playground",children:"Test flows in the Playground"}),"."]})}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.strong,{children:"Chat Input and Output"})," components are designed to handle conversational interactions in Langflow."]}),"\n",(0,o.jsx)(t.h3,{id:"chat-input",children:"Chat Input"}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.strong,{children:"Chat Input"})," component accepts text and file input, such as a chat message or a file.\nThis data is passed to other components as ",(0,o.jsxs)(t.a,{href:"/data-types",children:[(0,o.jsx)(t.code,{children:"Message"})," data"]})," containing the provided input as well as associated chat metadata, such as the sender, session ID, timestamp, and file attachments."]}),"\n",(0,o.jsxs)(t.p,{children:["Initial input should ",(0,o.jsx)(t.em,{children:"not"})," be provided as a complete ",(0,o.jsx)(t.code,{children:"Message"})," object because the ",(0,o.jsx)(t.strong,{children:"Chat Input"})," component constructs the ",(0,o.jsx)(t.code,{children:"Message"})," object that is then passed to other components in the flow."]}),"\n",(0,o.jsx)(t.h4,{id:"chat-input-parameters",children:"Chat Input parameters"}),"\n",(0,o.jsxs)(t.p,{children:["Most ",(0,o.jsx)(t.strong,{children:"Chat Input"})," component input parameters are hidden by default in the visual editor.\nYou can enable other parameters through the ",(0,o.jsx)(a.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,o.jsx)(t.strong,{children:"Controls"})," in the ",(0,o.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(0,o.jsxs)(t.p,{children:["For information about the resulting ",(0,o.jsx)(t.code,{children:"Message"})," object, including input parameters that are directly mapped to ",(0,o.jsx)(t.code,{children:"Message"})," attributes, see ",(0,o.jsxs)(t.a,{href:"/data-types#message",children:[(0,o.jsx)(t.code,{children:"Message"})," data"]}),"."]}),"\n",(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:"Input Text"}),(0,o.jsx)(t.td,{children:"Input parameter. The message text string to be passed as input."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"sender"}),(0,o.jsx)(t.td,{children:"Sender Type"}),(0,o.jsxs)(t.td,{children:["Input parameter. Identifies the sender as either ",(0,o.jsx)(t.code,{children:"User"})," or ",(0,o.jsx)(t.code,{children:"Language Model"}),"."]})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"sender_name"}),(0,o.jsx)(t.td,{children:"Sender Name"}),(0,o.jsxs)(t.td,{children:["Input parameter. The name of the sender. If unspecified, defaults to ",(0,o.jsx)(t.code,{children:"User"})," or ",(0,o.jsx)(t.code,{children:"Language Model"}),"."]})]}),(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:"Input parameter. 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:"Input parameter. 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:"Input parameter. 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:"Input parameter. The icon of the message."})]}),(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:"Input parameter. Whether to store the message in chat history."})]}),(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:"Input parameter. The text color of the name."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"message"}),(0,o.jsx)(t.td,{children:"Message"}),(0,o.jsxs)(t.td,{children:["Output parameter. The resulting chat ",(0,o.jsx)(t.code,{children:"Message"})," object with all specified properties."]})]})]})]}),"\n",(0,o.jsxs)(s,{children:[(0,o.jsx)("summary",{children:"Message method for Chat Input"}),(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 ",(0,o.jsx)(t.code,{children:"ChatInput"})," class using the ",(0,o.jsx)(t.code,{children:"Message.create()"})," factory method."]}),(0,o.jsx)(h.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.h3,{id:"chat-output",children:"Chat Output"}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.strong,{children:"Chat Output"})," component ingests ",(0,o.jsx)(t.code,{children:"Message"}),", ",(0,o.jsx)(t.code,{children:"Data"}),", or ",(0,o.jsx)(t.code,{children:"DataFrame"})," data from other components, transforms it into ",(0,o.jsx)(t.code,{children:"Message"})," data if needed, and then emits the final output as a chat message.\nFor information about these data types, see ",(0,o.jsx)(t.a,{href:"/data-types",children:"Use Langflow data types"}),"."]}),"\n",(0,o.jsxs)(t.p,{children:["In the ",(0,o.jsx)(t.strong,{children:"Playground"}),", chat output is limited to the parts of the ",(0,o.jsx)(t.code,{children:"Message"})," object that are relevant to the chat interface, such as the text response, sender name, and file attachments.\nTo see the metadata associated with a chat message, inspect the message logs in the ",(0,o.jsx)(t.strong,{children:"Playground"}),"."]}),"\n",(0,o.jsxs)(t.p,{children:["When using the Langflow API, the API response includes the ",(0,o.jsx)(t.strong,{children:"Chat Output"})," ",(0,o.jsx)(t.code,{children:"Message"})," object along with other response data from the flow run.\nLangflow API responses can be extremely verbose, so your applications must include code to extract relevant data from the response to return to the user.\nFor an example, see the ",(0,o.jsx)(t.a,{href:"/get-started-quickstart",children:"Langflow quickstart"}),"."]}),"\n",(0,o.jsx)(t.h4,{id:"chat-output-parameters",children:"Chat Output parameters"}),"\n",(0,o.jsxs)(t.p,{children:["Most ",(0,o.jsx)(t.strong,{children:"Chat Output"})," component input parameters are hidden by default in the visual editor.\nYou can enable them through the ",(0,o.jsx)(a.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,o.jsx)(t.strong,{children:"Controls"})," in the ",(0,o.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(0,o.jsxs)(t.p,{children:["For information about the resulting ",(0,o.jsx)(t.code,{children:"Message"})," object, including input parameters that are directly mapped to ",(0,o.jsx)(t.code,{children:"Message"})," attributes, see ",(0,o.jsxs)(t.a,{href:"/data-types#message",children:[(0,o.jsx)(t.code,{children:"Message"})," data"]}),"."]}),"\n",(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:"Inputs"}),(0,o.jsx)(t.td,{children:"Input parameter. The message text string 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:"Input parameter. Whether to store the message in chat history."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"sender"}),(0,o.jsx)(t.td,{children:"Sender Type"}),(0,o.jsxs)(t.td,{children:["Input parameter. Identifies the sender as either ",(0,o.jsx)(t.code,{children:"User"})," or ",(0,o.jsx)(t.code,{children:"Language Model"}),"."]})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"sender_name"}),(0,o.jsx)(t.td,{children:"Sender Name"}),(0,o.jsxs)(t.td,{children:["Input parameter. The name of the sender. If unspecified, defaults to ",(0,o.jsx)(t.code,{children:"User"})," or ",(0,o.jsx)(t.code,{children:"Language Model"}),"."]})]}),(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:"Input parameter. 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.jsxs)(t.td,{children:["Input parameter. The template to convert ",(0,o.jsxs)(t.a,{href:"/data-types#data",children:[(0,o.jsx)(t.code,{children:"Data"})," input"]})," to ",(0,o.jsx)(t.code,{children:"text"}),". If empty, it is dynamically set to the ",(0,o.jsx)(t.code,{children:"Data"})," object's ",(0,o.jsx)(t.code,{children:"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:"Input parameter. 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:"Input parameter. 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:"Input parameter. 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:["Input parameter. When enabled, ",(0,o.jsxs)(t.a,{href:"/data-types#dataframe",children:[(0,o.jsx)(t.code,{children:"DataFrame"})," input"]})," is cleaned when converted to text. Cleaning removes empty rows, empty lines in cells, and multiple newlines."]})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"message"}),(0,o.jsx)(t.td,{children:"Message"}),(0,o.jsxs)(t.td,{children:["Output parameter. The resulting chat ",(0,o.jsx)(t.code,{children:"Message"})," object with all specified properties."]})]})]})]}),"\n",(0,o.jsx)(t.h3,{id:"use-chat-input-and-output-components-in-a-flow",children:"Use Chat Input and Output components in a flow"}),"\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 emit ",(0,o.jsxs)(t.a,{href:"/data-types#message",children:[(0,o.jsx)(t.code,{children:"Message"})," data"]}),"."]}),"\n",(0,o.jsxs)(t.p,{children:["For example, the following flow connects ",(0,o.jsx)(t.strong,{children:"Chat Input"})," and ",(0,o.jsx)(t.strong,{children:"Chat Output"})," to a ",(0,o.jsx)(t.strong,{children:"Language Model"})," component, creating a simple LLM-based chat flow."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"Chat Input and Output components connected to an OpenAI component",src:n(6944).A+"",width:"3548",height:"1944"})}),"\n",(0,o.jsxs)(t.admonition,{type:"tip",children:[(0,o.jsxs)(t.p,{children:["For detailed examples of ",(0,o.jsx)(t.strong,{children:"Chat Input and Output"})," components in flows, see the following:"]}),(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"/get-started-quickstart",children:"Langflow quickstart"}),": Create and run a basic agent flow."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.strong,{children:"Basic Prompting"})," template: Create an LLM-based chat flow that accepts chat input as well as a prompt with additional instructions for the LLM. Many other Langflow templates also use ",(0,o.jsx)(t.strong,{children:"Chat Input and Output"})," components."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"/agent-tutorial",children:"Connect applications to agents"}),": Explore more advanced concepts around agent flows and prompting, including triggering agent flows from external applications."]}),"\n"]})]}),"\n",(0,o.jsx)(t.h3,{id:"send-chat-input-with-the-langflow-api",children:"Send chat input with the Langflow API"}),"\n",(0,o.jsxs)(t.p,{children:["You can use the Langflow API to run a flow by sending input to a ",(0,o.jsx)(t.strong,{children:"Chat Input"})," component:"]}),"\n",(0,o.jsx)(h.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"--request ",props:{style:{color:"#79C0FF"}}},{content:"POST ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --url ",props:{style:{color:"#79C0FF"}}},{content:'"http://',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_SERVER_ADDRESS",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/run/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --header ",props:{style:{color:"#79C0FF"}}},{content:'"Content-Type: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --header ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --data ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_value": "What\'s the recommended way to install Docker on Mac M1?",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "output_type": "chat",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_type": "chat"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,o.jsxs)(t.p,{children:["When triggering flows with the Langflow API, the payload must contain the values for the ",(0,o.jsx)(t.strong,{children:"Chat Input"})," component's input parameters, such as ",(0,o.jsx)(t.code,{children:"input_value"}),"."]}),"\n",(0,o.jsxs)(t.p,{children:["Not all parameters need to be specified in the request.\nFor example, ",(0,o.jsx)(t.code,{children:"session_id"})," uses the flow's default session ID if omitted.\nIf you want to use a custom session ID, include ",(0,o.jsx)(t.code,{children:"session_id"})," in your request:"]}),"\n",(0,o.jsx)(h.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"--request ",props:{style:{color:"#79C0FF"}}},{content:"POST ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --url ",props:{style:{color:"#79C0FF"}}},{content:'"http://',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_SERVER_ADDRESS",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/run/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --header ",props:{style:{color:"#79C0FF"}}},{content:'"Content-Type: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --header ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --data ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_value": "Whats the recommended way to install Docker on Mac M1",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "session_id": "$USER_ID",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "output_type": "chat",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_type": "chat"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,o.jsxs)(t.p,{children:["For more information, see ",(0,o.jsx)(t.a,{href:"/concepts-publish",children:"Trigger flows with the Langflow API"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"text-io",children:"Text Input and Output"}),"\n",(0,o.jsxs)(t.admonition,{type:"important",children:[(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.strong,{children:"Text Input and Output"})," components aren't supported in the ",(0,o.jsx)(t.strong,{children:"Playground"}),".\nBecause the data isn't formatted as a chat message, the data doesn't appear in the ",(0,o.jsx)(t.strong,{children:"Playground"}),", and you can't chat with your flow in the ",(0,o.jsx)(t.strong,{children:"Playground"}),"."]}),(0,o.jsxs)(t.p,{children:["If you want to chat with a flow in the ",(0,o.jsx)(t.strong,{children:"Playground"}),", you must use the ",(0,o.jsxs)(t.a,{href:"#chat-io",children:[(0,o.jsx)(t.strong,{children:"Chat Input and Output"})," components"]}),"."]})]}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.strong,{children:"Text Input and Output"})," components are designed for flows that ingest or emit simple text strings.\nThese components don't support full conversational interactions."]}),"\n",(0,o.jsxs)(t.p,{children:["Passing chat-like metadata to a ",(0,o.jsx)(t.strong,{children:"Text Input and Output"})," component doesn't change the component's behavior; the result is still a simple text string."]}),"\n",(0,o.jsx)(t.h3,{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 that is passed to other components as ",(0,o.jsxs)(t.a,{href:"/data-types",children:[(0,o.jsx)(t.code,{children:"Message"})," data"]})," containing only the provided text string."]}),"\n",(0,o.jsxs)(t.p,{children:["Initial input should ",(0,o.jsx)(t.em,{children:"not"})," be provided as a complete ",(0,o.jsx)(t.code,{children:"Message"})," object because the ",(0,o.jsx)(t.strong,{children:"Text Input"})," component constructs the ",(0,o.jsx)(t.code,{children:"Message"})," object that is then passed to other components in the flow."]}),"\n",(0,o.jsx)(t.h4,{id:"text-input-parameters",children:"Text Input parameters"}),"\n",(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.jsxs)(t.td,{children:["Input parameter. Text supplied as input to the component. Can be entered directly or passed as ",(0,o.jsx)(t.code,{children:"Message"})," data from other components."]})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"text"}),(0,o.jsx)(t.td,{children:"Text"}),(0,o.jsxs)(t.td,{children:["Output parameter. The resulting ",(0,o.jsx)(t.code,{children:"Message"})," object containing the input text in the ",(0,o.jsx)(t.code,{children:"text"})," attribute."]})]})]})]}),"\n",(0,o.jsx)(t.h3,{id:"text-output",children:"Text Output"}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.strong,{children:"Text Output"})," component ingests ",(0,o.jsxs)(t.a,{href:"/data-types#message",children:[(0,o.jsx)(t.code,{children:"Message"})," data"]})," from other components, emitting only the ",(0,o.jsx)(t.code,{children:"text"})," attribute in a simplified ",(0,o.jsx)(t.code,{children:"Message"})," object."]}),"\n",(0,o.jsx)(t.h4,{id:"text-output-parameters",children:"Text Output parameters"}),"\n",(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.jsxs)(t.td,{children:["Input parameter. Text to be ingested and output as a string. Can be entered directly or passed as ",(0,o.jsx)(t.code,{children:"Message"})," data from other components."]})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"text"}),(0,o.jsx)(t.td,{children:"Text"}),(0,o.jsxs)(t.td,{children:["Output parameter. The resulting ",(0,o.jsx)(t.code,{children:"Message"})," object containing the output text in the ",(0,o.jsx)(t.code,{children:"text"})," attribute."]})]})]})]})]})}function j(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(x,{...e})}):x(e)}function m(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}}}]); \ No newline at end of file diff --git a/assets/js/7f7a8893.a8581ef5.js b/assets/js/7f7a8893.a8581ef5.js new file mode 100644 index 0000000000..7a3ab74ccd --- /dev/null +++ b/assets/js/7f7a8893.a8581ef5.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:()=>h,assets:()=>l,chCodeConfig:()=>p,contentTitle:()=>i,default:()=>j,frontMatter:()=>d,metadata:()=>s,toc:()=>u});const s=JSON.parse('{"id":"Components/components-io","title":"Input / Output","description":"Langflow\'s Input and Output components define where data enters and exits your flow, but they don\'t have identical functionality.","source":"@site/docs/Components/components-io.mdx","sourceDirName":"Components","slug":"/components-io","permalink":"/components-io","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Input / Output","slug":"/components-io"},"sidebar":"docs","previous":{"title":"Components overview","permalink":"/concepts-components"},"next":{"title":"Agents","permalink":"/components-agents"}}');var o=n(74848),r=n(28453),c=n(24754),a=(n(17886),n(31929));const d={title:"Input / Output",slug:"/components-io"},i=void 0,l={},h={annotations:c.hk,Code:c.Cy},p={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},u=[{value:"Chat Input and Output",id:"chat-io",level:2},{value:"Chat Input",id:"chat-input",level:3},{value:"Chat Input parameters",id:"chat-input-parameters",level:4},...a.RM,{value:"Chat Output",id:"chat-output",level:3},{value:"Chat Output parameters",id:"chat-output-parameters",level:4},...a.RM,{value:"Use Chat Input and Output components in a flow",id:"use-chat-input-and-output-components-in-a-flow",level:3},{value:"Send chat input with the Langflow API",id:"send-chat-input-with-the-langflow-api",level:3},{value:"Text Input and Output",id:"text-io",level:2},{value:"Text Input",id:"text-input",level:3},{value:"Text Input parameters",id:"text-input-parameters",level:4},{value:"Text Output",id:"text-output",level:3},{value:"Text Output parameters",id:"text-output-parameters",level:4}];function x(e){const t={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",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 h||m("CH",!1),h.Code||m("CH.Code",!0),s||m("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.jsxs)(t.p,{children:["Langflow's ",(0,o.jsx)(t.strong,{children:"Input and Output"})," components define where data enters and exits your flow, but they don't have identical functionality."]}),"\n",(0,o.jsxs)(t.p,{children:["Specifically, ",(0,o.jsx)(t.strong,{children:"Chat Input and Output"})," components are designed to facilitate conversational interactions where messages are exchanged in a cumulative dialogue.\nThe data handled by these components includes the message text plus additional metadata like senders, session IDs, and timestamps."]}),"\n",(0,o.jsxs)(t.p,{children:["In contrast, ",(0,o.jsx)(t.strong,{children:"Text Input and Output"})," components are designed for simple string input and output that doesn't require the additional context and metadata associated with chat messages.\nThe data handled by these components is pared down to basic text strings."]}),"\n",(0,o.jsx)(t.h2,{id:"chat-io",children:"Chat Input and Output"}),"\n",(0,o.jsx)(t.admonition,{type:"important",children:(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.strong,{children:"Chat Input and Output"})," components are required to chat with your flow in the ",(0,o.jsx)(t.strong,{children:"Playground"}),".\nFor more information, see ",(0,o.jsx)(t.a,{href:"/concepts-playground",children:"Test flows in the Playground"}),"."]})}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.strong,{children:"Chat Input and Output"})," components are designed to handle conversational interactions in Langflow."]}),"\n",(0,o.jsx)(t.h3,{id:"chat-input",children:"Chat Input"}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.strong,{children:"Chat Input"})," component accepts text and file input, such as a chat message or a file.\nThis data is passed to other components as ",(0,o.jsxs)(t.a,{href:"/data-types",children:[(0,o.jsx)(t.code,{children:"Message"})," data"]})," containing the provided input as well as associated chat metadata, such as the sender, session ID, timestamp, and file attachments."]}),"\n",(0,o.jsxs)(t.p,{children:["Initial input should ",(0,o.jsx)(t.em,{children:"not"})," be provided as a complete ",(0,o.jsx)(t.code,{children:"Message"})," object because the ",(0,o.jsx)(t.strong,{children:"Chat Input"})," component constructs the ",(0,o.jsx)(t.code,{children:"Message"})," object that is then passed to other components in the flow."]}),"\n",(0,o.jsx)(t.h4,{id:"chat-input-parameters",children:"Chat Input parameters"}),"\n",(0,o.jsx)(a.Ay,{}),"\n",(0,o.jsxs)(t.p,{children:["For information about the resulting ",(0,o.jsx)(t.code,{children:"Message"})," object, including input parameters that are directly mapped to ",(0,o.jsx)(t.code,{children:"Message"})," attributes, see ",(0,o.jsxs)(t.a,{href:"/data-types#message",children:[(0,o.jsx)(t.code,{children:"Message"})," data"]}),"."]}),"\n",(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:"Input Text"}),(0,o.jsx)(t.td,{children:"Input parameter. The message text string to be passed as input."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"sender"}),(0,o.jsx)(t.td,{children:"Sender Type"}),(0,o.jsxs)(t.td,{children:["Input parameter. Identifies the sender as either ",(0,o.jsx)(t.code,{children:"User"})," or ",(0,o.jsx)(t.code,{children:"Language Model"}),"."]})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"sender_name"}),(0,o.jsx)(t.td,{children:"Sender Name"}),(0,o.jsxs)(t.td,{children:["Input parameter. The name of the sender. If unspecified, defaults to ",(0,o.jsx)(t.code,{children:"User"})," or ",(0,o.jsx)(t.code,{children:"Language Model"}),"."]})]}),(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:"Input parameter. 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:"Input parameter. 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:"Input parameter. 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:"Input parameter. The icon of the message."})]}),(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:"Input parameter. Whether to store the message in chat history."})]}),(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:"Input parameter. The text color of the name."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"message"}),(0,o.jsx)(t.td,{children:"Message"}),(0,o.jsxs)(t.td,{children:["Output parameter. The resulting chat ",(0,o.jsx)(t.code,{children:"Message"})," object with all specified properties."]})]})]})]}),"\n",(0,o.jsxs)(s,{children:[(0,o.jsx)("summary",{children:"Message method for Chat Input"}),(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 ",(0,o.jsx)(t.code,{children:"ChatInput"})," class using the ",(0,o.jsx)(t.code,{children:"Message.create()"})," factory method."]}),(0,o.jsx)(h.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.h3,{id:"chat-output",children:"Chat Output"}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.strong,{children:"Chat Output"})," component ingests ",(0,o.jsx)(t.code,{children:"Message"}),", ",(0,o.jsx)(t.code,{children:"Data"}),", or ",(0,o.jsx)(t.code,{children:"DataFrame"})," data from other components, transforms it into ",(0,o.jsx)(t.code,{children:"Message"})," data if needed, and then emits the final output as a chat message.\nFor information about these data types, see ",(0,o.jsx)(t.a,{href:"/data-types",children:"Use Langflow data types"}),"."]}),"\n",(0,o.jsxs)(t.p,{children:["In the ",(0,o.jsx)(t.strong,{children:"Playground"}),", chat output is limited to the parts of the ",(0,o.jsx)(t.code,{children:"Message"})," object that are relevant to the chat interface, such as the text response, sender name, and file attachments.\nTo see the metadata associated with a chat message, inspect the message logs in the ",(0,o.jsx)(t.strong,{children:"Playground"}),"."]}),"\n",(0,o.jsxs)(t.p,{children:["When using the Langflow API, the API response includes the ",(0,o.jsx)(t.strong,{children:"Chat Output"})," ",(0,o.jsx)(t.code,{children:"Message"})," object along with other response data from the flow run.\nLangflow API responses can be extremely verbose, so your applications must include code to extract relevant data from the response to return to the user.\nFor an example, see the ",(0,o.jsx)(t.a,{href:"/get-started-quickstart",children:"Langflow quickstart"}),"."]}),"\n",(0,o.jsx)(t.h4,{id:"chat-output-parameters",children:"Chat Output parameters"}),"\n",(0,o.jsx)(a.Ay,{}),"\n",(0,o.jsxs)(t.p,{children:["For information about the resulting ",(0,o.jsx)(t.code,{children:"Message"})," object, including input parameters that are directly mapped to ",(0,o.jsx)(t.code,{children:"Message"})," attributes, see ",(0,o.jsxs)(t.a,{href:"/data-types#message",children:[(0,o.jsx)(t.code,{children:"Message"})," data"]}),"."]}),"\n",(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:"Inputs"}),(0,o.jsx)(t.td,{children:"Input parameter. The message text string 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:"Input parameter. Whether to store the message in chat history."})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"sender"}),(0,o.jsx)(t.td,{children:"Sender Type"}),(0,o.jsxs)(t.td,{children:["Input parameter. Identifies the sender as either ",(0,o.jsx)(t.code,{children:"User"})," or ",(0,o.jsx)(t.code,{children:"Language Model"}),"."]})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"sender_name"}),(0,o.jsx)(t.td,{children:"Sender Name"}),(0,o.jsxs)(t.td,{children:["Input parameter. The name of the sender. If unspecified, defaults to ",(0,o.jsx)(t.code,{children:"User"})," or ",(0,o.jsx)(t.code,{children:"Language Model"}),"."]})]}),(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:"Input parameter. 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.jsxs)(t.td,{children:["Input parameter. The template to convert ",(0,o.jsxs)(t.a,{href:"/data-types#data",children:[(0,o.jsx)(t.code,{children:"Data"})," input"]})," to ",(0,o.jsx)(t.code,{children:"text"}),". If empty, it is dynamically set to the ",(0,o.jsx)(t.code,{children:"Data"})," object's ",(0,o.jsx)(t.code,{children:"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:"Input parameter. 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:"Input parameter. 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:"Input parameter. 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:["Input parameter. When enabled, ",(0,o.jsxs)(t.a,{href:"/data-types#dataframe",children:[(0,o.jsx)(t.code,{children:"DataFrame"})," input"]})," is cleaned when converted to text. Cleaning removes empty rows, empty lines in cells, and multiple newlines."]})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"message"}),(0,o.jsx)(t.td,{children:"Message"}),(0,o.jsxs)(t.td,{children:["Output parameter. The resulting chat ",(0,o.jsx)(t.code,{children:"Message"})," object with all specified properties."]})]})]})]}),"\n",(0,o.jsx)(t.h3,{id:"use-chat-input-and-output-components-in-a-flow",children:"Use Chat Input and Output components in a flow"}),"\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 emit ",(0,o.jsxs)(t.a,{href:"/data-types#message",children:[(0,o.jsx)(t.code,{children:"Message"})," data"]}),"."]}),"\n",(0,o.jsxs)(t.p,{children:["For example, the following flow connects ",(0,o.jsx)(t.strong,{children:"Chat Input"})," and ",(0,o.jsx)(t.strong,{children:"Chat Output"})," to a ",(0,o.jsx)(t.strong,{children:"Language Model"})," component, creating a simple LLM-based chat flow."]}),"\n",(0,o.jsx)(t.p,{children:(0,o.jsx)(t.img,{alt:"Chat Input and Output components connected to an OpenAI component",src:n(6944).A+"",width:"3548",height:"1944"})}),"\n",(0,o.jsxs)(t.admonition,{type:"tip",children:[(0,o.jsxs)(t.p,{children:["For detailed examples of ",(0,o.jsx)(t.strong,{children:"Chat Input and Output"})," components in flows, see the following:"]}),(0,o.jsxs)(t.ul,{children:["\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"/get-started-quickstart",children:"Langflow quickstart"}),": Create and run a basic agent flow."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.strong,{children:"Basic Prompting"})," template: Create an LLM-based chat flow that accepts chat input as well as a prompt with additional instructions for the LLM. Many other Langflow templates also use ",(0,o.jsx)(t.strong,{children:"Chat Input and Output"})," components."]}),"\n",(0,o.jsxs)(t.li,{children:[(0,o.jsx)(t.a,{href:"/agent-tutorial",children:"Connect applications to agents"}),": Explore more advanced concepts around agent flows and prompting, including triggering agent flows from external applications."]}),"\n"]})]}),"\n",(0,o.jsx)(t.h3,{id:"send-chat-input-with-the-langflow-api",children:"Send chat input with the Langflow API"}),"\n",(0,o.jsxs)(t.p,{children:["You can use the Langflow API to run a flow by sending input to a ",(0,o.jsx)(t.strong,{children:"Chat Input"})," component:"]}),"\n",(0,o.jsx)(h.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"--request ",props:{style:{color:"#79C0FF"}}},{content:"POST ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --url ",props:{style:{color:"#79C0FF"}}},{content:'"http://',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_SERVER_ADDRESS",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/run/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --header ",props:{style:{color:"#79C0FF"}}},{content:'"Content-Type: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --header ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --data ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_value": "What\'s the recommended way to install Docker on Mac M1?",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "output_type": "chat",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_type": "chat"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,o.jsxs)(t.p,{children:["When triggering flows with the Langflow API, the payload must contain the values for the ",(0,o.jsx)(t.strong,{children:"Chat Input"})," component's input parameters, such as ",(0,o.jsx)(t.code,{children:"input_value"}),"."]}),"\n",(0,o.jsxs)(t.p,{children:["Not all parameters need to be specified in the request.\nFor example, ",(0,o.jsx)(t.code,{children:"session_id"})," uses the flow's default session ID if omitted.\nIf you want to use a custom session ID, include ",(0,o.jsx)(t.code,{children:"session_id"})," in your request:"]}),"\n",(0,o.jsx)(h.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"--request ",props:{style:{color:"#79C0FF"}}},{content:"POST ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --url ",props:{style:{color:"#79C0FF"}}},{content:'"http://',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_SERVER_ADDRESS",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/run/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --header ",props:{style:{color:"#79C0FF"}}},{content:'"Content-Type: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --header ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --data ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_value": "Whats the recommended way to install Docker on Mac M1",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "session_id": "$USER_ID",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "output_type": "chat",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_type": "chat"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,o.jsxs)(t.p,{children:["For more information, see ",(0,o.jsx)(t.a,{href:"/concepts-publish",children:"Trigger flows with the Langflow API"}),"."]}),"\n",(0,o.jsx)(t.h2,{id:"text-io",children:"Text Input and Output"}),"\n",(0,o.jsxs)(t.admonition,{type:"important",children:[(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.strong,{children:"Text Input and Output"})," components aren't supported in the ",(0,o.jsx)(t.strong,{children:"Playground"}),".\nBecause the data isn't formatted as a chat message, the data doesn't appear in the ",(0,o.jsx)(t.strong,{children:"Playground"}),", and you can't chat with your flow in the ",(0,o.jsx)(t.strong,{children:"Playground"}),"."]}),(0,o.jsxs)(t.p,{children:["If you want to chat with a flow in the ",(0,o.jsx)(t.strong,{children:"Playground"}),", you must use the ",(0,o.jsxs)(t.a,{href:"#chat-io",children:[(0,o.jsx)(t.strong,{children:"Chat Input and Output"})," components"]}),"."]})]}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.strong,{children:"Text Input and Output"})," components are designed for flows that ingest or emit simple text strings.\nThese components don't support full conversational interactions."]}),"\n",(0,o.jsxs)(t.p,{children:["Passing chat-like metadata to a ",(0,o.jsx)(t.strong,{children:"Text Input and Output"})," component doesn't change the component's behavior; the result is still a simple text string."]}),"\n",(0,o.jsx)(t.h3,{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 that is passed to other components as ",(0,o.jsxs)(t.a,{href:"/data-types",children:[(0,o.jsx)(t.code,{children:"Message"})," data"]})," containing only the provided text string."]}),"\n",(0,o.jsxs)(t.p,{children:["Initial input should ",(0,o.jsx)(t.em,{children:"not"})," be provided as a complete ",(0,o.jsx)(t.code,{children:"Message"})," object because the ",(0,o.jsx)(t.strong,{children:"Text Input"})," component constructs the ",(0,o.jsx)(t.code,{children:"Message"})," object that is then passed to other components in the flow."]}),"\n",(0,o.jsx)(t.h4,{id:"text-input-parameters",children:"Text Input parameters"}),"\n",(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.jsxs)(t.td,{children:["Input parameter. Text supplied as input to the component. Can be entered directly or passed as ",(0,o.jsx)(t.code,{children:"Message"})," data from other components."]})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"text"}),(0,o.jsx)(t.td,{children:"Text"}),(0,o.jsxs)(t.td,{children:["Output parameter. The resulting ",(0,o.jsx)(t.code,{children:"Message"})," object containing the input text in the ",(0,o.jsx)(t.code,{children:"text"})," attribute."]})]})]})]}),"\n",(0,o.jsx)(t.h3,{id:"text-output",children:"Text Output"}),"\n",(0,o.jsxs)(t.p,{children:["The ",(0,o.jsx)(t.strong,{children:"Text Output"})," component ingests ",(0,o.jsxs)(t.a,{href:"/data-types#message",children:[(0,o.jsx)(t.code,{children:"Message"})," data"]})," from other components, emitting only the ",(0,o.jsx)(t.code,{children:"text"})," attribute in a simplified ",(0,o.jsx)(t.code,{children:"Message"})," object."]}),"\n",(0,o.jsx)(t.h4,{id:"text-output-parameters",children:"Text Output parameters"}),"\n",(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.jsxs)(t.td,{children:["Input parameter. Text to be ingested and output as a string. Can be entered directly or passed as ",(0,o.jsx)(t.code,{children:"Message"})," data from other components."]})]}),(0,o.jsxs)(t.tr,{children:[(0,o.jsx)(t.td,{children:"text"}),(0,o.jsx)(t.td,{children:"Text"}),(0,o.jsxs)(t.td,{children:["Output parameter. The resulting ",(0,o.jsx)(t.code,{children:"Message"})," object containing the output text in the ",(0,o.jsx)(t.code,{children:"text"})," attribute."]})]})]})]})]})}function j(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(x,{...e})}):x(e)}function m(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}},31929:(e,t,n)=>{n.d(t,{Ay:()=>d,RM:()=>c});var s=n(74848),o=n(28453),r=n(17886);const c=[];function a(e){const t={a:"a",p:"p",strong:"strong",...(0,o.R)(),...e.components};return(0,s.jsxs)(t.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,s.jsx)(r.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(t.strong,{children:"Controls"})," in the ",(0,s.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function d(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}}}]); \ No newline at end of file diff --git a/assets/js/8a484c94.ac2a10e3.js b/assets/js/8a484c94.ac2a10e3.js deleted file mode 100644 index b50565f5a8..0000000000 --- a/assets/js/8a484c94.ac2a10e3.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[8750],{28453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>a});var s=t(96540);const r={},o=s.createContext(r);function i(e){const n=s.useContext(o);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),s.createElement(o.Provider,{value:n},e.children)}},81451:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>h,frontMatter:()=>i,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"Components/components-agents","title":"Agents","description":"Langflow\'s Agent and MCP Tools components are critical for building agent flows.","source":"@site/docs/Components/components-agents.mdx","sourceDirName":"Components","slug":"/components-agents","permalink":"/components-agents","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Agents","slug":"/components-agents"},"sidebar":"docs","previous":{"title":"Input / Output","permalink":"/components-io"},"next":{"title":"Language Model","permalink":"/components-models"}}');var r=t(74848),o=t(28453);const i={title:"Agents",slug:"/components-agents"},a=void 0,l={},c=[{value:"Examples of agent flows",id:"examples-of-agent-flows",level:2},{value:"Agent component",id:"agent-component",level:2},{value:"MCP Tools component",id:"mcp-connection",level:2},{value:"Legacy Agent components",id:"legacy-agent-components",level:2},{value:"See also",id:"see-also",level:2}];function d(e){const n={a:"a",code:"code",em:"em",h2:"h2",li:"li",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 t||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,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:["Langflow's ",(0,r.jsx)(n.strong,{children:"Agent"})," and ",(0,r.jsx)(n.strong,{children:"MCP Tools"})," components are critical for building agent flows.\nThese components define the behavior and capabilities of AI agents in your flows."]}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"How do agents work?"}),(0,r.jsxs)(n.p,{children:["Agents extend Large Language Models (LLMs) by integrating ",(0,r.jsx)(n.em,{children:"tools"}),", which are functions that provide additional context and enable autonomous task execution.\nThese integrations make agents more specialized and powerful than standalone LLMs."]}),(0,r.jsx)(n.p,{children:"Whereas an LLM might generate acceptable, inert responses to general queries and tasks, an agent can leverage the integrated context and tools to provide more relevant responses and even take action.\nFor example, you might create an agent that can access your company's knowledge base, repositories, and other resources to help your team with tasks that require knowledge of your specific products, customers, and code."}),(0,r.jsx)(n.p,{children:"Agents use LLMs as a reasoning engine to process input, determine which actions to take to address the query, and then generate a response.\nThe response could be a typical text-based LLM response, or it could involve an action, like editing a file, running a script, or calling an external API."}),(0,r.jsxs)(n.p,{children:["In an agentic context, tools are functions that the agent can run to perform tasks or access external resources.\nA function is wrapped as a ",(0,r.jsx)(n.code,{children:"Tool"})," object with a common interface that the agent understands.\nAgents become aware of tools through tool registration, which is when the agent is provided a list of available tools typically at agent initialization.\nThe ",(0,r.jsx)(n.code,{children:"Tool"})," object's description tells the agent what the tool can do so that it can decide whether the tool is appropriate for a given request."]})]}),"\n",(0,r.jsx)(n.h2,{id:"examples-of-agent-flows",children:"Examples of agent flows"}),"\n",(0,r.jsxs)(n.p,{children:["For examples of flows using the ",(0,r.jsx)(n.strong,{children:"Agent"})," and ",(0,r.jsx)(n.strong,{children:"MCP Tools"})," components, see the following:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/get-started-quickstart",children:"Langflow quickstart"}),": Start with the ",(0,r.jsx)(n.strong,{children:"Simple Agent"})," template, modify its tools, and then learn how to use an agent flow in an application."]}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Simple Agent"})," template creates a basic agent flow with an ",(0,r.jsx)(n.strong,{children:"Agent"})," component that can use two other Langflow components as tools.\nThe LLM specified in the ",(0,r.jsx)(n.strong,{children:"Agent"})," component's settings can use its own built-in functionality as well as the functionality provided by the connected tools when generating responses."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/agents-tools#use-an-agent-as-a-tool",children:"Use an agent as a tool"}),": Create a multi-agent flow."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/mcp-client",children:"Use Langflow as an MCP client"})," and ",(0,r.jsx)(n.a,{href:"/mcp-server",children:"Use Langflow as an MCP server"}),": Use the ",(0,r.jsx)(n.strong,{children:"Agent"})," and ",(0,r.jsx)(n.strong,{children:"MCP Tools"})," components to implement the Model Context Protocol (MCP) in your flows."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"agent-component",children:"Agent component"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Agent"})," component is the primary agent actor in your agent flows.\nThis component uses an LLM integration to respond to input, such as a chat message or file upload."]}),"\n",(0,r.jsxs)(n.p,{children:["The agent can use the tools already available in the base LLM as well as additional tools that you connect to the ",(0,r.jsx)(n.strong,{children:"Agent"})," component's ",(0,r.jsx)(n.strong,{children:"Tools"})," port.\nYou can connect any Langflow component as a tool, including other ",(0,r.jsx)(n.strong,{children:"Agent"})," components and MCP servers through the ",(0,r.jsxs)(n.a,{href:"#mcp-connection",children:[(0,r.jsx)(n.strong,{children:"MCP Tools"})," component"]}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["For more information about using this component, see ",(0,r.jsx)(n.a,{href:"/agents",children:"Use Langflow agents"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"mcp-connection",children:"MCP Tools component"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"MCP Tools"})," component connects to a Model Context Protocol (MCP) server and exposes the MCP server's functions as tools for Langflow agents to use to respond to input."]}),"\n",(0,r.jsxs)(n.p,{children:["In addition to publicly available MCP servers and your own custom-built MCP servers, you can connect Langflow MCP servers, which allow your agent to use your Langflow flows as tools.\nTo do this, use the ",(0,r.jsx)(n.strong,{children:"MCP Tools"})," component's ",(0,r.jsx)(n.a,{href:"/mcp-client#mcp-sse-mode",children:"SSE mode"})," to connect to your Langflow MCP server at the ",(0,r.jsx)(n.code,{children:"/api/v1/mcp/sse"})," endpoint."]}),"\n",(0,r.jsxs)(n.p,{children:["For more information about using this component and serving flows as MCP tools, see ",(0,r.jsx)(n.a,{href:"/mcp-client",children:"Use Langflow as an MCP client"})," and ",(0,r.jsx)(n.a,{href:"/mcp-server",children:"Use Langflow as an MCP server"}),"."]}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Earlier versions of the MCP Tools component"}),(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["In Langflow version 1.5, the ",(0,r.jsx)(n.strong,{children:"MCP Connection"})," component was renamed to the ",(0,r.jsx)(n.strong,{children:"MCP Tools"})," component."]}),"\n",(0,r.jsxs)(n.li,{children:["In Langflow version 1.3, the ",(0,r.jsx)(n.strong,{children:"MCP Tools (stdio)"})," and ",(0,r.jsx)(n.strong,{children:"MCP Tools (SSE)"})," components were deprecated and replaced by the unified ",(0,r.jsx)(n.strong,{children:"MCP Connection"})," component, which was later renamed to ",(0,r.jsx)(n.strong,{children:"MCP Tools"}),"."]}),"\n"]})]}),"\n",(0,r.jsx)(n.h2,{id:"legacy-agent-components",children:"Legacy Agent components"}),"\n",(0,r.jsx)(n.p,{children:"The following components are legacy components.\nYou can still use these components in your flows, but they are no longer maintained and they can be removed in future releases."}),"\n",(0,r.jsxs)(n.p,{children:["Replace these components with the ",(0,r.jsx)(n.strong,{children:"Agent"})," component or other Langflow components, depending on your use case."]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.strong,{children:"CrewAI Hierarchical Task"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.strong,{children:"CrewAI Sequential Task"})}),"\n"]}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"CrewAI Agent"}),(0,r.jsxs)(n.p,{children:["This component represents CrewAI agents, allowing for the creation of specialized AI agents with defined roles goals and capabilities within a crew.\nFor more information, see the ",(0,r.jsx)(n.a,{href:"https://docs.crewai.com/core-concepts/Agents/",children:"CrewAI agents documentation"}),"."]}),(0,r.jsx)(n.p,{children:"This component accepts the following parameters:"}),(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:"role"}),(0,r.jsx)(n.td,{children:"Role"}),(0,r.jsx)(n.td,{children:"Input parameter. The role of the agent."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"goal"}),(0,r.jsx)(n.td,{children:"Goal"}),(0,r.jsx)(n.td,{children:"Input parameter. The objective of the agent."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"backstory"}),(0,r.jsx)(n.td,{children:"Backstory"}),(0,r.jsx)(n.td,{children:"Input parameter. The backstory of the agent."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"tools"}),(0,r.jsx)(n.td,{children:"Tools"}),(0,r.jsx)(n.td,{children:"Input parameter. The tools at the agent's disposal."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"llm"}),(0,r.jsx)(n.td,{children:"Language Model"}),(0,r.jsx)(n.td,{children:"Input parameter. The language model that runs the agent."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"memory"}),(0,r.jsx)(n.td,{children:"Memory"}),(0,r.jsx)(n.td,{children:"Input parameter. This determines whether the agent should have memory or not."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"verbose"}),(0,r.jsx)(n.td,{children:"Verbose"}),(0,r.jsx)(n.td,{children:"Input parameter. This enables verbose output."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"allow_delegation"}),(0,r.jsx)(n.td,{children:"Allow Delegation"}),(0,r.jsx)(n.td,{children:"Input parameter. This determines whether the agent is allowed to delegate tasks to other agents."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"allow_code_execution"}),(0,r.jsx)(n.td,{children:"Allow Code Execution"}),(0,r.jsx)(n.td,{children:"Input parameter. This determines whether the agent is allowed to execute code."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"kwargs"}),(0,r.jsx)(n.td,{children:"kwargs"}),(0,r.jsx)(n.td,{children:"Input parameter. Additional keyword arguments for the agent."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"output"}),(0,r.jsx)(n.td,{children:"Agent"}),(0,r.jsx)(n.td,{children:"Output parameter. The constructed CrewAI Agent object."})]})]})]})]}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"CrewAI Hierarchical Crew"}),(0,r.jsxs)(n.p,{children:["This component represents a group of agents managing how they should collaborate and the tasks they should perform in a hierarchical structure. This component allows for the creation of a crew with a manager overseeing the task execution.\nFor more information, see the ",(0,r.jsx)(n.a,{href:"https://docs.crewai.com/how-to/Hierarchical/",children:"CrewAI hierarchical crew documentation"}),"."]}),(0,r.jsx)(n.p,{children:"It accepts the following parameters:"}),(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:"agents"}),(0,r.jsx)(n.td,{children:"Agents"}),(0,r.jsx)(n.td,{children:"Input parameter. The list of Agent objects representing the crew members."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"tasks"}),(0,r.jsx)(n.td,{children:"Tasks"}),(0,r.jsx)(n.td,{children:"Input parameter. The list of HierarchicalTask objects representing the tasks to be executed."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"manager_llm"}),(0,r.jsx)(n.td,{children:"Manager LLM"}),(0,r.jsx)(n.td,{children:"Input parameter. The language model for the manager agent."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"manager_agent"}),(0,r.jsx)(n.td,{children:"Manager Agent"}),(0,r.jsx)(n.td,{children:"Input parameter. The specific agent to act as the manager."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"verbose"}),(0,r.jsx)(n.td,{children:"Verbose"}),(0,r.jsx)(n.td,{children:"Input parameter. This enables verbose output for detailed logging."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"memory"}),(0,r.jsx)(n.td,{children:"Memory"}),(0,r.jsx)(n.td,{children:"Input parameter. The memory configuration for the crew."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"use_cache"}),(0,r.jsx)(n.td,{children:"Use Cache"}),(0,r.jsx)(n.td,{children:"Input parameter. This enables caching of results."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"max_rpm"}),(0,r.jsx)(n.td,{children:"Max RPM"}),(0,r.jsx)(n.td,{children:"Input parameter. This sets the maximum requests per minute."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"share_crew"}),(0,r.jsx)(n.td,{children:"Share Crew"}),(0,r.jsx)(n.td,{children:"Input parameter. This determines if the crew information is shared among agents."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"function_calling_llm"}),(0,r.jsx)(n.td,{children:"Function Calling LLM"}),(0,r.jsx)(n.td,{children:"Input parameter. The language model for function calling."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"crew"}),(0,r.jsx)(n.td,{children:"Crew"}),(0,r.jsx)(n.td,{children:"Output parameter. The constructed Crew object with hierarchical task execution."})]})]})]})]}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"CrewAI Sequential Crew"}),(0,r.jsxs)(n.p,{children:["This component represents a group of agents with tasks that are executed sequentially. This component allows for the creation of a crew that performs tasks in a specific order.\nFor more information, see the ",(0,r.jsx)(n.a,{href:"https://docs.crewai.com/how-to/Sequential/",children:"CrewAI sequential crew documentation"}),"."]}),(0,r.jsx)(n.p,{children:"It accepts the following parameters:"}),(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:"tasks"}),(0,r.jsx)(n.td,{children:"Tasks"}),(0,r.jsx)(n.td,{children:"Input parameter. The list of SequentialTask objects representing the tasks to be executed."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"verbose"}),(0,r.jsx)(n.td,{children:"Verbose"}),(0,r.jsx)(n.td,{children:"Input parameter. This enables verbose output for detailed logging."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"memory"}),(0,r.jsx)(n.td,{children:"Memory"}),(0,r.jsx)(n.td,{children:"Input parameter. The memory configuration for the crew."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"use_cache"}),(0,r.jsx)(n.td,{children:"Use Cache"}),(0,r.jsx)(n.td,{children:"Input parameter. This enables caching of results."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"max_rpm"}),(0,r.jsx)(n.td,{children:"Max RPM"}),(0,r.jsx)(n.td,{children:"Input parameter. This sets the maximum requests per minute."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"share_crew"}),(0,r.jsx)(n.td,{children:"Share Crew"}),(0,r.jsx)(n.td,{children:"Input parameter. This determines if the crew information is shared among agents."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"function_calling_llm"}),(0,r.jsx)(n.td,{children:"Function Calling LLM"}),(0,r.jsx)(n.td,{children:"Input parameter. The language model for function calling."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"crew"}),(0,r.jsx)(n.td,{children:"Crew"}),(0,r.jsx)(n.td,{children:"Output parameter. The constructed Crew object with sequential task execution."})]})]})]})]}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"CrewAI Sequential Task Agent"}),(0,r.jsxs)(n.p,{children:["This component creates a CrewAI Task and its associated agent allowing for the definition of sequential tasks with specific agent roles and capabilities.\nFor more information, see the ",(0,r.jsx)(n.a,{href:"https://docs.crewai.com/how-to/Sequential/",children:"CrewAI sequential agents documentation"}),"."]}),(0,r.jsx)(n.p,{children:"It accepts the following parameters:"}),(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:"role"}),(0,r.jsx)(n.td,{children:"Role"}),(0,r.jsx)(n.td,{children:"Input parameter. The role of the agent."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"goal"}),(0,r.jsx)(n.td,{children:"Goal"}),(0,r.jsx)(n.td,{children:"Input parameter. The objective of the agent."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"backstory"}),(0,r.jsx)(n.td,{children:"Backstory"}),(0,r.jsx)(n.td,{children:"Input parameter. The backstory of the agent."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"tools"}),(0,r.jsx)(n.td,{children:"Tools"}),(0,r.jsx)(n.td,{children:"Input parameter. The tools at the agent's disposal."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"llm"}),(0,r.jsx)(n.td,{children:"Language Model"}),(0,r.jsx)(n.td,{children:"Input parameter. The language model that runs the agent."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"memory"}),(0,r.jsx)(n.td,{children:"Memory"}),(0,r.jsx)(n.td,{children:"Input parameter. This determines whether the agent should have memory or not."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"verbose"}),(0,r.jsx)(n.td,{children:"Verbose"}),(0,r.jsx)(n.td,{children:"Input parameter. This enables verbose output."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"allow_delegation"}),(0,r.jsx)(n.td,{children:"Allow Delegation"}),(0,r.jsx)(n.td,{children:"Input parameter. This determines whether the agent is allowed to delegate tasks to other agents."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"allow_code_execution"}),(0,r.jsx)(n.td,{children:"Allow Code Execution"}),(0,r.jsx)(n.td,{children:"Input parameter. This determines whether the agent is allowed to execute code."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"agent_kwargs"}),(0,r.jsx)(n.td,{children:"Agent kwargs"}),(0,r.jsx)(n.td,{children:"Input parameter. The additional kwargs for the agent."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"task_description"}),(0,r.jsx)(n.td,{children:"Task Description"}),(0,r.jsx)(n.td,{children:"Input parameter. The descriptive text detailing the task's purpose and execution."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"expected_output"}),(0,r.jsx)(n.td,{children:"Expected Task Output"}),(0,r.jsx)(n.td,{children:"Input parameter. The clear definition of the expected task outcome."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"async_execution"}),(0,r.jsx)(n.td,{children:"Async Execution"}),(0,r.jsx)(n.td,{children:"Input parameter. Boolean flag indicating asynchronous task execution."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"previous_task"}),(0,r.jsx)(n.td,{children:"Previous Task"}),(0,r.jsx)(n.td,{children:"Input parameter. The previous task in the sequence for chaining."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"task_output"}),(0,r.jsx)(n.td,{children:"Sequential Task"}),(0,r.jsx)(n.td,{children:"Output parameter. The list of SequentialTask objects representing the created tasks."})]})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"see-also",children:"See also"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsxs)(n.a,{href:"/components-helpers#message-history",children:[(0,r.jsx)(n.strong,{children:"Message History"})," component"]})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/memory#store-chat-memory",children:"Store chat memory"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/bundles-langchain#legacy-langchain-components",children:"Legacy LangChain components"})}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}}}]); \ No newline at end of file diff --git a/assets/js/8a484c94.f3f3c257.js b/assets/js/8a484c94.f3f3c257.js new file mode 100644 index 0000000000..988f884032 --- /dev/null +++ b/assets/js/8a484c94.f3f3c257.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[8750],{25194:(e,n,t)=>{t.d(n,{Ay:()=>a,RM:()=>o});var s=t(74848),r=t(28453);const o=[];function i(e){const n={code:"code",em:"em",p:"p",...(0,r.R)(),...e.components},{Details:t}=n;return t||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)(t,{children:[(0,s.jsx)("summary",{children:"How do agents work?"}),(0,s.jsxs)(n.p,{children:["Agents extend Large Language Models (LLMs) by integrating ",(0,s.jsx)(n.em,{children:"tools"}),", which are functions that provide additional context and enable autonomous task execution.\nThese integrations make agents more specialized and powerful than standalone LLMs."]}),(0,s.jsx)(n.p,{children:"Whereas an LLM might generate acceptable, inert responses to general queries and tasks, an agent can leverage the integrated context and tools to provide more relevant responses and even take action.\nFor example, you might create an agent that can access your company's documentation, repositories, and other resources to help your team with tasks that require knowledge of your specific products, customers, and code."}),(0,s.jsx)(n.p,{children:"Agents use LLMs as a reasoning engine to process input, determine which actions to take to address the query, and then generate a response.\nThe response could be a typical text-based LLM response, or it could involve an action, like editing a file, running a script, or calling an external API."}),(0,s.jsxs)(n.p,{children:["In an agentic context, tools are functions that the agent can run to perform tasks or access external resources.\nA function is wrapped as a ",(0,s.jsx)(n.code,{children:"Tool"})," object with a common interface that the agent understands.\nAgents become aware of tools through tool registration, which is when the agent is provided a list of available tools typically at agent initialization.\nThe ",(0,s.jsx)(n.code,{children:"Tool"})," object's description tells the agent what the tool can do so that it can decide whether the tool is appropriate for a given request."]})]})}function a(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(i,{...e})}):i(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>a});var s=t(96540);const r={},o=s.createContext(r);function i(e){const n=s.useContext(o);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),s.createElement(o.Provider,{value:n},e.children)}},81451:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>x,frontMatter:()=>a,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"Components/components-agents","title":"Agents","description":"Langflow\'s Agent and MCP Tools components are critical for building agent flows.","source":"@site/docs/Components/components-agents.mdx","sourceDirName":"Components","slug":"/components-agents","permalink":"/components-agents","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Agents","slug":"/components-agents"},"sidebar":"docs","previous":{"title":"Input / Output","permalink":"/components-io"},"next":{"title":"Language Model","permalink":"/components-models"}}');var r=t(74848),o=t(28453),i=t(25194);const a={title:"Agents",slug:"/components-agents"},l=void 0,c={},d=[...i.RM,{value:"Examples of agent flows",id:"examples-of-agent-flows",level:2},{value:"Agent component",id:"agent-component",level:2},{value:"MCP Tools component",id:"mcp-connection",level:2},{value:"Legacy Agent components",id:"legacy-agent-components",level:2},{value:"See also",id:"see-also",level:2}];function h(e){const n={a:"a",code:"code",h2:"h2",li:"li",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 t||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,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:["Langflow's ",(0,r.jsx)(n.strong,{children:"Agent"})," and ",(0,r.jsx)(n.strong,{children:"MCP Tools"})," components are critical for building agent flows.\nThese components define the behavior and capabilities of AI agents in your flows."]}),"\n",(0,r.jsx)(i.Ay,{}),"\n",(0,r.jsx)(n.h2,{id:"examples-of-agent-flows",children:"Examples of agent flows"}),"\n",(0,r.jsxs)(n.p,{children:["For examples of flows using the ",(0,r.jsx)(n.strong,{children:"Agent"})," and ",(0,r.jsx)(n.strong,{children:"MCP Tools"})," components, see the following:"]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/get-started-quickstart",children:"Langflow quickstart"}),": Start with the ",(0,r.jsx)(n.strong,{children:"Simple Agent"})," template, modify its tools, and then learn how to use an agent flow in an application."]}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Simple Agent"})," template creates a basic agent flow with an ",(0,r.jsx)(n.strong,{children:"Agent"})," component that can use two other Langflow components as tools.\nThe LLM specified in the ",(0,r.jsx)(n.strong,{children:"Agent"})," component's settings can use its own built-in functionality as well as the functionality provided by the connected tools when generating responses."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/agents-tools#use-an-agent-as-a-tool",children:"Use an agent as a tool"}),": Create a multi-agent flow."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/mcp-client",children:"Use Langflow as an MCP client"})," and ",(0,r.jsx)(n.a,{href:"/mcp-server",children:"Use Langflow as an MCP server"}),": Use the ",(0,r.jsx)(n.strong,{children:"Agent"})," and ",(0,r.jsx)(n.strong,{children:"MCP Tools"})," components to implement the Model Context Protocol (MCP) in your flows."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"agent-component",children:"Agent component"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Agent"})," component is the primary agent actor in your agent flows.\nThis component uses an LLM integration to respond to input, such as a chat message or file upload."]}),"\n",(0,r.jsxs)(n.p,{children:["The agent can use the tools already available in the base LLM as well as additional tools that you connect to the ",(0,r.jsx)(n.strong,{children:"Agent"})," component's ",(0,r.jsx)(n.strong,{children:"Tools"})," port.\nYou can connect any Langflow component as a tool, including other ",(0,r.jsx)(n.strong,{children:"Agent"})," components and MCP servers through the ",(0,r.jsxs)(n.a,{href:"#mcp-connection",children:[(0,r.jsx)(n.strong,{children:"MCP Tools"})," component"]}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["For more information about using this component, see ",(0,r.jsx)(n.a,{href:"/agents",children:"Use Langflow agents"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"mcp-connection",children:"MCP Tools component"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"MCP Tools"})," component connects to a Model Context Protocol (MCP) server and exposes the MCP server's functions as tools for Langflow agents to use to respond to input."]}),"\n",(0,r.jsxs)(n.p,{children:["In addition to publicly available MCP servers and your own custom-built MCP servers, you can connect Langflow MCP servers, which allow your agent to use your Langflow flows as tools.\nTo do this, use the ",(0,r.jsx)(n.strong,{children:"MCP Tools"})," component's ",(0,r.jsx)(n.a,{href:"/mcp-client#mcp-sse-mode",children:"SSE mode"})," to connect to your Langflow project's MCP server at the ",(0,r.jsx)(n.code,{children:"/api/v1/mcp/sse"})," endpoint."]}),"\n",(0,r.jsxs)(n.p,{children:["For more information, see ",(0,r.jsx)(n.a,{href:"/mcp-client",children:"Use Langflow as an MCP client"})," and ",(0,r.jsx)(n.a,{href:"/mcp-server",children:"Use Langflow as an MCP server"}),"."]}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"Earlier versions of the MCP Tools component"}),(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["In Langflow version 1.5, the ",(0,r.jsx)(n.strong,{children:"MCP Connection"})," component was renamed to the ",(0,r.jsx)(n.strong,{children:"MCP Tools"})," component."]}),"\n",(0,r.jsxs)(n.li,{children:["In Langflow version 1.3, the ",(0,r.jsx)(n.strong,{children:"MCP Tools (stdio)"})," and ",(0,r.jsx)(n.strong,{children:"MCP Tools (SSE)"})," components were removed and replaced by the unified ",(0,r.jsx)(n.strong,{children:"MCP Connection"})," component, which was later renamed to ",(0,r.jsx)(n.strong,{children:"MCP Tools"}),"."]}),"\n"]})]}),"\n",(0,r.jsx)(n.h2,{id:"legacy-agent-components",children:"Legacy Agent components"}),"\n",(0,r.jsx)(n.p,{children:"The following components are legacy components.\nYou can still use these components in your flows, but they are no longer maintained and they can be removed in future releases."}),"\n",(0,r.jsxs)(n.p,{children:["Replace these components with the ",(0,r.jsx)(n.strong,{children:"Agent"})," component or other Langflow components, depending on your use case."]}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.strong,{children:"CrewAI Hierarchical Task"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.strong,{children:"CrewAI Sequential Task"})}),"\n"]}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"CrewAI Agent"}),(0,r.jsxs)(n.p,{children:["This component represents CrewAI agents, allowing for the creation of specialized AI agents with defined roles goals and capabilities within a crew.\nFor more information, see the ",(0,r.jsx)(n.a,{href:"https://docs.crewai.com/core-concepts/Agents/",children:"CrewAI agents documentation"}),"."]}),(0,r.jsx)(n.p,{children:"This component accepts the following parameters:"}),(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:"role"}),(0,r.jsx)(n.td,{children:"Role"}),(0,r.jsx)(n.td,{children:"Input parameter. The role of the agent."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"goal"}),(0,r.jsx)(n.td,{children:"Goal"}),(0,r.jsx)(n.td,{children:"Input parameter. The objective of the agent."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"backstory"}),(0,r.jsx)(n.td,{children:"Backstory"}),(0,r.jsx)(n.td,{children:"Input parameter. The backstory of the agent."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"tools"}),(0,r.jsx)(n.td,{children:"Tools"}),(0,r.jsx)(n.td,{children:"Input parameter. The tools at the agent's disposal."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"llm"}),(0,r.jsx)(n.td,{children:"Language Model"}),(0,r.jsx)(n.td,{children:"Input parameter. The language model that runs the agent."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"memory"}),(0,r.jsx)(n.td,{children:"Memory"}),(0,r.jsx)(n.td,{children:"Input parameter. This determines whether the agent should have memory or not."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"verbose"}),(0,r.jsx)(n.td,{children:"Verbose"}),(0,r.jsx)(n.td,{children:"Input parameter. This enables verbose output."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"allow_delegation"}),(0,r.jsx)(n.td,{children:"Allow Delegation"}),(0,r.jsx)(n.td,{children:"Input parameter. This determines whether the agent is allowed to delegate tasks to other agents."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"allow_code_execution"}),(0,r.jsx)(n.td,{children:"Allow Code Execution"}),(0,r.jsx)(n.td,{children:"Input parameter. This determines whether the agent is allowed to execute code."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"kwargs"}),(0,r.jsx)(n.td,{children:"kwargs"}),(0,r.jsx)(n.td,{children:"Input parameter. Additional keyword arguments for the agent."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"output"}),(0,r.jsx)(n.td,{children:"Agent"}),(0,r.jsx)(n.td,{children:"Output parameter. The constructed CrewAI Agent object."})]})]})]})]}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"CrewAI Hierarchical Crew"}),(0,r.jsxs)(n.p,{children:["This component represents a group of agents managing how they should collaborate and the tasks they should perform in a hierarchical structure. This component allows for the creation of a crew with a manager overseeing the task execution.\nFor more information, see the ",(0,r.jsx)(n.a,{href:"https://docs.crewai.com/how-to/Hierarchical/",children:"CrewAI hierarchical crew documentation"}),"."]}),(0,r.jsx)(n.p,{children:"It accepts the following parameters:"}),(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:"agents"}),(0,r.jsx)(n.td,{children:"Agents"}),(0,r.jsx)(n.td,{children:"Input parameter. The list of Agent objects representing the crew members."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"tasks"}),(0,r.jsx)(n.td,{children:"Tasks"}),(0,r.jsx)(n.td,{children:"Input parameter. The list of HierarchicalTask objects representing the tasks to be executed."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"manager_llm"}),(0,r.jsx)(n.td,{children:"Manager LLM"}),(0,r.jsx)(n.td,{children:"Input parameter. The language model for the manager agent."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"manager_agent"}),(0,r.jsx)(n.td,{children:"Manager Agent"}),(0,r.jsx)(n.td,{children:"Input parameter. The specific agent to act as the manager."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"verbose"}),(0,r.jsx)(n.td,{children:"Verbose"}),(0,r.jsx)(n.td,{children:"Input parameter. This enables verbose output for detailed logging."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"memory"}),(0,r.jsx)(n.td,{children:"Memory"}),(0,r.jsx)(n.td,{children:"Input parameter. The memory configuration for the crew."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"use_cache"}),(0,r.jsx)(n.td,{children:"Use Cache"}),(0,r.jsx)(n.td,{children:"Input parameter. This enables caching of results."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"max_rpm"}),(0,r.jsx)(n.td,{children:"Max RPM"}),(0,r.jsx)(n.td,{children:"Input parameter. This sets the maximum requests per minute."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"share_crew"}),(0,r.jsx)(n.td,{children:"Share Crew"}),(0,r.jsx)(n.td,{children:"Input parameter. This determines if the crew information is shared among agents."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"function_calling_llm"}),(0,r.jsx)(n.td,{children:"Function Calling LLM"}),(0,r.jsx)(n.td,{children:"Input parameter. The language model for function calling."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"crew"}),(0,r.jsx)(n.td,{children:"Crew"}),(0,r.jsx)(n.td,{children:"Output parameter. The constructed Crew object with hierarchical task execution."})]})]})]})]}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"CrewAI Sequential Crew"}),(0,r.jsxs)(n.p,{children:["This component represents a group of agents with tasks that are executed sequentially. This component allows for the creation of a crew that performs tasks in a specific order.\nFor more information, see the ",(0,r.jsx)(n.a,{href:"https://docs.crewai.com/how-to/Sequential/",children:"CrewAI sequential crew documentation"}),"."]}),(0,r.jsx)(n.p,{children:"It accepts the following parameters:"}),(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:"tasks"}),(0,r.jsx)(n.td,{children:"Tasks"}),(0,r.jsx)(n.td,{children:"Input parameter. The list of SequentialTask objects representing the tasks to be executed."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"verbose"}),(0,r.jsx)(n.td,{children:"Verbose"}),(0,r.jsx)(n.td,{children:"Input parameter. This enables verbose output for detailed logging."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"memory"}),(0,r.jsx)(n.td,{children:"Memory"}),(0,r.jsx)(n.td,{children:"Input parameter. The memory configuration for the crew."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"use_cache"}),(0,r.jsx)(n.td,{children:"Use Cache"}),(0,r.jsx)(n.td,{children:"Input parameter. This enables caching of results."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"max_rpm"}),(0,r.jsx)(n.td,{children:"Max RPM"}),(0,r.jsx)(n.td,{children:"Input parameter. This sets the maximum requests per minute."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"share_crew"}),(0,r.jsx)(n.td,{children:"Share Crew"}),(0,r.jsx)(n.td,{children:"Input parameter. This determines if the crew information is shared among agents."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"function_calling_llm"}),(0,r.jsx)(n.td,{children:"Function Calling LLM"}),(0,r.jsx)(n.td,{children:"Input parameter. The language model for function calling."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"crew"}),(0,r.jsx)(n.td,{children:"Crew"}),(0,r.jsx)(n.td,{children:"Output parameter. The constructed Crew object with sequential task execution."})]})]})]})]}),"\n",(0,r.jsxs)(t,{children:[(0,r.jsx)("summary",{children:"CrewAI Sequential Task Agent"}),(0,r.jsxs)(n.p,{children:["This component creates a CrewAI Task and its associated agent allowing for the definition of sequential tasks with specific agent roles and capabilities.\nFor more information, see the ",(0,r.jsx)(n.a,{href:"https://docs.crewai.com/how-to/Sequential/",children:"CrewAI sequential agents documentation"}),"."]}),(0,r.jsx)(n.p,{children:"It accepts the following parameters:"}),(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:"role"}),(0,r.jsx)(n.td,{children:"Role"}),(0,r.jsx)(n.td,{children:"Input parameter. The role of the agent."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"goal"}),(0,r.jsx)(n.td,{children:"Goal"}),(0,r.jsx)(n.td,{children:"Input parameter. The objective of the agent."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"backstory"}),(0,r.jsx)(n.td,{children:"Backstory"}),(0,r.jsx)(n.td,{children:"Input parameter. The backstory of the agent."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"tools"}),(0,r.jsx)(n.td,{children:"Tools"}),(0,r.jsx)(n.td,{children:"Input parameter. The tools at the agent's disposal."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"llm"}),(0,r.jsx)(n.td,{children:"Language Model"}),(0,r.jsx)(n.td,{children:"Input parameter. The language model that runs the agent."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"memory"}),(0,r.jsx)(n.td,{children:"Memory"}),(0,r.jsx)(n.td,{children:"Input parameter. This determines whether the agent should have memory or not."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"verbose"}),(0,r.jsx)(n.td,{children:"Verbose"}),(0,r.jsx)(n.td,{children:"Input parameter. This enables verbose output."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"allow_delegation"}),(0,r.jsx)(n.td,{children:"Allow Delegation"}),(0,r.jsx)(n.td,{children:"Input parameter. This determines whether the agent is allowed to delegate tasks to other agents."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"allow_code_execution"}),(0,r.jsx)(n.td,{children:"Allow Code Execution"}),(0,r.jsx)(n.td,{children:"Input parameter. This determines whether the agent is allowed to execute code."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"agent_kwargs"}),(0,r.jsx)(n.td,{children:"Agent kwargs"}),(0,r.jsx)(n.td,{children:"Input parameter. The additional kwargs for the agent."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"task_description"}),(0,r.jsx)(n.td,{children:"Task Description"}),(0,r.jsx)(n.td,{children:"Input parameter. The descriptive text detailing the task's purpose and execution."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"expected_output"}),(0,r.jsx)(n.td,{children:"Expected Task Output"}),(0,r.jsx)(n.td,{children:"Input parameter. The clear definition of the expected task outcome."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"async_execution"}),(0,r.jsx)(n.td,{children:"Async Execution"}),(0,r.jsx)(n.td,{children:"Input parameter. Boolean flag indicating asynchronous task execution."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"previous_task"}),(0,r.jsx)(n.td,{children:"Previous Task"}),(0,r.jsx)(n.td,{children:"Input parameter. The previous task in the sequence for chaining."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"task_output"}),(0,r.jsx)(n.td,{children:"Sequential Task"}),(0,r.jsx)(n.td,{children:"Output parameter. The list of SequentialTask objects representing the created tasks."})]})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"see-also",children:"See also"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsxs)(n.a,{href:"/components-helpers#message-history",children:[(0,r.jsx)(n.strong,{children:"Message History"})," component"]})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/memory#store-chat-memory",children:"Store chat memory"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/bundles-langchain#legacy-langchain-components",children:"Legacy LangChain components"})}),"\n"]})]})}function x(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}}}]); \ No newline at end of file diff --git a/assets/js/8bd4a540.1111abcf.js b/assets/js/8bd4a540.12907f81.js similarity index 99% rename from assets/js/8bd4a540.1111abcf.js rename to assets/js/8bd4a540.12907f81.js index c9c99a5609..724d5fa123 100644 --- a/assets/js/8bd4a540.1111abcf.js +++ b/assets/js/8bd4a540.12907f81.js @@ -1 +1 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[2307],{7685:(e,r,t)=>{t.d(r,{A:()=>n});const n=t.p+"assets/images/vector-store-document-ingestion-6157311fb4d16e7f944d55254f0cc0e2.png"},11470:(e,r,t)=>{t.d(r,{A:()=>I});var n=t(96540),s=t(18215),i=t(23104),d=t(56347),a=t(205),c=t(57485),o=t(31682),l=t(70679);function h(e){return n.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:r}=e;return!!r&&"object"==typeof r&&"value"in r}(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 x(e){const{values:r,children:t}=e;return(0,n.useMemo)(()=>{const e=r??function(e){return h(e).map(({props:{value:e,label:r,attributes:t,default:n}})=>({value:e,label:r,attributes:t,default:n}))}(t);return function(e){const r=(0,o.XI)(e,(e,r)=>e.value===r.value);if(r.length>0)throw new Error(`Docusaurus error: Duplicate values "${r.map(e=>e.value).join(", ")}" found in . Every value needs to be unique.`)}(e),e},[r,t])}function j({value:e,tabValues:r}){return r.some(r=>r.value===e)}function p({queryString:e=!1,groupId:r}){const t=(0,d.W6)(),s=function({queryString:e=!1,groupId:r}){if("string"==typeof e)return e;if(!1===e)return null;if(!0===e&&!r)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 r??null}({queryString:e,groupId:r});return[(0,c.aZ)(s),(0,n.useCallback)(e=>{if(!s)return;const r=new URLSearchParams(t.location.search);r.set(s,e),t.replace({...t.location,search:r.toString()})},[s,t])]}function u(e){const{defaultValue:r,queryString:t=!1,groupId:s}=e,i=x(e),[d,c]=(0,n.useState)(()=>function({defaultValue:e,tabValues:r}){if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(e){if(!j({value:e,tabValues:r}))throw new Error(`Docusaurus error: The has a defaultValue "${e}" but none of its children has the corresponding value. Available values are: ${r.map(e=>e.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return e}const t=r.find(e=>e.default)??r[0];if(!t)throw new Error("Unexpected error: 0 tabValues");return t.value}({defaultValue:r,tabValues:i})),[o,h]=p({queryString:t,groupId:s}),[u,m]=function({groupId:e}){const r=function(e){return e?`docusaurus.tab.${e}`:null}(e),[t,s]=(0,l.Dv)(r);return[t,(0,n.useCallback)(e=>{r&&s.set(e)},[r,s])]}({groupId:s}),g=(()=>{const e=o??u;return j({value:e,tabValues:i})?e:null})();(0,a.A)(()=>{g&&c(g)},[g]);return{selectedValue:d,selectValue:(0,n.useCallback)(e=>{if(!j({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);c(e),h(e),m(e)},[h,m,i]),tabValues:i}}var m=t(92303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var f=t(74848);function b({className:e,block:r,selectedValue:t,selectValue:n,tabValues:d}){const a=[],{blockElementScrollPositionUntilNextRender:c}=(0,i.a_)(),o=e=>{const r=e.currentTarget,s=a.indexOf(r),i=d[s].value;i!==t&&(c(r),n(i))},l=e=>{let r=null;switch(e.key){case"Enter":o(e);break;case"ArrowRight":{const t=a.indexOf(e.currentTarget)+1;r=a[t]??a[0];break}case"ArrowLeft":{const t=a.indexOf(e.currentTarget)-1;r=a[t]??a[a.length-1];break}}r?.focus()};return(0,f.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":r},e),children:d.map(({value:e,label:r,attributes:n})=>(0,f.jsx)("li",{role:"tab",tabIndex:t===e?0:-1,"aria-selected":t===e,ref:e=>{a.push(e)},onKeyDown:l,onClick:o,...n,className:(0,s.A)("tabs__item",g.tabItem,n?.className,{"tabs__item--active":t===e}),children:r??e},e))})}function y({lazy:e,children:r,selectedValue:t}){const i=(Array.isArray(r)?r:[r]).filter(Boolean);if(e){const e=i.find(e=>e.props.value===t);return e?(0,n.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,r)=>(0,n.cloneElement)(e,{key:r,hidden:e.props.value!==t}))})}function v(e){const r=u(e);return(0,f.jsxs)("div",{className:(0,s.A)("tabs-container",g.tabList),children:[(0,f.jsx)(b,{...r,...e}),(0,f.jsx)(y,{...r,...e})]})}function I(e){const r=(0,m.A)();return(0,f.jsx)(v,{...e,children:h(e.children)},String(r))}},17343:(e,r,t)=>{t.r(r),t.d(r,{CH:()=>j,assets:()=>x,chCodeConfig:()=>p,contentTitle:()=>h,default:()=>g,frontMatter:()=>l,metadata:()=>n,toc:()=>u});const n=JSON.parse('{"id":"Components/components-vector-stores","title":"Vector Stores","description":"Langflow\'s Vector Store components are used to read and write vector data, including embedding storage, vector search, Graph RAG traversals, and specialized provider-specific search, such as OpenSearch, Elasticsearch, and Vectara.","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":"Data","permalink":"/components-data"},"next":{"title":"Processing components","permalink":"/components-processing"}}');var s=t(74848),i=t(28453),d=t(24754),a=t(17886),c=t(11470),o=t(19365);const l={title:"Vector Stores",slug:"/components-vector-stores"},h=void 0,x={},j={annotations:d.hk,Code:d.Cy},p={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},u=[{value:"Use Vector Store components in a flow",id:"use-vector-store-components-in-a-flow",level:2},{value:"Hidden parameters",id:"hidden-parameters",level:3},{value:"Search results output",id:"search-results-output",level:3},{value:"Vector store instances",id:"vector-store-instances",level:3},{value:"Apache Cassandra",id:"apache-cassandra",level:2},{value:"Cassandra",id:"cassandra",level:3},{value:"Cassandra Graph",id:"cassandra-graph",level:3},{value:"Chroma",id:"chroma",level:2},{value:"Chroma DB",id:"chroma-db",level:3},{value:"Local DB",id:"local-db",level:3},{value:"Clickhouse",id:"clickhouse",level:2},{value:"Couchbase",id:"couchbase",level:2},{value:"DataStax",id:"datastax",level:2},{value:"Astra DB",id:"astra-db",level:3},{value:"Astra DB Graph",id:"astra-db-graph",level:3},{value:"Graph RAG",id:"graph-rag",level:3},{value:"Hyper-Converged Database (HCD)",id:"hyper-converged-database-hcd",level:3},{value:"Elasticsearch",id:"elasticsearch",level:2},{value:"FAISS",id:"faiss",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 Platform",id:"vectara-platform",level:2},{value:"Vectara",id:"vectara",level:3},{value:"Vectara RAG",id:"vectara-rag",level:3},{value:"Weaviate",id:"weaviate",level:2}];function m(e){const r={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,i.R)(),...e.components},{Details:n}=r;return j||f("CH",!1),j.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)(r.p,{children:["Langflow's ",(0,s.jsx)(r.strong,{children:"Vector Store"})," components are used to read and write vector data, including embedding storage, vector search, Graph RAG traversals, and specialized provider-specific search, such as OpenSearch, Elasticsearch, and Vectara."]}),"\n",(0,s.jsx)(r.p,{children:"These components are critical for vector search applications, such as Retrieval Augmented Generation (RAG) chatbots that need to retrieve relevant context from large datasets."}),"\n",(0,s.jsxs)(r.p,{children:["Most of these components connect to a specific vector database provider, but some components support multiple providers or platforms.\nFor example, the ",(0,s.jsx)(r.strong,{children:"Cassandra"})," vector store component can connect to self-managed Apache Cassandra-based clusters as well as Astra DB, which is a managed Cassandra DBaaS."]}),"\n",(0,s.jsxs)(r.p,{children:["Other types of storage, like traditional structured databases and chat memory, are handled through other components like the ",(0,s.jsxs)(r.a,{href:"/components-data#sql-database",children:[(0,s.jsx)(r.strong,{children:"SQL Database"})," component"]})," or the ",(0,s.jsxs)(r.a,{href:"/components-helpers#message-history",children:[(0,s.jsx)(r.strong,{children:"Message History"})," component"]}),"."]}),"\n",(0,s.jsx)(r.h2,{id:"use-vector-store-components-in-a-flow",children:"Use Vector Store components in a flow"}),"\n",(0,s.jsx)(r.admonition,{type:"tip",children:(0,s.jsxs)(r.p,{children:["For a tutorial using ",(0,s.jsx)(r.strong,{children:"Vector Store"})," components in a flow, see ",(0,s.jsx)(r.a,{href:"/chat-with-rag",children:"Create a vector RAG chatbot"}),"."]})}),"\n",(0,s.jsxs)(r.p,{children:["The following steps introduce the use of ",(0,s.jsx)(r.strong,{children:"Vector Store"})," components in a flow, including configuration details, how the components work when you run a flow, why you might need multiple ",(0,s.jsx)(r.strong,{children:"Vector Store"})," components in one flow, and useful supporting components, such as ",(0,s.jsx)(r.strong,{children:"Embedding Model"})," and ",(0,s.jsx)(r.strong,{children:"Parser"})," components."]}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["Create a flow with the ",(0,s.jsx)(r.strong,{children:"Vector Store RAG"})," template."]}),"\n",(0,s.jsxs)(r.p,{children:["This template has two subflows.\nThe ",(0,s.jsx)(r.strong,{children:"Load Data"})," subflow loads embeddings and content into a vector database, and the ",(0,s.jsx)(r.strong,{children:"Retriever"})," subflow runs a vector search to retrieve relevant context based on a user's query."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["Configure the database connection for both ",(0,s.jsxs)(r.a,{href:"#astra-db",children:[(0,s.jsx)(r.strong,{children:"Astra DB"})," components"]}),", or replace them with another pair of ",(0,s.jsx)(r.strong,{children:"Vector Store"})," components of your choice.\nMake sure the components connect to the same vector store, and that the component in the ",(0,s.jsx)(r.strong,{children:"Retriever"})," subflow is able to run a similarity search."]}),"\n",(0,s.jsxs)(r.p,{children:["The parameters you set in each ",(0,s.jsx)(r.strong,{children:"Vector Store"})," component depend on the component's role in your flow.\nIn this example, the ",(0,s.jsx)(r.strong,{children:"Load Data"})," subflow ",(0,s.jsx)(r.em,{children:"writes"})," to the vector store, whereas the ",(0,s.jsx)(r.strong,{children:"Retriever"})," subflow ",(0,s.jsx)(r.em,{children:"reads"})," from the vector store.\nTherefore, search-related parameters are only relevant to the ",(0,s.jsx)(r.strong,{children:"Vector Search"})," component in the ",(0,s.jsx)(r.strong,{children:"Retriever"})," subflow."]}),"\n",(0,s.jsxs)(r.p,{children:["For information about specific configuration parameters, see the section of this page for your chosen ",(0,s.jsx)(r.strong,{children:"Vector Store"})," component and ",(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsx)(r.p,{children:"To configure the embedding model, do one of the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Use an OpenAI model"}),": In both ",(0,s.jsx)(r.strong,{children:"OpenAI Embeddings"})," components, enter your OpenAI API key.\nYou can use the default model or select a different OpenAI embedding model."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Use another provider"}),": Replace the ",(0,s.jsx)(r.strong,{children:"OpenAI Embeddings"})," components with another pair of ",(0,s.jsxs)(r.a,{href:"/components-embedding-models",children:[(0,s.jsx)(r.strong,{children:"Embedding Model"})," component"]})," of your choice, and then configure the parameters and credentials accordingly."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Use Astra DB vectorize"}),": If you are using an Astra DB vector store that has a vectorize integration, you can remove both ",(0,s.jsx)(r.strong,{children:"OpenAI Embeddings"})," components.\nIf you do this, the vectorize integration automatically generates embeddings from the ",(0,s.jsx)(r.strong,{children:"Ingest Data"})," (in the ",(0,s.jsx)(r.strong,{children:"Load Data"})," subflow) and ",(0,s.jsx)(r.strong,{children:"Search Query"})," (in the ",(0,s.jsx)(r.strong,{children:"Retriever"})," subflow)."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(r.admonition,{type:"tip",children:(0,s.jsxs)(r.p,{children:["If your vector store already contains embeddings, make sure your ",(0,s.jsx)(r.strong,{children:"Embedding Model"})," components use the same model as your previous embeddings.\nMixing embedding models in the same vector store can produce inaccurate search results."]})}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["Recommended: In the ",(0,s.jsxs)(r.a,{href:"/components-processing#split-text",children:[(0,s.jsx)(r.strong,{children:"Split Text"})," component"]}),", optimize the chunking settings for your embedding model.\nFor example, if your embedding model has a token limit of 512, then the ",(0,s.jsx)(r.strong,{children:"Chunk Size"})," parameter must not exceed that limit."]}),"\n",(0,s.jsxs)(r.p,{children:["Additionally, because the ",(0,s.jsx)(r.strong,{children:"Retriever"})," subflow passes the chat input directly to the ",(0,s.jsx)(r.strong,{children:"Vector Store"})," component for vector search, make sure that your chat input string doesn't exceed your embedding model's limits.\nFor this example, you can enter a query that is within the limits; however, in a production environment, you might need to implement additional checks or preprocessing steps to ensure compliance.\nFor example, use additional components to prepare the chat input before running the vector search, or enforce chat input limits in your application code."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["In the ",(0,s.jsx)(r.strong,{children:"Language Model"})," component, enter your OpenAI API key, or select a different provider and model to use for the chat portion of the flow."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["Run the ",(0,s.jsx)(r.strong,{children:"Load Data"})," subflow to populate your vector store.\nIn the ",(0,s.jsx)(r.strong,{children:"File"})," component, select one or more files, and then click ",(0,s.jsx)(a.A,{name:"Play","aria-hidden":"True"})," ",(0,s.jsx)(r.strong,{children:"Run component"})," on the ",(0,s.jsx)(r.strong,{children:"Vector Store"})," component in the ",(0,s.jsx)(r.strong,{children:"Load Data"})," subflow."]}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Load Data"})," subflow loads files from your local machine, chunks them, generates embeddings for the chunks, and then stores the chunks and their embeddings in the vector database."]}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.img,{alt:"Embedding data into a vector store",src:t(7685).A+"",width:"4000",height:"2512"})}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Load Data"})," subflow is separate from the ",(0,s.jsx)(r.strong,{children:"Retriever"})," subflow because you probably won't run it every time you use the chat.\nYou can run the ",(0,s.jsx)(r.strong,{children:"Load Data"})," subflow as needed to preload or update the data in your vector store.\nThen, your chat interactions only use the components that are necessary for chat."]}),"\n",(0,s.jsxs)(r.p,{children:["If your vector store already contains data that you want to use for vector search, then you don't need to run the ",(0,s.jsx)(r.strong,{children:"Load Data"})," subflow."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["Open the ",(0,s.jsx)(r.strong,{children:"Playground"})," and start chatting to run the ",(0,s.jsx)(r.strong,{children:"Retriever"})," subflow."]}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Retriever"})," subflow generates an embedding from chat input, runs a vector search to retrieve similar content from your vector store, parses the search results into supplemental context for the LLM, and then uses the LLM to generate a natural language response to your query.\nThe LLM uses the vector search results along with its internal training data and tools, such as basic web search and datetime information, to produce the response."]}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.img,{alt:"Retrieval from a vector store",src:t(67719).A+"",width:"4000",height:"1324"})}),"\n",(0,s.jsxs)(r.p,{children:["To avoid passing the entire block of raw search results to the LLM, the ",(0,s.jsx)(r.strong,{children:"Parser"})," component extracts ",(0,s.jsx)(r.code,{children:"text"})," strings from the search results ",(0,s.jsx)(r.code,{children:"Data"})," object, and then passes them to the ",(0,s.jsx)(r.strong,{children:"Prompt Template"})," component in ",(0,s.jsx)(r.code,{children:"Message"})," format.\nFrom there, the strings and other template content are compiled into natural language instructions for the LLM."]}),"\n",(0,s.jsxs)(r.p,{children:["You can use other components for this transformation, such as the ",(0,s.jsx)(r.strong,{children:"Data Operations"})," component, depending on how you want to use the search results."]}),"\n",(0,s.jsxs)(r.p,{children:["To view the raw search results, click ",(0,s.jsx)(a.A,{name:"TextSearch","aria-hidden":"True"})," ",(0,s.jsx)(r.strong,{children:"Inspect output"})," on the ",(0,s.jsx)(r.strong,{children:"Vector Store"})," component after running the ",(0,s.jsx)(r.strong,{children:"Retriever"})," subflow."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(r.h3,{id:"hidden-parameters",children:"Hidden parameters"}),"\n",(0,s.jsxs)(r.p,{children:["You can inspect a ",(0,s.jsx)(r.strong,{children:"Vector Store"})," component's parameters to learn more about the inputs it accepts, the features it supports, and how to configure it."]}),"\n",(0,s.jsxs)(r.p,{children:["Many input parameters for ",(0,s.jsx)(r.strong,{children:"Vector Store"})," components are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,s.jsx)(a.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(r.strong,{children:"Controls"})," in each ",(0,s.jsx)(r.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(0,s.jsxs)(r.p,{children:["Some parameters are conditional, and they are only available after you set other parameters or select specific options for other parameters.\nConditional parameters may not be visible on the ",(0,s.jsx)(r.strong,{children:"Controls"})," pane until you set the required dependencies.\nHowever, all parameters are always listed in a ",(0,s.jsx)(r.a,{href:"/concepts-components#component-code",children:"component's code"}),"."]}),"\n",(0,s.jsx)(r.p,{children:"For information about a specific component's parameters, see the provider's documentation and the component details."}),"\n",(0,s.jsx)(r.h3,{id:"search-results-output",children:"Search results output"}),"\n",(0,s.jsxs)(r.p,{children:["If you use a ",(0,s.jsx)(r.strong,{children:"Vector Store"})," component to query your vector store, it produces search results that you can pass to downstream components in your flow as a list of ",(0,s.jsx)(r.a,{href:"/data-types#data",children:(0,s.jsx)(r.code,{children:"Data"})})," objects or a tabular ",(0,s.jsx)(r.a,{href:"/data-types#dataframe",children:(0,s.jsx)(r.code,{children:"DataFrame"})}),".\nIf both types are supported, you can set the format near the component's output port in the visual editor."]}),"\n",(0,s.jsxs)(r.p,{children:["The exception to this pattern is the ",(0,s.jsx)(r.strong,{children:"Vectara RAG"})," component, which outputs only an ",(0,s.jsx)(r.code,{children:"answer"})," string in ",(0,s.jsx)(r.a,{href:"/data-types#message",children:(0,s.jsx)(r.code,{children:"Message"})})," format."]}),"\n",(0,s.jsx)(r.h3,{id:"vector-store-instances",children:"Vector store instances"}),"\n",(0,s.jsxs)(r.p,{children:["Because Langflow is based on LangChain, ",(0,s.jsx)(r.strong,{children:"Vector Store"})," components use an instance of ",(0,s.jsx)(r.a,{href:"https://python.langchain.com/docs/integrations/vectorstores/",children:"LangChain vector store"})," to drive the underlying vector search functions.\nIn the component code, this is often instantiated as ",(0,s.jsx)(r.code,{children:"vector_store"}),", but some components use a different name, such as the provider name."]}),"\n",(0,s.jsxs)(r.p,{children:["For the ",(0,s.jsx)(r.strong,{children:"Cassandra Graph"})," and ",(0,s.jsx)(r.strong,{children:"Astra DB Graph"})," components, ",(0,s.jsx)(r.code,{children:"vector_store"})," is an instance of ",(0,s.jsx)(r.a,{href:"https://python.langchain.com/api_reference/community/graph_vectorstores.html",children:"LangChain graph vector store"}),"."]}),"\n",(0,s.jsxs)(r.p,{children:["These instances are provider-specific and configured according to the component's parameters.\nFor example, the ",(0,s.jsx)(r.strong,{children:"Redis"})," component creates an instance of ",(0,s.jsx)(r.a,{href:"https://python.langchain.com/docs/integrations/vectorstores/redis/",children:(0,s.jsx)(r.code,{children:"RedisVectorStore"})})," based on the component's parameters, such as the connection string, index name, and schema."]}),"\n",(0,s.jsx)(r.p,{children:"Some LangChain classes don't expose all possible options as component parameters.\nDepending on the provider, these options might use default values or allow modification through environment variables, if they are supported in Langflow.\nFor information about specific options, see the LangChain API reference and provider documentation."}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Vector Store Connection ports"}),(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Astra DB"})," and ",(0,s.jsx)(r.strong,{children:"OpenSearch"})," components have an additional ",(0,s.jsx)(r.strong,{children:"Vector Store Connection"})," output.\nThis output can only connect to a ",(0,s.jsx)(r.code,{children:"VectorStore"})," input port, and it was intended for use with dedicated Graph RAG components."]}),(0,s.jsxs)(r.p,{children:["The only non-legacy component that supports this input is the ",(0,s.jsx)(r.strong,{children:"Graph RAG"})," component, which was meant as a Graph RAG extension to the ",(0,s.jsx)(r.strong,{children:"Astra DB"})," component.\nInstead, you can use the ",(0,s.jsx)(r.strong,{children:"Astra DB Graph"})," component that includes both the vector store connection and Graph RAG functionality.\nOpenSearch instances support Graph traversal through built-in RAG functionality and plugins."]})]}),"\n",(0,s.jsx)(r.h2,{id:"apache-cassandra",children:"Apache Cassandra"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Cassandra"})," and ",(0,s.jsx)(r.strong,{children:"Cassandra Graph"})," components can be used with Cassandra clusters that support vector search, including Astra DB."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://cassandra.apache.org/doc/latest/cassandra/vector-search/overview.html",children:"Vector search in Cassandra"})}),"\n"]}),"\n",(0,s.jsx)(r.h3,{id:"cassandra",children:"Cassandra"}),"\n",(0,s.jsxs)(r.p,{children:["Use the ",(0,s.jsx)(r.strong,{children:"Cassandra"})," component to read or write to a Cassandra vector store using a ",(0,s.jsx)(r.code,{children:"CassandraVectorStore"})," instance."]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Cassandra parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"database_ref"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Contact points for the database or an Astra database ID."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"username"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Username for the database. Leave empty for Astra DB."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"token"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. User password for the database or an Astra application token."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"keyspace"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsxs)(r.td,{children:["Input parameter. The name of the keyspace containing the vector store specified in ",(0,s.jsx)(r.strong,{children:"Table Name"})," (",(0,s.jsx)(r.code,{children:"table_name"}),")."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"table_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The name of the table or collection that is the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ttl_seconds"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. Time-to-live for added texts, if supported by the cluster. Only relevant for writes."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"batch_size"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. Amount of records to process in a single batch."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"setup_mode"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Configuration mode for setting up a Cassandra table."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"cluster_kwargs"}),(0,s.jsx)(r.td,{children:"Dict"}),(0,s.jsx)(r.td,{children:"Input parameter. Additional keyword arguments for a Cassandra cluster."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_query"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Query string for similarity search. Only relevant for reads."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Data"}),(0,s.jsx)(r.td,{children:"Input parameter. Data to be loaded into the vector store as raw chunks and embeddings. Only relevant for writes."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. Embedding function to use."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. Number of results to return in search. Only relevant for reads."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_type"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Type of search to perform. Only relevant for reads."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_score_threshold"}),(0,s.jsx)(r.td,{children:"Float"}),(0,s.jsx)(r.td,{children:"Input parameter. Minimum similarity score for search results. Only relevant for reads."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_filter"}),(0,s.jsx)(r.td,{children:"Dict"}),(0,s.jsx)(r.td,{children:"Input parameter. An optional dictionary of metadata search filters to apply in addition to vector search. Only relevant for reads."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"body_search"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Document textual search terms. Only relevant for reads."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"enable_body_search"}),(0,s.jsx)(r.td,{children:"Boolean"}),(0,s.jsx)(r.td,{children:"Input parameter. Flag to enable body search. Only relevant for reads."})]})]})]})]}),"\n",(0,s.jsx)(r.h3,{id:"cassandra-graph",children:"Cassandra Graph"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Cassandra Graph"})," component uses a ",(0,s.jsx)(r.code,{children:"CassandraGraphVectorStore"})," instance for graph traversal and graph-based document retrieval in a compatible Cassandra cluster.\nIt also supports writing to the vector store."]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Cassandra Graph parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Display Name"}),(0,s.jsx)(r.th,{children:"Info"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"database_ref"}),(0,s.jsx)(r.td,{children:"Contact Points / Astra Database ID"}),(0,s.jsx)(r.td,{children:"Input parameter. The contact points for the database or an Astra database ID. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"username"}),(0,s.jsx)(r.td,{children:"Username"}),(0,s.jsx)(r.td,{children:"Input parameter. The username for the database. Leave empty for Astra DB."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"token"}),(0,s.jsx)(r.td,{children:"Password / Astra DB Token"}),(0,s.jsx)(r.td,{children:"Input parameter. The user password for the database or an Astra application token. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"keyspace"}),(0,s.jsx)(r.td,{children:"Keyspace"}),(0,s.jsxs)(r.td,{children:["Input parameter. The name of the keyspace containing the vector store specified in ",(0,s.jsx)(r.strong,{children:"Table Name"})," (",(0,s.jsx)(r.code,{children:"table_name"}),"). Required."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"table_name"}),(0,s.jsx)(r.td,{children:"Table Name"}),(0,s.jsx)(r.td,{children:"Input parameter. The name of the table or collection that is the vector store. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"setup_mode"}),(0,s.jsx)(r.td,{children:"Setup Mode"}),(0,s.jsxs)(r.td,{children:["Input parameter. The configuration mode for setting up the Cassandra table. The options are ",(0,s.jsx)(r.code,{children:"Sync"})," (default) or ",(0,s.jsx)(r.code,{children:"Off"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"cluster_kwargs"}),(0,s.jsx)(r.td,{children:"Cluster arguments"}),(0,s.jsx)(r.td,{children:"Input parameter. An optional dictionary of additional keyword arguments for the Cassandra cluster."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_query"}),(0,s.jsx)(r.td,{children:"Search Query"}),(0,s.jsx)(r.td,{children:"Input parameter. The query string for similarity search. Only relevant for reads."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Ingest Data"}),(0,s.jsx)(r.td,{children:"Input parameter. Data to be loaded into the vector store as raw chunks and embeddings. Only relevant for writes."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embedding"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding model to use."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Number of Results"}),(0,s.jsx)(r.td,{children:"Input parameter. The number of results to return in similarity search. Only relevant for reads. Default: 4."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_type"}),(0,s.jsx)(r.td,{children:"Search Type"}),(0,s.jsxs)(r.td,{children:["Input parameter. The search type to use. The options are ",(0,s.jsx)(r.code,{children:"Traversal"})," (default), ",(0,s.jsx)(r.code,{children:"MMR Traversal"}),", ",(0,s.jsx)(r.code,{children:"Similarity"}),", ",(0,s.jsx)(r.code,{children:"Similarity with score threshold"}),", or ",(0,s.jsx)(r.code,{children:"MMR (Max Marginal Relevance)"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"depth"}),(0,s.jsx)(r.td,{children:"Depth of traversal"}),(0,s.jsxs)(r.td,{children:["Input parameter. The maximum depth of edges to traverse. Only relevant if ",(0,s.jsx)(r.strong,{children:"Search Type"})," (",(0,s.jsx)(r.code,{children:"search_type"}),") is ",(0,s.jsx)(r.code,{children:"Traversal"})," or ",(0,s.jsx)(r.code,{children:"MMR Traversal"}),". Default: 1."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_score_threshold"}),(0,s.jsx)(r.td,{children:"Search Score Threshold"}),(0,s.jsxs)(r.td,{children:["Input parameter. The minimum similarity score threshold for search results. Only relevant for reads using the ",(0,s.jsx)(r.code,{children:"Similarity with score threshold"})," search type."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_filter"}),(0,s.jsx)(r.td,{children:"Search Metadata Filter"}),(0,s.jsx)(r.td,{children:"Input parameter. An optional dictionary of metadata search filters to apply in addition to graph traversal and similarity search."})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"chroma",children:"Chroma"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Chroma DB"})," and ",(0,s.jsx)(r.strong,{children:"Local DB"})," components read and write to Chroma vector stores using an instance of ",(0,s.jsx)(r.code,{children:"Chroma"})," vector store.\nIncludes support for remote or in-memory instances with or without persistence."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://docs.trychroma.com/",children:"Chroma documentation"})}),"\n"]}),"\n",(0,s.jsx)(r.h3,{id:"chroma-db",children:"Chroma DB"}),"\n",(0,s.jsxs)(r.p,{children:["You can use the ",(0,s.jsx)(r.strong,{children:"Chroma DB"})," component to read and write to a Chroma database in local storage or a remote Chroma server with options for persistence and caching.\nWhen writing, the component can create a new database or collection at the specified location."]}),"\n",(0,s.jsx)(r.admonition,{type:"tip",children:(0,s.jsx)(r.p,{children:"An ephemeral (non-persistent) local Chroma vector store is helpful for testing vector search flows where you don't need to retain the database."})}),"\n",(0,s.jsxs)(r.p,{children:["The following example flow uses one ",(0,s.jsx)(r.strong,{children:"Chroma DB"})," component for both reads and writes:"]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["When writing, it splits ",(0,s.jsx)(r.code,{children:"Data"})," from a ",(0,s.jsxs)(r.a,{href:"/components-data#url",children:[(0,s.jsx)(r.strong,{children:"URL"})," component"]})," into chunks, computes embeddings with attached ",(0,s.jsx)(r.strong,{children:"Embedding Model"})," component, and then loads the chunks and embeddings into the Chroma vector store.\nTo trigger writes, click ",(0,s.jsx)(a.A,{name:"Play","aria-hidden":"true"})," ",(0,s.jsx)(r.strong,{children:"Run component"})," on the ",(0,s.jsx)(r.strong,{children:"Chroma DB"})," component."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["When reading, it uses chat input to perform a similarity search on the vector store, and then print the search results to the chat.\nTo trigger reads, open the ",(0,s.jsx)(r.strong,{children:"Playground"})," and enter a chat message."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.p,{children:["After running the flow once, you can click ",(0,s.jsx)(a.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,s.jsx)(r.strong,{children:"Inspect Output"})," on each component to understand how the data transformed as it passed from component to component."]}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.img,{alt:"ChromaDB receiving split text",src:t(88690).A+"",width:"4000",height:"2694"})}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Chroma DB parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Collection Name"})," (",(0,s.jsx)(r.code,{children:"collection_name"}),")"]}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsxs)(r.td,{children:["Input parameter. The name of your Chroma vector store collection. Default: ",(0,s.jsx)(r.code,{children:"langflow"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Persist Directory"})," (",(0,s.jsx)(r.code,{children:"persist_directory"}),")"]}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsxs)(r.td,{children:["Input parameter. To persist the Chroma database, enter a relative or absolute path to a directory to store the ",(0,s.jsx)(r.code,{children:"chroma.sqlite3"})," file. Leave empty for an ephemeral database. When reading or writing to an existing persistent database, specify the path to the persistent directory."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Ingest Data"})," (",(0,s.jsx)(r.code,{children:"ingest_data"}),")"]}),(0,s.jsx)(r.td,{children:"Data or DataFrame"}),(0,s.jsxs)(r.td,{children:["Input parameter. ",(0,s.jsx)(r.code,{children:"Data"})," or ",(0,s.jsx)(r.code,{children:"DataFrame"})," input containing the records to write to the vector store. Only relevant for writes."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Search Query"})," (",(0,s.jsx)(r.code,{children:"search_query"}),")"]}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The query to use for vector search. Only relevant for reads."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Cache Vector Store"})," (",(0,s.jsx)(r.code,{children:"cache_vector_store"}),")"]}),(0,s.jsx)(r.td,{children:"Boolean"}),(0,s.jsx)(r.td,{children:"Input parameter. If true, the component caches the vector store in memory for faster reads. Default: Enabled (true)."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Embedding"})," (",(0,s.jsx)(r.code,{children:"embedding"}),")"]}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsxs)(r.td,{children:["Input parameter. The embedding function to use for the vector store. By default, Chroma DB uses its built-in embeddings model, or you can attach an ",(0,s.jsx)(r.strong,{children:"Embedding Model"})," component to use a different provider or model."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"CORS Allow Origins"})," (",(0,s.jsx)(r.code,{children:"chroma_server_cors_allow_origins"}),")"]}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The CORS allow origins for the Chroma server."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Chroma Server Host"})," (",(0,s.jsx)(r.code,{children:"chroma_server_host"}),")"]}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The host for the Chroma server."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Chroma Server HTTP Port"})," (",(0,s.jsx)(r.code,{children:"chroma_server_http_port"}),")"]}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. The HTTP port for the Chroma server."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Chroma Server gRPC Port"})," (",(0,s.jsx)(r.code,{children:"chroma_server_grpc_port"}),")"]}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. The gRPC port for the Chroma server."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Chroma Server SSL Enabled"})," (",(0,s.jsx)(r.code,{children:"chroma_server_ssl_enabled"}),")"]}),(0,s.jsx)(r.td,{children:"Boolean"}),(0,s.jsx)(r.td,{children:"Input parameter. Enable SSL for the Chroma server."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Allow Duplicates"})," (",(0,s.jsx)(r.code,{children:"allow_duplicates"}),")"]}),(0,s.jsx)(r.td,{children:"Boolean"}),(0,s.jsxs)(r.td,{children:["Input parameter. If true (default), writes don't check for existing duplicates in the collection, allowing you to store multiple copies of the same content. If false, writes won't add documents that match existing documents already present in the collection. If false, it can strictly enforce deduplication by searching the entire collection or only search the number of records, specified in ",(0,s.jsx)(r.code,{children:"limit"}),". Only relevant for writes."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Search Type"})," (",(0,s.jsx)(r.code,{children:"search_type"}),")"]}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsxs)(r.td,{children:["Input parameter. The type of search to perform, either ",(0,s.jsx)(r.code,{children:"Similarity"})," or ",(0,s.jsx)(r.code,{children:"MMR"}),". Only relevant for reads."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Number of Results"})," (",(0,s.jsx)(r.code,{children:"number_of_results"}),")"]}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsxs)(r.td,{children:["Input parameter. The number of search results to return. Default: ",(0,s.jsx)(r.code,{children:"10"}),". Only relevant for reads."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Limit"})," (",(0,s.jsx)(r.code,{children:"limit"}),")"]}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsxs)(r.td,{children:["Input parameter. Limit the number of records to compare when ",(0,s.jsx)(r.strong,{children:"Allow Duplicates"})," is false. This can help improve performance when writing to large collections, but it can result in some duplicate records. Only relevant for writes."]})]})]})]})]}),"\n",(0,s.jsx)(r.h3,{id:"local-db",children:"Local DB"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Local DB"})," component reads and writes to a persistent, in-memory Chroma DB instance intended for use with Langflow.\nIt has separate modes for reads and writes, automatic collection management, and default persistence in your Langflow cache directory."]}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.img,{alt:"A basic flow with a Local DB component in Retrieve mode.",src:t(60159).A+"",width:"4000",height:"2188"})}),"\n",(0,s.jsxs)(r.p,{children:["Set the ",(0,s.jsx)(r.strong,{children:"Mode"})," parameter to reflect the operation you want the component to perform, and the configure the other parameters accordingly.\nSome parameters are only available for one mode."]}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsxs)(o.A,{value:"ingest",label:"Ingest",children:[(0,s.jsxs)(r.p,{children:["To create or write to your local Chroma vector store, use ",(0,s.jsx)(r.strong,{children:"Ingest"})," mode."]}),(0,s.jsxs)(r.p,{children:["The following parameters are available in ",(0,s.jsx)(r.strong,{children:"Ingest"})," mode:"]}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Name Your Collection"})," (",(0,s.jsx)(r.code,{children:"collection_name"}),")"]}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsxs)(r.td,{children:["Input parameter. The name for your Chroma vector store collection. Default: ",(0,s.jsx)(r.code,{children:"langflow"}),". Only available in ",(0,s.jsx)(r.strong,{children:"Ingest"})," mode."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Persist Directory"})," (",(0,s.jsx)(r.code,{children:"persist_directory"}),")"]}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsxs)(r.td,{children:["Input parameter. The base directory where you want to create and persist the vector store. If you use the ",(0,s.jsx)(r.strong,{children:"Local DB"})," component in multiple flows or to create multiple collections, collections are stored at ",(0,s.jsx)(r.code,{children:"$PERSISTENT_DIRECTORY/vector_stores/$COLLECTION_NAME"}),". If not specified, the default location is your Langflow cache directory (",(0,s.jsx)(r.code,{children:"LANGFLOW_CONFIG_DIR"}),"). For more information, see ",(0,s.jsx)(r.a,{href:"/memory",children:"Memory management options"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Embedding"})," (",(0,s.jsx)(r.code,{children:"embedding"}),")"]}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding function to use for the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Allow Duplicates"})," (",(0,s.jsx)(r.code,{children:"allow_duplicates"}),")"]}),(0,s.jsx)(r.td,{children:"Boolean"}),(0,s.jsxs)(r.td,{children:["Input parameter. If true (default), writes don't check for existing duplicates in the collection, allowing you to store multiple copies of the same content. If false, writes won't add documents that match existing documents already present in the collection. If false, it can strictly enforce deduplication by searching the entire collection or only search the number of records, specified in ",(0,s.jsx)(r.code,{children:"limit"}),". Only available in ",(0,s.jsx)(r.strong,{children:"Ingest"})," mode."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Ingest Data"})," (",(0,s.jsx)(r.code,{children:"ingest_data"}),")"]}),(0,s.jsx)(r.td,{children:"Data or DataFrame"}),(0,s.jsxs)(r.td,{children:["Input parameter. The records to write to the collection. Records are embedded and indexed for semantic search. Only available in ",(0,s.jsx)(r.strong,{children:"Ingest"})," mode."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Limit"})," (",(0,s.jsx)(r.code,{children:"limit"}),")"]}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsxs)(r.td,{children:["Input parameter. Limit the number of records to compare when ",(0,s.jsx)(r.strong,{children:"Allow Duplicates"})," is false. This can help improve performance when writing to large collections, but it can result in some duplicate records. Only available in ",(0,s.jsx)(r.strong,{children:"Ingest"})," mode."]})]})]})]})]}),(0,s.jsxs)(o.A,{value:"retrieve",label:"Retrieve",children:[(0,s.jsxs)(r.p,{children:["To read from your local Chroma vector store, use ",(0,s.jsx)(r.strong,{children:"Retrieve"})," mode."]}),(0,s.jsxs)(r.p,{children:["The following parameters are available in ",(0,s.jsx)(r.strong,{children:"Retrieve"})," mode:"]}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Persist Directory"})," (",(0,s.jsx)(r.code,{children:"persist_directory"}),")"]}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsxs)(r.td,{children:["Input parameter. The base directory where you want to create and persist the vector store. If you use the ",(0,s.jsx)(r.strong,{children:"Local DB"})," component in multiple flows or to create multiple collections, collections are stored at ",(0,s.jsx)(r.code,{children:"$PERSISTENT_DIRECTORY/vector_stores/$COLLECTION_NAME"}),". If not specified, the default location is your Langflow cache directory (",(0,s.jsx)(r.code,{children:"LANGFLOW_CONFIG_DIR"}),"). For more information, see ",(0,s.jsx)(r.a,{href:"/memory",children:"Memory management options"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Existing Collections"})," (",(0,s.jsx)(r.code,{children:"existing_collections"}),")"]}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsxs)(r.td,{children:["Input parameter. Select a previously-created collection to search. Only available in ",(0,s.jsx)(r.strong,{children:"Retrieve"})," mode."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Embedding"})," (",(0,s.jsx)(r.code,{children:"embedding"}),")"]}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding function to use for the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Search Type"})," (",(0,s.jsx)(r.code,{children:"search_type"}),")"]}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsxs)(r.td,{children:["Input parameter. The type of search to perform, either ",(0,s.jsx)(r.code,{children:"Similarity"})," or ",(0,s.jsx)(r.code,{children:"MMR"}),". Only available in ",(0,s.jsx)(r.strong,{children:"Retrieve"})," mode."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Search Query"})," (",(0,s.jsx)(r.code,{children:"search_query"}),")"]}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsxs)(r.td,{children:["Input parameter. Enter a query for similarity search. Only available in ",(0,s.jsx)(r.strong,{children:"Retrieve"})," mode."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Number of Results"})," (",(0,s.jsx)(r.code,{children:"number_of_results"}),")"]}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsxs)(r.td,{children:["Input parameter. Number of search results to return. Default: 10. Only available in ",(0,s.jsx)(r.strong,{children:"Retrieve"})," mode."]})]})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"clickhouse",children:"Clickhouse"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Clickhouse"})," component reads and writes to a Clickhouse vector store using an instance of ",(0,s.jsx)(r.code,{children:"Clickhouse"})," vector store."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://clickhouse.com/docs/en/intro",children:"Clickhouse Documentation"})}),"\n"]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Clickhouse parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Display Name"}),(0,s.jsx)(r.th,{children:"Info"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"host"}),(0,s.jsx)(r.td,{children:"hostname"}),(0,s.jsxs)(r.td,{children:["Input parameter. The Clickhouse server hostname. Required. Default: ",(0,s.jsx)(r.code,{children:"localhost"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"port"}),(0,s.jsx)(r.td,{children:"port"}),(0,s.jsxs)(r.td,{children:["Input parameter. The Clickhouse server port. Required. Default: ",(0,s.jsx)(r.code,{children:"8123"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"database"}),(0,s.jsx)(r.td,{children:"database"}),(0,s.jsx)(r.td,{children:"Input parameter. The Clickhouse database name. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"table"}),(0,s.jsx)(r.td,{children:"Table name"}),(0,s.jsx)(r.td,{children:"Input parameter. The Clickhouse table name. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"username"}),(0,s.jsx)(r.td,{children:"Username"}),(0,s.jsx)(r.td,{children:"Input parameter. Clickhouse username for authentication. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"password"}),(0,s.jsx)(r.td,{children:"Password"}),(0,s.jsx)(r.td,{children:"Input parameter. Clickhouse password for authentication. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"index_type"}),(0,s.jsx)(r.td,{children:"index_type"}),(0,s.jsxs)(r.td,{children:["Input parameter. Type of the index, either ",(0,s.jsx)(r.code,{children:"annoy"})," (default) or ",(0,s.jsx)(r.code,{children:"vector_similarity"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"metric"}),(0,s.jsx)(r.td,{children:"metric"}),(0,s.jsxs)(r.td,{children:["Input parameter. Metric to compute distance for similarity search. The options are ",(0,s.jsx)(r.code,{children:"angular"})," (default), ",(0,s.jsx)(r.code,{children:"euclidean"}),", ",(0,s.jsx)(r.code,{children:"manhattan"}),", ",(0,s.jsx)(r.code,{children:"hamming"}),", ",(0,s.jsx)(r.code,{children:"dot"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"secure"}),(0,s.jsx)(r.td,{children:"Use HTTPS/TLS"}),(0,s.jsx)(r.td,{children:"Input parameter. If true, enables HTTPS/TLS for the Clickhouse server and overrides inferred values for interface or port arguments. Default: false."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"index_param"}),(0,s.jsx)(r.td,{children:"Param of the index"}),(0,s.jsxs)(r.td,{children:["Input parameter. Index parameters. Default: ",(0,s.jsx)(r.code,{children:"100,'L2Distance'"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"index_query_params"}),(0,s.jsx)(r.td,{children:"index query params"}),(0,s.jsx)(r.td,{children:"Input parameter. Additional index query parameters."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_query"}),(0,s.jsx)(r.td,{children:"Search Query"}),(0,s.jsx)(r.td,{children:"Input parameter. The query string for similarity search. Only relevant for reads."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Ingest Data"}),(0,s.jsx)(r.td,{children:"Input parameter. The records to load into the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"cache_vector_store"}),(0,s.jsx)(r.td,{children:"Cache Vector Store"}),(0,s.jsx)(r.td,{children:"Input parameter. If true, the component caches the vector store in memory for faster reads. Default: Enabled (true)."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embedding"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding model to use."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Number of Results"}),(0,s.jsxs)(r.td,{children:["Input parameter. The number of search results to return. Default: ",(0,s.jsx)(r.code,{children:"4"}),". Only relevant for reads."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"score_threshold"}),(0,s.jsx)(r.td,{children:"Score threshold"}),(0,s.jsx)(r.td,{children:"Input parameter. The threshold for similarity score comparison. Default: Unset (no threshold). Only relevant for reads."})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"couchbase",children:"Couchbase"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Couchbase"})," component reads and writes to a Couchbase vector store using an instance of ",(0,s.jsx)(r.code,{children:"CouchbaseSearchVectorStore"}),"."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://docs.couchbase.com/home/index.html",children:"Couchbase documentation"})}),"\n"]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Couchbase parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"couchbase_connection_string"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. Couchbase Cluster connection string. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"couchbase_username"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Couchbase username for authentication. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"couchbase_password"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. Couchbase password for authentication. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"bucket_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Name of the Couchbase bucket. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"scope_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Name of the Couchbase scope. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"collection_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Name of the Couchbase collection. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"index_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Name of the Couchbase index. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Data"}),(0,s.jsx)(r.td,{children:"Input parameter. The records to load into the vector store. Only relevant for writes."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_query"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The query string for vector search. Only relevant for reads."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"cache_vector_store"}),(0,s.jsx)(r.td,{children:"Boolean"}),(0,s.jsx)(r.td,{children:"Input parameter. If true, the component caches the vector store in memory for faster reads. Default: Enabled (true)."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding function to use for the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. Maximum number of search results to return. Default: 4. Only relevant for reads."})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"datastax",children:"DataStax"}),"\n",(0,s.jsx)(r.p,{children:"The following components support DataStax vector stores."}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/index.html",children:"Astra DB Serverless documentation"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://docs.datastax.com/en/hyper-converged-database/1.2/get-started/get-started-hcd.html",children:"Hyper-Converged Database (HCD) documentation"})}),"\n"]}),"\n",(0,s.jsx)(r.h3,{id:"astra-db",children:"Astra DB"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Astra DB"})," component read and writes to Astra DB Serverless databases, using an instance of ",(0,s.jsx)(r.code,{children:"AstraDBVectorStore"})," to call the Data API and DevOps API."]}),"\n",(0,s.jsxs)(r.admonition,{type:"important",children:[(0,s.jsxs)(r.p,{children:["It is recommend that you create any databases, keyspaces, and collections you need before configuring the ",(0,s.jsx)(r.strong,{children:"Astra DB"})," component."]}),(0,s.jsxs)(r.p,{children:["You can create new databases and collections through this component, but this is only possible in the Langflow visual editor, not at runtime, and you must wait while the database or collection initializes before proceeding with flow configuration.\nAdditionally, not all database and collection configuration options are available through the ",(0,s.jsx)(r.strong,{children:"Astra DB"})," component, such as hybrid search options, PCU groups, vectorize integration management, and multi-region deployments."]})]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Astra DB parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Display Name"}),(0,s.jsx)(r.th,{children:"Info"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"token"}),(0,s.jsx)(r.td,{children:"Astra DB Application Token"}),(0,s.jsx)(r.td,{children:"Input parameter. An Astra application token with permission to access your vector database. Once the connection is verified, additional fields are populated with your existing databases and collections. If you want to create a database through this component, the application token must have Organization Administrator permissions."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"environment"}),(0,s.jsx)(r.td,{children:"Environment"}),(0,s.jsxs)(r.td,{children:["Input parameter. The environment for the Astra DB API endpoint. Always use ",(0,s.jsx)(r.code,{children:"prod"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"database_name"}),(0,s.jsx)(r.td,{children:"Database"}),(0,s.jsxs)(r.td,{children:["Input parameter. The name of the database that you want this component to connect to. Or, you can select ",(0,s.jsx)(r.strong,{children:"New Database"})," to create a new database, and then wait for the database to initialize."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"keyspace"}),(0,s.jsx)(r.td,{children:"Keyspace"}),(0,s.jsxs)(r.td,{children:["Input parameter. The keyspace in your database that contains the collection specified in ",(0,s.jsx)(r.code,{children:"collection_name"}),". Default: ",(0,s.jsx)(r.code,{children:"default_keyspace"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"collection_name"}),(0,s.jsx)(r.td,{children:"Collection"}),(0,s.jsxs)(r.td,{children:["Input parameter. The name of the collection that you want to use with this flow. Or, select ",(0,s.jsx)(r.strong,{children:"New Collection"})," to create a new collection with limited configuration options. To ensure your collection is configured with the correct embedding provider and search capabilities, it is recommended to create the collection in the Astra Portal or with the Data API ",(0,s.jsx)(r.em,{children:"before"})," configuring this component. For more information, see ",(0,s.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/databases/manage-collections.html",children:"Manage collections in Astra DB Serverless"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding_model"}),(0,s.jsx)(r.td,{children:"Embedding Model"}),(0,s.jsxs)(r.td,{children:["Input parameter. Attach an ",(0,s.jsxs)(r.a,{href:"/components-embedding-models",children:[(0,s.jsx)(r.strong,{children:"Embedding Model"})," component"]})," to generate embeddings. Only available if the specified collection doesn't have a ",(0,s.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/databases/embedding-generation.html",children:"vectorize integration"}),". If a vectorize integration exists, the component automatically uses the collection's integrated model."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Ingest Data"}),(0,s.jsx)(r.td,{children:"Input parameter. The documents to load into the specified collection."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_query"}),(0,s.jsx)(r.td,{children:"Search Query"}),(0,s.jsx)(r.td,{children:"Input parameter. The query string for vector search."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"cache_vector_store"}),(0,s.jsx)(r.td,{children:"Cache Vector Store"}),(0,s.jsx)(r.td,{children:"Input parameter. Whether to cache the vector store in Langflow memory for faster reads. Default: Enabled (true)."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_method"}),(0,s.jsx)(r.td,{children:"Search Method"}),(0,s.jsxs)(r.td,{children:["Input parameter. The search methods to use, either ",(0,s.jsx)(r.code,{children:"Hybrid Search"})," or ",(0,s.jsx)(r.code,{children:"Vector Search"}),". Your collection must be configured to support the chosen option, and the default depends on what your collection supports. All collections in Astra DB Serverless (Vector) databases support vector search, but hybrid search requires that you set specific collection settings when creating the collection. These options are only available when creating a collection programmatically. For more information, see ",(0,s.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/databases/about-search.html",children:"Ways to find data in Astra DB Serverless"})," and ",(0,s.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/api-reference/collection-methods/create-collection.html#example-hybrid",children:"Create a collection that supports hybrid search"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"reranker"}),(0,s.jsx)(r.td,{children:"Reranker"}),(0,s.jsxs)(r.td,{children:["Input parameter. The re-ranker model to use for hybrid search, depending on the collection configuration. ",(0,s.jsx)(r.strong,{children:"This parameter shows the default reranker even if the selected collection doesn't support hybrid search."})," To verify if a collection supports hybrid search, ",(0,s.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/api-reference/collection-methods/list-collection-metadata.html",children:"get collection metadata"}),", and then check that ",(0,s.jsx)(r.code,{children:"lexical"})," and ",(0,s.jsx)(r.code,{children:"rerank"})," both have ",(0,s.jsx)(r.code,{children:'"enabled": true'}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"lexical_terms"}),(0,s.jsx)(r.td,{children:"Lexical Terms"}),(0,s.jsxs)(r.td,{children:["Input parameter. A space-separated string of keywords for hybrid search, like ",(0,s.jsx)(r.code,{children:"features, data, attributes, characteristics"}),". This parameter is only available if the collection supports hybrid search. For more information, see the following ",(0,s.jsx)(r.strong,{children:"Hybrid search example"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Number of Search Results"}),(0,s.jsx)(r.td,{children:"Input parameter. The number of search results to return. Default: 4."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_type"}),(0,s.jsx)(r.td,{children:"Search Type"}),(0,s.jsxs)(r.td,{children:["Input parameter. The search type to use, either ",(0,s.jsx)(r.code,{children:"Similarity"})," (default), ",(0,s.jsx)(r.code,{children:"Similarity with score threshold"}),", and ",(0,s.jsx)(r.code,{children:"MMR (Max Marginal Relevance)"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_score_threshold"}),(0,s.jsx)(r.td,{children:"Search Score Threshold"}),(0,s.jsxs)(r.td,{children:["Input parameter. The minimum similarity score threshold for vector search results with the ",(0,s.jsx)(r.code,{children:"Similarity with score threshold"})," search type. Default: 0."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"advanced_search_filter"}),(0,s.jsx)(r.td,{children:"Search Metadata Filter"}),(0,s.jsx)(r.td,{children:"Input parameter. An optional dictionary of metadata filters to apply in addition to vector or hybrid search."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"autodetect_collection"}),(0,s.jsx)(r.td,{children:"Autodetect Collection"}),(0,s.jsx)(r.td,{children:"Input parameter. Whether to automatically fetch a list of available collections after providing an application token and API endpoint."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"content_field"}),(0,s.jsx)(r.td,{children:"Content Field"}),(0,s.jsx)(r.td,{children:"Input parameter. For writes, this parameter specifies the name of the field in the documents that contains text strings for which you want to generate embeddings."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"deletion_field"}),(0,s.jsx)(r.td,{children:"Deletion Based On Field"}),(0,s.jsx)(r.td,{children:"Input parameter. When provided, documents in the target collection with metadata field values matching the input metadata field value are deleted before new records are loaded. Use this setting for writes with upserts (overwrites)."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ignore_invalid_documents"}),(0,s.jsx)(r.td,{children:"Ignore Invalid Documents"}),(0,s.jsx)(r.td,{children:"Input parameter. Whether to ignore invalid documents during writes. If disabled (false), then an error is raised for invalid documents. Default: Enabled (true)."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"astradb_vectorstore_kwargs"}),(0,s.jsx)(r.td,{children:"AstraDBVectorStore Parameters"}),(0,s.jsxs)(r.td,{children:["Input parameter. An optional dictionary of additional parameters for the ",(0,s.jsx)(r.code,{children:"AstraDBVectorStore"})," instance. For more information, see ",(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"}),"."]})]})]})]})]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Hybrid search example"}),(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Astra DB"})," component supports the Data API's ",(0,s.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/databases/hybrid-search.html",children:"hybrid search"})," feature.\nHybrid search performs a vector similarity search and a lexical search, compares the results of both searches, and then returns the most relevant results overall."]}),(0,s.jsxs)(r.p,{children:["To use hybrid search through the ",(0,s.jsx)(r.strong,{children:"Astra DB"})," component, do the following:"]}),(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["Use the Data API to ",(0,s.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/api-reference/collection-methods/create-collection.html#example-hybrid",children:"create a collection that supports hybrid search"})," if you haven't already created one."]}),"\n",(0,s.jsxs)(r.p,{children:["Although you can create a collection through the ",(0,s.jsx)(r.strong,{children:"Astra DB"})," component, you have more control and insight into the collection settings when using the Data API for this operation."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["Create a flow based on the ",(0,s.jsx)(r.strong,{children:"Hybrid Search RAG"})," template, which includes an ",(0,s.jsx)(r.strong,{children:"Astra DB"})," component that is pre-configured for hybrid search."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["In the ",(0,s.jsx)(r.strong,{children:"Language Model"})," components, add your OpenAI API key."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["Delete the ",(0,s.jsx)(r.strong,{children:"Language Model"})," component that is connected to the ",(0,s.jsx)(r.strong,{children:"Structured Output"})," component's ",(0,s.jsx)(r.strong,{children:"Input Message"})," port, and then connect the ",(0,s.jsx)(r.strong,{children:"Chat Input"})," component to that port."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["Configure the ",(0,s.jsx)(r.strong,{children:"Astra DB"})," vector store component:"]}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsx)(r.p,{children:"Enter your Astra DB application token."}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["In the ",(0,s.jsx)(r.strong,{children:"Database"})," field, select your database."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["In the ",(0,s.jsx)(r.strong,{children:"Collection"})," field, select your collection with hybrid search enabled."]}),"\n",(0,s.jsx)(r.p,{children:"Once you select a collection that supports hybrid search, the other parameters automatically update to allow hybrid search options."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["In the ",(0,s.jsx)(r.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),", click ",(0,s.jsx)(a.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(r.strong,{children:"Controls"}),", find the ",(0,s.jsx)(r.strong,{children:"Lexical Terms"})," field, enable the ",(0,s.jsx)(r.strong,{children:"Show"})," toggle, and then click ",(0,s.jsx)(r.strong,{children:"Close"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["Connect the first ",(0,s.jsx)(r.strong,{children:"Parser"})," component's ",(0,s.jsx)(r.strong,{children:"Parsed Text"})," output to the ",(0,s.jsx)(r.strong,{children:"Astra DB"})," component's ",(0,s.jsx)(r.strong,{children:"Lexical Terms"})," input.\nThis input only appears after connecting a collection that support hybrid search with reranking."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["Click the ",(0,s.jsx)(r.strong,{children:"Structured Output"})," component to expose the ",(0,s.jsx)(r.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),", click ",(0,s.jsx)(a.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(r.strong,{children:"Controls"}),", find the ",(0,s.jsx)(r.strong,{children:"Format Instructions"})," row, click ",(0,s.jsx)(a.A,{name:"Expand","aria-hidden":"true"})," ",(0,s.jsx)(r.strong,{children:"Expand"}),", and then replace the prompt with the following text:"]}),"\n",(0,s.jsx)(j.Code,{codeConfig:p,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"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["Click ",(0,s.jsx)(r.strong,{children:"Finish Editing"}),", and then click ",(0,s.jsx)(r.strong,{children:"Close"})," to save your changes to the component."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["Open the ",(0,s.jsx)(r.strong,{children:"Playground"}),", and then enter a natural language question that you would ask about your database."]}),"\n",(0,s.jsxs)(r.p,{children:["In this example, your input is sent to both the ",(0,s.jsx)(r.strong,{children:"Astra DB"})," and ",(0,s.jsx)(r.strong,{children:"Structured Output"})," components:"]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["The input sent directly to the ",(0,s.jsx)(r.strong,{children:"Astra DB"})," component's ",(0,s.jsx)(r.strong,{children:"Search Query"})," port is used as a string for similarity search.\nAn embedding is generated from the query string using the collection's Astra DB vectorize integration."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["The input sent to the ",(0,s.jsx)(r.strong,{children:"Structured Output"})," component is processed by the ",(0,s.jsx)(r.strong,{children:"Structured Output"}),", ",(0,s.jsx)(r.strong,{children:"Language Model"}),", and ",(0,s.jsx)(r.strong,{children:"Parser"})," components to extract space-separated ",(0,s.jsx)(r.code,{children:"keywords"})," used for the lexical search portion of the hybrid search."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.p,{children:["The complete hybrid search query is executed against your database using the Data API's ",(0,s.jsx)(r.code,{children:"find_and_rerank"})," command.\nThe API's response is output as a ",(0,s.jsx)(r.code,{children:"DataFrame"})," that is transformed into a text string ",(0,s.jsx)(r.code,{children:"Message"})," by another ",(0,s.jsx)(r.strong,{children:"Parser"})," component.\nFinally, the ",(0,s.jsx)(r.strong,{children:"Chat Output"})," component prints the ",(0,s.jsx)(r.code,{children:"Message"})," response to the ",(0,s.jsx)(r.strong,{children:"Playground"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["Optional: Exit the ",(0,s.jsx)(r.strong,{children:"Playground"}),", and then click ",(0,s.jsx)(a.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,s.jsx)(r.strong,{children:"Inspect Output"})," on each individual component to understand how lexical keywords were constructed and view the raw response from the Data API.\nThis is helpful for debugging flows where a certain component isn't receiving input as expected from another component."]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Structured Output component"}),": The output is the ",(0,s.jsx)(r.code,{children:"Data"})," object produced by applying the output schema to the LLM's response to the input message and format instructions.\nThe following example is based on the aforementioned instructions for keyword extraction:"]}),"\n",(0,s.jsx)(j.Code,{codeConfig:p,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"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Parser component"}),": The output is the string of keywords extracted from the structured output ",(0,s.jsx)(r.code,{children:"Data"}),", and then used as lexical terms for the hybrid search."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Astra DB component"}),": The output is the ",(0,s.jsx)(r.code,{children:"DataFrame"})," containing the results of the hybrid search as returned by the Data API."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]})]}),"\n",(0,s.jsx)(r.h3,{id:"astra-db-graph",children:"Astra DB Graph"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Astra DB Graph"})," component uses a ",(0,s.jsx)(r.code,{children:"AstraDBGraphVectorStore"})," instance for graph traversal and graph-based document retrieval in an Astra DB collection. It also supports writing to the vector store.\nFor more information, see ",(0,s.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/tutorials/graph-rag.html",children:"Build a Graph RAG system with LangChain and GraphRetriever"}),"."]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Astra DB Graph parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Display Name"}),(0,s.jsx)(r.th,{children:"Info"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"token"}),(0,s.jsx)(r.td,{children:"Astra DB Application Token"}),(0,s.jsx)(r.td,{children:"Input parameter. An Astra application token with permission to access your vector database. Once the connection is verified, additional fields are populated with your existing databases and collections. If you want to create a database through this component, the application token must have Organization Administrator permissions."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"api_endpoint"}),(0,s.jsx)(r.td,{children:"API Endpoint"}),(0,s.jsx)(r.td,{children:"Input parameter. Your database's API endpoint."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"keyspace"}),(0,s.jsx)(r.td,{children:"Keyspace"}),(0,s.jsxs)(r.td,{children:["Input parameter. The keyspace in your database that contains the collection specified in ",(0,s.jsx)(r.code,{children:"collection_name"}),". Default: ",(0,s.jsx)(r.code,{children:"default_keyspace"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"collection_name"}),(0,s.jsx)(r.td,{children:"Collection"}),(0,s.jsx)(r.td,{children:"Input parameter. The name of the collection that you want to use with this flow. For write operations, if a matching collection doesn't exist, a new one is created."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"metadata_incoming_links_key"}),(0,s.jsx)(r.td,{children:"Metadata Incoming Links Key"}),(0,s.jsx)(r.td,{children:"Input parameter. The metadata key for the incoming links in the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Ingest Data"}),(0,s.jsx)(r.td,{children:"Input parameter. Records to load into the vector store. Only relevant for writes."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_input"}),(0,s.jsx)(r.td,{children:"Search Query"}),(0,s.jsx)(r.td,{children:"Input parameter. Query string for similarity search. Only relevant for reads."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"cache_vector_store"}),(0,s.jsx)(r.td,{children:"Cache Vector Store"}),(0,s.jsx)(r.td,{children:"Input parameter. Whether to cache the vector store in Langflow memory for faster reads. Default: Enabled (true)."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding_model"}),(0,s.jsx)(r.td,{children:"Embedding Model"}),(0,s.jsxs)(r.td,{children:["Input parameter. Attach an ",(0,s.jsxs)(r.a,{href:"/components-embedding-models",children:[(0,s.jsx)(r.strong,{children:"Embedding Model"})," component"]})," to generate embeddings. If the collection has a ",(0,s.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/databases/embedding-generation.html",children:"vectorize integration"}),", don't attach an ",(0,s.jsx)(r.strong,{children:"Embedding Model"})," component."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"metric"}),(0,s.jsx)(r.td,{children:"Metric"}),(0,s.jsxs)(r.td,{children:["Input parameter. The metrics to use for similarity search calculations, either ",(0,s.jsx)(r.code,{children:"cosine"})," (default), ",(0,s.jsx)(r.code,{children:"dot_product"}),", or ",(0,s.jsx)(r.code,{children:"euclidean"}),". This is a collection setting."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"batch_size"}),(0,s.jsx)(r.td,{children:"Batch Size"}),(0,s.jsx)(r.td,{children:"Input parameter. Optional number of records to process in a single batch."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"bulk_insert_batch_concurrency"}),(0,s.jsx)(r.td,{children:"Bulk Insert Batch Concurrency"}),(0,s.jsx)(r.td,{children:"Input parameter. Optional concurrency level for bulk write operations."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"bulk_insert_overwrite_concurrency"}),(0,s.jsx)(r.td,{children:"Bulk Insert Overwrite Concurrency"}),(0,s.jsx)(r.td,{children:"Input parameter. Optional concurrency level for bulk write operations that allow upserts (overwriting existing records)."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"bulk_delete_concurrency"}),(0,s.jsx)(r.td,{children:"Bulk Delete Concurrency"}),(0,s.jsx)(r.td,{children:"Input parameter. Optional concurrency level for bulk delete operations."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"setup_mode"}),(0,s.jsx)(r.td,{children:"Setup Mode"}),(0,s.jsxs)(r.td,{children:["Input parameter. Configuration mode for setting up the vector store, either ",(0,s.jsx)(r.code,{children:"Sync"})," (default) or ",(0,s.jsx)(r.code,{children:"Off"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"pre_delete_collection"}),(0,s.jsx)(r.td,{children:"Pre Delete Collection"}),(0,s.jsx)(r.td,{children:"Input parameter. Whether to delete the collection before creating a new one. Default: Disabled (false)."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"metadata_indexing_include"}),(0,s.jsx)(r.td,{children:"Metadata Indexing Include"}),(0,s.jsxs)(r.td,{children:["Input parameter. An list of metadata fields to index if you want to enable ",(0,s.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/api-reference/collection-indexes.html",children:"selective indexing"})," ",(0,s.jsx)(r.em,{children:"only"})," when creating a collection. Doesn't apply to existing collections. Only one ",(0,s.jsx)(r.code,{children:"*_indexing_*"})," parameter can be set per collection. If all ",(0,s.jsx)(r.code,{children:"*_indexing_*"})," parameters are unset, then all fields are indexed (default indexing)."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"metadata_indexing_exclude"}),(0,s.jsx)(r.td,{children:"Metadata Indexing Exclude"}),(0,s.jsxs)(r.td,{children:["Input parameter. An list of metadata fields to exclude from indexing if you want to enable selective indexing ",(0,s.jsx)(r.em,{children:"only"})," when creating a collection. Doesn't apply to existing collections. Only one ",(0,s.jsx)(r.code,{children:"*_indexing_*"})," parameter can be set per collection. If all ",(0,s.jsx)(r.code,{children:"*_indexing_*"})," parameters are unset, then all fields are indexed (default indexing)."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"collection_indexing_policy"}),(0,s.jsx)(r.td,{children:"Collection Indexing Policy"}),(0,s.jsxs)(r.td,{children:["Input parameter. A dictionary to define the indexing policy if you want to enable selective indexing ",(0,s.jsx)(r.em,{children:"only"})," when creating a collection. Doesn't apply to existing collections. Only one ",(0,s.jsx)(r.code,{children:"*_indexing_*"})," parameter can be set per collection. If all ",(0,s.jsx)(r.code,{children:"*_indexing_*"})," parameters are unset, then all fields are indexed (default indexing). The ",(0,s.jsx)(r.code,{children:"collection_indexing_policy"})," dictionary is used when you need to set indexing on subfields or a complex indexing definition that isn't compatible as a list."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Number of Results"}),(0,s.jsx)(r.td,{children:"Input parameter. Number of search results to return. Default: 4. Only relevant to reads."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_type"}),(0,s.jsx)(r.td,{children:"Search Type"}),(0,s.jsxs)(r.td,{children:["Input parameter. Search type to use, either ",(0,s.jsx)(r.code,{children:"Similarity"}),", ",(0,s.jsx)(r.code,{children:"Similarity with score threshold"}),", or ",(0,s.jsx)(r.code,{children:"MMR (Max Marginal Relevance)"}),", ",(0,s.jsx)(r.code,{children:"Graph Traversal"}),", or ",(0,s.jsx)(r.code,{children:"MMR (Max Marginal Relevance) Graph Traversal"})," (default). Only relevant to reads."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_score_threshold"}),(0,s.jsx)(r.td,{children:"Search Score Threshold"}),(0,s.jsxs)(r.td,{children:["Input parameter. Minimum similarity score threshold for search results if the ",(0,s.jsx)(r.code,{children:"search_type"})," is ",(0,s.jsx)(r.code,{children:"Similarity with score threshold"}),". Default: 0."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_filter"}),(0,s.jsx)(r.td,{children:"Search Metadata Filter"}),(0,s.jsx)(r.td,{children:"Input parameter. Optional dictionary of metadata filters to apply in addition to vector search."})]})]})]})]}),"\n",(0,s.jsx)(r.h3,{id:"graph-rag",children:"Graph RAG"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Graph RAG"})," component uses an instance of ",(0,s.jsx)(r.a,{href:"https://datastax.github.io/graph-rag/reference/langchain_graph_retriever/",children:(0,s.jsx)(r.code,{children:"GraphRetriever"})})," for Graph RAG traversal enabling graph-based document retrieval in an Astra DB vector store.\nFor more information, see the ",(0,s.jsx)(r.a,{href:"https://datastax.github.io/graph-rag/",children:"DataStax Graph RAG documentation"}),"."]}),"\n",(0,s.jsx)(r.admonition,{type:"tip",children:(0,s.jsxs)(r.p,{children:["This component was meant as a Graph RAG extension for the ",(0,s.jsx)(r.strong,{children:"Astra DB"})," vector store component.\nHowever, the ",(0,s.jsx)(r.strong,{children:"Astra DB Graph"})," component includes both the vector store connection and Graph RAG functionality."]})}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Graph RAG parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Display Name"}),(0,s.jsx)(r.th,{children:"Info"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding_model"}),(0,s.jsx)(r.td,{children:"Embedding Model"}),(0,s.jsxs)(r.td,{children:["Input parameter. Specify the embedding model to use. Not required if the connected vector store has an ",(0,s.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/databases/embedding-generation.html",children:"vectorize integration"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"vector_store"}),(0,s.jsx)(r.td,{children:"Vector Store Connection"}),(0,s.jsxs)(r.td,{children:["Input parameter. A ",(0,s.jsx)(r.a,{href:"#vector-store-instances",children:(0,s.jsx)(r.code,{children:"vector_store"})})," instance inherited from an ",(0,s.jsx)(r.strong,{children:"Astra DB"})," component's ",(0,s.jsx)(r.strong,{children:"Vector Store Connection"})," output."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"edge_definition"}),(0,s.jsx)(r.td,{children:"Edge Definition"}),(0,s.jsxs)(r.td,{children:["Input parameter. ",(0,s.jsx)(r.a,{href:"https://datastax.github.io/graph-rag/reference/graph_retriever/edges/",children:"Edge definition"})," for the graph traversal."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"strategy"}),(0,s.jsx)(r.td,{children:"Traversal Strategies"}),(0,s.jsx)(r.td,{children:"Input parameter. The strategy to use for graph traversal. Strategy options are dynamically loaded from available strategies."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_query"}),(0,s.jsx)(r.td,{children:"Search Query"}),(0,s.jsx)(r.td,{children:"Input parameter. The query to search for in the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"graphrag_strategy_kwargs"}),(0,s.jsx)(r.td,{children:"Strategy Parameters"}),(0,s.jsxs)(r.td,{children:["Input parameter. Optional dictionary of additional parameters for the ",(0,s.jsx)(r.a,{href:"https://datastax.github.io/graph-rag/reference/graph_retriever/strategies/",children:"retrieval strategy"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_results"}),(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Search Results"})," or ",(0,s.jsx)(r.strong,{children:"DataFrame"})]}),(0,s.jsxs)(r.td,{children:["Output parameter. The results of the graph-based document retrieval as a list of ",(0,s.jsx)(r.a,{href:"/data-types#data",children:(0,s.jsx)(r.code,{children:"Data"})})," objects or as a tabular ",(0,s.jsx)(r.a,{href:"/data-types#dataframe",children:(0,s.jsx)(r.code,{children:"DataFrame"})}),". You can set the desired output type near the component's output port."]})]})]})]})]}),"\n",(0,s.jsx)(r.h3,{id:"hyper-converged-database-hcd",children:"Hyper-Converged Database (HCD)"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Hyper-Converged Database (HCD)"})," component uses your cluster's the Data API server to read and write to an HCD vector store.\nBecause the underlying functions call the Data API, which originated from Astra DB, the component uses an instance of ",(0,s.jsx)(r.code,{children:"AstraDBVectorStore"}),"."]}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.img,{alt:"A flow using the HCD component to load vector data.",src:t(42638).A+"",width:"2294",height:"1684"})}),"\n",(0,s.jsxs)(r.p,{children:["For more information about using the Data API with an HCD deployment, see ",(0,s.jsx)(r.a,{href:"https://docs.datastax.com/en/hyper-converged-database/1.2/api-reference/dataapiclient.html",children:"Get started with the Data API in HCD 1.2"}),"."]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"HCD parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Display Name"}),(0,s.jsx)(r.th,{children:"Info"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"collection_name"}),(0,s.jsx)(r.td,{children:"Collection Name"}),(0,s.jsx)(r.td,{children:"Input parameter. The name of a vector store collection in HCD. For write operations, if the collection doesn't exist, then a new one is created. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"username"}),(0,s.jsx)(r.td,{children:"HCD Username"}),(0,s.jsxs)(r.td,{children:["Input parameter. Username for authenticating to your HCD deployment. Default: ",(0,s.jsx)(r.code,{children:"hcd-superuser"}),". Required."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"password"}),(0,s.jsx)(r.td,{children:"HCD Password"}),(0,s.jsx)(r.td,{children:"Input parameter. Password for authenticating to your HCD deployment. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"api_endpoint"}),(0,s.jsx)(r.td,{children:"HCD API Endpoint"}),(0,s.jsxs)(r.td,{children:["Input parameter. Your deployment's HCD Data API endpoint, formatted as ",(0,s.jsx)(r.code,{children:"http[s]://**CLUSTER_HOST**:**GATEWAY_PORT"})," where ",(0,s.jsx)(r.code,{children:"CLUSTER_HOST"})," is the IP address of any node in your cluster and ",(0,s.jsx)(r.code,{children:"GATEWAY_PORT"})," is the port number ofr your API gateway service. For example, ",(0,s.jsx)(r.code,{children:"http://192.0.2.250:8181"}),". Required."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Ingest Data"}),(0,s.jsx)(r.td,{children:"Input parameter. Records to load into the vector store. Only relevant for writes."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_input"}),(0,s.jsx)(r.td,{children:"Search Input"}),(0,s.jsx)(r.td,{children:"Input parameter. Query string for similarity search. Only relevant for reads."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"namespace"}),(0,s.jsx)(r.td,{children:"Namespace"}),(0,s.jsxs)(r.td,{children:["Input parameter. The namespace in HCD that contains or will contain the collection specified in ",(0,s.jsx)(r.code,{children:"collection_name"}),". Default: ",(0,s.jsx)(r.code,{children:"default_namespace"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ca_certificate"}),(0,s.jsx)(r.td,{children:"CA Certificate"}),(0,s.jsx)(r.td,{children:"Input parameter. Optional CA certificate for TLS connections to HCD."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"metric"}),(0,s.jsx)(r.td,{children:"Metric"}),(0,s.jsxs)(r.td,{children:["Input parameter. The metrics to use for similarity search calculations, either ",(0,s.jsx)(r.code,{children:"cosine"}),", ",(0,s.jsx)(r.code,{children:"dot_product"}),", or ",(0,s.jsx)(r.code,{children:"euclidean"}),". This is a collection setting. If calling an existing collection, leave unset to use the collection's metric. If a write operation creates a new collection, specify the desired similarity metric setting."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"batch_size"}),(0,s.jsx)(r.td,{children:"Batch Size"}),(0,s.jsx)(r.td,{children:"Input parameter. Optional number of records to process in a single batch."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"bulk_insert_batch_concurrency"}),(0,s.jsx)(r.td,{children:"Bulk Insert Batch Concurrency"}),(0,s.jsx)(r.td,{children:"Input parameter. Optional concurrency level for bulk write operations."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"bulk_insert_overwrite_concurrency"}),(0,s.jsx)(r.td,{children:"Bulk Insert Overwrite Concurrency"}),(0,s.jsx)(r.td,{children:"Input parameter. Optional concurrency level for bulk write operations that allow upserts (overwriting existing records)."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"bulk_delete_concurrency"}),(0,s.jsx)(r.td,{children:"Bulk Delete Concurrency"}),(0,s.jsx)(r.td,{children:"Input parameter. Optional concurrency level for bulk delete operations."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"setup_mode"}),(0,s.jsx)(r.td,{children:"Setup Mode"}),(0,s.jsxs)(r.td,{children:["Input parameter. Configuration mode for setting up the vector store, either ",(0,s.jsx)(r.code,{children:"Sync"})," (default), ",(0,s.jsx)(r.code,{children:"Async"}),", or ",(0,s.jsx)(r.code,{children:"Off"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"pre_delete_collection"}),(0,s.jsx)(r.td,{children:"Pre Delete Collection"}),(0,s.jsx)(r.td,{children:"Input parameter. Whether to delete the collection before creating a new one."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"metadata_indexing_include"}),(0,s.jsx)(r.td,{children:"Metadata Indexing Include"}),(0,s.jsxs)(r.td,{children:["Input parameter. An list of metadata fields to index if you want to enable ",(0,s.jsx)(r.a,{href:"https://docs.datastax.com/en/hyper-converged-database/1.2/api-reference/collection-indexes.html",children:"selective indexing"})," ",(0,s.jsx)(r.em,{children:"only"})," when creating a collection. Doesn't apply to existing collections. Only one ",(0,s.jsx)(r.code,{children:"*_indexing_*"})," parameter can be set per collection. If all ",(0,s.jsx)(r.code,{children:"*_indexing_*"})," parameters are unset, then all fields are indexed (default indexing)."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"metadata_indexing_exclude"}),(0,s.jsx)(r.td,{children:"Metadata Indexing Exclude"}),(0,s.jsxs)(r.td,{children:["Input parameter. An list of metadata fields to exclude from indexing if you want to enable selective indexing ",(0,s.jsx)(r.em,{children:"only"})," when creating a collection. Doesn't apply to existing collections. Only one ",(0,s.jsx)(r.code,{children:"*_indexing_*"})," parameter can be set per collection. If all ",(0,s.jsx)(r.code,{children:"*_indexing_*"})," parameters are unset, then all fields are indexed (default indexing)."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"collection_indexing_policy"}),(0,s.jsx)(r.td,{children:"Collection Indexing Policy"}),(0,s.jsxs)(r.td,{children:["Input parameter. A dictionary to define the indexing policy if you want to enable selective indexing ",(0,s.jsx)(r.em,{children:"only"})," when creating a collection. Doesn't apply to existing collections. Only one ",(0,s.jsx)(r.code,{children:"*_indexing_*"})," parameter can be set per collection. If all ",(0,s.jsx)(r.code,{children:"*_indexing_*"})," parameters are unset, then all fields are indexed (default indexing). The ",(0,s.jsx)(r.code,{children:"collection_indexing_policy"})," dictionary is used when you need to set indexing on subfields or a complex indexing definition that isn't compatible as a list."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embedding or Astra Vectorize"}),(0,s.jsxs)(r.td,{children:["Input parameter. The embedding model to use by attaching an ",(0,s.jsx)(r.strong,{children:"Embedding Model"})," component. This component doesn't support additional vectorize authentication headers, so it isn't possible to use a vectorize integration with this component, even if you have enabled one on an existing HCD collection."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Number of Results"}),(0,s.jsx)(r.td,{children:"Input parameter. Number of search results to return. Default: 4. Only relevant to reads."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_type"}),(0,s.jsx)(r.td,{children:"Search Type"}),(0,s.jsxs)(r.td,{children:["Input parameter. Search type to use, either ",(0,s.jsx)(r.code,{children:"Similarity"})," (default), ",(0,s.jsx)(r.code,{children:"Similarity with score threshold"}),", or ",(0,s.jsx)(r.code,{children:"MMR (Max Marginal Relevance)"}),". Only relevant to reads."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_score_threshold"}),(0,s.jsx)(r.td,{children:"Search Score Threshold"}),(0,s.jsxs)(r.td,{children:["Input parameter. Minimum similarity score threshold for search results if the ",(0,s.jsx)(r.code,{children:"search_type"})," is ",(0,s.jsx)(r.code,{children:"Similarity with score threshold"}),". Default: 0."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_filter"}),(0,s.jsx)(r.td,{children:"Search Metadata Filter"}),(0,s.jsx)(r.td,{children:"Input parameter. Optional dictionary of metadata filters to apply in addition to vector search."})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"elasticsearch",children:"Elasticsearch"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Elasticsearch"})," component reads and writes to an Elasticsearch instance using ",(0,s.jsx)(r.code,{children:"ElasticsearchStore"}),"."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://www.elastic.co/guide/en/elasticsearch/reference/current/dense-vector.html",children:"Elasticsearch documentation"})}),"\n"]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Elasticsearch parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"es_url"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Elasticsearch server URL."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"es_user"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Username for Elasticsearch authentication."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"es_password"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. Password for Elasticsearch authentication."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"index_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Name of the Elasticsearch index."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"strategy"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsxs)(r.td,{children:["Input parameter. Strategy for vector search, either ",(0,s.jsx)(r.code,{children:"approximate_k_nearest_neighbors"})," or ",(0,s.jsx)(r.code,{children:"script_scoring"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"distance_strategy"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsxs)(r.td,{children:["Input parameter. Strategy for distance calculation, either ",(0,s.jsx)(r.code,{children:"COSINE"}),", ",(0,s.jsx)(r.code,{children:"EUCLIDEAN_DISTANCE"}),", or ",(0,s.jsx)(r.code,{children:"DOT_PRODUCT"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_query"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Query string for similarity search."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Data"}),(0,s.jsx)(r.td,{children:"Input parameter. Records to load into the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding model to use."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. Number of search results to return. Default: 4."})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"faiss",children:"FAISS"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"FAISS"})," component providese access to the Facebook AI Similarity Search (FAISS) library through an instance of ",(0,s.jsx)(r.code,{children:"FAISS"})," vector store."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://faiss.ai/index.html",children:"FAISS documentation"})}),"\n"]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"FAISS parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"index_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:'Input parameter. The name of the FAISS index. Default: "langflow_index".'})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"persist_directory"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Path to save the FAISS index. It is relative to where Langflow is running."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_query"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The query to search for in the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Data"}),(0,s.jsx)(r.td,{children:"Input parameter. The list of data to ingest into the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"allow_dangerous_deserialization"}),(0,s.jsx)(r.td,{children:"Boolean"}),(0,s.jsx)(r.td,{children:"Input parameter. Set to True to allow loading pickle files from untrusted sources. Default: True."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding function to use for the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. Number of results to return from the search. Default: 4."})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"milvus",children:"Milvus"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Milvus"})," component reads and writes to Milvus vector stores using an instance of ",(0,s.jsx)(r.code,{children:"Milvus"})," vector store."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://milvus.io/docs",children:"Milvus documentation"})}),"\n"]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Milvus parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"collection_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Name of the Milvus collection."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"collection_description"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Description of the Milvus collection."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"uri"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Connection URI for Milvus."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"password"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. Password for Milvus."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"username"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. Username for Milvus."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"batch_size"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. Number of data to process in a single batch."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_query"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Query for similarity search."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Data"}),(0,s.jsx)(r.td,{children:"Input parameter. Data to be ingested into the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. Embedding function to use."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. Number of results to return in search."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_type"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Type of search to perform."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_score_threshold"}),(0,s.jsx)(r.td,{children:"Float"}),(0,s.jsx)(r.td,{children:"Input parameter. Minimum similarity score for search results."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_filter"}),(0,s.jsx)(r.td,{children:"Dict"}),(0,s.jsx)(r.td,{children:"Input parameter. Metadata filters for search query."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"setup_mode"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Configuration mode for setting up the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"vector_dimensions"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. Number of dimensions of the vectors."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"pre_delete_collection"}),(0,s.jsx)(r.td,{children:"Boolean"}),(0,s.jsx)(r.td,{children:"Input parameter. Whether to delete the collection before creating a new one."})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"mongodb-atlas",children:"MongoDB Atlas"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"MongoDB Atlas"})," component reads and writes to MongoDB Atlas vector stores using an instance of ",(0,s.jsx)(r.code,{children:"MongoDBAtlasVectorSearch"}),"."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://www.mongodb.com/docs/atlas/atlas-vector-search/tutorials/vector-search-quick-start/",children:"MongoDB Atlas documentation"})}),"\n"]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"MongoDB Atlas parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"mongodb_atlas_cluster_uri"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. The connection URI for your MongoDB Atlas cluster. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"enable_mtls"}),(0,s.jsx)(r.td,{children:"Boolean"}),(0,s.jsx)(r.td,{children:"Input parameter. Enable mutual TLS authentication. Default: false."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"mongodb_atlas_client_cert"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. Client certificate combined with private key for mTLS authentication. Required if mTLS is enabled."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"db_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The name of the database to use. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"collection_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The name of the collection to use. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"index_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The name of the Atlas Search index, it should be a Vector Search. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"insert_mode"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:'Input parameter. How to insert new documents into the collection. The options are "append" or "overwrite". Default: "append".'})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding model to use."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. Number of results to return in similarity search. Default: 4."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"index_field"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:'Input parameter. The field to index. Default: "embedding".'})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"filter_field"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The field to filter the index."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_dimensions"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. Embedding context length. Default: 1536."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"similarity"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:'Input parameter. The method used to measure similarity between vectors. The options are "cosine", "euclidean", or "dotProduct". Default: "cosine".'})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"quantization"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:'Input parameter. Quantization reduces memory costs by converting 32-bit floats to smaller data types. The options are "scalar" or "binary".'})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"opensearch",children:"OpenSearch"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"OpenSearch"})," component reads and writes to OpenSearch instances using ",(0,s.jsx)(r.code,{children:"OpenSearchVectorSearch"}),"."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://opensearch.org/platform/search/vector-database.html",children:"OpenSearch documentation"})}),"\n"]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"OpenSearch parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"opensearch_url"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsxs)(r.td,{children:["Input parameter. URL for OpenSearch cluster, such as ",(0,s.jsx)(r.code,{children:"https://192.168.1.1:9200"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"index_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The index name where the vectors are stored in OpenSearch cluster."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_input"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Enter a search query. Leave empty to retrieve all documents or if hybrid search is being used."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Data"}),(0,s.jsx)(r.td,{children:"Input parameter. The data to be ingested into the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding function to use."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_type"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:'Input parameter. The options are "similarity", "similarity_score_threshold", "mmr".'})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. The number of results to return in search."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_score_threshold"}),(0,s.jsx)(r.td,{children:"Float"}),(0,s.jsx)(r.td,{children:"Input parameter. The minimum similarity score threshold for search results."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"username"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The username for the opensource cluster."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"password"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. The password for the opensource cluster."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"use_ssl"}),(0,s.jsx)(r.td,{children:"Boolean"}),(0,s.jsx)(r.td,{children:"Input parameter. Use SSL."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"verify_certs"}),(0,s.jsx)(r.td,{children:"Boolean"}),(0,s.jsx)(r.td,{children:"Input parameter. Verify certificates."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"hybrid_search_query"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Provide a custom hybrid search query in JSON format. This allows you to combine vector similarity and keyword matching."})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"pgvector",children:"PGVector"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"PGVector"})," component reads and writes to PostgreSQL vector stores using an instance of ",(0,s.jsx)(r.code,{children:"PGVector"}),"."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://github.com/pgvector/pgvector",children:"PGVector documentation"})}),"\n"]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"PGVector parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"pg_server_url"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. The PostgreSQL server connection string."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"collection_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The table name for the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_query"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The query for similarity search."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Data"}),(0,s.jsx)(r.td,{children:"Input parameter. The data to be ingested into the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding function to use."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. The number of results to return in search."})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"pinecone",children:"Pinecone"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Pinecone"})," component reads and writes to Pinecone vector stores using an instance of ",(0,s.jsx)(r.code,{children:"PineconeVectorStore"}),"."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://docs.pinecone.io/home",children:"Pinecone documentation"})}),"\n"]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Pinecone parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"index_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The name of the Pinecone index."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"namespace"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The namespace for the index."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"distance_strategy"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The strategy for calculating distance between vectors."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"pinecone_api_key"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. The API key for Pinecone."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"text_key"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The key in the record to use as text."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_query"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The query for similarity search."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Data"}),(0,s.jsx)(r.td,{children:"Input parameter. The data to be ingested into the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding function to use."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. The number of results to return in search."})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"qdrant",children:"Qdrant"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Qdrant"})," component reads and writes to Qdrant vector stores using an instance of ",(0,s.jsx)(r.code,{children:"QdrantVectorStore"}),"."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://qdrant.tech/documentation/",children:"Qdrant documentation"})}),"\n"]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Qdrant parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"collection_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The name of the Qdrant collection."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"host"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The Qdrant server host."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"port"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. The Qdrant server port."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"grpc_port"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. The Qdrant gRPC port."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"api_key"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. The API key for Qdrant."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"prefix"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The prefix for Qdrant."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"timeout"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. The timeout for Qdrant operations."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"path"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The path for Qdrant."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"url"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The URL for Qdrant."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"distance_func"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The distance function for vector similarity."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"content_payload_key"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The content payload key."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"metadata_payload_key"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The metadata payload key."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_query"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The query for similarity search."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Data"}),(0,s.jsx)(r.td,{children:"Input parameter. The data to be ingested into the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding function to use."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. The number of results to return in search."})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"redis",children:"Redis"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Redis"})," component reads and writes to Redis vector stores using an instance of ",(0,s.jsx)(r.code,{children:"Redis"})," vector store."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://redis.io/docs/latest/develop/interact/search-and-query/advanced-concepts/vectors/",children:"Redis documentation"})}),"\n"]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Redis parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"redis_server_url"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. The Redis server connection string."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"redis_index_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The name of the Redis index."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"code"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The custom code for Redis (advanced)."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"schema"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The schema for Redis index."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_query"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The query for similarity search."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Data"}),(0,s.jsx)(r.td,{children:"Input parameter. The data to be ingested into the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. The number of results to return in search."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding function to use."})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"supabase",children:"Supabase"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Supabase"})," component reads and writes to Supabase vector stores using an instance of ",(0,s.jsx)(r.code,{children:"SupabaseVectorStore"}),"."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://supabase.com/docs/guides/ai",children:"Supabase documentation"})}),"\n"]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Supabase parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"supabase_url"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The URL of the Supabase instance."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"supabase_service_key"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. The service key for Supabase authentication."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"table_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The name of the table in Supabase."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"query_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The name of the query to use."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_query"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The query for similarity search."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Data"}),(0,s.jsx)(r.td,{children:"Input parameter. The data to be ingested into the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding function to use."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. The number of results to return in search."})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"upstash",children:"Upstash"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Upstash"})," component reads and writes to Upstash vector stores using an instance of ",(0,s.jsx)(r.code,{children:"UpstashVectorStore"}),"."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://upstash.com/docs/introduction",children:"Upstash documentation"})}),"\n"]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Upstash parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"index_url"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The URL of the Upstash index."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"index_token"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. The token for the Upstash index."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"text_key"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The key in the record to use as text."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"namespace"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The namespace for the index."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_query"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The query for similarity search."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"metadata_filter"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Filter documents by metadata."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Data"}),(0,s.jsx)(r.td,{children:"Input parameter. The data to be ingested into the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding function to use."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. The number of results to return in search."})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"vectara-platform",children:"Vectara Platform"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Vectara"})," and ",(0,s.jsx)(r.strong,{children:"Vectara RAG"})," components support Vectara vector store, search, and RAG functionality using instances of ",(0,s.jsx)(r.code,{children:"Vectara"})," vector store."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://docs.vectara.com/docs/",children:"Vectara documentation"})}),"\n"]}),"\n",(0,s.jsx)(r.h3,{id:"vectara",children:"Vectara"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Vectara"})," component reads and writes to Vectara vector stores, and then produces ",(0,s.jsx)(r.a,{href:"#search-results-output",children:"search results output"}),"."]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Vectara parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"vectara_customer_id"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The Vectara customer ID."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"vectara_corpus_id"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The Vectara corpus ID."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"vectara_api_key"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. The Vectara API key."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding function to use (optional)."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"List[Document/Data]"}),(0,s.jsx)(r.td,{children:"Input parameter. The data to be ingested into the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_query"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The query for similarity search."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. The number of results to return in search."})]})]})]})]}),"\n",(0,s.jsx)(r.h3,{id:"vectara-rag",children:"Vectara RAG"}),"\n",(0,s.jsx)(r.p,{children:"This component enables Vectara's full end-to-end RAG capabilities with reranking options."}),"\n",(0,s.jsxs)(r.p,{children:["This component uses a ",(0,s.jsx)(r.code,{children:"Vectara"})," vector store to execute the vector search and reranking functions, and then outputs an ",(0,s.jsx)(r.strong,{children:"Answer"})," string in ",(0,s.jsx)(r.a,{href:"/data-types#message",children:(0,s.jsx)(r.code,{children:"Message"})})," format."]}),"\n",(0,s.jsx)(r.h2,{id:"weaviate",children:"Weaviate"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Weaviate"})," component reads and writes to Weaviate vector stores using an instance of ",(0,s.jsx)(r.code,{children:"Weaviate"})," vector store."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://weaviate.io/developers/weaviate",children:"Weaviate Documentation"})}),"\n"]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Weaviate parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"weaviate_url"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The default instance URL."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_by_text"}),(0,s.jsx)(r.td,{children:"Boolean"}),(0,s.jsx)(r.td,{children:"Input parameter. Indicates whether to search by text."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"api_key"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. The optional API key for authentication."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"index_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The optional index name."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"text_key"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The default text extraction key."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"input"}),(0,s.jsx)(r.td,{children:"Document"}),(0,s.jsx)(r.td,{children:"Input parameter. The document or record."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding model used."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"attributes"}),(0,s.jsx)(r.td,{children:"List[String]"}),(0,s.jsx)(r.td,{children:"Input parameter. Optional additional attributes."})]})]})]})]})]})}function g(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(m,{...e})}):m(e)}function f(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:()=>i});t(96540);var n=t(64058),s=t(74848);function i({name:e,...r}){const t=n[e];return t?(0,s.jsx)(t,{...r}):null}},19365:(e,r,t)=>{t.d(r,{A:()=>d});t(96540);var n=t(18215);const s={tabItem:"tabItem_Ymn6"};var i=t(74848);function d({children:e,hidden:r,className:t}){return(0,i.jsx)("div",{role:"tabpanel",className:(0,n.A)(s.tabItem,t),hidden:r,children:e})}},42638:(e,r,t)=>{t.d(r,{A:()=>n});const n=t.p+"assets/images/component-hcd-example-flow-b82057600ce5e9e4a0f7ea0a61dcbf7f.png"},60159:(e,r,t)=>{t.d(r,{A:()=>n});const n=t.p+"assets/images/component-local-db-5ba34611640c3e325d9dd3cdcb591d1f.png"},67719:(e,r,t)=>{t.d(r,{A:()=>n});const n=t.p+"assets/images/vector-store-retrieval-af7257d77ff0259ab1a0980641d464ce.png"},88690:(e,r,t)=>{t.d(r,{A:()=>n});const n=t.p+"assets/images/component-chroma-db-b69a08e861be3451fe6f2992e203f516.png"}}]); \ No newline at end of file +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[2307],{7685:(e,r,t)=>{t.d(r,{A:()=>n});const n=t.p+"assets/images/vector-store-document-ingestion-6157311fb4d16e7f944d55254f0cc0e2.png"},11470:(e,r,t)=>{t.d(r,{A:()=>I});var n=t(96540),s=t(18215),i=t(23104),d=t(56347),a=t(205),c=t(57485),o=t(31682),l=t(70679);function h(e){return n.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:r}=e;return!!r&&"object"==typeof r&&"value"in r}(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 x(e){const{values:r,children:t}=e;return(0,n.useMemo)(()=>{const e=r??function(e){return h(e).map(({props:{value:e,label:r,attributes:t,default:n}})=>({value:e,label:r,attributes:t,default:n}))}(t);return function(e){const r=(0,o.XI)(e,(e,r)=>e.value===r.value);if(r.length>0)throw new Error(`Docusaurus error: Duplicate values "${r.map(e=>e.value).join(", ")}" found in . Every value needs to be unique.`)}(e),e},[r,t])}function j({value:e,tabValues:r}){return r.some(r=>r.value===e)}function p({queryString:e=!1,groupId:r}){const t=(0,d.W6)(),s=function({queryString:e=!1,groupId:r}){if("string"==typeof e)return e;if(!1===e)return null;if(!0===e&&!r)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 r??null}({queryString:e,groupId:r});return[(0,c.aZ)(s),(0,n.useCallback)(e=>{if(!s)return;const r=new URLSearchParams(t.location.search);r.set(s,e),t.replace({...t.location,search:r.toString()})},[s,t])]}function u(e){const{defaultValue:r,queryString:t=!1,groupId:s}=e,i=x(e),[d,c]=(0,n.useState)(()=>function({defaultValue:e,tabValues:r}){if(0===r.length)throw new Error("Docusaurus error: the component requires at least one children component");if(e){if(!j({value:e,tabValues:r}))throw new Error(`Docusaurus error: The has a defaultValue "${e}" but none of its children has the corresponding value. Available values are: ${r.map(e=>e.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return e}const t=r.find(e=>e.default)??r[0];if(!t)throw new Error("Unexpected error: 0 tabValues");return t.value}({defaultValue:r,tabValues:i})),[o,h]=p({queryString:t,groupId:s}),[u,m]=function({groupId:e}){const r=function(e){return e?`docusaurus.tab.${e}`:null}(e),[t,s]=(0,l.Dv)(r);return[t,(0,n.useCallback)(e=>{r&&s.set(e)},[r,s])]}({groupId:s}),g=(()=>{const e=o??u;return j({value:e,tabValues:i})?e:null})();(0,a.A)(()=>{g&&c(g)},[g]);return{selectedValue:d,selectValue:(0,n.useCallback)(e=>{if(!j({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);c(e),h(e),m(e)},[h,m,i]),tabValues:i}}var m=t(92303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var f=t(74848);function b({className:e,block:r,selectedValue:t,selectValue:n,tabValues:d}){const a=[],{blockElementScrollPositionUntilNextRender:c}=(0,i.a_)(),o=e=>{const r=e.currentTarget,s=a.indexOf(r),i=d[s].value;i!==t&&(c(r),n(i))},l=e=>{let r=null;switch(e.key){case"Enter":o(e);break;case"ArrowRight":{const t=a.indexOf(e.currentTarget)+1;r=a[t]??a[0];break}case"ArrowLeft":{const t=a.indexOf(e.currentTarget)-1;r=a[t]??a[a.length-1];break}}r?.focus()};return(0,f.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":r},e),children:d.map(({value:e,label:r,attributes:n})=>(0,f.jsx)("li",{role:"tab",tabIndex:t===e?0:-1,"aria-selected":t===e,ref:e=>{a.push(e)},onKeyDown:l,onClick:o,...n,className:(0,s.A)("tabs__item",g.tabItem,n?.className,{"tabs__item--active":t===e}),children:r??e},e))})}function y({lazy:e,children:r,selectedValue:t}){const i=(Array.isArray(r)?r:[r]).filter(Boolean);if(e){const e=i.find(e=>e.props.value===t);return e?(0,n.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,r)=>(0,n.cloneElement)(e,{key:r,hidden:e.props.value!==t}))})}function v(e){const r=u(e);return(0,f.jsxs)("div",{className:(0,s.A)("tabs-container",g.tabList),children:[(0,f.jsx)(b,{...r,...e}),(0,f.jsx)(y,{...r,...e})]})}function I(e){const r=(0,m.A)();return(0,f.jsx)(v,{...e,children:h(e.children)},String(r))}},17343:(e,r,t)=>{t.r(r),t.d(r,{CH:()=>j,assets:()=>x,chCodeConfig:()=>p,contentTitle:()=>h,default:()=>g,frontMatter:()=>l,metadata:()=>n,toc:()=>u});const n=JSON.parse('{"id":"Components/components-vector-stores","title":"Vector Stores","description":"Langflow\'s Vector Store components are used to read and write vector data, including embedding storage, vector search, Graph RAG traversals, and specialized provider-specific search, such as OpenSearch, Elasticsearch, and Vectara.","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":"Data","permalink":"/components-data"},"next":{"title":"Processing components","permalink":"/components-processing"}}');var s=t(74848),i=t(28453),d=t(24754),a=t(17886),c=t(11470),o=t(19365);const l={title:"Vector Stores",slug:"/components-vector-stores"},h=void 0,x={},j={annotations:d.hk,Code:d.Cy},p={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},u=[{value:"Use Vector Store components in a flow",id:"use-vector-store-components-in-a-flow",level:2},{value:"Hidden parameters",id:"hidden-parameters",level:3},{value:"Search results output",id:"search-results-output",level:3},{value:"Vector store instances",id:"vector-store-instances",level:3},{value:"Apache Cassandra",id:"apache-cassandra",level:2},{value:"Cassandra",id:"cassandra",level:3},{value:"Cassandra Graph",id:"cassandra-graph",level:3},{value:"Chroma",id:"chroma",level:2},{value:"Chroma DB",id:"chroma-db",level:3},{value:"Local DB",id:"local-db",level:3},{value:"Clickhouse",id:"clickhouse",level:2},{value:"Couchbase",id:"couchbase",level:2},{value:"DataStax",id:"datastax",level:2},{value:"Astra DB",id:"astra-db",level:3},{value:"Astra DB Graph",id:"astra-db-graph",level:3},{value:"Graph RAG",id:"graph-rag",level:3},{value:"Hyper-Converged Database (HCD)",id:"hyper-converged-database-hcd",level:3},{value:"Elasticsearch",id:"elasticsearch",level:2},{value:"FAISS",id:"faiss",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 Platform",id:"vectara-platform",level:2},{value:"Vectara",id:"vectara",level:3},{value:"Vectara RAG",id:"vectara-rag",level:3},{value:"Weaviate",id:"weaviate",level:2}];function m(e){const r={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,i.R)(),...e.components},{Details:n}=r;return j||f("CH",!1),j.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)(r.p,{children:["Langflow's ",(0,s.jsx)(r.strong,{children:"Vector Store"})," components are used to read and write vector data, including embedding storage, vector search, Graph RAG traversals, and specialized provider-specific search, such as OpenSearch, Elasticsearch, and Vectara."]}),"\n",(0,s.jsx)(r.p,{children:"These components are critical for vector search applications, such as Retrieval Augmented Generation (RAG) chatbots that need to retrieve relevant context from large datasets."}),"\n",(0,s.jsxs)(r.p,{children:["Most of these components connect to a specific vector database provider, but some components support multiple providers or platforms.\nFor example, the ",(0,s.jsx)(r.strong,{children:"Cassandra"})," vector store component can connect to self-managed Apache Cassandra-based clusters as well as Astra DB, which is a managed Cassandra DBaaS."]}),"\n",(0,s.jsxs)(r.p,{children:["Other types of storage, like traditional structured databases and chat memory, are handled through other components like the ",(0,s.jsxs)(r.a,{href:"/components-data#sql-database",children:[(0,s.jsx)(r.strong,{children:"SQL Database"})," component"]})," or the ",(0,s.jsxs)(r.a,{href:"/components-helpers#message-history",children:[(0,s.jsx)(r.strong,{children:"Message History"})," component"]}),"."]}),"\n",(0,s.jsx)(r.h2,{id:"use-vector-store-components-in-a-flow",children:"Use Vector Store components in a flow"}),"\n",(0,s.jsx)(r.admonition,{type:"tip",children:(0,s.jsxs)(r.p,{children:["For a tutorial using ",(0,s.jsx)(r.strong,{children:"Vector Store"})," components in a flow, see ",(0,s.jsx)(r.a,{href:"/chat-with-rag",children:"Create a vector RAG chatbot"}),"."]})}),"\n",(0,s.jsxs)(r.p,{children:["The following steps introduce the use of ",(0,s.jsx)(r.strong,{children:"Vector Store"})," components in a flow, including configuration details, how the components work when you run a flow, why you might need multiple ",(0,s.jsx)(r.strong,{children:"Vector Store"})," components in one flow, and useful supporting components, such as ",(0,s.jsx)(r.strong,{children:"Embedding Model"})," and ",(0,s.jsx)(r.strong,{children:"Parser"})," components."]}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["Create a flow with the ",(0,s.jsx)(r.strong,{children:"Vector Store RAG"})," template."]}),"\n",(0,s.jsxs)(r.p,{children:["This template has two subflows.\nThe ",(0,s.jsx)(r.strong,{children:"Load Data"})," subflow loads embeddings and content into a vector database, and the ",(0,s.jsx)(r.strong,{children:"Retriever"})," subflow runs a vector search to retrieve relevant context based on a user's query."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["Configure the database connection for both ",(0,s.jsxs)(r.a,{href:"#astra-db",children:[(0,s.jsx)(r.strong,{children:"Astra DB"})," components"]}),", or replace them with another pair of ",(0,s.jsx)(r.strong,{children:"Vector Store"})," components of your choice.\nMake sure the components connect to the same vector store, and that the component in the ",(0,s.jsx)(r.strong,{children:"Retriever"})," subflow is able to run a similarity search."]}),"\n",(0,s.jsxs)(r.p,{children:["The parameters you set in each ",(0,s.jsx)(r.strong,{children:"Vector Store"})," component depend on the component's role in your flow.\nIn this example, the ",(0,s.jsx)(r.strong,{children:"Load Data"})," subflow ",(0,s.jsx)(r.em,{children:"writes"})," to the vector store, whereas the ",(0,s.jsx)(r.strong,{children:"Retriever"})," subflow ",(0,s.jsx)(r.em,{children:"reads"})," from the vector store.\nTherefore, search-related parameters are only relevant to the ",(0,s.jsx)(r.strong,{children:"Vector Search"})," component in the ",(0,s.jsx)(r.strong,{children:"Retriever"})," subflow."]}),"\n",(0,s.jsxs)(r.p,{children:["For information about specific configuration parameters, see the section of this page for your chosen ",(0,s.jsx)(r.strong,{children:"Vector Store"})," component and ",(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsx)(r.p,{children:"To configure the embedding model, do one of the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Use an OpenAI model"}),": In both ",(0,s.jsx)(r.strong,{children:"OpenAI Embeddings"})," components, enter your OpenAI API key.\nYou can use the default model or select a different OpenAI embedding model."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Use another provider"}),": Replace the ",(0,s.jsx)(r.strong,{children:"OpenAI Embeddings"})," components with another pair of ",(0,s.jsxs)(r.a,{href:"/components-embedding-models",children:[(0,s.jsx)(r.strong,{children:"Embedding Model"})," component"]})," of your choice, and then configure the parameters and credentials accordingly."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Use Astra DB vectorize"}),": If you are using an Astra DB vector store that has a vectorize integration, you can remove both ",(0,s.jsx)(r.strong,{children:"OpenAI Embeddings"})," components.\nIf you do this, the vectorize integration automatically generates embeddings from the ",(0,s.jsx)(r.strong,{children:"Ingest Data"})," (in the ",(0,s.jsx)(r.strong,{children:"Load Data"})," subflow) and ",(0,s.jsx)(r.strong,{children:"Search Query"})," (in the ",(0,s.jsx)(r.strong,{children:"Retriever"})," subflow)."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(r.admonition,{type:"tip",children:(0,s.jsxs)(r.p,{children:["If your vector store already contains embeddings, make sure your ",(0,s.jsx)(r.strong,{children:"Embedding Model"})," components use the same model as your previous embeddings.\nMixing embedding models in the same vector store can produce inaccurate search results."]})}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["Recommended: In the ",(0,s.jsxs)(r.a,{href:"/components-processing#split-text",children:[(0,s.jsx)(r.strong,{children:"Split Text"})," component"]}),", optimize the chunking settings for your embedding model.\nFor example, if your embedding model has a token limit of 512, then the ",(0,s.jsx)(r.strong,{children:"Chunk Size"})," parameter must not exceed that limit."]}),"\n",(0,s.jsxs)(r.p,{children:["Additionally, because the ",(0,s.jsx)(r.strong,{children:"Retriever"})," subflow passes the chat input directly to the ",(0,s.jsx)(r.strong,{children:"Vector Store"})," component for vector search, make sure that your chat input string doesn't exceed your embedding model's limits.\nFor this example, you can enter a query that is within the limits; however, in a production environment, you might need to implement additional checks or preprocessing steps to ensure compliance.\nFor example, use additional components to prepare the chat input before running the vector search, or enforce chat input limits in your application code."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["In the ",(0,s.jsx)(r.strong,{children:"Language Model"})," component, enter your OpenAI API key, or select a different provider and model to use for the chat portion of the flow."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["Run the ",(0,s.jsx)(r.strong,{children:"Load Data"})," subflow to populate your vector store.\nIn the ",(0,s.jsx)(r.strong,{children:"File"})," component, select one or more files, and then click ",(0,s.jsx)(a.A,{name:"Play","aria-hidden":"true"})," ",(0,s.jsx)(r.strong,{children:"Run component"})," on the ",(0,s.jsx)(r.strong,{children:"Vector Store"})," component in the ",(0,s.jsx)(r.strong,{children:"Load Data"})," subflow."]}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Load Data"})," subflow loads files from your local machine, chunks them, generates embeddings for the chunks, and then stores the chunks and their embeddings in the vector database."]}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.img,{alt:"Embedding data into a vector store",src:t(7685).A+"",width:"4000",height:"2512"})}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Load Data"})," subflow is separate from the ",(0,s.jsx)(r.strong,{children:"Retriever"})," subflow because you probably won't run it every time you use the chat.\nYou can run the ",(0,s.jsx)(r.strong,{children:"Load Data"})," subflow as needed to preload or update the data in your vector store.\nThen, your chat interactions only use the components that are necessary for chat."]}),"\n",(0,s.jsxs)(r.p,{children:["If your vector store already contains data that you want to use for vector search, then you don't need to run the ",(0,s.jsx)(r.strong,{children:"Load Data"})," subflow."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["Open the ",(0,s.jsx)(r.strong,{children:"Playground"})," and start chatting to run the ",(0,s.jsx)(r.strong,{children:"Retriever"})," subflow."]}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Retriever"})," subflow generates an embedding from chat input, runs a vector search to retrieve similar content from your vector store, parses the search results into supplemental context for the LLM, and then uses the LLM to generate a natural language response to your query.\nThe LLM uses the vector search results along with its internal training data and tools, such as basic web search and datetime information, to produce the response."]}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.img,{alt:"Retrieval from a vector store",src:t(67719).A+"",width:"4000",height:"1324"})}),"\n",(0,s.jsxs)(r.p,{children:["To avoid passing the entire block of raw search results to the LLM, the ",(0,s.jsx)(r.strong,{children:"Parser"})," component extracts ",(0,s.jsx)(r.code,{children:"text"})," strings from the search results ",(0,s.jsx)(r.code,{children:"Data"})," object, and then passes them to the ",(0,s.jsx)(r.strong,{children:"Prompt Template"})," component in ",(0,s.jsx)(r.code,{children:"Message"})," format.\nFrom there, the strings and other template content are compiled into natural language instructions for the LLM."]}),"\n",(0,s.jsxs)(r.p,{children:["You can use other components for this transformation, such as the ",(0,s.jsx)(r.strong,{children:"Data Operations"})," component, depending on how you want to use the search results."]}),"\n",(0,s.jsxs)(r.p,{children:["To view the raw search results, click ",(0,s.jsx)(a.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,s.jsx)(r.strong,{children:"Inspect output"})," on the ",(0,s.jsx)(r.strong,{children:"Vector Store"})," component after running the ",(0,s.jsx)(r.strong,{children:"Retriever"})," subflow."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(r.h3,{id:"hidden-parameters",children:"Hidden parameters"}),"\n",(0,s.jsxs)(r.p,{children:["You can inspect a ",(0,s.jsx)(r.strong,{children:"Vector Store"})," component's parameters to learn more about the inputs it accepts, the features it supports, and how to configure it."]}),"\n",(0,s.jsxs)(r.p,{children:["Many input parameters for ",(0,s.jsx)(r.strong,{children:"Vector Store"})," components are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,s.jsx)(a.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(r.strong,{children:"Controls"})," in each ",(0,s.jsx)(r.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(0,s.jsxs)(r.p,{children:["Some parameters are conditional, and they are only available after you set other parameters or select specific options for other parameters.\nConditional parameters may not be visible on the ",(0,s.jsx)(r.strong,{children:"Controls"})," pane until you set the required dependencies.\nHowever, all parameters are always listed in a ",(0,s.jsx)(r.a,{href:"/concepts-components#component-code",children:"component's code"}),"."]}),"\n",(0,s.jsx)(r.p,{children:"For information about a specific component's parameters, see the provider's documentation and the component details."}),"\n",(0,s.jsx)(r.h3,{id:"search-results-output",children:"Search results output"}),"\n",(0,s.jsxs)(r.p,{children:["If you use a ",(0,s.jsx)(r.strong,{children:"Vector Store"})," component to query your vector store, it produces search results that you can pass to downstream components in your flow as a list of ",(0,s.jsx)(r.a,{href:"/data-types#data",children:(0,s.jsx)(r.code,{children:"Data"})})," objects or a tabular ",(0,s.jsx)(r.a,{href:"/data-types#dataframe",children:(0,s.jsx)(r.code,{children:"DataFrame"})}),".\nIf both types are supported, you can set the format near the component's output port in the visual editor."]}),"\n",(0,s.jsxs)(r.p,{children:["The exception to this pattern is the ",(0,s.jsx)(r.strong,{children:"Vectara RAG"})," component, which outputs only an ",(0,s.jsx)(r.code,{children:"answer"})," string in ",(0,s.jsx)(r.a,{href:"/data-types#message",children:(0,s.jsx)(r.code,{children:"Message"})})," format."]}),"\n",(0,s.jsx)(r.h3,{id:"vector-store-instances",children:"Vector store instances"}),"\n",(0,s.jsxs)(r.p,{children:["Because Langflow is based on LangChain, ",(0,s.jsx)(r.strong,{children:"Vector Store"})," components use an instance of ",(0,s.jsx)(r.a,{href:"https://python.langchain.com/docs/integrations/vectorstores/",children:"LangChain vector store"})," to drive the underlying vector search functions.\nIn the component code, this is often instantiated as ",(0,s.jsx)(r.code,{children:"vector_store"}),", but some components use a different name, such as the provider name."]}),"\n",(0,s.jsxs)(r.p,{children:["For the ",(0,s.jsx)(r.strong,{children:"Cassandra Graph"})," and ",(0,s.jsx)(r.strong,{children:"Astra DB Graph"})," components, ",(0,s.jsx)(r.code,{children:"vector_store"})," is an instance of ",(0,s.jsx)(r.a,{href:"https://python.langchain.com/api_reference/community/graph_vectorstores.html",children:"LangChain graph vector store"}),"."]}),"\n",(0,s.jsxs)(r.p,{children:["These instances are provider-specific and configured according to the component's parameters.\nFor example, the ",(0,s.jsx)(r.strong,{children:"Redis"})," component creates an instance of ",(0,s.jsx)(r.a,{href:"https://python.langchain.com/docs/integrations/vectorstores/redis/",children:(0,s.jsx)(r.code,{children:"RedisVectorStore"})})," based on the component's parameters, such as the connection string, index name, and schema."]}),"\n",(0,s.jsx)(r.p,{children:"Some LangChain classes don't expose all possible options as component parameters.\nDepending on the provider, these options might use default values or allow modification through environment variables, if they are supported in Langflow.\nFor information about specific options, see the LangChain API reference and provider documentation."}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Vector Store Connection ports"}),(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Astra DB"})," and ",(0,s.jsx)(r.strong,{children:"OpenSearch"})," components have an additional ",(0,s.jsx)(r.strong,{children:"Vector Store Connection"})," output.\nThis output can only connect to a ",(0,s.jsx)(r.code,{children:"VectorStore"})," input port, and it was intended for use with dedicated Graph RAG components."]}),(0,s.jsxs)(r.p,{children:["The only non-legacy component that supports this input is the ",(0,s.jsx)(r.strong,{children:"Graph RAG"})," component, which was meant as a Graph RAG extension to the ",(0,s.jsx)(r.strong,{children:"Astra DB"})," component.\nInstead, you can use the ",(0,s.jsx)(r.strong,{children:"Astra DB Graph"})," component that includes both the vector store connection and Graph RAG functionality.\nOpenSearch instances support Graph traversal through built-in RAG functionality and plugins."]})]}),"\n",(0,s.jsx)(r.h2,{id:"apache-cassandra",children:"Apache Cassandra"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Cassandra"})," and ",(0,s.jsx)(r.strong,{children:"Cassandra Graph"})," components can be used with Cassandra clusters that support vector search, including Astra DB."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://cassandra.apache.org/doc/latest/cassandra/vector-search/overview.html",children:"Vector search in Cassandra"})}),"\n"]}),"\n",(0,s.jsx)(r.h3,{id:"cassandra",children:"Cassandra"}),"\n",(0,s.jsxs)(r.p,{children:["Use the ",(0,s.jsx)(r.strong,{children:"Cassandra"})," component to read or write to a Cassandra vector store using a ",(0,s.jsx)(r.code,{children:"CassandraVectorStore"})," instance."]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Cassandra parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"database_ref"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Contact points for the database or an Astra database ID."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"username"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Username for the database. Leave empty for Astra DB."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"token"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. User password for the database or an Astra application token."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"keyspace"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsxs)(r.td,{children:["Input parameter. The name of the keyspace containing the vector store specified in ",(0,s.jsx)(r.strong,{children:"Table Name"})," (",(0,s.jsx)(r.code,{children:"table_name"}),")."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"table_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The name of the table or collection that is the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ttl_seconds"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. Time-to-live for added texts, if supported by the cluster. Only relevant for writes."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"batch_size"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. Amount of records to process in a single batch."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"setup_mode"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Configuration mode for setting up a Cassandra table."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"cluster_kwargs"}),(0,s.jsx)(r.td,{children:"Dict"}),(0,s.jsx)(r.td,{children:"Input parameter. Additional keyword arguments for a Cassandra cluster."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_query"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Query string for similarity search. Only relevant for reads."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Data"}),(0,s.jsx)(r.td,{children:"Input parameter. Data to be loaded into the vector store as raw chunks and embeddings. Only relevant for writes."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. Embedding function to use."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. Number of results to return in search. Only relevant for reads."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_type"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Type of search to perform. Only relevant for reads."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_score_threshold"}),(0,s.jsx)(r.td,{children:"Float"}),(0,s.jsx)(r.td,{children:"Input parameter. Minimum similarity score for search results. Only relevant for reads."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_filter"}),(0,s.jsx)(r.td,{children:"Dict"}),(0,s.jsx)(r.td,{children:"Input parameter. An optional dictionary of metadata search filters to apply in addition to vector search. Only relevant for reads."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"body_search"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Document textual search terms. Only relevant for reads."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"enable_body_search"}),(0,s.jsx)(r.td,{children:"Boolean"}),(0,s.jsx)(r.td,{children:"Input parameter. Flag to enable body search. Only relevant for reads."})]})]})]})]}),"\n",(0,s.jsx)(r.h3,{id:"cassandra-graph",children:"Cassandra Graph"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Cassandra Graph"})," component uses a ",(0,s.jsx)(r.code,{children:"CassandraGraphVectorStore"})," instance for graph traversal and graph-based document retrieval in a compatible Cassandra cluster.\nIt also supports writing to the vector store."]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Cassandra Graph parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Display Name"}),(0,s.jsx)(r.th,{children:"Info"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"database_ref"}),(0,s.jsx)(r.td,{children:"Contact Points / Astra Database ID"}),(0,s.jsx)(r.td,{children:"Input parameter. The contact points for the database or an Astra database ID. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"username"}),(0,s.jsx)(r.td,{children:"Username"}),(0,s.jsx)(r.td,{children:"Input parameter. The username for the database. Leave empty for Astra DB."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"token"}),(0,s.jsx)(r.td,{children:"Password / Astra DB Token"}),(0,s.jsx)(r.td,{children:"Input parameter. The user password for the database or an Astra application token. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"keyspace"}),(0,s.jsx)(r.td,{children:"Keyspace"}),(0,s.jsxs)(r.td,{children:["Input parameter. The name of the keyspace containing the vector store specified in ",(0,s.jsx)(r.strong,{children:"Table Name"})," (",(0,s.jsx)(r.code,{children:"table_name"}),"). Required."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"table_name"}),(0,s.jsx)(r.td,{children:"Table Name"}),(0,s.jsx)(r.td,{children:"Input parameter. The name of the table or collection that is the vector store. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"setup_mode"}),(0,s.jsx)(r.td,{children:"Setup Mode"}),(0,s.jsxs)(r.td,{children:["Input parameter. The configuration mode for setting up the Cassandra table. The options are ",(0,s.jsx)(r.code,{children:"Sync"})," (default) or ",(0,s.jsx)(r.code,{children:"Off"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"cluster_kwargs"}),(0,s.jsx)(r.td,{children:"Cluster arguments"}),(0,s.jsx)(r.td,{children:"Input parameter. An optional dictionary of additional keyword arguments for the Cassandra cluster."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_query"}),(0,s.jsx)(r.td,{children:"Search Query"}),(0,s.jsx)(r.td,{children:"Input parameter. The query string for similarity search. Only relevant for reads."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Ingest Data"}),(0,s.jsx)(r.td,{children:"Input parameter. Data to be loaded into the vector store as raw chunks and embeddings. Only relevant for writes."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embedding"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding model to use."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Number of Results"}),(0,s.jsx)(r.td,{children:"Input parameter. The number of results to return in similarity search. Only relevant for reads. Default: 4."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_type"}),(0,s.jsx)(r.td,{children:"Search Type"}),(0,s.jsxs)(r.td,{children:["Input parameter. The search type to use. The options are ",(0,s.jsx)(r.code,{children:"Traversal"})," (default), ",(0,s.jsx)(r.code,{children:"MMR Traversal"}),", ",(0,s.jsx)(r.code,{children:"Similarity"}),", ",(0,s.jsx)(r.code,{children:"Similarity with score threshold"}),", or ",(0,s.jsx)(r.code,{children:"MMR (Max Marginal Relevance)"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"depth"}),(0,s.jsx)(r.td,{children:"Depth of traversal"}),(0,s.jsxs)(r.td,{children:["Input parameter. The maximum depth of edges to traverse. Only relevant if ",(0,s.jsx)(r.strong,{children:"Search Type"})," (",(0,s.jsx)(r.code,{children:"search_type"}),") is ",(0,s.jsx)(r.code,{children:"Traversal"})," or ",(0,s.jsx)(r.code,{children:"MMR Traversal"}),". Default: 1."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_score_threshold"}),(0,s.jsx)(r.td,{children:"Search Score Threshold"}),(0,s.jsxs)(r.td,{children:["Input parameter. The minimum similarity score threshold for search results. Only relevant for reads using the ",(0,s.jsx)(r.code,{children:"Similarity with score threshold"})," search type."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_filter"}),(0,s.jsx)(r.td,{children:"Search Metadata Filter"}),(0,s.jsx)(r.td,{children:"Input parameter. An optional dictionary of metadata search filters to apply in addition to graph traversal and similarity search."})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"chroma",children:"Chroma"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Chroma DB"})," and ",(0,s.jsx)(r.strong,{children:"Local DB"})," components read and write to Chroma vector stores using an instance of ",(0,s.jsx)(r.code,{children:"Chroma"})," vector store.\nIncludes support for remote or in-memory instances with or without persistence."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://docs.trychroma.com/",children:"Chroma documentation"})}),"\n"]}),"\n",(0,s.jsx)(r.h3,{id:"chroma-db",children:"Chroma DB"}),"\n",(0,s.jsxs)(r.p,{children:["You can use the ",(0,s.jsx)(r.strong,{children:"Chroma DB"})," component to read and write to a Chroma database in local storage or a remote Chroma server with options for persistence and caching.\nWhen writing, the component can create a new database or collection at the specified location."]}),"\n",(0,s.jsx)(r.admonition,{type:"tip",children:(0,s.jsx)(r.p,{children:"An ephemeral (non-persistent) local Chroma vector store is helpful for testing vector search flows where you don't need to retain the database."})}),"\n",(0,s.jsxs)(r.p,{children:["The following example flow uses one ",(0,s.jsx)(r.strong,{children:"Chroma DB"})," component for both reads and writes:"]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["When writing, it splits ",(0,s.jsx)(r.code,{children:"Data"})," from a ",(0,s.jsxs)(r.a,{href:"/components-data#url",children:[(0,s.jsx)(r.strong,{children:"URL"})," component"]})," into chunks, computes embeddings with attached ",(0,s.jsx)(r.strong,{children:"Embedding Model"})," component, and then loads the chunks and embeddings into the Chroma vector store.\nTo trigger writes, click ",(0,s.jsx)(a.A,{name:"Play","aria-hidden":"true"})," ",(0,s.jsx)(r.strong,{children:"Run component"})," on the ",(0,s.jsx)(r.strong,{children:"Chroma DB"})," component."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["When reading, it uses chat input to perform a similarity search on the vector store, and then print the search results to the chat.\nTo trigger reads, open the ",(0,s.jsx)(r.strong,{children:"Playground"})," and enter a chat message."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.p,{children:["After running the flow once, you can click ",(0,s.jsx)(a.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,s.jsx)(r.strong,{children:"Inspect Output"})," on each component to understand how the data transformed as it passed from component to component."]}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.img,{alt:"ChromaDB receiving split text",src:t(88690).A+"",width:"4000",height:"2694"})}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Chroma DB parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Collection Name"})," (",(0,s.jsx)(r.code,{children:"collection_name"}),")"]}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsxs)(r.td,{children:["Input parameter. The name of your Chroma vector store collection. Default: ",(0,s.jsx)(r.code,{children:"langflow"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Persist Directory"})," (",(0,s.jsx)(r.code,{children:"persist_directory"}),")"]}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsxs)(r.td,{children:["Input parameter. To persist the Chroma database, enter a relative or absolute path to a directory to store the ",(0,s.jsx)(r.code,{children:"chroma.sqlite3"})," file. Leave empty for an ephemeral database. When reading or writing to an existing persistent database, specify the path to the persistent directory."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Ingest Data"})," (",(0,s.jsx)(r.code,{children:"ingest_data"}),")"]}),(0,s.jsx)(r.td,{children:"Data or DataFrame"}),(0,s.jsxs)(r.td,{children:["Input parameter. ",(0,s.jsx)(r.code,{children:"Data"})," or ",(0,s.jsx)(r.code,{children:"DataFrame"})," input containing the records to write to the vector store. Only relevant for writes."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Search Query"})," (",(0,s.jsx)(r.code,{children:"search_query"}),")"]}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The query to use for vector search. Only relevant for reads."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Cache Vector Store"})," (",(0,s.jsx)(r.code,{children:"cache_vector_store"}),")"]}),(0,s.jsx)(r.td,{children:"Boolean"}),(0,s.jsx)(r.td,{children:"Input parameter. If true, the component caches the vector store in memory for faster reads. Default: Enabled (true)."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Embedding"})," (",(0,s.jsx)(r.code,{children:"embedding"}),")"]}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsxs)(r.td,{children:["Input parameter. The embedding function to use for the vector store. By default, Chroma DB uses its built-in embeddings model, or you can attach an ",(0,s.jsx)(r.strong,{children:"Embedding Model"})," component to use a different provider or model."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"CORS Allow Origins"})," (",(0,s.jsx)(r.code,{children:"chroma_server_cors_allow_origins"}),")"]}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The CORS allow origins for the Chroma server."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Chroma Server Host"})," (",(0,s.jsx)(r.code,{children:"chroma_server_host"}),")"]}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The host for the Chroma server."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Chroma Server HTTP Port"})," (",(0,s.jsx)(r.code,{children:"chroma_server_http_port"}),")"]}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. The HTTP port for the Chroma server."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Chroma Server gRPC Port"})," (",(0,s.jsx)(r.code,{children:"chroma_server_grpc_port"}),")"]}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. The gRPC port for the Chroma server."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Chroma Server SSL Enabled"})," (",(0,s.jsx)(r.code,{children:"chroma_server_ssl_enabled"}),")"]}),(0,s.jsx)(r.td,{children:"Boolean"}),(0,s.jsx)(r.td,{children:"Input parameter. Enable SSL for the Chroma server."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Allow Duplicates"})," (",(0,s.jsx)(r.code,{children:"allow_duplicates"}),")"]}),(0,s.jsx)(r.td,{children:"Boolean"}),(0,s.jsxs)(r.td,{children:["Input parameter. If true (default), writes don't check for existing duplicates in the collection, allowing you to store multiple copies of the same content. If false, writes won't add documents that match existing documents already present in the collection. If false, it can strictly enforce deduplication by searching the entire collection or only search the number of records, specified in ",(0,s.jsx)(r.code,{children:"limit"}),". Only relevant for writes."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Search Type"})," (",(0,s.jsx)(r.code,{children:"search_type"}),")"]}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsxs)(r.td,{children:["Input parameter. The type of search to perform, either ",(0,s.jsx)(r.code,{children:"Similarity"})," or ",(0,s.jsx)(r.code,{children:"MMR"}),". Only relevant for reads."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Number of Results"})," (",(0,s.jsx)(r.code,{children:"number_of_results"}),")"]}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsxs)(r.td,{children:["Input parameter. The number of search results to return. Default: ",(0,s.jsx)(r.code,{children:"10"}),". Only relevant for reads."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Limit"})," (",(0,s.jsx)(r.code,{children:"limit"}),")"]}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsxs)(r.td,{children:["Input parameter. Limit the number of records to compare when ",(0,s.jsx)(r.strong,{children:"Allow Duplicates"})," is false. This can help improve performance when writing to large collections, but it can result in some duplicate records. Only relevant for writes."]})]})]})]})]}),"\n",(0,s.jsx)(r.h3,{id:"local-db",children:"Local DB"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Local DB"})," component reads and writes to a persistent, in-memory Chroma DB instance intended for use with Langflow.\nIt has separate modes for reads and writes, automatic collection management, and default persistence in your Langflow cache directory."]}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.img,{alt:"A basic flow with a Local DB component in Retrieve mode.",src:t(60159).A+"",width:"4000",height:"2188"})}),"\n",(0,s.jsxs)(r.p,{children:["Set the ",(0,s.jsx)(r.strong,{children:"Mode"})," parameter to reflect the operation you want the component to perform, and the configure the other parameters accordingly.\nSome parameters are only available for one mode."]}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsxs)(o.A,{value:"ingest",label:"Ingest",children:[(0,s.jsxs)(r.p,{children:["To create or write to your local Chroma vector store, use ",(0,s.jsx)(r.strong,{children:"Ingest"})," mode."]}),(0,s.jsxs)(r.p,{children:["The following parameters are available in ",(0,s.jsx)(r.strong,{children:"Ingest"})," mode:"]}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Name Your Collection"})," (",(0,s.jsx)(r.code,{children:"collection_name"}),")"]}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsxs)(r.td,{children:["Input parameter. The name for your Chroma vector store collection. Default: ",(0,s.jsx)(r.code,{children:"langflow"}),". Only available in ",(0,s.jsx)(r.strong,{children:"Ingest"})," mode."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Persist Directory"})," (",(0,s.jsx)(r.code,{children:"persist_directory"}),")"]}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsxs)(r.td,{children:["Input parameter. The base directory where you want to create and persist the vector store. If you use the ",(0,s.jsx)(r.strong,{children:"Local DB"})," component in multiple flows or to create multiple collections, collections are stored at ",(0,s.jsx)(r.code,{children:"$PERSISTENT_DIRECTORY/vector_stores/$COLLECTION_NAME"}),". If not specified, the default location is your Langflow cache directory (",(0,s.jsx)(r.code,{children:"LANGFLOW_CONFIG_DIR"}),"). For more information, see ",(0,s.jsx)(r.a,{href:"/memory",children:"Memory management options"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Embedding"})," (",(0,s.jsx)(r.code,{children:"embedding"}),")"]}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding function to use for the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Allow Duplicates"})," (",(0,s.jsx)(r.code,{children:"allow_duplicates"}),")"]}),(0,s.jsx)(r.td,{children:"Boolean"}),(0,s.jsxs)(r.td,{children:["Input parameter. If true (default), writes don't check for existing duplicates in the collection, allowing you to store multiple copies of the same content. If false, writes won't add documents that match existing documents already present in the collection. If false, it can strictly enforce deduplication by searching the entire collection or only search the number of records, specified in ",(0,s.jsx)(r.code,{children:"limit"}),". Only available in ",(0,s.jsx)(r.strong,{children:"Ingest"})," mode."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Ingest Data"})," (",(0,s.jsx)(r.code,{children:"ingest_data"}),")"]}),(0,s.jsx)(r.td,{children:"Data or DataFrame"}),(0,s.jsxs)(r.td,{children:["Input parameter. The records to write to the collection. Records are embedded and indexed for semantic search. Only available in ",(0,s.jsx)(r.strong,{children:"Ingest"})," mode."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Limit"})," (",(0,s.jsx)(r.code,{children:"limit"}),")"]}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsxs)(r.td,{children:["Input parameter. Limit the number of records to compare when ",(0,s.jsx)(r.strong,{children:"Allow Duplicates"})," is false. This can help improve performance when writing to large collections, but it can result in some duplicate records. Only available in ",(0,s.jsx)(r.strong,{children:"Ingest"})," mode."]})]})]})]})]}),(0,s.jsxs)(o.A,{value:"retrieve",label:"Retrieve",children:[(0,s.jsxs)(r.p,{children:["To read from your local Chroma vector store, use ",(0,s.jsx)(r.strong,{children:"Retrieve"})," mode."]}),(0,s.jsxs)(r.p,{children:["The following parameters are available in ",(0,s.jsx)(r.strong,{children:"Retrieve"})," mode:"]}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Persist Directory"})," (",(0,s.jsx)(r.code,{children:"persist_directory"}),")"]}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsxs)(r.td,{children:["Input parameter. The base directory where you want to create and persist the vector store. If you use the ",(0,s.jsx)(r.strong,{children:"Local DB"})," component in multiple flows or to create multiple collections, collections are stored at ",(0,s.jsx)(r.code,{children:"$PERSISTENT_DIRECTORY/vector_stores/$COLLECTION_NAME"}),". If not specified, the default location is your Langflow cache directory (",(0,s.jsx)(r.code,{children:"LANGFLOW_CONFIG_DIR"}),"). For more information, see ",(0,s.jsx)(r.a,{href:"/memory",children:"Memory management options"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Existing Collections"})," (",(0,s.jsx)(r.code,{children:"existing_collections"}),")"]}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsxs)(r.td,{children:["Input parameter. Select a previously-created collection to search. Only available in ",(0,s.jsx)(r.strong,{children:"Retrieve"})," mode."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Embedding"})," (",(0,s.jsx)(r.code,{children:"embedding"}),")"]}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding function to use for the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Search Type"})," (",(0,s.jsx)(r.code,{children:"search_type"}),")"]}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsxs)(r.td,{children:["Input parameter. The type of search to perform, either ",(0,s.jsx)(r.code,{children:"Similarity"})," or ",(0,s.jsx)(r.code,{children:"MMR"}),". Only available in ",(0,s.jsx)(r.strong,{children:"Retrieve"})," mode."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Search Query"})," (",(0,s.jsx)(r.code,{children:"search_query"}),")"]}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsxs)(r.td,{children:["Input parameter. Enter a query for similarity search. Only available in ",(0,s.jsx)(r.strong,{children:"Retrieve"})," mode."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Number of Results"})," (",(0,s.jsx)(r.code,{children:"number_of_results"}),")"]}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsxs)(r.td,{children:["Input parameter. Number of search results to return. Default: 10. Only available in ",(0,s.jsx)(r.strong,{children:"Retrieve"})," mode."]})]})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"clickhouse",children:"Clickhouse"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Clickhouse"})," component reads and writes to a Clickhouse vector store using an instance of ",(0,s.jsx)(r.code,{children:"Clickhouse"})," vector store."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://clickhouse.com/docs/en/intro",children:"Clickhouse Documentation"})}),"\n"]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Clickhouse parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Display Name"}),(0,s.jsx)(r.th,{children:"Info"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"host"}),(0,s.jsx)(r.td,{children:"hostname"}),(0,s.jsxs)(r.td,{children:["Input parameter. The Clickhouse server hostname. Required. Default: ",(0,s.jsx)(r.code,{children:"localhost"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"port"}),(0,s.jsx)(r.td,{children:"port"}),(0,s.jsxs)(r.td,{children:["Input parameter. The Clickhouse server port. Required. Default: ",(0,s.jsx)(r.code,{children:"8123"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"database"}),(0,s.jsx)(r.td,{children:"database"}),(0,s.jsx)(r.td,{children:"Input parameter. The Clickhouse database name. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"table"}),(0,s.jsx)(r.td,{children:"Table name"}),(0,s.jsx)(r.td,{children:"Input parameter. The Clickhouse table name. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"username"}),(0,s.jsx)(r.td,{children:"Username"}),(0,s.jsx)(r.td,{children:"Input parameter. Clickhouse username for authentication. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"password"}),(0,s.jsx)(r.td,{children:"Password"}),(0,s.jsx)(r.td,{children:"Input parameter. Clickhouse password for authentication. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"index_type"}),(0,s.jsx)(r.td,{children:"index_type"}),(0,s.jsxs)(r.td,{children:["Input parameter. Type of the index, either ",(0,s.jsx)(r.code,{children:"annoy"})," (default) or ",(0,s.jsx)(r.code,{children:"vector_similarity"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"metric"}),(0,s.jsx)(r.td,{children:"metric"}),(0,s.jsxs)(r.td,{children:["Input parameter. Metric to compute distance for similarity search. The options are ",(0,s.jsx)(r.code,{children:"angular"})," (default), ",(0,s.jsx)(r.code,{children:"euclidean"}),", ",(0,s.jsx)(r.code,{children:"manhattan"}),", ",(0,s.jsx)(r.code,{children:"hamming"}),", ",(0,s.jsx)(r.code,{children:"dot"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"secure"}),(0,s.jsx)(r.td,{children:"Use HTTPS/TLS"}),(0,s.jsx)(r.td,{children:"Input parameter. If true, enables HTTPS/TLS for the Clickhouse server and overrides inferred values for interface or port arguments. Default: false."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"index_param"}),(0,s.jsx)(r.td,{children:"Param of the index"}),(0,s.jsxs)(r.td,{children:["Input parameter. Index parameters. Default: ",(0,s.jsx)(r.code,{children:"100,'L2Distance'"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"index_query_params"}),(0,s.jsx)(r.td,{children:"index query params"}),(0,s.jsx)(r.td,{children:"Input parameter. Additional index query parameters."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_query"}),(0,s.jsx)(r.td,{children:"Search Query"}),(0,s.jsx)(r.td,{children:"Input parameter. The query string for similarity search. Only relevant for reads."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Ingest Data"}),(0,s.jsx)(r.td,{children:"Input parameter. The records to load into the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"cache_vector_store"}),(0,s.jsx)(r.td,{children:"Cache Vector Store"}),(0,s.jsx)(r.td,{children:"Input parameter. If true, the component caches the vector store in memory for faster reads. Default: Enabled (true)."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embedding"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding model to use."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Number of Results"}),(0,s.jsxs)(r.td,{children:["Input parameter. The number of search results to return. Default: ",(0,s.jsx)(r.code,{children:"4"}),". Only relevant for reads."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"score_threshold"}),(0,s.jsx)(r.td,{children:"Score threshold"}),(0,s.jsx)(r.td,{children:"Input parameter. The threshold for similarity score comparison. Default: Unset (no threshold). Only relevant for reads."})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"couchbase",children:"Couchbase"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Couchbase"})," component reads and writes to a Couchbase vector store using an instance of ",(0,s.jsx)(r.code,{children:"CouchbaseSearchVectorStore"}),"."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://docs.couchbase.com/home/index.html",children:"Couchbase documentation"})}),"\n"]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Couchbase parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"couchbase_connection_string"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. Couchbase Cluster connection string. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"couchbase_username"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Couchbase username for authentication. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"couchbase_password"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. Couchbase password for authentication. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"bucket_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Name of the Couchbase bucket. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"scope_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Name of the Couchbase scope. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"collection_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Name of the Couchbase collection. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"index_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Name of the Couchbase index. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Data"}),(0,s.jsx)(r.td,{children:"Input parameter. The records to load into the vector store. Only relevant for writes."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_query"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The query string for vector search. Only relevant for reads."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"cache_vector_store"}),(0,s.jsx)(r.td,{children:"Boolean"}),(0,s.jsx)(r.td,{children:"Input parameter. If true, the component caches the vector store in memory for faster reads. Default: Enabled (true)."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding function to use for the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. Maximum number of search results to return. Default: 4. Only relevant for reads."})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"datastax",children:"DataStax"}),"\n",(0,s.jsx)(r.p,{children:"The following components support DataStax vector stores."}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/index.html",children:"Astra DB Serverless documentation"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://docs.datastax.com/en/hyper-converged-database/1.2/get-started/get-started-hcd.html",children:"Hyper-Converged Database (HCD) documentation"})}),"\n"]}),"\n",(0,s.jsx)(r.h3,{id:"astra-db",children:"Astra DB"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Astra DB"})," component read and writes to Astra DB Serverless databases, using an instance of ",(0,s.jsx)(r.code,{children:"AstraDBVectorStore"})," to call the Data API and DevOps API."]}),"\n",(0,s.jsxs)(r.admonition,{type:"important",children:[(0,s.jsxs)(r.p,{children:["It is recommend that you create any databases, keyspaces, and collections you need before configuring the ",(0,s.jsx)(r.strong,{children:"Astra DB"})," component."]}),(0,s.jsxs)(r.p,{children:["You can create new databases and collections through this component, but this is only possible in the Langflow visual editor, not at runtime, and you must wait while the database or collection initializes before proceeding with flow configuration.\nAdditionally, not all database and collection configuration options are available through the ",(0,s.jsx)(r.strong,{children:"Astra DB"})," component, such as hybrid search options, PCU groups, vectorize integration management, and multi-region deployments."]})]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Astra DB parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Display Name"}),(0,s.jsx)(r.th,{children:"Info"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"token"}),(0,s.jsx)(r.td,{children:"Astra DB Application Token"}),(0,s.jsx)(r.td,{children:"Input parameter. An Astra application token with permission to access your vector database. Once the connection is verified, additional fields are populated with your existing databases and collections. If you want to create a database through this component, the application token must have Organization Administrator permissions."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"environment"}),(0,s.jsx)(r.td,{children:"Environment"}),(0,s.jsxs)(r.td,{children:["Input parameter. The environment for the Astra DB API endpoint. Always use ",(0,s.jsx)(r.code,{children:"prod"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"database_name"}),(0,s.jsx)(r.td,{children:"Database"}),(0,s.jsxs)(r.td,{children:["Input parameter. The name of the database that you want this component to connect to. Or, you can select ",(0,s.jsx)(r.strong,{children:"New Database"})," to create a new database, and then wait for the database to initialize."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"keyspace"}),(0,s.jsx)(r.td,{children:"Keyspace"}),(0,s.jsxs)(r.td,{children:["Input parameter. The keyspace in your database that contains the collection specified in ",(0,s.jsx)(r.code,{children:"collection_name"}),". Default: ",(0,s.jsx)(r.code,{children:"default_keyspace"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"collection_name"}),(0,s.jsx)(r.td,{children:"Collection"}),(0,s.jsxs)(r.td,{children:["Input parameter. The name of the collection that you want to use with this flow. Or, select ",(0,s.jsx)(r.strong,{children:"New Collection"})," to create a new collection with limited configuration options. To ensure your collection is configured with the correct embedding provider and search capabilities, it is recommended to create the collection in the Astra Portal or with the Data API ",(0,s.jsx)(r.em,{children:"before"})," configuring this component. For more information, see ",(0,s.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/databases/manage-collections.html",children:"Manage collections in Astra DB Serverless"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding_model"}),(0,s.jsx)(r.td,{children:"Embedding Model"}),(0,s.jsxs)(r.td,{children:["Input parameter. Attach an ",(0,s.jsxs)(r.a,{href:"/components-embedding-models",children:[(0,s.jsx)(r.strong,{children:"Embedding Model"})," component"]})," to generate embeddings. Only available if the specified collection doesn't have a ",(0,s.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/databases/embedding-generation.html",children:"vectorize integration"}),". If a vectorize integration exists, the component automatically uses the collection's integrated model."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Ingest Data"}),(0,s.jsx)(r.td,{children:"Input parameter. The documents to load into the specified collection."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_query"}),(0,s.jsx)(r.td,{children:"Search Query"}),(0,s.jsx)(r.td,{children:"Input parameter. The query string for vector search."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"cache_vector_store"}),(0,s.jsx)(r.td,{children:"Cache Vector Store"}),(0,s.jsx)(r.td,{children:"Input parameter. Whether to cache the vector store in Langflow memory for faster reads. Default: Enabled (true)."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_method"}),(0,s.jsx)(r.td,{children:"Search Method"}),(0,s.jsxs)(r.td,{children:["Input parameter. The search methods to use, either ",(0,s.jsx)(r.code,{children:"Hybrid Search"})," or ",(0,s.jsx)(r.code,{children:"Vector Search"}),". Your collection must be configured to support the chosen option, and the default depends on what your collection supports. All collections in Astra DB Serverless (Vector) databases support vector search, but hybrid search requires that you set specific collection settings when creating the collection. These options are only available when creating a collection programmatically. For more information, see ",(0,s.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/databases/about-search.html",children:"Ways to find data in Astra DB Serverless"})," and ",(0,s.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/api-reference/collection-methods/create-collection.html#example-hybrid",children:"Create a collection that supports hybrid search"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"reranker"}),(0,s.jsx)(r.td,{children:"Reranker"}),(0,s.jsxs)(r.td,{children:["Input parameter. The re-ranker model to use for hybrid search, depending on the collection configuration. ",(0,s.jsx)(r.strong,{children:"This parameter shows the default reranker even if the selected collection doesn't support hybrid search."})," To verify if a collection supports hybrid search, ",(0,s.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/api-reference/collection-methods/list-collection-metadata.html",children:"get collection metadata"}),", and then check that ",(0,s.jsx)(r.code,{children:"lexical"})," and ",(0,s.jsx)(r.code,{children:"rerank"})," both have ",(0,s.jsx)(r.code,{children:'"enabled": true'}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"lexical_terms"}),(0,s.jsx)(r.td,{children:"Lexical Terms"}),(0,s.jsxs)(r.td,{children:["Input parameter. A space-separated string of keywords for hybrid search, like ",(0,s.jsx)(r.code,{children:"features, data, attributes, characteristics"}),". This parameter is only available if the collection supports hybrid search. For more information, see the following ",(0,s.jsx)(r.strong,{children:"Hybrid search example"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Number of Search Results"}),(0,s.jsx)(r.td,{children:"Input parameter. The number of search results to return. Default: 4."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_type"}),(0,s.jsx)(r.td,{children:"Search Type"}),(0,s.jsxs)(r.td,{children:["Input parameter. The search type to use, either ",(0,s.jsx)(r.code,{children:"Similarity"})," (default), ",(0,s.jsx)(r.code,{children:"Similarity with score threshold"}),", and ",(0,s.jsx)(r.code,{children:"MMR (Max Marginal Relevance)"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_score_threshold"}),(0,s.jsx)(r.td,{children:"Search Score Threshold"}),(0,s.jsxs)(r.td,{children:["Input parameter. The minimum similarity score threshold for vector search results with the ",(0,s.jsx)(r.code,{children:"Similarity with score threshold"})," search type. Default: 0."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"advanced_search_filter"}),(0,s.jsx)(r.td,{children:"Search Metadata Filter"}),(0,s.jsx)(r.td,{children:"Input parameter. An optional dictionary of metadata filters to apply in addition to vector or hybrid search."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"autodetect_collection"}),(0,s.jsx)(r.td,{children:"Autodetect Collection"}),(0,s.jsx)(r.td,{children:"Input parameter. Whether to automatically fetch a list of available collections after providing an application token and API endpoint."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"content_field"}),(0,s.jsx)(r.td,{children:"Content Field"}),(0,s.jsx)(r.td,{children:"Input parameter. For writes, this parameter specifies the name of the field in the documents that contains text strings for which you want to generate embeddings."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"deletion_field"}),(0,s.jsx)(r.td,{children:"Deletion Based On Field"}),(0,s.jsx)(r.td,{children:"Input parameter. When provided, documents in the target collection with metadata field values matching the input metadata field value are deleted before new records are loaded. Use this setting for writes with upserts (overwrites)."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ignore_invalid_documents"}),(0,s.jsx)(r.td,{children:"Ignore Invalid Documents"}),(0,s.jsx)(r.td,{children:"Input parameter. Whether to ignore invalid documents during writes. If disabled (false), then an error is raised for invalid documents. Default: Enabled (true)."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"astradb_vectorstore_kwargs"}),(0,s.jsx)(r.td,{children:"AstraDBVectorStore Parameters"}),(0,s.jsxs)(r.td,{children:["Input parameter. An optional dictionary of additional parameters for the ",(0,s.jsx)(r.code,{children:"AstraDBVectorStore"})," instance. For more information, see ",(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"}),"."]})]})]})]})]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Hybrid search example"}),(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Astra DB"})," component supports the Data API's ",(0,s.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/databases/hybrid-search.html",children:"hybrid search"})," feature.\nHybrid search performs a vector similarity search and a lexical search, compares the results of both searches, and then returns the most relevant results overall."]}),(0,s.jsxs)(r.p,{children:["To use hybrid search through the ",(0,s.jsx)(r.strong,{children:"Astra DB"})," component, do the following:"]}),(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["Use the Data API to ",(0,s.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/api-reference/collection-methods/create-collection.html#example-hybrid",children:"create a collection that supports hybrid search"})," if you haven't already created one."]}),"\n",(0,s.jsxs)(r.p,{children:["Although you can create a collection through the ",(0,s.jsx)(r.strong,{children:"Astra DB"})," component, you have more control and insight into the collection settings when using the Data API for this operation."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["Create a flow based on the ",(0,s.jsx)(r.strong,{children:"Hybrid Search RAG"})," template, which includes an ",(0,s.jsx)(r.strong,{children:"Astra DB"})," component that is pre-configured for hybrid search."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["In the ",(0,s.jsx)(r.strong,{children:"Language Model"})," components, add your OpenAI API key."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["Delete the ",(0,s.jsx)(r.strong,{children:"Language Model"})," component that is connected to the ",(0,s.jsx)(r.strong,{children:"Structured Output"})," component's ",(0,s.jsx)(r.strong,{children:"Input Message"})," port, and then connect the ",(0,s.jsx)(r.strong,{children:"Chat Input"})," component to that port."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["Configure the ",(0,s.jsx)(r.strong,{children:"Astra DB"})," vector store component:"]}),"\n",(0,s.jsxs)(r.ol,{children:["\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsx)(r.p,{children:"Enter your Astra DB application token."}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["In the ",(0,s.jsx)(r.strong,{children:"Database"})," field, select your database."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["In the ",(0,s.jsx)(r.strong,{children:"Collection"})," field, select your collection with hybrid search enabled."]}),"\n",(0,s.jsx)(r.p,{children:"Once you select a collection that supports hybrid search, the other parameters automatically update to allow hybrid search options."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["In the ",(0,s.jsx)(r.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),", click ",(0,s.jsx)(a.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(r.strong,{children:"Controls"}),", find the ",(0,s.jsx)(r.strong,{children:"Lexical Terms"})," field, enable the ",(0,s.jsx)(r.strong,{children:"Show"})," toggle, and then click ",(0,s.jsx)(r.strong,{children:"Close"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["Connect the first ",(0,s.jsx)(r.strong,{children:"Parser"})," component's ",(0,s.jsx)(r.strong,{children:"Parsed Text"})," output to the ",(0,s.jsx)(r.strong,{children:"Astra DB"})," component's ",(0,s.jsx)(r.strong,{children:"Lexical Terms"})," input.\nThis input only appears after connecting a collection that support hybrid search with reranking."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["Click the ",(0,s.jsx)(r.strong,{children:"Structured Output"})," component to expose the ",(0,s.jsx)(r.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),", click ",(0,s.jsx)(a.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(r.strong,{children:"Controls"}),", find the ",(0,s.jsx)(r.strong,{children:"Format Instructions"})," row, click ",(0,s.jsx)(a.A,{name:"Expand","aria-hidden":"true"})," ",(0,s.jsx)(r.strong,{children:"Expand"}),", and then replace the prompt with the following text:"]}),"\n",(0,s.jsx)(j.Code,{codeConfig:p,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"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["Click ",(0,s.jsx)(r.strong,{children:"Finish Editing"}),", and then click ",(0,s.jsx)(r.strong,{children:"Close"})," to save your changes to the component."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["Open the ",(0,s.jsx)(r.strong,{children:"Playground"}),", and then enter a natural language question that you would ask about your database."]}),"\n",(0,s.jsxs)(r.p,{children:["In this example, your input is sent to both the ",(0,s.jsx)(r.strong,{children:"Astra DB"})," and ",(0,s.jsx)(r.strong,{children:"Structured Output"})," components:"]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["The input sent directly to the ",(0,s.jsx)(r.strong,{children:"Astra DB"})," component's ",(0,s.jsx)(r.strong,{children:"Search Query"})," port is used as a string for similarity search.\nAn embedding is generated from the query string using the collection's Astra DB vectorize integration."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["The input sent to the ",(0,s.jsx)(r.strong,{children:"Structured Output"})," component is processed by the ",(0,s.jsx)(r.strong,{children:"Structured Output"}),", ",(0,s.jsx)(r.strong,{children:"Language Model"}),", and ",(0,s.jsx)(r.strong,{children:"Parser"})," components to extract space-separated ",(0,s.jsx)(r.code,{children:"keywords"})," used for the lexical search portion of the hybrid search."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(r.p,{children:["The complete hybrid search query is executed against your database using the Data API's ",(0,s.jsx)(r.code,{children:"find_and_rerank"})," command.\nThe API's response is output as a ",(0,s.jsx)(r.code,{children:"DataFrame"})," that is transformed into a text string ",(0,s.jsx)(r.code,{children:"Message"})," by another ",(0,s.jsx)(r.strong,{children:"Parser"})," component.\nFinally, the ",(0,s.jsx)(r.strong,{children:"Chat Output"})," component prints the ",(0,s.jsx)(r.code,{children:"Message"})," response to the ",(0,s.jsx)(r.strong,{children:"Playground"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:["Optional: Exit the ",(0,s.jsx)(r.strong,{children:"Playground"}),", and then click ",(0,s.jsx)(a.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,s.jsx)(r.strong,{children:"Inspect Output"})," on each individual component to understand how lexical keywords were constructed and view the raw response from the Data API.\nThis is helpful for debugging flows where a certain component isn't receiving input as expected from another component."]}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Structured Output component"}),": The output is the ",(0,s.jsx)(r.code,{children:"Data"})," object produced by applying the output schema to the LLM's response to the input message and format instructions.\nThe following example is based on the aforementioned instructions for keyword extraction:"]}),"\n",(0,s.jsx)(j.Code,{codeConfig:p,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"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Parser component"}),": The output is the string of keywords extracted from the structured output ",(0,s.jsx)(r.code,{children:"Data"}),", and then used as lexical terms for the hybrid search."]}),"\n"]}),"\n",(0,s.jsxs)(r.li,{children:["\n",(0,s.jsxs)(r.p,{children:[(0,s.jsx)(r.strong,{children:"Astra DB component"}),": The output is the ",(0,s.jsx)(r.code,{children:"DataFrame"})," containing the results of the hybrid search as returned by the Data API."]}),"\n"]}),"\n"]}),"\n"]}),"\n"]})]}),"\n",(0,s.jsx)(r.h3,{id:"astra-db-graph",children:"Astra DB Graph"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Astra DB Graph"})," component uses a ",(0,s.jsx)(r.code,{children:"AstraDBGraphVectorStore"})," instance for graph traversal and graph-based document retrieval in an Astra DB collection. It also supports writing to the vector store.\nFor more information, see ",(0,s.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/tutorials/graph-rag.html",children:"Build a Graph RAG system with LangChain and GraphRetriever"}),"."]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Astra DB Graph parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Display Name"}),(0,s.jsx)(r.th,{children:"Info"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"token"}),(0,s.jsx)(r.td,{children:"Astra DB Application Token"}),(0,s.jsx)(r.td,{children:"Input parameter. An Astra application token with permission to access your vector database. Once the connection is verified, additional fields are populated with your existing databases and collections. If you want to create a database through this component, the application token must have Organization Administrator permissions."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"api_endpoint"}),(0,s.jsx)(r.td,{children:"API Endpoint"}),(0,s.jsx)(r.td,{children:"Input parameter. Your database's API endpoint."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"keyspace"}),(0,s.jsx)(r.td,{children:"Keyspace"}),(0,s.jsxs)(r.td,{children:["Input parameter. The keyspace in your database that contains the collection specified in ",(0,s.jsx)(r.code,{children:"collection_name"}),". Default: ",(0,s.jsx)(r.code,{children:"default_keyspace"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"collection_name"}),(0,s.jsx)(r.td,{children:"Collection"}),(0,s.jsx)(r.td,{children:"Input parameter. The name of the collection that you want to use with this flow. For write operations, if a matching collection doesn't exist, a new one is created."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"metadata_incoming_links_key"}),(0,s.jsx)(r.td,{children:"Metadata Incoming Links Key"}),(0,s.jsx)(r.td,{children:"Input parameter. The metadata key for the incoming links in the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Ingest Data"}),(0,s.jsx)(r.td,{children:"Input parameter. Records to load into the vector store. Only relevant for writes."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_input"}),(0,s.jsx)(r.td,{children:"Search Query"}),(0,s.jsx)(r.td,{children:"Input parameter. Query string for similarity search. Only relevant for reads."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"cache_vector_store"}),(0,s.jsx)(r.td,{children:"Cache Vector Store"}),(0,s.jsx)(r.td,{children:"Input parameter. Whether to cache the vector store in Langflow memory for faster reads. Default: Enabled (true)."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding_model"}),(0,s.jsx)(r.td,{children:"Embedding Model"}),(0,s.jsxs)(r.td,{children:["Input parameter. Attach an ",(0,s.jsxs)(r.a,{href:"/components-embedding-models",children:[(0,s.jsx)(r.strong,{children:"Embedding Model"})," component"]})," to generate embeddings. If the collection has a ",(0,s.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/databases/embedding-generation.html",children:"vectorize integration"}),", don't attach an ",(0,s.jsx)(r.strong,{children:"Embedding Model"})," component."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"metric"}),(0,s.jsx)(r.td,{children:"Metric"}),(0,s.jsxs)(r.td,{children:["Input parameter. The metrics to use for similarity search calculations, either ",(0,s.jsx)(r.code,{children:"cosine"})," (default), ",(0,s.jsx)(r.code,{children:"dot_product"}),", or ",(0,s.jsx)(r.code,{children:"euclidean"}),". This is a collection setting."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"batch_size"}),(0,s.jsx)(r.td,{children:"Batch Size"}),(0,s.jsx)(r.td,{children:"Input parameter. Optional number of records to process in a single batch."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"bulk_insert_batch_concurrency"}),(0,s.jsx)(r.td,{children:"Bulk Insert Batch Concurrency"}),(0,s.jsx)(r.td,{children:"Input parameter. Optional concurrency level for bulk write operations."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"bulk_insert_overwrite_concurrency"}),(0,s.jsx)(r.td,{children:"Bulk Insert Overwrite Concurrency"}),(0,s.jsx)(r.td,{children:"Input parameter. Optional concurrency level for bulk write operations that allow upserts (overwriting existing records)."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"bulk_delete_concurrency"}),(0,s.jsx)(r.td,{children:"Bulk Delete Concurrency"}),(0,s.jsx)(r.td,{children:"Input parameter. Optional concurrency level for bulk delete operations."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"setup_mode"}),(0,s.jsx)(r.td,{children:"Setup Mode"}),(0,s.jsxs)(r.td,{children:["Input parameter. Configuration mode for setting up the vector store, either ",(0,s.jsx)(r.code,{children:"Sync"})," (default) or ",(0,s.jsx)(r.code,{children:"Off"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"pre_delete_collection"}),(0,s.jsx)(r.td,{children:"Pre Delete Collection"}),(0,s.jsx)(r.td,{children:"Input parameter. Whether to delete the collection before creating a new one. Default: Disabled (false)."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"metadata_indexing_include"}),(0,s.jsx)(r.td,{children:"Metadata Indexing Include"}),(0,s.jsxs)(r.td,{children:["Input parameter. An list of metadata fields to index if you want to enable ",(0,s.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/api-reference/collection-indexes.html",children:"selective indexing"})," ",(0,s.jsx)(r.em,{children:"only"})," when creating a collection. Doesn't apply to existing collections. Only one ",(0,s.jsx)(r.code,{children:"*_indexing_*"})," parameter can be set per collection. If all ",(0,s.jsx)(r.code,{children:"*_indexing_*"})," parameters are unset, then all fields are indexed (default indexing)."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"metadata_indexing_exclude"}),(0,s.jsx)(r.td,{children:"Metadata Indexing Exclude"}),(0,s.jsxs)(r.td,{children:["Input parameter. An list of metadata fields to exclude from indexing if you want to enable selective indexing ",(0,s.jsx)(r.em,{children:"only"})," when creating a collection. Doesn't apply to existing collections. Only one ",(0,s.jsx)(r.code,{children:"*_indexing_*"})," parameter can be set per collection. If all ",(0,s.jsx)(r.code,{children:"*_indexing_*"})," parameters are unset, then all fields are indexed (default indexing)."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"collection_indexing_policy"}),(0,s.jsx)(r.td,{children:"Collection Indexing Policy"}),(0,s.jsxs)(r.td,{children:["Input parameter. A dictionary to define the indexing policy if you want to enable selective indexing ",(0,s.jsx)(r.em,{children:"only"})," when creating a collection. Doesn't apply to existing collections. Only one ",(0,s.jsx)(r.code,{children:"*_indexing_*"})," parameter can be set per collection. If all ",(0,s.jsx)(r.code,{children:"*_indexing_*"})," parameters are unset, then all fields are indexed (default indexing). The ",(0,s.jsx)(r.code,{children:"collection_indexing_policy"})," dictionary is used when you need to set indexing on subfields or a complex indexing definition that isn't compatible as a list."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Number of Results"}),(0,s.jsx)(r.td,{children:"Input parameter. Number of search results to return. Default: 4. Only relevant to reads."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_type"}),(0,s.jsx)(r.td,{children:"Search Type"}),(0,s.jsxs)(r.td,{children:["Input parameter. Search type to use, either ",(0,s.jsx)(r.code,{children:"Similarity"}),", ",(0,s.jsx)(r.code,{children:"Similarity with score threshold"}),", or ",(0,s.jsx)(r.code,{children:"MMR (Max Marginal Relevance)"}),", ",(0,s.jsx)(r.code,{children:"Graph Traversal"}),", or ",(0,s.jsx)(r.code,{children:"MMR (Max Marginal Relevance) Graph Traversal"})," (default). Only relevant to reads."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_score_threshold"}),(0,s.jsx)(r.td,{children:"Search Score Threshold"}),(0,s.jsxs)(r.td,{children:["Input parameter. Minimum similarity score threshold for search results if the ",(0,s.jsx)(r.code,{children:"search_type"})," is ",(0,s.jsx)(r.code,{children:"Similarity with score threshold"}),". Default: 0."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_filter"}),(0,s.jsx)(r.td,{children:"Search Metadata Filter"}),(0,s.jsx)(r.td,{children:"Input parameter. Optional dictionary of metadata filters to apply in addition to vector search."})]})]})]})]}),"\n",(0,s.jsx)(r.h3,{id:"graph-rag",children:"Graph RAG"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Graph RAG"})," component uses an instance of ",(0,s.jsx)(r.a,{href:"https://datastax.github.io/graph-rag/reference/langchain_graph_retriever/",children:(0,s.jsx)(r.code,{children:"GraphRetriever"})})," for Graph RAG traversal enabling graph-based document retrieval in an Astra DB vector store.\nFor more information, see the ",(0,s.jsx)(r.a,{href:"https://datastax.github.io/graph-rag/",children:"DataStax Graph RAG documentation"}),"."]}),"\n",(0,s.jsx)(r.admonition,{type:"tip",children:(0,s.jsxs)(r.p,{children:["This component was meant as a Graph RAG extension for the ",(0,s.jsx)(r.strong,{children:"Astra DB"})," vector store component.\nHowever, the ",(0,s.jsx)(r.strong,{children:"Astra DB Graph"})," component includes both the vector store connection and Graph RAG functionality."]})}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Graph RAG parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Display Name"}),(0,s.jsx)(r.th,{children:"Info"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding_model"}),(0,s.jsx)(r.td,{children:"Embedding Model"}),(0,s.jsxs)(r.td,{children:["Input parameter. Specify the embedding model to use. Not required if the connected vector store has an ",(0,s.jsx)(r.a,{href:"https://docs.datastax.com/en/astra-db-serverless/databases/embedding-generation.html",children:"vectorize integration"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"vector_store"}),(0,s.jsx)(r.td,{children:"Vector Store Connection"}),(0,s.jsxs)(r.td,{children:["Input parameter. A ",(0,s.jsx)(r.a,{href:"#vector-store-instances",children:(0,s.jsx)(r.code,{children:"vector_store"})})," instance inherited from an ",(0,s.jsx)(r.strong,{children:"Astra DB"})," component's ",(0,s.jsx)(r.strong,{children:"Vector Store Connection"})," output."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"edge_definition"}),(0,s.jsx)(r.td,{children:"Edge Definition"}),(0,s.jsxs)(r.td,{children:["Input parameter. ",(0,s.jsx)(r.a,{href:"https://datastax.github.io/graph-rag/reference/graph_retriever/edges/",children:"Edge definition"})," for the graph traversal."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"strategy"}),(0,s.jsx)(r.td,{children:"Traversal Strategies"}),(0,s.jsx)(r.td,{children:"Input parameter. The strategy to use for graph traversal. Strategy options are dynamically loaded from available strategies."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_query"}),(0,s.jsx)(r.td,{children:"Search Query"}),(0,s.jsx)(r.td,{children:"Input parameter. The query to search for in the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"graphrag_strategy_kwargs"}),(0,s.jsx)(r.td,{children:"Strategy Parameters"}),(0,s.jsxs)(r.td,{children:["Input parameter. Optional dictionary of additional parameters for the ",(0,s.jsx)(r.a,{href:"https://datastax.github.io/graph-rag/reference/graph_retriever/strategies/",children:"retrieval strategy"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_results"}),(0,s.jsxs)(r.td,{children:[(0,s.jsx)(r.strong,{children:"Search Results"})," or ",(0,s.jsx)(r.strong,{children:"DataFrame"})]}),(0,s.jsxs)(r.td,{children:["Output parameter. The results of the graph-based document retrieval as a list of ",(0,s.jsx)(r.a,{href:"/data-types#data",children:(0,s.jsx)(r.code,{children:"Data"})})," objects or as a tabular ",(0,s.jsx)(r.a,{href:"/data-types#dataframe",children:(0,s.jsx)(r.code,{children:"DataFrame"})}),". You can set the desired output type near the component's output port."]})]})]})]})]}),"\n",(0,s.jsx)(r.h3,{id:"hyper-converged-database-hcd",children:"Hyper-Converged Database (HCD)"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Hyper-Converged Database (HCD)"})," component uses your cluster's the Data API server to read and write to an HCD vector store.\nBecause the underlying functions call the Data API, which originated from Astra DB, the component uses an instance of ",(0,s.jsx)(r.code,{children:"AstraDBVectorStore"}),"."]}),"\n",(0,s.jsx)(r.p,{children:(0,s.jsx)(r.img,{alt:"A flow using the HCD component to load vector data.",src:t(42638).A+"",width:"2294",height:"1684"})}),"\n",(0,s.jsxs)(r.p,{children:["For more information about using the Data API with an HCD deployment, see ",(0,s.jsx)(r.a,{href:"https://docs.datastax.com/en/hyper-converged-database/1.2/api-reference/dataapiclient.html",children:"Get started with the Data API in HCD 1.2"}),"."]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"HCD parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Display Name"}),(0,s.jsx)(r.th,{children:"Info"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"collection_name"}),(0,s.jsx)(r.td,{children:"Collection Name"}),(0,s.jsx)(r.td,{children:"Input parameter. The name of a vector store collection in HCD. For write operations, if the collection doesn't exist, then a new one is created. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"username"}),(0,s.jsx)(r.td,{children:"HCD Username"}),(0,s.jsxs)(r.td,{children:["Input parameter. Username for authenticating to your HCD deployment. Default: ",(0,s.jsx)(r.code,{children:"hcd-superuser"}),". Required."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"password"}),(0,s.jsx)(r.td,{children:"HCD Password"}),(0,s.jsx)(r.td,{children:"Input parameter. Password for authenticating to your HCD deployment. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"api_endpoint"}),(0,s.jsx)(r.td,{children:"HCD API Endpoint"}),(0,s.jsxs)(r.td,{children:["Input parameter. Your deployment's HCD Data API endpoint, formatted as ",(0,s.jsx)(r.code,{children:"http[s]://**CLUSTER_HOST**:**GATEWAY_PORT"})," where ",(0,s.jsx)(r.code,{children:"CLUSTER_HOST"})," is the IP address of any node in your cluster and ",(0,s.jsx)(r.code,{children:"GATEWAY_PORT"})," is the port number ofr your API gateway service. For example, ",(0,s.jsx)(r.code,{children:"http://192.0.2.250:8181"}),". Required."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Ingest Data"}),(0,s.jsx)(r.td,{children:"Input parameter. Records to load into the vector store. Only relevant for writes."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_input"}),(0,s.jsx)(r.td,{children:"Search Input"}),(0,s.jsx)(r.td,{children:"Input parameter. Query string for similarity search. Only relevant for reads."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"namespace"}),(0,s.jsx)(r.td,{children:"Namespace"}),(0,s.jsxs)(r.td,{children:["Input parameter. The namespace in HCD that contains or will contain the collection specified in ",(0,s.jsx)(r.code,{children:"collection_name"}),". Default: ",(0,s.jsx)(r.code,{children:"default_namespace"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ca_certificate"}),(0,s.jsx)(r.td,{children:"CA Certificate"}),(0,s.jsx)(r.td,{children:"Input parameter. Optional CA certificate for TLS connections to HCD."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"metric"}),(0,s.jsx)(r.td,{children:"Metric"}),(0,s.jsxs)(r.td,{children:["Input parameter. The metrics to use for similarity search calculations, either ",(0,s.jsx)(r.code,{children:"cosine"}),", ",(0,s.jsx)(r.code,{children:"dot_product"}),", or ",(0,s.jsx)(r.code,{children:"euclidean"}),". This is a collection setting. If calling an existing collection, leave unset to use the collection's metric. If a write operation creates a new collection, specify the desired similarity metric setting."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"batch_size"}),(0,s.jsx)(r.td,{children:"Batch Size"}),(0,s.jsx)(r.td,{children:"Input parameter. Optional number of records to process in a single batch."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"bulk_insert_batch_concurrency"}),(0,s.jsx)(r.td,{children:"Bulk Insert Batch Concurrency"}),(0,s.jsx)(r.td,{children:"Input parameter. Optional concurrency level for bulk write operations."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"bulk_insert_overwrite_concurrency"}),(0,s.jsx)(r.td,{children:"Bulk Insert Overwrite Concurrency"}),(0,s.jsx)(r.td,{children:"Input parameter. Optional concurrency level for bulk write operations that allow upserts (overwriting existing records)."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"bulk_delete_concurrency"}),(0,s.jsx)(r.td,{children:"Bulk Delete Concurrency"}),(0,s.jsx)(r.td,{children:"Input parameter. Optional concurrency level for bulk delete operations."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"setup_mode"}),(0,s.jsx)(r.td,{children:"Setup Mode"}),(0,s.jsxs)(r.td,{children:["Input parameter. Configuration mode for setting up the vector store, either ",(0,s.jsx)(r.code,{children:"Sync"})," (default), ",(0,s.jsx)(r.code,{children:"Async"}),", or ",(0,s.jsx)(r.code,{children:"Off"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"pre_delete_collection"}),(0,s.jsx)(r.td,{children:"Pre Delete Collection"}),(0,s.jsx)(r.td,{children:"Input parameter. Whether to delete the collection before creating a new one."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"metadata_indexing_include"}),(0,s.jsx)(r.td,{children:"Metadata Indexing Include"}),(0,s.jsxs)(r.td,{children:["Input parameter. An list of metadata fields to index if you want to enable ",(0,s.jsx)(r.a,{href:"https://docs.datastax.com/en/hyper-converged-database/1.2/api-reference/collection-indexes.html",children:"selective indexing"})," ",(0,s.jsx)(r.em,{children:"only"})," when creating a collection. Doesn't apply to existing collections. Only one ",(0,s.jsx)(r.code,{children:"*_indexing_*"})," parameter can be set per collection. If all ",(0,s.jsx)(r.code,{children:"*_indexing_*"})," parameters are unset, then all fields are indexed (default indexing)."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"metadata_indexing_exclude"}),(0,s.jsx)(r.td,{children:"Metadata Indexing Exclude"}),(0,s.jsxs)(r.td,{children:["Input parameter. An list of metadata fields to exclude from indexing if you want to enable selective indexing ",(0,s.jsx)(r.em,{children:"only"})," when creating a collection. Doesn't apply to existing collections. Only one ",(0,s.jsx)(r.code,{children:"*_indexing_*"})," parameter can be set per collection. If all ",(0,s.jsx)(r.code,{children:"*_indexing_*"})," parameters are unset, then all fields are indexed (default indexing)."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"collection_indexing_policy"}),(0,s.jsx)(r.td,{children:"Collection Indexing Policy"}),(0,s.jsxs)(r.td,{children:["Input parameter. A dictionary to define the indexing policy if you want to enable selective indexing ",(0,s.jsx)(r.em,{children:"only"})," when creating a collection. Doesn't apply to existing collections. Only one ",(0,s.jsx)(r.code,{children:"*_indexing_*"})," parameter can be set per collection. If all ",(0,s.jsx)(r.code,{children:"*_indexing_*"})," parameters are unset, then all fields are indexed (default indexing). The ",(0,s.jsx)(r.code,{children:"collection_indexing_policy"})," dictionary is used when you need to set indexing on subfields or a complex indexing definition that isn't compatible as a list."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embedding or Astra Vectorize"}),(0,s.jsxs)(r.td,{children:["Input parameter. The embedding model to use by attaching an ",(0,s.jsx)(r.strong,{children:"Embedding Model"})," component. This component doesn't support additional vectorize authentication headers, so it isn't possible to use a vectorize integration with this component, even if you have enabled one on an existing HCD collection."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Number of Results"}),(0,s.jsx)(r.td,{children:"Input parameter. Number of search results to return. Default: 4. Only relevant to reads."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_type"}),(0,s.jsx)(r.td,{children:"Search Type"}),(0,s.jsxs)(r.td,{children:["Input parameter. Search type to use, either ",(0,s.jsx)(r.code,{children:"Similarity"})," (default), ",(0,s.jsx)(r.code,{children:"Similarity with score threshold"}),", or ",(0,s.jsx)(r.code,{children:"MMR (Max Marginal Relevance)"}),". Only relevant to reads."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_score_threshold"}),(0,s.jsx)(r.td,{children:"Search Score Threshold"}),(0,s.jsxs)(r.td,{children:["Input parameter. Minimum similarity score threshold for search results if the ",(0,s.jsx)(r.code,{children:"search_type"})," is ",(0,s.jsx)(r.code,{children:"Similarity with score threshold"}),". Default: 0."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_filter"}),(0,s.jsx)(r.td,{children:"Search Metadata Filter"}),(0,s.jsx)(r.td,{children:"Input parameter. Optional dictionary of metadata filters to apply in addition to vector search."})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"elasticsearch",children:"Elasticsearch"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Elasticsearch"})," component reads and writes to an Elasticsearch instance using ",(0,s.jsx)(r.code,{children:"ElasticsearchStore"}),"."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://www.elastic.co/guide/en/elasticsearch/reference/current/dense-vector.html",children:"Elasticsearch documentation"})}),"\n"]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Elasticsearch parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"es_url"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Elasticsearch server URL."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"es_user"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Username for Elasticsearch authentication."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"es_password"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. Password for Elasticsearch authentication."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"index_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Name of the Elasticsearch index."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"strategy"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsxs)(r.td,{children:["Input parameter. Strategy for vector search, either ",(0,s.jsx)(r.code,{children:"approximate_k_nearest_neighbors"})," or ",(0,s.jsx)(r.code,{children:"script_scoring"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"distance_strategy"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsxs)(r.td,{children:["Input parameter. Strategy for distance calculation, either ",(0,s.jsx)(r.code,{children:"COSINE"}),", ",(0,s.jsx)(r.code,{children:"EUCLIDEAN_DISTANCE"}),", or ",(0,s.jsx)(r.code,{children:"DOT_PRODUCT"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_query"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Query string for similarity search."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Data"}),(0,s.jsx)(r.td,{children:"Input parameter. Records to load into the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding model to use."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. Number of search results to return. Default: 4."})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"faiss",children:"FAISS"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"FAISS"})," component providese access to the Facebook AI Similarity Search (FAISS) library through an instance of ",(0,s.jsx)(r.code,{children:"FAISS"})," vector store."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://faiss.ai/index.html",children:"FAISS documentation"})}),"\n"]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"FAISS parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"index_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:'Input parameter. The name of the FAISS index. Default: "langflow_index".'})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"persist_directory"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Path to save the FAISS index. It is relative to where Langflow is running."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_query"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The query to search for in the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Data"}),(0,s.jsx)(r.td,{children:"Input parameter. The list of data to ingest into the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"allow_dangerous_deserialization"}),(0,s.jsx)(r.td,{children:"Boolean"}),(0,s.jsx)(r.td,{children:"Input parameter. Set to True to allow loading pickle files from untrusted sources. Default: True."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding function to use for the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. Number of results to return from the search. Default: 4."})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"milvus",children:"Milvus"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Milvus"})," component reads and writes to Milvus vector stores using an instance of ",(0,s.jsx)(r.code,{children:"Milvus"})," vector store."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://milvus.io/docs",children:"Milvus documentation"})}),"\n"]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Milvus parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"collection_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Name of the Milvus collection."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"collection_description"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Description of the Milvus collection."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"uri"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Connection URI for Milvus."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"password"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. Password for Milvus."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"username"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. Username for Milvus."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"batch_size"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. Number of data to process in a single batch."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_query"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Query for similarity search."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Data"}),(0,s.jsx)(r.td,{children:"Input parameter. Data to be ingested into the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. Embedding function to use."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. Number of results to return in search."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_type"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Type of search to perform."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_score_threshold"}),(0,s.jsx)(r.td,{children:"Float"}),(0,s.jsx)(r.td,{children:"Input parameter. Minimum similarity score for search results."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_filter"}),(0,s.jsx)(r.td,{children:"Dict"}),(0,s.jsx)(r.td,{children:"Input parameter. Metadata filters for search query."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"setup_mode"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Configuration mode for setting up the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"vector_dimensions"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. Number of dimensions of the vectors."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"pre_delete_collection"}),(0,s.jsx)(r.td,{children:"Boolean"}),(0,s.jsx)(r.td,{children:"Input parameter. Whether to delete the collection before creating a new one."})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"mongodb-atlas",children:"MongoDB Atlas"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"MongoDB Atlas"})," component reads and writes to MongoDB Atlas vector stores using an instance of ",(0,s.jsx)(r.code,{children:"MongoDBAtlasVectorSearch"}),"."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://www.mongodb.com/docs/atlas/atlas-vector-search/tutorials/vector-search-quick-start/",children:"MongoDB Atlas documentation"})}),"\n"]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"MongoDB Atlas parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"mongodb_atlas_cluster_uri"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. The connection URI for your MongoDB Atlas cluster. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"enable_mtls"}),(0,s.jsx)(r.td,{children:"Boolean"}),(0,s.jsx)(r.td,{children:"Input parameter. Enable mutual TLS authentication. Default: false."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"mongodb_atlas_client_cert"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. Client certificate combined with private key for mTLS authentication. Required if mTLS is enabled."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"db_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The name of the database to use. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"collection_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The name of the collection to use. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"index_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The name of the Atlas Search index, it should be a Vector Search. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"insert_mode"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:'Input parameter. How to insert new documents into the collection. The options are "append" or "overwrite". Default: "append".'})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding model to use."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. Number of results to return in similarity search. Default: 4."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"index_field"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:'Input parameter. The field to index. Default: "embedding".'})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"filter_field"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The field to filter the index."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_dimensions"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. Embedding context length. Default: 1536."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"similarity"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:'Input parameter. The method used to measure similarity between vectors. The options are "cosine", "euclidean", or "dotProduct". Default: "cosine".'})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"quantization"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:'Input parameter. Quantization reduces memory costs by converting 32-bit floats to smaller data types. The options are "scalar" or "binary".'})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"opensearch",children:"OpenSearch"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"OpenSearch"})," component reads and writes to OpenSearch instances using ",(0,s.jsx)(r.code,{children:"OpenSearchVectorSearch"}),"."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://opensearch.org/platform/search/vector-database.html",children:"OpenSearch documentation"})}),"\n"]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"OpenSearch parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"opensearch_url"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsxs)(r.td,{children:["Input parameter. URL for OpenSearch cluster, such as ",(0,s.jsx)(r.code,{children:"https://192.168.1.1:9200"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"index_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The index name where the vectors are stored in OpenSearch cluster."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_input"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Enter a search query. Leave empty to retrieve all documents or if hybrid search is being used."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Data"}),(0,s.jsx)(r.td,{children:"Input parameter. The data to be ingested into the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding function to use."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_type"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:'Input parameter. The options are "similarity", "similarity_score_threshold", "mmr".'})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. The number of results to return in search."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_score_threshold"}),(0,s.jsx)(r.td,{children:"Float"}),(0,s.jsx)(r.td,{children:"Input parameter. The minimum similarity score threshold for search results."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"username"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The username for the opensource cluster."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"password"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. The password for the opensource cluster."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"use_ssl"}),(0,s.jsx)(r.td,{children:"Boolean"}),(0,s.jsx)(r.td,{children:"Input parameter. Use SSL."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"verify_certs"}),(0,s.jsx)(r.td,{children:"Boolean"}),(0,s.jsx)(r.td,{children:"Input parameter. Verify certificates."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"hybrid_search_query"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Provide a custom hybrid search query in JSON format. This allows you to combine vector similarity and keyword matching."})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"pgvector",children:"PGVector"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"PGVector"})," component reads and writes to PostgreSQL vector stores using an instance of ",(0,s.jsx)(r.code,{children:"PGVector"}),"."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://github.com/pgvector/pgvector",children:"PGVector documentation"})}),"\n"]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"PGVector parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"pg_server_url"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. The PostgreSQL server connection string."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"collection_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The table name for the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_query"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The query for similarity search."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Data"}),(0,s.jsx)(r.td,{children:"Input parameter. The data to be ingested into the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding function to use."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. The number of results to return in search."})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"pinecone",children:"Pinecone"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Pinecone"})," component reads and writes to Pinecone vector stores using an instance of ",(0,s.jsx)(r.code,{children:"PineconeVectorStore"}),"."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://docs.pinecone.io/home",children:"Pinecone documentation"})}),"\n"]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Pinecone parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"index_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The name of the Pinecone index."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"namespace"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The namespace for the index."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"distance_strategy"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The strategy for calculating distance between vectors."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"pinecone_api_key"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. The API key for Pinecone."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"text_key"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The key in the record to use as text."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_query"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The query for similarity search."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Data"}),(0,s.jsx)(r.td,{children:"Input parameter. The data to be ingested into the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding function to use."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. The number of results to return in search."})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"qdrant",children:"Qdrant"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Qdrant"})," component reads and writes to Qdrant vector stores using an instance of ",(0,s.jsx)(r.code,{children:"QdrantVectorStore"}),"."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://qdrant.tech/documentation/",children:"Qdrant documentation"})}),"\n"]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Qdrant parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"collection_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The name of the Qdrant collection."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"host"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The Qdrant server host."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"port"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. The Qdrant server port."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"grpc_port"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. The Qdrant gRPC port."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"api_key"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. The API key for Qdrant."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"prefix"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The prefix for Qdrant."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"timeout"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. The timeout for Qdrant operations."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"path"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The path for Qdrant."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"url"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The URL for Qdrant."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"distance_func"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The distance function for vector similarity."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"content_payload_key"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The content payload key."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"metadata_payload_key"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The metadata payload key."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_query"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The query for similarity search."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Data"}),(0,s.jsx)(r.td,{children:"Input parameter. The data to be ingested into the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding function to use."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. The number of results to return in search."})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"redis",children:"Redis"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Redis"})," component reads and writes to Redis vector stores using an instance of ",(0,s.jsx)(r.code,{children:"Redis"})," vector store."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://redis.io/docs/latest/develop/interact/search-and-query/advanced-concepts/vectors/",children:"Redis documentation"})}),"\n"]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Redis parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"redis_server_url"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. The Redis server connection string."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"redis_index_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The name of the Redis index."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"code"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The custom code for Redis (advanced)."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"schema"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The schema for Redis index."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_query"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The query for similarity search."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Data"}),(0,s.jsx)(r.td,{children:"Input parameter. The data to be ingested into the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. The number of results to return in search."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding function to use."})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"supabase",children:"Supabase"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Supabase"})," component reads and writes to Supabase vector stores using an instance of ",(0,s.jsx)(r.code,{children:"SupabaseVectorStore"}),"."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://supabase.com/docs/guides/ai",children:"Supabase documentation"})}),"\n"]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Supabase parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"supabase_url"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The URL of the Supabase instance."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"supabase_service_key"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. The service key for Supabase authentication."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"table_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The name of the table in Supabase."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"query_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The name of the query to use."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_query"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The query for similarity search."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Data"}),(0,s.jsx)(r.td,{children:"Input parameter. The data to be ingested into the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding function to use."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. The number of results to return in search."})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"upstash",children:"Upstash"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Upstash"})," component reads and writes to Upstash vector stores using an instance of ",(0,s.jsx)(r.code,{children:"UpstashVectorStore"}),"."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://upstash.com/docs/introduction",children:"Upstash documentation"})}),"\n"]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Upstash parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"index_url"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The URL of the Upstash index."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"index_token"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. The token for the Upstash index."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"text_key"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The key in the record to use as text."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"namespace"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The namespace for the index."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_query"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The query for similarity search."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"metadata_filter"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. Filter documents by metadata."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"Data"}),(0,s.jsx)(r.td,{children:"Input parameter. The data to be ingested into the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding function to use."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. The number of results to return in search."})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"vectara-platform",children:"Vectara Platform"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Vectara"})," and ",(0,s.jsx)(r.strong,{children:"Vectara RAG"})," components support Vectara vector store, search, and RAG functionality using instances of ",(0,s.jsx)(r.code,{children:"Vectara"})," vector store."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://docs.vectara.com/docs/",children:"Vectara documentation"})}),"\n"]}),"\n",(0,s.jsx)(r.h3,{id:"vectara",children:"Vectara"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Vectara"})," component reads and writes to Vectara vector stores, and then produces ",(0,s.jsx)(r.a,{href:"#search-results-output",children:"search results output"}),"."]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Vectara parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"vectara_customer_id"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The Vectara customer ID."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"vectara_corpus_id"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The Vectara corpus ID."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"vectara_api_key"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. The Vectara API key."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding function to use (optional)."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"ingest_data"}),(0,s.jsx)(r.td,{children:"List[Document/Data]"}),(0,s.jsx)(r.td,{children:"Input parameter. The data to be ingested into the vector store."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_query"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The query for similarity search."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"number_of_results"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. The number of results to return in search."})]})]})]})]}),"\n",(0,s.jsx)(r.h3,{id:"vectara-rag",children:"Vectara RAG"}),"\n",(0,s.jsx)(r.p,{children:"This component enables Vectara's full end-to-end RAG capabilities with reranking options."}),"\n",(0,s.jsxs)(r.p,{children:["This component uses a ",(0,s.jsx)(r.code,{children:"Vectara"})," vector store to execute the vector search and reranking functions, and then outputs an ",(0,s.jsx)(r.strong,{children:"Answer"})," string in ",(0,s.jsx)(r.a,{href:"/data-types#message",children:(0,s.jsx)(r.code,{children:"Message"})})," format."]}),"\n",(0,s.jsx)(r.h2,{id:"weaviate",children:"Weaviate"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Weaviate"})," component reads and writes to Weaviate vector stores using an instance of ",(0,s.jsx)(r.code,{children:"Weaviate"})," vector store."]}),"\n",(0,s.jsx)(r.p,{children:"For more information, see the following:"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#hidden-parameters",children:"Hidden parameters"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#search-results-output",children:"Search results output"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"#vector-store-instances",children:"Vector store instances"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"https://weaviate.io/developers/weaviate",children:"Weaviate Documentation"})}),"\n"]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Weaviate parameters"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"weaviate_url"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The default instance URL."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_by_text"}),(0,s.jsx)(r.td,{children:"Boolean"}),(0,s.jsx)(r.td,{children:"Input parameter. Indicates whether to search by text."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"api_key"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. The optional API key for authentication."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"index_name"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The optional index name."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"text_key"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The default text extraction key."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"input"}),(0,s.jsx)(r.td,{children:"Document"}),(0,s.jsx)(r.td,{children:"Input parameter. The document or record."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embedding"}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Input parameter. The embedding model used."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"attributes"}),(0,s.jsx)(r.td,{children:"List[String]"}),(0,s.jsx)(r.td,{children:"Input parameter. Optional additional attributes."})]})]})]})]})]})}function g(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(m,{...e})}):m(e)}function f(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:()=>i});t(96540);var n=t(64058),s=t(74848);function i({name:e,...r}){const t=n[e];return t?(0,s.jsx)(t,{...r}):null}},19365:(e,r,t)=>{t.d(r,{A:()=>d});t(96540);var n=t(18215);const s={tabItem:"tabItem_Ymn6"};var i=t(74848);function d({children:e,hidden:r,className:t}){return(0,i.jsx)("div",{role:"tabpanel",className:(0,n.A)(s.tabItem,t),hidden:r,children:e})}},42638:(e,r,t)=>{t.d(r,{A:()=>n});const n=t.p+"assets/images/component-hcd-example-flow-b82057600ce5e9e4a0f7ea0a61dcbf7f.png"},60159:(e,r,t)=>{t.d(r,{A:()=>n});const n=t.p+"assets/images/component-local-db-5ba34611640c3e325d9dd3cdcb591d1f.png"},67719:(e,r,t)=>{t.d(r,{A:()=>n});const n=t.p+"assets/images/vector-store-retrieval-af7257d77ff0259ab1a0980641d464ce.png"},88690:(e,r,t)=>{t.d(r,{A:()=>n});const n=t.p+"assets/images/component-chroma-db-b69a08e861be3451fe6f2992e203f516.png"}}]); \ No newline at end of file diff --git a/assets/js/8bee5443.11221aaa.js b/assets/js/8bee5443.d30ebdcb.js similarity index 57% rename from assets/js/8bee5443.11221aaa.js rename to assets/js/8bee5443.d30ebdcb.js index db90f4c933..c647fb66f2 100644 --- a/assets/js/8bee5443.11221aaa.js +++ b/assets/js/8bee5443.d30ebdcb.js @@ -1 +1 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[879],{28453:(e,n,o)=>{o.d(n,{R:()=>i,x:()=>l});var s=o(96540);const t={},r=s.createContext(t);function i(e){const n=s.useContext(r);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(t):e.components||t:i(e.components),s.createElement(r.Provider,{value:n},e.children)}},84739:(e,n,o)=>{o.r(n),o.d(n,{CH:()=>d,assets:()=>c,chCodeConfig:()=>h,contentTitle:()=>a,default:()=>u,frontMatter:()=>l,metadata:()=>s,toc:()=>p});const s=JSON.parse('{"id":"Support/release-notes","title":"Langflow release notes","description":"This page summarizes significant changes to Langflow in each release.","source":"@site/docs/Support/release-notes.mdx","sourceDirName":"Support","slug":"/release-notes","permalink":"/release-notes","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Langflow release notes","slug":"/release-notes"},"sidebar":"docs","previous":{"title":"Contribute bundles","permalink":"/contributing-bundles"},"next":{"title":"Troubleshoot","permalink":"/troubleshoot"}}');var t=o(74848),r=o(28453),i=o(24754);const l={title:"Langflow release notes",slug:"/release-notes"},a=void 0,c={},d={annotations:i.hk,Code:i.Cy},h={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},p=[{value:"Prepare to upgrade",id:"prepare-to-upgrade",level:2},{value:"1.5.0",id:"150",level:2},{value:"New features and enhancements",id:"new-features-and-enhancements",level:3},{value:"1.4.2",id:"142",level:2},{value:"New features and enhancements",id:"new-features-and-enhancements-1",level:3},{value:"Deprecations",id:"deprecations",level:3},{value:"1.4.1",id:"141",level:2},{value:"New features and enhancements",id:"new-features-and-enhancements-2",level:3},{value:"1.4.0",id:"140",level:2},{value:"New features and enhancements",id:"new-features-and-enhancements-3",level:3},{value:"Deprecations",id:"deprecations-1",level:3},{value:"Earlier releases",id:"earlier-releases",level:2}];function g(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return d||m("CH",!1),d.Code||m("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.jsxs)(n.p,{children:["This page summarizes significant changes to Langflow in each release.\nFor all changes, see the ",(0,t.jsx)(n.a,{href:"https://github.com/langflow-ai/langflow/releases/latest",children:"Changelog"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"Due to strict SemVer requirements, Langflow Desktop can have different patch versions than the core Langflow OSS Python package, but the major and minor versions are aligned."}),"\n",(0,t.jsx)(n.h2,{id:"prepare-to-upgrade",children:"Prepare to upgrade"}),"\n",(0,t.jsx)(n.admonition,{type:"important",children:(0,t.jsxs)(n.p,{children:["Whenever possible, the Langflow team recommends installing new Langflow versions in a new virtual environment or VM before upgrading your primary installation.\nThis allows you to ",(0,t.jsx)(n.a,{href:"/concepts-flows-import#import-a-flow",children:"import flows"})," from your existing installation and test them in the new version without disrupting your existing installation.\nIn the event of breaking changes or bugs, your existing installation is preserved in a stable state."]})}),"\n",(0,t.jsx)(n.p,{children:"To avoid the impact of potential breaking changes and test new versions, the Langflow team recommends the following upgrade process:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Recommended: ",(0,t.jsx)(n.a,{href:"/api-projects#export-a-project",children:"Export your projects"})," to create backups of your flows:"]}),"\n",(0,t.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:'"',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_SERVER_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/projects/download/",props:{style:{color:"#A5D6FF"}}},{content:"$PROJECT_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,t.jsxs)(n.p,{children:["To export flows from the visual editor, see ",(0,t.jsx)(n.a,{href:"/concepts-flows-import",children:"Import and export flows"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Install the new version:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Langflow OSS Python package"}),": Install the new version in a new virtual environment. For instructions, see ",(0,t.jsx)(n.a,{href:"/get-started-installation#install-and-run-the-langflow-oss-python-package",children:"Install and run the Langflow OSS Python package"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Langflow Docker image"}),": Run the new image in a separate container."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Langflow Desktop"}),": To upgrade in place, open Langflow Desktop, and then click ",(0,t.jsx)(n.strong,{children:"Upgrade Available"})," in the Langflow header. If you want to isolate the new version, you must install Langflow Desktop on a separate physical or virtual machine, and then ",(0,t.jsx)(n.a,{href:"/concepts-flows-import",children:"import your flows"})," to the new installation."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"/concepts-flows-import",children:"Import your flows"})," to test them in the new version, ",(0,t.jsx)(n.a,{href:"/concepts-components#component-versions",children:"upgrading components"})," as needed."]}),"\n",(0,t.jsxs)(n.p,{children:["When upgrading components, you can use the ",(0,t.jsx)(n.strong,{children:"Create backup flow before updating"})," option if you didn't previously export your flows."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"If you installed the new version in isolation, upgrade your primary installation after testing the new version."}),"\n",(0,t.jsx)(n.p,{children:"If you made changes to your flows in the isolated installation, you might want to export and import those flows back to your upgraded primary installation so you don't have to repeat the component upgrade process."}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"150",children:"1.5.0"}),"\n",(0,t.jsxs)(n.p,{children:["Highlights of this release include the following changes.\nFor all changes, see the ",(0,t.jsx)(n.a,{href:"https://github.com/langflow-ai/langflow/releases",children:"Changelog"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"new-features-and-enhancements",children:"New features and enhancements"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Authentication changes"}),"\n",(0,t.jsxs)(n.p,{children:["To enhance security and ensure proper authentication for automatic login features, most API endpoints now require authentication with a Langflow API key, regardless of the ",(0,t.jsx)(n.code,{children:"AUTO_LOGIN"})," setting.\nThe only exceptions are the MCP endpoints ",(0,t.jsx)(n.code,{children:"/v1/mcp"}),", ",(0,t.jsx)(n.code,{children:"/v1/mcp-projects"}),", and ",(0,t.jsx)(n.code,{children:"/v2/mcp"}),", which never require authentication.\nFor more information, see ",(0,t.jsx)(n.a,{href:"/api-keys-and-authentication",children:"API keys and authentication"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Centralized ",(0,t.jsx)(n.strong,{children:"Language Model"})," and ",(0,t.jsx)(n.strong,{children:"Embedding Model"})," components"]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsxs)(n.a,{href:"/components-models",children:[(0,t.jsx)(n.strong,{children:"Language Model"})," component"]})," and ",(0,t.jsxs)(n.a,{href:"/components-embedding-models",children:[(0,t.jsx)(n.strong,{children:"Embedding Model"})," component"]})," are now core components for your LLM and embeddings flows. They support multiple models and model providers, and allow you to experiment with different models without swapping out single-provider components.\nFind them in the ",(0,t.jsx)(n.strong,{children:"Components"})," menu in the ",(0,t.jsx)(n.strong,{children:"Models"})," category."]}),"\n",(0,t.jsxs)(n.p,{children:["The single-provider components are still available for your flows in the ",(0,t.jsx)(n.strong,{children:"Components"})," menu in the ",(0,t.jsx)(n.a,{href:"/components-bundle-components",children:(0,t.jsx)(n.strong,{children:"Bundles"})})," section, and you can use them to replace the ",(0,t.jsx)(n.strong,{children:"Language Model"})," and ",(0,t.jsx)(n.strong,{children:"Embedding Model"})," core components, or connect them to the ",(0,t.jsx)(n.strong,{children:"Agent"})," component with the ",(0,t.jsx)(n.strong,{children:"Custom"})," provider option."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"MCP server one-click installation"}),"\n",(0,t.jsxs)(n.p,{children:["On your Langflow project's ",(0,t.jsx)(n.strong,{children:"MCP server"})," page, click ",(0,t.jsx)(n.strong,{children:"Auto install"})," to install your Langflow MCP server to MCP clients with just one click.\nThe option to install with a JSON configuration file is available for macOS, Windows, and WSL.\nFor more information, see ",(0,t.jsx)(n.a,{href:"/mcp-server",children:"Use Langflow as an MCP server"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"MCP server management"}),"\n",(0,t.jsxs)(n.p,{children:["You can now add, remove, and edit your MCP servers in the ",(0,t.jsx)(n.strong,{children:"MCP Tools"})," components and through your Langflow ",(0,t.jsx)(n.strong,{children:"Settings"})," page.\nFor more information, see ",(0,t.jsx)(n.a,{href:"/mcp-client",children:"Use Langflow as an MCP client"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Input schema replaces temporary overrides"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.strong,{children:"Input schema"})," pane replaces the need to manage tweak values in the ",(0,t.jsx)(n.strong,{children:"API access"})," pane. When you enable a parameter in the ",(0,t.jsx)(n.strong,{children:"Input schema"})," pane, the parameter is automatically added to your flow's code snippets, providing ready-to-use templates for making requests in your preferred programming language."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Tools"})," components are redistributed"]}),"\n",(0,t.jsxs)(n.p,{children:["All components in the ",(0,t.jsx)(n.strong,{children:"Tools"})," category were moved to other component categories, such as ",(0,t.jsx)(n.strong,{children:"Helpers"})," and ",(0,t.jsx)(n.a,{href:"/components-bundle-components",children:"bundles"}),", or marked as legacy."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsxs)(n.a,{href:"/mcp-client",children:[(0,t.jsx)(n.strong,{children:"MCP Tools"})," component"]})," is now under the ",(0,t.jsx)(n.strong,{children:"Agents"})," category."]}),"\n",(0,t.jsxs)(n.p,{children:["Tools that performed the same function were combined into single components that support multiple providers, such as the ",(0,t.jsxs)(n.a,{href:"/components-data#web-search",children:[(0,t.jsx)(n.strong,{children:"Web Search"})," component"]})," and the ",(0,t.jsxs)(n.a,{href:"/components-data#news-search",children:[(0,t.jsx)(n.strong,{children:"News Search"})," component"]}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["For more information, see ",(0,t.jsxs)(n.a,{href:"/components-tools",children:[(0,t.jsx)(n.strong,{children:"Tools"})," components"]}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Stability improvements"}),"\n",(0,t.jsxs)(n.p,{children:["General stability improvements and bug fixes for enhanced reliability.\nSee an issue? ",(0,t.jsx)(n.a,{href:"https://github.com/langflow-ai/langflow/issues",children:"Raise it on GitHub"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"New integrations and bundles"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsxs)(n.a,{href:"/integrations-cleanlab",children:[(0,t.jsx)(n.strong,{children:"Cleanlab"})," bundle"]})}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"142",children:"1.4.2"}),"\n",(0,t.jsxs)(n.p,{children:["Highlights of this release include the following changes.\nFor all changes, see the ",(0,t.jsx)(n.a,{href:"https://github.com/langflow-ai/langflow/releases",children:"Changelog"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"new-features-and-enhancements-1",children:"New features and enhancements"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Enhanced file and flow management system with improved bulk capabilities."}),"\n",(0,t.jsxs)(n.li,{children:["Added the ",(0,t.jsx)(n.strong,{children:"BigQuery"})," component"]}),"\n",(0,t.jsxs)(n.li,{children:["Added the ",(0,t.jsx)(n.strong,{children:"Twelve Labs"})," bundle"]}),"\n",(0,t.jsxs)(n.li,{children:["Added the ",(0,t.jsx)(n.strong,{children:"NVIDIA G-Assist"})," component"]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"deprecations",children:"Deprecations"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Deprecated the ",(0,t.jsx)(n.strong,{children:"Combine Text"})," component."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"141",children:"1.4.1"}),"\n",(0,t.jsxs)(n.p,{children:["Highlights of this release include the following changes.\nFor all changes, see the ",(0,t.jsx)(n.a,{href:"https://github.com/langflow-ai/langflow/releases",children:"Changelog"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"new-features-and-enhancements-2",children:"New features and enhancements"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Added an enhanced ",(0,t.jsx)(n.strong,{children:"Breaking Changes"})," feature to help update components without breaking flows after updating Langflow."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"140",children:"1.4.0"}),"\n",(0,t.jsxs)(n.p,{children:["Highlights of this release include the following changes.\nFor all changes, see the ",(0,t.jsx)(n.a,{href:"https://github.com/langflow-ai/langflow/releases",children:"Changelog"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"new-features-and-enhancements-3",children:"New features and enhancements"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Introduced MCP server functionality to serve Langflow tools to MCP-compatible clients."}),"\n",(0,t.jsxs)(n.li,{children:["Renamed ",(0,t.jsx)(n.strong,{children:"Folders"})," to ",(0,t.jsx)(n.strong,{children:"Projects"})," in the visual editor."]}),"\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsx)(n.code,{children:"/folders"})," endpoints now redirect to ",(0,t.jsx)(n.code,{children:"/projects"}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"deprecations-1",children:"Deprecations"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Deprecated the ",(0,t.jsx)(n.strong,{children:"Gmail"}),", ",(0,t.jsx)(n.strong,{children:"Google Drive"}),", and ",(0,t.jsx)(n.strong,{children:"Google Search"})," components.\nFor alternatives, see the ",(0,t.jsxs)(n.a,{href:"/bundles-google",children:[(0,t.jsx)(n.strong,{children:"Google"})," bundle"]}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"earlier-releases",children:"Earlier releases"}),"\n",(0,t.jsxs)(n.p,{children:["See the ",(0,t.jsx)(n.a,{href:"https://github.com/langflow-ai/langflow/releases",children:"Changelog"}),"."]})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(g,{...e})}):g(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([[879],{28453:(e,n,o)=>{o.d(n,{R:()=>i,x:()=>l});var s=o(96540);const t={},r=s.createContext(t);function i(e){const n=s.useContext(r);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(t):e.components||t:i(e.components),s.createElement(r.Provider,{value:n},e.children)}},84739:(e,n,o)=>{o.r(n),o.d(n,{CH:()=>d,assets:()=>c,chCodeConfig:()=>h,contentTitle:()=>a,default:()=>u,frontMatter:()=>l,metadata:()=>s,toc:()=>p});const s=JSON.parse('{"id":"Support/release-notes","title":"Langflow release notes","description":"This page summarizes significant changes to Langflow in each release.","source":"@site/docs/Support/release-notes.mdx","sourceDirName":"Support","slug":"/release-notes","permalink":"/release-notes","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Langflow release notes","slug":"/release-notes"},"sidebar":"docs","previous":{"title":"Contribute bundles","permalink":"/contributing-bundles"},"next":{"title":"Troubleshoot","permalink":"/troubleshoot"}}');var t=o(74848),r=o(28453),i=o(24754);const l={title:"Langflow release notes",slug:"/release-notes"},a=void 0,c={},d={annotations:i.hk,Code:i.Cy},h={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},p=[{value:"Prepare to upgrade",id:"prepare-to-upgrade",level:2},{value:"1.5.0",id:"150",level:2},{value:"New features and enhancements",id:"new-features-and-enhancements",level:3},{value:"1.4.2",id:"142",level:2},{value:"New features and enhancements",id:"new-features-and-enhancements-1",level:3},{value:"Deprecations",id:"deprecations",level:3},{value:"1.4.1",id:"141",level:2},{value:"New features and enhancements",id:"new-features-and-enhancements-2",level:3},{value:"1.4.0",id:"140",level:2},{value:"New features and enhancements",id:"new-features-and-enhancements-3",level:3},{value:"Deprecations",id:"deprecations-1",level:3},{value:"Earlier releases",id:"earlier-releases",level:2}];function g(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return d||m("CH",!1),d.Code||m("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.jsxs)(n.p,{children:["This page summarizes significant changes to Langflow in each release.\nFor all changes, see the ",(0,t.jsx)(n.a,{href:"https://github.com/langflow-ai/langflow/releases/latest",children:"Changelog"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"Due to strict SemVer requirements, Langflow Desktop can have different patch versions than the core Langflow OSS Python package, but the major and minor versions are aligned."}),"\n",(0,t.jsx)(n.h2,{id:"prepare-to-upgrade",children:"Prepare to upgrade"}),"\n",(0,t.jsx)(n.admonition,{type:"important",children:(0,t.jsxs)(n.p,{children:["Whenever possible, the Langflow team recommends installing new Langflow versions in a new virtual environment or VM before upgrading your primary installation.\nThis allows you to ",(0,t.jsx)(n.a,{href:"/concepts-flows-import#import-a-flow",children:"import flows"})," from your existing installation and test them in the new version without disrupting your existing installation.\nIn the event of breaking changes or bugs, your existing installation is preserved in a stable state."]})}),"\n",(0,t.jsx)(n.p,{children:"To avoid the impact of potential breaking changes and test new versions, the Langflow team recommends the following upgrade process:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Recommended: ",(0,t.jsx)(n.a,{href:"/api-projects#export-a-project",children:"Export your projects"})," to create backups of your flows:"]}),"\n",(0,t.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:'"',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_SERVER_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/projects/download/",props:{style:{color:"#A5D6FF"}}},{content:"$PROJECT_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,t.jsxs)(n.p,{children:["To export flows from the visual editor, see ",(0,t.jsx)(n.a,{href:"/concepts-flows-import",children:"Import and export flows"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Install the new version:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Langflow OSS Python package"}),": Install the new version in a new virtual environment. For instructions, see ",(0,t.jsx)(n.a,{href:"/get-started-installation#install-and-run-the-langflow-oss-python-package",children:"Install and run the Langflow OSS Python package"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Langflow Docker image"}),": Run the new image in a separate container."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Langflow Desktop"}),": To upgrade in place, open Langflow Desktop, and then click ",(0,t.jsx)(n.strong,{children:"Upgrade Available"})," in the Langflow header. If you want to isolate the new version, you must install Langflow Desktop on a separate physical or virtual machine, and then ",(0,t.jsx)(n.a,{href:"/concepts-flows-import",children:"import your flows"})," to the new installation."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"/concepts-flows-import",children:"Import your flows"})," to test them in the new version, ",(0,t.jsx)(n.a,{href:"/concepts-components#component-versions",children:"upgrading components"})," as needed."]}),"\n",(0,t.jsxs)(n.p,{children:["When upgrading components, you can use the ",(0,t.jsx)(n.strong,{children:"Create backup flow before updating"})," option if you didn't previously export your flows."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"If you installed the new version in isolation, upgrade your primary installation after testing the new version."}),"\n",(0,t.jsx)(n.p,{children:"If you made changes to your flows in the isolated installation, you might want to export and import those flows back to your upgraded primary installation so you don't have to repeat the component upgrade process."}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"150",children:"1.5.0"}),"\n",(0,t.jsxs)(n.p,{children:["Highlights of this release include the following changes.\nFor all changes, see the ",(0,t.jsx)(n.a,{href:"https://github.com/langflow-ai/langflow/releases",children:"Changelog"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"new-features-and-enhancements",children:"New features and enhancements"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Authentication changes"}),"\n",(0,t.jsxs)(n.p,{children:["To enhance security and ensure proper authentication for automatic login features, most API endpoints now require authentication with a Langflow API key, regardless of the ",(0,t.jsx)(n.code,{children:"AUTO_LOGIN"})," setting.\nThe only exceptions are the MCP endpoints ",(0,t.jsx)(n.code,{children:"/v1/mcp"}),", ",(0,t.jsx)(n.code,{children:"/v1/mcp-projects"}),", and ",(0,t.jsx)(n.code,{children:"/v2/mcp"}),", which never require authentication.\nFor more information, see ",(0,t.jsx)(n.a,{href:"/api-keys-and-authentication",children:"API keys and authentication"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Centralized ",(0,t.jsx)(n.strong,{children:"Language Model"})," and ",(0,t.jsx)(n.strong,{children:"Embedding Model"})," components"]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsxs)(n.a,{href:"/components-models",children:[(0,t.jsx)(n.strong,{children:"Language Model"})," component"]})," and ",(0,t.jsxs)(n.a,{href:"/components-embedding-models",children:[(0,t.jsx)(n.strong,{children:"Embedding Model"})," component"]})," are now core components for your LLM and embeddings flows. They support multiple models and model providers, and allow you to experiment with different models without swapping out single-provider components.\nFind them in the visual editor in the ",(0,t.jsx)(n.strong,{children:"Models"})," category."]}),"\n",(0,t.jsxs)(n.p,{children:["The single-provider components moved to the ",(0,t.jsx)(n.a,{href:"/components-bundle-components",children:(0,t.jsx)(n.strong,{children:"Bundles"})})," section.\nYou can use them to replace the ",(0,t.jsx)(n.strong,{children:"Language Model"})," and ",(0,t.jsx)(n.strong,{children:"Embedding Model"})," core components, or connect them to the ",(0,t.jsx)(n.strong,{children:"Agent"})," component with the ",(0,t.jsx)(n.strong,{children:"Custom"})," provider option."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"MCP server one-click installation"}),"\n",(0,t.jsxs)(n.p,{children:["On your Langflow project's ",(0,t.jsx)(n.strong,{children:"MCP server"})," page, click ",(0,t.jsx)(n.strong,{children:"Auto install"})," to install your Langflow MCP server to MCP clients with just one click.\nThe option to install with a JSON configuration file is available for macOS, Windows, and WSL.\nFor more information, see ",(0,t.jsx)(n.a,{href:"/mcp-server",children:"Use Langflow as an MCP server"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"MCP server management"}),"\n",(0,t.jsxs)(n.p,{children:["You can now add, remove, and edit your MCP servers in the ",(0,t.jsx)(n.strong,{children:"MCP Tools"})," components and through your Langflow ",(0,t.jsx)(n.strong,{children:"Settings"})," page.\nFor more information, see ",(0,t.jsx)(n.a,{href:"/mcp-client",children:"Use Langflow as an MCP client"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Input schema replaces temporary overrides"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.strong,{children:"Input schema"})," pane replaces the need to manage tweak values in the ",(0,t.jsx)(n.strong,{children:"API access"})," pane. When you enable a parameter in the ",(0,t.jsx)(n.strong,{children:"Input schema"})," pane, the parameter is automatically added to your flow's code snippets, providing ready-to-use templates for making requests in your preferred programming language."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Tools"})," components are redistributed"]}),"\n",(0,t.jsxs)(n.p,{children:["All components in the ",(0,t.jsx)(n.strong,{children:"Tools"})," category were moved to other component categories, such as ",(0,t.jsx)(n.strong,{children:"Helpers"})," and ",(0,t.jsx)(n.a,{href:"/components-bundle-components",children:"bundles"}),", or marked as legacy."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsxs)(n.a,{href:"/mcp-client",children:[(0,t.jsx)(n.strong,{children:"MCP Tools"})," component"]})," is now under the ",(0,t.jsx)(n.strong,{children:"Agents"})," category."]}),"\n",(0,t.jsxs)(n.p,{children:["Tools that performed the same function were combined into single components that support multiple providers, such as the ",(0,t.jsxs)(n.a,{href:"/components-data#web-search",children:[(0,t.jsx)(n.strong,{children:"Web Search"})," component"]})," and the ",(0,t.jsxs)(n.a,{href:"/components-data#news-search",children:[(0,t.jsx)(n.strong,{children:"News Search"})," component"]}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["For more information, see ",(0,t.jsxs)(n.a,{href:"/components-tools",children:[(0,t.jsx)(n.strong,{children:"Tools"})," components"]}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Stability improvements"}),"\n",(0,t.jsxs)(n.p,{children:["General stability improvements and bug fixes for enhanced reliability.\nSee an issue? ",(0,t.jsx)(n.a,{href:"https://github.com/langflow-ai/langflow/issues",children:"Raise it on GitHub"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"New integrations and bundles"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsxs)(n.a,{href:"/integrations-cleanlab",children:[(0,t.jsx)(n.strong,{children:"Cleanlab"})," bundle"]})}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"142",children:"1.4.2"}),"\n",(0,t.jsxs)(n.p,{children:["Highlights of this release include the following changes.\nFor all changes, see the ",(0,t.jsx)(n.a,{href:"https://github.com/langflow-ai/langflow/releases",children:"Changelog"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"new-features-and-enhancements-1",children:"New features and enhancements"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Enhanced file and flow management system with improved bulk capabilities."}),"\n",(0,t.jsxs)(n.li,{children:["Added the ",(0,t.jsx)(n.strong,{children:"BigQuery"})," component"]}),"\n",(0,t.jsxs)(n.li,{children:["Added the ",(0,t.jsx)(n.strong,{children:"Twelve Labs"})," bundle"]}),"\n",(0,t.jsxs)(n.li,{children:["Added the ",(0,t.jsx)(n.strong,{children:"NVIDIA System-Assist"})," component"]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"deprecations",children:"Deprecations"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Deprecated the ",(0,t.jsx)(n.strong,{children:"Combine Text"})," component."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"141",children:"1.4.1"}),"\n",(0,t.jsxs)(n.p,{children:["Highlights of this release include the following changes.\nFor all changes, see the ",(0,t.jsx)(n.a,{href:"https://github.com/langflow-ai/langflow/releases",children:"Changelog"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"new-features-and-enhancements-2",children:"New features and enhancements"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Added an enhanced ",(0,t.jsx)(n.strong,{children:"Breaking Changes"})," feature to help update components without breaking flows after updating Langflow."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"140",children:"1.4.0"}),"\n",(0,t.jsxs)(n.p,{children:["Highlights of this release include the following changes.\nFor all changes, see the ",(0,t.jsx)(n.a,{href:"https://github.com/langflow-ai/langflow/releases",children:"Changelog"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"new-features-and-enhancements-3",children:"New features and enhancements"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Introduced MCP server functionality to serve Langflow tools to MCP-compatible clients."}),"\n",(0,t.jsxs)(n.li,{children:["Renamed ",(0,t.jsx)(n.strong,{children:"Folders"})," to ",(0,t.jsx)(n.strong,{children:"Projects"})," in the visual editor."]}),"\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsx)(n.code,{children:"/folders"})," endpoints now redirect to ",(0,t.jsx)(n.code,{children:"/projects"}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"deprecations-1",children:"Deprecations"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Deprecated the ",(0,t.jsx)(n.strong,{children:"Gmail"}),", ",(0,t.jsx)(n.strong,{children:"Google Drive"}),", and ",(0,t.jsx)(n.strong,{children:"Google Search"})," components.\nFor alternatives, see the ",(0,t.jsxs)(n.a,{href:"/bundles-google",children:[(0,t.jsx)(n.strong,{children:"Google"})," bundle"]}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"earlier-releases",children:"Earlier releases"}),"\n",(0,t.jsxs)(n.p,{children:["See the ",(0,t.jsx)(n.a,{href:"https://github.com/langflow-ai/langflow/releases",children:"Changelog"}),"."]})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(g,{...e})}):g(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/97254d1d.2ac13b55.js b/assets/js/97254d1d.2ac13b55.js deleted file mode 100644 index 10f8e70fc3..0000000000 --- a/assets/js/97254d1d.2ac13b55.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[9459],{11470:(e,o,t)=>{t.d(o,{A:()=>g});var n=t(96540),s=t(18215),l=t(23104),c=t(56347),r=t(205),p=t(57485),i=t(31682),a=t(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:o}=e;return!!o&&"object"==typeof o&&"value"in o}(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 F(e){const{values:o,children:t}=e;return(0,n.useMemo)(()=>{const e=o??function(e){return d(e).map(({props:{value:e,label:o,attributes:t,default:n}})=>({value:e,label:o,attributes:t,default:n}))}(t);return function(e){const o=(0,i.XI)(e,(e,o)=>e.value===o.value);if(o.length>0)throw new Error(`Docusaurus error: Duplicate values "${o.map(e=>e.value).join(", ")}" found in . Every value needs to be unique.`)}(e),e},[o,t])}function h({value:e,tabValues:o}){return o.some(o=>o.value===e)}function y({queryString:e=!1,groupId:o}){const t=(0,c.W6)(),s=function({queryString:e=!1,groupId:o}){if("string"==typeof e)return e;if(!1===e)return null;if(!0===e&&!o)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 o??null}({queryString:e,groupId:o});return[(0,p.aZ)(s),(0,n.useCallback)(e=>{if(!s)return;const o=new URLSearchParams(t.location.search);o.set(s,e),t.replace({...t.location,search:o.toString()})},[s,t])]}function f(e){const{defaultValue:o,queryString:t=!1,groupId:s}=e,l=F(e),[c,p]=(0,n.useState)(()=>function({defaultValue:e,tabValues:o}){if(0===o.length)throw new Error("Docusaurus error: the component requires at least one children component");if(e){if(!h({value:e,tabValues:o}))throw new Error(`Docusaurus error: The has a defaultValue "${e}" but none of its children has the corresponding value. Available values are: ${o.map(e=>e.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return e}const t=o.find(e=>e.default)??o[0];if(!t)throw new Error("Unexpected error: 0 tabValues");return t.value}({defaultValue:o,tabValues:l})),[i,d]=y({queryString:t,groupId:s}),[f,u]=function({groupId:e}){const o=function(e){return e?`docusaurus.tab.${e}`:null}(e),[t,s]=(0,a.Dv)(o);return[t,(0,n.useCallback)(e=>{o&&s.set(e)},[o,s])]}({groupId:s}),D=(()=>{const e=i??f;return h({value:e,tabValues:l})?e:null})();(0,r.A)(()=>{D&&p(D)},[D]);return{selectedValue:c,selectValue:(0,n.useCallback)(e=>{if(!h({value:e,tabValues:l}))throw new Error(`Can't select invalid tab value=${e}`);p(e),d(e),u(e)},[d,u,l]),tabValues:l}}var u=t(92303);const D={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var C=t(74848);function x({className:e,block:o,selectedValue:t,selectValue:n,tabValues:c}){const r=[],{blockElementScrollPositionUntilNextRender:p}=(0,l.a_)(),i=e=>{const o=e.currentTarget,s=r.indexOf(o),l=c[s].value;l!==t&&(p(o),n(l))},a=e=>{let o=null;switch(e.key){case"Enter":i(e);break;case"ArrowRight":{const t=r.indexOf(e.currentTarget)+1;o=r[t]??r[0];break}case"ArrowLeft":{const t=r.indexOf(e.currentTarget)-1;o=r[t]??r[r.length-1];break}}o?.focus()};return(0,C.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":o},e),children:c.map(({value:e,label:o,attributes:n})=>(0,C.jsx)("li",{role:"tab",tabIndex:t===e?0:-1,"aria-selected":t===e,ref:e=>{r.push(e)},onKeyDown:a,onClick:i,...n,className:(0,s.A)("tabs__item",D.tabItem,n?.className,{"tabs__item--active":t===e}),children:o??e},e))})}function m({lazy:e,children:o,selectedValue:t}){const l=(Array.isArray(o)?o:[o]).filter(Boolean);if(e){const e=l.find(e=>e.props.value===t);return e?(0,n.cloneElement)(e,{className:(0,s.A)("margin-top--md",e.props.className)}):null}return(0,C.jsx)("div",{className:"margin-top--md",children:l.map((e,o)=>(0,n.cloneElement)(e,{key:o,hidden:e.props.value!==t}))})}function v(e){const o=f(e);return(0,C.jsxs)("div",{className:(0,s.A)("tabs-container",D.tabList),children:[(0,C.jsx)(x,{...o,...e}),(0,C.jsx)(m,{...o,...e})]})}function g(e){const o=(0,u.A)();return(0,C.jsx)(v,{...e,children:d(e.children)},String(o))}},19365:(e,o,t)=>{t.d(o,{A:()=>c});t(96540);var n=t(18215);const s={tabItem:"tabItem_Ymn6"};var l=t(74848);function c({children:e,hidden:o,className:t}){return(0,l.jsx)("div",{role:"tabpanel",className:(0,n.A)(s.tabItem,t),hidden:o,children:e})}},28453:(e,o,t)=>{t.d(o,{R:()=>c,x:()=>r});var n=t(96540);const s={},l=n.createContext(s);function c(e){const o=n.useContext(l);return n.useMemo(function(){return"function"==typeof e?e(o):{...o,...e}},[o,e])}function r(e){let o;return o=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:c(e.components),n.createElement(l.Provider,{value:o},e.children)}},90837:(e,o,t)=>{t.r(o),t.d(o,{CH:()=>a,assets:()=>i,chCodeConfig:()=>d,contentTitle:()=>p,default:()=>y,frontMatter:()=>r,metadata:()=>n,toc:()=>F});const n=JSON.parse('{"id":"API-Reference/api-files","title":"Files endpoints","description":"Use the /files endpoints to move files between your local machine and Langflow.","source":"@site/docs/API-Reference/api-files.mdx","sourceDirName":"API-Reference","slug":"/api-files","permalink":"/api-files","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Files endpoints","slug":"/api-files"},"sidebar":"docs","previous":{"title":"Flow management endpoints","permalink":"/api-flows"},"next":{"title":"Projects endpoints","permalink":"/api-projects"}}');var s=t(74848),l=t(28453),c=t(24754);t(11470),t(19365);const r={title:"Files endpoints",slug:"/api-files"},p=void 0,i={},a={annotations:c.hk,Code:c.Cy},d={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},F=[{value:"Differences between /v1/files and /v2/files",id:"differences-between-v1files-and-v2files",level:2},{value:"Files/V1 endpoints",id:"filesv1-endpoints",level:2},{value:"Upload file (v1)",id:"upload-file-v1",level:3},{value:"Upload image files (v1)",id:"upload-image-files-v1",level:3},{value:"List files (v1)",id:"list-files-v1",level:3},{value:"Download file (v1)",id:"download-file-v1",level:3},{value:"Delete file (v1)",id:"delete-file-v1",level:3},{value:"Files/V2 endpoints",id:"filesv2-endpoints",level:2},{value:"Upload file (v2)",id:"upload-file-v2",level:3},{value:"Send files to your flows (v2)",id:"send-files-to-your-flows-v2",level:3},{value:"List files (v2)",id:"list-files-v2",level:3},{value:"Download file (v2)",id:"download-file-v2",level:3},{value:"Edit file name (v2)",id:"edit-file-name-v2",level:3},{value:"Delete file (v2)",id:"delete-file-v2",level:3},{value:"Delete all files (v2)",id:"delete-all-files-v2",level:3},{value:"Create upload file (Deprecated)",id:"create-upload-file-deprecated",level:2},{value:"See also",id:"see-also",level:2}];function h(e){const o={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,l.R)(),...e.components},{Details:t}=o;return a||f("CH",!1),a.Code||f("CH.Code",!0),t||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)(o.p,{children:["Use the ",(0,s.jsx)(o.code,{children:"/files"})," endpoints to move files between your local machine and Langflow."]}),"\n",(0,s.jsxs)(o.h2,{id:"differences-between-v1files-and-v2files",children:["Differences between ",(0,s.jsx)(o.code,{children:"/v1/files"})," and ",(0,s.jsx)(o.code,{children:"/v2/files"})]}),"\n",(0,s.jsxs)(o.p,{children:["There are two versions of the ",(0,s.jsx)(o.code,{children:"/files"})," endpoints."]}),"\n",(0,s.jsxs)(o.p,{children:[(0,s.jsx)(o.code,{children:"/v2/files"})," offers the following improvements over ",(0,s.jsx)(o.code,{children:"/v1/files"}),":"]}),"\n",(0,s.jsxs)(o.ul,{children:["\n",(0,s.jsxs)(o.li,{children:[(0,s.jsx)(o.code,{children:"/v2"})," files are organized by ",(0,s.jsx)(o.code,{children:"user_id"})," instead of ",(0,s.jsx)(o.code,{children:"flow_id"}),".\nThis means files are owned by users, and they aren't attached to specific flows.\nYou can upload a file to Langflow one time, and use it with multiple flows."]}),"\n",(0,s.jsxs)(o.li,{children:[(0,s.jsx)(o.code,{children:"/v2"})," files are tracked in the Langflow database."]}),"\n",(0,s.jsxs)(o.li,{children:[(0,s.jsx)(o.code,{children:"/v2"})," supports bulk upload and delete."]}),"\n",(0,s.jsxs)(o.li,{children:[(0,s.jsx)(o.code,{children:"/v2"})," responses contain more descriptive metadata."]}),"\n"]}),"\n",(0,s.jsxs)(o.p,{children:["However, ",(0,s.jsx)(o.code,{children:"/v2/files"})," doesn't support image files.\nTo send image files to your flows through the API, use ",(0,s.jsx)(o.a,{href:"#upload-image-files-v1",children:"Upload image files (v1)"}),"."]}),"\n",(0,s.jsx)(o.h2,{id:"filesv1-endpoints",children:"Files/V1 endpoints"}),"\n",(0,s.jsxs)(o.p,{children:["Use the ",(0,s.jsx)(o.code,{children:"/files"})," endpoints to move files between your local machine and Langflow."]}),"\n",(0,s.jsx)(o.h3,{id:"upload-file-v1",children:"Upload file (v1)"}),"\n",(0,s.jsxs)(o.p,{children:["Upload a file to the ",(0,s.jsx)(o.code,{children:"v1/files/upload/$FLOW_ID"})," endpoint:\nReplace ",(0,s.jsx)(o.strong,{children:"FILE_NAME"})," with the uploaded file name."]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/files/upload/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"Content-Type: multipart/form-data" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -F ",props:{style:{color:"#79C0FF"}}},{content:'"file=@FILE_NAME.txt"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(o.p,{children:["Replace ",(0,s.jsx)(o.code,{children:"FILE_NAME.txt"})," with the name and extension of the file you want to upload.\nNot all file types are supported."]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flowId"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"92f9a4c5-cfc8-4656-ae63-1f0881163c28"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "file_path"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"92f9a4c5-cfc8-4656-ae63-1f0881163c28/2024-12-30_15-19-43_your_file.txt"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(o.h3,{id:"upload-image-files-v1",children:"Upload image files (v1)"}),"\n",(0,s.jsx)(o.p,{children:"Send image files to Langflow to use them in flows."}),"\n",(0,s.jsxs)(o.p,{children:["The default file limit is 100 MB.\nTo change this limit, set the ",(0,s.jsx)(o.code,{children:"LANGFLOW_MAX_FILE_SIZE_UPLOAD"})," ",(0,s.jsx)(o.a,{href:"/environment-variables",children:"environment variable"}),"."]}),"\n",(0,s.jsxs)(o.ol,{children:["\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Attach the image to a ",(0,s.jsx)(o.code,{children:"POST /v1/files/upload/$FLOW_ID"})," request with ",(0,s.jsx)(o.code,{children:"--form"})," (",(0,s.jsx)(o.code,{children:"-F"}),") and the file path:"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,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:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/files/upload/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"Content-Type: multipart/form-data" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -F ",props:{style:{color:"#79C0FF"}}},{content:'"file=@PATH/TO/FILE.png"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(o.p,{children:["A successful request returns the ",(0,s.jsx)(o.code,{children:"file_path"})," for the image in the Langflow file management system in the format ",(0,s.jsx)(o.code,{children:"FLOW_ID/TIMESTAMP_FILENAME.TYPE"}),".\nFor example:"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flowId"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"a430cc57-06bb-4c11-be39-d3d4de68d2c4"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "file_path"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"a430cc57-06bb-4c11-be39-d3d4de68d2c4/2024-11-27_14-47-50_image-file.png"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Use the returned ",(0,s.jsx)(o.code,{children:"file_path"})," to send the image file to other components that can accept file input. Where you specify the file path depends on the component type."]}),"\n",(0,s.jsxs)(o.p,{children:["The following example runs the ",(0,s.jsx)(o.strong,{children:"Basic Prompting"})," template flow, passing the image file and the query ",(0,s.jsx)(o.code,{children:"describe this image"})," as input for the ",(0,s.jsx)(o.strong,{children:"Chat Input"})," component.\nIn this case, the file path is specified in ",(0,s.jsx)(o.code,{children:"tweaks"}),"."]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/run/a430cc57-06bb-4c11-be39-d3d4de68d2c4?stream=false" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "output_type": "chat",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_type": "chat",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "tweaks": {',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "ChatInput-b67sL": {',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "files": "a430cc57-06bb-4c11-be39-d3d4de68d2c4/2024-11-27_14-47-50_image-file.png",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_value": "describe this image"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsx)(o.admonition,{type:"tip",children:(0,s.jsxs)(o.p,{children:["For help with tweaks, use the ",(0,s.jsx)(o.strong,{children:"Input Schema"})," in a flow's ",(0,s.jsxs)(o.a,{href:"/concepts-publish#api-access",children:[(0,s.jsx)(o.strong,{children:"API access"})," pane"]}),".\nSetting tweaks with ",(0,s.jsx)(o.strong,{children:"Input Schema"})," also automatically populates the required component IDs."]})}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(o.h3,{id:"list-files-v1",children:"List files (v1)"}),"\n",(0,s.jsx)(o.p,{children:"List all files associated with a specific flow."}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/files/list/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "files"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}},{content:'"2024-12-30_15-19-43_your_file.txt"',props:{style:{color:"#A5D6FF"}}},{content:"]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(o.h3,{id:"download-file-v1",children:"Download file (v1)"}),"\n",(0,s.jsx)(o.p,{children:"Download a specific file from a flow."}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/files/download/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'/2024-12-30_15-19-43_your_file.txt" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --output ",props:{style:{color:"#79C0FF"}}},{content:"downloaded_file.txt",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"File contents downloaded to downloaded_file.txt",props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n",(0,s.jsx)(o.h3,{id:"delete-file-v1",children:"Delete file (v1)"}),"\n",(0,s.jsx)(o.p,{children:"Delete a specific file from a flow."}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"DELETE ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/files/delete/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'/2024-12-30_15-19-43_your_file.txt" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"File 2024-12-30_15-19-43_your_file.txt deleted successfully"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(o.h2,{id:"filesv2-endpoints",children:"Files/V2 endpoints"}),"\n",(0,s.jsxs)(o.p,{children:["Use the ",(0,s.jsx)(o.code,{children:"/files"})," endpoints to move files between your local machine and Langflow."]}),"\n",(0,s.jsxs)(o.p,{children:["The ",(0,s.jsx)(o.code,{children:"/v2/files"})," endpoints can be authenticated by an API key or JWT.\nTo create a Langflow API key and export it as an environment variable, see ",(0,s.jsx)(o.a,{href:"/api-reference-api-examples",children:"Get started with the Langflow API"}),"."]}),"\n",(0,s.jsx)(o.h3,{id:"upload-file-v2",children:"Upload file (v2)"}),"\n",(0,s.jsx)(o.p,{children:"Upload a file to your user account. The file can be used across multiple flows."}),"\n",(0,s.jsxs)(o.p,{children:["The file is uploaded in the format ",(0,s.jsx)(o.code,{children:"USER_ID/FILE_ID.FILE_EXTENSION"}),", such as ",(0,s.jsx)(o.code,{children:"07e5b864-e367-4f52-b647-a48035ae7e5e/d44dc2e1-9ae9-4cf6-9114-8d34a6126c94.pdf"}),"."]}),"\n",(0,s.jsxs)(o.ol,{children:["\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["To retrieve your current ",(0,s.jsx)(o.code,{children:"user_id"}),", call the ",(0,s.jsx)(o.code,{children:"/whoami"})," endpoint:"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/users/whoami" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:'{"id":"07e5b864-e367-4f52-b647-a48035ae7e5e","username":"langflow","profile_image":null,"store_api_key":null,"is_active":true,"is_superuser":true,"create_at":"2025-05-08T17:59:07.855965","updated_at":"2025-05-28T19:00:42.556460","last_login_at":"2025-05-28T19:00:42.554338","optins":{"github_starred":false,"dialog_dismissed":true,"discord_clicked":false,"mcp_dialog_dismissed":true}}',props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["In the POST request to ",(0,s.jsx)(o.code,{children:"v2/files"}),", replace ",(0,s.jsx)(o.strong,{children:"@FILE_NAME.EXTENSION"})," with the uploaded file name and its extension.\nYou must include the ampersand (",(0,s.jsx)(o.code,{children:"@"}),") in the request to instruct curl to upload the contents of the file, not the string ",(0,s.jsx)(o.code,{children:"FILE_NAME.EXTENSION"}),"."]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v2/files" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"Content-Type: multipart/form-data" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -F ",props:{style:{color:"#79C0FF"}}},{content:'"file=@FILE_NAME.EXTENSION"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(o.p,{children:["The file is uploaded in the format ",(0,s.jsx)(o.code,{children:"USER_ID/FILE_ID.FILE_EXTENSION"}),", and the API returns metadata about the uploaded file:"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:'"d44dc2e1-9ae9-4cf6-9114-8d34a6126c94"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "name"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:'"engine_manual"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "path"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:'"07e5b864-e367-4f52-b647-a48035ae7e5e/d44dc2e1-9ae9-4cf6-9114-8d34a6126c94.pdf"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "size"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:"851160",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "provider"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(o.h3,{id:"send-files-to-your-flows-v2",children:"Send files to your flows (v2)"}),"\n",(0,s.jsx)(o.admonition,{type:"important",children:(0,s.jsxs)(o.p,{children:["The ",(0,s.jsx)(o.code,{children:"/v2/files"})," endpoint can't send image files to flows.\nTo send image files to your flows through the API, see ",(0,s.jsx)(o.a,{href:"#upload-image-files-v1",children:"Upload image files (v1)"}),"."]})}),"\n",(0,s.jsxs)(o.p,{children:["This endpoint uploads files to your Langflow server's file management system.\nTo use an uploaded file in a flow, send the file path to a flow with a ",(0,s.jsxs)(o.a,{href:"/components-data#file",children:[(0,s.jsx)(o.strong,{children:"File"})," component"]}),"."]}),"\n",(0,s.jsxs)(o.p,{children:["The default file limit is 100 MB. To configure this value, change the ",(0,s.jsx)(o.code,{children:"LANGFLOW_MAX_FILE_SIZE_UPLOAD"})," ",(0,s.jsx)(o.a,{href:"/environment-variables",children:"environment variable"}),"."]}),"\n",(0,s.jsxs)(o.ol,{children:["\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["To send a file to your flow with the API, POST the file to the ",(0,s.jsx)(o.code,{children:"/api/v2/files"})," endpoint."]}),"\n",(0,s.jsxs)(o.p,{children:["Replace ",(0,s.jsx)(o.strong,{children:"FILE_NAME.EXTENSION"})," with the name and extension of the file you want to upload.\nThis is the same step described in ",(0,s.jsx)(o.a,{href:"#upload-file-v2",children:"Upload file (v2)"}),", but since you need the filename to upload to your flow, it is included here."]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v2/files" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"Content-Type: multipart/form-data" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -F ",props:{style:{color:"#79C0FF"}}},{content:'"file=@FILE_NAME.EXTENSION"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(o.p,{children:["The file is uploaded in the format ",(0,s.jsx)(o.code,{children:"USER_ID/FILE_ID.FILE_EXTENSION"}),", and the API returns metadata about the uploaded file:"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:'"d44dc2e1-9ae9-4cf6-9114-8d34a6126c94"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "name"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:'"engine_manual"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "path"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:'"07e5b864-e367-4f52-b647-a48035ae7e5e/d44dc2e1-9ae9-4cf6-9114-8d34a6126c94.pdf"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "size"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:"851160",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "provider"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["To use this file in your flow, add a ",(0,s.jsx)(o.strong,{children:"File"})," component to your flow.\nThis component loads files into flows from your local machine or Langflow file management."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Run the flow, passing the ",(0,s.jsx)(o.code,{children:"path"})," to the ",(0,s.jsx)(o.code,{children:"File"})," component in the ",(0,s.jsx)(o.code,{children:"tweaks"})," object:"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl --request POST \\",props:{}}]},{tokens:[{content:' --url "$LANGFLOW_URL/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 do you see?",',props:{}}]},{tokens:[{content:' "output_type": "chat",',props:{}}]},{tokens:[{content:' "input_type": "text",',props:{}}]},{tokens:[{content:' "tweaks": {',props:{}}]},{tokens:[{content:' "File-1olS3": {',props:{}}]},{tokens:[{content:' "path": [',props:{}}]},{tokens:[{content:' "07e5b864-e367-4f52-b647-a48035ae7e5e/3a290013-fe1e-4d3d-a454-cacae81288f3.pdf"',props:{}}]},{tokens:[{content:" ]",props:{}}]},{tokens:[{content:" }",props:{}}]},{tokens:[{content:" }",props:{}}]},{tokens:[{content:"}'",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsxs)(o.p,{children:["To get the ",(0,s.jsx)(o.code,{children:"File"})," component's ID, call the ",(0,s.jsx)(o.a,{href:"/api-flows#read-flow",children:"Read flow"})," endpoint or inspect the component in the visual editor."]}),"\n",(0,s.jsx)(o.p,{children:"If the file path is valid, the flow runs successfully."}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(o.h3,{id:"list-files-v2",children:"List files (v2)"}),"\n",(0,s.jsx)(o.p,{children:"List all files associated with your user account."}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v2/files" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"[",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"c7b22c4c-d5e0-4ec9-af97-5d85b7657a34"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"your_file"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "path"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"6f17a73e-97d7-4519-a8d9-8e4c0be411bb/c7b22c4c-d5e0-4ec9-af97-5d85b7657a34.txt"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "size"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"1234",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "provider"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(o.h3,{id:"download-file-v2",children:"Download file (v2)"}),"\n",(0,s.jsx)(o.p,{children:"Download a specific file by its ID and file extension."}),"\n",(0,s.jsxs)(o.p,{children:["You must specify the file type you expect in the ",(0,s.jsx)(o.code,{children:"--output"})," value."]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v2/files/c7b22c4c-d5e0-4ec9-af97-5d85b7657a34" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --output ",props:{style:{color:"#79C0FF"}}},{content:"downloaded_file.txt",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"File contents downloaded to downloaded_file.txt",props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n",(0,s.jsx)(o.h3,{id:"edit-file-name-v2",children:"Edit file name (v2)"}),"\n",(0,s.jsx)(o.p,{children:"Change a file name."}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"PUT ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v2/files/",props:{style:{color:"#A5D6FF"}}},{content:"$FILE_ID",props:{style:{color:"#C9D1D9"}}},{content:'?name=new_file_name" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"76543e40-f388-4cb3-b0ee-a1e870aca3d3"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"new_file_name"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "path"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"6f17a73e-97d7-4519-a8d9-8e4c0be411bb/76543e40-f388-4cb3-b0ee-a1e870aca3d3.png"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "size"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"2728251",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "provider"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(o.h3,{id:"delete-file-v2",children:"Delete file (v2)"}),"\n",(0,s.jsx)(o.p,{children:"Delete a specific file by its ID."}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"DELETE ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v2/files/",props:{style:{color:"#A5D6FF"}}},{content:"$FILE_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"File deleted successfully"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(o.h3,{id:"delete-all-files-v2",children:"Delete all files (v2)"}),"\n",(0,s.jsx)(o.p,{children:"Delete all files associated with your user account."}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"DELETE ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v2/files" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"All files deleted successfully"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(o.h2,{id:"create-upload-file-deprecated",children:"Create upload file (Deprecated)"}),"\n",(0,s.jsxs)(o.p,{children:["This endpoint is deprecated. Use the ",(0,s.jsx)(o.code,{children:"/files"})," endpoints instead."]}),"\n",(0,s.jsx)(o.h2,{id:"see-also",children:"See also"}),"\n",(0,s.jsxs)(o.ul,{children:["\n",(0,s.jsx)(o.li,{children:(0,s.jsx)(o.a,{href:"/concepts-file-management",children:"Manage files"})}),"\n"]})]})}function y(e={}){const{wrapper:o}={...(0,l.R)(),...e.components};return o?(0,s.jsx)(o,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}function f(e,o){throw new Error("Expected "+(o?"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/97254d1d.6cd30cd4.js b/assets/js/97254d1d.6cd30cd4.js new file mode 100644 index 0000000000..1ff59e05dd --- /dev/null +++ b/assets/js/97254d1d.6cd30cd4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[9459],{28453:(o,e,t)=>{t.d(e,{R:()=>c,x:()=>r});var n=t(96540);const s={},l=n.createContext(s);function c(o){const e=n.useContext(l);return n.useMemo(function(){return"function"==typeof o?o(e):{...e,...o}},[e,o])}function r(o){let e;return e=o.disableParentContext?"function"==typeof o.components?o.components(s):o.components||s:c(o.components),n.createElement(l.Provider,{value:e},o.children)}},90837:(o,e,t)=>{t.r(e),t.d(e,{CH:()=>a,assets:()=>i,chCodeConfig:()=>d,contentTitle:()=>p,default:()=>y,frontMatter:()=>r,metadata:()=>n,toc:()=>F});const n=JSON.parse('{"id":"API-Reference/api-files","title":"Files endpoints","description":"Use the /files endpoints to move files between your local machine and Langflow.","source":"@site/docs/API-Reference/api-files.mdx","sourceDirName":"API-Reference","slug":"/api-files","permalink":"/api-files","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Files endpoints","slug":"/api-files"},"sidebar":"docs","previous":{"title":"Flow management endpoints","permalink":"/api-flows"},"next":{"title":"Projects endpoints","permalink":"/api-projects"}}');var s=t(74848),l=t(28453),c=t(24754);const r={title:"Files endpoints",slug:"/api-files"},p=void 0,i={},a={annotations:c.hk,Code:c.Cy},d={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},F=[{value:"Differences between /v1/files and /v2/files",id:"differences-between-v1files-and-v2files",level:2},{value:"Files/V1 endpoints",id:"filesv1-endpoints",level:2},{value:"Upload file (v1)",id:"upload-file-v1",level:3},{value:"Upload image files (v1)",id:"upload-image-files-v1",level:3},{value:"List files (v1)",id:"list-files-v1",level:3},{value:"Download file (v1)",id:"download-file-v1",level:3},{value:"Delete file (v1)",id:"delete-file-v1",level:3},{value:"Files/V2 endpoints",id:"filesv2-endpoints",level:2},{value:"Upload file (v2)",id:"upload-file-v2",level:3},{value:"Send files to your flows (v2)",id:"send-files-to-your-flows-v2",level:3},{value:"List files (v2)",id:"list-files-v2",level:3},{value:"Download file (v2)",id:"download-file-v2",level:3},{value:"Edit file name (v2)",id:"edit-file-name-v2",level:3},{value:"Delete file (v2)",id:"delete-file-v2",level:3},{value:"Delete all files (v2)",id:"delete-all-files-v2",level:3},{value:"Create upload file (Deprecated)",id:"create-upload-file-deprecated",level:2},{value:"See also",id:"see-also",level:2}];function h(o){const e={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,l.R)(),...o.components},{Details:t}=e;return a||f("CH",!1),a.Code||f("CH.Code",!0),t||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",(0,s.jsxs)(e.p,{children:["Use the ",(0,s.jsx)(e.code,{children:"/files"})," endpoints to move files between your local machine and Langflow."]}),"\n",(0,s.jsxs)(e.h2,{id:"differences-between-v1files-and-v2files",children:["Differences between ",(0,s.jsx)(e.code,{children:"/v1/files"})," and ",(0,s.jsx)(e.code,{children:"/v2/files"})]}),"\n",(0,s.jsxs)(e.p,{children:["There are two versions of the ",(0,s.jsx)(e.code,{children:"/files"})," endpoints."]}),"\n",(0,s.jsxs)(e.p,{children:[(0,s.jsx)(e.code,{children:"/v2/files"})," offers the following improvements over ",(0,s.jsx)(e.code,{children:"/v1/files"}),":"]}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"/v2"})," files are organized by ",(0,s.jsx)(e.code,{children:"user_id"})," instead of ",(0,s.jsx)(e.code,{children:"flow_id"}),".\nThis means files are owned by users, and they aren't attached to specific flows.\nYou can upload a file to Langflow one time, and use it with multiple flows."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"/v2"})," files are tracked in the Langflow database."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"/v2"})," supports bulk upload and delete."]}),"\n",(0,s.jsxs)(e.li,{children:[(0,s.jsx)(e.code,{children:"/v2"})," responses contain more descriptive metadata."]}),"\n"]}),"\n",(0,s.jsxs)(e.p,{children:["However, ",(0,s.jsx)(e.code,{children:"/v2/files"})," doesn't support image files.\nTo send image files to your flows through the API, use ",(0,s.jsx)(e.a,{href:"#upload-image-files-v1",children:"Upload image files (v1)"}),"."]}),"\n",(0,s.jsx)(e.h2,{id:"filesv1-endpoints",children:"Files/V1 endpoints"}),"\n",(0,s.jsxs)(e.p,{children:["Use the ",(0,s.jsx)(e.code,{children:"/files"})," endpoints to move files between your local machine and Langflow."]}),"\n",(0,s.jsx)(e.h3,{id:"upload-file-v1",children:"Upload file (v1)"}),"\n",(0,s.jsxs)(e.p,{children:["Upload a file to the ",(0,s.jsx)(e.code,{children:"v1/files/upload/$FLOW_ID"})," endpoint:\nReplace ",(0,s.jsx)(e.strong,{children:"FILE_NAME"})," with the uploaded file name."]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/files/upload/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"Content-Type: multipart/form-data" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -F ",props:{style:{color:"#79C0FF"}}},{content:'"file=@FILE_NAME.txt"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e.p,{children:["Replace ",(0,s.jsx)(e.code,{children:"FILE_NAME.txt"})," with the name and extension of the file you want to upload.\nNot all file types are supported."]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flowId"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"92f9a4c5-cfc8-4656-ae63-1f0881163c28"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "file_path"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"92f9a4c5-cfc8-4656-ae63-1f0881163c28/2024-12-30_15-19-43_your_file.txt"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(e.h3,{id:"upload-image-files-v1",children:"Upload image files (v1)"}),"\n",(0,s.jsx)(e.p,{children:"Send image files to Langflow to use them in flows."}),"\n",(0,s.jsxs)(e.p,{children:["The default file limit is 100 MB.\nTo change this limit, set the ",(0,s.jsx)(e.code,{children:"LANGFLOW_MAX_FILE_SIZE_UPLOAD"})," ",(0,s.jsx)(e.a,{href:"/environment-variables",children:"environment variable"}),"."]}),"\n",(0,s.jsxs)(e.ol,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["Attach the image to a ",(0,s.jsx)(e.code,{children:"POST /v1/files/upload/$FLOW_ID"})," request with ",(0,s.jsx)(e.code,{children:"--form"})," (",(0,s.jsx)(e.code,{children:"-F"}),") and the file path:"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,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:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/files/upload/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"Content-Type: multipart/form-data" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -F ",props:{style:{color:"#79C0FF"}}},{content:'"file=@PATH/TO/FILE.png"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e.p,{children:["A successful request returns the ",(0,s.jsx)(e.code,{children:"file_path"})," for the image in the Langflow file management system in the format ",(0,s.jsx)(e.code,{children:"FLOW_ID/TIMESTAMP_FILENAME.TYPE"}),".\nFor example:"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flowId"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"a430cc57-06bb-4c11-be39-d3d4de68d2c4"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "file_path"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"a430cc57-06bb-4c11-be39-d3d4de68d2c4/2024-11-27_14-47-50_image-file.png"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["Use the returned ",(0,s.jsx)(e.code,{children:"file_path"})," to send the image file to other components that can accept file input. Where you specify the file path depends on the component type."]}),"\n",(0,s.jsxs)(e.p,{children:["The following example runs the ",(0,s.jsx)(e.strong,{children:"Basic Prompting"})," template flow, passing the image file and the query ",(0,s.jsx)(e.code,{children:"describe this image"})," as input for the ",(0,s.jsx)(e.strong,{children:"Chat Input"})," component.\nIn this case, the file path is specified in ",(0,s.jsx)(e.code,{children:"tweaks"}),"."]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/run/a430cc57-06bb-4c11-be39-d3d4de68d2c4?stream=false" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "output_type": "chat",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_type": "chat",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "tweaks": {',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "ChatInput-b67sL": {',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "files": "a430cc57-06bb-4c11-be39-d3d4de68d2c4/2024-11-27_14-47-50_image-file.png",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "input_value": "describe this image"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsx)(e.admonition,{type:"tip",children:(0,s.jsxs)(e.p,{children:["For help with tweaks, use the ",(0,s.jsx)(e.strong,{children:"Input Schema"})," in a flow's ",(0,s.jsxs)(e.a,{href:"/concepts-publish#api-access",children:[(0,s.jsx)(e.strong,{children:"API access"})," pane"]}),".\nSetting tweaks with ",(0,s.jsx)(e.strong,{children:"Input Schema"})," also automatically populates the required component IDs."]})}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(e.h3,{id:"list-files-v1",children:"List files (v1)"}),"\n",(0,s.jsx)(e.p,{children:"List all files associated with a specific flow."}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/files/list/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "files"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}},{content:'"2024-12-30_15-19-43_your_file.txt"',props:{style:{color:"#A5D6FF"}}},{content:"]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(e.h3,{id:"download-file-v1",children:"Download file (v1)"}),"\n",(0,s.jsx)(e.p,{children:"Download a specific file from a flow."}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/files/download/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'/2024-12-30_15-19-43_your_file.txt" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --output ",props:{style:{color:"#79C0FF"}}},{content:"downloaded_file.txt",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"File contents downloaded to downloaded_file.txt",props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n",(0,s.jsx)(e.h3,{id:"delete-file-v1",children:"Delete file (v1)"}),"\n",(0,s.jsx)(e.p,{children:"Delete a specific file from a flow."}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"DELETE ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/files/delete/",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'/2024-12-30_15-19-43_your_file.txt" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"File 2024-12-30_15-19-43_your_file.txt deleted successfully"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(e.h2,{id:"filesv2-endpoints",children:"Files/V2 endpoints"}),"\n",(0,s.jsxs)(e.p,{children:["Use the ",(0,s.jsx)(e.code,{children:"/files"})," endpoints to move files between your local machine and Langflow."]}),"\n",(0,s.jsxs)(e.p,{children:["The ",(0,s.jsx)(e.code,{children:"/v2/files"})," endpoints can be authenticated by an API key or JWT.\nTo create a Langflow API key and export it as an environment variable, see ",(0,s.jsx)(e.a,{href:"/api-reference-api-examples",children:"Get started with the Langflow API"}),"."]}),"\n",(0,s.jsx)(e.h3,{id:"upload-file-v2",children:"Upload file (v2)"}),"\n",(0,s.jsx)(e.p,{children:"Upload a file to your user account. The file can be used across multiple flows."}),"\n",(0,s.jsxs)(e.p,{children:["The file is uploaded in the format ",(0,s.jsx)(e.code,{children:"USER_ID/FILE_ID.FILE_EXTENSION"}),", such as ",(0,s.jsx)(e.code,{children:"07e5b864-e367-4f52-b647-a48035ae7e5e/d44dc2e1-9ae9-4cf6-9114-8d34a6126c94.pdf"}),"."]}),"\n",(0,s.jsxs)(e.ol,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["To retrieve your current ",(0,s.jsx)(e.code,{children:"user_id"}),", call the ",(0,s.jsx)(e.code,{children:"/whoami"})," endpoint:"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/users/whoami" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:'{"id":"07e5b864-e367-4f52-b647-a48035ae7e5e","username":"langflow","profile_image":null,"store_api_key":null,"is_active":true,"is_superuser":true,"create_at":"2025-05-08T17:59:07.855965","updated_at":"2025-05-28T19:00:42.556460","last_login_at":"2025-05-28T19:00:42.554338","optins":{"github_starred":false,"dialog_dismissed":true,"discord_clicked":false,"mcp_dialog_dismissed":true}}',props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["In the POST request to ",(0,s.jsx)(e.code,{children:"v2/files"}),", replace ",(0,s.jsx)(e.strong,{children:"@FILE_NAME.EXTENSION"})," with the uploaded file name and its extension.\nYou must include the ampersand (",(0,s.jsx)(e.code,{children:"@"}),") in the request to instruct curl to upload the contents of the file, not the string ",(0,s.jsx)(e.code,{children:"FILE_NAME.EXTENSION"}),"."]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v2/files" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"Content-Type: multipart/form-data" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -F ",props:{style:{color:"#79C0FF"}}},{content:'"file=@FILE_NAME.EXTENSION"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e.p,{children:["The file is uploaded in the format ",(0,s.jsx)(e.code,{children:"USER_ID/FILE_ID.FILE_EXTENSION"}),", and the API returns metadata about the uploaded file:"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:'"d44dc2e1-9ae9-4cf6-9114-8d34a6126c94"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "name"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:'"engine_manual"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "path"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:'"07e5b864-e367-4f52-b647-a48035ae7e5e/d44dc2e1-9ae9-4cf6-9114-8d34a6126c94.pdf"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "size"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:"851160",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "provider"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(e.h3,{id:"send-files-to-your-flows-v2",children:"Send files to your flows (v2)"}),"\n",(0,s.jsx)(e.admonition,{type:"important",children:(0,s.jsxs)(e.p,{children:["The ",(0,s.jsx)(e.code,{children:"/v2/files"})," endpoint can't send image files to flows.\nTo send image files to your flows through the API, see ",(0,s.jsx)(e.a,{href:"#upload-image-files-v1",children:"Upload image files (v1)"}),"."]})}),"\n",(0,s.jsxs)(e.p,{children:["This endpoint uploads files to your Langflow server's file management system.\nTo use an uploaded file in a flow, send the file path to a flow with a ",(0,s.jsxs)(e.a,{href:"/components-data#file",children:[(0,s.jsx)(e.strong,{children:"File"})," component"]}),"."]}),"\n",(0,s.jsxs)(e.p,{children:["The default file limit is 100 MB. To configure this value, change the ",(0,s.jsx)(e.code,{children:"LANGFLOW_MAX_FILE_SIZE_UPLOAD"})," ",(0,s.jsx)(e.a,{href:"/environment-variables",children:"environment variable"}),"."]}),"\n",(0,s.jsxs)(e.ol,{children:["\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["To send a file to your flow with the API, POST the file to the ",(0,s.jsx)(e.code,{children:"/api/v2/files"})," endpoint."]}),"\n",(0,s.jsxs)(e.p,{children:["Replace ",(0,s.jsx)(e.strong,{children:"FILE_NAME.EXTENSION"})," with the name and extension of the file you want to upload.\nThis is the same step described in ",(0,s.jsx)(e.a,{href:"#upload-file-v2",children:"Upload file (v2)"}),", but since you need the filename to upload to your flow, it is included here."]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v2/files" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"Content-Type: multipart/form-data" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -F ",props:{style:{color:"#79C0FF"}}},{content:'"file=@FILE_NAME.EXTENSION"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e.p,{children:["The file is uploaded in the format ",(0,s.jsx)(e.code,{children:"USER_ID/FILE_ID.FILE_EXTENSION"}),", and the API returns metadata about the uploaded file:"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:'"d44dc2e1-9ae9-4cf6-9114-8d34a6126c94"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "name"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:'"engine_manual"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "path"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:'"07e5b864-e367-4f52-b647-a48035ae7e5e/d44dc2e1-9ae9-4cf6-9114-8d34a6126c94.pdf"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "size"',props:{style:{color:"#7EE787"}}},{content:":",props:{style:{color:"#C9D1D9"}}},{content:"851160",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "provider"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["To use this file in your flow, add a ",(0,s.jsx)(e.strong,{children:"File"})," component to your flow.\nThis component loads files into flows from your local machine or Langflow file management."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["Run the flow, passing the ",(0,s.jsx)(e.code,{children:"path"})," to the ",(0,s.jsx)(e.code,{children:"File"})," component in the ",(0,s.jsx)(e.code,{children:"tweaks"})," object:"]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl --request POST \\",props:{}}]},{tokens:[{content:' --url "$LANGFLOW_URL/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 do you see?",',props:{}}]},{tokens:[{content:' "output_type": "chat",',props:{}}]},{tokens:[{content:' "input_type": "text",',props:{}}]},{tokens:[{content:' "tweaks": {',props:{}}]},{tokens:[{content:' "File-1olS3": {',props:{}}]},{tokens:[{content:' "path": [',props:{}}]},{tokens:[{content:' "07e5b864-e367-4f52-b647-a48035ae7e5e/3a290013-fe1e-4d3d-a454-cacae81288f3.pdf"',props:{}}]},{tokens:[{content:" ]",props:{}}]},{tokens:[{content:" }",props:{}}]},{tokens:[{content:" }",props:{}}]},{tokens:[{content:"}'",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsxs)(e.p,{children:["To get the ",(0,s.jsx)(e.code,{children:"File"})," component's ID, call the ",(0,s.jsx)(e.a,{href:"/api-flows#read-flow",children:"Read flow"})," endpoint or inspect the component in the visual editor."]}),"\n",(0,s.jsx)(e.p,{children:"If the file path is valid, the flow runs successfully."}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(e.h3,{id:"list-files-v2",children:"List files (v2)"}),"\n",(0,s.jsx)(e.p,{children:"List all files associated with your user account."}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v2/files" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"[",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"c7b22c4c-d5e0-4ec9-af97-5d85b7657a34"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"your_file"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "path"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"6f17a73e-97d7-4519-a8d9-8e4c0be411bb/c7b22c4c-d5e0-4ec9-af97-5d85b7657a34.txt"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "size"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"1234",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "provider"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(e.h3,{id:"download-file-v2",children:"Download file (v2)"}),"\n",(0,s.jsx)(e.p,{children:"Download a specific file by its ID and file extension."}),"\n",(0,s.jsxs)(e.p,{children:["You must specify the file type you expect in the ",(0,s.jsx)(e.code,{children:"--output"})," value."]}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v2/files/c7b22c4c-d5e0-4ec9-af97-5d85b7657a34" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --output ",props:{style:{color:"#79C0FF"}}},{content:"downloaded_file.txt",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"File contents downloaded to downloaded_file.txt",props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n",(0,s.jsx)(e.h3,{id:"edit-file-name-v2",children:"Edit file name (v2)"}),"\n",(0,s.jsx)(e.p,{children:"Change a file name."}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"PUT ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v2/files/",props:{style:{color:"#A5D6FF"}}},{content:"$FILE_ID",props:{style:{color:"#C9D1D9"}}},{content:'?name=new_file_name" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"76543e40-f388-4cb3-b0ee-a1e870aca3d3"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"new_file_name"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "path"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"6f17a73e-97d7-4519-a8d9-8e4c0be411bb/76543e40-f388-4cb3-b0ee-a1e870aca3d3.png"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "size"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"2728251",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "provider"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(e.h3,{id:"delete-file-v2",children:"Delete file (v2)"}),"\n",(0,s.jsx)(e.p,{children:"Delete a specific file by its ID."}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"DELETE ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v2/files/",props:{style:{color:"#A5D6FF"}}},{content:"$FILE_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"File deleted successfully"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(e.h3,{id:"delete-all-files-v2",children:"Delete all files (v2)"}),"\n",(0,s.jsx)(e.p,{children:"Delete all files associated with your user account."}),"\n",(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"DELETE ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v2/files" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(a.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"All files deleted successfully"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(e.h2,{id:"create-upload-file-deprecated",children:"Create upload file (Deprecated)"}),"\n",(0,s.jsxs)(e.p,{children:["This endpoint is deprecated. Use the ",(0,s.jsx)(e.code,{children:"/files"})," endpoints instead."]}),"\n",(0,s.jsx)(e.h2,{id:"see-also",children:"See also"}),"\n",(0,s.jsxs)(e.ul,{children:["\n",(0,s.jsx)(e.li,{children:(0,s.jsx)(e.a,{href:"/concepts-file-management",children:"Manage files"})}),"\n"]})]})}function y(o={}){const{wrapper:e}={...(0,l.R)(),...o.components};return e?(0,s.jsx)(e,{...o,children:(0,s.jsx)(h,{...o})}):h(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/9895db20.ebb58851.js b/assets/js/9895db20.ebb58851.js new file mode 100644 index 0000000000..075801b58a --- /dev/null +++ b/assets/js/9895db20.ebb58851.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[5482],{6892:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/component-mcp-astra-db-efbe2da591a955d0a6fa5259bd659a0e.png"},17886:(e,n,t)=>{t.d(n,{A:()=>s});t(96540);var o=t(64058),a=t(74848);function s({name:e,...n}){const t=o[e];return t?(0,a.jsx)(t,{...n}):null}},89481:(e,n,t)=>{t.r(n),t.d(n,{CH:()=>h,assets:()=>l,chCodeConfig:()=>p,contentTitle:()=>d,default:()=>f,frontMatter:()=>i,metadata:()=>o,toc:()=>g});const o=JSON.parse('{"id":"Integrations/mcp-component-astra","title":"Connect an Astra DB MCP server to Langflow","description":"This guide demonstrates how to use Langflow as an MCP client by using the MCP Tools component to run a DataStax Astra DB MCP server in an agent flow.","source":"@site/docs/Integrations/mcp-component-astra.mdx","sourceDirName":"Integrations","slug":"/mcp-component-astra","permalink":"/mcp-component-astra","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Connect an Astra DB MCP server to Langflow","slug":"/mcp-component-astra"},"sidebar":"docs","previous":{"title":"Use Langflow as an MCP server","permalink":"/mcp-server"},"next":{"title":"API keys and authentication","permalink":"/api-keys-and-authentication"}}');var a=t(74848),s=t(28453),r=t(24754),c=t(17886);const i={title:"Connect an Astra DB MCP server to Langflow",slug:"/mcp-component-astra"},d=void 0,l={},h={annotations:r.hk,Code:r.Cy},p={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},g=[];function u(e){const n={a:"a",admonition:"admonition",code:"code",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",...(0,s.R)(),...e.components};return h||m("CH",!1),h.Code||m("CH.Code",!0),(0,a.jsxs)(a.Fragment,{children:[(0,a.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,a.jsxs)(n.p,{children:["This guide demonstrates how to ",(0,a.jsx)(n.a,{href:"/mcp-client",children:"use Langflow as an MCP client"})," by using the ",(0,a.jsx)(n.strong,{children:"MCP Tools"})," component to run a ",(0,a.jsx)(n.a,{href:"https://github.com/datastax/astra-db-mcp",children:"DataStax Astra DB MCP server"})," in an agent flow."]}),"\n",(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Install an LTS release of ",(0,a.jsx)(n.a,{href:"https://docs.npmjs.com/downloading-and-installing-node-js-and-npm",children:"Node.js"}),"."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Create an ",(0,a.jsx)(n.a,{href:"https://platform.openai.com/",children:"OpenAI"})," API key."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Create an ",(0,a.jsx)(n.a,{href:"https://docs.datastax.com/en/astra-db-serverless/databases/create-database.html#create-vector-database",children:"Astra DB Serverless (Vector) database"}),", if you don't already have one."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Get your database's Astra DB API endpoint and an Astra application token with the ",(0,a.jsx)(n.strong,{children:"Database Administrator"})," role. For more information, see ",(0,a.jsx)(n.a,{href:"https://docs.datastax.com/en/astra-db-serverless/administration/manage-application-tokens.html#database-token",children:"Generate an application token for a database"}),"."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["To follow along with this guide, create a flow based on the ",(0,a.jsx)(n.strong,{children:"Simple Agent"})," template."]}),"\n",(0,a.jsx)(n.p,{children:"You can also use an existing flow or create a blank flow."}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Remove the ",(0,a.jsx)(n.strong,{children:"URL"})," tool, and then replace it with an ",(0,a.jsxs)(n.a,{href:"/mcp-client",children:[(0,a.jsx)(n.strong,{children:"MCP Tools"})," component"]}),"."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Configure the ",(0,a.jsx)(n.strong,{children:"MCP Tools"})," component as follows:"]}),"\n",(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Select ",(0,a.jsx)(n.strong,{children:"Stdio"})," mode."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["In the ",(0,a.jsx)(n.strong,{children:"MCP server"})," field, add the following code to connect to an Astra DB MCP server:"]}),"\n",(0,a.jsx)(h.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"npx ",props:{style:{color:"#FFA657"}}},{content:"-y ",props:{style:{color:"#79C0FF"}}},{content:"@datastax/astra-db-mcp",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["In the ",(0,a.jsx)(n.strong,{children:"Env"})," fields, add variables for ",(0,a.jsx)(n.code,{children:"ASTRA_DB_APPLICATION_TOKEN"})," and ",(0,a.jsx)(n.code,{children:"ASTRA_DB_API_ENDPOINT"})," with the values from your Astra database."]}),"\n",(0,a.jsxs)(n.admonition,{type:"important",children:[(0,a.jsxs)(n.p,{children:["Environment variables declared in your Langflow ",(0,a.jsx)(n.code,{children:".env"})," file can be referenced in your MCP server commands, but you cannot reference global variables declared in Langflow."]}),(0,a.jsxs)(n.p,{children:["If you want to use variables for ",(0,a.jsx)(n.code,{children:"ASTRA_DB_APPLICATION_TOKEN"})," and ",(0,a.jsx)(n.code,{children:"ASTRA_DB_API_ENDPOINT"}),", add them to Langflow's ",(0,a.jsx)(n.code,{children:".env"})," file, and then restart Langflow.\nFor more information, see ",(0,a.jsx)(n.a,{href:"/configuration-global-variables",children:"global variables"}),"."]})]}),"\n",(0,a.jsxs)(n.p,{children:["Add each variable separately.\nTo add another variable field click ",(0,a.jsx)(c.A,{name:"Plus","aria-hidden":"true"})," ",(0,a.jsx)(n.strong,{children:"Add More"}),"."]}),"\n",(0,a.jsx)(h.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"ASTRA_DB_APPLICATION_TOKEN",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"AstraCS:...",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,a.jsx)(h.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"ASTRA_DB_API_ENDPOINT",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"https://...-us-east-2.apps.astra.datastax.com",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["In the ",(0,a.jsx)(n.strong,{children:"Agent"})," component, add your OpenAI API key."]}),"\n",(0,a.jsxs)(n.p,{children:["The default model is an OpenAI model.\nIf you want to use a different model, edit the ",(0,a.jsx)(n.strong,{children:"Model Provider"}),", ",(0,a.jsx)(n.strong,{children:"Model Name"}),", and ",(0,a.jsx)(n.strong,{children:"API Key"})," fields accordingly."]}),"\n",(0,a.jsx)(n.p,{children:(0,a.jsx)(n.img,{alt:"The Simple Agent flow with the URL tool replaced by an MCP Tools component, and the MCP Tools component launching an Astra DB MCP server",src:t(6892).A+"",width:"4000",height:"2450"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Open the ",(0,a.jsx)(n.strong,{children:"Playground"}),", and then ask the agent, ",(0,a.jsx)(n.code,{children:"What collections are available?"})]}),"\n",(0,a.jsx)(n.p,{children:"Since Langflow is connected to your Astra DB database through the MCP server, the agent chooses the correct tool and connects to your database to retrieve the answer.\nFor example:"}),"\n",(0,a.jsx)(h.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"The available collections in your database are:",props:{}}]},{tokens:[{content:"collection_002",props:{}}]},{tokens:[{content:"hardware_requirements",props:{}}]},{tokens:[{content:"load_collection",props:{}}]},{tokens:[{content:"nvidia_collection",props:{}}]},{tokens:[{content:"software_requirements",props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n"]})]})}function f(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.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/9895db20.f26fbe46.js b/assets/js/9895db20.f26fbe46.js deleted file mode 100644 index ac789b1e67..0000000000 --- a/assets/js/9895db20.f26fbe46.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[5482],{6892:(e,n,t)=>{t.d(n,{A:()=>a});const a=t.p+"assets/images/component-mcp-astra-db-efbe2da591a955d0a6fa5259bd659a0e.png"},11470:(e,n,t)=>{t.d(n,{A:()=>y});var a=t(96540),r=t(18215),o=t(23104),s=t(56347),l=t(205),i=t(57485),c=t(31682),d=t(70679);function u(e){return a.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,a.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 h(e){const{values:n,children:t}=e;return(0,a.useMemo)(()=>{const e=n??function(e){return u(e).map(({props:{value:e,label:n,attributes:t,default:a}})=>({value:e,label:n,attributes:t,default:a}))}(t);return function(e){const n=(0,c.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 p({value:e,tabValues:n}){return n.some(n=>n.value===e)}function f({queryString:e=!1,groupId:n}){const t=(0,s.W6)(),r=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,i.aZ)(r),(0,a.useCallback)(e=>{if(!r)return;const n=new URLSearchParams(t.location.search);n.set(r,e),t.replace({...t.location,search:n.toString()})},[r,t])]}function g(e){const{defaultValue:n,queryString:t=!1,groupId:r}=e,o=h(e),[s,i]=(0,a.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(!p({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:o})),[c,u]=f({queryString:t,groupId:r}),[g,m]=function({groupId:e}){const n=function(e){return e?`docusaurus.tab.${e}`:null}(e),[t,r]=(0,d.Dv)(n);return[t,(0,a.useCallback)(e=>{n&&r.set(e)},[n,r])]}({groupId:r}),b=(()=>{const e=c??g;return p({value:e,tabValues:o})?e:null})();(0,l.A)(()=>{b&&i(b)},[b]);return{selectedValue:s,selectValue:(0,a.useCallback)(e=>{if(!p({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);i(e),u(e),m(e)},[u,m,o]),tabValues:o}}var m=t(92303);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var x=t(74848);function v({className:e,block:n,selectedValue:t,selectValue:a,tabValues:s}){const l=[],{blockElementScrollPositionUntilNextRender:i}=(0,o.a_)(),c=e=>{const n=e.currentTarget,r=l.indexOf(n),o=s[r].value;o!==t&&(i(n),a(o))},d=e=>{let n=null;switch(e.key){case"Enter":c(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,x.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":n},e),children:s.map(({value:e,label:n,attributes:a})=>(0,x.jsx)("li",{role:"tab",tabIndex:t===e?0:-1,"aria-selected":t===e,ref:e=>{l.push(e)},onKeyDown:d,onClick:c,...a,className:(0,r.A)("tabs__item",b.tabItem,a?.className,{"tabs__item--active":t===e}),children:n??e},e))})}function j({lazy:e,children:n,selectedValue:t}){const o=(Array.isArray(n)?n:[n]).filter(Boolean);if(e){const e=o.find(e=>e.props.value===t);return e?(0,a.cloneElement)(e,{className:(0,r.A)("margin-top--md",e.props.className)}):null}return(0,x.jsx)("div",{className:"margin-top--md",children:o.map((e,n)=>(0,a.cloneElement)(e,{key:n,hidden:e.props.value!==t}))})}function A(e){const n=g(e);return(0,x.jsxs)("div",{className:(0,r.A)("tabs-container",b.tabList),children:[(0,x.jsx)(v,{...n,...e}),(0,x.jsx)(j,{...n,...e})]})}function y(e){const n=(0,m.A)();return(0,x.jsx)(A,{...e,children:u(e.children)},String(n))}},17886:(e,n,t)=>{t.d(n,{A:()=>o});t(96540);var a=t(64058),r=t(74848);function o({name:e,...n}){const t=a[e];return t?(0,r.jsx)(t,{...n}):null}},19365:(e,n,t)=>{t.d(n,{A:()=>s});t(96540);var a=t(18215);const r={tabItem:"tabItem_Ymn6"};var o=t(74848);function s({children:e,hidden:n,className:t}){return(0,o.jsx)("div",{role:"tabpanel",className:(0,a.A)(r.tabItem,t),hidden:n,children:e})}},89481:(e,n,t)=>{t.r(n),t.d(n,{CH:()=>u,assets:()=>d,chCodeConfig:()=>h,contentTitle:()=>c,default:()=>g,frontMatter:()=>i,metadata:()=>a,toc:()=>p});const a=JSON.parse('{"id":"Integrations/mcp-component-astra","title":"Connect an Astra DB MCP server to Langflow","description":"This guide demonstrates how to use Langflow as an MCP client by using the MCP Tools component to run a DataStax Astra DB MCP server in an agent flow.","source":"@site/docs/Integrations/mcp-component-astra.mdx","sourceDirName":"Integrations","slug":"/mcp-component-astra","permalink":"/mcp-component-astra","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Connect an Astra DB MCP server to Langflow","slug":"/mcp-component-astra"},"sidebar":"docs","previous":{"title":"Use Langflow as an MCP server","permalink":"/mcp-server"},"next":{"title":"API keys and authentication","permalink":"/api-keys-and-authentication"}}');var r=t(74848),o=t(28453),s=t(24754),l=(t(11470),t(19365),t(17886));const i={title:"Connect an Astra DB MCP server to Langflow",slug:"/mcp-component-astra"},c=void 0,d={},u={annotations:s.hk,Code:s.Cy},h={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},p=[];function f(e){const n={a:"a",admonition:"admonition",code:"code",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",...(0,o.R)(),...e.components};return u||m("CH",!1),u.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 guide demonstrates how to ",(0,r.jsx)(n.a,{href:"/mcp-client",children:"use Langflow as an MCP client"})," by using the ",(0,r.jsx)(n.strong,{children:"MCP Tools"})," component to run a ",(0,r.jsx)(n.a,{href:"https://github.com/datastax/astra-db-mcp",children:"DataStax Astra DB MCP server"})," in an agent flow."]}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Install an LTS release of ",(0,r.jsx)(n.a,{href:"https://docs.npmjs.com/downloading-and-installing-node-js-and-npm",children:"Node.js"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Create an ",(0,r.jsx)(n.a,{href:"https://platform.openai.com/",children:"OpenAI"})," API key."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Create an ",(0,r.jsx)(n.a,{href:"https://docs.datastax.com/en/astra-db-serverless/databases/create-database.html#create-vector-database",children:"Astra DB Serverless (Vector) database"}),", if you don't already have one."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Get your database's Astra DB API endpoint and an Astra application token with the ",(0,r.jsx)(n.strong,{children:"Database Administrator"})," role. For more information, see ",(0,r.jsx)(n.a,{href:"https://docs.datastax.com/en/astra-db-serverless/administration/manage-application-tokens.html#database-token",children:"Generate an application token for a database"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["To follow along with this guide, create a flow based on the ",(0,r.jsx)(n.strong,{children:"Simple Agent"})," template."]}),"\n",(0,r.jsx)(n.p,{children:"You can also use an existing flow or create a blank flow."}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Remove the ",(0,r.jsx)(n.strong,{children:"URL"})," tool, and then replace it with an ",(0,r.jsxs)(n.a,{href:"/mcp-client",children:[(0,r.jsx)(n.strong,{children:"MCP Tools"})," component"]}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Configure the ",(0,r.jsx)(n.strong,{children:"MCP Tools"})," component as follows:"]}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Select ",(0,r.jsx)(n.strong,{children:"Stdio"})," mode."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["In the ",(0,r.jsx)(n.strong,{children:"MCP server"})," field, add the following code to connect to an Astra DB MCP server:"]}),"\n",(0,r.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"npx ",props:{style:{color:"#FFA657"}}},{content:"-y ",props:{style:{color:"#79C0FF"}}},{content:"@datastax/astra-db-mcp",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["In the ",(0,r.jsx)(n.strong,{children:"Env"})," fields, add variables for ",(0,r.jsx)(n.code,{children:"ASTRA_DB_APPLICATION_TOKEN"})," and ",(0,r.jsx)(n.code,{children:"ASTRA_DB_API_ENDPOINT"})," with the values from your Astra database."]}),"\n",(0,r.jsxs)(n.admonition,{type:"important",children:[(0,r.jsxs)(n.p,{children:["Environment variables declared in your Langflow ",(0,r.jsx)(n.code,{children:".env"})," file can be referenced in your MCP server commands, but you cannot reference global variables declared in Langflow."]}),(0,r.jsxs)(n.p,{children:["If you want to use variables for ",(0,r.jsx)(n.code,{children:"ASTRA_DB_APPLICATION_TOKEN"})," and ",(0,r.jsx)(n.code,{children:"ASTRA_DB_API_ENDPOINT"}),", add them to Langflow's ",(0,r.jsx)(n.code,{children:".env"})," file, and then restart Langflow.\nFor more information, see ",(0,r.jsx)(n.a,{href:"/configuration-global-variables",children:"global variables"}),"."]})]}),"\n",(0,r.jsxs)(n.p,{children:["Add each variable separately.\nTo add another variable field click ",(0,r.jsx)(l.A,{name:"Plus","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Add More"}),"."]}),"\n",(0,r.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"ASTRA_DB_APPLICATION_TOKEN",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"AstraCS:...",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,r.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"ASTRA_DB_API_ENDPOINT",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"https://...-us-east-2.apps.astra.datastax.com",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["In the ",(0,r.jsx)(n.strong,{children:"Agent"})," component, add your OpenAI API key."]}),"\n",(0,r.jsxs)(n.p,{children:["The default model is an OpenAI model.\nIf you want to use a different model, edit the ",(0,r.jsx)(n.strong,{children:"Model Provider"}),", ",(0,r.jsx)(n.strong,{children:"Model Name"}),", and ",(0,r.jsx)(n.strong,{children:"API Key"})," fields accordingly."]}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"The Simple Agent flow with the URL tool replaced by an MCP Tools component, and the MCP Tools component launching an Astra DB MCP server",src:t(6892).A+"",width:"4000",height:"2450"})}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Open the ",(0,r.jsx)(n.strong,{children:"Playground"}),", and then ask the agent, ",(0,r.jsx)(n.code,{children:"What collections are available?"})]}),"\n",(0,r.jsx)(n.p,{children:"Since Langflow is connected to your Astra DB database through the MCP server, the agent chooses the correct tool and connects to your database to retrieve the answer.\nFor example:"}),"\n",(0,r.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"The available collections in your database are:",props:{}}]},{tokens:[{content:"collection_002",props:{}}]},{tokens:[{content:"hardware_requirements",props:{}}]},{tokens:[{content:"load_collection",props:{}}]},{tokens:[{content:"nvidia_collection",props:{}}]},{tokens:[{content:"software_requirements",props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n"]})]})}function g(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(f,{...e})}):f(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/9f55b2fc.61d4719f.js b/assets/js/9f55b2fc.61d4719f.js deleted file mode 100644 index c317a5988e..0000000000 --- a/assets/js/9f55b2fc.61d4719f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[9033],{15240:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>d,default:()=>m,frontMatter:()=>i,metadata:()=>a,toc:()=>c});const a=JSON.parse('{"id":"Components/bundles-sambanova","title":"SambaNova","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-sambanova.mdx","sourceDirName":"Components","slug":"/bundles-sambanova","permalink":"/bundles-sambanova","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"SambaNova","slug":"/bundles-sambanova"},"sidebar":"docs","previous":{"title":"Redis","permalink":"/bundles-redis"},"next":{"title":"SearchApi","permalink":"/bundles-searchapi"}}');var s=t(74848),r=t(28453),o=t(17886);const i={title:"SambaNova",slug:"/bundles-sambanova"},d=void 0,l={},c=[{value:"SambaNova text generation",id:"sambanova-text-generation",level:2},{value:"SambaNova text generation parameters",id:"sambanova-text-generation-parameters",level:3}];function h(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,s.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,s.jsx)(n.strong,{children:"SambaNova"})," bundle."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information about SambaNova features and functionality used by SambaNova components, see the ",(0,s.jsx)(n.a,{href:"https://cloud.sambanova.ai/",children:"SambaNova Cloud documentation"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"sambanova-text-generation",children:"SambaNova text generation"}),"\n",(0,s.jsx)(n.p,{children:"This component generates text using SambaNova LLMs."}),"\n",(0,s.jsxs)(n.p,{children:["It can output either a ",(0,s.jsx)(n.strong,{children:"Model Response"})," (",(0,s.jsx)(n.a,{href:"/data-types#message",children:(0,s.jsx)(n.code,{children:"Message"})}),") or a ",(0,s.jsx)(n.strong,{children:"Language Model"})," (",(0,s.jsx)(n.a,{href:"/data-types#languagemodel",children:(0,s.jsx)(n.code,{children:"LanguageModel"})}),")."]}),"\n",(0,s.jsxs)(n.p,{children:["Use the ",(0,s.jsx)(n.strong,{children:"Language Model"})," output when you want to use a SambaNova model as the LLM for another LLM-driven component, such as a ",(0,s.jsx)(n.strong,{children:"Language Model"})," or ",(0,s.jsx)(n.strong,{children:"Smart Function"})," component."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information, see ",(0,s.jsxs)(n.a,{href:"/components-models",children:[(0,s.jsx)(n.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"sambanova-text-generation-parameters",children:"SambaNova text generation parameters"}),"\n",(0,s.jsxs)(n.p,{children:["Many ",(0,s.jsx)(n.strong,{children:"SambaNova"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,s.jsx)(o.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Controls"})," in the ",(0,s.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\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:"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:"sambanova_url"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. Base URL path for API requests. Default: ",(0,s.jsx)(n.code,{children:"https://api.sambanova.ai/v1/chat/completions"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"sambanova_api_key"}),(0,s.jsx)(n.td,{children:"SecretString"}),(0,s.jsx)(n.td,{children:"Input parameter. Your SambaNova API Key."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"model_name"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The name of the SambaNova model to use. Options include various Llama models."})]}),(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:"Input parameter. The maximum number of tokens to generate. Set to 0 for unlimited tokens."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"temperature"}),(0,s.jsx)(n.td,{children:"Float"}),(0,s.jsx)(n.td,{children:"Input parameter. Controls randomness in the output. Range: [0.0, 1.0]. Default: 0.07."})]})]})]})]})}function m(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},17886:(e,n,t)=>{t.d(n,{A:()=>r});t(96540);var a=t(64058),s=t(74848);function r({name:e,...n}){const t=a[e];return t?(0,s.jsx)(t,{...n}):null}}}]); \ No newline at end of file diff --git a/assets/js/9f55b2fc.89b869ca.js b/assets/js/9f55b2fc.89b869ca.js new file mode 100644 index 0000000000..a370de8505 --- /dev/null +++ b/assets/js/9f55b2fc.89b869ca.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[9033],{15240:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>d,default:()=>m,frontMatter:()=>i,metadata:()=>a,toc:()=>c});const a=JSON.parse('{"id":"Components/bundles-sambanova","title":"SambaNova","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-sambanova.mdx","sourceDirName":"Components","slug":"/bundles-sambanova","permalink":"/bundles-sambanova","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"SambaNova","slug":"/bundles-sambanova"},"sidebar":"docs","previous":{"title":"Redis","permalink":"/bundles-redis"},"next":{"title":"SearchApi","permalink":"/bundles-searchapi"}}');var s=t(74848),r=t(28453),o=(t(17886),t(31929));const i={title:"SambaNova",slug:"/bundles-sambanova"},d=void 0,l={},c=[{value:"SambaNova text generation",id:"sambanova-text-generation",level:2},{value:"SambaNova text generation parameters",id:"sambanova-text-generation-parameters",level:3},...o.RM];function h(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,s.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,s.jsx)(n.strong,{children:"SambaNova"})," bundle."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information about SambaNova features and functionality used by SambaNova components, see the ",(0,s.jsx)(n.a,{href:"https://cloud.sambanova.ai/",children:"SambaNova Cloud documentation"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"sambanova-text-generation",children:"SambaNova text generation"}),"\n",(0,s.jsx)(n.p,{children:"This component generates text using SambaNova LLMs."}),"\n",(0,s.jsxs)(n.p,{children:["It can output either a ",(0,s.jsx)(n.strong,{children:"Model Response"})," (",(0,s.jsx)(n.a,{href:"/data-types#message",children:(0,s.jsx)(n.code,{children:"Message"})}),") or a ",(0,s.jsx)(n.strong,{children:"Language Model"})," (",(0,s.jsx)(n.a,{href:"/data-types#languagemodel",children:(0,s.jsx)(n.code,{children:"LanguageModel"})}),")."]}),"\n",(0,s.jsxs)(n.p,{children:["Use the ",(0,s.jsx)(n.strong,{children:"Language Model"})," output when you want to use a SambaNova model as the LLM for another LLM-driven component, such as an ",(0,s.jsx)(n.strong,{children:"Agent"})," or ",(0,s.jsx)(n.strong,{children:"Smart Function"})," component."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information, see ",(0,s.jsxs)(n.a,{href:"/components-models",children:[(0,s.jsx)(n.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"sambanova-text-generation-parameters",children:"SambaNova text generation parameters"}),"\n",(0,s.jsx)(o.Ay,{}),"\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:"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:"sambanova_url"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. Base URL path for API requests. Default: ",(0,s.jsx)(n.code,{children:"https://api.sambanova.ai/v1/chat/completions"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"sambanova_api_key"}),(0,s.jsx)(n.td,{children:"SecretString"}),(0,s.jsx)(n.td,{children:"Input parameter. Your SambaNova API Key."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"model_name"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The name of the SambaNova model to use. Options include various Llama models."})]}),(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:"Input parameter. The maximum number of tokens to generate. Set to 0 for unlimited tokens."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"temperature"}),(0,s.jsx)(n.td,{children:"Float"}),(0,s.jsx)(n.td,{children:"Input parameter. Controls randomness in the output. Range: [0.0, 1.0]. Default: 0.07."})]})]})]})]})}function m(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},17886:(e,n,t)=>{t.d(n,{A:()=>r});t(96540);var a=t(64058),s=t(74848);function r({name:e,...n}){const t=a[e];return t?(0,s.jsx)(t,{...n}):null}},31929:(e,n,t)=>{t.d(n,{Ay:()=>d,RM:()=>o});var a=t(74848),s=t(28453),r=t(17886);const o=[];function i(e){const n={a:"a",p:"p",strong:"strong",...(0,s.R)(),...e.components};return(0,a.jsxs)(n.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,a.jsx)(r.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,a.jsx)(n.strong,{children:"Controls"})," in the ",(0,a.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function d(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(i,{...e})}):i(e)}}}]); \ No newline at end of file diff --git a/assets/js/a6d50436.88abe60b.js b/assets/js/a6d50436.88abe60b.js new file mode 100644 index 0000000000..d3a0c1d131 --- /dev/null +++ b/assets/js/a6d50436.88abe60b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[5412],{17886:(e,n,t)=>{t.d(n,{A:()=>r});t(96540);var d=t(64058),s=t(74848);function r({name:e,...n}){const t=d[e];return t?(0,s.jsx)(t,{...n}):null}},31929:(e,n,t)=>{t.d(n,{Ay:()=>l,RM:()=>i});var d=t(74848),s=t(28453),r=t(17886);const i=[];function o(e){const n={a:"a",p:"p",strong:"strong",...(0,s.R)(),...e.components};return(0,d.jsxs)(n.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,d.jsx)(r.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,d.jsx)(n.strong,{children:"Controls"})," in the ",(0,d.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function l(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,d.jsx)(n,{...e,children:(0,d.jsx)(o,{...e})}):o(e)}},51993:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>c,default:()=>p,frontMatter:()=>l,metadata:()=>d,toc:()=>h});const d=JSON.parse('{"id":"Components/components-embedding-models","title":"Embedding Model","description":"Embedding Model components in Langflow generate text embeddings using a specified Large Language Model (LLM).","source":"@site/docs/Components/components-embedding-models.mdx","sourceDirName":"Components","slug":"/components-embedding-models","permalink":"/components-embedding-models","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Embedding Model","slug":"/components-embedding-models"},"sidebar":"docs","previous":{"title":"Language Model","permalink":"/components-models"},"next":{"title":"Data","permalink":"/components-data"}}');var s=t(74848),r=t(28453),i=t(17886),o=t(31929);const l={title:"Embedding Model",slug:"/components-embedding-models"},c=void 0,a={},h=[{value:"Use Embedding Model components in a flow",id:"use-embedding-model-components-in-a-flow",level:2},{value:"Embedding Model parameters",id:"embedding-model-parameters",level:2},...o.RM,{value:"Additional embedding models",id:"additional-embedding-model-components",level:2},{value:"Legacy embedding components",id:"legacy-embedding-components",level:2}];function m(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",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:d}=n;return d||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:[(0,s.jsx)(n.strong,{children:"Embedding Model"})," components in Langflow generate text embeddings using a specified Large Language Model (LLM)."]}),"\n",(0,s.jsxs)(n.p,{children:["Langflow includes an ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," core component that has built-in support for some LLMs.\nAlternatively, you can use ",(0,s.jsx)(n.a,{href:"#additional-embedding-model-components",children:"additional embedding models"})," in place of the core ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," component."]}),"\n",(0,s.jsx)(n.h2,{id:"use-embedding-model-components-in-a-flow",children:"Use Embedding Model components in a flow"}),"\n",(0,s.jsxs)(n.p,{children:["Use ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," components anywhere you need to generate embeddings in a flow."]}),"\n",(0,s.jsxs)(n.p,{children:["This example shows how to use an ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," component in a flow to create a semantic search system.\nThis flow loads a text file, splits the text into chunks, generates embeddings for each chunk, and then loads the chunks and embeddings into a vector store. The ",(0,s.jsx)(n.strong,{children:"Input and Output"})," components allow a user to query the vector store through a chat interface."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"A semantic search flow that uses Embedding Model, File, Split Text, Chroma DB, Chat Input, and Chat Output components",src:t(54016).A+"",width:"4000",height:"2514"})}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Create a flow, add a ",(0,s.jsx)(n.strong,{children:"File"})," component, and then select a file containing text data, such as a PDF, that you can use to test the flow."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Add an ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," component, and then provide a valid OpenAI API key.\nYou can enter the API key directly or use a ",(0,s.jsx)(i.A,{name:"Globe","aria-hidden":"true"})," ",(0,s.jsx)(n.a,{href:"/configuration-global-variables",children:"global variable"}),"."]}),"\n",(0,s.jsxs)(n.admonition,{type:"tip",children:[(0,s.jsxs)(n.p,{children:["If your preferred embedding model provider or model isn't supported by the ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," core component, you can use ",(0,s.jsx)(n.a,{href:"#additional-embedding-model-components",children:"additional embedding models"})," in place of the core component."]}),(0,s.jsxs)(n.p,{children:["Search the ",(0,s.jsx)(n.strong,{children:"Components"})," menu for your preferred provider to find additional embedding models, such as the ",(0,s.jsxs)(n.a,{href:"/bundles-huggingface#hugging-face-embeddings-inference",children:[(0,s.jsx)(n.strong,{children:"Hugging Face Embeddings Inference"})," component"]}),"."]})]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Add a ",(0,s.jsxs)(n.a,{href:"/components-processing#split-text",children:[(0,s.jsx)(n.strong,{children:"Split Text"})," component"]})," to your flow.\nThis component splits text input into smaller chunks to be processed into embeddings."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Add a ",(0,s.jsxs)(n.a,{href:"/components-vector-stores",children:[(0,s.jsx)(n.strong,{children:"Vector Store"})," component"]}),", such as the ",(0,s.jsx)(n.strong,{children:"Chroma DB"})," component, to your flow, and then configure the component to connect to your vector store database.\nThis component stores the generated embeddings so they can be used for similarity search."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Connect the components:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Connect the ",(0,s.jsx)(n.strong,{children:"File"})," component's ",(0,s.jsx)(n.strong,{children:"Loaded Files"})," output to the ",(0,s.jsx)(n.strong,{children:"Split Text"})," component's ",(0,s.jsx)(n.strong,{children:"Data or DataFrame"})," input."]}),"\n",(0,s.jsxs)(n.li,{children:["Connect the ",(0,s.jsx)(n.strong,{children:"Split Text"})," component's ",(0,s.jsx)(n.strong,{children:"Chunks"})," output to the ",(0,s.jsx)(n.strong,{children:"Vector Store"})," component's ",(0,s.jsx)(n.strong,{children:"Ingest Data"})," input."]}),"\n",(0,s.jsxs)(n.li,{children:["Connect the ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," component's ",(0,s.jsx)(n.strong,{children:"Embeddings"})," output to the ",(0,s.jsx)(n.strong,{children:"Vector Store"})," component's ",(0,s.jsx)(n.strong,{children:"Embedding"})," input."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["To query the vector store, add ",(0,s.jsxs)(n.a,{href:"/components-io#chat-io",children:[(0,s.jsx)(n.strong,{children:"Chat Input and Output"})," components"]}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Connect the ",(0,s.jsx)(n.strong,{children:"Chat Input"})," component to the ",(0,s.jsx)(n.strong,{children:"Vector Store"})," component's ",(0,s.jsx)(n.strong,{children:"Search Query"})," input."]}),"\n",(0,s.jsxs)(n.li,{children:["Connect the ",(0,s.jsx)(n.strong,{children:"Vector Store"})," component's ",(0,s.jsx)(n.strong,{children:"Search Results"})," output to the ",(0,s.jsx)(n.strong,{children:"Chat Output"})," component."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Click ",(0,s.jsx)(n.strong,{children:"Playground"}),", and then enter a search query to retrieve text chunks that are most semantically similar to your query."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"embedding-model-parameters",children:"Embedding Model parameters"}),"\n",(0,s.jsxs)(n.p,{children:["The following parameters are for the ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," core component.\nOther embedding model components can have additional or different parameters."]}),"\n","\n",(0,s.jsx)(o.Ay,{}),"\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:"Name"}),(0,s.jsx)(n.th,{children:"Display 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:"provider"}),(0,s.jsx)(n.td,{children:"Model Provider"}),(0,s.jsx)(n.td,{children:"List"}),(0,s.jsx)(n.td,{children:"Input parameter. Select the embedding model provider."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"model"}),(0,s.jsx)(n.td,{children:"Model Name"}),(0,s.jsx)(n.td,{children:"List"}),(0,s.jsx)(n.td,{children:"Input parameter. Select the embedding model to use."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"api_key"}),(0,s.jsx)(n.td,{children:"OpenAI API Key"}),(0,s.jsx)(n.td,{children:"Secret[String]"}),(0,s.jsx)(n.td,{children:"Input parameter. The API key required for authenticating with the provider."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"api_base"}),(0,s.jsx)(n.td,{children:"API Base URL"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. Base URL for the API. Leave empty for default."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"dimensions"}),(0,s.jsx)(n.td,{children:"Dimensions"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsx)(n.td,{children:"Input parameter. The number of dimensions for the output embeddings."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"chunk_size"}),(0,s.jsx)(n.td,{children:"Chunk Size"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsxs)(n.td,{children:["Input parameter. The size of text chunks to process. Default: ",(0,s.jsx)(n.code,{children:"1000"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"request_timeout"}),(0,s.jsx)(n.td,{children:"Request Timeout"}),(0,s.jsx)(n.td,{children:"Float"}),(0,s.jsx)(n.td,{children:"Input parameter. Timeout for API requests."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"max_retries"}),(0,s.jsx)(n.td,{children:"Max Retries"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsxs)(n.td,{children:["Input parameter. Maximum number of retry attempts. Default: ",(0,s.jsx)(n.code,{children:"3"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"show_progress_bar"}),(0,s.jsx)(n.td,{children:"Show Progress Bar"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"Input parameter. Whether to display a progress bar during embedding generation."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"model_kwargs"}),(0,s.jsx)(n.td,{children:"Model Kwargs"}),(0,s.jsx)(n.td,{children:"Dictionary"}),(0,s.jsx)(n.td,{children:"Input parameter. Additional keyword arguments to pass to the model."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"embeddings"}),(0,s.jsx)(n.td,{children:"Embeddings"}),(0,s.jsx)(n.td,{children:"Embeddings"}),(0,s.jsx)(n.td,{children:"Output parameter. An instance for generating embeddings using the selected provider."})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"additional-embedding-model-components",children:"Additional embedding models"}),"\n",(0,s.jsxs)(n.p,{children:["If your provider or model isn't supported by the ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," core component, additional provider-specific ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," components are available in the ",(0,s.jsx)(n.a,{href:"/components-bundle-components",children:(0,s.jsx)(n.strong,{children:"Bundles"})})," section of the ",(0,s.jsx)(n.strong,{children:"Components"})," menu."]}),"\n",(0,s.jsx)(n.h2,{id:"legacy-embedding-components",children:"Legacy embedding components"}),"\n",(0,s.jsx)(n.p,{children:"The following components are legacy components.\nYou can still use them in your flows, but they are no longer maintained and they can be removed in future releases."}),"\n",(0,s.jsxs)(d,{children:[(0,s.jsx)("summary",{children:"Embedding Similarity"}),(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Embedding Similarity"})," component is replaced by built-in similarity search functionality in ",(0,s.jsxs)(n.a,{href:"/components-vector-stores",children:[(0,s.jsx)(n.strong,{children:"Vector Store"})," components"]}),"."]}),(0,s.jsx)(n.p,{children:"This component calculates similarity scores for two embedding vectors."}),(0,s.jsx)(n.p,{children:"It accepts the following parameters:"}),(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:"Display Name"}),(0,s.jsx)(n.th,{children:"Info"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"embedding_vectors"}),(0,s.jsx)(n.td,{children:"Embedding Vectors"}),(0,s.jsx)(n.td,{children:"Input parameter. A list containing exactly two data objects with embedding vectors to compare."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"similarity_metric"}),(0,s.jsx)(n.td,{children:"Similarity Metric"}),(0,s.jsx)(n.td,{children:'Input parameter. Select the similarity metric to use. Options: "Cosine Similarity", "Euclidean Distance", "Manhattan Distance".'})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"similarity_data"}),(0,s.jsx)(n.td,{children:"Similarity Data"}),(0,s.jsx)(n.td,{children:"Output parameter. A data object containing the computed similarity score and additional information."})]})]})]})]}),"\n",(0,s.jsxs)(d,{children:[(0,s.jsx)("summary",{children:"Text Embedder"}),(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Text Embedder"})," component is replaced by the ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," component."]}),(0,s.jsx)(n.p,{children:"This component generates embeddings for a given message using a specified embedding model."}),(0,s.jsx)(n.p,{children:"It accepts the following parameters:"}),(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:"Display Name"}),(0,s.jsx)(n.th,{children:"Info"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"embedding_model"}),(0,s.jsx)(n.td,{children:"Embedding Model"}),(0,s.jsx)(n.td,{children:"Input parameter. The embedding model to use for generating embeddings."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"message"}),(0,s.jsx)(n.td,{children:"Message"}),(0,s.jsx)(n.td,{children:"Input parameter. The message for which to generate embeddings."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"embeddings"}),(0,s.jsx)(n.td,{children:"Embedding Data"}),(0,s.jsx)(n.td,{children:"Output parameter. A data object containing the original text and its embedding vector."})]})]})]})]})]})}function p(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(m,{...e})}):m(e)}},54016:(e,n,t)=>{t.d(n,{A:()=>d});const d=t.p+"assets/images/component-embedding-models-add-chat-fec505c7d61c7bddc37eeb1d4cb9d489.png"}}]); \ No newline at end of file diff --git a/assets/js/a6d50436.bc61f482.js b/assets/js/a6d50436.bc61f482.js deleted file mode 100644 index 699de6db58..0000000000 --- a/assets/js/a6d50436.bc61f482.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[5412],{17886:(e,n,t)=>{t.d(n,{A:()=>i});t(96540);var d=t(64058),s=t(74848);function i({name:e,...n}){const t=d[e];return t?(0,s.jsx)(t,{...n}):null}},51993:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>m,frontMatter:()=>o,metadata:()=>d,toc:()=>a});const d=JSON.parse('{"id":"Components/components-embedding-models","title":"Embedding Model","description":"Embedding Model components in Langflow generate text embeddings using a specified Large Language Model (LLM).","source":"@site/docs/Components/components-embedding-models.mdx","sourceDirName":"Components","slug":"/components-embedding-models","permalink":"/components-embedding-models","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Embedding Model","slug":"/components-embedding-models"},"sidebar":"docs","previous":{"title":"Language Model","permalink":"/components-models"},"next":{"title":"Data","permalink":"/components-data"}}');var s=t(74848),i=t(28453),r=t(17886);const o={title:"Embedding Model",slug:"/components-embedding-models"},l=void 0,c={},a=[{value:"Use Embedding Model components in a flow",id:"use-embedding-model-components-in-a-flow",level:2},{value:"Embedding Model",id:"embedding-model",level:2},{value:"Additional embedding models",id:"additional-embedding-model-components",level:2},{value:"Legacy embedding components",id:"legacy-embedding-components",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",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:d}=n;return d||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:[(0,s.jsx)(n.strong,{children:"Embedding Model"})," components in Langflow generate text embeddings using a specified Large Language Model (LLM)."]}),"\n",(0,s.jsxs)(n.p,{children:["Langflow includes an ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," core component that has built-in support for some LLMs.\nAlternatively, you can use ",(0,s.jsx)(n.a,{href:"#additional-embedding-model-components",children:"additional embedding models"})," in place of the core ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," component."]}),"\n",(0,s.jsx)(n.h2,{id:"use-embedding-model-components-in-a-flow",children:"Use Embedding Model components in a flow"}),"\n",(0,s.jsxs)(n.p,{children:["Use ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," components anywhere you need to generate embeddings in a flow."]}),"\n",(0,s.jsxs)(n.p,{children:["This example shows how to use an ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," component in a flow to create a semantic search system.\nThis flow loads a text file, splits the text into chunks, generates embeddings for each chunk, and then loads the chunks and embeddings into a vector store. The ",(0,s.jsx)(n.strong,{children:"Input and Output"})," components allow a user to query the vector store through a chat interface."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"A semantic search flow that uses Embedding Model, File, Split Text, Chroma DB, Chat Input, and Chat Output components",src:t(54016).A+"",width:"4000",height:"2514"})}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Create a flow, add a ",(0,s.jsx)(n.strong,{children:"File"})," component, and then select a file containing text data, such as a PDF, that you can use to test the flow."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Add an ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," component, and then provide a valid OpenAI API key.\nYou can enter component API keys directly or use Langflow global variables to reference your API keys."]}),"\n",(0,s.jsxs)(n.admonition,{type:"tip",children:[(0,s.jsxs)(n.p,{children:["If your preferred embedding model provider or model isn't supported by the ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," core component, you can use ",(0,s.jsx)(n.a,{href:"#additional-embedding-model-components",children:"additional embedding models"})," in place of the core component."]}),(0,s.jsxs)(n.p,{children:["Search the ",(0,s.jsx)(n.strong,{children:"Components"})," menu for your preferred provider to find additional embedding models, such as the ",(0,s.jsxs)(n.a,{href:"/bundles-huggingface#hugging-face-embeddings-inference",children:[(0,s.jsx)(n.strong,{children:"Hugging Face Embeddings Inference"})," component"]}),"."]})]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Add a ",(0,s.jsxs)(n.a,{href:"/components-processing#split-text",children:[(0,s.jsx)(n.strong,{children:"Split Text"})," component"]})," to your flow.\nThis component splits text input into smaller chunks to be processed into embeddings."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Add a ",(0,s.jsxs)(n.a,{href:"/components-vector-stores",children:[(0,s.jsx)(n.strong,{children:"Vector Store"})," component"]}),", such as the ",(0,s.jsx)(n.strong,{children:"Chroma DB"})," component, to your flow, and then configure the component to connect to your vector store database.\nThis component stores the generated embeddings so they can be used for similarity search."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Connect the components:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Connect the ",(0,s.jsx)(n.strong,{children:"File"})," component's ",(0,s.jsx)(n.strong,{children:"Loaded Files"})," output to the ",(0,s.jsx)(n.strong,{children:"Split Text"})," component's ",(0,s.jsx)(n.strong,{children:"Data or DataFrame"})," input."]}),"\n",(0,s.jsxs)(n.li,{children:["Connect the ",(0,s.jsx)(n.strong,{children:"Split Text"})," component's ",(0,s.jsx)(n.strong,{children:"Chunks"})," output to the ",(0,s.jsx)(n.strong,{children:"Vector Store"})," component's ",(0,s.jsx)(n.strong,{children:"Ingest Data"})," input."]}),"\n",(0,s.jsxs)(n.li,{children:["Connect the ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," component's ",(0,s.jsx)(n.strong,{children:"Embeddings"})," output to the ",(0,s.jsx)(n.strong,{children:"Vector Store"})," component's ",(0,s.jsx)(n.strong,{children:"Embedding"})," input."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["To query the vector store, add ",(0,s.jsxs)(n.a,{href:"/components-io#chat-io",children:[(0,s.jsx)(n.strong,{children:"Chat Input and Output"})," components"]}),":"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Connect the ",(0,s.jsx)(n.strong,{children:"Chat Input"})," component to the ",(0,s.jsx)(n.strong,{children:"Vector Store"})," component's ",(0,s.jsx)(n.strong,{children:"Search Query"})," input."]}),"\n",(0,s.jsxs)(n.li,{children:["Connect the ",(0,s.jsx)(n.strong,{children:"Vector Store"})," component's ",(0,s.jsx)(n.strong,{children:"Search Results"})," output to the ",(0,s.jsx)(n.strong,{children:"Chat Output"})," component."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Click ",(0,s.jsx)(n.strong,{children:"Playground"}),", and then enter a search query to retrieve text chunks that are most semantically similar to your query."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"embedding-model",children:"Embedding Model"}),"\n",(0,s.jsxs)(n.p,{children:["Some ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,s.jsx)(r.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Controls"})," in the ",(0,s.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\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:"Name"}),(0,s.jsx)(n.th,{children:"Display 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:"provider"}),(0,s.jsx)(n.td,{children:"Model Provider"}),(0,s.jsx)(n.td,{children:"List"}),(0,s.jsx)(n.td,{children:"Input parameter. Select the embedding model provider."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"model"}),(0,s.jsx)(n.td,{children:"Model Name"}),(0,s.jsx)(n.td,{children:"List"}),(0,s.jsx)(n.td,{children:"Input parameter. Select the embedding model to use."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"api_key"}),(0,s.jsx)(n.td,{children:"OpenAI API Key"}),(0,s.jsx)(n.td,{children:"Secret[String]"}),(0,s.jsx)(n.td,{children:"Input parameter. The API key required for authenticating with the provider."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"api_base"}),(0,s.jsx)(n.td,{children:"API Base URL"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. Base URL for the API. Leave empty for default."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"dimensions"}),(0,s.jsx)(n.td,{children:"Dimensions"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsx)(n.td,{children:"Input parameter. The number of dimensions for the output embeddings."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"chunk_size"}),(0,s.jsx)(n.td,{children:"Chunk Size"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsxs)(n.td,{children:["Input parameter. The size of text chunks to process. Default: ",(0,s.jsx)(n.code,{children:"1000"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"request_timeout"}),(0,s.jsx)(n.td,{children:"Request Timeout"}),(0,s.jsx)(n.td,{children:"Float"}),(0,s.jsx)(n.td,{children:"Input parameter. Timeout for API requests."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"max_retries"}),(0,s.jsx)(n.td,{children:"Max Retries"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsxs)(n.td,{children:["Input parameter. Maximum number of retry attempts. Default: ",(0,s.jsx)(n.code,{children:"3"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"show_progress_bar"}),(0,s.jsx)(n.td,{children:"Show Progress Bar"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"Input parameter. Whether to display a progress bar during embedding generation."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"model_kwargs"}),(0,s.jsx)(n.td,{children:"Model Kwargs"}),(0,s.jsx)(n.td,{children:"Dictionary"}),(0,s.jsx)(n.td,{children:"Input parameter. Additional keyword arguments to pass to the model."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"embeddings"}),(0,s.jsx)(n.td,{children:"Embeddings"}),(0,s.jsx)(n.td,{children:"Embeddings"}),(0,s.jsx)(n.td,{children:"Output parameter. An instance for generating embeddings using the selected provider."})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"additional-embedding-model-components",children:"Additional embedding models"}),"\n",(0,s.jsxs)(n.p,{children:["If your provider or model isn't supported by the ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," core component, additional provider-specific ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," components are available in the ",(0,s.jsx)(n.a,{href:"/components-bundle-components",children:(0,s.jsx)(n.strong,{children:"Bundles"})})," section of the ",(0,s.jsx)(n.strong,{children:"Components"})," menu."]}),"\n",(0,s.jsx)(n.h2,{id:"legacy-embedding-components",children:"Legacy embedding components"}),"\n",(0,s.jsx)(n.p,{children:"The following components are legacy components.\nYou can still use them in your flows, but they are no longer maintained and they can be removed in future releases."}),"\n",(0,s.jsxs)(d,{children:[(0,s.jsx)("summary",{children:"Embedding Similarity"}),(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Embedding Similarity"})," component is replaced by built-in similarity search functionality in ",(0,s.jsxs)(n.a,{href:"/components-vector-stores",children:[(0,s.jsx)(n.strong,{children:"Vector Store"})," components"]}),"."]}),(0,s.jsx)(n.p,{children:"This component calculates similarity scores for two embedding vectors."}),(0,s.jsx)(n.p,{children:"It accepts the following parameters:"}),(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:"Display Name"}),(0,s.jsx)(n.th,{children:"Info"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"embedding_vectors"}),(0,s.jsx)(n.td,{children:"Embedding Vectors"}),(0,s.jsx)(n.td,{children:"Input parameter. A list containing exactly two data objects with embedding vectors to compare."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"similarity_metric"}),(0,s.jsx)(n.td,{children:"Similarity Metric"}),(0,s.jsx)(n.td,{children:'Input parameter. Select the similarity metric to use. Options: "Cosine Similarity", "Euclidean Distance", "Manhattan Distance".'})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"similarity_data"}),(0,s.jsx)(n.td,{children:"Similarity Data"}),(0,s.jsx)(n.td,{children:"Output parameter. A data object containing the computed similarity score and additional information."})]})]})]})]}),"\n",(0,s.jsxs)(d,{children:[(0,s.jsx)("summary",{children:"Text Embedder"}),(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Text Embedder"})," component is replaced by the ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," component."]}),(0,s.jsx)(n.p,{children:"This component generates embeddings for a given message using a specified embedding model."}),(0,s.jsx)(n.p,{children:"It accepts the following parameters:"}),(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:"Display Name"}),(0,s.jsx)(n.th,{children:"Info"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"embedding_model"}),(0,s.jsx)(n.td,{children:"Embedding Model"}),(0,s.jsx)(n.td,{children:"Input parameter. The embedding model to use for generating embeddings."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"message"}),(0,s.jsx)(n.td,{children:"Message"}),(0,s.jsx)(n.td,{children:"Input parameter. The message for which to generate embeddings."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"embeddings"}),(0,s.jsx)(n.td,{children:"Embedding Data"}),(0,s.jsx)(n.td,{children:"Output parameter. A data object containing the original text and its embedding vector."})]})]})]})]})]})}function m(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},54016:(e,n,t)=>{t.d(n,{A:()=>d});const d=t.p+"assets/images/component-embedding-models-add-chat-fec505c7d61c7bddc37eeb1d4cb9d489.png"}}]); \ No newline at end of file diff --git a/assets/js/a84e1c02.27434cb1.js b/assets/js/a84e1c02.27434cb1.js new file mode 100644 index 0000000000..07bb6c31bf --- /dev/null +++ b/assets/js/a84e1c02.27434cb1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[8483],{226:(o,t,e)=>{e.r(t),e.d(t,{CH:()=>h,assets:()=>d,chCodeConfig:()=>u,contentTitle:()=>i,default:()=>F,frontMatter:()=>a,metadata:()=>n,toc:()=>y});const n=JSON.parse('{"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.","source":"@site/docs/Develop/Clients/typescript-client.mdx","sourceDirName":"Develop/Clients","slug":"/typescript-client","permalink":"/typescript-client","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Langflow TypeScript client","slug":"/typescript-client"},"sidebar":"docs","previous":{"title":"Get started with the Langflow API","permalink":"/api-reference-api-examples"},"next":{"title":"Flow trigger endpoints","permalink":"/api-flows-run"}}');var s=e(74848),r=e(28453),c=e(24754),l=e(11470),p=e(19365);const a={title:"Langflow TypeScript client",slug:"/typescript-client"},i=void 0,d={},h={annotations:c.hk,Code:c.Cy},u={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},y=[{value:"Install the Langflow TypeScript package",id:"install-the-langflow-typescript-package",level:2},{value:"Initialize the Langflow TypeScript client",id:"initialize-the-langflow-typescript-client",level:2},{value:"Connect to your server and get responses",id:"connect-to-your-server-and-get-responses",level:2},{value:"Use advanced TypeScript client features",id:"use-advanced-typescript-client-features",level:2},{value:"Retrieve Langflow logs with the TypeScript client",id:"retrieve-langflow-logs-with-the-typescript-client",level:2}];function f(o){const t={a:"a",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...o.components},{Details:e}=t;return h||g("CH",!1),h.Code||g("CH.Code",!0),e||g("Details",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n","\n",(0,s.jsx)(t.p,{children:"The Langflow TypeScript client allows your TypeScript applications to programmatically interact with the Langflow API."}),"\n",(0,s.jsxs)(t.p,{children:["For the client code repository, see ",(0,s.jsx)(t.a,{href:"https://github.com/datastax/langflow-client-ts/",children:"langflow-client-ts"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["For the npm package, see ",(0,s.jsx)(t.a,{href:"https://www.npmjs.com/package/@datastax/langflow-client",children:"@datastax/langflow-client"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"install-the-langflow-typescript-package",children:"Install the Langflow TypeScript package"}),"\n",(0,s.jsx)(t.p,{children:"To install the Langflow typescript client package, use one of the following commands:"}),"\n",(0,s.jsxs)(l.A,{children:[(0,s.jsx)(p.A,{value:"npm",label:"npm",default:!0,children:(0,s.jsx)(h.Code,{codeConfig:u,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"npm ",props:{style:{color:"#FFA657"}}},{content:"install @datastax/langflow-client",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]})}),(0,s.jsx)(p.A,{value:"yarn",label:"yarn",children:(0,s.jsx)(h.Code,{codeConfig:u,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"yarn ",props:{style:{color:"#FFA657"}}},{content:"add @datastax/langflow-client",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]})}),(0,s.jsx)(p.A,{value:"pnpm",label:"pnpm",children:(0,s.jsx)(h.Code,{codeConfig:u,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"pnpm ",props:{style:{color:"#FFA657"}}},{content:"add @datastax/langflow-client",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]})})]}),"\n",(0,s.jsx)(t.h2,{id:"initialize-the-langflow-typescript-client",children:"Initialize the Langflow TypeScript client"}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"Import the client into your code."}),"\n",(0,s.jsx)(h.Code,{codeConfig:u,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"}}}]}],lang:"tsx"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Initialize a ",(0,s.jsx)(t.code,{children:"LangflowClient"})," object to interact with your server:"]}),"\n",(0,s.jsx)(h.Code,{codeConfig:u,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"const ",props:{style:{color:"#FF7B72"}}},{content:"baseUrl ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"BASE_URL"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"const ",props:{style:{color:"#FF7B72"}}},{content:"apiKey ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"API_KEY"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{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:"({ baseUrl, apiKey });",props:{style:{color:"#C9D1D9"}}}]}],lang:"tsx"},annotations:[]}]}),"\n",(0,s.jsxs)(t.p,{children:["Replace ",(0,s.jsx)(t.code,{children:"BASE_URL"})," and ",(0,s.jsx)(t.code,{children:"API_KEY"})," with values from your deployment.\nThe default Langflow base URL is ",(0,s.jsx)(t.code,{children:"http://localhost:7860"}),".\nTo create an API key, see ",(0,s.jsx)(t.a,{href:"/api-keys-and-authentication",children:"API keys and authentication"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"connect-to-your-server-and-get-responses",children:"Connect to your server and get responses"}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"With your Langflow client initialized, test the connection by calling your Langflow server."}),"\n",(0,s.jsxs)(t.p,{children:["The following example runs a flow (",(0,s.jsx)(t.code,{children:"runFlow"}),") by sending the flow ID and a chat input string:"]}),"\n",(0,s.jsx)(h.Code,{codeConfig:u,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:"baseUrl ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"http://localhost:7860"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{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:"({ baseUrl });",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"async function ",props:{style:{color:"#FF7B72"}}},{content:"runFlow",props:{style:{color:"#D2A8FF"}}},{content:"() {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" const ",props:{style:{color:"#FF7B72"}}},{content:"flowId ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"aa5a238b-02c0-4f03-bc5c-cc3a83335cdf"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{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:"(flowId);",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" const ",props:{style:{color:"#FF7B72"}}},{content:"input ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"Is anyone there?"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{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:"(input);",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(response);",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"runFlow",props:{style:{color:"#D2A8FF"}}},{content:"().",props:{style:{color:"#C9D1D9"}}},{content:"catch",props:{style:{color:"#D2A8FF"}}},{content:"(console.error);",props:{style:{color:"#C9D1D9"}}}]}],lang:"tsx"},annotations:[]}]}),"\n",(0,s.jsx)(t.p,{children:"Replace the following:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"baseUrl"}),": The URL of your Langflow server."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"flowId"}),": The ID of the flow you want to run."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"input"}),": The chat input message you want to send to trigger the flow.\nThis is only valid for flows with a ",(0,s.jsx)(t.strong,{children:"Chat Input"})," component."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"Review the result to confirm that the client connected to your Langflow server."}),"\n",(0,s.jsxs)(t.p,{children:["The following example shows the response from a well-formed ",(0,s.jsx)(t.code,{children:"runFlow"})," request that reached the Langflow server and successfully started the flow:"]}),"\n",(0,s.jsx)(h.Code,{codeConfig:u,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"FlowResponse {",props:{}}]},{tokens:[{content:" sessionId: 'aa5a238b-02c0-4f03-bc5c-cc3a83335cdf',",props:{}}]},{tokens:[{content:" outputs: [ { inputs: [Object], outputs: [Array] } ]",props:{}}]},{tokens:[{content:"}",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsxs)(t.p,{children:["In this case, the response includes a ",(0,s.jsx)(t.a,{href:"/session-id",children:(0,s.jsx)(t.code,{children:"sessionID"})})," that is a unique identifier for the client-server session and an ",(0,s.jsx)(t.code,{children:"outputs"})," array that contains information about the flow run."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Optional: If you want to get full response objects from the server, change ",(0,s.jsx)(t.code,{children:"console.log"})," to stringify the returned JSON object:"]}),"\n",(0,s.jsx)(h.Code,{codeConfig:u,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"JSON",props:{style:{color:"#79C0FF"}}},{content:".",props:{style:{color:"#C9D1D9"}}},{content:"stringify",props:{style:{color:"#D2A8FF"}}},{content:"(response, ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"2",props:{style:{color:"#79C0FF"}}},{content:"));",props:{style:{color:"#C9D1D9"}}}]}],lang:"tsx"},annotations:[]}]}),"\n",(0,s.jsxs)(t.p,{children:["The exact structure of the returned ",(0,s.jsx)(t.code,{children:"inputs"})," and ",(0,s.jsx)(t.code,{children:"outputs"})," objects depends on the components and configuration of your flow."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Optional: If you want the response to include only the chat message from the ",(0,s.jsx)(t.strong,{children:"Chat Output"})," component, change ",(0,s.jsx)(t.code,{children:"console.log"})," to use the ",(0,s.jsx)(t.code,{children:"chatOutputText"})," convenience function:"]}),"\n",(0,s.jsx)(h.Code,{codeConfig:u,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(response.",props:{style:{color:"#C9D1D9"}}},{content:"chatOutputText",props:{style:{color:"#D2A8FF"}}},{content:"());",props:{style:{color:"#C9D1D9"}}}]}],lang:"tsx"},annotations:[]}]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"use-advanced-typescript-client-features",children:"Use advanced TypeScript client features"}),"\n",(0,s.jsx)(t.p,{children:"The TypeScript client can do more than just connect to your server and run a flow."}),"\n",(0,s.jsx)(t.p,{children:"This example builds on the quickstart with additional features for interacting with Langflow:"}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Pass ",(0,s.jsx)(t.a,{href:"/concepts-publish#input-schema",children:"tweaks"})," as an object with the request.\nTweaks are programmatic run-time overrides for component settings."]}),"\n",(0,s.jsx)(t.p,{children:"This example changes the LLM used by a language model component in a flow::"}),"\n",(0,s.jsx)(h.Code,{codeConfig:u,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"const ",props:{style:{color:"#FF7B72"}}},{content:"tweaks ",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" { model_name: ",props:{style:{color:"#C9D1D9"}}},{content:'"gpt-4o-mini"',props:{style:{color:"#A5D6FF"}}},{content:" };",props:{style:{color:"#C9D1D9"}}}]}],lang:"tsx"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Pass a ",(0,s.jsx)(t.a,{href:"/session-id",children:"session ID"})," with the request to separate the conversation from other flow runs, and to be able to continue this conversation by calling the same session ID in the future:"]}),"\n",(0,s.jsx)(h.Code,{codeConfig:u,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"const ",props:{style:{color:"#FF7B72"}}},{content:"session_id ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"aa5a238b-02c0-4f03-bc5c-cc3a83335cdf"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]}],lang:"tsx"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Instead of calling ",(0,s.jsx)(t.code,{children:"run"})," on the Flow object, call ",(0,s.jsx)(t.code,{children:"stream"})," with the same arguments to get a streaming response:"]}),"\n",(0,s.jsx)(h.Code,{codeConfig:u,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"const ",props:{style:{color:"#FF7B72"}}},{content:"response ",props:{style:{color:"#79C0FF"}}},{content:"= await",props:{style:{color:"#FF7B72"}}},{content:" client.",props:{style:{color:"#C9D1D9"}}},{content:"flow",props:{style:{color:"#D2A8FF"}}},{content:"(flowId).",props:{style:{color:"#C9D1D9"}}},{content:"stream",props:{style:{color:"#D2A8FF"}}},{content:"(input);",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"for await",props:{style:{color:"#FF7B72"}}},{content:" (",props:{style:{color:"#C9D1D9"}}},{content:"const ",props:{style:{color:"#FF7B72"}}},{content:"event ",props:{style:{color:"#79C0FF"}}},{content:"of",props:{style:{color:"#FF7B72"}}},{content:" response) {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(event);",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"tsx"},annotations:[]}]}),"\n",(0,s.jsxs)(t.p,{children:["The response is a ",(0,s.jsx)(t.a,{href:"https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream",children:(0,s.jsx)(t.code,{children:"ReadableStream"})})," of objects.\nFor more information on streaming Langflow responses, see the ",(0,s.jsxs)(t.a,{href:"/api-flows-run#run-flow",children:[(0,s.jsx)(t.code,{children:"/run"})," endpoint"]}),"."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Run the modified TypeScript application to run the flow with ",(0,s.jsx)(t.code,{children:"tweaks"}),", ",(0,s.jsx)(t.code,{children:"session_id"}),", and streaming:"]}),"\n",(0,s.jsx)(h.Code,{codeConfig:u,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:"baseUrl ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"http://localhost:7860"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{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:"({ baseUrl });",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"async function ",props:{style:{color:"#FF7B72"}}},{content:"runFlow",props:{style:{color:"#D2A8FF"}}},{content:"() {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" const ",props:{style:{color:"#FF7B72"}}},{content:"flowId ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"aa5a238b-02c0-4f03-bc5c-cc3a83335cdf"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" const ",props:{style:{color:"#FF7B72"}}},{content:"input ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"Is anyone there?"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" const ",props:{style:{color:"#FF7B72"}}},{content:"tweaks ",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" { model_name: ",props:{style:{color:"#C9D1D9"}}},{content:'"gpt-4o-mini"',props:{style:{color:"#A5D6FF"}}},{content:" };",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" const ",props:{style:{color:"#FF7B72"}}},{content:"session_id ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"test-session"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{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:" client.",props:{style:{color:"#C9D1D9"}}},{content:"flow",props:{style:{color:"#D2A8FF"}}},{content:"(flowId).",props:{style:{color:"#C9D1D9"}}},{content:"stream",props:{style:{color:"#D2A8FF"}}},{content:"(input, {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" session_id,",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" tweaks,",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" });",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" for await",props:{style:{color:"#FF7B72"}}},{content:" (",props:{style:{color:"#C9D1D9"}}},{content:"const ",props:{style:{color:"#FF7B72"}}},{content:"event ",props:{style:{color:"#79C0FF"}}},{content:"of",props:{style:{color:"#FF7B72"}}},{content:" response) {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(event);",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"runFlow",props:{style:{color:"#D2A8FF"}}},{content:"().",props:{style:{color:"#C9D1D9"}}},{content:"catch",props:{style:{color:"#D2A8FF"}}},{content:"(console.error);",props:{style:{color:"#C9D1D9"}}}]}],lang:"tsx"},annotations:[]}]}),"\n",(0,s.jsx)(t.p,{children:"Replace the following:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"baseUrl"}),": The URL of your Langflow server."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"flowId"}),": The ID of the flow you want to run."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"input"}),": The chat input message you want to send to trigger the flow, assuming the flow has a ",(0,s.jsx)(t.strong,{children:"Chat Input"})," component."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"tweaks"}),": Any tweak modifiers to apply to the flow run.\nThis example changes the LLM used by a component in the flow."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"session_id"}),": Pass a custom session ID.\nIf omitted or empty, the flow ID is the default session ID."]}),"\n"]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(t.p,{children:"With streaming enabled, the response includes the flow metatadata and timestamped events for flow activity.\nFor example:"}),(0,s.jsx)(h.Code,{codeConfig:u,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{}}]},{tokens:[{content:" event: 'add_message',",props:{}}]},{tokens:[{content:" data: {",props:{}}]},{tokens:[{content:" timestamp: '2025-05-23 15:52:48 UTC',",props:{}}]},{tokens:[{content:" sender: 'User',",props:{}}]},{tokens:[{content:" sender_name: 'User',",props:{}}]},{tokens:[{content:" session_id: 'test-session',",props:{}}]},{tokens:[{content:" text: 'Is anyone there?',",props:{}}]},{tokens:[{content:" files: [],",props:{}}]},{tokens:[{content:" error: false,",props:{}}]},{tokens:[{content:" edit: false,",props:{}}]},{tokens:[{content:" properties: {",props:{}}]},{tokens:[{content:" text_color: '',",props:{}}]},{tokens:[{content:" background_color: '',",props:{}}]},{tokens:[{content:" edited: false,",props:{}}]},{tokens:[{content:" source: [Object],",props:{}}]},{tokens:[{content:" icon: '',",props:{}}]},{tokens:[{content:" allow_markdown: false,",props:{}}]},{tokens:[{content:" positive_feedback: null,",props:{}}]},{tokens:[{content:" state: 'complete',",props:{}}]},{tokens:[{content:" targets: []",props:{}}]},{tokens:[{content:" },",props:{}}]},{tokens:[{content:" category: 'message',",props:{}}]},{tokens:[{content:" content_blocks: [],",props:{}}]},{tokens:[{content:" id: '7f096715-3f2d-4d84-88d6-5e2f76bf3fbe',",props:{}}]},{tokens:[{content:" flow_id: 'aa5a238b-02c0-4f03-bc5c-cc3a83335cdf',",props:{}}]},{tokens:[{content:" duration: null",props:{}}]},{tokens:[{content:" }",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"{",props:{}}]},{tokens:[{content:" event: 'token',",props:{}}]},{tokens:[{content:" data: {",props:{}}]},{tokens:[{content:" chunk: 'Absolutely',",props:{}}]},{tokens:[{content:" id: 'c5a99314-6b23-488b-84e2-038aa3e87fb5',",props:{}}]},{tokens:[{content:" timestamp: '2025-05-23 15:52:48 UTC'",props:{}}]},{tokens:[{content:" }",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"{",props:{}}]},{tokens:[{content:" event: 'token',",props:{}}]},{tokens:[{content:" data: {",props:{}}]},{tokens:[{content:" chunk: ',',",props:{}}]},{tokens:[{content:" id: 'c5a99314-6b23-488b-84e2-038aa3e87fb5',",props:{}}]},{tokens:[{content:" timestamp: '2025-05-23 15:52:48 UTC'",props:{}}]},{tokens:[{content:" }",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"{",props:{}}]},{tokens:[{content:" event: 'token',",props:{}}]},{tokens:[{content:" data: {",props:{}}]},{tokens:[{content:' chunk: " I\'m",',props:{}}]},{tokens:[{content:" id: 'c5a99314-6b23-488b-84e2-038aa3e87fb5',",props:{}}]},{tokens:[{content:" timestamp: '2025-05-23 15:52:48 UTC'",props:{}}]},{tokens:[{content:" }",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"{",props:{}}]},{tokens:[{content:" event: 'token',",props:{}}]},{tokens:[{content:" data: {",props:{}}]},{tokens:[{content:" chunk: ' here',",props:{}}]},{tokens:[{content:" id: 'c5a99314-6b23-488b-84e2-038aa3e87fb5',",props:{}}]},{tokens:[{content:" timestamp: '2025-05-23 15:52:48 UTC'",props:{}}]},{tokens:[{content:" }",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"// this response is abbreviated",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"{",props:{}}]},{tokens:[{content:" event: 'end',",props:{}}]},{tokens:[{content:" data: { result: { session_id: 'test-session', outputs: [Array] } }",props:{}}]},{tokens:[{content:"}",props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"retrieve-langflow-logs-with-the-typescript-client",children:"Retrieve Langflow logs with the TypeScript client"}),"\n",(0,s.jsxs)(t.p,{children:["To retrieve ",(0,s.jsx)(t.a,{href:"/logging",children:"Langflow logs"}),", you must enable log retrieval on your Langflow server by including the following values in your Langflow ",(0,s.jsx)(t.code,{children:".env"})," file:"]}),"\n",(0,s.jsx)(h.Code,{codeConfig:u,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"LANGFLOW_ENABLE_LOG_RETRIEVAL=True",props:{}}]},{tokens:[{content:"LANGFLOW_LOG_RETRIEVER_BUFFER_SIZE=10000",props:{}}]},{tokens:[{content:"LANGFLOW_LOG_LEVEL=DEBUG",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsx)(t.p,{children:"The following example script starts streaming logs in the background, and then runs a flow so you can monitor the flow run:"}),"\n",(0,s.jsx)(h.Code,{codeConfig:u,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:"baseUrl ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"http://localhost:7863"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"const ",props:{style:{color:"#FF7B72"}}},{content:"flowId ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"86f0bf45-0544-4e88-b0b1-8e622da7a7f0"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"async function ",props:{style:{color:"#FF7B72"}}},{content:"runFlow",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"client",props:{style:{color:"#FFA657"}}},{content:": ",props:{style:{color:"#FF7B72"}}},{content:"LangflowClient",props:{style:{color:"#FFA657"}}},{content:") {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" const ",props:{style:{color:"#FF7B72"}}},{content:"input ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"Is anyone there?"',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:" client.",props:{style:{color:"#C9D1D9"}}},{content:"flow",props:{style:{color:"#D2A8FF"}}},{content:"(flowId).",props:{style:{color:"#C9D1D9"}}},{content:"run",props:{style:{color:"#D2A8FF"}}},{content:"(input);",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'Flow response:'",props:{style:{color:"#A5D6FF"}}},{content:", response);",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"async function ",props:{style:{color:"#FF7B72"}}},{content:"main",props:{style:{color:"#D2A8FF"}}},{content:"() {",props:{style:{color:"#C9D1D9"}}}]},{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:"({ baseUrl: baseUrl });",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" // Start streaming logs",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'Starting log stream...'",props:{style:{color:"#A5D6FF"}}},{content:");",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" for await",props:{style:{color:"#FF7B72"}}},{content:" (",props:{style:{color:"#C9D1D9"}}},{content:"const ",props:{style:{color:"#FF7B72"}}},{content:"log ",props:{style:{color:"#79C0FF"}}},{content:"of await",props:{style:{color:"#FF7B72"}}},{content:" client.logs.",props:{style:{color:"#C9D1D9"}}},{content:"stream",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:"'Log:'",props:{style:{color:"#A5D6FF"}}},{content:", log);",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" // Run the flow",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" await ",props:{style:{color:"#FF7B72"}}},{content:"runFlow",props:{style:{color:"#D2A8FF"}}},{content:"(client);",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"main",props:{style:{color:"#D2A8FF"}}},{content:"().",props:{style:{color:"#C9D1D9"}}},{content:"catch",props:{style:{color:"#D2A8FF"}}},{content:"(console.error);",props:{style:{color:"#C9D1D9"}}}]}],lang:"tsx"},annotations:[]}]}),"\n",(0,s.jsx)(t.p,{children:"Replace the following:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"baseUrl"}),": The URL of your Langflow server."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"flowId"}),": The ID of the flow you want to run."]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"input"}),": The chat input message you want to send to trigger the flow, assuming the flow has a ",(0,s.jsx)(t.strong,{children:"Chat Input"})," component."]}),"\n"]}),"\n",(0,s.jsx)(t.p,{children:"Logs begin streaming indefinitely, and the flow runs once."}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(t.p,{children:"The following example result is truncated for readability, but you can follow the messages to see how the flow instantiates its components, configures its model, and processes the outputs."}),(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"FlowResponse"})," object, at the end of the stream, is returned to the client with the flow result in the ",(0,s.jsx)(t.code,{children:"outputs"})," array."]}),(0,s.jsx)(h.Code,{codeConfig:u,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Starting log stream...",props:{}}]},{tokens:[{content:"Log: Log {",props:{}}]},{tokens:[{content:" timestamp: 2025-05-30T11:49:16.006Z,",props:{}}]},{tokens:[{content:" message: '2025-05-30T07:49:16.006127-0400 DEBUG Instantiating ChatInput of type component\\n'",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Log: Log {",props:{}}]},{tokens:[{content:" timestamp: 2025-05-30T11:49:16.029Z,",props:{}}]},{tokens:[{content:" message: '2025-05-30T07:49:16.029957-0400 DEBUG Instantiating Prompt of type component\\n'",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Log: Log {",props:{}}]},{tokens:[{content:" timestamp: 2025-05-30T11:49:16.049Z,",props:{}}]},{tokens:[{content:" message: '2025-05-30T07:49:16.049520-0400 DEBUG Instantiating ChatOutput of type component\\n'",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Log: Log {",props:{}}]},{tokens:[{content:" timestamp: 2025-05-30T11:49:16.069Z,",props:{}}]},{tokens:[{content:" message: '2025-05-30T07:49:16.069359-0400 DEBUG Instantiating OpenAIModel of type component\\n'",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Log: Log {",props:{}}]},{tokens:[{content:" timestamp: 2025-05-30T11:49:16.086Z,",props:{}}]},{tokens:[{content:" message: \"2025-05-30T07:49:16.086426-0400 DEBUG Running layer 0 with 2 tasks, ['ChatInput-xjucM', 'Prompt-I3pxU']\\n\"",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Log: Log {",props:{}}]},{tokens:[{content:" timestamp: 2025-05-30T11:49:16.101Z,",props:{}}]},{tokens:[{content:" message: '2025-05-30T07:49:16.101766-0400 DEBUG Building Chat Input\\n'",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Log: Log {",props:{}}]},{tokens:[{content:" timestamp: 2025-05-30T11:49:16.113Z,",props:{}}]},{tokens:[{content:" message: '2025-05-30T07:49:16.113343-0400 DEBUG Building Prompt\\n'",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Log: Log {",props:{}}]},{tokens:[{content:" timestamp: 2025-05-30T11:49:16.131Z,",props:{}}]},{tokens:[{content:" message: '2025-05-30T07:49:16.131423-0400 DEBUG Logged vertex build: 6bd9fe9c-5eea-4f05-a96d-f6de9dc77e3c\\n'",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Log: Log {",props:{}}]},{tokens:[{content:" timestamp: 2025-05-30T11:49:16.143Z,",props:{}}]},{tokens:[{content:" message: '2025-05-30T07:49:16.143295-0400 DEBUG Logged vertex build: 39c68ec9-3859-4fff-9b14-80b3271f8fbf\\n'",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Log: Log {",props:{}}]},{tokens:[{content:" timestamp: 2025-05-30T11:49:16.188Z,",props:{}}]},{tokens:[{content:" message: \"2025-05-30T07:49:16.188730-0400 DEBUG Running layer 1 with 1 tasks, ['OpenAIModel-RtlZm']\\n\"",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Log: Log {",props:{}}]},{tokens:[{content:" timestamp: 2025-05-30T11:49:16.201Z,",props:{}}]},{tokens:[{content:" message: '2025-05-30T07:49:16.201946-0400 DEBUG Building OpenAI\\n'",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Log: Log {",props:{}}]},{tokens:[{content:" timestamp: 2025-05-30T11:49:16.216Z,",props:{}}]},{tokens:[{content:" message: '2025-05-30T07:49:16.216622-0400 INFO Model name: gpt-4.1-mini\\n'",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Flow response: FlowResponse {",props:{}}]},{tokens:[{content:" sessionId: '86f0bf45-0544-4e88-b0b1-8e622da7a7f0',",props:{}}]},{tokens:[{content:" outputs: [ { inputs: [Object], outputs: [Array] } ]",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Log: Log {",props:{}}]},{tokens:[{content:" timestamp: 2025-05-30T11:49:18.094Z,",props:{}}]},{tokens:[{content:" message: `2025-05-30T07:49:18.094364-0400 DEBUG Vertex OpenAIModel-RtlZm, result: , object: {'text_output': \"Hey there! I'm here and ready to help you build something awesome with AI. What are you thinking about creating today?\"}\\n`",props:{}}]},{tokens:[{content:"}",props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n",(0,s.jsxs)(t.p,{children:["For more information, see ",(0,s.jsx)(t.a,{href:"/api-logs",children:"Logs endpoints"}),"."]})]})}function F(o={}){const{wrapper:t}={...(0,r.R)(),...o.components};return t?(0,s.jsx)(t,{...o,children:(0,s.jsx)(f,{...o})}):f(o)}function g(o,t){throw new Error("Expected "+(t?"component":"object")+" `"+o+"` to be defined: you likely forgot to import, pass, or provide it.")}},11470:(o,t,e)=>{e.d(t,{A:()=>w});var n=e(96540),s=e(18215),r=e(23104),c=e(56347),l=e(205),p=e(57485),a=e(31682),i=e(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:t}=o;return!!t&&"object"==typeof t&&"value"in t}(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:t,children:e}=o;return(0,n.useMemo)(()=>{const o=t??function(o){return d(o).map(({props:{value:o,label:t,attributes:e,default:n}})=>({value:o,label:t,attributes:e,default:n}))}(e);return function(o){const t=(0,a.XI)(o,(o,t)=>o.value===t.value);if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map(o=>o.value).join(", ")}" found in . Every value needs to be unique.`)}(o),o},[t,e])}function u({value:o,tabValues:t}){return t.some(t=>t.value===o)}function y({queryString:o=!1,groupId:t}){const e=(0,c.W6)(),s=function({queryString:o=!1,groupId:t}){if("string"==typeof o)return o;if(!1===o)return null;if(!0===o&&!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:o,groupId:t});return[(0,p.aZ)(s),(0,n.useCallback)(o=>{if(!s)return;const t=new URLSearchParams(e.location.search);t.set(s,o),e.replace({...e.location,search:t.toString()})},[s,e])]}function f(o){const{defaultValue:t,queryString:e=!1,groupId:s}=o,r=h(o),[c,p]=(0,n.useState)(()=>function({defaultValue:o,tabValues:t}){if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(o){if(!u({value:o,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${o}" but none of its children has the corresponding value. Available values are: ${t.map(o=>o.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return o}const e=t.find(o=>o.default)??t[0];if(!e)throw new Error("Unexpected error: 0 tabValues");return e.value}({defaultValue:t,tabValues:r})),[a,d]=y({queryString:e,groupId:s}),[f,F]=function({groupId:o}){const t=function(o){return o?`docusaurus.tab.${o}`:null}(o),[e,s]=(0,i.Dv)(t);return[e,(0,n.useCallback)(o=>{t&&s.set(o)},[t,s])]}({groupId:s}),g=(()=>{const o=a??f;return u({value:o,tabValues:r})?o:null})();(0,l.A)(()=>{g&&p(g)},[g]);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=e(92303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var D=e(74848);function k({className:o,block:t,selectedValue:e,selectValue:n,tabValues:c}){const l=[],{blockElementScrollPositionUntilNextRender:p}=(0,r.a_)(),a=o=>{const t=o.currentTarget,s=l.indexOf(t),r=c[s].value;r!==e&&(p(t),n(r))},i=o=>{let t=null;switch(o.key){case"Enter":a(o);break;case"ArrowRight":{const e=l.indexOf(o.currentTarget)+1;t=l[e]??l[0];break}case"ArrowLeft":{const e=l.indexOf(o.currentTarget)-1;t=l[e]??l[l.length-1];break}}t?.focus()};return(0,D.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":t},o),children:c.map(({value:o,label:t,attributes:n})=>(0,D.jsx)("li",{role:"tab",tabIndex:e===o?0:-1,"aria-selected":e===o,ref:o=>{l.push(o)},onKeyDown:i,onClick:a,...n,className:(0,s.A)("tabs__item",g.tabItem,n?.className,{"tabs__item--active":e===o}),children:t??o},o))})}function m({lazy:o,children:t,selectedValue:e}){const r=(Array.isArray(t)?t:[t]).filter(Boolean);if(o){const o=r.find(o=>o.props.value===e);return o?(0,n.cloneElement)(o,{className:(0,s.A)("margin-top--md",o.props.className)}):null}return(0,D.jsx)("div",{className:"margin-top--md",children:r.map((o,t)=>(0,n.cloneElement)(o,{key:t,hidden:o.props.value!==e}))})}function C(o){const t=f(o);return(0,D.jsxs)("div",{className:(0,s.A)("tabs-container",g.tabList),children:[(0,D.jsx)(k,{...t,...o}),(0,D.jsx)(m,{...t,...o})]})}function w(o){const t=(0,F.A)();return(0,D.jsx)(C,{...o,children:d(o.children)},String(t))}},19365:(o,t,e)=>{e.d(t,{A:()=>c});e(96540);var n=e(18215);const s={tabItem:"tabItem_Ymn6"};var r=e(74848);function c({children:o,hidden:t,className:e}){return(0,r.jsx)("div",{role:"tabpanel",className:(0,n.A)(s.tabItem,e),hidden:t,children:o})}},28453:(o,t,e)=>{e.d(t,{R:()=>c,x:()=>l});var n=e(96540);const s={},r=n.createContext(s);function c(o){const t=n.useContext(r);return n.useMemo(function(){return"function"==typeof o?o(t):{...t,...o}},[t,o])}function l(o){let t;return t=o.disableParentContext?"function"==typeof o.components?o.components(s):o.components||s:c(o.components),n.createElement(r.Provider,{value:t},o.children)}}}]); \ No newline at end of file diff --git a/assets/js/a84e1c02.3534b6c7.js b/assets/js/a84e1c02.3534b6c7.js deleted file mode 100644 index b1b8b5bcf9..0000000000 --- a/assets/js/a84e1c02.3534b6c7.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[8483],{226:(o,t,e)=>{e.r(t),e.d(t,{CH:()=>u,assets:()=>d,chCodeConfig:()=>h,contentTitle:()=>i,default:()=>F,frontMatter:()=>a,metadata:()=>n,toc:()=>y});const n=JSON.parse('{"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.","source":"@site/docs/Develop/Clients/typescript-client.mdx","sourceDirName":"Develop/Clients","slug":"/typescript-client","permalink":"/typescript-client","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Langflow TypeScript client","slug":"/typescript-client"},"sidebar":"docs","previous":{"title":"Get started with the Langflow API","permalink":"/api-reference-api-examples"},"next":{"title":"Flow trigger endpoints","permalink":"/api-flows-run"}}');var s=e(74848),r=e(28453),c=e(24754),l=e(11470),p=e(19365);const a={title:"Langflow TypeScript client",slug:"/typescript-client"},i=void 0,d={},u={annotations:c.hk,Code:c.Cy},h={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},y=[{value:"Install the Langflow TypeScript package",id:"install-the-langflow-typescript-package",level:2},{value:"Initialize the Langflow TypeScript client",id:"initialize-the-langflow-typescript-client",level:2},{value:"Langflow TypeScript client quickstart",id:"langflow-typescript-client-quickstart",level:2},{value:"Use advanced TypeScript client features",id:"use-advanced-typescript-client-features",level:2},{value:"Retrieve Langflow logs with the TypeScript client",id:"retrieve-langflow-logs-with-the-typescript-client",level:2}];function f(o){const t={a:"a",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...o.components},{Details:e}=t;return u||g("CH",!1),u.Code||g("CH.Code",!0),e||g("Details",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n","\n",(0,s.jsx)(t.p,{children:"The Langflow TypeScript client allows your TypeScript applications to programmatically interact with the Langflow API."}),"\n",(0,s.jsxs)(t.p,{children:["For the client code repository, see ",(0,s.jsx)(t.a,{href:"https://github.com/datastax/langflow-client-ts/",children:"langflow-client-ts"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["For the npm package, see ",(0,s.jsx)(t.a,{href:"https://www.npmjs.com/package/@datastax/langflow-client",children:"@datastax/langflow-client"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"install-the-langflow-typescript-package",children:"Install the Langflow TypeScript package"}),"\n",(0,s.jsx)(t.p,{children:"To install the Langflow typescript client package, use one of the following commands:"}),"\n",(0,s.jsxs)(l.A,{children:[(0,s.jsx)(p.A,{value:"npm",label:"npm",default:!0,children:(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"npm ",props:{style:{color:"#FFA657"}}},{content:"install @datastax/langflow-client",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]})}),(0,s.jsx)(p.A,{value:"yarn",label:"yarn",children:(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"yarn ",props:{style:{color:"#FFA657"}}},{content:"add @datastax/langflow-client",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]})}),(0,s.jsx)(p.A,{value:"pnpm",label:"pnpm",children:(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"pnpm ",props:{style:{color:"#FFA657"}}},{content:"add @datastax/langflow-client",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]})})]}),"\n",(0,s.jsx)(t.h2,{id:"initialize-the-langflow-typescript-client",children:"Initialize the Langflow TypeScript client"}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"Import the client into your code."}),"\n",(0,s.jsx)(u.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"}}}]}],lang:"tsx"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Initialize a ",(0,s.jsx)(t.code,{children:"LangflowClient"})," object to interact with your server:"]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"const ",props:{style:{color:"#FF7B72"}}},{content:"baseUrl ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"BASE_URL"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"const ",props:{style:{color:"#FF7B72"}}},{content:"apiKey ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"API_KEY"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{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:"({ baseUrl, apiKey });",props:{style:{color:"#C9D1D9"}}}]}],lang:"tsx"},annotations:[]}]}),"\n",(0,s.jsxs)(t.p,{children:["Replace ",(0,s.jsx)(t.code,{children:"BASE_URL"})," and ",(0,s.jsx)(t.code,{children:"API_KEY"})," with values from your deployment.\nThe default Langflow base URL is ",(0,s.jsx)(t.code,{children:"http://localhost:7860"}),".\nTo create an API key, see ",(0,s.jsx)(t.a,{href:"/api-keys-and-authentication",children:"API keys and authentication"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"langflow-typescript-client-quickstart",children:"Langflow TypeScript client quickstart"}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"With your Langflow client initialized, test the connection by calling your Langflow server."}),"\n",(0,s.jsxs)(t.p,{children:["The following example runs a flow (",(0,s.jsx)(t.code,{children:"runFlow"}),") by sending the flow ID and a chat input string:"]}),"\n",(0,s.jsx)(u.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:"baseUrl ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"http://localhost:7860"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{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:"({ baseUrl });",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"async function ",props:{style:{color:"#FF7B72"}}},{content:"runFlow",props:{style:{color:"#D2A8FF"}}},{content:"() {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" const ",props:{style:{color:"#FF7B72"}}},{content:"flowId ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"aa5a238b-02c0-4f03-bc5c-cc3a83335cdf"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{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:"(flowId);",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" const ",props:{style:{color:"#FF7B72"}}},{content:"input ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"Is anyone there?"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{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:"(input);",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(response);",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"runFlow",props:{style:{color:"#D2A8FF"}}},{content:"().",props:{style:{color:"#C9D1D9"}}},{content:"catch",props:{style:{color:"#D2A8FF"}}},{content:"(console.error);",props:{style:{color:"#C9D1D9"}}}]}],lang:"tsx"},annotations:[]}]}),"\n",(0,s.jsx)(t.p,{children:"Replace the following:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"baseUrl"}),": The URL of your Langflow server"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"flowId"}),": The ID of the flow you want to run"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.code,{children:"input"}),": The chat input message you want to send to trigger the flow"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"Review the result to confirm that the client connected to your Langflow server."}),"\n",(0,s.jsxs)(t.p,{children:["The following example shows the response from a well-formed ",(0,s.jsx)(t.code,{children:"runFlow"})," request that reached the Langflow server and successfully started the flow:"]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"FlowResponse {",props:{}}]},{tokens:[{content:" sessionId: 'aa5a238b-02c0-4f03-bc5c-cc3a83335cdf',",props:{}}]},{tokens:[{content:" outputs: [ { inputs: [Object], outputs: [Array] } ]",props:{}}]},{tokens:[{content:"}",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsxs)(t.p,{children:["In this case, the response includes a ",(0,s.jsx)(t.a,{href:"/session-id",children:(0,s.jsx)(t.code,{children:"sessionID"})})," that is a unique identifier for the client-server session and an ",(0,s.jsx)(t.code,{children:"outputs"})," array that contains information about the flow run."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["If you want to get full response objects from the server, change ",(0,s.jsx)(t.code,{children:"console.log"})," to stringify the returned JSON object:"]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"JSON",props:{style:{color:"#79C0FF"}}},{content:".",props:{style:{color:"#C9D1D9"}}},{content:"stringify",props:{style:{color:"#D2A8FF"}}},{content:"(response, ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"2",props:{style:{color:"#79C0FF"}}},{content:"));",props:{style:{color:"#C9D1D9"}}}]}],lang:"tsx"},annotations:[]}]}),"\n",(0,s.jsxs)(t.p,{children:["The exact structure of the returned ",(0,s.jsx)(t.code,{children:"inputs"})," and ",(0,s.jsx)(t.code,{children:"outputs"})," objects depends on the components and configuration of your flow."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["If you want the response to include only the chat message from the ",(0,s.jsx)(t.strong,{children:"Chat Output"})," component, change ",(0,s.jsx)(t.code,{children:"console.log"})," to use the ",(0,s.jsx)(t.code,{children:"chatOutputText"})," convenience function:"]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(response.",props:{style:{color:"#C9D1D9"}}},{content:"chatOutputText",props:{style:{color:"#D2A8FF"}}},{content:"());",props:{style:{color:"#C9D1D9"}}}]}],lang:"tsx"},annotations:[]}]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"use-advanced-typescript-client-features",children:"Use advanced TypeScript client features"}),"\n",(0,s.jsx)(t.p,{children:"The TypeScript client can do more than just connect to your server and run a flow."}),"\n",(0,s.jsx)(t.p,{children:"This example builds on the quickstart with additional features for interacting with Langflow."}),"\n",(0,s.jsxs)(t.ol,{children:["\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsx)(t.p,{children:"Pass tweaks to your code as an object with the request."}),"\n",(0,s.jsx)(t.p,{children:"Tweaks change values within components for all calls to your flow."}),"\n",(0,s.jsxs)(t.p,{children:["This example tweaks the ",(0,s.jsx)(t.strong,{children:"OpenAI"})," component to enforce using the ",(0,s.jsx)(t.code,{children:"gpt-4o-mini"})," model:"]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"const ",props:{style:{color:"#FF7B72"}}},{content:"tweaks ",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" { model_name: ",props:{style:{color:"#C9D1D9"}}},{content:'"gpt-4o-mini"',props:{style:{color:"#A5D6FF"}}},{content:" };",props:{style:{color:"#C9D1D9"}}}]}],lang:"tsx"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Pass a ",(0,s.jsx)(t.a,{href:"/session-id",children:"session ID"})," with the request to separate the conversation from other flow runs, and to be able to continue this conversation by calling the same session ID in the future:"]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"const ",props:{style:{color:"#FF7B72"}}},{content:"session_id ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"aa5a238b-02c0-4f03-bc5c-cc3a83335cdf"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]}],lang:"tsx"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Instead of calling ",(0,s.jsx)(t.code,{children:"run"})," on the Flow object, call ",(0,s.jsx)(t.code,{children:"stream"})," with the same arguments:"]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"const ",props:{style:{color:"#FF7B72"}}},{content:"response ",props:{style:{color:"#79C0FF"}}},{content:"= await",props:{style:{color:"#FF7B72"}}},{content:" client.",props:{style:{color:"#C9D1D9"}}},{content:"flow",props:{style:{color:"#D2A8FF"}}},{content:"(flowId).",props:{style:{color:"#C9D1D9"}}},{content:"stream",props:{style:{color:"#D2A8FF"}}},{content:"(input);",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"for await",props:{style:{color:"#FF7B72"}}},{content:" (",props:{style:{color:"#C9D1D9"}}},{content:"const ",props:{style:{color:"#FF7B72"}}},{content:"event ",props:{style:{color:"#79C0FF"}}},{content:"of",props:{style:{color:"#FF7B72"}}},{content:" response) {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(event);",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"tsx"},annotations:[]}]}),"\n",(0,s.jsxs)(t.p,{children:["The response is a ",(0,s.jsx)(t.a,{href:"https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream",children:(0,s.jsx)(t.code,{children:"ReadableStream"})})," of objects.\nFor more information on streaming Langflow responses, see the ",(0,s.jsxs)(t.a,{href:"/api-flows-run#run-flow",children:[(0,s.jsx)(t.code,{children:"/run"})," endpoint"]}),"."]}),"\n"]}),"\n",(0,s.jsxs)(t.li,{children:["\n",(0,s.jsxs)(t.p,{children:["Run the modified TypeScript application to run the flow with ",(0,s.jsx)(t.code,{children:"tweaks"})," and ",(0,s.jsx)(t.code,{children:"session_id"}),", and then stream the response back."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(t.p,{children:["Replace ",(0,s.jsx)(t.code,{children:"baseUrl"})," and ",(0,s.jsx)(t.code,{children:"flowId"})," with values from your deployment."]}),"\n",(0,s.jsx)(u.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:"baseUrl ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"http://localhost:7860"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{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:"({ baseUrl });",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"async function ",props:{style:{color:"#FF7B72"}}},{content:"runFlow",props:{style:{color:"#D2A8FF"}}},{content:"() {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" const ",props:{style:{color:"#FF7B72"}}},{content:"flowId ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"aa5a238b-02c0-4f03-bc5c-cc3a83335cdf"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" const ",props:{style:{color:"#FF7B72"}}},{content:"input ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"Is anyone there?"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" const ",props:{style:{color:"#FF7B72"}}},{content:"tweaks ",props:{style:{color:"#79C0FF"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" { model_name: ",props:{style:{color:"#C9D1D9"}}},{content:'"gpt-4o-mini"',props:{style:{color:"#A5D6FF"}}},{content:" };",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" const ",props:{style:{color:"#FF7B72"}}},{content:"session_id ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"test-session"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{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:" client.",props:{style:{color:"#C9D1D9"}}},{content:"flow",props:{style:{color:"#D2A8FF"}}},{content:"(flowId).",props:{style:{color:"#C9D1D9"}}},{content:"stream",props:{style:{color:"#D2A8FF"}}},{content:"(input, {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" session_id,",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" tweaks,",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" });",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" for await",props:{style:{color:"#FF7B72"}}},{content:" (",props:{style:{color:"#C9D1D9"}}},{content:"const ",props:{style:{color:"#FF7B72"}}},{content:"event ",props:{style:{color:"#79C0FF"}}},{content:"of",props:{style:{color:"#FF7B72"}}},{content:" response) {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(event);",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"runFlow",props:{style:{color:"#D2A8FF"}}},{content:"().",props:{style:{color:"#C9D1D9"}}},{content:"catch",props:{style:{color:"#D2A8FF"}}},{content:"(console.error);",props:{style:{color:"#C9D1D9"}}}]}],lang:"tsx"},annotations:[]}]}),"\n",(0,s.jsxs)(t.p,{children:["Replace ",(0,s.jsx)(t.code,{children:"baseUrl"})," and ",(0,s.jsx)(t.code,{children:"flowId"})," with your server URL and flow ID, as you did in the previous run."]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(t.p,{children:"With streaming enabled, the response includes the flow metatadata and timestamped events for flow activity.\nFor example:"}),(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{}}]},{tokens:[{content:" event: 'add_message',",props:{}}]},{tokens:[{content:" data: {",props:{}}]},{tokens:[{content:" timestamp: '2025-05-23 15:52:48 UTC',",props:{}}]},{tokens:[{content:" sender: 'User',",props:{}}]},{tokens:[{content:" sender_name: 'User',",props:{}}]},{tokens:[{content:" session_id: 'test-session',",props:{}}]},{tokens:[{content:" text: 'Is anyone there?',",props:{}}]},{tokens:[{content:" files: [],",props:{}}]},{tokens:[{content:" error: false,",props:{}}]},{tokens:[{content:" edit: false,",props:{}}]},{tokens:[{content:" properties: {",props:{}}]},{tokens:[{content:" text_color: '',",props:{}}]},{tokens:[{content:" background_color: '',",props:{}}]},{tokens:[{content:" edited: false,",props:{}}]},{tokens:[{content:" source: [Object],",props:{}}]},{tokens:[{content:" icon: '',",props:{}}]},{tokens:[{content:" allow_markdown: false,",props:{}}]},{tokens:[{content:" positive_feedback: null,",props:{}}]},{tokens:[{content:" state: 'complete',",props:{}}]},{tokens:[{content:" targets: []",props:{}}]},{tokens:[{content:" },",props:{}}]},{tokens:[{content:" category: 'message',",props:{}}]},{tokens:[{content:" content_blocks: [],",props:{}}]},{tokens:[{content:" id: '7f096715-3f2d-4d84-88d6-5e2f76bf3fbe',",props:{}}]},{tokens:[{content:" flow_id: 'aa5a238b-02c0-4f03-bc5c-cc3a83335cdf',",props:{}}]},{tokens:[{content:" duration: null",props:{}}]},{tokens:[{content:" }",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"{",props:{}}]},{tokens:[{content:" event: 'token',",props:{}}]},{tokens:[{content:" data: {",props:{}}]},{tokens:[{content:" chunk: 'Absolutely',",props:{}}]},{tokens:[{content:" id: 'c5a99314-6b23-488b-84e2-038aa3e87fb5',",props:{}}]},{tokens:[{content:" timestamp: '2025-05-23 15:52:48 UTC'",props:{}}]},{tokens:[{content:" }",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"{",props:{}}]},{tokens:[{content:" event: 'token',",props:{}}]},{tokens:[{content:" data: {",props:{}}]},{tokens:[{content:" chunk: ',',",props:{}}]},{tokens:[{content:" id: 'c5a99314-6b23-488b-84e2-038aa3e87fb5',",props:{}}]},{tokens:[{content:" timestamp: '2025-05-23 15:52:48 UTC'",props:{}}]},{tokens:[{content:" }",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"{",props:{}}]},{tokens:[{content:" event: 'token',",props:{}}]},{tokens:[{content:" data: {",props:{}}]},{tokens:[{content:' chunk: " I\'m",',props:{}}]},{tokens:[{content:" id: 'c5a99314-6b23-488b-84e2-038aa3e87fb5',",props:{}}]},{tokens:[{content:" timestamp: '2025-05-23 15:52:48 UTC'",props:{}}]},{tokens:[{content:" }",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"{",props:{}}]},{tokens:[{content:" event: 'token',",props:{}}]},{tokens:[{content:" data: {",props:{}}]},{tokens:[{content:" chunk: ' here',",props:{}}]},{tokens:[{content:" id: 'c5a99314-6b23-488b-84e2-038aa3e87fb5',",props:{}}]},{tokens:[{content:" timestamp: '2025-05-23 15:52:48 UTC'",props:{}}]},{tokens:[{content:" }",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"// this response is abbreviated",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"{",props:{}}]},{tokens:[{content:" event: 'end',",props:{}}]},{tokens:[{content:" data: { result: { session_id: 'test-session', outputs: [Array] } }",props:{}}]},{tokens:[{content:"}",props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n",(0,s.jsx)(t.h2,{id:"retrieve-langflow-logs-with-the-typescript-client",children:"Retrieve Langflow logs with the TypeScript client"}),"\n",(0,s.jsxs)(t.p,{children:["To retrieve ",(0,s.jsx)(t.a,{href:"/logging",children:"Langflow logs"}),", you must enable log retrieval on your Langflow server by including the following values in your server's ",(0,s.jsx)(t.code,{children:".env"})," file:"]}),"\n",(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"LANGFLOW_ENABLE_LOG_RETRIEVAL=True",props:{}}]},{tokens:[{content:"LANGFLOW_LOG_RETRIEVER_BUFFER_SIZE=10000",props:{}}]},{tokens:[{content:"LANGFLOW_LOG_LEVEL=DEBUG",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,s.jsx)(t.p,{children:"The following example script starts streaming logs in the background, and then runs a flow so you can monitor the flow run:"}),"\n",(0,s.jsx)(u.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:"baseUrl ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"http://localhost:7863"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"const ",props:{style:{color:"#FF7B72"}}},{content:"flowId ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"86f0bf45-0544-4e88-b0b1-8e622da7a7f0"',props:{style:{color:"#A5D6FF"}}},{content:";",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"async function ",props:{style:{color:"#FF7B72"}}},{content:"runFlow",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"client",props:{style:{color:"#FFA657"}}},{content:": ",props:{style:{color:"#FF7B72"}}},{content:"LangflowClient",props:{style:{color:"#FFA657"}}},{content:") {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" const ",props:{style:{color:"#FF7B72"}}},{content:"input ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"Is anyone there?"',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:" client.",props:{style:{color:"#C9D1D9"}}},{content:"flow",props:{style:{color:"#D2A8FF"}}},{content:"(flowId).",props:{style:{color:"#C9D1D9"}}},{content:"run",props:{style:{color:"#D2A8FF"}}},{content:"(input);",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'Flow response:'",props:{style:{color:"#A5D6FF"}}},{content:", response);",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"async function ",props:{style:{color:"#FF7B72"}}},{content:"main",props:{style:{color:"#D2A8FF"}}},{content:"() {",props:{style:{color:"#C9D1D9"}}}]},{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:"({ baseUrl: baseUrl });",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" // Start streaming logs",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" console.",props:{style:{color:"#C9D1D9"}}},{content:"log",props:{style:{color:"#D2A8FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"'Starting log stream...'",props:{style:{color:"#A5D6FF"}}},{content:");",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" for await",props:{style:{color:"#FF7B72"}}},{content:" (",props:{style:{color:"#C9D1D9"}}},{content:"const ",props:{style:{color:"#FF7B72"}}},{content:"log ",props:{style:{color:"#79C0FF"}}},{content:"of await",props:{style:{color:"#FF7B72"}}},{content:" client.logs.",props:{style:{color:"#C9D1D9"}}},{content:"stream",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:"'Log:'",props:{style:{color:"#A5D6FF"}}},{content:", log);",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" // Run the flow",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" await ",props:{style:{color:"#FF7B72"}}},{content:"runFlow",props:{style:{color:"#D2A8FF"}}},{content:"(client);",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"main",props:{style:{color:"#D2A8FF"}}},{content:"().",props:{style:{color:"#C9D1D9"}}},{content:"catch",props:{style:{color:"#D2A8FF"}}},{content:"(console.error);",props:{style:{color:"#C9D1D9"}}}]}],lang:"tsx"},annotations:[]}]}),"\n",(0,s.jsxs)(t.p,{children:["Replace ",(0,s.jsx)(t.code,{children:"baseUrl"})," and ",(0,s.jsx)(t.code,{children:"flowId"})," with your server URL and flow ID, as you did in the previous run."]}),"\n",(0,s.jsx)(t.p,{children:"Logs begin streaming indefinitely, and the flow runs once."}),"\n",(0,s.jsx)(t.p,{children:"The following example result is truncated for readability, but you can follow the messages to see how the flow instantiates its components, configures its model, and processes the outputs."}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"FlowResponse"})," object, at the end of the stream, is returned to the client with the flow result in the ",(0,s.jsx)(t.code,{children:"outputs"})," array."]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(u.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Starting log stream...",props:{}}]},{tokens:[{content:"Log: Log {",props:{}}]},{tokens:[{content:" timestamp: 2025-05-30T11:49:16.006Z,",props:{}}]},{tokens:[{content:" message: '2025-05-30T07:49:16.006127-0400 DEBUG Instantiating ChatInput of type component\\n'",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Log: Log {",props:{}}]},{tokens:[{content:" timestamp: 2025-05-30T11:49:16.029Z,",props:{}}]},{tokens:[{content:" message: '2025-05-30T07:49:16.029957-0400 DEBUG Instantiating Prompt of type component\\n'",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Log: Log {",props:{}}]},{tokens:[{content:" timestamp: 2025-05-30T11:49:16.049Z,",props:{}}]},{tokens:[{content:" message: '2025-05-30T07:49:16.049520-0400 DEBUG Instantiating ChatOutput of type component\\n'",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Log: Log {",props:{}}]},{tokens:[{content:" timestamp: 2025-05-30T11:49:16.069Z,",props:{}}]},{tokens:[{content:" message: '2025-05-30T07:49:16.069359-0400 DEBUG Instantiating OpenAIModel of type component\\n'",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Log: Log {",props:{}}]},{tokens:[{content:" timestamp: 2025-05-30T11:49:16.086Z,",props:{}}]},{tokens:[{content:" message: \"2025-05-30T07:49:16.086426-0400 DEBUG Running layer 0 with 2 tasks, ['ChatInput-xjucM', 'Prompt-I3pxU']\\n\"",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Log: Log {",props:{}}]},{tokens:[{content:" timestamp: 2025-05-30T11:49:16.101Z,",props:{}}]},{tokens:[{content:" message: '2025-05-30T07:49:16.101766-0400 DEBUG Building Chat Input\\n'",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Log: Log {",props:{}}]},{tokens:[{content:" timestamp: 2025-05-30T11:49:16.113Z,",props:{}}]},{tokens:[{content:" message: '2025-05-30T07:49:16.113343-0400 DEBUG Building Prompt\\n'",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Log: Log {",props:{}}]},{tokens:[{content:" timestamp: 2025-05-30T11:49:16.131Z,",props:{}}]},{tokens:[{content:" message: '2025-05-30T07:49:16.131423-0400 DEBUG Logged vertex build: 6bd9fe9c-5eea-4f05-a96d-f6de9dc77e3c\\n'",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Log: Log {",props:{}}]},{tokens:[{content:" timestamp: 2025-05-30T11:49:16.143Z,",props:{}}]},{tokens:[{content:" message: '2025-05-30T07:49:16.143295-0400 DEBUG Logged vertex build: 39c68ec9-3859-4fff-9b14-80b3271f8fbf\\n'",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Log: Log {",props:{}}]},{tokens:[{content:" timestamp: 2025-05-30T11:49:16.188Z,",props:{}}]},{tokens:[{content:" message: \"2025-05-30T07:49:16.188730-0400 DEBUG Running layer 1 with 1 tasks, ['OpenAIModel-RtlZm']\\n\"",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Log: Log {",props:{}}]},{tokens:[{content:" timestamp: 2025-05-30T11:49:16.201Z,",props:{}}]},{tokens:[{content:" message: '2025-05-30T07:49:16.201946-0400 DEBUG Building OpenAI\\n'",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Log: Log {",props:{}}]},{tokens:[{content:" timestamp: 2025-05-30T11:49:16.216Z,",props:{}}]},{tokens:[{content:" message: '2025-05-30T07:49:16.216622-0400 INFO Model name: gpt-4.1-mini\\n'",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Flow response: FlowResponse {",props:{}}]},{tokens:[{content:" sessionId: '86f0bf45-0544-4e88-b0b1-8e622da7a7f0',",props:{}}]},{tokens:[{content:" outputs: [ { inputs: [Object], outputs: [Array] } ]",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Log: Log {",props:{}}]},{tokens:[{content:" timestamp: 2025-05-30T11:49:18.094Z,",props:{}}]},{tokens:[{content:" message: `2025-05-30T07:49:18.094364-0400 DEBUG Vertex OpenAIModel-RtlZm, result: , object: {'text_output': \"Hey there! I'm here and ready to help you build something awesome with AI. What are you thinking about creating today?\"}\\n`",props:{}}]},{tokens:[{content:"}",props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n",(0,s.jsxs)(t.p,{children:["For more information, see ",(0,s.jsx)(t.a,{href:"/api-logs",children:"Logs endpoints"}),"."]})]})}function F(o={}){const{wrapper:t}={...(0,r.R)(),...o.components};return t?(0,s.jsx)(t,{...o,children:(0,s.jsx)(f,{...o})}):f(o)}function g(o,t){throw new Error("Expected "+(t?"component":"object")+" `"+o+"` to be defined: you likely forgot to import, pass, or provide it.")}},11470:(o,t,e)=>{e.d(t,{A:()=>w});var n=e(96540),s=e(18215),r=e(23104),c=e(56347),l=e(205),p=e(57485),a=e(31682),i=e(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:t}=o;return!!t&&"object"==typeof t&&"value"in t}(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 u(o){const{values:t,children:e}=o;return(0,n.useMemo)(()=>{const o=t??function(o){return d(o).map(({props:{value:o,label:t,attributes:e,default:n}})=>({value:o,label:t,attributes:e,default:n}))}(e);return function(o){const t=(0,a.XI)(o,(o,t)=>o.value===t.value);if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map(o=>o.value).join(", ")}" found in . Every value needs to be unique.`)}(o),o},[t,e])}function h({value:o,tabValues:t}){return t.some(t=>t.value===o)}function y({queryString:o=!1,groupId:t}){const e=(0,c.W6)(),s=function({queryString:o=!1,groupId:t}){if("string"==typeof o)return o;if(!1===o)return null;if(!0===o&&!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:o,groupId:t});return[(0,p.aZ)(s),(0,n.useCallback)(o=>{if(!s)return;const t=new URLSearchParams(e.location.search);t.set(s,o),e.replace({...e.location,search:t.toString()})},[s,e])]}function f(o){const{defaultValue:t,queryString:e=!1,groupId:s}=o,r=u(o),[c,p]=(0,n.useState)(()=>function({defaultValue:o,tabValues:t}){if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(o){if(!h({value:o,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${o}" but none of its children has the corresponding value. Available values are: ${t.map(o=>o.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return o}const e=t.find(o=>o.default)??t[0];if(!e)throw new Error("Unexpected error: 0 tabValues");return e.value}({defaultValue:t,tabValues:r})),[a,d]=y({queryString:e,groupId:s}),[f,F]=function({groupId:o}){const t=function(o){return o?`docusaurus.tab.${o}`:null}(o),[e,s]=(0,i.Dv)(t);return[e,(0,n.useCallback)(o=>{t&&s.set(o)},[t,s])]}({groupId:s}),g=(()=>{const o=a??f;return h({value:o,tabValues:r})?o:null})();(0,l.A)(()=>{g&&p(g)},[g]);return{selectedValue:c,selectValue:(0,n.useCallback)(o=>{if(!h({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=e(92303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var D=e(74848);function k({className:o,block:t,selectedValue:e,selectValue:n,tabValues:c}){const l=[],{blockElementScrollPositionUntilNextRender:p}=(0,r.a_)(),a=o=>{const t=o.currentTarget,s=l.indexOf(t),r=c[s].value;r!==e&&(p(t),n(r))},i=o=>{let t=null;switch(o.key){case"Enter":a(o);break;case"ArrowRight":{const e=l.indexOf(o.currentTarget)+1;t=l[e]??l[0];break}case"ArrowLeft":{const e=l.indexOf(o.currentTarget)-1;t=l[e]??l[l.length-1];break}}t?.focus()};return(0,D.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":t},o),children:c.map(({value:o,label:t,attributes:n})=>(0,D.jsx)("li",{role:"tab",tabIndex:e===o?0:-1,"aria-selected":e===o,ref:o=>{l.push(o)},onKeyDown:i,onClick:a,...n,className:(0,s.A)("tabs__item",g.tabItem,n?.className,{"tabs__item--active":e===o}),children:t??o},o))})}function m({lazy:o,children:t,selectedValue:e}){const r=(Array.isArray(t)?t:[t]).filter(Boolean);if(o){const o=r.find(o=>o.props.value===e);return o?(0,n.cloneElement)(o,{className:(0,s.A)("margin-top--md",o.props.className)}):null}return(0,D.jsx)("div",{className:"margin-top--md",children:r.map((o,t)=>(0,n.cloneElement)(o,{key:t,hidden:o.props.value!==e}))})}function C(o){const t=f(o);return(0,D.jsxs)("div",{className:(0,s.A)("tabs-container",g.tabList),children:[(0,D.jsx)(k,{...t,...o}),(0,D.jsx)(m,{...t,...o})]})}function w(o){const t=(0,F.A)();return(0,D.jsx)(C,{...o,children:d(o.children)},String(t))}},19365:(o,t,e)=>{e.d(t,{A:()=>c});e(96540);var n=e(18215);const s={tabItem:"tabItem_Ymn6"};var r=e(74848);function c({children:o,hidden:t,className:e}){return(0,r.jsx)("div",{role:"tabpanel",className:(0,n.A)(s.tabItem,e),hidden:t,children:o})}},28453:(o,t,e)=>{e.d(t,{R:()=>c,x:()=>l});var n=e(96540);const s={},r=n.createContext(s);function c(o){const t=n.useContext(r);return n.useMemo(function(){return"function"==typeof o?o(t):{...t,...o}},[t,o])}function l(o){let t;return t=o.disableParentContext?"function"==typeof o.components?o.components(s):o.components||s:c(o.components),n.createElement(r.Provider,{value:t},o.children)}}}]); \ No newline at end of file diff --git a/assets/js/a99a45c9.97d1f5d1.js b/assets/js/a99a45c9.97d1f5d1.js new file mode 100644 index 0000000000..9cab7eabe2 --- /dev/null +++ b/assets/js/a99a45c9.97d1f5d1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[38],{17886:(e,n,t)=>{t.d(n,{A:()=>d});t(96540);var r=t(64058),s=t(74848);function d({name:e,...n}){const t=r[e];return t?(0,s.jsx)(t,{...n}):null}},31929:(e,n,t)=>{t.d(n,{Ay:()=>o,RM:()=>i});var r=t(74848),s=t(28453),d=t(17886);const i=[];function l(e){const n={a:"a",p:"p",strong:"strong",...(0,s.R)(),...e.components};return(0,r.jsxs)(n.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,r.jsx)(d.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Controls"})," in the ",(0,r.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function o(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},43559:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>o,default:()=>p,frontMatter:()=>l,metadata:()=>r,toc:()=>h});const r=JSON.parse('{"id":"Components/bundles-openai","title":"OpenAI","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-openai.mdx","sourceDirName":"Components","slug":"/bundles-openai","permalink":"/bundles-openai","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"OpenAI","slug":"/bundles-openai"},"sidebar":"docs","previous":{"title":"Ollama","permalink":"/bundles-ollama"},"next":{"title":"OpenRouter","permalink":"/bundles-openrouter"}}');var s=t(74848),d=t(28453),i=(t(17886),t(31929));const l={title:"OpenAI",slug:"/bundles-openai"},o=void 0,a={},h=[{value:"OpenAI text generation",id:"openai-text-generation",level:2},{value:"OpenAI text generation parameters",id:"openai-text-generation-parameters",level:3},...i.RM,{value:"OpenAI Embeddings",id:"openai-embeddings",level:2},{value:"OpenAI Embeddings parameters",id:"openai-embeddings-parameters",level:3},...i.RM,{value:"See also",id:"see-also",level:2}];function c(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,d.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,s.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,s.jsx)(n.strong,{children:"OpenAI"})," bundle."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information about OpenAI features and functionality used by OpenAI components, see the ",(0,s.jsx)(n.a,{href:"https://platform.openai.com/docs/overview",children:"OpenAI documentation"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"openai-text-generation",children:"OpenAI text generation"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"OpenAI"})," component generates text using ",(0,s.jsx)(n.a,{href:"https://platform.openai.com/docs/models",children:"OpenAI's language models"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["It provides access to the same OpenAI models that are available in the core ",(0,s.jsx)(n.strong,{children:"Language Model"})," component, but the ",(0,s.jsx)(n.strong,{children:"OpenAI"})," component provides additional parameters for customizing the request to the OpenAI API."]}),"\n",(0,s.jsxs)(n.p,{children:["It can output either a ",(0,s.jsx)(n.strong,{children:"Model Response"})," (",(0,s.jsx)(n.a,{href:"/data-types#message",children:(0,s.jsx)(n.code,{children:"Message"})}),") or a ",(0,s.jsx)(n.strong,{children:"Language Model"})," (",(0,s.jsx)(n.a,{href:"/data-types#languagemodel",children:(0,s.jsx)(n.code,{children:"LanguageModel"})}),")."]}),"\n",(0,s.jsxs)(n.p,{children:["Use the ",(0,s.jsx)(n.strong,{children:"Language Model"})," output when you want to use a specific OpenAI model configuration as the LLM for another LLM-driven component, such as an ",(0,s.jsx)(n.strong,{children:"Agent"})," or ",(0,s.jsx)(n.strong,{children:"Smart Function"})," component."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information, see ",(0,s.jsxs)(n.a,{href:"/components-models",children:[(0,s.jsx)(n.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"openai-text-generation-parameters",children:"OpenAI text generation parameters"}),"\n",(0,s.jsx)(i.Ay,{}),"\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:"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:"api_key"}),(0,s.jsx)(n.td,{children:"SecretString"}),(0,s.jsx)(n.td,{children:"Input parameter. Your OpenAI API Key."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"model"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:'Input parameter. The name of the OpenAI model to use. Options include "gpt-3.5-turbo" and "gpt-4".'})]}),(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:"Input parameter. The maximum number of tokens to generate. Set to 0 for unlimited tokens."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"temperature"}),(0,s.jsx)(n.td,{children:"Float"}),(0,s.jsx)(n.td,{children:"Input parameter. Controls randomness in the output. Range: [0.0, 1.0]. Default: 0.7."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"top_p"}),(0,s.jsx)(n.td,{children:"Float"}),(0,s.jsx)(n.td,{children:"Input parameter. Controls the nucleus sampling. Range: [0.0, 1.0]. Default: 1.0."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"frequency_penalty"}),(0,s.jsx)(n.td,{children:"Float"}),(0,s.jsx)(n.td,{children:"Input parameter. Controls the frequency penalty. Range: [0.0, 2.0]. Default: 0.0."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"presence_penalty"}),(0,s.jsx)(n.td,{children:"Float"}),(0,s.jsx)(n.td,{children:"Input parameter. Controls the presence penalty. Range: [0.0, 2.0]. Default: 0.0."})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"openai-embeddings",children:"OpenAI Embeddings"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"OpenAI Embeddings"})," component uses ",(0,s.jsx)(n.a,{href:"https://platform.openai.com/docs/guides/embeddings",children:"OpenAI embedding models"})," for embedding generation."]}),"\n",(0,s.jsxs)(n.p,{children:["It provides access to the same OpenAI models that are available in the core ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," component, but the ",(0,s.jsx)(n.strong,{children:"OpenAI Embeddings"})," component provides additional parameters for customizing the request to the OpenAI embedding API."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information about using embedding model components in flows, see ",(0,s.jsxs)(n.a,{href:"/components-embedding-models",children:[(0,s.jsx)(n.strong,{children:"Embedding Model"})," components"]}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"openai-embeddings-parameters",children:"OpenAI Embeddings parameters"}),"\n",(0,s.jsx)(i.Ay,{}),"\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:"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:"OpenAI API Key"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The API key to use for accessing the OpenAI API."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Default Headers"}),(0,s.jsx)(n.td,{children:"Dict"}),(0,s.jsx)(n.td,{children:"Input parameter. The default headers for the HTTP requests."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Default Query"}),(0,s.jsx)(n.td,{children:"NestedDict"}),(0,s.jsx)(n.td,{children:"Input parameter. The default query parameters for the HTTP requests."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Allowed Special"}),(0,s.jsx)(n.td,{children:"List"}),(0,s.jsxs)(n.td,{children:["Input parameter. The special tokens allowed for processing. Default: ",(0,s.jsx)(n.code,{children:"[]"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Disallowed Special"}),(0,s.jsx)(n.td,{children:"List"}),(0,s.jsxs)(n.td,{children:["Input parameter. The special tokens disallowed for processing. Default: ",(0,s.jsx)(n.code,{children:'["all"]'}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Chunk Size"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsxs)(n.td,{children:["Input parameter. The chunk size for processing. Default: ",(0,s.jsx)(n.code,{children:"1000"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Client"}),(0,s.jsx)(n.td,{children:"Any"}),(0,s.jsx)(n.td,{children:"Input parameter. The HTTP client for making requests."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Deployment"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. The deployment name for the model. Default: ",(0,s.jsx)(n.code,{children:"text-embedding-3-small"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Embedding Context Length"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsxs)(n.td,{children:["Input parameter. The length of embedding context. Default: ",(0,s.jsx)(n.code,{children:"8191"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Max Retries"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsxs)(n.td,{children:["Input parameter. The maximum number of retries for failed requests. Default: ",(0,s.jsx)(n.code,{children:"6"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Model"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. The name of the model to use. Default: ",(0,s.jsx)(n.code,{children:"text-embedding-3-small"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Model Kwargs"}),(0,s.jsx)(n.td,{children:"NestedDict"}),(0,s.jsx)(n.td,{children:"Input parameter. Additional keyword arguments for the model."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"OpenAI API Base"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The base URL of the OpenAI API."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"OpenAI API Type"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The type of the OpenAI API."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"OpenAI API Version"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The version of the OpenAI API."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"OpenAI Organization"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The organization associated with the API key."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"OpenAI Proxy"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The proxy server for the requests."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Request Timeout"}),(0,s.jsx)(n.td,{children:"Float"}),(0,s.jsx)(n.td,{children:"Input parameter. The timeout for the HTTP requests."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Show Progress Bar"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"Input parameter. Whether to show a progress bar for processing. Default: false."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Skip Empty"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"Input parameter. Whether to skip empty inputs. Default: false."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"TikToken Enable"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"Input parameter. Whether to enable TikToken. Default: true."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"TikToken Model Name"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The name of the TikToken model."})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"see-also",children:"See also"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsxs)(n.a,{href:"/components-agents",children:[(0,s.jsx)(n.strong,{children:"Agent"})," component"]})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsxs)(n.a,{href:"/bundles-langchain#openai-tools-agent",children:["LangChain ",(0,s.jsx)(n.strong,{children:"OpenAI Tools Agent"})," component"]})}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}}}]); \ No newline at end of file diff --git a/assets/js/a99a45c9.a852dec5.js b/assets/js/a99a45c9.a852dec5.js deleted file mode 100644 index 3893e12cfc..0000000000 --- a/assets/js/a99a45c9.a852dec5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[38],{17886:(e,n,t)=>{t.d(n,{A:()=>d});t(96540);var r=t(64058),s=t(74848);function d({name:e,...n}){const t=r[e];return t?(0,s.jsx)(t,{...n}):null}},43559:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>o,default:()=>p,frontMatter:()=>l,metadata:()=>r,toc:()=>h});const r=JSON.parse('{"id":"Components/bundles-openai","title":"OpenAI","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-openai.mdx","sourceDirName":"Components","slug":"/bundles-openai","permalink":"/bundles-openai","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"OpenAI","slug":"/bundles-openai"},"sidebar":"docs","previous":{"title":"Ollama","permalink":"/bundles-ollama"},"next":{"title":"OpenRouter","permalink":"/bundles-openrouter"}}');var s=t(74848),d=t(28453),i=t(17886);const l={title:"OpenAI",slug:"/bundles-openai"},o=void 0,a={},h=[{value:"OpenAI text generation",id:"openai-text-generation",level:2},{value:"OpenAI text generation parameters",id:"openai-text-generation-parameters",level:3},{value:"OpenAI Embeddings",id:"openai-embeddings",level:2},{value:"OpenAI Embeddings parameters",id:"openai-embeddings-parameters",level:3},{value:"See also",id:"see-also",level:2}];function c(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,d.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,s.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,s.jsx)(n.strong,{children:"OpenAI"})," bundle."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information about OpenAI features and functionality used by OpenAI components, see the ",(0,s.jsx)(n.a,{href:"https://platform.openai.com/docs/overview",children:"OpenAI documentation"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"openai-text-generation",children:"OpenAI text generation"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"OpenAI"})," component generates text using ",(0,s.jsx)(n.a,{href:"https://platform.openai.com/docs/models",children:"OpenAI's language models"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["It provides access to the same OpenAI models that are available in the core ",(0,s.jsx)(n.strong,{children:"Language Model"})," component, but the ",(0,s.jsx)(n.strong,{children:"OpenAI"})," component provides additional parameters for customizing the request to the OpenAI API."]}),"\n",(0,s.jsxs)(n.p,{children:["It can output either a ",(0,s.jsx)(n.strong,{children:"Model Response"})," (",(0,s.jsx)(n.a,{href:"/data-types#message",children:(0,s.jsx)(n.code,{children:"Message"})}),") or a ",(0,s.jsx)(n.strong,{children:"Language Model"})," (",(0,s.jsx)(n.a,{href:"/data-types#languagemodel",children:(0,s.jsx)(n.code,{children:"LanguageModel"})}),")."]}),"\n",(0,s.jsxs)(n.p,{children:["Use the ",(0,s.jsx)(n.strong,{children:"Language Model"})," output when you want to use a specific OpenAI model configuration as the LLM for another LLM-driven component, such as a ",(0,s.jsx)(n.strong,{children:"Language Model"})," or ",(0,s.jsx)(n.strong,{children:"Smart Function"})," component."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information, see ",(0,s.jsxs)(n.a,{href:"/components-models",children:[(0,s.jsx)(n.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"openai-text-generation-parameters",children:"OpenAI text generation parameters"}),"\n",(0,s.jsxs)(n.p,{children:["Many ",(0,s.jsx)(n.strong,{children:"OpenAI"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,s.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Controls"})," in the ",(0,s.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\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:"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:"api_key"}),(0,s.jsx)(n.td,{children:"SecretString"}),(0,s.jsx)(n.td,{children:"Input parameter. Your OpenAI API Key."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"model"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:'Input parameter. The name of the OpenAI model to use. Options include "gpt-3.5-turbo" and "gpt-4".'})]}),(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:"Input parameter. The maximum number of tokens to generate. Set to 0 for unlimited tokens."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"temperature"}),(0,s.jsx)(n.td,{children:"Float"}),(0,s.jsx)(n.td,{children:"Input parameter. Controls randomness in the output. Range: [0.0, 1.0]. Default: 0.7."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"top_p"}),(0,s.jsx)(n.td,{children:"Float"}),(0,s.jsx)(n.td,{children:"Input parameter. Controls the nucleus sampling. Range: [0.0, 1.0]. Default: 1.0."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"frequency_penalty"}),(0,s.jsx)(n.td,{children:"Float"}),(0,s.jsx)(n.td,{children:"Input parameter. Controls the frequency penalty. Range: [0.0, 2.0]. Default: 0.0."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"presence_penalty"}),(0,s.jsx)(n.td,{children:"Float"}),(0,s.jsx)(n.td,{children:"Input parameter. Controls the presence penalty. Range: [0.0, 2.0]. Default: 0.0."})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"openai-embeddings",children:"OpenAI Embeddings"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"OpenAI Embeddings"})," component uses ",(0,s.jsx)(n.a,{href:"https://platform.openai.com/docs/guides/embeddings",children:"OpenAI embedding models"})," for embedding generation."]}),"\n",(0,s.jsxs)(n.p,{children:["It provides access to the same OpenAI models that are available in the core ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," component, but the ",(0,s.jsx)(n.strong,{children:"OpenAI Embeddings"})," component provides additional parameters for customizing the request to the OpenAI embedding API."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information about using embedding model components in flows, see ",(0,s.jsxs)(n.a,{href:"/components-embedding-models",children:[(0,s.jsx)(n.strong,{children:"Embedding Model"})," components"]}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"openai-embeddings-parameters",children:"OpenAI Embeddings parameters"}),"\n",(0,s.jsxs)(n.p,{children:["Many ",(0,s.jsx)(n.strong,{children:"OpenAI Embeddings"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,s.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Controls"})," in the ",(0,s.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\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:"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:"OpenAI API Key"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The API key to use for accessing the OpenAI API."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Default Headers"}),(0,s.jsx)(n.td,{children:"Dict"}),(0,s.jsx)(n.td,{children:"Input parameter. The default headers for the HTTP requests."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Default Query"}),(0,s.jsx)(n.td,{children:"NestedDict"}),(0,s.jsx)(n.td,{children:"Input parameter. The default query parameters for the HTTP requests."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Allowed Special"}),(0,s.jsx)(n.td,{children:"List"}),(0,s.jsxs)(n.td,{children:["Input parameter. The special tokens allowed for processing. Default: ",(0,s.jsx)(n.code,{children:"[]"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Disallowed Special"}),(0,s.jsx)(n.td,{children:"List"}),(0,s.jsxs)(n.td,{children:["Input parameter. The special tokens disallowed for processing. Default: ",(0,s.jsx)(n.code,{children:'["all"]'}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Chunk Size"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsxs)(n.td,{children:["Input parameter. The chunk size for processing. Default: ",(0,s.jsx)(n.code,{children:"1000"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Client"}),(0,s.jsx)(n.td,{children:"Any"}),(0,s.jsx)(n.td,{children:"Input parameter. The HTTP client for making requests."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Deployment"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. The deployment name for the model. Default: ",(0,s.jsx)(n.code,{children:"text-embedding-3-small"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Embedding Context Length"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsxs)(n.td,{children:["Input parameter. The length of embedding context. Default: ",(0,s.jsx)(n.code,{children:"8191"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Max Retries"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsxs)(n.td,{children:["Input parameter. The maximum number of retries for failed requests. Default: ",(0,s.jsx)(n.code,{children:"6"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Model"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. The name of the model to use. Default: ",(0,s.jsx)(n.code,{children:"text-embedding-3-small"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Model Kwargs"}),(0,s.jsx)(n.td,{children:"NestedDict"}),(0,s.jsx)(n.td,{children:"Input parameter. Additional keyword arguments for the model."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"OpenAI API Base"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The base URL of the OpenAI API."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"OpenAI API Type"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The type of the OpenAI API."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"OpenAI API Version"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The version of the OpenAI API."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"OpenAI Organization"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The organization associated with the API key."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"OpenAI Proxy"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The proxy server for the requests."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Request Timeout"}),(0,s.jsx)(n.td,{children:"Float"}),(0,s.jsx)(n.td,{children:"Input parameter. The timeout for the HTTP requests."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Show Progress Bar"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"Input parameter. Whether to show a progress bar for processing. Default: false."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Skip Empty"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"Input parameter. Whether to skip empty inputs. Default: false."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"TikToken Enable"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"Input parameter. Whether to enable TikToken. Default: true."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"TikToken Model Name"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The name of the TikToken model."})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"see-also",children:"See also"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsxs)(n.a,{href:"/components-agents",children:[(0,s.jsx)(n.strong,{children:"Agent"})," component"]})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsxs)(n.a,{href:"/bundles-langchain#openai-tools-agent",children:["LangChain ",(0,s.jsx)(n.strong,{children:"OpenAI Tools Agent"})," component"]})}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}}}]); \ No newline at end of file diff --git a/assets/js/ad06d5f0.fc5c42cb.js b/assets/js/ad06d5f0.8d6bbf3a.js similarity index 88% rename from assets/js/ad06d5f0.fc5c42cb.js rename to assets/js/ad06d5f0.8d6bbf3a.js index a1f1f0f9f9..39abc65ae2 100644 --- a/assets/js/ad06d5f0.fc5c42cb.js +++ b/assets/js/ad06d5f0.8d6bbf3a.js @@ -1 +1 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[2089],{28453:(n,e,t)=>{t.d(e,{R:()=>i,x:()=>s});var o=t(96540);const a={},r=o.createContext(a);function i(n){const e=o.useContext(r);return o.useMemo(function(){return"function"==typeof n?n(e):{...e,...n}},[e,n])}function s(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(a):n.components||a:i(n.components),o.createElement(r.Provider,{value:e},n.children)}},74386:(n,e,t)=>{t.r(e),t.d(e,{CH:()=>d,assets:()=>l,chCodeConfig:()=>h,contentTitle:()=>c,default:()=>p,frontMatter:()=>s,metadata:()=>o,toc:()=>g});const o=JSON.parse('{"id":"Integrations/integrations-langwatch","title":"LangWatch","description":"LangWatch is an all-in-one LLMOps platform for monitoring, observability, analytics, evaluations and alerting for getting user insights and improve your LLM workflows.","source":"@site/docs/Integrations/integrations-langwatch.mdx","sourceDirName":"Integrations","slug":"/integrations-langwatch","permalink":"/integrations-langwatch","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"LangWatch","slug":"/integrations-langwatch"},"sidebar":"docs","previous":{"title":"LangSmith","permalink":"/integrations-langsmith"},"next":{"title":"Opik","permalink":"/integrations-opik"}}');var a=t(74848),r=t(28453),i=t(24754);const s={title:"LangWatch",slug:"/integrations-langwatch"},c=void 0,l={},d={annotations:i.hk,Code:i.Cy},h={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},g=[{value:"Integrate LangWatch observability",id:"integrate-langwatch-observability",level:2},{value:"Use the LangWatch Evaluator",id:"use-the-langwatch-evaluator",level:2}];function u(n){const e={a:"a",code:"code",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",...(0,r.R)(),...n.components};return d||f("CH",!1),d.Code||f("CH.Code",!0),(0,a.jsxs)(a.Fragment,{children:[(0,a.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,a.jsxs)(e.p,{children:[(0,a.jsx)(e.a,{href:"https://app.langwatch.ai/",children:"LangWatch"})," is an all-in-one LLMOps platform for monitoring, observability, analytics, evaluations and alerting for getting user insights and improve your LLM workflows."]}),"\n",(0,a.jsx)(e.h2,{id:"integrate-langwatch-observability",children:"Integrate LangWatch observability"}),"\n",(0,a.jsx)(e.p,{children:"To integrate with Langflow, add your LangWatch API key as a Langflow environment variable:"}),"\n",(0,a.jsxs)(e.ol,{children:["\n",(0,a.jsxs)(e.li,{children:["\n",(0,a.jsx)(e.p,{children:"Get a LangWatch API key from your LangWatch account."}),"\n"]}),"\n",(0,a.jsxs)(e.li,{children:["\n",(0,a.jsxs)(e.p,{children:["Add the key to your Langflow ",(0,a.jsx)(e.code,{children:".env"})," file:"]}),"\n",(0,a.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"LANGWATCH_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"API_KEY_STRING"',props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]}),"\n",(0,a.jsx)(e.p,{children:"Alternatively, you can set the environment variable in your terminal session:"}),"\n",(0,a.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"export",props:{style:{color:"#FF7B72"}}},{content:" LANGWATCH_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"API_KEY_STRING"',props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]}),"\n"]}),"\n",(0,a.jsxs)(e.li,{children:["\n",(0,a.jsxs)(e.p,{children:["Restart Langflow with your ",(0,a.jsx)(e.code,{children:".env"})," file, if you modified the Langflow ",(0,a.jsx)(e.code,{children:".env"}),":"]}),"\n",(0,a.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"langflow run --env-file .env",props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n",(0,a.jsxs)(e.li,{children:["\n",(0,a.jsx)(e.p,{children:"Run a flow."}),"\n"]}),"\n",(0,a.jsxs)(e.li,{children:["\n",(0,a.jsx)(e.p,{children:"View the LangWatch dashboard for monitoring and observability."}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.img,{alt:"LangWatch dashboard",src:t(97423).A+"",width:"1987",height:"1032"})}),"\n",(0,a.jsx)(e.h2,{id:"use-the-langwatch-evaluator",children:"Use the LangWatch Evaluator"}),"\n",(0,a.jsxs)(e.p,{children:["In your flows, you can use the ",(0,a.jsx)(e.strong,{children:"LangWatch Evaluator"})," component to use LangWatch's evaluation endpoints to assess a model's performance."]}),"\n",(0,a.jsxs)(e.p,{children:["This component is available in the ",(0,a.jsx)(e.strong,{children:"LangWatch"})," bundle in the ",(0,a.jsx)(e.strong,{children:"Components"})," menu.\nFor more information, see ",(0,a.jsx)(e.a,{href:"/components-bundle-components",children:"Bundles"}),"."]})]})}function p(n={}){const{wrapper:e}={...(0,r.R)(),...n.components};return e?(0,a.jsx)(e,{...n,children:(0,a.jsx)(u,{...n})}):u(n)}function f(n,e){throw new Error("Expected "+(e?"component":"object")+" `"+n+"` to be defined: you likely forgot to import, pass, or provide it.")}},97423:(n,e,t)=>{t.d(e,{A:()=>o});const o=t.p+"assets/images/langwatch-dashboard-5f33bb25bb4d9022e08a4dab2592ca86.png"}}]); \ No newline at end of file +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[2089],{28453:(n,e,t)=>{t.d(e,{R:()=>i,x:()=>s});var o=t(96540);const a={},r=o.createContext(a);function i(n){const e=o.useContext(r);return o.useMemo(function(){return"function"==typeof n?n(e):{...e,...n}},[e,n])}function s(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(a):n.components||a:i(n.components),o.createElement(r.Provider,{value:e},n.children)}},74386:(n,e,t)=>{t.r(e),t.d(e,{CH:()=>d,assets:()=>l,chCodeConfig:()=>h,contentTitle:()=>c,default:()=>p,frontMatter:()=>s,metadata:()=>o,toc:()=>g});const o=JSON.parse('{"id":"Integrations/integrations-langwatch","title":"LangWatch","description":"LangWatch is an all-in-one LLMOps platform for monitoring, observability, analytics, evaluations and alerting for getting user insights and improve your LLM workflows.","source":"@site/docs/Integrations/integrations-langwatch.mdx","sourceDirName":"Integrations","slug":"/integrations-langwatch","permalink":"/integrations-langwatch","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"LangWatch","slug":"/integrations-langwatch"},"sidebar":"docs","previous":{"title":"LangSmith","permalink":"/integrations-langsmith"},"next":{"title":"Opik","permalink":"/integrations-opik"}}');var a=t(74848),r=t(28453),i=t(24754);const s={title:"LangWatch",slug:"/integrations-langwatch"},c=void 0,l={},d={annotations:i.hk,Code:i.Cy},h={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},g=[{value:"Integrate LangWatch observability",id:"integrate-langwatch-observability",level:2},{value:"Use the LangWatch Evaluator",id:"use-the-langwatch-evaluator",level:2}];function u(n){const e={a:"a",code:"code",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",...(0,r.R)(),...n.components};return d||f("CH",!1),d.Code||f("CH.Code",!0),(0,a.jsxs)(a.Fragment,{children:[(0,a.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,a.jsxs)(e.p,{children:[(0,a.jsx)(e.a,{href:"https://app.langwatch.ai/",children:"LangWatch"})," is an all-in-one LLMOps platform for monitoring, observability, analytics, evaluations and alerting for getting user insights and improve your LLM workflows."]}),"\n",(0,a.jsx)(e.h2,{id:"integrate-langwatch-observability",children:"Integrate LangWatch observability"}),"\n",(0,a.jsx)(e.p,{children:"To integrate with Langflow, add your LangWatch API key as a Langflow environment variable:"}),"\n",(0,a.jsxs)(e.ol,{children:["\n",(0,a.jsxs)(e.li,{children:["\n",(0,a.jsx)(e.p,{children:"Get a LangWatch API key from your LangWatch account."}),"\n"]}),"\n",(0,a.jsxs)(e.li,{children:["\n",(0,a.jsxs)(e.p,{children:["Add the key to your Langflow ",(0,a.jsx)(e.code,{children:".env"})," file:"]}),"\n",(0,a.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"LANGWATCH_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"API_KEY_STRING"',props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]}),"\n",(0,a.jsx)(e.p,{children:"Alternatively, you can set the environment variable in your terminal session:"}),"\n",(0,a.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"export",props:{style:{color:"#FF7B72"}}},{content:" LANGWATCH_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"API_KEY_STRING"',props:{style:{color:"#A5D6FF"}}}]}],lang:"shell"},annotations:[]}]}),"\n"]}),"\n",(0,a.jsxs)(e.li,{children:["\n",(0,a.jsxs)(e.p,{children:["Restart Langflow with your ",(0,a.jsx)(e.code,{children:".env"})," file, if you modified the Langflow ",(0,a.jsx)(e.code,{children:".env"}),":"]}),"\n",(0,a.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"langflow run --env-file .env",props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n",(0,a.jsxs)(e.li,{children:["\n",(0,a.jsx)(e.p,{children:"Run a flow."}),"\n"]}),"\n",(0,a.jsxs)(e.li,{children:["\n",(0,a.jsx)(e.p,{children:"View the LangWatch dashboard for monitoring and observability."}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(e.p,{children:(0,a.jsx)(e.img,{alt:"LangWatch dashboard",src:t(97423).A+"",width:"1987",height:"1032"})}),"\n",(0,a.jsx)(e.h2,{id:"use-the-langwatch-evaluator",children:"Use the LangWatch Evaluator"}),"\n",(0,a.jsxs)(e.p,{children:["In your flows, you can use the ",(0,a.jsx)(e.strong,{children:"LangWatch Evaluator"})," component to use LangWatch's evaluation endpoints to assess a model's performance.\nThis component is available in the ",(0,a.jsx)(e.strong,{children:"LangWatch"})," ",(0,a.jsx)(e.a,{href:"/components-bundle-components",children:"bundle"}),"."]})]})}function p(n={}){const{wrapper:e}={...(0,r.R)(),...n.components};return e?(0,a.jsx)(e,{...n,children:(0,a.jsx)(u,{...n})}):u(n)}function f(n,e){throw new Error("Expected "+(e?"component":"object")+" `"+n+"` to be defined: you likely forgot to import, pass, or provide it.")}},97423:(n,e,t)=>{t.d(e,{A:()=>o});const o=t.p+"assets/images/langwatch-dashboard-5f33bb25bb4d9022e08a4dab2592ca86.png"}}]); \ No newline at end of file diff --git a/assets/js/ad42ff54.64d37952.js b/assets/js/ad42ff54.64d37952.js new file mode 100644 index 0000000000..20772f9ba4 --- /dev/null +++ b/assets/js/ad42ff54.64d37952.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[5757],{11663:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>d,default:()=>p,frontMatter:()=>i,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"Components/bundles-novita","title":"Novita","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-novita.mdx","sourceDirName":"Components","slug":"/bundles-novita","permalink":"/bundles-novita","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Novita","slug":"/bundles-novita"},"sidebar":"docs","previous":{"title":"Notion Meeting Notes Agent","permalink":"/integrations/notion/notion-agent-meeting-notes"},"next":{"title":"NVIDIA components","permalink":"/bundles-nvidia"}}');var r=t(74848),o=t(28453),a=(t(17886),t(31929));const i={title:"Novita",slug:"/bundles-novita"},d=void 0,l={},c=[{value:"Novita AI",id:"novita-ai",level:2},{value:"Novita AI parameters",id:"novita-ai-parameters",level:3},...a.RM];function h(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,r.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,r.jsx)(n.strong,{children:"Novita"})," bundle."]}),"\n",(0,r.jsx)(n.h2,{id:"novita-ai",children:"Novita AI"}),"\n",(0,r.jsxs)(n.p,{children:["This component generates text using ",(0,r.jsx)(n.a,{href:"https://novita.ai/docs/guides/llm-api",children:"Novita's language models"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["It can output either a ",(0,r.jsx)(n.strong,{children:"Model Response"})," (",(0,r.jsx)(n.a,{href:"/data-types#message",children:(0,r.jsx)(n.code,{children:"Message"})}),") or a ",(0,r.jsx)(n.strong,{children:"Language Model"})," (",(0,r.jsx)(n.a,{href:"/data-types#languagemodel",children:(0,r.jsx)(n.code,{children:"LanguageModel"})}),")."]}),"\n",(0,r.jsxs)(n.p,{children:["Use the ",(0,r.jsx)(n.strong,{children:"Language Model"})," output when you want to use a Novita model as the LLM for another LLM-driven component, such as a ",(0,r.jsx)(n.strong,{children:"Language Model"})," or ",(0,r.jsx)(n.strong,{children:"Smart Function"})," component."]}),"\n",(0,r.jsxs)(n.p,{children:["For more information, see ",(0,r.jsxs)(n.a,{href:"/components-models",children:[(0,r.jsx)(n.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"novita-ai-parameters",children:"Novita AI parameters"}),"\n",(0,r.jsx)(a.Ay,{}),"\n",(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:"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:"api_key"}),(0,r.jsx)(n.td,{children:"SecretString"}),(0,r.jsx)(n.td,{children:"Input parameter. Your Novita AI API Key."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"model"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:"Input parameter. The id of the Novita AI model to use."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"max_tokens"}),(0,r.jsx)(n.td,{children:"Integer"}),(0,r.jsx)(n.td,{children:"Input parameter. The maximum number of tokens to generate. Set to 0 for unlimited tokens."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"temperature"}),(0,r.jsx)(n.td,{children:"Float"}),(0,r.jsx)(n.td,{children:"Input parameter. Controls randomness in the output. Range: [0.0, 1.0]. Default: 0.7."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"top_p"}),(0,r.jsx)(n.td,{children:"Float"}),(0,r.jsx)(n.td,{children:"Input parameter. Controls the nucleus sampling. Range: [0.0, 1.0]. Default: 1.0."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"frequency_penalty"}),(0,r.jsx)(n.td,{children:"Float"}),(0,r.jsx)(n.td,{children:"Input parameter. Controls the frequency penalty. Range: [0.0, 2.0]. Default: 0.0."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"presence_penalty"}),(0,r.jsx)(n.td,{children:"Float"}),(0,r.jsx)(n.td,{children:"Input parameter. Controls the presence penalty. Range: [0.0, 2.0]. Default: 0.0."})]})]})]})]})}function p(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},17886:(e,n,t)=>{t.d(n,{A:()=>o});t(96540);var s=t(64058),r=t(74848);function o({name:e,...n}){const t=s[e];return t?(0,r.jsx)(t,{...n}):null}},31929:(e,n,t)=>{t.d(n,{Ay:()=>d,RM:()=>a});var s=t(74848),r=t(28453),o=t(17886);const a=[];function i(e){const n={a:"a",p:"p",strong:"strong",...(0,r.R)(),...e.components};return(0,s.jsxs)(n.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,s.jsx)(o.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Controls"})," in the ",(0,s.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function d(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(i,{...e})}):i(e)}}}]); \ No newline at end of file diff --git a/assets/js/ad42ff54.efbc375f.js b/assets/js/ad42ff54.efbc375f.js deleted file mode 100644 index d1723f56d4..0000000000 --- a/assets/js/ad42ff54.efbc375f.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[5757],{11663:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>d,default:()=>p,frontMatter:()=>i,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"Components/bundles-novita","title":"Novita","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-novita.mdx","sourceDirName":"Components","slug":"/bundles-novita","permalink":"/bundles-novita","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Novita","slug":"/bundles-novita"},"sidebar":"docs","previous":{"title":"Notion Meeting Notes Agent","permalink":"/integrations/notion/notion-agent-meeting-notes"},"next":{"title":"NVIDIA components","permalink":"/bundles-nvidia"}}');var r=n(74848),o=n(28453),a=n(17886);const i={title:"Novita",slug:"/bundles-novita"},d=void 0,l={},c=[{value:"Novita AI",id:"novita-ai",level:2},{value:"Novita AI parameters",id:"novita-ai-parameters",level:3}];function h(e){const t={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,o.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(t.p,{children:[(0,r.jsx)(t.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,r.jsxs)(t.p,{children:["This page describes the components that are available in the ",(0,r.jsx)(t.strong,{children:"Novita"})," bundle."]}),"\n",(0,r.jsx)(t.h2,{id:"novita-ai",children:"Novita AI"}),"\n",(0,r.jsxs)(t.p,{children:["This component generates text using ",(0,r.jsx)(t.a,{href:"https://novita.ai/docs/guides/llm-api",children:"Novita's language models"}),"."]}),"\n",(0,r.jsxs)(t.p,{children:["It can output either a ",(0,r.jsx)(t.strong,{children:"Model Response"})," (",(0,r.jsx)(t.a,{href:"/data-types#message",children:(0,r.jsx)(t.code,{children:"Message"})}),") or a ",(0,r.jsx)(t.strong,{children:"Language Model"})," (",(0,r.jsx)(t.a,{href:"/data-types#languagemodel",children:(0,r.jsx)(t.code,{children:"LanguageModel"})}),")."]}),"\n",(0,r.jsxs)(t.p,{children:["Use the ",(0,r.jsx)(t.strong,{children:"Language Model"})," output when you want to use a Novita model as the LLM for another LLM-driven component, such as a ",(0,r.jsx)(t.strong,{children:"Language Model"})," or ",(0,r.jsx)(t.strong,{children:"Smart Function"})," component."]}),"\n",(0,r.jsxs)(t.p,{children:["For more information, see ",(0,r.jsxs)(t.a,{href:"/components-models",children:[(0,r.jsx)(t.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,r.jsx)(t.h3,{id:"novita-ai-parameters",children:"Novita AI parameters"}),"\n",(0,r.jsxs)(t.p,{children:["Many ",(0,r.jsx)(t.strong,{children:"Novita AI"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,r.jsx)(a.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Controls"})," in the ",(0,r.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\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:"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:"api_key"}),(0,r.jsx)(t.td,{children:"SecretString"}),(0,r.jsx)(t.td,{children:"Input parameter. Your Novita AI API Key."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"model"}),(0,r.jsx)(t.td,{children:"String"}),(0,r.jsx)(t.td,{children:"Input parameter. The id of the Novita AI model to use."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"max_tokens"}),(0,r.jsx)(t.td,{children:"Integer"}),(0,r.jsx)(t.td,{children:"Input parameter. The maximum number of tokens to generate. Set to 0 for unlimited tokens."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"temperature"}),(0,r.jsx)(t.td,{children:"Float"}),(0,r.jsx)(t.td,{children:"Input parameter. Controls randomness in the output. Range: [0.0, 1.0]. Default: 0.7."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"top_p"}),(0,r.jsx)(t.td,{children:"Float"}),(0,r.jsx)(t.td,{children:"Input parameter. Controls the nucleus sampling. Range: [0.0, 1.0]. Default: 1.0."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"frequency_penalty"}),(0,r.jsx)(t.td,{children:"Float"}),(0,r.jsx)(t.td,{children:"Input parameter. Controls the frequency penalty. Range: [0.0, 2.0]. Default: 0.0."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"presence_penalty"}),(0,r.jsx)(t.td,{children:"Float"}),(0,r.jsx)(t.td,{children:"Input parameter. Controls the presence penalty. Range: [0.0, 2.0]. Default: 0.0."})]})]})]})]})}function p(e={}){const{wrapper:t}={...(0,o.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},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}}}]); \ No newline at end of file diff --git a/assets/js/ae70dfbf.cb14c9cb.js b/assets/js/ae70dfbf.cb14c9cb.js deleted file mode 100644 index 5ed2c6bb9a..0000000000 --- a/assets/js/ae70dfbf.cb14c9cb.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[126],{17886:(e,n,t)=>{t.d(n,{A:()=>c});t(96540);var s=t(64058),r=t(74848);function c({name:e,...n}){const t=s[e];return t?(0,r.jsx)(t,{...n}):null}},70043:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>i,default:()=>u,frontMatter:()=>d,metadata:()=>s,toc:()=>o});const s=JSON.parse('{"id":"Components/bundles-duckduckgo","title":"DuckDuckGo","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-duckduckgo.mdx","sourceDirName":"Components","slug":"/bundles-duckduckgo","permalink":"/bundles-duckduckgo","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"DuckDuckGo","slug":"/bundles-duckduckgo"},"sidebar":"docs","previous":{"title":"Docling","permalink":"/integrations-docling"},"next":{"title":"Exa","permalink":"/bundles-exa"}}');var r=t(74848),c=t(28453),a=t(17886);const d={title:"DuckDuckGo",slug:"/bundles-duckduckgo"},i=void 0,l={},o=[{value:"DuckDuckGo Search",id:"duckduckgo-search",level:2},{value:"DuckDuckGo Search parameters",id:"duckduckgo-search-parameters",level:3},{value:"See also",id:"see-also",level:2}];function h(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,c.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,r.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,r.jsx)(n.strong,{children:"DuckDuckGo"})," bundle."]}),"\n",(0,r.jsx)(n.h2,{id:"duckduckgo-search",children:"DuckDuckGo Search"}),"\n",(0,r.jsxs)(n.p,{children:["This component performs web searches using the ",(0,r.jsx)(n.a,{href:"https://www.duckduckgo.com",children:"DuckDuckGo"})," search engine with result-limiting capabilities."]}),"\n",(0,r.jsxs)(n.p,{children:["It outputs a list of search results as a ",(0,r.jsx)(n.a,{href:"/data-types#dataframe",children:(0,r.jsx)(n.code,{children:"DataFrame"})})," with a ",(0,r.jsx)(n.code,{children:"text"})," key containing the search results as a single string."]}),"\n",(0,r.jsx)(n.h3,{id:"duckduckgo-search-parameters",children:"DuckDuckGo Search parameters"}),"\n",(0,r.jsxs)(n.p,{children:["Some ",(0,r.jsx)(n.strong,{children:"DuckDuckGo Search"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,r.jsx)(a.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Controls"})," in the ",(0,r.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(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:"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:"input_value"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:"Input parameter. The search query to execute with DuckDuckGo."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"max_results"}),(0,r.jsx)(n.td,{children:"Integer"}),(0,r.jsx)(n.td,{children:"Input parameter. The maximum number of search results to return. Default: 5."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"max_snippet_length"}),(0,r.jsx)(n.td,{children:"Integer"}),(0,r.jsx)(n.td,{children:"Input parameter. The maximum length of each result snippet. Default: 100."})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"see-also",children:"See also"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsxs)(n.a,{href:"/components-data#web-search",children:[(0,r.jsx)(n.strong,{children:"Web Search"})," component"]})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsxs)(n.a,{href:"/bundles-searchapi",children:[(0,r.jsx)(n.strong,{children:"SearchApi"})," bundle"]})}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,c.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}}}]); \ No newline at end of file diff --git a/assets/js/ae70dfbf.f4f9387d.js b/assets/js/ae70dfbf.f4f9387d.js new file mode 100644 index 0000000000..16133e40aa --- /dev/null +++ b/assets/js/ae70dfbf.f4f9387d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[126],{17886:(e,n,s)=>{s.d(n,{A:()=>c});s(96540);var t=s(64058),r=s(74848);function c({name:e,...n}){const s=t[e];return s?(0,r.jsx)(s,{...n}):null}},31929:(e,n,s)=>{s.d(n,{Ay:()=>i,RM:()=>a});var t=s(74848),r=s(28453),c=s(17886);const a=[];function d(e){const n={a:"a",p:"p",strong:"strong",...(0,r.R)(),...e.components};return(0,t.jsxs)(n.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,t.jsx)(c.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"Controls"})," in the ",(0,t.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function i(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(d,{...e})}):d(e)}},70043:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>o,contentTitle:()=>i,default:()=>u,frontMatter:()=>d,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"Components/bundles-duckduckgo","title":"DuckDuckGo","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-duckduckgo.mdx","sourceDirName":"Components","slug":"/bundles-duckduckgo","permalink":"/bundles-duckduckgo","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"DuckDuckGo","slug":"/bundles-duckduckgo"},"sidebar":"docs","previous":{"title":"Docling","permalink":"/integrations-docling"},"next":{"title":"Exa","permalink":"/bundles-exa"}}');var r=s(74848),c=s(28453),a=(s(17886),s(31929));const d={title:"DuckDuckGo",slug:"/bundles-duckduckgo"},i=void 0,o={},l=[{value:"DuckDuckGo Search",id:"duckduckgo-search",level:2},{value:"DuckDuckGo Search parameters",id:"duckduckgo-search-parameters",level:3},...a.RM,{value:"See also",id:"see-also",level:2}];function h(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,c.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,r.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,r.jsx)(n.strong,{children:"DuckDuckGo"})," bundle."]}),"\n",(0,r.jsx)(n.h2,{id:"duckduckgo-search",children:"DuckDuckGo Search"}),"\n",(0,r.jsxs)(n.p,{children:["This component performs web searches using the ",(0,r.jsx)(n.a,{href:"https://www.duckduckgo.com",children:"DuckDuckGo"})," search engine with result-limiting capabilities."]}),"\n",(0,r.jsxs)(n.p,{children:["It outputs a list of search results as a ",(0,r.jsx)(n.a,{href:"/data-types#dataframe",children:(0,r.jsx)(n.code,{children:"DataFrame"})})," with a ",(0,r.jsx)(n.code,{children:"text"})," key containing the search results as a single string."]}),"\n",(0,r.jsx)(n.h3,{id:"duckduckgo-search-parameters",children:"DuckDuckGo Search parameters"}),"\n",(0,r.jsx)(a.Ay,{}),"\n",(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:"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:"input_value"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:"Input parameter. The search query to execute with DuckDuckGo."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"max_results"}),(0,r.jsx)(n.td,{children:"Integer"}),(0,r.jsx)(n.td,{children:"Input parameter. The maximum number of search results to return. Default: 5."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"max_snippet_length"}),(0,r.jsx)(n.td,{children:"Integer"}),(0,r.jsx)(n.td,{children:"Input parameter. The maximum length of each result snippet. Default: 100."})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"see-also",children:"See also"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsxs)(n.a,{href:"/components-data#web-search",children:[(0,r.jsx)(n.strong,{children:"Web Search"})," component"]})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsxs)(n.a,{href:"/bundles-searchapi",children:[(0,r.jsx)(n.strong,{children:"SearchApi"})," bundle"]})}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,c.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}}}]); \ No newline at end of file diff --git a/assets/js/b079b393.5a8d148c.js b/assets/js/b079b393.5a8d148c.js deleted file mode 100644 index 573b4c06d4..0000000000 --- a/assets/js/b079b393.5a8d148c.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),l=t(56347),c=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,l.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),[l,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}),m=(()=>{const o=a??D;return u({value:o,tabValues:r})?o:null})();(0,c.A)(()=>{m&&p(m)},[m]);return{selectedValue:l,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 m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=t(74848);function f({className:o,block:e,selectedValue:t,selectValue:n,tabValues:l}){const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,r.a_)(),a=o=>{const e=o.currentTarget,s=c.indexOf(e),r=l[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=c.indexOf(o.currentTarget)+1;e=c[t]??c[0];break}case"ArrowLeft":{const t=c.indexOf(o.currentTarget)-1;e=c[t]??c[c.length-1];break}}e?.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":e},o),children:l.map(({value:o,label:e,attributes:n})=>(0,g.jsx)("li",{role:"tab",tabIndex:t===o?0:-1,"aria-selected":t===o,ref:o=>{c.push(o)},onKeyDown:i,onClick:a,...n,className:(0,s.A)("tabs__item",m.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,g.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,g.jsxs)("div",{className:(0,s.A)("tabs-container",m.tabList),children:[(0,g.jsx)(f,{...e,...o}),(0,g.jsx)(x,{...e,...o})]})}function j(o){const e=(0,F.A)();return(0,g.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:()=>l});t(96540);var n=t(18215);const s={tabItem:"tabItem_Ymn6"};var r=t(74848);function l({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),l=t(24754),c=t(17886);t(11470),t(19365);const p={title:"Connect applications to agents",slug:"/agent-tutorial"},a=void 0,i={},d={annotations:l.hk,Code:l.Cy},h={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},u=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Create an agent flow",id:"create-an-agent-flow",level:2},{value:"Add a Prompt Template component to the flow",id:"add-a-prompt-template-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 ",(0,s.jsx)(e.a,{href:"/agents",children:"Langflow agent"}),"."]}),"\n",(0,s.jsx)(e.p,{children:"With an agent, 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:"Install and start Langflow"})}),"\n",(0,s.jsxs)(e.li,{children:["Create a ",(0,s.jsx)(e.a,{href:"/api-keys-and-authentication",children:"Langflow API key"})]}),"\n",(0,s.jsxs)(e.li,{children:["Install the ",(0,s.jsx)(e.a,{href:"/typescript-client",children:"Langflow JavaScript client"})]}),"\n",(0,s.jsxs)(e.li,{children:["Create an ",(0,s.jsx)(e.a,{href:"https://platform.openai.com/api-keys",children:"OpenAI API key"})]}),"\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-agent-flow",children:"Create an agent flow"}),"\n",(0,s.jsxs)(e.p,{children:["The following steps modify the ",(0,s.jsx)(e.strong,{children:"Simple Agent"})," template to connect a ",(0,s.jsxs)(e.a,{href:"/components-data#directory",children:[(0,s.jsx)(e.strong,{children:"Directory"})," component"]})," and a ",(0,s.jsxs)(e.a,{href:"/components-data#web-search",children:[(0,s.jsx)(e.strong,{children:"Web Search"})," component"]})," 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 add ",(0,s.jsx)(e.strong,{children:"Directory"})," and ",(0,s.jsx)(e.strong,{children:"Web Search"})," components to your flow."]}),"\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.strong,{children:"Directory"})," and ",(0,s.jsx)(e.strong,{children:"Web Search"})," ",(0,s.jsx)(e.a,{href:"/concepts-components#component-menus",children:"components' header menus"}),", 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:["Connect the ",(0,s.jsx)(e.strong,{children:"Directory"})," and ",(0,s.jsx)(e.strong,{children:"Web Search"})," components' ",(0,s.jsx)(e.strong,{children:"Toolset"})," ports to the ",(0,s.jsx)(e.strong,{children:"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)(c.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-template-component-to-the-flow",children:"Add a Prompt Template component to the flow"}),"\n",(0,s.jsxs)(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 ",(0,s.jsx)(e.strong,{children:"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.jsxs)(e.a,{href:"/components-prompts",children:[(0,s.jsx)(e.strong,{children:"Prompt Template"})," component"]})," to your flow between the ",(0,s.jsx)(e.strong,{children:"Chat Input"})," and ",(0,s.jsx)(e.strong,{children:"Agent"})," components."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["In the ",(0,s.jsx)(e.strong,{children:"Prompt Template"})," 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 Template"})," 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 ",(0,s.jsx)(e.strong,{children:"Chat Input"})," component is connected to the ",(0,s.jsx)(e.strong,{children:"Prompt Template"})," component's ",(0,s.jsx)(e.strong,{children:"email"})," input port. Then, the ",(0,s.jsx)(e.strong,{children:"Prompt Template"})," component's output is connected to the ",(0,s.jsx)(e.strong,{children:"Agent"})," component's ",(0,s.jsx)(e.strong,{children:"System Message"})," input port. The ",(0,s.jsx)(e.strong,{children:"Directory"})," and ",(0,s.jsx)(e.strong,{children:"Web Search"})," components are connected to the ",(0,s.jsx)(e.strong,{children:"Agent"})," component's ",(0,s.jsx)(e.strong,{children:"Tools"})," port. Finally, the ",(0,s.jsx)(e.strong,{children:"Agent"})," component's output is connected to the ",(0,s.jsx)(e.strong,{children:"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 as tools",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 ",(0,s.jsx)(e.a,{href:"/api-keys-and-authentication",children:"Langflow API key"}),"."]}),"\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."}),"\n",(0,s.jsx)(e.p,{children:"Your 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,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(e.p,{children:"The following is an example response 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 are 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.77fcc6f2.js b/assets/js/b079b393.77fcc6f2.js new file mode 100644 index 0000000000..48133ffb36 --- /dev/null +++ b/assets/js/b079b393.77fcc6f2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[3240],{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}},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:()=>a,chCodeConfig:()=>h,contentTitle:()=>i,default:()=>F,frontMatter:()=>p,metadata:()=>n,toc:()=>y});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);const p={title:"Connect applications to agents",slug:"/agent-tutorial"},i=void 0,a={},d={annotations:c.hk,Code:c.Cy},h={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},y=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Create an agent flow",id:"create-an-agent-flow",level:2},{value:"Add a Prompt Template component to the flow",id:"add-a-prompt-template-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 D(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||u("CH",!1),d.Code||u("CH.Code",!0),n||u("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 ",(0,s.jsx)(e.a,{href:"/agents",children:"Langflow agent"}),"."]}),"\n",(0,s.jsx)(e.p,{children:"With an agent, 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:"Install and start Langflow"})}),"\n",(0,s.jsxs)(e.li,{children:["Create a ",(0,s.jsx)(e.a,{href:"/api-keys-and-authentication",children:"Langflow API key"})]}),"\n",(0,s.jsxs)(e.li,{children:["Install the ",(0,s.jsx)(e.a,{href:"/typescript-client",children:"Langflow JavaScript client"})]}),"\n",(0,s.jsxs)(e.li,{children:["Create an ",(0,s.jsx)(e.a,{href:"https://platform.openai.com/api-keys",children:"OpenAI API key"})]}),"\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-agent-flow",children:"Create an agent flow"}),"\n",(0,s.jsxs)(e.p,{children:["The following steps modify the ",(0,s.jsx)(e.strong,{children:"Simple Agent"})," template to connect a ",(0,s.jsxs)(e.a,{href:"/components-data#directory",children:[(0,s.jsx)(e.strong,{children:"Directory"})," component"]})," and a ",(0,s.jsxs)(e.a,{href:"/components-data#web-search",children:[(0,s.jsx)(e.strong,{children:"Web Search"})," component"]})," 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 add ",(0,s.jsx)(e.strong,{children:"Directory"})," and ",(0,s.jsx)(e.strong,{children:"Web Search"})," components to your flow."]}),"\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.strong,{children:"Directory"})," and ",(0,s.jsx)(e.strong,{children:"Web Search"})," ",(0,s.jsx)(e.a,{href:"/concepts-components#component-menus",children:"components' header menus"}),", 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:["Connect the ",(0,s.jsx)(e.strong,{children:"Directory"})," and ",(0,s.jsx)(e.strong,{children:"Web Search"})," components' ",(0,s.jsx)(e.strong,{children:"Toolset"})," ports to the ",(0,s.jsx)(e.strong,{children:"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-template-component-to-the-flow",children:"Add a Prompt Template component to the flow"}),"\n",(0,s.jsxs)(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 ",(0,s.jsx)(e.strong,{children:"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.jsxs)(e.a,{href:"/components-prompts",children:[(0,s.jsx)(e.strong,{children:"Prompt Template"})," component"]})," to your flow between the ",(0,s.jsx)(e.strong,{children:"Chat Input"})," and ",(0,s.jsx)(e.strong,{children:"Agent"})," components."]}),"\n"]}),"\n",(0,s.jsxs)(e.li,{children:["\n",(0,s.jsxs)(e.p,{children:["In the ",(0,s.jsx)(e.strong,{children:"Prompt Template"})," 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 Template"})," 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 ",(0,s.jsx)(e.strong,{children:"Chat Input"})," component is connected to the ",(0,s.jsx)(e.strong,{children:"Prompt Template"})," component's ",(0,s.jsx)(e.strong,{children:"email"})," input port. Then, the ",(0,s.jsx)(e.strong,{children:"Prompt Template"})," component's output is connected to the ",(0,s.jsx)(e.strong,{children:"Agent"})," component's ",(0,s.jsx)(e.strong,{children:"System Message"})," input port. The ",(0,s.jsx)(e.strong,{children:"Directory"})," and ",(0,s.jsx)(e.strong,{children:"Web Search"})," components are connected to the ",(0,s.jsx)(e.strong,{children:"Agent"})," component's ",(0,s.jsx)(e.strong,{children:"Tools"})," port. Finally, the ",(0,s.jsx)(e.strong,{children:"Agent"})," component's output is connected to the ",(0,s.jsx)(e.strong,{children:"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 as tools",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 ",(0,s.jsx)(e.a,{href:"/api-keys-and-authentication",children:"Langflow API key"}),"."]}),"\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."}),"\n",(0,s.jsx)(e.p,{children:"Your 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,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(e.p,{children:"The following is an example response 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 are 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 F(o={}){const{wrapper:e}={...(0,r.R)(),...o.components};return e?(0,s.jsx)(e,{...o,children:(0,s.jsx)(D,{...o})}):D(o)}function u(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/b796be74.207b4d64.js b/assets/js/b796be74.207b4d64.js deleted file mode 100644 index 880c464c15..0000000000 --- a/assets/js/b796be74.207b4d64.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[9781],{17886:(e,t,n)=>{n.d(t,{A:()=>i});n(96540);var r=n(64058),s=n(74848);function i({name:e,...t}){const n=r[e];return n?(0,s.jsx)(n,{...t}):null}},74215:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>d,contentTitle:()=>l,default:()=>o,frontMatter:()=>a,metadata:()=>r,toc:()=>h});const r=JSON.parse('{"id":"Components/bundles-langchain","title":"LangChain","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-langchain.mdx","sourceDirName":"Components","slug":"/bundles-langchain","permalink":"/bundles-langchain","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"LangChain","slug":"/bundles-langchain"},"sidebar":"docs","previous":{"title":"Icosa Computing","permalink":"/bundles-icosacomputing"},"next":{"title":"LM Studio","permalink":"/bundles-lmstudio"}}');var s=n(74848),i=n(28453);n(17886);const a={title:"LangChain",slug:"/bundles-langchain"},l=void 0,d={},h=[{value:"CSV Agent",id:"csv-agent",level:2},{value:"CSV Agent parameters",id:"csv-agent-parameters",level:3},{value:"OpenAI Tools Agent",id:"openai-tools-agent",level:2},{value:"OpenAI Tools Agent parameters",id:"openai-tools-agent-parameters",level:3},{value:"OpenAPI Agent",id:"openapi-agent",level:2},{value:"OpenAPI Agent parameters",id:"openapi-agent-parameters",level:3},{value:"Prompt Hub",id:"prompt-hub",level:2},{value:"Prompt Hub parameters",id:"prompt-hub-parameters",level:3},{value:"SQL Agent",id:"sql-agent",level:2},{value:"SQL Agent parameters",id:"sql-agent-parameters",level:3},{value:"SQL Database",id:"sql-database",level:2},{value:"Text Splitters",id:"text-splitters",level:2},{value:"Tool Calling Agent",id:"tool-calling-agent",level:2},{value:"Tool Calling Agent parameters",id:"tool-calling-agent-parameters",level:3},{value:"XML Agent",id:"xml-agent",level:2},{value:"XML Agent parameters",id:"xml-agent-parameters",level:3},{value:"Other LangChain components",id:"other-langchain-components",level:2},{value:"Legacy LangChain components",id:"legacy-langchain-components",level:2}];function c(e){const t={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components},{Details:n}=t;return n||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,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,s.jsxs)(t.p,{children:["This page describes the components that are available in the ",(0,s.jsx)(t.strong,{children:"LangChain"})," bundle."]}),"\n",(0,s.jsx)(t.h2,{id:"csv-agent",children:"CSV Agent"}),"\n",(0,s.jsxs)(t.p,{children:["This component is based on the ",(0,s.jsxs)(t.a,{href:"/agents",children:[(0,s.jsx)(t.strong,{children:"Agent"})," core component"]}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["This component creates a CSV agent from a CSV file and LLM.\nFor more information, see the ",(0,s.jsx)(t.a,{href:"https://python.langchain.com/api_reference/experimental/agents/langchain_experimental.agents.agent_toolkits.csv.base.create_csv_agent.html",children:"LangChain CSV agent documentation"}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"csv-agent-parameters",children:"CSV Agent parameters"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Type"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"llm"}),(0,s.jsx)(t.td,{children:"LanguageModel"}),(0,s.jsx)(t.td,{children:"Input parameter. The language model to use for the agent."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"path"}),(0,s.jsx)(t.td,{children:"File"}),(0,s.jsx)(t.td,{children:"Input parameter. The path to the CSV file."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"agent_type"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsx)(t.td,{children:"Input parameter. The type of agent to create."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"agent"}),(0,s.jsx)(t.td,{children:"AgentExecutor"}),(0,s.jsx)(t.td,{children:"Output parameter. The CSV agent instance."})]})]})]}),"\n",(0,s.jsx)(t.h2,{id:"openai-tools-agent",children:"OpenAI Tools Agent"}),"\n",(0,s.jsxs)(t.p,{children:["This component is based on the ",(0,s.jsxs)(t.a,{href:"/agents",children:[(0,s.jsx)(t.strong,{children:"Agent"})," core component"]}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["This component creates an OpenAI Tools Agent.\nFor more information, see the ",(0,s.jsx)(t.a,{href:"https://api.python.langchain.com/en/latest/agents/langchain.agents.openai_functions_agent.base.create_openai_functions_agent.html",children:"LangChain OpenAI agent documentation"}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"openai-tools-agent-parameters",children:"OpenAI Tools Agent parameters"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Type"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"llm"}),(0,s.jsx)(t.td,{children:"LanguageModel"}),(0,s.jsx)(t.td,{children:"Input parameter. The language model to use."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"tools"}),(0,s.jsx)(t.td,{children:"List of Tools"}),(0,s.jsx)(t.td,{children:"Input parameter. The tools to give the agent access to."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"system_prompt"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsx)(t.td,{children:"Input parameter. The system prompt to provide context to the agent."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"input_value"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsx)(t.td,{children:"Input parameter. The user's input to the agent."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"memory"}),(0,s.jsx)(t.td,{children:"Memory"}),(0,s.jsx)(t.td,{children:"Input parameter. The memory for the agent to use for context persistence."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"max_iterations"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsx)(t.td,{children:"Input parameter. The maximum number of iterations to allow the agent to execute."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"verbose"}),(0,s.jsx)(t.td,{children:"Boolean"}),(0,s.jsx)(t.td,{children:"Input parameter. This determines whether to print out the agent's intermediate steps."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"handle_parsing_errors"}),(0,s.jsx)(t.td,{children:"Boolean"}),(0,s.jsx)(t.td,{children:"Input parameter. This determines whether to handle parsing errors in the agent."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"agent"}),(0,s.jsx)(t.td,{children:"AgentExecutor"}),(0,s.jsx)(t.td,{children:"Output parameter. The OpenAI Tools agent instance."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"output"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsx)(t.td,{children:"Output parameter. The output from executing the agent on the input."})]})]})]}),"\n",(0,s.jsx)(t.h2,{id:"openapi-agent",children:"OpenAPI Agent"}),"\n",(0,s.jsxs)(t.p,{children:["This component is based on the ",(0,s.jsxs)(t.a,{href:"/agents",children:[(0,s.jsx)(t.strong,{children:"Agent"})," core component"]}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["This component creates an agent for interacting with OpenAPI services.\nFor more information, see the ",(0,s.jsx)(t.a,{href:"https://python.langchain.com/docs/integrations/tools/openapi/",children:"LangChain OpenAPI toolkit documentation"}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"openapi-agent-parameters",children:"OpenAPI Agent parameters"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Type"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"llm"}),(0,s.jsx)(t.td,{children:"LanguageModel"}),(0,s.jsx)(t.td,{children:"Input parameter. The language model to use."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"openapi_spec"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsx)(t.td,{children:"Input parameter. The OpenAPI specification for the service."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"base_url"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsx)(t.td,{children:"Input parameter. The base URL for the API."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"headers"}),(0,s.jsx)(t.td,{children:"Dict"}),(0,s.jsx)(t.td,{children:"Input parameter. The optional headers for API requests."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"agent_executor_kwargs"}),(0,s.jsx)(t.td,{children:"Dict"}),(0,s.jsx)(t.td,{children:"Input parameter. The optional parameters for the agent executor."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"agent"}),(0,s.jsx)(t.td,{children:"AgentExecutor"}),(0,s.jsx)(t.td,{children:"Output parameter.The OpenAPI agent instance."})]})]})]}),"\n",(0,s.jsx)(t.h2,{id:"prompt-hub",children:"Prompt Hub"}),"\n",(0,s.jsxs)(t.p,{children:["This component fetches prompts from the ",(0,s.jsx)(t.a,{href:"https://docs.smith.langchain.com/old/category/prompt-hub",children:"LangChain Hub"}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["Like the ",(0,s.jsxs)(t.a,{href:"/components-prompts",children:[(0,s.jsx)(t.strong,{children:"Prompt Template"})," core component"]}),", additional fields are added to the component for each variable in the prompt.\nFor example, the default prompt ",(0,s.jsx)(t.code,{children:"efriis/my-first-prompt"})," adds fields for ",(0,s.jsx)(t.code,{children:"profession"})," and ",(0,s.jsx)(t.code,{children:"question"}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"prompt-hub-parameters",children:"Prompt Hub parameters"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Display Name"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"langchain_api_key"}),(0,s.jsx)(t.td,{children:"Your LangChain API Key"}),(0,s.jsx)(t.td,{children:"Input parameter. The LangChain API Key to use."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"langchain_hub_prompt"}),(0,s.jsx)(t.td,{children:"LangChain Hub Prompt"}),(0,s.jsx)(t.td,{children:"Input parameter. The LangChain Hub prompt to use."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"prompt"}),(0,s.jsx)(t.td,{children:"Build Prompt"}),(0,s.jsxs)(t.td,{children:["Output parameter. The built prompt message returned by the ",(0,s.jsx)(t.code,{children:"build_prompt"})," method."]})]})]})]}),"\n",(0,s.jsx)(t.h2,{id:"sql-agent",children:"SQL Agent"}),"\n",(0,s.jsxs)(t.p,{children:["This component is based on the ",(0,s.jsxs)(t.a,{href:"/agents",children:[(0,s.jsx)(t.strong,{children:"Agent"})," core component"]}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["This component creates an agent for interacting with SQL databases.\nFor more information, see the ",(0,s.jsx)(t.a,{href:"https://python.langchain.com/docs/tutorials/sql_qa/",children:"LangChain SQL agent documentation"}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"sql-agent-parameters",children:"SQL Agent parameters"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Type"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"llm"}),(0,s.jsx)(t.td,{children:"LanguageModel"}),(0,s.jsx)(t.td,{children:"Input parameter. The language model to use."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"database"}),(0,s.jsx)(t.td,{children:"Database"}),(0,s.jsx)(t.td,{children:"Input parameter. The SQL database connection."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"top_k"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsx)(t.td,{children:"Input parameter. The number of results to return from a SELECT query."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"use_tools"}),(0,s.jsx)(t.td,{children:"Boolean"}),(0,s.jsx)(t.td,{children:"Input parameter. This determines whether to use tools for query execution."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"return_intermediate_steps"}),(0,s.jsx)(t.td,{children:"Boolean"}),(0,s.jsx)(t.td,{children:"Input parameter. This determines whether to return the agent's intermediate steps."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"max_iterations"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsx)(t.td,{children:"Input parameter. The maximum number of iterations to run the agent."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"max_execution_time"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsx)(t.td,{children:"Input parameter. The maximum execution time in seconds."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"early_stopping_method"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsx)(t.td,{children:"Input parameter. The method to use for early stopping."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"verbose"}),(0,s.jsx)(t.td,{children:"Boolean"}),(0,s.jsx)(t.td,{children:"Input parameter. This determines whether to print the agent's thoughts."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"agent"}),(0,s.jsx)(t.td,{children:"AgentExecutor"}),(0,s.jsx)(t.td,{children:"Output parameter. The SQL agent instance."})]})]})]}),"\n",(0,s.jsx)(t.h2,{id:"sql-database",children:"SQL Database"}),"\n",(0,s.jsxs)(t.p,{children:["The LangChain ",(0,s.jsx)(t.strong,{children:"SQL Database"})," component establishes a connection to an SQL database."]}),"\n",(0,s.jsxs)(t.p,{children:["This component is different from the ",(0,s.jsxs)(t.a,{href:"/components-data#sql-database",children:[(0,s.jsx)(t.strong,{children:"SQL Database"})," core component"]}),", which executes SQL queries on SQLAlchemy-compatible databases."]}),"\n",(0,s.jsx)(t.h2,{id:"text-splitters",children:"Text Splitters"}),"\n",(0,s.jsx)(t.p,{children:"The LangChain bundle includes the following text splitter components:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.strong,{children:"Character Text Splitter"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.strong,{children:"Language Recursive Text Splitter"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.strong,{children:"Natural Language Text Splitter"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.strong,{children:"Recursive Character Text Splitter"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.strong,{children:"Semantic Text Splitter"})}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"tool-calling-agent",children:"Tool Calling Agent"}),"\n",(0,s.jsxs)(t.p,{children:["This component is based on the ",(0,s.jsxs)(t.a,{href:"/agents",children:[(0,s.jsx)(t.strong,{children:"Agent"})," core component"]}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["This component creates an agent for structured tool calling with various language models.\nFor more information, see the ",(0,s.jsx)(t.a,{href:"https://python.langchain.com/docs/concepts/tool_calling/",children:"LangChain tool calling documentation"}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"tool-calling-agent-parameters",children:"Tool Calling Agent parameters"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Type"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"llm"}),(0,s.jsx)(t.td,{children:"LanguageModel"}),(0,s.jsx)(t.td,{children:"Input parameter. The language model to use."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"tools"}),(0,s.jsx)(t.td,{children:"List[Tool]"}),(0,s.jsx)(t.td,{children:"Input parameter. The list of tools available to the agent."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"system_message"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsx)(t.td,{children:"Input parameter. The system message to use for the agent."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"return_intermediate_steps"}),(0,s.jsx)(t.td,{children:"Boolean"}),(0,s.jsx)(t.td,{children:"Input parameter. This determines whether to return the agent's intermediate steps."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"max_iterations"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsx)(t.td,{children:"Input parameter. The maximum number of iterations to run the agent."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"max_execution_time"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsx)(t.td,{children:"Input parameter. The maximum execution time in seconds."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"early_stopping_method"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsx)(t.td,{children:"Input parameter. The method to use for early stopping."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"verbose"}),(0,s.jsx)(t.td,{children:"Boolean"}),(0,s.jsx)(t.td,{children:"Input parameter. This determines whether to print the agent's thoughts."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"agent"}),(0,s.jsx)(t.td,{children:"AgentExecutor"}),(0,s.jsx)(t.td,{children:"Output parameter. The tool calling agent instance."})]})]})]}),"\n",(0,s.jsx)(t.h2,{id:"xml-agent",children:"XML Agent"}),"\n",(0,s.jsxs)(t.p,{children:["This component is based on the ",(0,s.jsxs)(t.a,{href:"/agents",children:[(0,s.jsx)(t.strong,{children:"Agent"})," core component"]}),"."]}),"\n",(0,s.jsxs)(t.p,{children:["This component creates an XML Agent using LangChain.\nThe agent uses XML formatting for tool instructions to the LLM.\nFor more information, see the ",(0,s.jsx)(t.a,{href:"https://python.langchain.com/api_reference/langchain/agents/langchain.agents.xml.base.XMLAgent.html",children:"LangChain XML Agent documentation"}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"xml-agent-parameters",children:"XML Agent parameters"}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Type"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"llm"}),(0,s.jsx)(t.td,{children:"LanguageModel"}),(0,s.jsx)(t.td,{children:"Input parameter. The language model to use for the agent."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"user_prompt"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsx)(t.td,{children:"Input parameter. The custom prompt template for the agent with XML formatting instructions."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"tools"}),(0,s.jsx)(t.td,{children:"List[Tool]"}),(0,s.jsx)(t.td,{children:"Input parameter. The list of tools available to the agent."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"agent"}),(0,s.jsx)(t.td,{children:"AgentExecutor"}),(0,s.jsx)(t.td,{children:"Output parameter. The XML Agent instance."})]})]})]}),"\n",(0,s.jsx)(t.h2,{id:"other-langchain-components",children:"Other LangChain components"}),"\n",(0,s.jsx)(t.p,{children:"Other components in the LangChain bundle include the following:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.strong,{children:"Fake Embeddings"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.strong,{children:"HTML Link Extractor"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.strong,{children:"Runnable Executor"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.strong,{children:"Spider Web Crawler & Scraper"})}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"legacy-langchain-components",children:"Legacy LangChain components"}),"\n",(0,s.jsx)(t.p,{children:"The following LangChain components are considered legacy.\nYou can still use these components in your flows, but they are no longer maintained and they can be removed in future releases."}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.strong,{children:"Conversation Chain"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.strong,{children:"LLM Checker Chain"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.strong,{children:"LLM Math Chain"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.strong,{children:"Natural Language to SQL"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.strong,{children:"Retrieval QA"})}),"\n",(0,s.jsx)(t.li,{children:(0,s.jsx)(t.strong,{children:"Self Query Retriever"})}),"\n"]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"JSON Agent"}),(0,s.jsx)(t.p,{children:"This component creates a JSON agent from a JSON or YAML file and an LLM."}),(0,s.jsx)(t.p,{children:"It accepts the following parameters:"}),(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Type"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"llm"}),(0,s.jsx)(t.td,{children:"LanguageModel"}),(0,s.jsx)(t.td,{children:"Input parameter. The language model to use for the agent."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"path"}),(0,s.jsx)(t.td,{children:"File"}),(0,s.jsx)(t.td,{children:"Input parameter. The path to the JSON or YAML file."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"agent"}),(0,s.jsx)(t.td,{children:"AgentExecutor"}),(0,s.jsx)(t.td,{children:"Output parameter. The JSON agent instance."})]})]})]})]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Vector Store Info/Agent"}),(0,s.jsx)(t.p,{children:"This component creates a Vector Store Agent using LangChain."}),(0,s.jsx)(t.p,{children:"It accepts the following parameters:"}),(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Type"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"llm"}),(0,s.jsx)(t.td,{children:"LanguageModel"}),(0,s.jsx)(t.td,{children:"Input parameter. The language model to use for the agent."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"vectorstore"}),(0,s.jsx)(t.td,{children:"VectorStoreInfo"}),(0,s.jsx)(t.td,{children:"Input parameter. The vector store information for the agent to use."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"agent"}),(0,s.jsx)(t.td,{children:"AgentExecutor"}),(0,s.jsx)(t.td,{children:"Output parameter. The Vector Store Agent instance."})]})]})]})]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"VectorStoreRouterAgent"}),(0,s.jsx)(t.p,{children:"This component creates a Vector Store Router Agent using LangChain."}),(0,s.jsx)(t.p,{children:"It accepts the following parameters:"}),(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Type"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"llm"}),(0,s.jsx)(t.td,{children:"LanguageModel"}),(0,s.jsx)(t.td,{children:"Input parameter. The language model to use for the agent."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"vectorstores"}),(0,s.jsx)(t.td,{children:"List[VectorStoreInfo]"}),(0,s.jsx)(t.td,{children:"Input parameter. The list of vector store information for the agent to route between."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"agent"}),(0,s.jsx)(t.td,{children:"AgentExecutor"}),(0,s.jsx)(t.td,{children:"Output parameter. The Vector Store Router Agent instance."})]})]})]})]})]})}function o(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}}}]); \ No newline at end of file diff --git a/assets/js/b796be74.43b74263.js b/assets/js/b796be74.43b74263.js new file mode 100644 index 0000000000..44fa827d1a --- /dev/null +++ b/assets/js/b796be74.43b74263.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[9781],{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}},74215:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>l,default:()=>o,frontMatter:()=>a,metadata:()=>r,toc:()=>h});const r=JSON.parse('{"id":"Components/bundles-langchain","title":"LangChain","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-langchain.mdx","sourceDirName":"Components","slug":"/bundles-langchain","permalink":"/bundles-langchain","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"LangChain","slug":"/bundles-langchain"},"sidebar":"docs","previous":{"title":"Icosa Computing","permalink":"/bundles-icosacomputing"},"next":{"title":"LM Studio","permalink":"/bundles-lmstudio"}}');var s=t(74848),i=t(28453);t(17886);const a={title:"LangChain",slug:"/bundles-langchain"},l=void 0,d={},h=[{value:"CSV Agent",id:"csv-agent",level:2},{value:"CSV Agent parameters",id:"csv-agent-parameters",level:3},{value:"OpenAI Tools Agent",id:"openai-tools-agent",level:2},{value:"OpenAI Tools Agent parameters",id:"openai-tools-agent-parameters",level:3},{value:"OpenAPI Agent",id:"openapi-agent",level:2},{value:"OpenAPI Agent parameters",id:"openapi-agent-parameters",level:3},{value:"Prompt Hub",id:"prompt-hub",level:2},{value:"Prompt Hub parameters",id:"prompt-hub-parameters",level:3},{value:"SQL Agent",id:"sql-agent",level:2},{value:"SQL Agent parameters",id:"sql-agent-parameters",level:3},{value:"SQL Database",id:"sql-database",level:2},{value:"Text Splitters",id:"text-splitters",level:2},{value:"Tool Calling Agent",id:"tool-calling-agent",level:2},{value:"Tool Calling Agent parameters",id:"tool-calling-agent-parameters",level:3},{value:"XML Agent",id:"xml-agent",level:2},{value:"XML Agent parameters",id:"xml-agent-parameters",level:3},{value:"Other LangChain components",id:"other-langchain-components",level:2},{value:"Legacy LangChain components",id:"legacy-langchain-components",level:2}];function c(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,s.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,s.jsx)(n.strong,{children:"LangChain"})," bundle."]}),"\n",(0,s.jsx)(n.h2,{id:"csv-agent",children:"CSV Agent"}),"\n",(0,s.jsxs)(n.p,{children:["This component is based on the ",(0,s.jsxs)(n.a,{href:"/agents",children:[(0,s.jsx)(n.strong,{children:"Agent"})," core component"]}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["This component creates a CSV agent from a CSV file and LLM.\nFor more information, see the ",(0,s.jsx)(n.a,{href:"https://python.langchain.com/api_reference/experimental/agents/langchain_experimental.agents.agent_toolkits.csv.base.create_csv_agent.html",children:"LangChain CSV agent documentation"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"csv-agent-parameters",children:"CSV Agent parameters"}),"\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:"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:"llm"}),(0,s.jsx)(n.td,{children:"LanguageModel"}),(0,s.jsx)(n.td,{children:"Input parameter. The language model to use for the agent."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"path"}),(0,s.jsx)(n.td,{children:"File"}),(0,s.jsx)(n.td,{children:"Input parameter. The path to the CSV file."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"agent_type"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The type of agent to create."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"agent"}),(0,s.jsx)(n.td,{children:"AgentExecutor"}),(0,s.jsx)(n.td,{children:"Output parameter. The CSV agent instance."})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"openai-tools-agent",children:"OpenAI Tools Agent"}),"\n",(0,s.jsxs)(n.p,{children:["This component is based on the ",(0,s.jsxs)(n.a,{href:"/agents",children:[(0,s.jsx)(n.strong,{children:"Agent"})," core component"]}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["This component creates an OpenAI Tools Agent.\nFor more information, see the ",(0,s.jsx)(n.a,{href:"https://api.python.langchain.com/en/latest/agents/langchain.agents.openai_functions_agent.base.create_openai_functions_agent.html",children:"LangChain OpenAI agent documentation"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"openai-tools-agent-parameters",children:"OpenAI Tools Agent parameters"}),"\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:"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:"llm"}),(0,s.jsx)(n.td,{children:"LanguageModel"}),(0,s.jsx)(n.td,{children:"Input parameter. The language model to use."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"tools"}),(0,s.jsx)(n.td,{children:"List of Tools"}),(0,s.jsx)(n.td,{children:"Input parameter. The tools to give the agent access to."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"system_prompt"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The system prompt to provide context to the agent."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"input_value"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The user's input to the agent."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"memory"}),(0,s.jsx)(n.td,{children:"Memory"}),(0,s.jsx)(n.td,{children:"Input parameter. The memory for the agent to use for context persistence."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"max_iterations"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsx)(n.td,{children:"Input parameter. The maximum number of iterations to allow the agent to execute."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"verbose"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"Input parameter. This determines whether to print out the agent's intermediate steps."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"handle_parsing_errors"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"Input parameter. This determines whether to handle parsing errors in the agent."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"agent"}),(0,s.jsx)(n.td,{children:"AgentExecutor"}),(0,s.jsx)(n.td,{children:"Output parameter. The OpenAI Tools agent instance."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"output"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Output parameter. The output from executing the agent on the input."})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"openapi-agent",children:"OpenAPI Agent"}),"\n",(0,s.jsxs)(n.p,{children:["This component is based on the ",(0,s.jsxs)(n.a,{href:"/agents",children:[(0,s.jsx)(n.strong,{children:"Agent"})," core component"]}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["This component creates an agent for interacting with OpenAPI services.\nFor more information, see the ",(0,s.jsx)(n.a,{href:"https://python.langchain.com/docs/integrations/tools/openapi/",children:"LangChain OpenAPI toolkit documentation"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"openapi-agent-parameters",children:"OpenAPI Agent parameters"}),"\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:"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:"llm"}),(0,s.jsx)(n.td,{children:"LanguageModel"}),(0,s.jsx)(n.td,{children:"Input parameter. The language model to use."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"openapi_spec"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The OpenAPI specification for the service."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"base_url"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The base URL for the API."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"headers"}),(0,s.jsx)(n.td,{children:"Dict"}),(0,s.jsx)(n.td,{children:"Input parameter. The optional headers for API requests."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"agent_executor_kwargs"}),(0,s.jsx)(n.td,{children:"Dict"}),(0,s.jsx)(n.td,{children:"Input parameter. The optional parameters for the agent executor."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"agent"}),(0,s.jsx)(n.td,{children:"AgentExecutor"}),(0,s.jsx)(n.td,{children:"Output parameter.The OpenAPI agent instance."})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"prompt-hub",children:"Prompt Hub"}),"\n",(0,s.jsxs)(n.p,{children:["This component fetches prompts from the ",(0,s.jsx)(n.a,{href:"https://docs.smith.langchain.com/old/category/prompt-hub",children:"LangChain Hub"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["Like the ",(0,s.jsxs)(n.a,{href:"/components-prompts",children:[(0,s.jsx)(n.strong,{children:"Prompt Template"})," core component"]}),", additional fields are added to the component for each variable in the prompt.\nFor example, the default prompt ",(0,s.jsx)(n.code,{children:"efriis/my-first-prompt"})," adds fields for ",(0,s.jsx)(n.code,{children:"profession"})," and ",(0,s.jsx)(n.code,{children:"question"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"prompt-hub-parameters",children:"Prompt Hub parameters"}),"\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:"Name"}),(0,s.jsx)(n.th,{children:"Display Name"}),(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:"langchain_api_key"}),(0,s.jsx)(n.td,{children:"Your LangChain API Key"}),(0,s.jsx)(n.td,{children:"Input parameter. The LangChain API Key to use."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"langchain_hub_prompt"}),(0,s.jsx)(n.td,{children:"LangChain Hub Prompt"}),(0,s.jsx)(n.td,{children:"Input parameter. The LangChain Hub prompt to use."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"prompt"}),(0,s.jsx)(n.td,{children:"Build Prompt"}),(0,s.jsxs)(n.td,{children:["Output parameter. The built prompt message returned by the ",(0,s.jsx)(n.code,{children:"build_prompt"})," method."]})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"sql-agent",children:"SQL Agent"}),"\n",(0,s.jsxs)(n.p,{children:["This component is based on the ",(0,s.jsxs)(n.a,{href:"/agents",children:[(0,s.jsx)(n.strong,{children:"Agent"})," core component"]}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["This component creates an agent for interacting with SQL databases.\nFor more information, see the ",(0,s.jsx)(n.a,{href:"https://python.langchain.com/docs/tutorials/sql_qa/",children:"LangChain SQL agent documentation"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"sql-agent-parameters",children:"SQL Agent parameters"}),"\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:"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:"llm"}),(0,s.jsx)(n.td,{children:"LanguageModel"}),(0,s.jsx)(n.td,{children:"Input parameter. The language model to use."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"database"}),(0,s.jsx)(n.td,{children:"Database"}),(0,s.jsx)(n.td,{children:"Input parameter. The SQL database connection."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"top_k"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsx)(n.td,{children:"Input parameter. The number of results to return from a SELECT query."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"use_tools"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"Input parameter. This determines whether to use tools for query execution."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"return_intermediate_steps"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"Input parameter. This determines whether to return the agent's intermediate steps."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"max_iterations"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsx)(n.td,{children:"Input parameter. The maximum number of iterations to run the agent."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"max_execution_time"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsx)(n.td,{children:"Input parameter. The maximum execution time in seconds."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"early_stopping_method"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The method to use for early stopping."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"verbose"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"Input parameter. This determines whether to print the agent's thoughts."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"agent"}),(0,s.jsx)(n.td,{children:"AgentExecutor"}),(0,s.jsx)(n.td,{children:"Output parameter. The SQL agent instance."})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"sql-database",children:"SQL Database"}),"\n",(0,s.jsxs)(n.p,{children:["The LangChain ",(0,s.jsx)(n.strong,{children:"SQL Database"})," component establishes a connection to an SQL database."]}),"\n",(0,s.jsxs)(n.p,{children:["This component is different from the ",(0,s.jsxs)(n.a,{href:"/components-data#sql-database",children:[(0,s.jsx)(n.strong,{children:"SQL Database"})," core component"]}),", which executes SQL queries on SQLAlchemy-compatible databases."]}),"\n",(0,s.jsx)(n.h2,{id:"text-splitters",children:"Text Splitters"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"LangChain"})," bundle includes the following text splitter components:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.strong,{children:"Character Text Splitter"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.strong,{children:"Language Recursive Text Splitter"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.strong,{children:"Natural Language Text Splitter"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.strong,{children:"Recursive Character Text Splitter"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.strong,{children:"Semantic Text Splitter"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"tool-calling-agent",children:"Tool Calling Agent"}),"\n",(0,s.jsxs)(n.p,{children:["This component is based on the ",(0,s.jsxs)(n.a,{href:"/agents",children:[(0,s.jsx)(n.strong,{children:"Agent"})," core component"]}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["This component creates an agent for structured tool calling with various language models.\nFor more information, see the ",(0,s.jsx)(n.a,{href:"https://python.langchain.com/docs/concepts/tool_calling/",children:"LangChain tool calling documentation"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"tool-calling-agent-parameters",children:"Tool Calling Agent parameters"}),"\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:"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:"llm"}),(0,s.jsx)(n.td,{children:"LanguageModel"}),(0,s.jsx)(n.td,{children:"Input parameter. The language model to use."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"tools"}),(0,s.jsx)(n.td,{children:"List[Tool]"}),(0,s.jsx)(n.td,{children:"Input parameter. The list of tools available to the agent."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"system_message"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The system message to use for the agent."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"return_intermediate_steps"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"Input parameter. This determines whether to return the agent's intermediate steps."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"max_iterations"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsx)(n.td,{children:"Input parameter. The maximum number of iterations to run the agent."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"max_execution_time"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsx)(n.td,{children:"Input parameter. The maximum execution time in seconds."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"early_stopping_method"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The method to use for early stopping."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"verbose"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"Input parameter. This determines whether to print the agent's thoughts."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"agent"}),(0,s.jsx)(n.td,{children:"AgentExecutor"}),(0,s.jsx)(n.td,{children:"Output parameter. The tool calling agent instance."})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"xml-agent",children:"XML Agent"}),"\n",(0,s.jsxs)(n.p,{children:["This component is based on the ",(0,s.jsxs)(n.a,{href:"/agents",children:[(0,s.jsx)(n.strong,{children:"Agent"})," core component"]}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["This component creates an XML Agent using LangChain.\nThe agent uses XML formatting for tool instructions to the LLM.\nFor more information, see the ",(0,s.jsx)(n.a,{href:"https://python.langchain.com/api_reference/langchain/agents/langchain.agents.xml.base.XMLAgent.html",children:"LangChain XML Agent documentation"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"xml-agent-parameters",children:"XML Agent parameters"}),"\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:"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:"llm"}),(0,s.jsx)(n.td,{children:"LanguageModel"}),(0,s.jsx)(n.td,{children:"Input parameter. The language model to use for the agent."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"user_prompt"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The custom prompt template for the agent with XML formatting instructions."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"tools"}),(0,s.jsx)(n.td,{children:"List[Tool]"}),(0,s.jsx)(n.td,{children:"Input parameter. The list of tools available to the agent."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"agent"}),(0,s.jsx)(n.td,{children:"AgentExecutor"}),(0,s.jsx)(n.td,{children:"Output parameter. The XML Agent instance."})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"other-langchain-components",children:"Other LangChain components"}),"\n",(0,s.jsxs)(n.p,{children:["Other components in the ",(0,s.jsx)(n.strong,{children:"LangChain"})," bundle include the following:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.strong,{children:"Fake Embeddings"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.strong,{children:"HTML Link Extractor"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.strong,{children:"Runnable Executor"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.strong,{children:"Spider Web Crawler & Scraper"})}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"legacy-langchain-components",children:"Legacy LangChain components"}),"\n",(0,s.jsx)(n.p,{children:"The following LangChain components are considered legacy.\nYou can still use these components in your flows, but they are no longer maintained and they can be removed in future releases."}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.strong,{children:"Conversation Chain"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.strong,{children:"LLM Checker Chain"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.strong,{children:"LLM Math Chain"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.strong,{children:"Natural Language to SQL"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.strong,{children:"Retrieval QA"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.strong,{children:"Self Query Retriever"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.strong,{children:"JSON Agent"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.strong,{children:"Vector Store Info/Agent"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.strong,{children:"VectorStoreRouterAgent"})}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["To replace these components, consider other components in the ",(0,s.jsx)(n.strong,{children:"LangChain"})," bundle or general Langflow components, such as the ",(0,s.jsxs)(n.a,{href:"/components-agents",children:[(0,s.jsx)(n.strong,{children:"Agent"})," component"]})," or the ",(0,s.jsxs)(n.a,{href:"/components-data#sql-database",children:[(0,s.jsx)(n.strong,{children:"SQL Database"})," component"]}),"."]})]})}function o(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}}}]); \ No newline at end of file diff --git a/assets/js/b9f9404d.076495eb.js b/assets/js/b9f9404d.076495eb.js deleted file mode 100644 index 6a289b84e9..0000000000 --- a/assets/js/b9f9404d.076495eb.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[2323],{9187:(e,n,t)=>{t.d(n,{A:()=>a});const a=t.p+"assets/images/cleanlab_remediator_example-5d7e2d1782b3fe5e7ef8abd73d46e628.png"},17886:(e,n,t)=>{t.d(n,{A:()=>r});t(96540);var a=t(64058),s=t(74848);function r({name:e,...n}){const t=a[e];return t?(0,s.jsx)(t,{...n}):null}},22908:(e,n,t)=>{t.d(n,{A:()=>a});const a=t.p+"assets/files/eval_and_remediate_cleanlab-aac380677836d5237ad3db4405aae6f7.json"},31411:(e,n,t)=>{t.d(n,{A:()=>a});const a=t.p+"assets/images/eval_summary_rag-a48e121abf7d5f2761fc1022c61be17d.png"},46099:(e,n,t)=>{t.d(n,{A:()=>a});const a=t.p+"assets/images/eval_response-5947d6e0eb45b0feec6a36d4b489bf99.png"},57064:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>i,contentTitle:()=>d,default:()=>p,frontMatter:()=>o,metadata:()=>a,toc:()=>h});const a=JSON.parse('{"id":"Integrations/Cleanlab/integrations-cleanlab","title":"Cleanlab","description":"Cleanlab adds automation and trust to every data point going in and every prediction coming out of AI and RAG solutions.","source":"@site/docs/Integrations/Cleanlab/integrations-cleanlab.mdx","sourceDirName":"Integrations/Cleanlab","slug":"/integrations-cleanlab","permalink":"/integrations-cleanlab","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Cleanlab","slug":"/integrations-cleanlab"},"sidebar":"docs","previous":{"title":"Bing","permalink":"/bundles-bing"},"next":{"title":"Cloudflare","permalink":"/bundles-cloudflare"}}');var s=t(74848),r=t(28453),l=t(17886);const o={title:"Cleanlab",slug:"/integrations-cleanlab"},d=void 0,i={},h=[{value:"Cleanlab Evaluator",id:"cleanlab-evaluator",level:2},{value:"Cleanlab Evaluator parameters",id:"cleanlab-evaluator-parameters",level:3},{value:"Cleanlab Evaluator outputs",id:"cleanlab-evaluator-outputs",level:3},{value:"Cleanlab Remediator",id:"cleanlab-remediator",level:2},{value:"Cleanlab Remediator parameters",id:"cleanlab-remediator-parameters",level:3},{value:"Cleanlab RAG Evaluator",id:"cleanlab-rag-evaluator",level:2},{value:"Cleanlab RAG Evaluator parameters",id:"cleanlab-rag-evaluator-parameters",level:3},{value:"Cleanlab RAG Evaluator outputs",id:"cleanlab-rag-evaluator-outputs",level:3},{value:"Example Cleanlab flows",id:"example-cleanlab-flows",level:2},{value:"Evaluate and remediate responses from an LLM",id:"evaluate-and-remediate-responses-from-an-llm",level:3},{value:"Evaluate RAG pipeline",id:"evaluate-rag-pipeline",level:3}];function c(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"https://www.cleanlab.ai/",children:"Cleanlab"})," adds automation and trust to every data point going in and every prediction coming out of AI and RAG solutions."]}),"\n",(0,s.jsx)(n.p,{children:"Use the Cleanlab components to integrate Cleanlab Evaluations with Langflow and unlock trustworthy agentic, RAG, and LLM pipelines with Cleanlab's evaluation and remediation suite."}),"\n",(0,s.jsxs)(n.p,{children:["You can use these components to quantify the trustworthiness of any LLM response with a score between ",(0,s.jsx)(n.code,{children:"0"})," and ",(0,s.jsx)(n.code,{children:"1"}),", and explain why a response may be good or bad. For RAG or agent pipelines with context, you can evaluate context sufficiency, groundedness, helpfulness, and query clarity with quantitative scores. Additionally, you can remediate low-trust responses with warnings or fallback answers."]}),"\n",(0,s.jsx)(n.p,{children:"Authentication is required with a Cleanlab API key."}),"\n",(0,s.jsx)(n.h2,{id:"cleanlab-evaluator",children:"Cleanlab Evaluator"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Cleanlab Evaluator"})," component evaluates and explains the trustworthiness of a prompt and response pair using Cleanlab. For more information on how the score works, see the ",(0,s.jsx)(n.a,{href:"https://help.cleanlab.ai/tlm/",children:"Cleanlab documentation"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"cleanlab-evaluator-parameters",children:"Cleanlab Evaluator parameters"}),"\n",(0,s.jsxs)(n.p,{children:["Some ",(0,s.jsx)(n.strong,{children:"Cleanlab Evaluator"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,s.jsx)(l.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Controls"})," in the ",(0,s.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\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:"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:"system_prompt"}),(0,s.jsx)(n.td,{children:"Message"}),(0,s.jsx)(n.td,{children:"Input parameter. The system message prepended to the prompt. Optional."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"prompt"}),(0,s.jsx)(n.td,{children:"Message"}),(0,s.jsx)(n.td,{children:"Input parameter. The user-facing input to the LLM."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"response"}),(0,s.jsx)(n.td,{children:"Message"}),(0,s.jsx)(n.td,{children:"Input parameter. The model's response to evaluate."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"cleanlab_api_key"}),(0,s.jsx)(n.td,{children:"Secret"}),(0,s.jsx)(n.td,{children:"Input parameter. Your Cleanlab API key."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"cleanlab_evaluation_model"}),(0,s.jsx)(n.td,{children:"Dropdown"}),(0,s.jsx)(n.td,{children:"Input parameter. Evaluation model used by Cleanlab, such as GPT-4 or Claude. This doesn't need to be the same model that generated the response."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"quality_preset"}),(0,s.jsx)(n.td,{children:"Dropdown"}),(0,s.jsx)(n.td,{children:"Input parameter. Tradeoff between evaluation speed and accuracy."})]})]})]}),"\n",(0,s.jsx)(n.h3,{id:"cleanlab-evaluator-outputs",children:"Cleanlab Evaluator outputs"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Cleanlab Evaluator"})," component has three possible outputs."]}),"\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:"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:"score"}),(0,s.jsx)(n.td,{children:"number, float"}),(0,s.jsx)(n.td,{children:"Displays the trust score between 0 and 1."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"explanation"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"Message"})}),(0,s.jsx)(n.td,{children:"Provides an explanation of the trust score."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"response"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"Message"})}),(0,s.jsxs)(n.td,{children:["Returns the original response for easy chaining to the ",(0,s.jsx)(n.strong,{children:"Cleanlab Remediator"})," component."]})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"cleanlab-remediator",children:"Cleanlab Remediator"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Cleanlab Remediator"})," component uses the trust score from the ",(0,s.jsxs)(n.a,{href:"#cleanlab-evaluator",children:[(0,s.jsx)(n.strong,{children:"Cleanlab Evaluator"})," component"]})," to determine whether to show, warn about, or replace an LLM response."]}),"\n",(0,s.jsx)(n.p,{children:"This component has parameters for the score threshold, warning text, and fallback message that you can customize as needed."}),"\n",(0,s.jsxs)(n.p,{children:["The output is ",(0,s.jsx)(n.strong,{children:"Remediated Response"})," (",(0,s.jsx)(n.code,{children:"remediated_response"}),"), which is a ",(0,s.jsx)(n.code,{children:"Message"})," containing the final message shown to the user after remediation logic is applied."]}),"\n",(0,s.jsx)(n.h3,{id:"cleanlab-remediator-parameters",children:"Cleanlab Remediator parameters"}),"\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:"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:"response"}),(0,s.jsx)(n.td,{children:"Message"}),(0,s.jsx)(n.td,{children:"Input parameter. The response to potentially remediate."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"score"}),(0,s.jsx)(n.td,{children:"Number"}),(0,s.jsxs)(n.td,{children:["Input parameter. The trust score from ",(0,s.jsx)(n.code,{children:"CleanlabEvaluator"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"explanation"}),(0,s.jsx)(n.td,{children:"Message"}),(0,s.jsx)(n.td,{children:"Input parameter. The explanation to append if a warning is shown. Optional."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"threshold"}),(0,s.jsx)(n.td,{children:"Float"}),(0,s.jsx)(n.td,{children:"Input parameter. The minimum trust score to pass a response unchanged."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"show_untrustworthy_response"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"Input parameter. Whether to display or hide the original response with a warning if a response is deemed untrustworthy."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"untrustworthy_warning_text"}),(0,s.jsx)(n.td,{children:"Prompt"}),(0,s.jsx)(n.td,{children:"Input parameter. The warning text for untrustworthy responses."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"fallback_text"}),(0,s.jsx)(n.td,{children:"Prompt"}),(0,s.jsx)(n.td,{children:"Input parameter. The fallback message if the response is hidden."})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"cleanlab-rag-evaluator",children:"Cleanlab RAG Evaluator"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Cleanlab RAG Evaluator"})," component evaluates RAG and LLM pipeline outputs for trustworthiness, context sufficiency, response groundedness, helpfulness, and query ease using ",(0,s.jsx)(n.a,{href:"https://help.cleanlab.ai/tlm/use-cases/tlm_rag/",children:"Cleanlab's evaluation metrics"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["You can pair this component with the ",(0,s.jsxs)(n.a,{href:"#cleanlab-remediator",children:[(0,s.jsx)(n.strong,{children:"Cleanlab Remediator"})," component"]})," to remediate low-trust responses coming from the RAG pipeline."]}),"\n",(0,s.jsx)(n.h3,{id:"cleanlab-rag-evaluator-parameters",children:"Cleanlab RAG Evaluator parameters"}),"\n",(0,s.jsxs)(n.p,{children:["Some ",(0,s.jsx)(n.strong,{children:"Cleanlab RAG Evaluator"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,s.jsx)(l.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Controls"})," in the ",(0,s.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\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:"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:"cleanlab_api_key"}),(0,s.jsx)(n.td,{children:"Secret"}),(0,s.jsx)(n.td,{children:"Input parameter. Your Cleanlab API key."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"cleanlab_evaluation_model"}),(0,s.jsx)(n.td,{children:"Dropdown"}),(0,s.jsx)(n.td,{children:"Input parameter. The evaluation model used by Cleanlab, such as GPT-4, or Claude. This doesn't need to be the same model that generated the response."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"quality_preset"}),(0,s.jsx)(n.td,{children:"Dropdown"}),(0,s.jsx)(n.td,{children:"Input parameter. The tradeoff between evaluation speed and accuracy."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"context"}),(0,s.jsx)(n.td,{children:"Message"}),(0,s.jsx)(n.td,{children:"Input parameter. The retrieved context from your RAG system."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"query"}),(0,s.jsx)(n.td,{children:"Message"}),(0,s.jsx)(n.td,{children:"Input parameter. The original user query."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"response"}),(0,s.jsx)(n.td,{children:"Message"}),(0,s.jsx)(n.td,{children:"Input parameter. The model's response based on the context and query."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"run_context_sufficiency"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"Input parameter. Evaluate whether context supports answering the query."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"run_response_groundedness"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"Input parameter. Evaluate whether the response is grounded in the context."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"run_response_helpfulness"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"Input parameter. Evaluate how helpful the response is."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"run_query_ease"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"Input parameter. Evaluate if the query is vague, complex, or adversarial."})]})]})]}),"\n",(0,s.jsx)(n.h3,{id:"cleanlab-rag-evaluator-outputs",children:"Cleanlab RAG Evaluator outputs"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Cleanlab RAG Evaluator"})," component has the following output options:"]}),"\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:"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:"trust_score"}),(0,s.jsx)(n.td,{children:"Number"}),(0,s.jsx)(n.td,{children:"The overall trust score."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"trust_explanation"}),(0,s.jsx)(n.td,{children:"Message"}),(0,s.jsx)(n.td,{children:"The explanation for the trust score."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"other_scores"}),(0,s.jsx)(n.td,{children:"Dictionary"}),(0,s.jsx)(n.td,{children:"A dictionary of optional enabled RAG evaluation metrics."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"evaluation_summary"}),(0,s.jsx)(n.td,{children:"Message"}),(0,s.jsx)(n.td,{children:"A Markdown summary of query, context, response, and evaluation results."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"response"}),(0,s.jsx)(n.td,{children:"Message"}),(0,s.jsxs)(n.td,{children:["Returns the original response for easy chaining to the ",(0,s.jsx)(n.strong,{children:"Cleanlab Remediator"})," component."]})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"example-cleanlab-flows",children:"Example Cleanlab flows"}),"\n",(0,s.jsxs)(n.p,{children:["The following example flows show how to use the ",(0,s.jsx)(n.strong,{children:"Cleanlab Evaluator"})," and ",(0,s.jsx)(n.strong,{children:"Cleanlab Remediator"})," components to evaluate and remediate responses from any LLM, and how to use the ",(0,s.jsx)(n.strong,{children:"Cleanlab RAG Evaluator"})," component to evaluate RAG pipeline outputs."]}),"\n",(0,s.jsx)(n.h3,{id:"evaluate-and-remediate-responses-from-an-llm",children:"Evaluate and remediate responses from an LLM"}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsx)(n.p,{children:"You can to follow along."})}),"\n",(0,s.jsxs)(n.p,{children:["This flow evaluates and remediates the trustworthiness of a response from any LLM using the ",(0,s.jsx)(n.strong,{children:"Cleanlab Evaluator"})," and ",(0,s.jsx)(n.strong,{children:"Cleanlab Remediator"})," components."]}),"\n",(0,s.jsxs)(n.p,{children:["You can ",(0,s.jsx)(n.a,{target:"_blank","data-noBrokenLinkCheck":!0,href:t(22908).A+"",children:"download the Evaluate and Remediate flow"}),", and then ",(0,s.jsx)(n.a,{href:"/concepts-flows-import",children:"import the flow"})," to your Langflow instance.\nOr, you can build the flow from scratch by connecting the following components:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Connect the ",(0,s.jsx)(n.code,{children:"Message"})," output from any ",(0,s.jsx)(n.strong,{children:"Language Model"})," or ",(0,s.jsx)(n.strong,{children:"Agent"})," component to the ",(0,s.jsx)(n.strong,{children:"Response"})," input of the ",(0,s.jsx)(n.strong,{children:"Cleanlab Evaluator"})," component."]}),"\n",(0,s.jsxs)(n.li,{children:["Connect a ",(0,s.jsx)(n.strong,{children:"Prompt Template"})," component to ",(0,s.jsx)(n.strong,{children:"Cleanlab Evaluator"})," component's ",(0,s.jsx)(n.strong,{children:"Prompt"})," input."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Evaluate response trustworthiness",src:t(46099).A+"",width:"3092",height:"1468"})}),"\n",(0,s.jsxs)(n.p,{children:["When you run the flow, the ",(0,s.jsx)(n.strong,{children:"Cleanlab Evaluator"})," component returns a trust score and explanation from the flow."]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Cleanlab Remediator"})," component uses this trust score to determine whether to output the original response, warn about it, or replace it with a fallback answer."]}),"\n",(0,s.jsxs)(n.p,{children:["This example shows a response that was determined to be untrustworthy (a score of ",(0,s.jsx)(n.code,{children:".09"}),") and flagged with a warning by the ",(0,s.jsx)(n.strong,{children:"Cleanlab Remediator"})," component."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Cleanlab Remediator Example",src:t(9187).A+"",width:"1890",height:"1322"})}),"\n",(0,s.jsxs)(n.p,{children:["To hide untrustworthy responses, configure the ",(0,s.jsx)(n.strong,{children:"Cleanlab Remediator"})," component to replace the response with a fallback message."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Cleanlab Remediator Example",src:t(87490).A+"",width:"1654",height:"416"})}),"\n",(0,s.jsx)(n.h3,{id:"evaluate-rag-pipeline",children:"Evaluate RAG pipeline"}),"\n",(0,s.jsxs)(n.p,{children:["As an example, create a flow based on the ",(0,s.jsx)(n.strong,{children:"Vector Store RAG"})," template, and then add the ",(0,s.jsx)(n.strong,{children:"Cleanlab RAG Evaluator"})," component to evaluate the flow's context, query, and response.\nConnect the ",(0,s.jsx)(n.strong,{children:"context"}),", ",(0,s.jsx)(n.strong,{children:"query"}),", and ",(0,s.jsx)(n.strong,{children:"response"})," outputs from the other components in the RAG flow to the ",(0,s.jsx)(n.strong,{children:"Cleanlab RAG Evaluator"})," component."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Evaluate RAG pipeline",src:t(72186).A+"",width:"3058",height:"1274"})}),"\n",(0,s.jsxs)(n.p,{children:["Here is an example of the ",(0,s.jsx)(n.code,{children:"Evaluation Summary"})," output from the ",(0,s.jsx)(n.strong,{children:"Cleanlab RAG Evaluator"})," component:"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Evaluate RAG pipeline",src:t(31411).A+"",width:"1666",height:"1568"})}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"Evaluation Summary"})," includes the query, context, response, and all evaluation results. In this example, the ",(0,s.jsx)(n.code,{children:"Context Sufficiency"})," and ",(0,s.jsx)(n.code,{children:"Response Groundedness"})," scores are low (a score of ",(0,s.jsx)(n.code,{children:"0.002"}),") because the context doesn't contain information about the query, and the response isn't grounded in the context."]})]})}function p(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},72186:(e,n,t)=>{t.d(n,{A:()=>a});const a=t.p+"assets/images/eval_rag-a8bfd2d0d1ac01168ca183f856c14545.png"},87490:(e,n,t)=>{t.d(n,{A:()=>a});const a=t.p+"assets/images/cleanlab_remediator_example_fallback-7c585c112d908654873c27eb21de1702.png"}}]); \ No newline at end of file diff --git a/assets/js/b9f9404d.ecbc4bd3.js b/assets/js/b9f9404d.ecbc4bd3.js new file mode 100644 index 0000000000..dedbe2de87 --- /dev/null +++ b/assets/js/b9f9404d.ecbc4bd3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[2323],{9187:(e,n,t)=>{t.d(n,{A:()=>a});const a=t.p+"assets/images/cleanlab_remediator_example-5d7e2d1782b3fe5e7ef8abd73d46e628.png"},17886:(e,n,t)=>{t.d(n,{A:()=>r});t(96540);var a=t(64058),s=t(74848);function r({name:e,...n}){const t=a[e];return t?(0,s.jsx)(t,{...n}):null}},22908:(e,n,t)=>{t.d(n,{A:()=>a});const a=t.p+"assets/files/eval_and_remediate_cleanlab-aac380677836d5237ad3db4405aae6f7.json"},31411:(e,n,t)=>{t.d(n,{A:()=>a});const a=t.p+"assets/images/eval_summary_rag-a48e121abf7d5f2761fc1022c61be17d.png"},31929:(e,n,t)=>{t.d(n,{Ay:()=>d,RM:()=>l});var a=t(74848),s=t(28453),r=t(17886);const l=[];function o(e){const n={a:"a",p:"p",strong:"strong",...(0,s.R)(),...e.components};return(0,a.jsxs)(n.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,a.jsx)(r.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,a.jsx)(n.strong,{children:"Controls"})," in the ",(0,a.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function d(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(o,{...e})}):o(e)}},46099:(e,n,t)=>{t.d(n,{A:()=>a});const a=t.p+"assets/images/eval_response-5947d6e0eb45b0feec6a36d4b489bf99.png"},57064:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>i,contentTitle:()=>d,default:()=>p,frontMatter:()=>o,metadata:()=>a,toc:()=>h});const a=JSON.parse('{"id":"Integrations/Cleanlab/integrations-cleanlab","title":"Cleanlab","description":"Cleanlab adds automation and trust to every data point going in and every prediction coming out of AI and RAG solutions.","source":"@site/docs/Integrations/Cleanlab/integrations-cleanlab.mdx","sourceDirName":"Integrations/Cleanlab","slug":"/integrations-cleanlab","permalink":"/integrations-cleanlab","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Cleanlab","slug":"/integrations-cleanlab"},"sidebar":"docs","previous":{"title":"Bing","permalink":"/bundles-bing"},"next":{"title":"Cloudflare","permalink":"/bundles-cloudflare"}}');var s=t(74848),r=t(28453),l=(t(17886),t(31929));const o={title:"Cleanlab",slug:"/integrations-cleanlab"},d=void 0,i={},h=[{value:"Cleanlab Evaluator",id:"cleanlab-evaluator",level:2},{value:"Cleanlab Evaluator parameters",id:"cleanlab-evaluator-parameters",level:3},...l.RM,{value:"Cleanlab Evaluator outputs",id:"cleanlab-evaluator-outputs",level:3},{value:"Cleanlab Remediator",id:"cleanlab-remediator",level:2},{value:"Cleanlab Remediator parameters",id:"cleanlab-remediator-parameters",level:3},{value:"Cleanlab RAG Evaluator",id:"cleanlab-rag-evaluator",level:2},{value:"Cleanlab RAG Evaluator parameters",id:"cleanlab-rag-evaluator-parameters",level:3},...l.RM,{value:"Cleanlab RAG Evaluator outputs",id:"cleanlab-rag-evaluator-outputs",level:3},{value:"Example Cleanlab flows",id:"example-cleanlab-flows",level:2},{value:"Evaluate and remediate responses from an LLM",id:"evaluate-and-remediate-responses-from-an-llm",level:3},{value:"Evaluate RAG pipeline",id:"evaluate-rag-pipeline",level:3}];function c(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"https://www.cleanlab.ai/",children:"Cleanlab"})," adds automation and trust to every data point going in and every prediction coming out of AI and RAG solutions."]}),"\n",(0,s.jsx)(n.p,{children:"Use the Cleanlab components to integrate Cleanlab Evaluations with Langflow and unlock trustworthy agentic, RAG, and LLM pipelines with Cleanlab's evaluation and remediation suite."}),"\n",(0,s.jsxs)(n.p,{children:["You can use these components to quantify the trustworthiness of any LLM response with a score between ",(0,s.jsx)(n.code,{children:"0"})," and ",(0,s.jsx)(n.code,{children:"1"}),", and explain why a response may be good or bad. For RAG or agent pipelines with context, you can evaluate context sufficiency, groundedness, helpfulness, and query clarity with quantitative scores. Additionally, you can remediate low-trust responses with warnings or fallback answers."]}),"\n",(0,s.jsx)(n.p,{children:"Authentication is required with a Cleanlab API key."}),"\n",(0,s.jsx)(n.h2,{id:"cleanlab-evaluator",children:"Cleanlab Evaluator"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Cleanlab Evaluator"})," component evaluates and explains the trustworthiness of a prompt and response pair using Cleanlab. For more information on how the score works, see the ",(0,s.jsx)(n.a,{href:"https://help.cleanlab.ai/tlm/",children:"Cleanlab documentation"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"cleanlab-evaluator-parameters",children:"Cleanlab Evaluator parameters"}),"\n",(0,s.jsx)(l.Ay,{}),"\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:"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:"system_prompt"}),(0,s.jsx)(n.td,{children:"Message"}),(0,s.jsx)(n.td,{children:"Input parameter. The system message prepended to the prompt. Optional."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"prompt"}),(0,s.jsx)(n.td,{children:"Message"}),(0,s.jsx)(n.td,{children:"Input parameter. The user-facing input to the LLM."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"response"}),(0,s.jsx)(n.td,{children:"Message"}),(0,s.jsx)(n.td,{children:"Input parameter. The model's response to evaluate."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"cleanlab_api_key"}),(0,s.jsx)(n.td,{children:"Secret"}),(0,s.jsx)(n.td,{children:"Input parameter. Your Cleanlab API key."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"cleanlab_evaluation_model"}),(0,s.jsx)(n.td,{children:"Dropdown"}),(0,s.jsx)(n.td,{children:"Input parameter. Evaluation model used by Cleanlab, such as GPT-4 or Claude. This doesn't need to be the same model that generated the response."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"quality_preset"}),(0,s.jsx)(n.td,{children:"Dropdown"}),(0,s.jsx)(n.td,{children:"Input parameter. Tradeoff between evaluation speed and accuracy."})]})]})]}),"\n",(0,s.jsx)(n.h3,{id:"cleanlab-evaluator-outputs",children:"Cleanlab Evaluator outputs"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Cleanlab Evaluator"})," component has three possible outputs."]}),"\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:"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:"score"}),(0,s.jsx)(n.td,{children:"number, float"}),(0,s.jsx)(n.td,{children:"Displays the trust score between 0 and 1."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"explanation"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"Message"})}),(0,s.jsx)(n.td,{children:"Provides an explanation of the trust score."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"response"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"Message"})}),(0,s.jsxs)(n.td,{children:["Returns the original response for easy chaining to the ",(0,s.jsx)(n.strong,{children:"Cleanlab Remediator"})," component."]})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"cleanlab-remediator",children:"Cleanlab Remediator"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Cleanlab Remediator"})," component uses the trust score from the ",(0,s.jsxs)(n.a,{href:"#cleanlab-evaluator",children:[(0,s.jsx)(n.strong,{children:"Cleanlab Evaluator"})," component"]})," to determine whether to show, warn about, or replace an LLM response."]}),"\n",(0,s.jsx)(n.p,{children:"This component has parameters for the score threshold, warning text, and fallback message that you can customize as needed."}),"\n",(0,s.jsxs)(n.p,{children:["The output is ",(0,s.jsx)(n.strong,{children:"Remediated Response"})," (",(0,s.jsx)(n.code,{children:"remediated_response"}),"), which is a ",(0,s.jsx)(n.code,{children:"Message"})," containing the final message shown to the user after remediation logic is applied."]}),"\n",(0,s.jsx)(n.h3,{id:"cleanlab-remediator-parameters",children:"Cleanlab Remediator parameters"}),"\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:"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:"response"}),(0,s.jsx)(n.td,{children:"Message"}),(0,s.jsx)(n.td,{children:"Input parameter. The response to potentially remediate."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"score"}),(0,s.jsx)(n.td,{children:"Number"}),(0,s.jsxs)(n.td,{children:["Input parameter. The trust score from ",(0,s.jsx)(n.code,{children:"CleanlabEvaluator"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"explanation"}),(0,s.jsx)(n.td,{children:"Message"}),(0,s.jsx)(n.td,{children:"Input parameter. The explanation to append if a warning is shown. Optional."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"threshold"}),(0,s.jsx)(n.td,{children:"Float"}),(0,s.jsx)(n.td,{children:"Input parameter. The minimum trust score to pass a response unchanged."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"show_untrustworthy_response"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"Input parameter. Whether to display or hide the original response with a warning if a response is deemed untrustworthy."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"untrustworthy_warning_text"}),(0,s.jsx)(n.td,{children:"Prompt"}),(0,s.jsx)(n.td,{children:"Input parameter. The warning text for untrustworthy responses."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"fallback_text"}),(0,s.jsx)(n.td,{children:"Prompt"}),(0,s.jsx)(n.td,{children:"Input parameter. The fallback message if the response is hidden."})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"cleanlab-rag-evaluator",children:"Cleanlab RAG Evaluator"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Cleanlab RAG Evaluator"})," component evaluates RAG and LLM pipeline outputs for trustworthiness, context sufficiency, response groundedness, helpfulness, and query ease using ",(0,s.jsx)(n.a,{href:"https://help.cleanlab.ai/tlm/use-cases/tlm_rag/",children:"Cleanlab's evaluation metrics"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["You can pair this component with the ",(0,s.jsxs)(n.a,{href:"#cleanlab-remediator",children:[(0,s.jsx)(n.strong,{children:"Cleanlab Remediator"})," component"]})," to remediate low-trust responses coming from the RAG pipeline."]}),"\n",(0,s.jsx)(n.h3,{id:"cleanlab-rag-evaluator-parameters",children:"Cleanlab RAG Evaluator parameters"}),"\n",(0,s.jsx)(l.Ay,{}),"\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:"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:"cleanlab_api_key"}),(0,s.jsx)(n.td,{children:"Secret"}),(0,s.jsx)(n.td,{children:"Input parameter. Your Cleanlab API key."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"cleanlab_evaluation_model"}),(0,s.jsx)(n.td,{children:"Dropdown"}),(0,s.jsx)(n.td,{children:"Input parameter. The evaluation model used by Cleanlab, such as GPT-4, or Claude. This doesn't need to be the same model that generated the response."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"quality_preset"}),(0,s.jsx)(n.td,{children:"Dropdown"}),(0,s.jsx)(n.td,{children:"Input parameter. The tradeoff between evaluation speed and accuracy."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"context"}),(0,s.jsx)(n.td,{children:"Message"}),(0,s.jsx)(n.td,{children:"Input parameter. The retrieved context from your RAG system."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"query"}),(0,s.jsx)(n.td,{children:"Message"}),(0,s.jsx)(n.td,{children:"Input parameter. The original user query."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"response"}),(0,s.jsx)(n.td,{children:"Message"}),(0,s.jsx)(n.td,{children:"Input parameter. The model's response based on the context and query."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"run_context_sufficiency"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"Input parameter. Evaluate whether context supports answering the query."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"run_response_groundedness"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"Input parameter. Evaluate whether the response is grounded in the context."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"run_response_helpfulness"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"Input parameter. Evaluate how helpful the response is."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"run_query_ease"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"Input parameter. Evaluate if the query is vague, complex, or adversarial."})]})]})]}),"\n",(0,s.jsx)(n.h3,{id:"cleanlab-rag-evaluator-outputs",children:"Cleanlab RAG Evaluator outputs"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Cleanlab RAG Evaluator"})," component has the following output options:"]}),"\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:"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:"trust_score"}),(0,s.jsx)(n.td,{children:"Number"}),(0,s.jsx)(n.td,{children:"The overall trust score."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"trust_explanation"}),(0,s.jsx)(n.td,{children:"Message"}),(0,s.jsx)(n.td,{children:"The explanation for the trust score."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"other_scores"}),(0,s.jsx)(n.td,{children:"Dictionary"}),(0,s.jsx)(n.td,{children:"A dictionary of optional enabled RAG evaluation metrics."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"evaluation_summary"}),(0,s.jsx)(n.td,{children:"Message"}),(0,s.jsx)(n.td,{children:"A Markdown summary of query, context, response, and evaluation results."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"response"}),(0,s.jsx)(n.td,{children:"Message"}),(0,s.jsxs)(n.td,{children:["Returns the original response for easy chaining to the ",(0,s.jsx)(n.strong,{children:"Cleanlab Remediator"})," component."]})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"example-cleanlab-flows",children:"Example Cleanlab flows"}),"\n",(0,s.jsxs)(n.p,{children:["The following example flows show how to use the ",(0,s.jsx)(n.strong,{children:"Cleanlab Evaluator"})," and ",(0,s.jsx)(n.strong,{children:"Cleanlab Remediator"})," components to evaluate and remediate responses from any LLM, and how to use the ",(0,s.jsx)(n.strong,{children:"Cleanlab RAG Evaluator"})," component to evaluate RAG pipeline outputs."]}),"\n",(0,s.jsx)(n.h3,{id:"evaluate-and-remediate-responses-from-an-llm",children:"Evaluate and remediate responses from an LLM"}),"\n",(0,s.jsxs)(n.p,{children:["This flow evaluates and remediates the trustworthiness of a response from any LLM using the ",(0,s.jsx)(n.strong,{children:"Cleanlab Evaluator"})," and ",(0,s.jsx)(n.strong,{children:"Cleanlab Remediator"})," components."]}),"\n",(0,s.jsxs)(n.p,{children:["You can ",(0,s.jsx)(n.a,{target:"_blank","data-noBrokenLinkCheck":!0,href:t(22908).A+"",children:"download the Evaluate and Remediate flow"}),", and then ",(0,s.jsx)(n.a,{href:"/concepts-flows-import",children:"import the flow"})," to your Langflow instance.\nOr, you can build the flow from scratch by connecting the following components:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["Connect the ",(0,s.jsx)(n.code,{children:"Message"})," output from any ",(0,s.jsx)(n.strong,{children:"Language Model"})," or ",(0,s.jsx)(n.strong,{children:"Agent"})," component to the ",(0,s.jsx)(n.strong,{children:"Response"})," input of the ",(0,s.jsx)(n.strong,{children:"Cleanlab Evaluator"})," component."]}),"\n",(0,s.jsxs)(n.li,{children:["Connect a ",(0,s.jsx)(n.strong,{children:"Prompt Template"})," component to the ",(0,s.jsx)(n.strong,{children:"Cleanlab Evaluator"})," component's ",(0,s.jsx)(n.strong,{children:"Prompt"})," input."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Evaluate response trustworthiness",src:t(46099).A+"",width:"3092",height:"1468"})}),"\n",(0,s.jsxs)(n.p,{children:["When you run the flow, the ",(0,s.jsx)(n.strong,{children:"Cleanlab Evaluator"})," component returns a trust score and explanation from the flow."]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Cleanlab Remediator"})," component uses this trust score to determine whether to output the original response, warn about it, or replace it with a fallback answer."]}),"\n",(0,s.jsxs)(n.p,{children:["This example shows a response that was determined to be untrustworthy (a score of ",(0,s.jsx)(n.code,{children:".09"}),") and flagged with a warning by the ",(0,s.jsx)(n.strong,{children:"Cleanlab Remediator"})," component."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Cleanlab Remediator Example",src:t(9187).A+"",width:"1890",height:"1322"})}),"\n",(0,s.jsxs)(n.p,{children:["To hide untrustworthy responses, configure the ",(0,s.jsx)(n.strong,{children:"Cleanlab Remediator"})," component to replace the response with a fallback message."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Cleanlab Remediator Example",src:t(87490).A+"",width:"1654",height:"416"})}),"\n",(0,s.jsx)(n.h3,{id:"evaluate-rag-pipeline",children:"Evaluate RAG pipeline"}),"\n",(0,s.jsxs)(n.p,{children:["As an example, create a flow based on the ",(0,s.jsx)(n.strong,{children:"Vector Store RAG"})," template, and then add the ",(0,s.jsx)(n.strong,{children:"Cleanlab RAG Evaluator"})," component to evaluate the flow's context, query, and response.\nConnect the ",(0,s.jsx)(n.strong,{children:"context"}),", ",(0,s.jsx)(n.strong,{children:"query"}),", and ",(0,s.jsx)(n.strong,{children:"response"})," outputs from the other components in the RAG flow to the ",(0,s.jsx)(n.strong,{children:"Cleanlab RAG Evaluator"})," component."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Evaluate RAG pipeline",src:t(72186).A+"",width:"3058",height:"1274"})}),"\n",(0,s.jsxs)(n.p,{children:["Here is an example of the ",(0,s.jsx)(n.code,{children:"Evaluation Summary"})," output from the ",(0,s.jsx)(n.strong,{children:"Cleanlab RAG Evaluator"})," component:"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Evaluate RAG pipeline",src:t(31411).A+"",width:"1666",height:"1568"})}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.code,{children:"Evaluation Summary"})," includes the query, context, response, and all evaluation results. In this example, the ",(0,s.jsx)(n.code,{children:"Context Sufficiency"})," and ",(0,s.jsx)(n.code,{children:"Response Groundedness"})," scores are low (a score of ",(0,s.jsx)(n.code,{children:"0.002"}),") because the context doesn't contain information about the query, and the response isn't grounded in the context."]})]})}function p(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}},72186:(e,n,t)=>{t.d(n,{A:()=>a});const a=t.p+"assets/images/eval_rag-a8bfd2d0d1ac01168ca183f856c14545.png"},87490:(e,n,t)=>{t.d(n,{A:()=>a});const a=t.p+"assets/images/cleanlab_remediator_example_fallback-7c585c112d908654873c27eb21de1702.png"}}]); \ No newline at end of file diff --git a/assets/js/baacc2a1.4632d92a.js b/assets/js/baacc2a1.4632d92a.js new file mode 100644 index 0000000000..4ee9ed6670 --- /dev/null +++ b/assets/js/baacc2a1.4632d92a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[4573],{28453:(n,e,t)=>{t.d(e,{R:()=>i,x:()=>r});var s=t(96540);const o={},a=s.createContext(o);function i(n){const e=s.useContext(a);return s.useMemo(function(){return"function"==typeof n?n(e):{...e,...n}},[e,n])}function r(n){let e;return e=n.disableParentContext?"function"==typeof n.components?n.components(o):n.components||o:i(n.components),s.createElement(a.Provider,{value:e},n.children)}},66922:(n,e,t)=>{t.r(e),t.d(e,{assets:()=>c,contentTitle:()=>r,default:()=>u,frontMatter:()=>i,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"Components/bundles-baidu","title":"Baidu","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-baidu.mdx","sourceDirName":"Components","slug":"/bundles-baidu","permalink":"/bundles-baidu","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Baidu","slug":"/bundles-baidu"},"sidebar":"docs","previous":{"title":"Azure","permalink":"/bundles-azure"},"next":{"title":"Bing","permalink":"/bundles-bing"}}');var o=t(74848),a=t(28453);const i={title:"Baidu",slug:"/bundles-baidu"},r=void 0,c={},d=[{value:"Qianfan",id:"qianfan",level:2}];function l(n){const e={a:"a",code:"code",h2:"h2",p:"p",strong:"strong",...(0,a.R)(),...n.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(e.p,{children:[(0,o.jsx)(e.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,o.jsxs)(e.p,{children:["This page describes the components that are available in the ",(0,o.jsx)(e.strong,{children:"Baidu"})," bundle."]}),"\n",(0,o.jsx)(e.h2,{id:"qianfan",children:"Qianfan"}),"\n",(0,o.jsxs)(e.p,{children:["The ",(0,o.jsx)(e.strong,{children:"Qianfan"})," component generates text using Qianfan's language models."]}),"\n",(0,o.jsxs)(e.p,{children:["It can output either a ",(0,o.jsx)(e.strong,{children:"Model Response"})," (",(0,o.jsx)(e.a,{href:"/data-types#message",children:(0,o.jsx)(e.code,{children:"Message"})}),") or a ",(0,o.jsx)(e.strong,{children:"Language Model"})," (",(0,o.jsx)(e.a,{href:"/data-types#languagemodel",children:(0,o.jsx)(e.code,{children:"LanguageModel"})}),")."]}),"\n",(0,o.jsxs)(e.p,{children:["Use the ",(0,o.jsx)(e.strong,{children:"Language Model"})," output when you want to use a Qianfan model as the LLM for another LLM-driven component, such as an ",(0,o.jsx)(e.strong,{children:"Agent"})," or ",(0,o.jsx)(e.strong,{children:"Smart Function"})," component."]}),"\n",(0,o.jsxs)(e.p,{children:["For more information, see ",(0,o.jsxs)(e.a,{href:"/components-models",children:[(0,o.jsx)(e.strong,{children:"Language Model"})," components"]})," and ",(0,o.jsx)(e.a,{href:"https://github.com/baidubce/bce-qianfan-sdk",children:"Qianfan documentation"}),"."]})]})}function u(n={}){const{wrapper:e}={...(0,a.R)(),...n.components};return e?(0,o.jsx)(e,{...n,children:(0,o.jsx)(l,{...n})}):l(n)}}}]); \ No newline at end of file diff --git a/assets/js/baacc2a1.e7ddc6f8.js b/assets/js/baacc2a1.e7ddc6f8.js deleted file mode 100644 index 31c05a4e38..0000000000 --- a/assets/js/baacc2a1.e7ddc6f8.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[4573],{17886:(n,e,s)=>{s.d(e,{A:()=>o});s(96540);var t=s(64058),a=s(74848);function o({name:n,...e}){const s=t[n];return s?(0,a.jsx)(s,{...e}):null}},66922:(n,e,s)=>{s.r(e),s.d(e,{assets:()=>d,contentTitle:()=>r,default:()=>u,frontMatter:()=>i,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"Components/bundles-baidu","title":"Baidu","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-baidu.mdx","sourceDirName":"Components","slug":"/bundles-baidu","permalink":"/bundles-baidu","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Baidu","slug":"/bundles-baidu"},"sidebar":"docs","previous":{"title":"Azure","permalink":"/bundles-azure"},"next":{"title":"Bing","permalink":"/bundles-bing"}}');var a=s(74848),o=s(28453);s(17886);const i={title:"Baidu",slug:"/bundles-baidu"},r=void 0,d={},l=[{value:"Qianfan",id:"qianfan",level:2}];function c(n){const e={a:"a",code:"code",h2:"h2",p:"p",strong:"strong",...(0,o.R)(),...n.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(e.p,{children:[(0,a.jsx)(e.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,a.jsxs)(e.p,{children:["This page describes the components that are available in the ",(0,a.jsx)(e.strong,{children:"Baidu"})," bundle."]}),"\n",(0,a.jsx)(e.h2,{id:"qianfan",children:"Qianfan"}),"\n",(0,a.jsxs)(e.p,{children:["The ",(0,a.jsx)(e.strong,{children:"Qianfan"})," component generates text using Qianfan's language models."]}),"\n",(0,a.jsxs)(e.p,{children:["It can output either a ",(0,a.jsx)(e.strong,{children:"Model Response"})," (",(0,a.jsx)(e.a,{href:"/data-types#message",children:(0,a.jsx)(e.code,{children:"Message"})}),") or a ",(0,a.jsx)(e.strong,{children:"Language Model"})," (",(0,a.jsx)(e.a,{href:"/data-types#languagemodel",children:(0,a.jsx)(e.code,{children:"LanguageModel"})}),")."]}),"\n",(0,a.jsxs)(e.p,{children:["Use the ",(0,a.jsx)(e.strong,{children:"Language Model"})," output when you want to use a Qianfan model as the LLM for another LLM-driven component, such as a ",(0,a.jsx)(e.strong,{children:"Language Model"})," or ",(0,a.jsx)(e.strong,{children:"Smart Function"})," component."]}),"\n",(0,a.jsxs)(e.p,{children:["For more information, see ",(0,a.jsxs)(e.a,{href:"/components-models",children:[(0,a.jsx)(e.strong,{children:"Language Model"})," components"]})," and ",(0,a.jsx)(e.a,{href:"https://github.com/baidubce/bce-qianfan-sdk",children:"Qianfan documentation"}),"."]})]})}function u(n={}){const{wrapper:e}={...(0,o.R)(),...n.components};return e?(0,a.jsx)(e,{...n,children:(0,a.jsx)(c,{...n})}):c(n)}}}]); \ No newline at end of file diff --git a/assets/js/bbb8ec1d.5766cfc9.js b/assets/js/bbb8ec1d.3fda98cf.js similarity index 62% rename from assets/js/bbb8ec1d.5766cfc9.js rename to assets/js/bbb8ec1d.3fda98cf.js index c6e67dc558..63bce2cd99 100644 --- a/assets/js/bbb8ec1d.5766cfc9.js +++ b/assets/js/bbb8ec1d.3fda98cf.js @@ -1 +1 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[5838],{17886:(e,r,t)=>{t.d(r,{A:()=>i});t(96540);var n=t(64058),s=t(74848);function i({name:e,...r}){const t=n[e];return t?(0,s.jsx)(t,{...r}):null}},98234:(e,r,t)=>{t.r(r),t.d(r,{assets:()=>l,contentTitle:()=>o,default:()=>h,frontMatter:()=>d,metadata:()=>n,toc:()=>c});const n=JSON.parse('{"id":"Components/bundles-google","title":"Google components","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-google.mdx","sourceDirName":"Components","slug":"/bundles-google","permalink":"/bundles-google","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Google components","slug":"/bundles-google"},"sidebar":"docs","previous":{"title":"Glean","permalink":"/bundles-glean"},"next":{"title":"Google BigQuery","permalink":"/integrations-google-big-query"}}');var s=t(74848),i=t(28453);t(17886);const d={title:"Google components",slug:"/bundles-google"},o=void 0,l={},c=[{value:"BigQuery",id:"bigquery",level:2},{value:"Google Generative AI",id:"google-generative-ai",level:2},{value:"Google Generative AI parameters",id:"google-generative-ai-parameters",level:3},{value:"Google Generative AI Embeddings",id:"google-generative-ai-embeddings",level:2},{value:"Google Generative AI Embeddings parameters",id:"google-generative-ai-embeddings-parameters",level:3},{value:"Google Search API",id:"google-search-api",level:2},{value:"Google Search API parameters",id:"google-search-api-parameters",level:3},{value:"Serper Google Search API",id:"serper-google-search-api",level:2},{value:"Google Serper API parameters",id:"google-serper-api-parameters",level:3},{value:"Google Vertex AI",id:"google-vertex-ai",level:2},{value:"Legacy Google components",id:"legacy-google-components",level:2},{value:"See also",id:"see-also",level:2}];function a(e){const r={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components},{Details:t}=r;return t||function(e,r){throw new Error("Expected "+(r?"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)(r.p,{children:[(0,s.jsx)(r.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,s.jsxs)(r.p,{children:["This page describes the components that are available in the ",(0,s.jsx)(r.strong,{children:"Google"})," bundle."]}),"\n",(0,s.jsx)(r.h2,{id:"bigquery",children:"BigQuery"}),"\n",(0,s.jsxs)(r.p,{children:["See ",(0,s.jsxs)(r.a,{href:"/integrations-google-big-query",children:[(0,s.jsx)(r.strong,{children:"BigQuery"})," component"]}),"."]}),"\n",(0,s.jsx)(r.h2,{id:"google-generative-ai",children:"Google Generative AI"}),"\n",(0,s.jsxs)(r.p,{children:["This component generates text using ",(0,s.jsx)(r.a,{href:"https://cloud.google.com/vertex-ai/docs/",children:"Google Generative AI models"}),"."]}),"\n",(0,s.jsx)(r.h3,{id:"google-generative-ai-parameters",children:"Google Generative AI parameters"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Google API Key"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. Your Google API key to use for the Google Generative AI."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Model"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsxs)(r.td,{children:["Input parameter. The name of the model to use, such as ",(0,s.jsx)(r.code,{children:'"gemini-pro"'}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Max Output Tokens"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. The maximum number of tokens to generate."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Temperature"}),(0,s.jsx)(r.td,{children:"Float"}),(0,s.jsx)(r.td,{children:"Input parameter. Run inference with this temperature."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Top K"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. Consider the set of top K most probable tokens."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Top P"}),(0,s.jsx)(r.td,{children:"Float"}),(0,s.jsx)(r.td,{children:"Input parameter. The maximum cumulative probability of tokens to consider when sampling."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"N"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. Number of chat completions to generate for each prompt."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"model"}),(0,s.jsx)(r.td,{children:"LanguageModel"}),(0,s.jsx)(r.td,{children:"Output parameter. An instance of ChatGoogleGenerativeAI configured with the specified parameters."})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"google-generative-ai-embeddings",children:"Google Generative AI Embeddings"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Google Generative AI Embeddings"})," component connects to Google's generative AI embedding service using the GoogleGenerativeAIEmbeddings class from the ",(0,s.jsx)(r.code,{children:"langchain-google-genai"})," package."]}),"\n",(0,s.jsxs)(r.p,{children:["For more information about using embedding model components in flows, see ",(0,s.jsxs)(r.a,{href:"/components-embedding-models",children:[(0,s.jsx)(r.strong,{children:"Embedding Model"})," components"]}),"."]}),"\n",(0,s.jsx)(r.h3,{id:"google-generative-ai-embeddings-parameters",children:"Google Generative AI Embeddings parameters"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Display Name"}),(0,s.jsx)(r.th,{children:"Info"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"api_key"}),(0,s.jsx)(r.td,{children:"API Key"}),(0,s.jsx)(r.td,{children:"Input parameter. The secret API key for accessing Google's generative AI service. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"model_name"}),(0,s.jsx)(r.td,{children:"Model Name"}),(0,s.jsx)(r.td,{children:'Input parameter. The name of the embedding model to use. Default: "models/text-embedding-004".'})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embeddings"}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Output parameter. The built GoogleGenerativeAIEmbeddings object."})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"google-search-api",children:"Google Search API"}),"\n",(0,s.jsx)(r.p,{children:"This component allows you to call the Google Search API."}),"\n",(0,s.jsx)(r.h3,{id:"google-search-api-parameters",children:"Google Search API parameters"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"google_api_key"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. A Google API key for authentication."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"google_cse_id"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. A Google Custom Search Engine ID."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"input_value"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The search query input."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"k"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. The number of search results to return."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"results"}),(0,s.jsx)(r.td,{children:"List[Data]"}),(0,s.jsx)(r.td,{children:"Output parameter. A list of search results."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"tool"}),(0,s.jsx)(r.td,{children:"Tool"}),(0,s.jsx)(r.td,{children:"Output parameter. A Google Search tool for use in LangChain."})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"serper-google-search-api",children:"Serper Google Search API"}),"\n",(0,s.jsx)(r.p,{children:"This component allows you to call the Serper.dev Google Search API."}),"\n",(0,s.jsx)(r.h3,{id:"google-serper-api-parameters",children:"Google Serper API parameters"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"serper_api_key"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. An API key for Serper.dev authentication."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"input_value"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The search query input."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"k"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. The number of search results to return."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"results"}),(0,s.jsx)(r.td,{children:"List[Data]"}),(0,s.jsx)(r.td,{children:"Output parameter. A list of search results."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"tool"}),(0,s.jsx)(r.td,{children:"Tool"}),(0,s.jsx)(r.td,{children:"Output parameter. A Serper Google Search tool for use in LangChain."})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"google-vertex-ai",children:"Google Vertex AI"}),"\n",(0,s.jsxs)(r.p,{children:["For information about Vertex AI components, see the ",(0,s.jsxs)(r.a,{href:"/bundles-vertexai",children:[(0,s.jsx)(r.strong,{children:"Vertex AI"})," bundle"]}),"."]}),"\n",(0,s.jsx)(r.h2,{id:"legacy-google-components",children:"Legacy Google components"}),"\n",(0,s.jsx)(r.p,{children:"The following Google components are considered legacy components.\nYou can still use them in your flows, but they are no longer supported and can be removed in future releases."}),"\n",(0,s.jsxs)(r.p,{children:["As an alternative to these components, you can use ",(0,s.jsx)(r.a,{href:"/integrations-composio",children:"Composio components"})," to connect your flows to Google services."]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Google OAuth Token"}),(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Google OAuth Token"})," component was deprecated in Langflow 1.4.0."]}),(0,s.jsxs)(r.p,{children:["To connect your flows to Google OAuth services, use ",(0,s.jsx)(r.a,{href:"/integrations-composio",children:"Composio components"}),"."]})]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Gmail Loader"}),(0,s.jsx)(r.p,{children:"This component loads emails from Gmail using provided credentials and filters."}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Input"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"json_string"}),(0,s.jsx)(r.td,{children:"SecretStrInput"}),(0,s.jsxs)(r.td,{children:["Input parameter. A JSON string containing OAuth 2.0 access token information for service account access. For information about creating a service account JSON, see ",(0,s.jsx)(r.a,{href:"https://developers.google.com/identity/protocols/oauth2/service-account",children:"Service Account JSON"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"label_ids"}),(0,s.jsx)(r.td,{children:"MessageTextInput"}),(0,s.jsx)(r.td,{children:"Input parameter. A comma-separated list of label IDs to filter emails."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"max_results"}),(0,s.jsx)(r.td,{children:"MessageTextInput"}),(0,s.jsx)(r.td,{children:"Input parameter. The maximum number of emails to load."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"data"}),(0,s.jsx)(r.td,{children:"Data"}),(0,s.jsx)(r.td,{children:"Output parameter.The loaded email data."})]})]})]})]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Google Calendar Loader"}),(0,s.jsx)(r.p,{children:"This component accepts the following parameters:"}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Input"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"json_string"}),(0,s.jsx)(r.td,{children:"SecretStrInput"}),(0,s.jsxs)(r.td,{children:["Input parameter. A JSON string containing OAuth 2.0 access token information for service account access. For information about creating a service account JSON, see ",(0,s.jsx)(r.a,{href:"https://developers.google.com/identity/protocols/oauth2/service-account",children:"Service Account JSON"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"document_id"}),(0,s.jsx)(r.td,{children:"MessageTextInput"}),(0,s.jsx)(r.td,{children:"Input parameter. A single Google Drive document ID."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"docs"}),(0,s.jsx)(r.td,{children:"Data"}),(0,s.jsx)(r.td,{children:"Output parameter. The loaded document data."})]})]})]})]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Google Drive Search"}),(0,s.jsx)(r.p,{children:"This component searches Google Drive files using provided credentials and query parameters."}),(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Input"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"token_string"}),(0,s.jsx)(r.td,{children:"SecretStrInput"}),(0,s.jsxs)(r.td,{children:["Input parameter. A JSON string containing OAuth 2.0 access token information for service account access. For information about creating a service account JSON, see ",(0,s.jsx)(r.a,{href:"https://developers.google.com/identity/protocols/oauth2/service-account",children:"Service Account JSON"}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"query_item"}),(0,s.jsx)(r.td,{children:"DropdownInput"}),(0,s.jsx)(r.td,{children:"Input parameter. The field to query."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"valid_operator"}),(0,s.jsx)(r.td,{children:"DropdownInput"}),(0,s.jsx)(r.td,{children:"Input parameter. The operator to use in the query."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"search_term"}),(0,s.jsx)(r.td,{children:"MessageTextInput"}),(0,s.jsx)(r.td,{children:"Input parameter. The value to search for in the specified query item."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"query_string"}),(0,s.jsx)(r.td,{children:"MessageTextInput"}),(0,s.jsx)(r.td,{children:"Input parameter. The query string used for searching."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"doc_urls"}),(0,s.jsx)(r.td,{children:"List[str]"}),(0,s.jsx)(r.td,{children:"Output parameter. The URLs of the found documents."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"doc_ids"}),(0,s.jsx)(r.td,{children:"List[str]"}),(0,s.jsx)(r.td,{children:"Output parameter. The IDs of the found documents."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"doc_titles"}),(0,s.jsx)(r.td,{children:"List[str]"}),(0,s.jsx)(r.td,{children:"Output parameter. The titles of the found documents."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Data"}),(0,s.jsx)(r.td,{children:"Data"}),(0,s.jsx)(r.td,{children:"Output parameter. The document titles and URLs in a structured format."})]})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"see-also",children:"See also"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"/integrations-composio",children:"Composio bundle"})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsx)(r.a,{href:"/bundles-vertexai",children:"Vertex AI bundle"})}),"\n"]})]})}function h(e={}){const{wrapper:r}={...(0,i.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}}}]); \ No newline at end of file +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[5838],{17886:(e,r,n)=>{n.d(r,{A:()=>o});n(96540);var t=n(64058),s=n(74848);function o({name:e,...r}){const n=t[e];return n?(0,s.jsx)(n,{...r}):null}},98234:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>d,contentTitle:()=>l,default:()=>h,frontMatter:()=>i,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"Components/bundles-google","title":"Google components","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-google.mdx","sourceDirName":"Components","slug":"/bundles-google","permalink":"/bundles-google","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Google components","slug":"/bundles-google"},"sidebar":"docs","previous":{"title":"Glean","permalink":"/bundles-glean"},"next":{"title":"Google BigQuery","permalink":"/integrations-google-big-query"}}');var s=n(74848),o=n(28453);n(17886);const i={title:"Google components",slug:"/bundles-google"},l=void 0,d={},c=[{value:"BigQuery",id:"bigquery",level:2},{value:"Google Generative AI",id:"google-generative-ai",level:2},{value:"Google Generative AI parameters",id:"google-generative-ai-parameters",level:3},{value:"Google Generative AI Embeddings",id:"google-generative-ai-embeddings",level:2},{value:"Google Generative AI Embeddings parameters",id:"google-generative-ai-embeddings-parameters",level:3},{value:"Google Search API",id:"google-search-api",level:2},{value:"Google Search API parameters",id:"google-search-api-parameters",level:3},{value:"Serper Google Search API",id:"serper-google-search-api",level:2},{value:"Google Serper API parameters",id:"google-serper-api-parameters",level:3},{value:"Google Vertex AI",id:"google-vertex-ai",level:2},{value:"Legacy Google components",id:"legacy-google-components",level:2},{value:"See also",id:"see-also",level:2}];function a(e){const r={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,o.R)(),...e.components},{Details:n}=r;return n||function(e,r){throw new Error("Expected "+(r?"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)(r.p,{children:[(0,s.jsx)(r.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,s.jsxs)(r.p,{children:["This page describes the components that are available in the ",(0,s.jsx)(r.strong,{children:"Google"})," bundle."]}),"\n",(0,s.jsx)(r.h2,{id:"bigquery",children:"BigQuery"}),"\n",(0,s.jsxs)(r.p,{children:["See ",(0,s.jsxs)(r.a,{href:"/integrations-google-big-query",children:[(0,s.jsx)(r.strong,{children:"BigQuery"})," component"]}),"."]}),"\n",(0,s.jsx)(r.h2,{id:"google-generative-ai",children:"Google Generative AI"}),"\n",(0,s.jsxs)(r.p,{children:["This component generates text using ",(0,s.jsx)(r.a,{href:"https://cloud.google.com/vertex-ai/docs/",children:"Google Generative AI models"}),"."]}),"\n",(0,s.jsx)(r.h3,{id:"google-generative-ai-parameters",children:"Google Generative AI parameters"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Google API Key"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. Your Google API key to use for the Google Generative AI."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Model"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsxs)(r.td,{children:["Input parameter. The name of the model to use, such as ",(0,s.jsx)(r.code,{children:'"gemini-pro"'}),"."]})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Max Output Tokens"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. The maximum number of tokens to generate."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Temperature"}),(0,s.jsx)(r.td,{children:"Float"}),(0,s.jsx)(r.td,{children:"Input parameter. Run inference with this temperature."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Top K"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. Consider the set of top K most probable tokens."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"Top P"}),(0,s.jsx)(r.td,{children:"Float"}),(0,s.jsx)(r.td,{children:"Input parameter. The maximum cumulative probability of tokens to consider when sampling."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"N"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. Number of chat completions to generate for each prompt."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"model"}),(0,s.jsx)(r.td,{children:"LanguageModel"}),(0,s.jsx)(r.td,{children:"Output parameter. An instance of ChatGoogleGenerativeAI configured with the specified parameters."})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"google-generative-ai-embeddings",children:"Google Generative AI Embeddings"}),"\n",(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Google Generative AI Embeddings"})," component connects to Google's generative AI embedding service using the GoogleGenerativeAIEmbeddings class from the ",(0,s.jsx)(r.code,{children:"langchain-google-genai"})," package."]}),"\n",(0,s.jsxs)(r.p,{children:["For more information about using embedding model components in flows, see ",(0,s.jsxs)(r.a,{href:"/components-embedding-models",children:[(0,s.jsx)(r.strong,{children:"Embedding Model"})," components"]}),"."]}),"\n",(0,s.jsx)(r.h3,{id:"google-generative-ai-embeddings-parameters",children:"Google Generative AI Embeddings parameters"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Display Name"}),(0,s.jsx)(r.th,{children:"Info"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"api_key"}),(0,s.jsx)(r.td,{children:"API Key"}),(0,s.jsx)(r.td,{children:"Input parameter. The secret API key for accessing Google's generative AI service. Required."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"model_name"}),(0,s.jsx)(r.td,{children:"Model Name"}),(0,s.jsx)(r.td,{children:'Input parameter. The name of the embedding model to use. Default: "models/text-embedding-004".'})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"embeddings"}),(0,s.jsx)(r.td,{children:"Embeddings"}),(0,s.jsx)(r.td,{children:"Output parameter. The built GoogleGenerativeAIEmbeddings object."})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"google-search-api",children:"Google Search API"}),"\n",(0,s.jsx)(r.p,{children:"This component allows you to call the Google Search API."}),"\n",(0,s.jsx)(r.h3,{id:"google-search-api-parameters",children:"Google Search API parameters"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"google_api_key"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. A Google API key for authentication."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"google_cse_id"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. A Google Custom Search Engine ID."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"input_value"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The search query input."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"k"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. The number of search results to return."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"results"}),(0,s.jsx)(r.td,{children:"List[Data]"}),(0,s.jsx)(r.td,{children:"Output parameter. A list of search results."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"tool"}),(0,s.jsx)(r.td,{children:"Tool"}),(0,s.jsx)(r.td,{children:"Output parameter. A Google Search tool for use in LangChain."})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"serper-google-search-api",children:"Serper Google Search API"}),"\n",(0,s.jsx)(r.p,{children:"This component allows you to call the Serper.dev Google Search API."}),"\n",(0,s.jsx)(r.h3,{id:"google-serper-api-parameters",children:"Google Serper API parameters"}),"\n",(0,s.jsxs)(r.table,{children:[(0,s.jsx)(r.thead,{children:(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.th,{children:"Name"}),(0,s.jsx)(r.th,{children:"Type"}),(0,s.jsx)(r.th,{children:"Description"})]})}),(0,s.jsxs)(r.tbody,{children:[(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"serper_api_key"}),(0,s.jsx)(r.td,{children:"SecretString"}),(0,s.jsx)(r.td,{children:"Input parameter. An API key for Serper.dev authentication."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"input_value"}),(0,s.jsx)(r.td,{children:"String"}),(0,s.jsx)(r.td,{children:"Input parameter. The search query input."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"k"}),(0,s.jsx)(r.td,{children:"Integer"}),(0,s.jsx)(r.td,{children:"Input parameter. The number of search results to return."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"results"}),(0,s.jsx)(r.td,{children:"List[Data]"}),(0,s.jsx)(r.td,{children:"Output parameter. A list of search results."})]}),(0,s.jsxs)(r.tr,{children:[(0,s.jsx)(r.td,{children:"tool"}),(0,s.jsx)(r.td,{children:"Tool"}),(0,s.jsx)(r.td,{children:"Output parameter. A Serper Google Search tool for use in LangChain."})]})]})]}),"\n",(0,s.jsx)(r.h2,{id:"google-vertex-ai",children:"Google Vertex AI"}),"\n",(0,s.jsxs)(r.p,{children:["For information about Vertex AI components, see the ",(0,s.jsxs)(r.a,{href:"/bundles-vertexai",children:[(0,s.jsx)(r.strong,{children:"Vertex AI"})," bundle"]}),"."]}),"\n",(0,s.jsx)(r.h2,{id:"legacy-google-components",children:"Legacy Google components"}),"\n",(0,s.jsx)(r.p,{children:"The following Google components are considered legacy components.\nYou can still use them in your flows, but they are no longer supported and can be removed in future releases."}),"\n",(0,s.jsxs)(r.p,{children:["As an alternative to these components, you can use ",(0,s.jsx)(r.a,{href:"/integrations-composio",children:"Composio components"})," to connect your flows to Google services."]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Google OAuth Token"}),(0,s.jsxs)(r.p,{children:["The ",(0,s.jsx)(r.strong,{children:"Google OAuth Token"})," component was deprecated in Langflow 1.4.0."]}),(0,s.jsxs)(r.p,{children:["To connect your flows to Google OAuth services, use ",(0,s.jsx)(r.a,{href:"/integrations-composio",children:"Composio components"}),"."]})]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Gmail Loader"}),(0,s.jsxs)(r.p,{children:["This component loads emails from Gmail using ",(0,s.jsx)(r.a,{href:"https://developers.google.com/identity/protocols/oauth2/service-account",children:"Service Account JSON"})," credentials and label ID filters."]}),(0,s.jsxs)(r.p,{children:["As an alternative, you can use ",(0,s.jsx)(r.a,{href:"/integrations-composio",children:"Composio components"})," to connect your flows to Google services."]})]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Google Drive Loader"}),(0,s.jsxs)(r.p,{children:["This component loads documents from Google Drive using ",(0,s.jsx)(r.a,{href:"https://developers.google.com/identity/protocols/oauth2/service-account",children:"Service Account JSON"})," credentials and document ID filters."]}),(0,s.jsxs)(r.p,{children:["While there is no direct replacement, consider using the ",(0,s.jsxs)(r.a,{href:"/components-data#api-request",children:[(0,s.jsx)(r.strong,{children:"API Request"})," component"]})," to call the Google Drive API."]})]}),"\n",(0,s.jsxs)(n,{children:[(0,s.jsx)("summary",{children:"Google Drive Search"}),(0,s.jsxs)(r.p,{children:["This component searches Google Drive using ",(0,s.jsx)(r.a,{href:"https://developers.google.com/identity/protocols/oauth2/service-account",children:"Service Account JSON"})," credentials and various query strings and filters."]}),(0,s.jsxs)(r.p,{children:["While there is no direct replacement, consider using the ",(0,s.jsxs)(r.a,{href:"/components-data#api-request",children:[(0,s.jsx)(r.strong,{children:"API Request"})," component"]})," to call the Google Drive API."]})]}),"\n",(0,s.jsx)(r.h2,{id:"see-also",children:"See also"}),"\n",(0,s.jsxs)(r.ul,{children:["\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.a,{href:"/integrations-composio",children:[(0,s.jsx)(r.strong,{children:"Composio"})," bundle"]})}),"\n",(0,s.jsx)(r.li,{children:(0,s.jsxs)(r.a,{href:"/bundles-vertexai",children:[(0,s.jsx)(r.strong,{children:"Vertex AI"})," bundle"]})}),"\n"]})]})}function h(e={}){const{wrapper:r}={...(0,o.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}}}]); \ No newline at end of file diff --git a/assets/js/c76bd485.261e627c.js b/assets/js/c76bd485.261e627c.js deleted file mode 100644 index 0c115197a2..0000000000 --- a/assets/js/c76bd485.261e627c.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[3468],{17886:(e,t,n)=>{n.d(t,{A:()=>i});n(96540);var r=n(64058),s=n(74848);function i({name:e,...t}){const n=r[e];return n?(0,s.jsx)(n,{...t}):null}},60782:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>l,default:()=>m,frontMatter:()=>a,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"Components/bundles-mistralai","title":"MistralAI","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-mistralai.mdx","sourceDirName":"Components","slug":"/bundles-mistralai","permalink":"/bundles-mistralai","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"MistralAI","slug":"/bundles-mistralai"},"sidebar":"docs","previous":{"title":"Mem0","permalink":"/bundles-mem0"},"next":{"title":"Set up a Notion App","permalink":"/integrations/notion/setup"}}');var s=n(74848),i=n(28453),d=n(17886);const a={title:"MistralAI",slug:"/bundles-mistralai"},l=void 0,o={},c=[{value:"MistralAI text generation",id:"mistralai-text-generation",level:2},{value:"MistralAI text generation parameters",id:"mistralai-text-generation-parameters",level:3},{value:"MistralAI Embeddings",id:"mistralai-embeddings",level:2},{value:"MistralAI Embeddings parameters",id:"mistralai-embeddings-parameters",level:3}];function h(e){const t={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,s.jsxs)(t.p,{children:["This page describes the components that are available in the ",(0,s.jsx)(t.strong,{children:"MistralAI"})," bundle."]}),"\n",(0,s.jsxs)(t.p,{children:["For more information about MistralAI features and functionality used by MistralAI components, see the ",(0,s.jsx)(t.a,{href:"https://docs.mistral.ai",children:"MistralAI documentation"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"mistralai-text-generation",children:"MistralAI text generation"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.strong,{children:"MistralAI"})," component generates text using MistralAI LLMs."]}),"\n",(0,s.jsxs)(t.p,{children:["It can output either a ",(0,s.jsx)(t.strong,{children:"Model Response"})," (",(0,s.jsx)(t.a,{href:"/data-types#message",children:(0,s.jsx)(t.code,{children:"Message"})}),") or a ",(0,s.jsx)(t.strong,{children:"Language Model"})," (",(0,s.jsx)(t.a,{href:"/data-types#languagemodel",children:(0,s.jsx)(t.code,{children:"LanguageModel"})}),")."]}),"\n",(0,s.jsxs)(t.p,{children:["Use the ",(0,s.jsx)(t.strong,{children:"Language Model"})," output when you want to use a MistalAI model as the LLM for another LLM-driven component, such as a ",(0,s.jsx)(t.strong,{children:"Language Model"})," or ",(0,s.jsx)(t.strong,{children:"Smart Function"})," component."]}),"\n",(0,s.jsxs)(t.p,{children:["For more information, see ",(0,s.jsxs)(t.a,{href:"/components-models",children:[(0,s.jsx)(t.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"mistralai-text-generation-parameters",children:"MistralAI text generation parameters"}),"\n",(0,s.jsxs)(t.p,{children:["Many ",(0,s.jsx)(t.strong,{children:"MistralAI"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,s.jsx)(d.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(t.strong,{children:"Controls"})," in the ",(0,s.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Type"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"max_tokens"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsx)(t.td,{children:"Input parameter. The maximum number of tokens to generate. Set to 0 for unlimited tokens (advanced)."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"model_name"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsxs)(t.td,{children:["Input parameter. The name of the Mistral AI model to use. Options include ",(0,s.jsx)(t.code,{children:"open-mixtral-8x7b"}),", ",(0,s.jsx)(t.code,{children:"open-mixtral-8x22b"}),", ",(0,s.jsx)(t.code,{children:"mistral-small-latest"}),", ",(0,s.jsx)(t.code,{children:"mistral-medium-latest"}),", ",(0,s.jsx)(t.code,{children:"mistral-large-latest"}),", and ",(0,s.jsx)(t.code,{children:"codestral-latest"}),". Default: ",(0,s.jsx)(t.code,{children:"codestral-latest"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"mistral_api_base"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsxs)(t.td,{children:["Input parameter. The base URL of the Mistral API. Defaults to ",(0,s.jsx)(t.code,{children:"https://api.mistral.ai/v1"})," (advanced)."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"api_key"}),(0,s.jsx)(t.td,{children:"SecretString"}),(0,s.jsx)(t.td,{children:"Input parameter. The Mistral API Key to use for authentication."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"temperature"}),(0,s.jsx)(t.td,{children:"Float"}),(0,s.jsx)(t.td,{children:"Input parameter. Controls randomness in the output. Default: 0.5."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"max_retries"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsx)(t.td,{children:"Input parameter. Maximum number of retries for API calls. Default: 5 (advanced)."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"timeout"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsx)(t.td,{children:"Input parameter. Timeout for API calls in seconds. Default: 60 (advanced)."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"max_concurrent_requests"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsx)(t.td,{children:"Input parameter. Maximum number of concurrent API requests. Default: 3 (advanced)."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"top_p"}),(0,s.jsx)(t.td,{children:"Float"}),(0,s.jsx)(t.td,{children:"Input parameter. Nucleus sampling parameter. Default: 1 (advanced)."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"random_seed"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsx)(t.td,{children:"Input parameter. Seed for random number generation. Default: 1 (advanced)."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"safe_mode"}),(0,s.jsx)(t.td,{children:"Boolean"}),(0,s.jsx)(t.td,{children:"Input parameter. Enables safe mode for content generation (advanced)."})]})]})]}),"\n",(0,s.jsx)(t.h2,{id:"mistralai-embeddings",children:"MistralAI Embeddings"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.strong,{children:"MistralAI Embeddings"})," component generates embeddings using MistralAI models."]}),"\n",(0,s.jsxs)(t.p,{children:["For more information about using embedding model components in flows, see ",(0,s.jsxs)(t.a,{href:"/components-embedding-models",children:[(0,s.jsx)(t.strong,{children:"Embedding Model"})," components"]}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"mistralai-embeddings-parameters",children:"MistralAI Embeddings parameters"}),"\n",(0,s.jsxs)(t.p,{children:["Many ",(0,s.jsx)(t.strong,{children:"MistralAI Embeddings"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,s.jsx)(d.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(t.strong,{children:"Controls"})," in the ",(0,s.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Type"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"model"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsx)(t.td,{children:'Input parameter. The MistralAI model to use. Default: "mistral-embed".'})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"mistral_api_key"}),(0,s.jsx)(t.td,{children:"SecretString"}),(0,s.jsx)(t.td,{children:"Input parameter. The API key for authenticating with MistralAI."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"max_concurrent_requests"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsx)(t.td,{children:"Input parameter. The maximum number of concurrent API requests. Default: 64."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"max_retries"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsx)(t.td,{children:"Input parameter. The maximum number of retry attempts for failed requests. Default: 5."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"timeout"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsx)(t.td,{children:"Input parameter. The request timeout in seconds. Default: 120."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"endpoint"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsxs)(t.td,{children:["Input parameter. The custom API endpoint URL. Default: ",(0,s.jsx)(t.code,{children:"https://api.mistral.ai/v1/"}),"."]})]})]})]})]})}function m(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}}}]); \ No newline at end of file diff --git a/assets/js/c76bd485.816a0ed4.js b/assets/js/c76bd485.816a0ed4.js new file mode 100644 index 0000000000..49306f1e29 --- /dev/null +++ b/assets/js/c76bd485.816a0ed4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[3468],{17886:(e,t,n)=>{n.d(t,{A:()=>i});n(96540);var r=n(64058),s=n(74848);function i({name:e,...t}){const n=r[e];return n?(0,s.jsx)(n,{...t}):null}},31929:(e,t,n)=>{n.d(t,{Ay:()=>l,RM:()=>d});var r=n(74848),s=n(28453),i=n(17886);const d=[];function a(e){const t={a:"a",p:"p",strong:"strong",...(0,s.R)(),...e.components};return(0,r.jsxs)(t.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,r.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Controls"})," in the ",(0,r.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function l(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}},60782:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>o,contentTitle:()=>l,default:()=>m,frontMatter:()=>a,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"Components/bundles-mistralai","title":"MistralAI","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-mistralai.mdx","sourceDirName":"Components","slug":"/bundles-mistralai","permalink":"/bundles-mistralai","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"MistralAI","slug":"/bundles-mistralai"},"sidebar":"docs","previous":{"title":"Mem0","permalink":"/bundles-mem0"},"next":{"title":"Set up a Notion App","permalink":"/integrations/notion/setup"}}');var s=n(74848),i=n(28453),d=(n(17886),n(31929));const a={title:"MistralAI",slug:"/bundles-mistralai"},l=void 0,o={},c=[{value:"MistralAI text generation",id:"mistralai-text-generation",level:2},{value:"MistralAI text generation parameters",id:"mistralai-text-generation-parameters",level:3},...d.RM,{value:"MistralAI Embeddings",id:"mistralai-embeddings",level:2},{value:"MistralAI Embeddings parameters",id:"mistralai-embeddings-parameters",level:3},...d.RM];function h(e){const t={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(t.p,{children:[(0,s.jsx)(t.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,s.jsxs)(t.p,{children:["This page describes the components that are available in the ",(0,s.jsx)(t.strong,{children:"MistralAI"})," bundle."]}),"\n",(0,s.jsxs)(t.p,{children:["For more information about MistralAI features and functionality used by MistralAI components, see the ",(0,s.jsx)(t.a,{href:"https://docs.mistral.ai",children:"MistralAI documentation"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"mistralai-text-generation",children:"MistralAI text generation"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.strong,{children:"MistralAI"})," component generates text using MistralAI LLMs."]}),"\n",(0,s.jsxs)(t.p,{children:["It can output either a ",(0,s.jsx)(t.strong,{children:"Model Response"})," (",(0,s.jsx)(t.a,{href:"/data-types#message",children:(0,s.jsx)(t.code,{children:"Message"})}),") or a ",(0,s.jsx)(t.strong,{children:"Language Model"})," (",(0,s.jsx)(t.a,{href:"/data-types#languagemodel",children:(0,s.jsx)(t.code,{children:"LanguageModel"})}),")."]}),"\n",(0,s.jsxs)(t.p,{children:["Use the ",(0,s.jsx)(t.strong,{children:"Language Model"})," output when you want to use a MistralAI model as the LLM for another LLM-driven component, such as an ",(0,s.jsx)(t.strong,{children:"Agent"})," or ",(0,s.jsx)(t.strong,{children:"Smart Function"})," component."]}),"\n",(0,s.jsxs)(t.p,{children:["For more information, see ",(0,s.jsxs)(t.a,{href:"/components-models",children:[(0,s.jsx)(t.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"mistralai-text-generation-parameters",children:"MistralAI text generation parameters"}),"\n",(0,s.jsx)(d.Ay,{}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Type"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"max_tokens"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsx)(t.td,{children:"Input parameter. The maximum number of tokens to generate. Set to 0 for unlimited tokens (advanced)."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"model_name"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsxs)(t.td,{children:["Input parameter. The name of the Mistral AI model to use. Options include ",(0,s.jsx)(t.code,{children:"open-mixtral-8x7b"}),", ",(0,s.jsx)(t.code,{children:"open-mixtral-8x22b"}),", ",(0,s.jsx)(t.code,{children:"mistral-small-latest"}),", ",(0,s.jsx)(t.code,{children:"mistral-medium-latest"}),", ",(0,s.jsx)(t.code,{children:"mistral-large-latest"}),", and ",(0,s.jsx)(t.code,{children:"codestral-latest"}),". Default: ",(0,s.jsx)(t.code,{children:"codestral-latest"}),"."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"mistral_api_base"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsxs)(t.td,{children:["Input parameter. The base URL of the Mistral API. Defaults to ",(0,s.jsx)(t.code,{children:"https://api.mistral.ai/v1"})," (advanced)."]})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"api_key"}),(0,s.jsx)(t.td,{children:"SecretString"}),(0,s.jsx)(t.td,{children:"Input parameter. The Mistral API Key to use for authentication."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"temperature"}),(0,s.jsx)(t.td,{children:"Float"}),(0,s.jsx)(t.td,{children:"Input parameter. Controls randomness in the output. Default: 0.5."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"max_retries"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsx)(t.td,{children:"Input parameter. Maximum number of retries for API calls. Default: 5 (advanced)."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"timeout"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsx)(t.td,{children:"Input parameter. Timeout for API calls in seconds. Default: 60 (advanced)."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"max_concurrent_requests"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsx)(t.td,{children:"Input parameter. Maximum number of concurrent API requests. Default: 3 (advanced)."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"top_p"}),(0,s.jsx)(t.td,{children:"Float"}),(0,s.jsx)(t.td,{children:"Input parameter. Nucleus sampling parameter. Default: 1 (advanced)."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"random_seed"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsx)(t.td,{children:"Input parameter. Seed for random number generation. Default: 1 (advanced)."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"safe_mode"}),(0,s.jsx)(t.td,{children:"Boolean"}),(0,s.jsx)(t.td,{children:"Input parameter. Enables safe mode for content generation (advanced)."})]})]})]}),"\n",(0,s.jsx)(t.h2,{id:"mistralai-embeddings",children:"MistralAI Embeddings"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.strong,{children:"MistralAI Embeddings"})," component generates embeddings using MistralAI models."]}),"\n",(0,s.jsxs)(t.p,{children:["For more information about using embedding model components in flows, see ",(0,s.jsxs)(t.a,{href:"/components-embedding-models",children:[(0,s.jsx)(t.strong,{children:"Embedding Model"})," components"]}),"."]}),"\n",(0,s.jsx)(t.h3,{id:"mistralai-embeddings-parameters",children:"MistralAI Embeddings parameters"}),"\n",(0,s.jsx)(d.Ay,{}),"\n",(0,s.jsxs)(t.table,{children:[(0,s.jsx)(t.thead,{children:(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.th,{children:"Name"}),(0,s.jsx)(t.th,{children:"Type"}),(0,s.jsx)(t.th,{children:"Description"})]})}),(0,s.jsxs)(t.tbody,{children:[(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"model"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsx)(t.td,{children:'Input parameter. The MistralAI model to use. Default: "mistral-embed".'})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"mistral_api_key"}),(0,s.jsx)(t.td,{children:"SecretString"}),(0,s.jsx)(t.td,{children:"Input parameter. The API key for authenticating with MistralAI."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"max_concurrent_requests"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsx)(t.td,{children:"Input parameter. The maximum number of concurrent API requests. Default: 64."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"max_retries"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsx)(t.td,{children:"Input parameter. The maximum number of retry attempts for failed requests. Default: 5."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"timeout"}),(0,s.jsx)(t.td,{children:"Integer"}),(0,s.jsx)(t.td,{children:"Input parameter. The request timeout in seconds. Default: 120."})]}),(0,s.jsxs)(t.tr,{children:[(0,s.jsx)(t.td,{children:"endpoint"}),(0,s.jsx)(t.td,{children:"String"}),(0,s.jsxs)(t.td,{children:["Input parameter. The custom API endpoint URL. Default: ",(0,s.jsx)(t.code,{children:"https://api.mistral.ai/v1/"}),"."]})]})]})]})]})}function m(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}}}]); \ No newline at end of file diff --git a/assets/js/c7f32161.e2c79c9c.js b/assets/js/c7f32161.e2c79c9c.js new file mode 100644 index 0000000000..f6216c4bd4 --- /dev/null +++ b/assets/js/c7f32161.e2c79c9c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[9264],{17886:(e,n,s)=>{s.d(n,{A:()=>i});s(96540);var t=s(64058),r=s(74848);function i({name:e,...n}){const s=t[e];return s?(0,r.jsx)(s,{...n}):null}},29354:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>c,default:()=>p,frontMatter:()=>l,metadata:()=>t,toc:()=>o});const t=JSON.parse('{"id":"Components/bundles-bing","title":"Bing","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-bing.mdx","sourceDirName":"Components","slug":"/bundles-bing","permalink":"/bundles-bing","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Bing","slug":"/bundles-bing"},"sidebar":"docs","previous":{"title":"Baidu","permalink":"/bundles-baidu"},"next":{"title":"Cleanlab","permalink":"/integrations-cleanlab"}}');var r=s(74848),i=s(28453),a=(s(17886),s(31929));const l={title:"Bing",slug:"/bundles-bing"},c=void 0,d={},o=[{value:"Bing Search API",id:"bing-search-api",level:2},{value:"Bing Search API parameters",id:"bing-search-api-parameters",level:3},...a.RM,{value:"See also",id:"see-also",level:2}];function h(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,r.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,r.jsx)(n.strong,{children:"Bing"})," bundle."]}),"\n",(0,r.jsx)(n.h2,{id:"bing-search-api",children:"Bing Search API"}),"\n",(0,r.jsx)(n.p,{children:"This component allows you to call the Bing Search API."}),"\n",(0,r.jsxs)(n.p,{children:["It returns a list of search results as a ",(0,r.jsx)(n.a,{href:"/data-types#dataframe",children:(0,r.jsx)(n.code,{children:"DataFrame"})}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"bing-search-api-parameters",children:"Bing Search API parameters"}),"\n",(0,r.jsx)(a.Ay,{}),"\n",(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:"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:"bing_subscription_key"}),(0,r.jsx)(n.td,{children:"SecretString"}),(0,r.jsx)(n.td,{children:"Input parameter. A Bing API subscription key."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"input_value"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:"Input parameter. The search query input."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"bing_search_url"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:"Input parameter. A custom Bing Search URL."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"k"}),(0,r.jsx)(n.td,{children:"Integer"}),(0,r.jsx)(n.td,{children:"Input parameter. The number of search results to return."})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"see-also",children:"See also"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsxs)(n.a,{href:"/components-data#web-search",children:[(0,r.jsx)(n.strong,{children:"Web Search"})," component"]})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsxs)(n.a,{href:"/bundles-searchapi",children:[(0,r.jsx)(n.strong,{children:"SearchApi"})," bundle"]})}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},31929:(e,n,s)=>{s.d(n,{Ay:()=>c,RM:()=>a});var t=s(74848),r=s(28453),i=s(17886);const a=[];function l(e){const n={a:"a",p:"p",strong:"strong",...(0,r.R)(),...e.components};return(0,t.jsxs)(n.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,t.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"Controls"})," in the ",(0,t.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function c(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(l,{...e})}):l(e)}}}]); \ No newline at end of file diff --git a/assets/js/c7f32161.f2a5ff70.js b/assets/js/c7f32161.f2a5ff70.js deleted file mode 100644 index 9afa65bfdd..0000000000 --- a/assets/js/c7f32161.f2a5ff70.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[9264],{17886:(e,n,s)=>{s.d(n,{A:()=>i});s(96540);var t=s(64058),r=s(74848);function i({name:e,...n}){const s=t[e];return s?(0,r.jsx)(s,{...n}):null}},29354:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>d,contentTitle:()=>c,default:()=>p,frontMatter:()=>l,metadata:()=>t,toc:()=>h});const t=JSON.parse('{"id":"Components/bundles-bing","title":"Bing","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-bing.mdx","sourceDirName":"Components","slug":"/bundles-bing","permalink":"/bundles-bing","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Bing","slug":"/bundles-bing"},"sidebar":"docs","previous":{"title":"Baidu","permalink":"/bundles-baidu"},"next":{"title":"Cleanlab","permalink":"/integrations-cleanlab"}}');var r=s(74848),i=s(28453),a=s(17886);const l={title:"Bing",slug:"/bundles-bing"},c=void 0,d={},h=[{value:"Bing Search API",id:"bing-search-api",level:2},{value:"Bing Search API parameters",id:"bing-search-api-parameters",level:3},{value:"See also",id:"see-also",level:2}];function o(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,r.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,r.jsx)(n.strong,{children:"Bing"})," bundle."]}),"\n",(0,r.jsx)(n.h2,{id:"bing-search-api",children:"Bing Search API"}),"\n",(0,r.jsx)(n.p,{children:"This component allows you to call the Bing Search API."}),"\n",(0,r.jsxs)(n.p,{children:["It returns a list of search results as a ",(0,r.jsx)(n.a,{href:"/data-types#dataframe",children:(0,r.jsx)(n.code,{children:"DataFrame"})}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"bing-search-api-parameters",children:"Bing Search API parameters"}),"\n",(0,r.jsxs)(n.p,{children:["Some ",(0,r.jsx)(n.strong,{children:"Bing Search API"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,r.jsx)(a.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Controls"})," in the ",(0,r.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(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:"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:"bing_subscription_key"}),(0,r.jsx)(n.td,{children:"SecretString"}),(0,r.jsx)(n.td,{children:"Input parameter. A Bing API subscription key."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"input_value"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:"Input parameter. The search query input."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"bing_search_url"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:"Input parameter. A custom Bing Search URL."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"k"}),(0,r.jsx)(n.td,{children:"Integer"}),(0,r.jsx)(n.td,{children:"Input parameter. The number of search results to return."})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"see-also",children:"See also"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsxs)(n.a,{href:"/components-data#web-search",children:[(0,r.jsx)(n.strong,{children:"Web Search"})," component"]})}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsxs)(n.a,{href:"/bundles-searchapi",children:[(0,r.jsx)(n.strong,{children:"SearchApi"})," bundle"]})}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(o,{...e})}):o(e)}}}]); \ No newline at end of file diff --git a/assets/js/ca5faf5d.6cc0e60c.js b/assets/js/ca5faf5d.6cc0e60c.js new file mode 100644 index 0000000000..bc9f2a131c --- /dev/null +++ b/assets/js/ca5faf5d.6cc0e60c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[2272],{28453:(o,t,e)=>{e.d(t,{R:()=>l,x:()=>c});var s=e(96540);const n={},r=s.createContext(n);function l(o){const t=s.useContext(r);return s.useMemo(function(){return"function"==typeof o?o(t):{...t,...o}},[t,o])}function c(o){let t;return t=o.disableParentContext?"function"==typeof o.components?o.components(n):o.components||n:l(o.components),s.createElement(r.Provider,{value:t},o.children)}},88048:(o,t,e)=>{e.r(t),e.d(t,{CH:()=>y,assets:()=>D,chCodeConfig:()=>a,contentTitle:()=>p,default:()=>C,frontMatter:()=>c,metadata:()=>s,toc:()=>i});const s=JSON.parse('{"id":"API-Reference/api-monitor","title":"Monitor endpoints","description":"The /monitor endpoints are for internal Langflow functionality, primarily related to running flows in the Playground, storing chat history, and generating flow logs.","source":"@site/docs/API-Reference/api-monitor.mdx","sourceDirName":"API-Reference","slug":"/api-monitor","permalink":"/api-monitor","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Monitor endpoints","slug":"/api-monitor"},"sidebar":"docs","previous":{"title":"Logs endpoints","permalink":"/api-logs"},"next":{"title":"Build endpoints","permalink":"/api-build"}}');var n=e(74848),r=e(28453),l=e(24754);const c={title:"Monitor endpoints",slug:"/api-monitor"},p=void 0,D={},y={annotations:l.hk,Code:l.Cy},a={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},i=[{value:"Vertex builds",id:"vertex-builds",level:2},{value:"Get Vertex builds",id:"get-vertex-builds",level:3},{value:"Delete Vertex builds",id:"delete-vertex-builds",level:3},{value:"Messages endpoints",id:"messages-endpoints",level:2},{value:"Get messages",id:"get-messages",level:3},{value:"Delete messages",id:"delete-messages",level:3},{value:"Update message",id:"update-message",level:3},{value:"Update session ID",id:"update-session-id",level:3},{value:"Delete messages by session",id:"delete-messages-by-session",level:3},{value:"Get transactions",id:"get-transactions",level:2},{value:"See also",id:"see-also",level:2}];function F(o){const t={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...o.components},{Details:e}=t;return y||d("CH",!1),y.Code||d("CH.Code",!0),e||d("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",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.code,{children:"/monitor"})," endpoints are for internal Langflow functionality, primarily related to running flows in the ",(0,n.jsx)(t.strong,{children:"Playground"}),", storing chat history, and generating flow logs."]}),"\n",(0,n.jsx)(t.p,{children:"This information is primarily for those who are building custom components or contributing to the Langflow codebase in a way that requires calling or understanding these endpoints."}),"\n",(0,n.jsx)(t.p,{children:"For typical application development with Langflow, there are more appropriate options for monitoring, debugging, and memory management.\nFor more information, see the following:"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"/logging",children:"Logs"}),": Langflow log storage locations, customization options, and where to view logs in the visual editor"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"/concepts-playground",children:"Test flows in the Playground"}),": Run flows and inspect message history"]}),"\n",(0,n.jsxs)(t.li,{children:[(0,n.jsx)(t.a,{href:"/memory",children:"Memory management options"}),": Langflow storage locations and options, including the database, cache, and chat history"]}),"\n"]}),"\n",(0,n.jsx)(t.h2,{id:"vertex-builds",children:"Vertex builds"}),"\n",(0,n.jsxs)(t.p,{children:["The Vertex build endpoints (",(0,n.jsx)(t.code,{children:"/monitor/builds"}),") are exclusively for ",(0,n.jsx)(t.strong,{children:"Playground"})," functionality."]}),"\n",(0,n.jsxs)(t.p,{children:["When you run a flow in the ",(0,n.jsx)(t.strong,{children:"Playground"}),", Langflow calls the ",(0,n.jsx)(t.code,{children:"/build/$FLOW_ID/flow"})," endpoint in ",(0,n.jsx)(t.a,{href:"https://github.com/langflow-ai/langflow/blob/main/src/backend/base/langflow/api/v1/chat.py#L143",children:"chat.py"}),". This call retrieves the flow data, builds a graph, and executes the graph. As each component (or node) is executed, the ",(0,n.jsx)(t.code,{children:"build_vertex"})," function calls ",(0,n.jsx)(t.code,{children:"build_and_run"}),", which may call the individual components' ",(0,n.jsx)(t.code,{children:"def_build"})," method, if it exists. If a component doesn't have a ",(0,n.jsx)(t.code,{children:"def_build"})," function, the build still returns a component."]}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.code,{children:"build"})," function allows components to execute logic at runtime. For example, the ",(0,n.jsxs)(t.a,{href:"https://github.com/langflow-ai/langflow/blob/main/src/backend/base/langflow/components/langchain_utilities/recursive_character.py",children:[(0,n.jsx)(t.strong,{children:"Recursive Character Text Splitter"})," component"]})," is a child of the ",(0,n.jsx)(t.code,{children:"LCTextSplitterComponent"})," class. When text needs to be processed, the parent class's ",(0,n.jsx)(t.code,{children:"build"})," method is called, which creates a ",(0,n.jsx)(t.code,{children:"RecursiveCharacterTextSplitter"})," object and uses it to split the text according to the defined parameters. The split text is then passed on to the next component. This all occurs when the component is built."]}),"\n",(0,n.jsx)(t.h3,{id:"get-vertex-builds",children:"Get Vertex builds"}),"\n",(0,n.jsx)(t.p,{children:"Retrieve Vertex builds for a specific flow."}),"\n",(0,n.jsx)(y.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/monitor/builds?flow_id=",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,n.jsxs)(e,{children:[(0,n.jsx)("summary",{children:"Result"}),(0,n.jsx)(y.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "vertex_builds"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "ChatInput-NCmix"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "data"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "results"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{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:' "timestamp"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2024-12-23 19:10:57"',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:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Hello"',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:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "edit"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"False"',props:{style:{color:"#A5D6FF"}}},{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:"#A5D6FF"}}},{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:'"None"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "display_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"None"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "source"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"None"',props:{style:{color:"#A5D6FF"}}}]},{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:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "positive_feedback"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"None"',props:{style:{color:"#A5D6FF"}}},{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:'"c95bed34-f906-4aa6-84e4-68553f6db772"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',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"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Hello"',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:' "files"',props:{style:{color:"#7EE787"}}},{content:": [],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "session_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timestamp"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2024-12-23 19:10:57+00:00"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "error"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"False"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "edit"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"False"',props:{style:{color:"#A5D6FF"}}},{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:"#A5D6FF"}}},{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:'"None"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "display_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"None"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "source"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"None"',props:{style:{color:"#A5D6FF"}}}]},{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:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "positive_feedback"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"None"',props:{style:{color:"#A5D6FF"}}},{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:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "outputs"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timestamp"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2024-12-23T19:10:57"',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:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Hello"',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:'"c95bed34-f906-4aa6-84e4-68553f6db772"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"object"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "logs"',props:{style:{color:"#7EE787"}}},{content:": { ",props:{style:{color:"#C9D1D9"}}},{content:'"message"',props:{style:{color:"#7EE787"}}},{content:": [] },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Hello"',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:' "files"',props:{style:{color:"#7EE787"}}},{content:": [],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"object"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "artifacts"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Hello"',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:' "files"',props:{style:{color:"#7EE787"}}},{content:": [],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"object"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timedelta"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"0.015060124918818474",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "duration"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"15 ms"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "used_frozen_result"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "artifacts"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Hello"',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:' "files"',props:{style:{color:"#7EE787"}}},{content:": [],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"object"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "params"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"- Files: []',props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:" Message: Hello",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:" Sender: User",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:" Sender Name: User",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:" Type: object",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:'"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "valid"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "build_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"40aa200e-74db-4651-b698-f80301d2b26b"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"ChatInput-NCmix"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timestamp"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2024-12-23T19:10:58.772766Z"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "Prompt-BEn9c"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "data"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "results"',props:{style:{color:"#7EE787"}}},{content:": {},",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "outputs"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "prompt"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Answer the user as if you were a GenAI expert, enthusiastic about helping them get started building something fresh."',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"text"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "logs"',props:{style:{color:"#7EE787"}}},{content:": { ",props:{style:{color:"#C9D1D9"}}},{content:'"prompt"',props:{style:{color:"#7EE787"}}},{content:": [] },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "prompt"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "repr"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Answer the user as if you were a GenAI expert, enthusiastic about helping them get started building something fresh."',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "raw"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Answer the user as if you were a GenAI expert, enthusiastic about helping them get started building something fresh."',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"text"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "artifacts"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "prompt"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "repr"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Answer the user as if you were a GenAI expert, enthusiastic about helping them get started building something fresh."',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "raw"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Answer the user as if you were a GenAI expert, enthusiastic about helping them get started building something fresh."',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"text"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timedelta"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"0.0057758750626817346",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "duration"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"6 ms"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "used_frozen_result"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "artifacts"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "prompt"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "repr"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Answer the user as if you were a GenAI expert, enthusiastic about helping them get started building something fresh."',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "raw"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Answer the user as if you were a GenAI expert, enthusiastic about helping them get started building something fresh."',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"text"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "params"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"None"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "valid"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "build_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"39bbbfde-97fd-42a5-a9ed-d42a5c5d532b"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Prompt-BEn9c"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timestamp"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2024-12-23T19:10:58.781019Z"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "OpenAIModel-7AjrN"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "data"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "results"',props:{style:{color:"#7EE787"}}},{content:": {},",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "outputs"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text_output"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"\"Hello! \ud83c\udf1f I'm excited to help you get started on your journey to building something fresh! What do you have in mind? Whether it's a project, an idea, or a concept, let's dive in and make it happen!\"",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"text"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "model_output"',props:{style:{color:"#7EE787"}}},{content:": { ",props:{style:{color:"#C9D1D9"}}},{content:'"message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'""',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"unknown"',props:{style:{color:"#A5D6FF"}}},{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "logs"',props:{style:{color:"#7EE787"}}},{content:": { ",props:{style:{color:"#C9D1D9"}}},{content:'"text_output"',props:{style:{color:"#7EE787"}}},{content:": [] },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text_output"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "repr"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"\"Hello! \ud83c\udf1f I'm excited to help you get started on your journey to building something fresh! What do you have in mind? Whether it's a project, an idea, or a concept, let's dive in and make it happen!\"",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "raw"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"\"Hello! \ud83c\udf1f I'm excited to help you get started on your journey to building something fresh! What do you have in mind? Whether it's a project, an idea, or a concept, let's dive in and make it happen!\"",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"text"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "artifacts"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text_output"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "repr"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"\"Hello! \ud83c\udf1f I'm excited to help you get started on your journey to building something fresh! What do you have in mind? Whether it's a project, an idea, or a concept, let's dive in and make it happen!\"",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "raw"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"\"Hello! \ud83c\udf1f I'm excited to help you get started on your journey to building something fresh! What do you have in mind? Whether it's a project, an idea, or a concept, let's dive in and make it happen!\"",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"text"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timedelta"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"1.034765167045407",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "duration"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"1.03 seconds"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "used_frozen_result"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "artifacts"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text_output"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "repr"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"\"Hello! \ud83c\udf1f I'm excited to help you get started on your journey to building something fresh! What do you have in mind? Whether it's a project, an idea, or a concept, let's dive in and make it happen!\"",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "raw"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"\"Hello! \ud83c\udf1f I'm excited to help you get started on your journey to building something fresh! What do you have in mind? Whether it's a project, an idea, or a concept, let's dive in and make it happen!\"",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"text"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "params"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"None"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "valid"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "build_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"4f0ae730-a266-4d35-b89f-7b825c620a0f"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"OpenAIModel-7AjrN"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timestamp"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2024-12-23T19:10:58.790484Z"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "ChatOutput-sfUhT"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "data"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "results"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{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:' "timestamp"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2024-12-23 19:10:58"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Machine"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"AI"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "session_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"\"Hello! \ud83c\udf1f I'm excited to help you get started on your journey to building something fresh! What do you have in mind? Whether it's a project, an idea, or a concept, let's dive in and make it happen!\"",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:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "edit"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"False"',props:{style:{color:"#A5D6FF"}}},{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:"#A5D6FF"}}},{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:'"OpenAIModel-7AjrN"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "display_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"OpenAI"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "source"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"gpt-4o-mini"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "icon"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"OpenAI"',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:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "positive_feedback"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"None"',props:{style:{color:"#A5D6FF"}}},{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:'"5688356d-9f30-40ca-9907-79a7a2fc16fd"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',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"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"\"Hello! \ud83c\udf1f I'm excited to help you get started on your journey to building something fresh! What do you have in mind? Whether it's a project, an idea, or a concept, let's dive in and make it happen!\"",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Machine"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"AI"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "files"',props:{style:{color:"#7EE787"}}},{content:": [],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "session_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timestamp"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2024-12-23 19:10:58+00:00"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "error"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"False"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "edit"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"False"',props:{style:{color:"#A5D6FF"}}},{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:"#A5D6FF"}}},{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:'"OpenAIModel-7AjrN"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "display_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"OpenAI"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "source"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"gpt-4o-mini"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "icon"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"OpenAI"',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:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "positive_feedback"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"None"',props:{style:{color:"#A5D6FF"}}},{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:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "outputs"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timestamp"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2024-12-23T19:10:58"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Machine"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"AI"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "session_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"\"Hello! \ud83c\udf1f I'm excited to help you get started on your journey to building something fresh! What do you have in mind? Whether it's a project, an idea, or a concept, let's dive in and make it happen!\"",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:'"OpenAIModel-7AjrN"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "display_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"OpenAI"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "source"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"gpt-4o-mini"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "icon"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"OpenAI"',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:'"5688356d-9f30-40ca-9907-79a7a2fc16fd"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"object"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "logs"',props:{style:{color:"#7EE787"}}},{content:": { ",props:{style:{color:"#C9D1D9"}}},{content:'"message"',props:{style:{color:"#7EE787"}}},{content:": [] },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"\"Hello! \ud83c\udf1f I'm excited to help you get started on your journey to building something fresh! What do you have in mind? Whether it's a project, an idea, or a concept, let's dive in and make it happen!\"",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Machine"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"AI"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "files"',props:{style:{color:"#7EE787"}}},{content:": [],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"object"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "artifacts"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"\"Hello! \ud83c\udf1f I'm excited to help you get started on your journey to building something fresh! What do you have in mind? Whether it's a project, an idea, or a concept, let's dive in and make it happen!\"",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Machine"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"AI"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "files"',props:{style:{color:"#7EE787"}}},{content:": [],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"object"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timedelta"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"0.017838125000707805",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "duration"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"18 ms"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "used_frozen_result"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "artifacts"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"\"Hello! \ud83c\udf1f I'm excited to help you get started on your journey to building something fresh! What do you have in mind? Whether it's a project, an idea, or a concept, let's dive in and make it happen!\"",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Machine"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"AI"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "files"',props:{style:{color:"#7EE787"}}},{content:": [],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"object"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "params"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"- Files: []',props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:" Message: Hello! \ud83c\udf1f I'm excited to help you get started on your journey to building",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:" something fresh! What do you have in mind? Whether it's a project, an idea, or",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:" a concept, let's dive in and make it happen!",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:" Sender: Machine",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:" Sender Name: AI",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:" Type: object",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:'"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "valid"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "build_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"1e8b908b-aba7-403b-9e9b-eca92bb78668"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"ChatOutput-sfUhT"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timestamp"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2024-12-23T19:10:58.813268Z"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}}]},{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:"json"},annotations:[]}]})]}),"\n",(0,n.jsx)(t.h3,{id:"delete-vertex-builds",children:"Delete Vertex builds"}),"\n",(0,n.jsx)(t.p,{children:"Delete Vertex builds for a specific flow."}),"\n",(0,n.jsx)(y.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"DELETE ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/monitor/builds?flow_id=",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: */*" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,n.jsxs)(e,{children:[(0,n.jsx)("summary",{children:"Result"}),(0,n.jsx)(y.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"204 No Content",props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n",(0,n.jsx)(t.h2,{id:"messages-endpoints",children:"Messages endpoints"}),"\n",(0,n.jsxs)(t.p,{children:["The ",(0,n.jsx)(t.code,{children:"/monitor/messages"})," endpoints store, retrieve, edit, and delete records in the message table in ",(0,n.jsx)(t.a,{href:"/memory",children:(0,n.jsx)(t.code,{children:"langflow.db"})}),"\nTypically, these are called implicitly when running flows that produce message history, or when inspecting and modifying ",(0,n.jsx)(t.strong,{children:"Playground"})," memories."]}),"\n",(0,n.jsx)(t.h3,{id:"get-messages",children:"Get messages"}),"\n",(0,n.jsx)(t.p,{children:"Retrieve a list of all messages:"}),"\n",(0,n.jsx)(y.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/monitor/messages" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,n.jsxs)(t.p,{children:["To filter messages, use the ",(0,n.jsx)(t.code,{children:"flow_id"}),", ",(0,n.jsx)(t.code,{children:"session_id"}),", ",(0,n.jsx)(t.code,{children:"sender"}),", and ",(0,n.jsx)(t.code,{children:"sender_name"})," query parameters."]}),"\n",(0,n.jsxs)(t.p,{children:["To sort the results, use the ",(0,n.jsx)(t.code,{children:"order_by"})," query parameter."]}),"\n",(0,n.jsxs)(t.p,{children:["This example retrieves messages sent by ",(0,n.jsx)(t.code,{children:"Machine"})," and ",(0,n.jsx)(t.code,{children:"AI"})," in a given chat session (",(0,n.jsx)(t.code,{children:"session_id"}),") and orders the messages by timestamp."]}),"\n",(0,n.jsx)(y.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/monitor/messages?flow_id=",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'&session_id=01ce083d-748b-4b8d-97b6-33adbb6a528a&sender=Machine&sender_name=AI&order_by=timestamp" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,n.jsxs)(e,{children:[(0,n.jsx)("summary",{children:"Result"}),(0,n.jsx)(y.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"[",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"1c1d6134-9b8b-4079-931c-84dcaddf19ba"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timestamp"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2024-12-23 19:20:11 UTC"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Machine"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"AI"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "session_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"\"Hello! It's great to see you here! What exciting project or idea are you thinking about diving into today? Whether it's something fresh and innovative or a classic concept with a twist, I'm here to help you get started! Let's brainstorm together!\"",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "files"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"[]"',props:{style:{color:"#A5D6FF"}}},{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:'"OpenAIModel-7AjrN"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "display_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"OpenAI"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "source"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"gpt-4o-mini"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "icon"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"OpenAI"',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:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,n.jsx)(t.h3,{id:"delete-messages",children:"Delete messages"}),"\n",(0,n.jsx)(t.p,{children:"Delete specific messages by their IDs."}),"\n",(0,n.jsxs)(t.p,{children:["This example deletes the message retrieved in the previous ",(0,n.jsx)(t.code,{children:"GET /messages"})," example."]}),"\n",(0,n.jsx)(y.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-v -X ",props:{style:{color:"#79C0FF"}}},{content:"DELETE ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/monitor/messages" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: */*" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:'\'["MESSAGE_ID_1", "MESSAGE_ID_2"]\'',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,n.jsxs)(e,{children:[(0,n.jsx)("summary",{children:"Result"}),(0,n.jsx)(y.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"204 No Content",props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n",(0,n.jsx)(t.h3,{id:"update-message",children:"Update message"}),"\n",(0,n.jsx)(t.p,{children:"Update a specific message by its ID."}),"\n",(0,n.jsxs)(t.p,{children:["This example updates the ",(0,n.jsx)(t.code,{children:"text"})," value of message ",(0,n.jsx)(t.code,{children:"3ab66cc6-c048-48f8-ab07-570f5af7b160"}),"."]}),"\n",(0,n.jsx)(y.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"PUT ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/monitor/messages/3ab66cc6-c048-48f8-ab07-570f5af7b160" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "text": "testing 1234"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,n.jsxs)(e,{children:[(0,n.jsx)("summary",{children:"Result"}),(0,n.jsx)(y.Code,{codeConfig:a,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:'"2024-12-23T18:49:06"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "session_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"testing 1234"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "files"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:"],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "error"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "edit"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",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:'"string"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "background_color"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',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"}}},{content:'"id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"display_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"source"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "icon"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',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:"true",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:'"3ab66cc6-c048-48f8-ab07-570f5af7b160"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,n.jsx)(t.h3,{id:"update-session-id",children:"Update session ID"}),"\n",(0,n.jsx)(t.p,{children:"Update the session ID for messages."}),"\n",(0,n.jsxs)(t.p,{children:["This example updates the ",(0,n.jsx)(t.code,{children:"session_ID"})," value ",(0,n.jsx)(t.code,{children:"01ce083d-748b-4b8d-97b6-33adbb6a528a"})," to ",(0,n.jsx)(t.code,{children:"different_session_id"}),"."]}),"\n",(0,n.jsx)(y.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"PATCH ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/monitor/messages/session/01ce083d-748b-4b8d-97b6-33adbb6a528a?new_session_id=different_session_id" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,n.jsxs)(e,{children:[(0,n.jsx)("summary",{children:"Result"}),(0,n.jsx)(y.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"[",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"8dd7f064-e63a-4773-b472-ca0475249dfd"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timestamp"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2024-12-23 18:49:55 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:'"different_session_id"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"message"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "files"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"[]"',props:{style:{color:"#A5D6FF"}}},{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:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,n.jsx)(t.h3,{id:"delete-messages-by-session",children:"Delete messages by session"}),"\n",(0,n.jsx)(t.p,{children:"Delete all messages for a specific session."}),"\n",(0,n.jsx)(y.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"DELETE ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/monitor/messages/session/different_session_id_2" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: */*" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,n.jsxs)(e,{children:[(0,n.jsx)("summary",{children:"Result"}),(0,n.jsx)(y.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"HTTP/1.1 204 No Content",props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n",(0,n.jsx)(t.h2,{id:"get-transactions",children:"Get transactions"}),"\n",(0,n.jsxs)(t.p,{children:["Retrieve all transactions, which are interactions between components, for a specific flow.\nThis information is also available in ",(0,n.jsx)(t.a,{href:"/logging",children:"flow logs"}),"."]}),"\n",(0,n.jsx)(y.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/monitor/transactions?flow_id=",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'&page=1&size=50" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,n.jsxs)(e,{children:[(0,n.jsx)("summary",{children:"Result"}),(0,n.jsx)(y.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "items"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timestamp"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2024-12-23T20:05:01.061Z"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "vertex_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "target_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "inputs"',props:{style:{color:"#7EE787"}}},{content:": {},",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "outputs"',props:{style:{color:"#7EE787"}}},{content:": {},",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "status"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "error"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"3fa85f64-5717-4562-b3fc-2c963f66afa6"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"3fa85f64-5717-4562-b3fc-2c963f66afa6"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "total"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"0",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "page"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"1",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "size"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"1",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "pages"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"0",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,n.jsx)(t.h2,{id:"see-also",children:"See also"}),"\n",(0,n.jsxs)(t.ul,{children:["\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.a,{href:"/concepts-voice-mode",children:"Use voice mode"})}),"\n",(0,n.jsx)(t.li,{children:(0,n.jsx)(t.a,{href:"/session-id",children:"Session ID"})}),"\n"]})]})}function C(o={}){const{wrapper:t}={...(0,r.R)(),...o.components};return t?(0,n.jsx)(t,{...o,children:(0,n.jsx)(F,{...o})}):F(o)}function d(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/ca5faf5d.ee9648c5.js b/assets/js/ca5faf5d.ee9648c5.js deleted file mode 100644 index cc0c6e5b91..0000000000 --- a/assets/js/ca5faf5d.ee9648c5.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[2272],{11470:(o,t,e)=>{e.d(t,{A:()=>g});var n=e(96540),s=e(18215),r=e(23104),l=e(56347),c=e(205),p=e(57485),D=e(31682),y=e(70679);function a(o){return n.Children.toArray(o).filter(o=>"\n"!==o).map(o=>{if(!o||(0,n.isValidElement)(o)&&function(o){const{props:t}=o;return!!t&&"object"==typeof t&&"value"in t}(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 i(o){const{values:t,children:e}=o;return(0,n.useMemo)(()=>{const o=t??function(o){return a(o).map(({props:{value:o,label:t,attributes:e,default:n}})=>({value:o,label:t,attributes:e,default:n}))}(e);return function(o){const t=(0,D.XI)(o,(o,t)=>o.value===t.value);if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map(o=>o.value).join(", ")}" found in . Every value needs to be unique.`)}(o),o},[t,e])}function d({value:o,tabValues:t}){return t.some(t=>t.value===o)}function F({queryString:o=!1,groupId:t}){const e=(0,l.W6)(),s=function({queryString:o=!1,groupId:t}){if("string"==typeof o)return o;if(!1===o)return null;if(!0===o&&!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:o,groupId:t});return[(0,p.aZ)(s),(0,n.useCallback)(o=>{if(!s)return;const t=new URLSearchParams(e.location.search);t.set(s,o),e.replace({...e.location,search:t.toString()})},[s,e])]}function C(o){const{defaultValue:t,queryString:e=!1,groupId:s}=o,r=i(o),[l,p]=(0,n.useState)(()=>function({defaultValue:o,tabValues:t}){if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(o){if(!d({value:o,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${o}" but none of its children has the corresponding value. Available values are: ${t.map(o=>o.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return o}const e=t.find(o=>o.default)??t[0];if(!e)throw new Error("Unexpected error: 0 tabValues");return e.value}({defaultValue:t,tabValues:r})),[D,a]=F({queryString:e,groupId:s}),[C,E]=function({groupId:o}){const t=function(o){return o?`docusaurus.tab.${o}`:null}(o),[e,s]=(0,y.Dv)(t);return[e,(0,n.useCallback)(o=>{t&&s.set(o)},[t,s])]}({groupId:s}),k=(()=>{const o=D??C;return d({value:o,tabValues:r})?o:null})();(0,c.A)(()=>{k&&p(k)},[k]);return{selectedValue:l,selectValue:(0,n.useCallback)(o=>{if(!d({value:o,tabValues:r}))throw new Error(`Can't select invalid tab value=${o}`);p(o),a(o),E(o)},[a,E,r]),tabValues:r}}var E=e(92303);const k={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var u=e(74848);function h({className:o,block:t,selectedValue:e,selectValue:n,tabValues:l}){const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,r.a_)(),D=o=>{const t=o.currentTarget,s=c.indexOf(t),r=l[s].value;r!==e&&(p(t),n(r))},y=o=>{let t=null;switch(o.key){case"Enter":D(o);break;case"ArrowRight":{const e=c.indexOf(o.currentTarget)+1;t=c[e]??c[0];break}case"ArrowLeft":{const e=c.indexOf(o.currentTarget)-1;t=c[e]??c[c.length-1];break}}t?.focus()};return(0,u.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":t},o),children:l.map(({value:o,label:t,attributes:n})=>(0,u.jsx)("li",{role:"tab",tabIndex:e===o?0:-1,"aria-selected":e===o,ref:o=>{c.push(o)},onKeyDown:y,onClick:D,...n,className:(0,s.A)("tabs__item",k.tabItem,n?.className,{"tabs__item--active":e===o}),children:t??o},o))})}function m({lazy:o,children:t,selectedValue:e}){const r=(Array.isArray(t)?t:[t]).filter(Boolean);if(o){const o=r.find(o=>o.props.value===e);return o?(0,n.cloneElement)(o,{className:(0,s.A)("margin-top--md",o.props.className)}):null}return(0,u.jsx)("div",{className:"margin-top--md",children:r.map((o,t)=>(0,n.cloneElement)(o,{key:t,hidden:o.props.value!==e}))})}function A(o){const t=C(o);return(0,u.jsxs)("div",{className:(0,s.A)("tabs-container",k.tabList),children:[(0,u.jsx)(h,{...t,...o}),(0,u.jsx)(m,{...t,...o})]})}function g(o){const t=(0,E.A)();return(0,u.jsx)(A,{...o,children:a(o.children)},String(t))}},19365:(o,t,e)=>{e.d(t,{A:()=>l});e(96540);var n=e(18215);const s={tabItem:"tabItem_Ymn6"};var r=e(74848);function l({children:o,hidden:t,className:e}){return(0,r.jsx)("div",{role:"tabpanel",className:(0,n.A)(s.tabItem,e),hidden:t,children:o})}},28453:(o,t,e)=>{e.d(t,{R:()=>l,x:()=>c});var n=e(96540);const s={},r=n.createContext(s);function l(o){const t=n.useContext(r);return n.useMemo(function(){return"function"==typeof o?o(t):{...t,...o}},[t,o])}function c(o){let t;return t=o.disableParentContext?"function"==typeof o.components?o.components(s):o.components||s:l(o.components),n.createElement(r.Provider,{value:t},o.children)}},88048:(o,t,e)=>{e.r(t),e.d(t,{CH:()=>y,assets:()=>D,chCodeConfig:()=>a,contentTitle:()=>p,default:()=>F,frontMatter:()=>c,metadata:()=>n,toc:()=>i});const n=JSON.parse('{"id":"API-Reference/api-monitor","title":"Monitor endpoints","description":"The /monitor endpoints are for internal Langflow functionality, primarily related to running flows in the Playground, storing chat history, and generating flow logs.","source":"@site/docs/API-Reference/api-monitor.mdx","sourceDirName":"API-Reference","slug":"/api-monitor","permalink":"/api-monitor","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Monitor endpoints","slug":"/api-monitor"},"sidebar":"docs","previous":{"title":"Logs endpoints","permalink":"/api-logs"},"next":{"title":"Build endpoints","permalink":"/api-build"}}');var s=e(74848),r=e(28453),l=e(24754);e(11470),e(19365);const c={title:"Monitor endpoints",slug:"/api-monitor"},p=void 0,D={},y={annotations:l.hk,Code:l.Cy},a={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},i=[{value:"Vertex builds",id:"vertex-builds",level:2},{value:"Get Vertex builds",id:"get-vertex-builds",level:3},{value:"Delete Vertex builds",id:"delete-vertex-builds",level:3},{value:"Messages endpoints",id:"messages-endpoints",level:2},{value:"Get messages",id:"get-messages",level:3},{value:"Delete messages",id:"delete-messages",level:3},{value:"Update message",id:"update-message",level:3},{value:"Update session ID",id:"update-session-id",level:3},{value:"Delete messages by session",id:"delete-messages-by-session",level:3},{value:"Get transactions",id:"get-transactions",level:2},{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,r.R)(),...o.components},{Details:e}=t;return y||C("CH",!1),y.Code||C("CH.Code",!0),e||C("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)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"/monitor"})," endpoints are for internal Langflow functionality, primarily related to running flows in the ",(0,s.jsx)(t.strong,{children:"Playground"}),", storing chat history, and generating flow logs."]}),"\n",(0,s.jsx)(t.p,{children:"This information is primarily for those who are building custom components or contributing to the Langflow codebase in a way that requires calling or understanding these endpoints."}),"\n",(0,s.jsx)(t.p,{children:"For typical application development with Langflow, there are more appropriate options for monitoring, debugging, and memory management.\nFor more information, see the following:"}),"\n",(0,s.jsxs)(t.ul,{children:["\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"/logging",children:"Logs"}),": Langflow log storage locations, customization options, and where to view logs in the visual editor"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"/concepts-playground",children:"Test flows in the Playground"}),": Run flows and inspect message history"]}),"\n",(0,s.jsxs)(t.li,{children:[(0,s.jsx)(t.a,{href:"/memory",children:"Memory management options"}),": Langflow storage locations and options, including the database, cache, and chat history"]}),"\n"]}),"\n",(0,s.jsx)(t.h2,{id:"vertex-builds",children:"Vertex builds"}),"\n",(0,s.jsxs)(t.p,{children:["The Vertex build endpoints (",(0,s.jsx)(t.code,{children:"/monitor/builds"}),") are exclusively for ",(0,s.jsx)(t.strong,{children:"Playground"})," functionality."]}),"\n",(0,s.jsxs)(t.p,{children:["When you run a flow in the ",(0,s.jsx)(t.strong,{children:"Playground"}),", Langflow calls the ",(0,s.jsx)(t.code,{children:"/build/$FLOW_ID/flow"})," endpoint in ",(0,s.jsx)(t.a,{href:"https://github.com/langflow-ai/langflow/blob/main/src/backend/base/langflow/api/v1/chat.py#L143",children:"chat.py"}),". This call retrieves the flow data, builds a graph, and executes the graph. As each component (or node) is executed, the ",(0,s.jsx)(t.code,{children:"build_vertex"})," function calls ",(0,s.jsx)(t.code,{children:"build_and_run"}),", which may call the individual components' ",(0,s.jsx)(t.code,{children:"def_build"})," method, if it exists. If a component doesn't have a ",(0,s.jsx)(t.code,{children:"def_build"})," function, the build still returns a component."]}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"build"})," function allows components to execute logic at runtime. For example, the ",(0,s.jsxs)(t.a,{href:"https://github.com/langflow-ai/langflow/blob/main/src/backend/base/langflow/components/langchain_utilities/recursive_character.py",children:[(0,s.jsx)(t.strong,{children:"Recursive Character Text Splitter"})," component"]})," is a child of the ",(0,s.jsx)(t.code,{children:"LCTextSplitterComponent"})," class. When text needs to be processed, the parent class's ",(0,s.jsx)(t.code,{children:"build"})," method is called, which creates a ",(0,s.jsx)(t.code,{children:"RecursiveCharacterTextSplitter"})," object and uses it to split the text according to the defined parameters. The split text is then passed on to the next component. This all occurs when the component is built."]}),"\n",(0,s.jsx)(t.h3,{id:"get-vertex-builds",children:"Get Vertex builds"}),"\n",(0,s.jsx)(t.p,{children:"Retrieve Vertex builds for a specific flow."}),"\n",(0,s.jsx)(y.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/monitor/builds?flow_id=",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(y.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "vertex_builds"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "ChatInput-NCmix"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "data"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "results"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{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:' "timestamp"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2024-12-23 19:10:57"',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:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Hello"',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:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "edit"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"False"',props:{style:{color:"#A5D6FF"}}},{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:"#A5D6FF"}}},{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:'"None"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "display_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"None"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "source"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"None"',props:{style:{color:"#A5D6FF"}}}]},{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:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "positive_feedback"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"None"',props:{style:{color:"#A5D6FF"}}},{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:'"c95bed34-f906-4aa6-84e4-68553f6db772"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',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"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Hello"',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:' "files"',props:{style:{color:"#7EE787"}}},{content:": [],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "session_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timestamp"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2024-12-23 19:10:57+00:00"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "error"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"False"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "edit"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"False"',props:{style:{color:"#A5D6FF"}}},{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:"#A5D6FF"}}},{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:'"None"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "display_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"None"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "source"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"None"',props:{style:{color:"#A5D6FF"}}}]},{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:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "positive_feedback"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"None"',props:{style:{color:"#A5D6FF"}}},{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:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "outputs"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timestamp"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2024-12-23T19:10:57"',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:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Hello"',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:'"c95bed34-f906-4aa6-84e4-68553f6db772"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"object"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "logs"',props:{style:{color:"#7EE787"}}},{content:": { ",props:{style:{color:"#C9D1D9"}}},{content:'"message"',props:{style:{color:"#7EE787"}}},{content:": [] },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Hello"',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:' "files"',props:{style:{color:"#7EE787"}}},{content:": [],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"object"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "artifacts"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Hello"',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:' "files"',props:{style:{color:"#7EE787"}}},{content:": [],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"object"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timedelta"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"0.015060124918818474",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "duration"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"15 ms"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "used_frozen_result"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "artifacts"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Hello"',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:' "files"',props:{style:{color:"#7EE787"}}},{content:": [],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"object"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "params"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"- Files: []',props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:" Message: Hello",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:" Sender: User",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:" Sender Name: User",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:" Type: object",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:'"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "valid"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "build_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"40aa200e-74db-4651-b698-f80301d2b26b"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"ChatInput-NCmix"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timestamp"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2024-12-23T19:10:58.772766Z"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "Prompt-BEn9c"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "data"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "results"',props:{style:{color:"#7EE787"}}},{content:": {},",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "outputs"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "prompt"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Answer the user as if you were a GenAI expert, enthusiastic about helping them get started building something fresh."',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"text"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "logs"',props:{style:{color:"#7EE787"}}},{content:": { ",props:{style:{color:"#C9D1D9"}}},{content:'"prompt"',props:{style:{color:"#7EE787"}}},{content:": [] },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "prompt"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "repr"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Answer the user as if you were a GenAI expert, enthusiastic about helping them get started building something fresh."',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "raw"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Answer the user as if you were a GenAI expert, enthusiastic about helping them get started building something fresh."',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"text"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "artifacts"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "prompt"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "repr"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Answer the user as if you were a GenAI expert, enthusiastic about helping them get started building something fresh."',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "raw"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Answer the user as if you were a GenAI expert, enthusiastic about helping them get started building something fresh."',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"text"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timedelta"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"0.0057758750626817346",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "duration"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"6 ms"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "used_frozen_result"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "artifacts"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "prompt"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "repr"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Answer the user as if you were a GenAI expert, enthusiastic about helping them get started building something fresh."',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "raw"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Answer the user as if you were a GenAI expert, enthusiastic about helping them get started building something fresh."',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"text"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "params"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"None"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "valid"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "build_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"39bbbfde-97fd-42a5-a9ed-d42a5c5d532b"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Prompt-BEn9c"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timestamp"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2024-12-23T19:10:58.781019Z"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "OpenAIModel-7AjrN"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "data"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "results"',props:{style:{color:"#7EE787"}}},{content:": {},",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "outputs"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text_output"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"\"Hello! \ud83c\udf1f I'm excited to help you get started on your journey to building something fresh! What do you have in mind? Whether it's a project, an idea, or a concept, let's dive in and make it happen!\"",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"text"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "model_output"',props:{style:{color:"#7EE787"}}},{content:": { ",props:{style:{color:"#C9D1D9"}}},{content:'"message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'""',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"unknown"',props:{style:{color:"#A5D6FF"}}},{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "logs"',props:{style:{color:"#7EE787"}}},{content:": { ",props:{style:{color:"#C9D1D9"}}},{content:'"text_output"',props:{style:{color:"#7EE787"}}},{content:": [] },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text_output"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "repr"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"\"Hello! \ud83c\udf1f I'm excited to help you get started on your journey to building something fresh! What do you have in mind? Whether it's a project, an idea, or a concept, let's dive in and make it happen!\"",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "raw"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"\"Hello! \ud83c\udf1f I'm excited to help you get started on your journey to building something fresh! What do you have in mind? Whether it's a project, an idea, or a concept, let's dive in and make it happen!\"",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"text"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "artifacts"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text_output"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "repr"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"\"Hello! \ud83c\udf1f I'm excited to help you get started on your journey to building something fresh! What do you have in mind? Whether it's a project, an idea, or a concept, let's dive in and make it happen!\"",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "raw"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"\"Hello! \ud83c\udf1f I'm excited to help you get started on your journey to building something fresh! What do you have in mind? Whether it's a project, an idea, or a concept, let's dive in and make it happen!\"",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"text"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timedelta"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"1.034765167045407",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "duration"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"1.03 seconds"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "used_frozen_result"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "artifacts"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text_output"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "repr"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"\"Hello! \ud83c\udf1f I'm excited to help you get started on your journey to building something fresh! What do you have in mind? Whether it's a project, an idea, or a concept, let's dive in and make it happen!\"",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "raw"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"\"Hello! \ud83c\udf1f I'm excited to help you get started on your journey to building something fresh! What do you have in mind? Whether it's a project, an idea, or a concept, let's dive in and make it happen!\"",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"text"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "params"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"None"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "valid"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "build_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"4f0ae730-a266-4d35-b89f-7b825c620a0f"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"OpenAIModel-7AjrN"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timestamp"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2024-12-23T19:10:58.790484Z"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "ChatOutput-sfUhT"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "data"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "results"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{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:' "timestamp"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2024-12-23 19:10:58"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Machine"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"AI"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "session_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"\"Hello! \ud83c\udf1f I'm excited to help you get started on your journey to building something fresh! What do you have in mind? Whether it's a project, an idea, or a concept, let's dive in and make it happen!\"",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:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "edit"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"False"',props:{style:{color:"#A5D6FF"}}},{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:"#A5D6FF"}}},{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:'"OpenAIModel-7AjrN"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "display_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"OpenAI"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "source"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"gpt-4o-mini"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "icon"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"OpenAI"',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:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "positive_feedback"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"None"',props:{style:{color:"#A5D6FF"}}},{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:'"5688356d-9f30-40ca-9907-79a7a2fc16fd"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',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"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"\"Hello! \ud83c\udf1f I'm excited to help you get started on your journey to building something fresh! What do you have in mind? Whether it's a project, an idea, or a concept, let's dive in and make it happen!\"",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Machine"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"AI"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "files"',props:{style:{color:"#7EE787"}}},{content:": [],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "session_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timestamp"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2024-12-23 19:10:58+00:00"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "error"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"False"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "edit"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"False"',props:{style:{color:"#A5D6FF"}}},{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:"#A5D6FF"}}},{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:'"OpenAIModel-7AjrN"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "display_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"OpenAI"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "source"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"gpt-4o-mini"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "icon"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"OpenAI"',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:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "positive_feedback"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"None"',props:{style:{color:"#A5D6FF"}}},{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:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "outputs"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timestamp"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2024-12-23T19:10:58"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Machine"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"AI"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "session_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"\"Hello! \ud83c\udf1f I'm excited to help you get started on your journey to building something fresh! What do you have in mind? Whether it's a project, an idea, or a concept, let's dive in and make it happen!\"",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:'"OpenAIModel-7AjrN"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "display_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"OpenAI"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "source"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"gpt-4o-mini"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "icon"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"OpenAI"',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:'"5688356d-9f30-40ca-9907-79a7a2fc16fd"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"object"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "logs"',props:{style:{color:"#7EE787"}}},{content:": { ",props:{style:{color:"#C9D1D9"}}},{content:'"message"',props:{style:{color:"#7EE787"}}},{content:": [] },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"\"Hello! \ud83c\udf1f I'm excited to help you get started on your journey to building something fresh! What do you have in mind? Whether it's a project, an idea, or a concept, let's dive in and make it happen!\"",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Machine"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"AI"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "files"',props:{style:{color:"#7EE787"}}},{content:": [],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"object"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "artifacts"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"\"Hello! \ud83c\udf1f I'm excited to help you get started on your journey to building something fresh! What do you have in mind? Whether it's a project, an idea, or a concept, let's dive in and make it happen!\"",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Machine"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"AI"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "files"',props:{style:{color:"#7EE787"}}},{content:": [],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"object"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timedelta"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"0.017838125000707805",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "duration"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"18 ms"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "used_frozen_result"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"false",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "artifacts"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "message"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"\"Hello! \ud83c\udf1f I'm excited to help you get started on your journey to building something fresh! What do you have in mind? Whether it's a project, an idea, or a concept, let's dive in and make it happen!\"",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Machine"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"AI"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "files"',props:{style:{color:"#7EE787"}}},{content:": [],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "type"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"object"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "params"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"- Files: []',props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:" Message: Hello! \ud83c\udf1f I'm excited to help you get started on your journey to building",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:" something fresh! What do you have in mind? Whether it's a project, an idea, or",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:" a concept, let's dive in and make it happen!",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:" Sender: Machine",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:" Sender Name: AI",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:" Type: object",props:{style:{color:"#A5D6FF"}}},{content:"\\n",props:{style:{color:"#79C0FF"}}},{content:'"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "valid"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "build_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"1e8b908b-aba7-403b-9e9b-eca92bb78668"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"ChatOutput-sfUhT"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timestamp"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2024-12-23T19:10:58.813268Z"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}}]},{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:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(t.h3,{id:"delete-vertex-builds",children:"Delete Vertex builds"}),"\n",(0,s.jsx)(t.p,{children:"Delete Vertex builds for a specific flow."}),"\n",(0,s.jsx)(y.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"DELETE ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/monitor/builds?flow_id=",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: */*" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(y.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"204 No Content",props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n",(0,s.jsx)(t.h2,{id:"messages-endpoints",children:"Messages endpoints"}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"/monitor/messages"})," endpoints store, retrieve, edit, and delete records in the message table in ",(0,s.jsx)(t.a,{href:"/memory",children:(0,s.jsx)(t.code,{children:"langflow.db"})}),"\nTypically, these are called implicitly when running flows that produce message history, or when inspecting and modifying ",(0,s.jsx)(t.strong,{children:"Playground"})," memories."]}),"\n",(0,s.jsx)(t.h3,{id:"get-messages",children:"Get messages"}),"\n",(0,s.jsx)(t.p,{children:"Retrieve a list of all messages:"}),"\n",(0,s.jsx)(y.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/monitor/messages" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(t.p,{children:["To filter messages, use the ",(0,s.jsx)(t.code,{children:"flow_id"}),", ",(0,s.jsx)(t.code,{children:"session_id"}),", ",(0,s.jsx)(t.code,{children:"sender"}),", and ",(0,s.jsx)(t.code,{children:"sender_name"})," query parameters."]}),"\n",(0,s.jsxs)(t.p,{children:["To sort the results, use the ",(0,s.jsx)(t.code,{children:"order_by"})," query parameter."]}),"\n",(0,s.jsxs)(t.p,{children:["This example retrieves messages sent by ",(0,s.jsx)(t.code,{children:"Machine"})," and ",(0,s.jsx)(t.code,{children:"AI"})," in a given chat session (",(0,s.jsx)(t.code,{children:"session_id"}),") and orders the messages by timestamp."]}),"\n",(0,s.jsx)(y.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/monitor/messages?flow_id=",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'&session_id=01ce083d-748b-4b8d-97b6-33adbb6a528a&sender=Machine&sender_name=AI&order_by=timestamp" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(y.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"[",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"1c1d6134-9b8b-4079-931c-84dcaddf19ba"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timestamp"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2024-12-23 19:20:11 UTC"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Machine"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"AI"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "session_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"\"Hello! It's great to see you here! What exciting project or idea are you thinking about diving into today? Whether it's something fresh and innovative or a classic concept with a twist, I'm here to help you get started! Let's brainstorm together!\"",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "files"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"[]"',props:{style:{color:"#A5D6FF"}}},{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:'"OpenAIModel-7AjrN"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "display_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"OpenAI"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "source"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"gpt-4o-mini"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "icon"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"OpenAI"',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:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(t.h3,{id:"delete-messages",children:"Delete messages"}),"\n",(0,s.jsx)(t.p,{children:"Delete specific messages by their IDs."}),"\n",(0,s.jsxs)(t.p,{children:["This example deletes the message retrieved in the previous ",(0,s.jsx)(t.code,{children:"GET /messages"})," example."]}),"\n",(0,s.jsx)(y.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-v -X ",props:{style:{color:"#79C0FF"}}},{content:"DELETE ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/monitor/messages" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: */*" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:'\'["MESSAGE_ID_1", "MESSAGE_ID_2"]\'',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(y.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"204 No Content",props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n",(0,s.jsx)(t.h3,{id:"update-message",children:"Update message"}),"\n",(0,s.jsx)(t.p,{children:"Update a specific message by its ID."}),"\n",(0,s.jsxs)(t.p,{children:["This example updates the ",(0,s.jsx)(t.code,{children:"text"})," value of message ",(0,s.jsx)(t.code,{children:"3ab66cc6-c048-48f8-ab07-570f5af7b160"}),"."]}),"\n",(0,s.jsx)(y.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"PUT ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/monitor/messages/3ab66cc6-c048-48f8-ab07-570f5af7b160" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "text": "testing 1234"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(y.Code,{codeConfig:a,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:'"2024-12-23T18:49:06"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "sender_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "session_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"testing 1234"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "files"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:"],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "error"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "edit"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"true",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:'"string"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "background_color"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',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"}}},{content:'"id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"display_name"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"source"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:" },",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "icon"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',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:"true",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:'"3ab66cc6-c048-48f8-ab07-570f5af7b160"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(t.h3,{id:"update-session-id",children:"Update session ID"}),"\n",(0,s.jsx)(t.p,{children:"Update the session ID for messages."}),"\n",(0,s.jsxs)(t.p,{children:["This example updates the ",(0,s.jsx)(t.code,{children:"session_ID"})," value ",(0,s.jsx)(t.code,{children:"01ce083d-748b-4b8d-97b6-33adbb6a528a"})," to ",(0,s.jsx)(t.code,{children:"different_session_id"}),"."]}),"\n",(0,s.jsx)(y.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"PATCH ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/monitor/messages/session/01ce083d-748b-4b8d-97b6-33adbb6a528a?new_session_id=different_session_id" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(y.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"[",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"8dd7f064-e63a-4773-b472-ca0475249dfd"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"01ce083d-748b-4b8d-97b6-33adbb6a528a"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timestamp"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2024-12-23 18:49:55 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:'"different_session_id"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "text"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"message"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "files"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"[]"',props:{style:{color:"#A5D6FF"}}},{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:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(t.h3,{id:"delete-messages-by-session",children:"Delete messages by session"}),"\n",(0,s.jsx)(t.p,{children:"Delete all messages for a specific session."}),"\n",(0,s.jsx)(y.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"DELETE ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/monitor/messages/session/different_session_id_2" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: */*" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(y.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"HTTP/1.1 204 No Content",props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n",(0,s.jsx)(t.h2,{id:"get-transactions",children:"Get transactions"}),"\n",(0,s.jsxs)(t.p,{children:["Retrieve all transactions, which are interactions between components, for a specific flow.\nThis information is also available in ",(0,s.jsx)(t.a,{href:"/logging",children:"flow logs"}),"."]}),"\n",(0,s.jsx)(y.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/monitor/transactions?flow_id=",props:{style:{color:"#A5D6FF"}}},{content:"$FLOW_ID",props:{style:{color:"#C9D1D9"}}},{content:'&page=1&size=50" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(y.Code,{codeConfig:a,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "items"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "timestamp"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"2024-12-23T20:05:01.061Z"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "vertex_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "target_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "inputs"',props:{style:{color:"#7EE787"}}},{content:": {},",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "outputs"',props:{style:{color:"#7EE787"}}},{content:": {},",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "status"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "error"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "flow_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"3fa85f64-5717-4562-b3fc-2c963f66afa6"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"3fa85f64-5717-4562-b3fc-2c963f66afa6"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "total"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"0",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "page"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"1",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "size"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"1",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "pages"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"0",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},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:"/concepts-voice-mode",children:"Use voice mode"})}),"\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,r.R)(),...o.components};return t?(0,s.jsx)(t,{...o,children:(0,s.jsx)(d,{...o})}):d(o)}function C(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/cb17b4e0.8800737e.js b/assets/js/cb17b4e0.8800737e.js deleted file mode 100644 index 51cee13ba1..0000000000 --- a/assets/js/cb17b4e0.8800737e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[4085],{1716:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>i,default:()=>p,frontMatter:()=>a,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"Components/bundles-deepseek","title":"DeepSeek","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-deepseek.mdx","sourceDirName":"Components","slug":"/bundles-deepseek","permalink":"/bundles-deepseek","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"DeepSeek","slug":"/bundles-deepseek"},"sidebar":"docs","previous":{"title":"DataStax","permalink":"/bundles-datastax"},"next":{"title":"Docling","permalink":"/integrations-docling"}}');var r=t(74848),d=t(28453),o=t(17886);const a={title:"DeepSeek",slug:"/bundles-deepseek"},i=void 0,l={},c=[{value:"DeepSeek text generation",id:"deepseek-text-generation",level:2},{value:"DeepSeek text generation parameters",id:"deepseek-text-generation-parameters",level:3}];function h(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,d.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,r.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,r.jsx)(n.strong,{children:"DeepSeek"})," bundle."]}),"\n",(0,r.jsxs)(n.p,{children:["For more information about DeepSeek features and functionality used by DeepSeek components, see the ",(0,r.jsx)(n.a,{href:"https://api-docs.deepseek.com/",children:"DeepSeek documentation"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"deepseek-text-generation",children:"DeepSeek text generation"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"DeepSeek"})," component generates text using DeepSeek's language models."]}),"\n",(0,r.jsxs)(n.p,{children:["It can output either a ",(0,r.jsx)(n.strong,{children:"Model Response"})," (",(0,r.jsx)(n.a,{href:"/data-types#message",children:(0,r.jsx)(n.code,{children:"Message"})}),") or a ",(0,r.jsx)(n.strong,{children:"Language Model"})," (",(0,r.jsx)(n.a,{href:"/data-types#languagemodel",children:(0,r.jsx)(n.code,{children:"LanguageModel"})}),")."]}),"\n",(0,r.jsxs)(n.p,{children:["Use the ",(0,r.jsx)(n.strong,{children:"Language Model"})," output when you want to use a DeepSeek model as the LLM for another LLM-driven component, such as a ",(0,r.jsx)(n.strong,{children:"Language Model"})," or ",(0,r.jsx)(n.strong,{children:"Smart Function"})," component."]}),"\n",(0,r.jsxs)(n.p,{children:["For more information, see ",(0,r.jsxs)(n.a,{href:"/components-models",children:[(0,r.jsx)(n.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"deepseek-text-generation-parameters",children:"DeepSeek text generation parameters"}),"\n",(0,r.jsxs)(n.p,{children:["Many ",(0,r.jsx)(n.strong,{children:"DeepSeek"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,r.jsx)(o.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Controls"})," in the ",(0,r.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(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:"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:"max_tokens"}),(0,r.jsx)(n.td,{children:"Integer"}),(0,r.jsxs)(n.td,{children:["Input parameter. Maximum number of tokens to generate. Set to ",(0,r.jsx)(n.code,{children:"0"})," for unlimited. Range: ",(0,r.jsx)(n.code,{children:"0-128000"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"model_kwargs"}),(0,r.jsx)(n.td,{children:"Dictionary"}),(0,r.jsx)(n.td,{children:"Input parameter. Additional keyword arguments for the model."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"json_mode"}),(0,r.jsx)(n.td,{children:"Boolean"}),(0,r.jsx)(n.td,{children:"Input parameter. If true, outputs JSON regardless of passing a schema."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"model_name"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsxs)(n.td,{children:["Input parameter. The DeepSeek model to use. Default: ",(0,r.jsx)(n.code,{children:"deepseek-chat"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"api_base"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsxs)(n.td,{children:["Input parameter. Base URL for API requests. Default: ",(0,r.jsx)(n.code,{children:"https://api.deepseek.com"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"api_key"}),(0,r.jsx)(n.td,{children:"SecretString"}),(0,r.jsx)(n.td,{children:"Input parameter. Your DeepSeek API key for authentication."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"temperature"}),(0,r.jsx)(n.td,{children:"Float"}),(0,r.jsxs)(n.td,{children:["Input parameter. Controls randomness in responses. Range: ",(0,r.jsx)(n.code,{children:"[0.0, 2.0]"}),". Default: ",(0,r.jsx)(n.code,{children:"1.0"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"seed"}),(0,r.jsx)(n.td,{children:"Integer"}),(0,r.jsx)(n.td,{children:"Input parameter. Number initialized for random number generation. Use the same seed integer for more reproducible results, and use a different seed number for more random results."})]})]})]})]})}function p(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},17886:(e,n,t)=>{t.d(n,{A:()=>d});t(96540);var s=t(64058),r=t(74848);function d({name:e,...n}){const t=s[e];return t?(0,r.jsx)(t,{...n}):null}}}]); \ No newline at end of file diff --git a/assets/js/cb17b4e0.8fd20b57.js b/assets/js/cb17b4e0.8fd20b57.js new file mode 100644 index 0000000000..0023b75b66 --- /dev/null +++ b/assets/js/cb17b4e0.8fd20b57.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[4085],{1716:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>i,default:()=>p,frontMatter:()=>a,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"Components/bundles-deepseek","title":"DeepSeek","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-deepseek.mdx","sourceDirName":"Components","slug":"/bundles-deepseek","permalink":"/bundles-deepseek","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"DeepSeek","slug":"/bundles-deepseek"},"sidebar":"docs","previous":{"title":"DataStax","permalink":"/bundles-datastax"},"next":{"title":"Docling","permalink":"/integrations-docling"}}');var r=t(74848),d=t(28453),o=(t(17886),t(31929));const a={title:"DeepSeek",slug:"/bundles-deepseek"},i=void 0,l={},c=[{value:"DeepSeek text generation",id:"deepseek-text-generation",level:2},{value:"DeepSeek text generation parameters",id:"deepseek-text-generation-parameters",level:3},...o.RM];function h(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,d.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,r.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,r.jsx)(n.strong,{children:"DeepSeek"})," bundle."]}),"\n",(0,r.jsxs)(n.p,{children:["For more information about DeepSeek features and functionality used by DeepSeek components, see the ",(0,r.jsx)(n.a,{href:"https://api-docs.deepseek.com/",children:"DeepSeek documentation"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"deepseek-text-generation",children:"DeepSeek text generation"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"DeepSeek"})," component generates text using DeepSeek's language models."]}),"\n",(0,r.jsxs)(n.p,{children:["It can output either a ",(0,r.jsx)(n.strong,{children:"Model Response"})," (",(0,r.jsx)(n.a,{href:"/data-types#message",children:(0,r.jsx)(n.code,{children:"Message"})}),") or a ",(0,r.jsx)(n.strong,{children:"Language Model"})," (",(0,r.jsx)(n.a,{href:"/data-types#languagemodel",children:(0,r.jsx)(n.code,{children:"LanguageModel"})}),")."]}),"\n",(0,r.jsxs)(n.p,{children:["Use the ",(0,r.jsx)(n.strong,{children:"Language Model"})," output when you want to use a DeepSeek model as the LLM for another LLM-driven component, such as an ",(0,r.jsx)(n.strong,{children:"Agent"})," or ",(0,r.jsx)(n.strong,{children:"Smart Function"})," component."]}),"\n",(0,r.jsxs)(n.p,{children:["For more information, see ",(0,r.jsxs)(n.a,{href:"/components-models",children:[(0,r.jsx)(n.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"deepseek-text-generation-parameters",children:"DeepSeek text generation parameters"}),"\n",(0,r.jsx)(o.Ay,{}),"\n",(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:"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:"max_tokens"}),(0,r.jsx)(n.td,{children:"Integer"}),(0,r.jsxs)(n.td,{children:["Input parameter. Maximum number of tokens to generate. Set to ",(0,r.jsx)(n.code,{children:"0"})," for unlimited. Range: ",(0,r.jsx)(n.code,{children:"0-128000"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"model_kwargs"}),(0,r.jsx)(n.td,{children:"Dictionary"}),(0,r.jsx)(n.td,{children:"Input parameter. Additional keyword arguments for the model."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"json_mode"}),(0,r.jsx)(n.td,{children:"Boolean"}),(0,r.jsx)(n.td,{children:"Input parameter. If true, outputs JSON regardless of passing a schema."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"model_name"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsxs)(n.td,{children:["Input parameter. The DeepSeek model to use. Default: ",(0,r.jsx)(n.code,{children:"deepseek-chat"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"api_base"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsxs)(n.td,{children:["Input parameter. Base URL for API requests. Default: ",(0,r.jsx)(n.code,{children:"https://api.deepseek.com"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"api_key"}),(0,r.jsx)(n.td,{children:"SecretString"}),(0,r.jsx)(n.td,{children:"Input parameter. Your DeepSeek API key for authentication."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"temperature"}),(0,r.jsx)(n.td,{children:"Float"}),(0,r.jsxs)(n.td,{children:["Input parameter. Controls randomness in responses. Range: ",(0,r.jsx)(n.code,{children:"[0.0, 2.0]"}),". Default: ",(0,r.jsx)(n.code,{children:"1.0"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"seed"}),(0,r.jsx)(n.td,{children:"Integer"}),(0,r.jsx)(n.td,{children:"Input parameter. Number initialized for random number generation. Use the same seed integer for more reproducible results, and use a different seed number for more random results."})]})]})]})]})}function p(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},17886:(e,n,t)=>{t.d(n,{A:()=>d});t(96540);var s=t(64058),r=t(74848);function d({name:e,...n}){const t=s[e];return t?(0,r.jsx)(t,{...n}):null}},31929:(e,n,t)=>{t.d(n,{Ay:()=>i,RM:()=>o});var s=t(74848),r=t(28453),d=t(17886);const o=[];function a(e){const n={a:"a",p:"p",strong:"strong",...(0,r.R)(),...e.components};return(0,s.jsxs)(n.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,s.jsx)(d.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Controls"})," in the ",(0,s.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function i(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}}}]); \ No newline at end of file diff --git a/assets/js/cce672fb.3c1f85b9.js b/assets/js/cce672fb.3c1f85b9.js new file mode 100644 index 0000000000..046d514efa --- /dev/null +++ b/assets/js/cce672fb.3c1f85b9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[6311],{17886:(e,n,t)=>{t.d(n,{A:()=>r});t(96540);var o=t(64058),s=t(74848);function r({name:e,...n}){const t=o[e];return t?(0,s.jsx)(t,{...n}):null}},24770:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/agent-example-add-chat-0fec77d5cd551fa755eb013c7aa5e1f0.png"},25194:(e,n,t)=>{t.d(n,{Ay:()=>i,RM:()=>r});var o=t(74848),s=t(28453);const r=[];function a(e){const n={code:"code",em:"em",p:"p",...(0,s.R)(),...e.components},{Details:t}=n;return t||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,o.jsxs)(t,{children:[(0,o.jsx)("summary",{children:"How do agents work?"}),(0,o.jsxs)(n.p,{children:["Agents extend Large Language Models (LLMs) by integrating ",(0,o.jsx)(n.em,{children:"tools"}),", which are functions that provide additional context and enable autonomous task execution.\nThese integrations make agents more specialized and powerful than standalone LLMs."]}),(0,o.jsx)(n.p,{children:"Whereas an LLM might generate acceptable, inert responses to general queries and tasks, an agent can leverage the integrated context and tools to provide more relevant responses and even take action.\nFor example, you might create an agent that can access your company's documentation, repositories, and other resources to help your team with tasks that require knowledge of your specific products, customers, and code."}),(0,o.jsx)(n.p,{children:"Agents use LLMs as a reasoning engine to process input, determine which actions to take to address the query, and then generate a response.\nThe response could be a typical text-based LLM response, or it could involve an action, like editing a file, running a script, or calling an external API."}),(0,o.jsxs)(n.p,{children:["In an agentic context, tools are functions that the agent can run to perform tasks or access external resources.\nA function is wrapped as a ",(0,o.jsx)(n.code,{children:"Tool"})," object with a common interface that the agent understands.\nAgents become aware of tools through tool registration, which is when the agent is provided a list of available tools typically at agent initialization.\nThe ",(0,o.jsx)(n.code,{children:"Tool"})," object's description tells the agent what the tool can do so that it can decide whether the tool is appropriate for a given request."]})]})}function i(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(a,{...e})}):a(e)}},31929:(e,n,t)=>{t.d(n,{Ay:()=>c,RM:()=>a});var o=t(74848),s=t(28453),r=t(17886);const a=[];function i(e){const n={a:"a",p:"p",strong:"strong",...(0,s.R)(),...e.components};return(0,o.jsxs)(n.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,o.jsx)(r.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,o.jsx)(n.strong,{children:"Controls"})," in the ",(0,o.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function c(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(i,{...e})}):i(e)}},65535:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/agent-example-add-tools-a55635c0c740ce8a71bd7f1ecef2736f.png"},67800:(e,n,t)=>{t.r(n),t.d(n,{CH:()=>g,assets:()=>p,chCodeConfig:()=>u,contentTitle:()=>h,default:()=>j,frontMatter:()=>d,metadata:()=>o,toc:()=>m});const o=JSON.parse('{"id":"Agents/agents","title":"Use Langflow agents","description":"Langflow\'s Agent component is critical for building agent flows.","source":"@site/docs/Agents/agents.mdx","sourceDirName":"Agents","slug":"/agents","permalink":"/agents","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Use Langflow agents","slug":"/agents"},"sidebar":"docs","previous":{"title":"Import and export flows","permalink":"/concepts-flows-import"},"next":{"title":"Configure tools for agents","permalink":"/agents-tools"}}');var s=t(74848),r=t(28453),a=t(24754),i=t(17886),c=t(31929),l=t(25194);const d={title:"Use Langflow agents",slug:"/agents"},h=void 0,p={},g={annotations:a.hk,Code:a.Cy},u={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},m=[...l.RM,{value:"Use the Agent component in a flow",id:"use-the-agent-component-in-a-flow",level:2},{value:"Agent component parameters",id:"agent-component-parameters",level:2},...c.RM,{value:"Provider and model",id:"provider-and-model",level:3},{value:"Model provider API key",id:"model-provider-api-key",level:3},{value:"Agent instructions and input",id:"agent-instructions-and-input",level:3},{value:"Tools",id:"tools",level:3},{value:"Agent memory",id:"agent-memory",level:3},{value:"Additional parameters",id:"additional-parameters",level:3},...c.RM,{value:"Agent component output",id:"agent-component-output",level:2},{value:"See also",id:"see-also",level:2}];function x(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return g||f("CH",!1),g.Code||f("CH.Code",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n","\n",(0,s.jsxs)(n.p,{children:["Langflow's ",(0,s.jsxs)(n.a,{href:"/components-agents",children:[(0,s.jsx)(n.strong,{children:"Agent"})," component"]})," is critical for building agent flows.\nThis component provides everything you need to create an agent, including multiple Large Language Model (LLM) providers, tool calling, and custom instructions.\nIt simplifies agent configuration so you can focus on application development."]}),"\n",(0,s.jsx)(l.Ay,{}),"\n",(0,s.jsx)(n.h2,{id:"use-the-agent-component-in-a-flow",children:"Use the Agent component in a flow"}),"\n",(0,s.jsxs)(n.p,{children:["The following steps explain how to create an agent flow in Langflow from a blank flow.\nFor a prebuilt example, use the ",(0,s.jsx)(n.strong,{children:"Simple Agent"})," template or the ",(0,s.jsx)(n.a,{href:"/get-started-quickstart",children:"Langflow quickstart"}),"."]}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Click ",(0,s.jsx)(n.strong,{children:"New Flow"}),", and then click ",(0,s.jsx)(n.strong,{children:"Blank Flow"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Add an ",(0,s.jsx)(n.strong,{children:"Agent"})," component to your flow."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Enter a valid OpenAI API key."}),"\n",(0,s.jsxs)(n.p,{children:["The default model for the ",(0,s.jsx)(n.strong,{children:"Agent"})," component is an OpenAI model.\nIf you want to use a different provider, edit the ",(0,s.jsx)(n.strong,{children:"Model Provider"}),", ",(0,s.jsx)(n.strong,{children:"Model Name"}),", and ",(0,s.jsx)(n.strong,{children:"API Key"})," fields accordingly.\nFor more information, see ",(0,s.jsx)(n.a,{href:"#agent-component-parameters",children:"Agent component parameters"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Add ",(0,s.jsxs)(n.a,{href:"/components-io",children:[(0,s.jsx)(n.strong,{children:"Chat Input"})," and ",(0,s.jsx)(n.strong,{children:"Chat Output"})," components"]})," to your flow, and then connect them to the ",(0,s.jsx)(n.strong,{children:"Agent"})," component."]}),"\n",(0,s.jsxs)(n.p,{children:["At this point, you have created a basic LLM-based chat flow that you can test in the ",(0,s.jsx)(i.A,{name:"Play","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Playground"}),".\nHowever, this flow only chats with the LLM.\nTo enhance this flow and make it truly agentic, add some tools, as explained in the next steps."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"A basic agent chat flow with Chat Input, Agent, and Chat Output components.",src:t(24770).A+"",width:"3704",height:"2572"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Add ",(0,s.jsx)(n.strong,{children:"News Search"}),", ",(0,s.jsx)(n.strong,{children:"URL"}),", and ",(0,s.jsx)(n.strong,{children:"Calculator"})," components to your flow."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Enable ",(0,s.jsx)(n.strong,{children:"Tool Mode"})," in the ",(0,s.jsx)(n.strong,{children:"News Search"}),", ",(0,s.jsx)(n.strong,{children:"URL"}),", and ",(0,s.jsx)(n.strong,{children:"Calculator"})," components:"]}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Click the ",(0,s.jsx)(n.strong,{children:"News Search"})," component to expose the ",(0,s.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),", and then enable ",(0,s.jsx)(n.strong,{children:"Tool Mode"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Repeat for the ",(0,s.jsx)(n.strong,{children:"URL"})," and ",(0,s.jsx)(n.strong,{children:"Calculator"})," components."]}),"\n",(0,s.jsxs)(n.li,{children:["Connect the ",(0,s.jsx)(n.strong,{children:"Toolset"})," port for each tool component to the ",(0,s.jsx)(n.strong,{children:"Tools"})," port on the ",(0,s.jsx)(n.strong,{children:"Agent"})," component."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Tool Mode"})," makes a component into a tool by modifying the component's inputs.\nWith ",(0,s.jsx)(n.strong,{children:"Tool Mode"})," enabled, a component can accept requests from an ",(0,s.jsx)(n.strong,{children:"Agent"})," component to use the component's available actions as tools."]}),"\n",(0,s.jsxs)(n.p,{children:["When in ",(0,s.jsx)(n.strong,{children:"Tool Mode"}),", a component has a ",(0,s.jsx)(n.strong,{children:"Toolset"})," port that you must connect to an ",(0,s.jsx)(n.strong,{children:"Agent"})," component's ",(0,s.jsx)(n.strong,{children:"Tools"})," port if you want to allow the agent to use that component's actions as tools."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information, see ",(0,s.jsx)(n.a,{href:"/agents-tools",children:"Configure tools for agents"}),"."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"A more complex agent chat flow where three components are connected to the Agent component as tools",src:t(65535).A+"",width:"3380",height:"3012"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Open the ",(0,s.jsx)(i.A,{name:"Play","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Playground"}),", and then ask the agent, ",(0,s.jsx)(n.code,{children:"What tools are you using to answer my questions?"})]}),"\n",(0,s.jsx)(n.p,{children:"The agent should respond with a list of the connected tools.\nIt may also include built-in tools."}),"\n",(0,s.jsx)(g.Code,{codeConfig:u,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"I use a combination of my built-in knowledge (up to June 2024) and a set of external tools to answer your questions. Here are the main types of tools I can use:",props:{}}]},{tokens:[{content:"Web Search & Content Fetching: I can fetch and summarize content from web pages, including crawling links recursively.",props:{}}]},{tokens:[{content:"News Search: I can search for recent news articles using Google News via RSS feeds.",props:{}}]},{tokens:[{content:"Calculator: I can perform arithmetic calculations and evaluate mathematical expressions.",props:{}}]},{tokens:[{content:"Date & Time: I can provide the current date and time in various time zones.",props:{}}]},{tokens:[{content:"These tools help me provide up-to-date information, perform calculations, and retrieve specific data from the internet when needed. If you have a specific question, let me know, and I'll use the most appropriate tool(s) to help!",props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["To test a specific tool, ask the agent a question that uses one of the tools, such as ",(0,s.jsx)(n.code,{children:"Summarize today's tech news"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["To help you debug and test your flows, the ",(0,s.jsx)(n.strong,{children:"Playground"})," displays the agent's tool calls, the provided input, and the raw output the agent received before generating the summary.\nWith the given example, the agent should call the ",(0,s.jsx)(n.strong,{children:"News Search"})," component's ",(0,s.jsx)(n.code,{children:"search_news"})," action."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"You've successfully created a basic agent flow that uses some generic tools."}),"\n",(0,s.jsxs)(n.p,{children:["To continue building on this tutorial, try connecting other tool components or ",(0,s.jsx)(n.a,{href:"/mcp-client",children:"use Langflow as an MCP client"})," to support more complex and specialized tasks."]}),"\n",(0,s.jsxs)(n.p,{children:["For a multi-agent example, see ",(0,s.jsx)(n.a,{href:"/agents-tools#use-an-agent-as-a-tool",children:"Use an agent as a tool"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"agent-component-parameters",children:"Agent component parameters"}),"\n",(0,s.jsxs)(n.p,{children:["You can configure the ",(0,s.jsx)(n.strong,{children:"Agent"})," component to use your preferred provider and model, custom instructions, and tools."]}),"\n",(0,s.jsx)(c.Ay,{}),"\n",(0,s.jsx)(n.h3,{id:"provider-and-model",children:"Provider and model"}),"\n",(0,s.jsxs)(n.p,{children:["Use the ",(0,s.jsx)(n.strong,{children:"Model Provider"})," (",(0,s.jsx)(n.code,{children:"agent_llm"}),") and ",(0,s.jsx)(n.strong,{children:"Model Name"})," (",(0,s.jsx)(n.code,{children:"llm_model"}),") settings to select the model provider and LLM that you want the agent to use."]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Agent"})," component includes many models from several popular model providers.\nTo access other providers and models, set ",(0,s.jsx)(n.strong,{children:"Model Provider"})," to ",(0,s.jsx)(n.strong,{children:"Custom"}),", and then connect any ",(0,s.jsxs)(n.a,{href:"/components-models",children:[(0,s.jsx)(n.strong,{children:"Language Model"})," component"]}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["If you need to generate embeddings in your flow, use an ",(0,s.jsxs)(n.a,{href:"/components-embedding-models",children:[(0,s.jsx)(n.strong,{children:"Embedding Model"})," component"]}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"model-provider-api-key",children:"Model provider API key"}),"\n",(0,s.jsxs)(n.p,{children:["In the ",(0,s.jsx)(n.strong,{children:"API Key"})," field, enter a valid authentication key for your selected model provider, if you are using a built-in provider.\nFor example, to use the default OpenAI model, you must provide a valid OpenAI API key for an OpenAI account that has credits and permission to call OpenAI LLMs."]}),"\n",(0,s.jsxs)(n.p,{children:["You can enter the key directly, but it is recommended that you follow industry best practices for storing and referencing API keys.\nFor example, you can use a ",(0,s.jsx)(i.A,{name:"Globe","aria-hidden":"true"})," ",(0,s.jsx)(n.a,{href:"/configuration-global-variables",children:"global variable"})," or ",(0,s.jsx)(n.a,{href:"/environment-variables",children:"environment variables"}),".\nFor more information, see ",(0,s.jsx)(n.a,{href:"/api-keys-and-authentication#component-api-keys",children:"Add component API keys to Langflow"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["If you select ",(0,s.jsx)(n.strong,{children:"Custom"})," as the model provider, authentication is handled in the incoming ",(0,s.jsx)(n.strong,{children:"Language Model"})," component."]}),"\n",(0,s.jsx)(n.h3,{id:"agent-instructions-and-input",children:"Agent instructions and input"}),"\n",(0,s.jsxs)(n.p,{children:["In the ",(0,s.jsx)(n.strong,{children:"Agent Instructions"})," (",(0,s.jsx)(n.code,{children:"system_prompt"}),") field, you can provide custom instructions that you want the ",(0,s.jsx)(n.strong,{children:"Agent"})," component to use for every conversation."]}),"\n",(0,s.jsxs)(n.p,{children:["These instructions are applied in addition to the ",(0,s.jsx)(n.strong,{children:"Input"})," (",(0,s.jsx)(n.code,{children:"input_value"}),"), which can be entered directly or provided through another component, such as a ",(0,s.jsx)(n.strong,{children:"Chat Input"})," component."]}),"\n",(0,s.jsx)(n.h3,{id:"tools",children:"Tools"}),"\n",(0,s.jsx)(n.p,{children:"Agents are most useful when they have the appropriate tools available to complete requests."}),"\n",(0,s.jsxs)(n.p,{children:["An ",(0,s.jsx)(n.strong,{children:"Agent"})," component can use any Langflow component as a tool, including other agents and MCP servers."]}),"\n",(0,s.jsxs)(n.p,{children:["To attach a component as a tool, you must enable ",(0,s.jsx)(n.strong,{children:"Tool Mode"})," on the component that you want to attach, and then attach it to the ",(0,s.jsx)(n.strong,{children:"Agent"})," component's ",(0,s.jsx)(n.strong,{children:"Tools"})," port.\nFor more information, see ",(0,s.jsx)(n.a,{href:"/agents-tools",children:"Configure tools for agents"}),"."]}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsxs)(n.p,{children:["To allow agents to use tools from MCP servers, use the ",(0,s.jsxs)(n.a,{href:"/components-agents#mcp-connection",children:[(0,s.jsx)(n.strong,{children:"MCP Tools"})," component"]}),"."]})}),"\n",(0,s.jsx)(n.h3,{id:"agent-memory",children:"Agent memory"}),"\n",(0,s.jsx)(n.p,{children:"Langflow agents have built-in chat memory that is enabled by default.\nThis memory allows them to retrieve and reference messages from previous conversations, maintaining a rolling context window for each chat session ID."}),"\n",(0,s.jsxs)(n.p,{children:["Chat memories are grouped by ",(0,s.jsxs)(n.a,{href:"/session-id",children:["session ID (",(0,s.jsx)(n.code,{children:"session_id"}),")"]}),".\nIt is recommended to use custom session IDs if you need to segregate chat memory for different users or applications that run the same flow."]}),"\n",(0,s.jsxs)(n.p,{children:["By default, the ",(0,s.jsx)(n.strong,{children:"Agent"})," component uses your Langflow installation's storage, and it retrieves a limited number of chat messages, which you can configure with the ",(0,s.jsx)(n.strong,{children:"Number of Chat History Messages"})," parameter."]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Message History"})," component isn't required for default chat memory, but it is required if you want to use external chat memory like Mem0.\nAdditionally, the ",(0,s.jsx)(n.strong,{children:"Message History"})," component provides more options for sorting, filtering, and limiting memories. Although, most of these options are built-in to the ",(0,s.jsx)(n.strong,{children:"Agent"})," component with default values."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information, see ",(0,s.jsx)(n.a,{href:"/memory#store-chat-memory",children:"Store chat memory"})," and ",(0,s.jsxs)(n.a,{href:"/components-helpers#message-history",children:[(0,s.jsx)(n.strong,{children:"Message History"})," component"]}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"additional-parameters",children:"Additional parameters"}),"\n",(0,s.jsxs)(n.p,{children:["With the ",(0,s.jsx)(n.strong,{children:"Agent"})," component, the available parameters can change depending on the selected provider and model, including support for additional modes, arguments, or features like chat memory and temperature.\nFor example:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Current Date"})," (",(0,s.jsx)(n.code,{children:"add_current_date_tool"}),"): When enabled (true), this setting adds a tool to the agent that can retrieve the current date."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Handle Parse Errors"})," (",(0,s.jsx)(n.code,{children:"handle_parsing_errors"}),"): When enabled (true), this setting allows the agent to fix errors, like typos, when analyzing user input."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Verbose"})," (",(0,s.jsx)(n.code,{children:"verbose"}),"): When enabled (true), this setting records detailed logging output for debugging and analysis."]}),"\n"]}),"\n",(0,s.jsx)(c.Ay,{}),"\n",(0,s.jsx)(n.h2,{id:"agent-component-output",children:"Agent component output"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Agent"})," component outputs a ",(0,s.jsx)(n.strong,{children:"Response"})," (",(0,s.jsx)(n.code,{children:"response"}),") that is ",(0,s.jsxs)(n.a,{href:"/data-types#message",children:[(0,s.jsx)(n.code,{children:"Message"})," data"]})," containing the agent's raw response to the query."]}),"\n",(0,s.jsxs)(n.p,{children:["Typically, this is passed to a ",(0,s.jsx)(n.strong,{children:"Chat Output"})," component to return the response in a human-readable format.\nIt can also be passed to other components if you need to process the response further before, or in addition to, returning it to the user."]}),"\n",(0,s.jsx)(n.h2,{id:"see-also",children:"See also"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsxs)(n.a,{href:"/components-agents",children:[(0,s.jsx)(n.strong,{children:"Agent"})," and ",(0,s.jsx)(n.strong,{children:"MCP Tools"})," components"]})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/agents-tools",children:"Configure tools for agents"})}),"\n"]})]})}function j(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(x,{...e})}):x(e)}function f(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}}}]); \ No newline at end of file diff --git a/assets/js/cce672fb.57c7829d.js b/assets/js/cce672fb.57c7829d.js deleted file mode 100644 index a56bbae201..0000000000 --- a/assets/js/cce672fb.57c7829d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[6311],{17886:(e,n,t)=>{t.d(n,{A:()=>r});t(96540);var o=t(64058),s=t(74848);function r({name:e,...n}){const t=o[e];return t?(0,s.jsx)(t,{...n}):null}},24770:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/agent-example-add-chat-0fec77d5cd551fa755eb013c7aa5e1f0.png"},65535:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/agent-example-add-tools-a55635c0c740ce8a71bd7f1ecef2736f.png"},67800:(e,n,t)=>{t.r(n),t.d(n,{CH:()=>h,assets:()=>d,chCodeConfig:()=>p,contentTitle:()=>c,default:()=>m,frontMatter:()=>l,metadata:()=>o,toc:()=>g});const o=JSON.parse('{"id":"Agents/agents","title":"Use Langflow agents","description":"Langflow\'s Agent component is critical for building agent flows.","source":"@site/docs/Agents/agents.mdx","sourceDirName":"Agents","slug":"/agents","permalink":"/agents","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Use Langflow agents","slug":"/agents"},"sidebar":"docs","previous":{"title":"Import and export flows","permalink":"/concepts-flows-import"},"next":{"title":"Configure tools for agents","permalink":"/agents-tools"}}');var s=t(74848),r=t(28453),a=t(24754),i=t(17886);const l={title:"Use Langflow agents",slug:"/agents"},c=void 0,d={},h={annotations:a.hk,Code:a.Cy},p={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},g=[{value:"Use the Agent component in a flow",id:"use-the-agent-component-in-a-flow",level:2},{value:"Agent component parameters",id:"agent-component-parameters",level:2},{value:"Provider and model",id:"provider-and-model",level:3},{value:"Model provider API key",id:"model-provider-api-key",level:3},{value:"Agent instructions and input",id:"agent-instructions-and-input",level:3},{value:"Tools",id:"tools",level:3},{value:"Agent memory",id:"agent-memory",level:3},{value:"Additional parameters",id:"additional-parameters",level:3},{value:"Agent component output",id:"agent-component-output",level:2},{value:"See also",id:"see-also",level:2}];function u(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",ul:"ul",...(0,r.R)(),...e.components},{Details:o}=n;return h||x("CH",!1),h.Code||x("CH.Code",!0),o||x("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)(n.p,{children:["Langflow's ",(0,s.jsxs)(n.a,{href:"/components-agents",children:[(0,s.jsx)(n.strong,{children:"Agent"})," component"]})," is critical for building agent flows.\nThis component provides everything you need to create an agent, including multiple Large Language Model (LLM) providers, tool calling, and custom instructions.\nIt simplifies agent configuration so you can focus on application development."]}),"\n",(0,s.jsxs)(o,{children:[(0,s.jsx)("summary",{children:"How do agents work?"}),(0,s.jsxs)(n.p,{children:["Agents extend LLMs by integrating ",(0,s.jsx)(n.em,{children:"tools"}),", which are functions that provide additional context and enable autonomous task execution.\nThese integrations make agents more specialized and powerful than standalone LLMs."]}),(0,s.jsx)(n.p,{children:"Whereas an LLM might generate acceptable, inert responses to general queries and tasks, an agent can leverage the integrated context and tools to provide more relevant responses and even take action.\nFor example, you might create an agent that can access your company's knowledge base, repositories, and other resources to help your team with tasks that require knowledge of your specific products, customers, and code."}),(0,s.jsx)(n.p,{children:"Agents use LLMs as a reasoning engine to process input, determine which actions to take to address the query, and then generate a response.\nThe response could be a typical text-based LLM response, or it could involve an action, like editing a file, running a script, or calling an external API."}),(0,s.jsxs)(n.p,{children:["In an agentic context, tools are functions that the agent can run to perform tasks or access external resources.\nA function is wrapped as a ",(0,s.jsx)(n.code,{children:"Tool"})," object with a common interface that the agent understands.\nAgents become aware of tools through tool registration, which is when the agent is provided a list of available tools typically at agent initialization.\nThe ",(0,s.jsx)(n.code,{children:"Tool"})," object's description tells the agent what the tool can do so that it can decide whether the tool is appropriate for a given request."]})]}),"\n",(0,s.jsx)(n.h2,{id:"use-the-agent-component-in-a-flow",children:"Use the Agent component in a flow"}),"\n",(0,s.jsxs)(n.p,{children:["The following steps explain how to create an agent flow in Langflow from a blank flow.\nFor a prebuilt example, use the ",(0,s.jsx)(n.strong,{children:"Simple Agent"})," template or the ",(0,s.jsx)(n.a,{href:"/get-started-quickstart",children:"Langflow quickstart"}),"."]}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Click ",(0,s.jsx)(n.strong,{children:"New Flow"}),", and then click ",(0,s.jsx)(n.strong,{children:"Blank Flow"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Add an ",(0,s.jsx)(n.strong,{children:"Agent"})," component to your flow."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsx)(n.p,{children:"Enter a valid OpenAI API key."}),"\n",(0,s.jsxs)(n.p,{children:["The default model for the ",(0,s.jsx)(n.strong,{children:"Agent"})," component is an OpenAI model.\nIf you want to use a different provider, edit the ",(0,s.jsx)(n.strong,{children:"Model Provider"}),", ",(0,s.jsx)(n.strong,{children:"Model Name"}),", and ",(0,s.jsx)(n.strong,{children:"API Key"})," fields accordingly.\nFor more information, see ",(0,s.jsx)(n.a,{href:"#agent-component-parameters",children:"Agent component parameters"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Add ",(0,s.jsxs)(n.a,{href:"/components-io",children:[(0,s.jsx)(n.strong,{children:"Chat Input"})," and ",(0,s.jsx)(n.strong,{children:"Chat Output"})," components"]})," to your flow, and then connect them to the ",(0,s.jsx)(n.strong,{children:"Agent"})," component."]}),"\n",(0,s.jsxs)(n.p,{children:["At this point, you have created a basic LLM-based chat flow that you can test in the ",(0,s.jsx)(i.A,{name:"Play","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Playground"}),".\nHowever, this flow only chats with the LLM.\nTo enhance this flow and make it truly agentic, add some tools, as explained in the next steps."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"A basic agent chat flow with Chat Input, Agent, and Chat Output components.",src:t(24770).A+"",width:"3704",height:"2572"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Add ",(0,s.jsx)(n.strong,{children:"News Search"}),", ",(0,s.jsx)(n.strong,{children:"URL"}),", and ",(0,s.jsx)(n.strong,{children:"Calculator"})," components to your flow."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Enable ",(0,s.jsx)(n.strong,{children:"Tool Mode"})," in the ",(0,s.jsx)(n.strong,{children:"News Search"}),", ",(0,s.jsx)(n.strong,{children:"URL"}),", and ",(0,s.jsx)(n.strong,{children:"Calculator"})," components:"]}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Click the ",(0,s.jsx)(n.strong,{children:"News Search"})," component to expose the ",(0,s.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),", and then enable ",(0,s.jsx)(n.strong,{children:"Tool Mode"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Repeat for the ",(0,s.jsx)(n.strong,{children:"URL"})," and ",(0,s.jsx)(n.strong,{children:"Calculator"})," components."]}),"\n",(0,s.jsxs)(n.li,{children:["Connect the ",(0,s.jsx)(n.strong,{children:"Toolset"})," port for each tool component to the ",(0,s.jsx)(n.strong,{children:"Tools"})," port on the ",(0,s.jsx)(n.strong,{children:"Agent"})," component."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Tool Mode"})," makes a component into a tool by modifying the component's inputs.\nWith ",(0,s.jsx)(n.strong,{children:"Tool Mode"})," enabled, a component can accept requests from an ",(0,s.jsx)(n.strong,{children:"Agent"})," component to use the component's available actions as tools."]}),"\n",(0,s.jsxs)(n.p,{children:["When in ",(0,s.jsx)(n.strong,{children:"Tool Mode"}),", a component has a ",(0,s.jsx)(n.strong,{children:"Toolset"})," port that you must connect to an ",(0,s.jsx)(n.strong,{children:"Agent"})," component's ",(0,s.jsx)(n.strong,{children:"Tools"})," port if you want to allow the agent to use that component's actions as tools."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information, see ",(0,s.jsx)(n.a,{href:"/agents-tools",children:"Configure tools for agents"}),"."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"A more complex agent chat flow where three components are connected to the Agent component as tools",src:t(65535).A+"",width:"3380",height:"3012"})}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Open the ",(0,s.jsx)(i.A,{name:"Play","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Playground"}),", and then ask the agent, ",(0,s.jsx)(n.code,{children:"What tools are you using to answer my questions?"})]}),"\n",(0,s.jsx)(n.p,{children:"The agent should respond with a list of the connected tools.\nIt may also include built-in tools."}),"\n",(0,s.jsx)(h.Code,{codeConfig:p,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"I use a combination of my built-in knowledge (up to June 2024) and a set of external tools to answer your questions. Here are the main types of tools I can use:",props:{}}]},{tokens:[{content:"Web Search & Content Fetching: I can fetch and summarize content from web pages, including crawling links recursively.",props:{}}]},{tokens:[{content:"News Search: I can search for recent news articles using Google News via RSS feeds.",props:{}}]},{tokens:[{content:"Calculator: I can perform arithmetic calculations and evaluate mathematical expressions.",props:{}}]},{tokens:[{content:"Date & Time: I can provide the current date and time in various time zones.",props:{}}]},{tokens:[{content:"These tools help me provide up-to-date information, perform calculations, and retrieve specific data from the internet when needed. If you have a specific question, let me know, and I'll use the most appropriate tool(s) to help!",props:{}}]}],lang:"text"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["To test a specific tool, ask the agent a question that uses one of the tools, such as ",(0,s.jsx)(n.code,{children:"Summarize today's tech news"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["To help you debug and test your flows, the ",(0,s.jsx)(n.strong,{children:"Playground"})," displays the agent's tool calls, the provided input, and the raw output the agent received before generating the summary.\nWith the given example, the agent should call the ",(0,s.jsx)(n.strong,{children:"News Search"})," component's ",(0,s.jsx)(n.code,{children:"search_news"})," action."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:"You've successfully created a basic agent flow that uses some generic tools."}),"\n",(0,s.jsxs)(n.p,{children:["To continue building on this tutorial, try connecting other tool components or ",(0,s.jsx)(n.a,{href:"/mcp-client",children:"use Langflow as an MCP client"})," to support more complex and specialized tasks."]}),"\n",(0,s.jsxs)(n.p,{children:["For a multi-agent example, see ",(0,s.jsx)(n.a,{href:"/agents-tools#use-an-agent-as-a-tool",children:"Use an agent as a tool"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"agent-component-parameters",children:"Agent component parameters"}),"\n",(0,s.jsxs)(n.p,{children:["You can configure the ",(0,s.jsx)(n.strong,{children:"Agent"})," component to use your preferred provider and model, custom instructions, and tools."]}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsxs)(n.p,{children:["Many optional ",(0,s.jsx)(n.strong,{children:"Agent"})," component input parameters are hidden by default in the visual editor.\nYou can access all component parameters through the ",(0,s.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Controls"})," in the ",(0,s.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}),"\n",(0,s.jsx)(n.h3,{id:"provider-and-model",children:"Provider and model"}),"\n",(0,s.jsxs)(n.p,{children:["Use the ",(0,s.jsx)(n.strong,{children:"Model Provider"})," (",(0,s.jsx)(n.code,{children:"agent_llm"}),") and ",(0,s.jsx)(n.strong,{children:"Model Name"})," (",(0,s.jsx)(n.code,{children:"llm_model"}),") settings to select the model provider and LLM that you want the agent to use."]}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Agent"})," component includes many models from several popular model providers.\nTo access other providers and models, set ",(0,s.jsx)(n.strong,{children:"Model Provider"})," to ",(0,s.jsx)(n.strong,{children:"Custom"}),", and then connect any ",(0,s.jsxs)(n.a,{href:"/components-models",children:[(0,s.jsx)(n.strong,{children:"Language Model"})," component"]}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["If you need to generate embeddings in your flow, use an ",(0,s.jsxs)(n.a,{href:"/components-embedding-models",children:[(0,s.jsx)(n.strong,{children:"Embedding Model"})," component"]}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"model-provider-api-key",children:"Model provider API key"}),"\n",(0,s.jsxs)(n.p,{children:["In the ",(0,s.jsx)(n.strong,{children:"API Key"})," field, enter a valid authentication key for your selected model provider, if you are using a built-in provider.\nFor example, to use the default OpenAI model, you must provide a valid OpenAI API key for an OpenAI account that has credits and permission to call OpenAI LLMs."]}),"\n",(0,s.jsxs)(n.p,{children:["You can enter the key directly, but it is recommended that you follow industry best practices for storing and referencing API keys.\nFor example, you can use a ",(0,s.jsx)(i.A,{name:"Globe","aria-hidden":"true"})," ",(0,s.jsx)(n.a,{href:"/configuration-global-variables",children:"global variable"})," or ",(0,s.jsx)(n.a,{href:"/environment-variables",children:"environment variables"}),".\nFor more information, see ",(0,s.jsx)(n.a,{href:"/api-keys-and-authentication#component-api-keys",children:"Add component API keys to Langflow"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["If you select ",(0,s.jsx)(n.strong,{children:"Custom"})," as the model provider, authentication is handled in the incoming ",(0,s.jsx)(n.strong,{children:"Language Model"})," component."]}),"\n",(0,s.jsx)(n.h3,{id:"agent-instructions-and-input",children:"Agent instructions and input"}),"\n",(0,s.jsxs)(n.p,{children:["In the ",(0,s.jsx)(n.strong,{children:"Agent Instructions"})," (",(0,s.jsx)(n.code,{children:"system_prompt"}),") field, you can provide custom instructions that you want the ",(0,s.jsx)(n.strong,{children:"Agent"})," component to use for every conversation."]}),"\n",(0,s.jsxs)(n.p,{children:["These instructions are applied in addition to the ",(0,s.jsx)(n.strong,{children:"Input"})," (",(0,s.jsx)(n.code,{children:"input_value"}),"), which can be entered directly or provided through another component, such as a ",(0,s.jsx)(n.strong,{children:"Chat Input"})," component."]}),"\n",(0,s.jsx)(n.h3,{id:"tools",children:"Tools"}),"\n",(0,s.jsx)(n.p,{children:"Agents are most useful when they have the appropriate tools available to complete requests."}),"\n",(0,s.jsxs)(n.p,{children:["An ",(0,s.jsx)(n.strong,{children:"Agent"})," component can use any Langflow component as a tool, including other agents and MCP servers."]}),"\n",(0,s.jsxs)(n.p,{children:["To attach a component as a tool, you must enable ",(0,s.jsx)(n.strong,{children:"Tool Mode"})," on the component that you want to attach, and then attach it to the ",(0,s.jsx)(n.strong,{children:"Agent"})," component's ",(0,s.jsx)(n.strong,{children:"Tools"})," port.\nFor more information, see ",(0,s.jsx)(n.a,{href:"/agents-tools",children:"Configure tools for agents"}),"."]}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsxs)(n.p,{children:["To allow agents to use tools from MCP servers, use the ",(0,s.jsxs)(n.a,{href:"/components-agents#mcp-connection",children:[(0,s.jsx)(n.strong,{children:"MCP Tools"})," component"]}),"."]})}),"\n",(0,s.jsx)(n.h3,{id:"agent-memory",children:"Agent memory"}),"\n",(0,s.jsx)(n.p,{children:"Langflow agents have built-in chat memory that is enabled by default.\nThis memory allows them to retrieve and reference messages from previous conversations, maintaining a rolling context window for each chat session ID."}),"\n",(0,s.jsxs)(n.p,{children:["Chat memories are grouped by ",(0,s.jsxs)(n.a,{href:"/session-id",children:["session ID (",(0,s.jsx)(n.code,{children:"session_id"}),")"]}),".\nIt is recommended to use custom session IDs if you need to segregate chat memory for different users or applications that run the same flow."]}),"\n",(0,s.jsxs)(n.p,{children:["By default, the ",(0,s.jsx)(n.strong,{children:"Agent"})," component uses your Langflow installation's storage, and it retrieves a limited number of chat messages, which you can configure with the ",(0,s.jsx)(n.strong,{children:"Number of Chat History Messages"})," parameter."]}),"\n",(0,s.jsxs)(n.p,{children:["Although the ",(0,s.jsx)(n.strong,{children:"Message History"})," component isn't required for default chat memory, it provides more options for sorting, filtering, and limiting memories, and the ",(0,s.jsx)(n.strong,{children:"Message History"})," component is required to use external chat memory like Mem0."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information, see ",(0,s.jsx)(n.a,{href:"/memory#store-chat-memory",children:"Store chat memory"})," and ",(0,s.jsxs)(n.a,{href:"/components-helpers#message-history",children:[(0,s.jsx)(n.strong,{children:"Message History"})," component"]}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"additional-parameters",children:"Additional parameters"}),"\n",(0,s.jsxs)(n.p,{children:["With the ",(0,s.jsx)(n.strong,{children:"Agent"})," component, the available parameters can change depending on the selected provider and model.\nFor example, some models support additional modes, arguments, or features like chat memory and temperature."]}),"\n",(0,s.jsx)(n.p,{children:"Some additional input parameters include the following:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Current Date"})," (",(0,s.jsx)(n.code,{children:"add_current_date_tool"}),"): When enabled (true), this setting adds a tool to the agent that can retrieve the current date."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Handle Parse Errors"})," (",(0,s.jsx)(n.code,{children:"handle_parsing_errors"}),"): When enabled (true), this setting allows the agent to fix errors, like typos, when analyzing user input."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Verbose"})," (",(0,s.jsx)(n.code,{children:"verbose"}),"): When enabled (true), this setting records detailed logging output for debugging and analysis."]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["To view and configure all parameters, click ",(0,s.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Controls"})," in the ",(0,s.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"agent-component-output",children:"Agent component output"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Agent"})," component outputs a ",(0,s.jsx)(n.strong,{children:"Response"})," (",(0,s.jsx)(n.code,{children:"response"}),") that is ",(0,s.jsxs)(n.a,{href:"/data-types#message",children:[(0,s.jsx)(n.code,{children:"Message"})," data"]})," containing the agent's raw response to the query."]}),"\n",(0,s.jsxs)(n.p,{children:["Typically, this is passed to a ",(0,s.jsx)(n.strong,{children:"Chat Output"})," component to return the response in a human-readable format.\nIt can also be passed to other components if you need to process the response further before, or in addition to, returning it to the user."]}),"\n",(0,s.jsx)(n.h2,{id:"see-also",children:"See also"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsxs)(n.a,{href:"/components-agents",children:[(0,s.jsx)(n.strong,{children:"Agent"})," and ",(0,s.jsx)(n.strong,{children:"MCP Tools"})," components"]})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/agents-tools",children:"Configure tools for agents"})}),"\n"]})]})}function m(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(u,{...e})}):u(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.")}}}]); \ No newline at end of file diff --git a/assets/js/cd086441.48985967.js b/assets/js/cd086441.48985967.js new file mode 100644 index 0000000000..5b5f8af3e6 --- /dev/null +++ b/assets/js/cd086441.48985967.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[2469],{17886:(e,r,n)=>{n.d(r,{A:()=>d});n(96540);var s=n(64058),t=n(74848);function d({name:e,...r}){const n=s[e];return n?(0,t.jsx)(n,{...r}):null}},31929:(e,r,n)=>{n.d(r,{Ay:()=>a,RM:()=>l});var s=n(74848),t=n(28453),d=n(17886);const l=[];function o(e){const r={a:"a",p:"p",strong:"strong",...(0,t.R)(),...e.components};return(0,s.jsxs)(r.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,s.jsx)(d.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(r.strong,{children:"Controls"})," in the ",(0,s.jsx)(r.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function a(e={}){const{wrapper:r}={...(0,t.R)(),...e.components};return r?(0,s.jsx)(r,{...e,children:(0,s.jsx)(o,{...e})}):o(e)}},64896:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>i,contentTitle:()=>a,default:()=>u,frontMatter:()=>o,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"Components/bundles-cloudflare","title":"Cloudflare","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-cloudflare.mdx","sourceDirName":"Components","slug":"/bundles-cloudflare","permalink":"/bundles-cloudflare","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Cloudflare","slug":"/bundles-cloudflare"},"sidebar":"docs","previous":{"title":"Cleanlab","permalink":"/integrations-cleanlab"},"next":{"title":"Cohere","permalink":"/bundles-cohere"}}');var t=n(74848),d=n(28453),l=(n(17886),n(31929));const o={title:"Cloudflare",slug:"/bundles-cloudflare"},a=void 0,i={},c=[{value:"Cloudflare Workers AI Embeddings",id:"cloudflare-workers-ai-embeddings",level:2},{value:"Cloudflare Workers AI Embeddings parameters",id:"cloudflare-workers-ai-embeddings-parameters",level:3},...l.RM];function h(e){const r={a:"a",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,d.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(r.p,{children:[(0,t.jsx)(r.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,t.jsxs)(r.p,{children:["This page describes the components that are available in the ",(0,t.jsx)(r.strong,{children:"Cloudflare"})," bundle."]}),"\n",(0,t.jsx)(r.h2,{id:"cloudflare-workers-ai-embeddings",children:"Cloudflare Workers AI Embeddings"}),"\n",(0,t.jsxs)(r.p,{children:["The ",(0,t.jsx)(r.strong,{children:"Cloudflare Workers AI Embeddings"})," component generates embeddings using ",(0,t.jsx)(r.a,{href:"https://developers.cloudflare.com/workers-ai/",children:"Cloudflare Workers AI models"}),"."]}),"\n",(0,t.jsxs)(r.p,{children:["For more information about using embedding model components in flows, see ",(0,t.jsxs)(r.a,{href:"/components-embedding-models",children:[(0,t.jsx)(r.strong,{children:"Embedding Model"})," components"]}),"."]}),"\n",(0,t.jsx)(r.h3,{id:"cloudflare-workers-ai-embeddings-parameters",children:"Cloudflare Workers AI Embeddings parameters"}),"\n",(0,t.jsx)(l.Ay,{}),"\n",(0,t.jsxs)(r.table,{children:[(0,t.jsx)(r.thead,{children:(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.th,{children:"Name"}),(0,t.jsx)(r.th,{children:"Display Name"}),(0,t.jsx)(r.th,{children:"Info"})]})}),(0,t.jsxs)(r.tbody,{children:[(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"account_id"}),(0,t.jsx)(r.td,{children:"Cloudflare account ID"}),(0,t.jsxs)(r.td,{children:["Input parameter. Your ",(0,t.jsx)(r.a,{href:"https://developers.cloudflare.com/fundamentals/setup/find-account-and-zone-ids/#find-account-id-workers-and-pages",children:"Cloudflare account ID"}),"."]})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"api_token"}),(0,t.jsx)(r.td,{children:"Cloudflare API token"}),(0,t.jsxs)(r.td,{children:["Input parameter. Your ",(0,t.jsx)(r.a,{href:"https://developers.cloudflare.com/fundamentals/api/get-started/create-token/",children:"Cloudflare API token"}),"."]})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"model_name"}),(0,t.jsx)(r.td,{children:"Model Name"}),(0,t.jsxs)(r.td,{children:["Input parameter. A ",(0,t.jsx)(r.a,{href:"https://developers.cloudflare.com/workers-ai/models/#text-embeddings",children:"supported model"})," for embedding generation."]})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"strip_new_lines"}),(0,t.jsx)(r.td,{children:"Strip New Lines"}),(0,t.jsx)(r.td,{children:"Input parameter. Whether to strip new lines from the input text."})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"batch_size"}),(0,t.jsx)(r.td,{children:"Batch Size"}),(0,t.jsx)(r.td,{children:"Input parameter. The number of texts to embed in each batch."})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"api_base_url"}),(0,t.jsx)(r.td,{children:"Cloudflare API base URL"}),(0,t.jsx)(r.td,{children:"Input parameter. The base URL for the Cloudflare API."})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"headers"}),(0,t.jsx)(r.td,{children:"Headers"}),(0,t.jsx)(r.td,{children:"Input parameter. Additional headers for the embedding generation API request."})]})]})]})]})}function u(e={}){const{wrapper:r}={...(0,d.R)(),...e.components};return r?(0,t.jsx)(r,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}}}]); \ No newline at end of file diff --git a/assets/js/cd086441.960c2e83.js b/assets/js/cd086441.960c2e83.js deleted file mode 100644 index 07f7d7e201..0000000000 --- a/assets/js/cd086441.960c2e83.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[2469],{17886:(e,r,n)=>{n.d(r,{A:()=>d});n(96540);var s=n(64058),t=n(74848);function d({name:e,...r}){const n=s[e];return n?(0,t.jsx)(n,{...r}):null}},64896:(e,r,n)=>{n.r(r),n.d(r,{assets:()=>i,contentTitle:()=>a,default:()=>u,frontMatter:()=>o,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"Components/bundles-cloudflare","title":"Cloudflare","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-cloudflare.mdx","sourceDirName":"Components","slug":"/bundles-cloudflare","permalink":"/bundles-cloudflare","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Cloudflare","slug":"/bundles-cloudflare"},"sidebar":"docs","previous":{"title":"Cleanlab","permalink":"/integrations-cleanlab"},"next":{"title":"Cohere","permalink":"/bundles-cohere"}}');var t=n(74848),d=n(28453),l=n(17886);const o={title:"Cloudflare",slug:"/bundles-cloudflare"},a=void 0,i={},c=[{value:"Cloudflare Workers AI Embeddings",id:"cloudflare-workers-ai-embeddings",level:2},{value:"Cloudflare Workers AI Embeddings parameters",id:"cloudflare-workers-ai-embeddings-parameters",level:3}];function h(e){const r={a:"a",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,d.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(r.p,{children:[(0,t.jsx)(r.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,t.jsxs)(r.p,{children:["This page describes the components that are available in the ",(0,t.jsx)(r.strong,{children:"Cloudflare"})," bundle."]}),"\n",(0,t.jsx)(r.h2,{id:"cloudflare-workers-ai-embeddings",children:"Cloudflare Workers AI Embeddings"}),"\n",(0,t.jsxs)(r.p,{children:["The ",(0,t.jsx)(r.strong,{children:"Cloudflare Workers AI Embeddings"})," component generates embeddings using ",(0,t.jsx)(r.a,{href:"https://developers.cloudflare.com/workers-ai/",children:"Cloudflare Workers AI models"}),"."]}),"\n",(0,t.jsxs)(r.p,{children:["For more information about using embedding model components in flows, see ",(0,t.jsxs)(r.a,{href:"/components-embedding-models",children:[(0,t.jsx)(r.strong,{children:"Embedding Model"})," components"]}),"."]}),"\n",(0,t.jsx)(r.h3,{id:"cloudflare-workers-ai-embeddings-parameters",children:"Cloudflare Workers AI Embeddings parameters"}),"\n",(0,t.jsxs)(r.p,{children:["Some ",(0,t.jsx)(r.strong,{children:"Cloudflare Workers AI Embeddings"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,t.jsx)(l.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,t.jsx)(r.strong,{children:"Controls"})," in the ",(0,t.jsx)(r.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(0,t.jsxs)(r.table,{children:[(0,t.jsx)(r.thead,{children:(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.th,{children:"Name"}),(0,t.jsx)(r.th,{children:"Display Name"}),(0,t.jsx)(r.th,{children:"Info"})]})}),(0,t.jsxs)(r.tbody,{children:[(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"account_id"}),(0,t.jsx)(r.td,{children:"Cloudflare account ID"}),(0,t.jsxs)(r.td,{children:["Input parameter. Your ",(0,t.jsx)(r.a,{href:"https://developers.cloudflare.com/fundamentals/setup/find-account-and-zone-ids/#find-account-id-workers-and-pages",children:"Cloudflare account ID"}),"."]})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"api_token"}),(0,t.jsx)(r.td,{children:"Cloudflare API token"}),(0,t.jsxs)(r.td,{children:["Input parameter. Your ",(0,t.jsx)(r.a,{href:"https://developers.cloudflare.com/fundamentals/api/get-started/create-token/",children:"Cloudflare API token"}),"."]})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"model_name"}),(0,t.jsx)(r.td,{children:"Model Name"}),(0,t.jsxs)(r.td,{children:["Input parameter. A ",(0,t.jsx)(r.a,{href:"https://developers.cloudflare.com/workers-ai/models/#text-embeddings",children:"supported model"})," for embedding generation."]})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"strip_new_lines"}),(0,t.jsx)(r.td,{children:"Strip New Lines"}),(0,t.jsx)(r.td,{children:"Input parameter. Whether to strip new lines from the input text."})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"batch_size"}),(0,t.jsx)(r.td,{children:"Batch Size"}),(0,t.jsx)(r.td,{children:"Input parameter. The number of texts to embed in each batch."})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"api_base_url"}),(0,t.jsx)(r.td,{children:"Cloudflare API base URL"}),(0,t.jsx)(r.td,{children:"Input parameter. The base URL for the Cloudflare API."})]}),(0,t.jsxs)(r.tr,{children:[(0,t.jsx)(r.td,{children:"headers"}),(0,t.jsx)(r.td,{children:"Headers"}),(0,t.jsx)(r.td,{children:"Input parameter. Additional headers for the embedding generation API request."})]})]})]})]})}function u(e={}){const{wrapper:r}={...(0,d.R)(),...e.components};return r?(0,t.jsx)(r,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}}}]); \ No newline at end of file diff --git a/assets/js/d1f3cfe5.9b2b9b3e.js b/assets/js/d1f3cfe5.9b2b9b3e.js deleted file mode 100644 index 6c2fbb41ff..0000000000 --- a/assets/js/d1f3cfe5.9b2b9b3e.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[9986],{4392:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>i,contentTitle:()=>a,default:()=>u,frontMatter:()=>l,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"Deployment/deployment-architecture","title":"Langflow architecture on Kubernetes","description":"There are two broad types of Langflow deployments:","source":"@site/docs/Deployment/deployment-architecture.mdx","sourceDirName":"Deployment","slug":"/deployment-architecture","permalink":"/deployment-architecture","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Langflow architecture on Kubernetes","slug":"/deployment-architecture"},"sidebar":"docs","previous":{"title":"Deploy Langflow on a remote server","permalink":"/deployment-caddyfile"},"next":{"title":"Best practices","permalink":"/deployment-prod-best-practices"}}');var o=t(74848),s=t(28453);t(11470),t(19365);const l={title:"Langflow architecture on Kubernetes",slug:"/deployment-architecture"},a=void 0,i={},c=[{value:"Benefits of deploying Langflow on Kubernetes",id:"benefits-of-deploying-langflow-on-kubernetes",level:2},{value:"Langflow deployment",id:"langflow-deployment",level:2},{value:"Environment isolation",id:"environment-isolation",level:2},{value:"Next steps",id:"next-steps",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.p,{children:"There are two broad types of Langflow deployments:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Langflow IDE (development)"}),": Deploy both the Langflow visual editor (frontend) and API (backend). Typically, this is used for development environments where developers use the visual editor to create and manage flows before packaging and serving them through a production runtime deployment."]}),"\n",(0,o.jsxs)(n.p,{children:["The Langflow repository's example ",(0,o.jsx)(n.a,{href:"https://github.com/langflow-ai/langflow/blob/main/docker_example/docker-compose.yml",children:(0,o.jsx)(n.code,{children:"docker-compose.yml"})})," file builds a Langflow IDE image."]}),"\n",(0,o.jsxs)(n.p,{children:["For information about IDE deployments on Kubernetes, see ",(0,o.jsx)(n.a,{href:"/deployment-kubernetes-dev",children:"Deploy the Langflow development environment on Kubernetes"}),"."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Langflow runtime (production)"}),": Deploy the Langflow runtime for production flows, which is headless (backend only) service focused on serving the Langflow API. This is used for production environments where flows are executed programmatically without the need for the visual editor. The server exposes your flows as endpoints, and then runs only the processes necessary to serve each flow."]}),"\n",(0,o.jsx)(n.p,{children:"An external PostgreSQL database is strongly recommended with this deployment type to improve scalability and reliability as compared to the default SQLite database."}),"\n",(0,o.jsxs)(n.p,{children:["For information about runtime deployments on Kubernetes, see ",(0,o.jsx)(n.a,{href:"/deployment-kubernetes-prod",children:"Deploy the Langflow production environment on Kubernetes"}),"."]}),"\n",(0,o.jsx)(n.admonition,{type:"tip",children:(0,o.jsxs)(n.p,{children:["You can start Langflow in headless mode with the ",(0,o.jsx)(n.code,{children:"LANGFLOW_BACKEND_ONLY"})," ",(0,o.jsx)(n.a,{href:"/environment-variables",children:"environment variable"}),"."]})}),"\n"]}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:["You can also ",(0,o.jsx)(n.a,{href:"/deployment-docker",children:"deploy the Langflow IDE and runtime on Docker"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"benefits-of-deploying-langflow-on-kubernetes",children:"Benefits of deploying Langflow on Kubernetes"}),"\n",(0,o.jsx)(n.p,{children:"Deploying on Kubernetes offers the following advantages:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Scalability"}),": Kubernetes allows you to scale the Langflow service to meet the demands of your workload."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Availability and resilience"}),": Kubernetes provides built-in resilience features, such as automatic failover and self-healing, to ensure that the Langflow service is always available."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Security"}),": Kubernetes provides security features, such as role-based access control and network isolation, to protect the Langflow service and its data."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.strong,{children:"Portability"}),": Kubernetes is a portable platform, which means that you can deploy the Langflow service to any Kubernetes cluster, on-premises or in the cloud."]}),"\n",(0,o.jsxs)(n.p,{children:["Langflow can be deployed on cloud platforms like AWS EKS, Google GKE, or Azure AKS. For more information, see the ",(0,o.jsx)(n.a,{href:"https://github.com/langflow-ai/langflow-helm-charts",children:"Langflow Helm charts repository"}),"."]}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"langflow-deployment",children:"Langflow deployment"}),"\n",(0,o.jsx)(n.p,{children:"A typical Langflow deployment includes:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Langflow services"}),": The Langflow API and, for IDE deployments, the visual editor."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Kubernetes cluster"}),": The Kubernetes cluster provides a platform for deploying and managing Langflow and its supporting services."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Persistent storage"}),": Persistent storage is used to store the Langflow service's data, such as models and training data."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Ingress controller"}),": The ingress controller provides a single entry point for traffic to the Langflow service."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Load balancer"}),": Balances traffic across multiple Langflow replicas."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Vector database"}),": If you are using Langflow for RAG, you can integrate with the vector database in Astra Serverless."]}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"Langflow reference architecture on Kubernetes",src:t(48109).A+"",width:"671",height:"361"})}),"\n",(0,o.jsx)(n.h2,{id:"environment-isolation",children:"Environment isolation"}),"\n",(0,o.jsx)(n.p,{children:"It is recommended to deploy and run separate development and production environments for Langflow:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:"Deploy the IDE in your development environment where your developers prototype and test new flows."}),"\n",(0,o.jsx)(n.li,{children:"Deploy the runtime in your production environment to serve flows as standalone services."}),"\n"]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"Langflow environments",src:t(26023).A+"",width:"601",height:"491"})}),"\n",(0,o.jsx)(n.p,{children:"This separation is designed to enhance security, support an organized software development pipeline, and optimize infrastructure resource allocation:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Isolation"}),": By separating the development and production environments, you can better isolate different phases of the application lifecycle. This isolation minimizes the risk of development-related issues impacting the production environments."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Access control"}),": Different security policies and access controls can be applied to each environment. Developers may require broader access in the IDE for testing and debugging, while the runtime environment can be locked down with stricter security measures."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Reduced attack surface"}),": The runtime environment is configured to include only essential components, reducing the attack surface and potential vulnerabilities."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Optimized resource usage and cost efficiency"}),": By separating the two environments, you can allocate resources more effectively. Each flow can be deployed independently, providing fine-grained resource control."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.strong,{children:"Scalability"}),": The runtime environment can be scaled independently based on application load and performance requirements, without affecting the development environment."]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/deployment-prod-best-practices",children:"Best practices for Langflow on Kubernetes"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/deployment-kubernetes-dev",children:"Deploy the Langflow development environment on Kubernetes"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/deployment-kubernetes-prod",children:"Deploy the Langflow production environment on Kubernetes"})}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(d,{...e})}):d(e)}},11470:(e,n,t)=>{t.d(n,{A:()=>j});var r=t(96540),o=t(18215),s=t(23104),l=t(56347),a=t(205),i=t(57485),c=t(31682),d=t(70679);function u(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 h(e){const{values:n,children:t}=e;return(0,r.useMemo)(()=>{const e=n??function(e){return u(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,c.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 p({value:e,tabValues:n}){return n.some(n=>n.value===e)}function f({queryString:e=!1,groupId:n}){const t=(0,l.W6)(),o=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,i.aZ)(o),(0,r.useCallback)(e=>{if(!o)return;const n=new URLSearchParams(t.location.search);n.set(o,e),t.replace({...t.location,search:n.toString()})},[o,t])]}function m(e){const{defaultValue:n,queryString:t=!1,groupId:o}=e,s=h(e),[l,i]=(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(!p({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:s})),[c,u]=f({queryString:t,groupId:o}),[m,g]=function({groupId:e}){const n=function(e){return e?`docusaurus.tab.${e}`:null}(e),[t,o]=(0,d.Dv)(n);return[t,(0,r.useCallback)(e=>{n&&o.set(e)},[n,o])]}({groupId:o}),b=(()=>{const e=c??m;return p({value:e,tabValues:s})?e:null})();(0,a.A)(()=>{b&&i(b)},[b]);return{selectedValue:l,selectValue:(0,r.useCallback)(e=>{if(!p({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);i(e),u(e),g(e)},[u,g,s]),tabValues:s}}var g=t(92303);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=t(74848);function y({className:e,block:n,selectedValue:t,selectValue:r,tabValues:l}){const a=[],{blockElementScrollPositionUntilNextRender:i}=(0,s.a_)(),c=e=>{const n=e.currentTarget,o=a.indexOf(n),s=l[o].value;s!==t&&(i(n),r(s))},d=e=>{let n=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const t=a.indexOf(e.currentTarget)+1;n=a[t]??a[0];break}case"ArrowLeft":{const t=a.indexOf(e.currentTarget)-1;n=a[t]??a[a.length-1];break}}n?.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.A)("tabs",{"tabs--block":n},e),children:l.map(({value:e,label:n,attributes:r})=>(0,v.jsx)("li",{role:"tab",tabIndex:t===e?0:-1,"aria-selected":t===e,ref:e=>{a.push(e)},onKeyDown:d,onClick:c,...r,className:(0,o.A)("tabs__item",b.tabItem,r?.className,{"tabs__item--active":t===e}),children:n??e},e))})}function x({lazy:e,children:n,selectedValue:t}){const s=(Array.isArray(n)?n:[n]).filter(Boolean);if(e){const e=s.find(e=>e.props.value===t);return e?(0,r.cloneElement)(e,{className:(0,o.A)("margin-top--md",e.props.className)}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:s.map((e,n)=>(0,r.cloneElement)(e,{key:n,hidden:e.props.value!==t}))})}function w(e){const n=m(e);return(0,v.jsxs)("div",{className:(0,o.A)("tabs-container",b.tabList),children:[(0,v.jsx)(y,{...n,...e}),(0,v.jsx)(x,{...n,...e})]})}function j(e){const n=(0,g.A)();return(0,v.jsx)(w,{...e,children:u(e.children)},String(n))}},19365:(e,n,t)=>{t.d(n,{A:()=>l});t(96540);var r=t(18215);const o={tabItem:"tabItem_Ymn6"};var s=t(74848);function l({children:e,hidden:n,className:t}){return(0,s.jsx)("div",{role:"tabpanel",className:(0,r.A)(o.tabItem,t),hidden:n,children:e})}},26023:(e,n,t)=>{t.d(n,{A:()=>r});const r=t.p+"assets/images/langflow-env-f22dcd672ba806af9fec3968171a4700.png"},28453:(e,n,t)=>{t.d(n,{R:()=>l,x:()=>a});var r=t(96540);const o={},s=r.createContext(o);function l(e){const n=r.useContext(s);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(o):e.components||o:l(e.components),r.createElement(s.Provider,{value:n},e.children)}},48109:(e,n,t)=>{t.d(n,{A:()=>r});const r=t.p+"assets/images/langflow-reference-architecture-49ff76b7f84ce43f5626edd5cb3fa7fa.png"}}]); \ No newline at end of file diff --git a/assets/js/d1f3cfe5.c86f00ba.js b/assets/js/d1f3cfe5.c86f00ba.js new file mode 100644 index 0000000000..a720ecec57 --- /dev/null +++ b/assets/js/d1f3cfe5.c86f00ba.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[9986],{4392:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>a,contentTitle:()=>l,default:()=>h,frontMatter:()=>i,metadata:()=>o,toc:()=>c});const o=JSON.parse('{"id":"Deployment/deployment-architecture","title":"Langflow architecture on Kubernetes","description":"There are two broad types of Langflow deployments:","source":"@site/docs/Deployment/deployment-architecture.mdx","sourceDirName":"Deployment","slug":"/deployment-architecture","permalink":"/deployment-architecture","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Langflow architecture on Kubernetes","slug":"/deployment-architecture"},"sidebar":"docs","previous":{"title":"Deploy Langflow on a remote server","permalink":"/deployment-caddyfile"},"next":{"title":"Best practices","permalink":"/deployment-prod-best-practices"}}');var s=t(74848),r=t(28453);const i={title:"Langflow architecture on Kubernetes",slug:"/deployment-architecture"},l=void 0,a={},c=[{value:"Benefits of deploying Langflow on Kubernetes",id:"benefits-of-deploying-langflow-on-kubernetes",level:2},{value:"Langflow deployment",id:"langflow-deployment",level:2},{value:"Environment isolation",id:"environment-isolation",level:2},{value:"Next steps",id:"next-steps",level:2}];function d(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"There are two broad types of Langflow deployments:"}),"\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:"Langflow IDE (development)"}),": Deploy both the Langflow visual editor (frontend) and API (backend). Typically, this is used for development environments where developers use the visual editor to create and manage flows before packaging and serving them through a production runtime deployment."]}),"\n",(0,s.jsxs)(n.p,{children:["The Langflow repository's example ",(0,s.jsx)(n.a,{href:"https://github.com/langflow-ai/langflow/blob/main/docker_example/docker-compose.yml",children:(0,s.jsx)(n.code,{children:"docker-compose.yml"})})," file builds a Langflow IDE image."]}),"\n",(0,s.jsxs)(n.p,{children:["For information about IDE deployments on Kubernetes, see ",(0,s.jsx)(n.a,{href:"/deployment-kubernetes-dev",children:"Deploy the Langflow development environment on Kubernetes"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Langflow runtime (production)"}),": Deploy the Langflow runtime for production flows, which is headless (backend only) service focused on serving the Langflow API. This is used for production environments where flows are executed programmatically without the need for the visual editor. The server exposes your flows as endpoints, and then runs only the processes necessary to serve each flow."]}),"\n",(0,s.jsx)(n.p,{children:"An external PostgreSQL database is strongly recommended with this deployment type to improve scalability and reliability as compared to the default SQLite database."}),"\n",(0,s.jsxs)(n.p,{children:["For information about runtime deployments on Kubernetes, see ",(0,s.jsx)(n.a,{href:"/deployment-kubernetes-prod",children:"Deploy the Langflow production environment on Kubernetes"}),"."]}),"\n",(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsxs)(n.p,{children:["You can start Langflow in headless mode with the ",(0,s.jsx)(n.code,{children:"LANGFLOW_BACKEND_ONLY"})," ",(0,s.jsx)(n.a,{href:"/environment-variables",children:"environment variable"}),"."]})}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(n.p,{children:["You can also ",(0,s.jsx)(n.a,{href:"/deployment-docker",children:"deploy the Langflow IDE and runtime on Docker"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"benefits-of-deploying-langflow-on-kubernetes",children:"Benefits of deploying Langflow on Kubernetes"}),"\n",(0,s.jsx)(n.p,{children:"Deploying on Kubernetes offers the following advantages:"}),"\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:"Scalability"}),": Kubernetes allows you to scale the Langflow service to meet the demands of your workload."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Availability and resilience"}),": Kubernetes provides built-in resilience features, such as automatic failover and self-healing, to ensure that the Langflow service is always available."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Security"}),": Kubernetes provides security features, such as role-based access control and network isolation, to protect the Langflow service and its data."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.strong,{children:"Portability"}),": Kubernetes is a portable platform, which means that you can deploy the Langflow service to any Kubernetes cluster, on-premises or in the cloud."]}),"\n",(0,s.jsxs)(n.p,{children:["Langflow can be deployed on cloud platforms like AWS EKS, Google GKE, or Azure AKS. For more information, see the ",(0,s.jsx)(n.a,{href:"https://github.com/langflow-ai/langflow-helm-charts",children:"Langflow Helm charts repository"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"langflow-deployment",children:"Langflow deployment"}),"\n",(0,s.jsx)(n.p,{children:"A typical Langflow deployment includes:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Langflow services"}),": The Langflow API and, for IDE deployments, the visual editor."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Kubernetes cluster"}),": The Kubernetes cluster provides a platform for deploying and managing Langflow and its supporting services."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Persistent storage"}),": Persistent storage is used to store the Langflow service's data, such as models and training data."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Ingress controller"}),": The ingress controller provides a single entry point for traffic to the Langflow service."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Load balancer"}),": Balances traffic across multiple Langflow replicas."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Vector database"}),": If you are using Langflow for RAG, you can integrate with the vector database in Astra Serverless."]}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Langflow reference architecture on Kubernetes",src:t(48109).A+"",width:"671",height:"361"})}),"\n",(0,s.jsx)(n.h2,{id:"environment-isolation",children:"Environment isolation"}),"\n",(0,s.jsx)(n.p,{children:"It is recommended to deploy and run separate development and production environments for Langflow:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"Deploy the IDE in your development environment where your developers prototype and test new flows."}),"\n",(0,s.jsx)(n.li,{children:"Deploy the runtime in your production environment to serve flows as standalone services."}),"\n"]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Langflow environments",src:t(26023).A+"",width:"601",height:"491"})}),"\n",(0,s.jsx)(n.p,{children:"This separation is designed to enhance security, support an organized software development pipeline, and optimize infrastructure resource allocation:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Isolation"}),": By separating the development and production environments, you can better isolate different phases of the application lifecycle. This isolation minimizes the risk of development-related issues impacting the production environments."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Access control"}),": Different security policies and access controls can be applied to each environment. Developers may require broader access in the IDE for testing and debugging, while the runtime environment can be locked down with stricter security measures."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Reduced attack surface"}),": The runtime environment is configured to include only essential components, reducing the attack surface and potential vulnerabilities."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Optimized resource usage and cost efficiency"}),": By separating the two environments, you can allocate resources more effectively. Each flow can be deployed independently, providing fine-grained resource control."]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Scalability"}),": The runtime environment can be scaled independently based on application load and performance requirements, without affecting the development environment."]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"next-steps",children:"Next steps"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/deployment-prod-best-practices",children:"Best practices for Langflow on Kubernetes"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/deployment-kubernetes-dev",children:"Deploy the Langflow development environment on Kubernetes"})}),"\n",(0,s.jsx)(n.li,{children:(0,s.jsx)(n.a,{href:"/deployment-kubernetes-prod",children:"Deploy the Langflow production environment on Kubernetes"})}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(d,{...e})}):d(e)}},26023:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/langflow-env-f22dcd672ba806af9fec3968171a4700.png"},28453:(e,n,t)=>{t.d(n,{R:()=>i,x:()=>l});var o=t(96540);const s={},r=o.createContext(s);function i(e){const n=o.useContext(r);return o.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:i(e.components),o.createElement(r.Provider,{value:n},e.children)}},48109:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/langflow-reference-architecture-49ff76b7f84ce43f5626edd5cb3fa7fa.png"}}]); \ No newline at end of file diff --git a/assets/js/d8c8efb9.48987fcd.js b/assets/js/d8c8efb9.7594c043.js similarity index 53% rename from assets/js/d8c8efb9.48987fcd.js rename to assets/js/d8c8efb9.7594c043.js index 1a42408a66..a2a4c241ff 100644 --- a/assets/js/d8c8efb9.48987fcd.js +++ b/assets/js/d8c8efb9.7594c043.js @@ -1 +1 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[9712],{17886:(e,n,t)=>{t.d(n,{A:()=>o});t(96540);var r=t(64058),s=t(74848);function o({name:e,...n}){const t=r[e];return t?(0,s.jsx)(t,{...n}):null}},23592:(e,n,t)=>{t.d(n,{A:()=>r});const r=t.p+"assets/images/component-groq-d3df19923f67805fd483632d537af9f4.png"},40561:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>g,frontMatter:()=>i,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"Components/bundles-groq","title":"Groq","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-groq.mdx","sourceDirName":"Components","slug":"/bundles-groq","permalink":"/bundles-groq","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Groq","slug":"/bundles-groq"},"sidebar":"docs","previous":{"title":"Google BigQuery","permalink":"/integrations-google-big-query"},"next":{"title":"Hugging Face","permalink":"/bundles-huggingface"}}');var s=t(74848),o=t(28453),d=t(17886);const i={title:"Groq",slug:"/bundles-groq"},a=void 0,l={},c=[{value:"Groq text generation",id:"groq-text-generation",level:2},{value:"Groq text generation parameters",id:"groq-text-generation-parameters",level:3}];function h(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",img:"img",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,s.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,s.jsx)(n.strong,{children:"Groq"})," bundle."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information, see the ",(0,s.jsx)(n.a,{href:"https://groq.com/",children:"Groq documentation"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"groq-text-generation",children:"Groq text generation"}),"\n",(0,s.jsx)(n.p,{children:"This component generates text using Groq's language models."}),"\n",(0,s.jsxs)(n.p,{children:["It can output either a ",(0,s.jsx)(n.strong,{children:"Model Response"})," (",(0,s.jsx)(n.a,{href:"/data-types#message",children:(0,s.jsx)(n.code,{children:"Message"})}),") or a ",(0,s.jsx)(n.strong,{children:"Language Model"})," (",(0,s.jsx)(n.a,{href:"/data-types#languagemodel",children:(0,s.jsx)(n.code,{children:"LanguageModel"})}),").\nSpecifically, the ",(0,s.jsx)(n.strong,{children:"Language Model"})," output is an instance of ",(0,s.jsx)(n.a,{href:"https://python.langchain.com/docs/integrations/chat/groq/",children:(0,s.jsx)(n.code,{children:"ChatGroq"})})," configured according to the component's parameters."]}),"\n",(0,s.jsxs)(n.p,{children:["Use the ",(0,s.jsx)(n.strong,{children:"Language Model"})," output when you want to use a Groq model as the LLM for another LLM-driven component, such as a ",(0,s.jsx)(n.strong,{children:"Language Model"})," or ",(0,s.jsx)(n.strong,{children:"Smart Function"})," component."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information, see ",(0,s.jsxs)(n.a,{href:"/components-models",children:[(0,s.jsx)(n.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Groq component in a basic prompting flow",src:t(23592).A+"",width:"1982",height:"1194"})}),"\n",(0,s.jsx)(n.h3,{id:"groq-text-generation-parameters",children:"Groq text generation parameters"}),"\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:"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:"groq_api_key"}),(0,s.jsx)(n.td,{children:"SecretString"}),(0,s.jsx)(n.td,{children:"Your Groq API key."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"groq_api_base"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Base URL path for API requests. Default: ",(0,s.jsx)(n.code,{children:"https://api.groq.com"}),"."]})]}),(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:"The maximum number of tokens to generate."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"temperature"}),(0,s.jsx)(n.td,{children:"Float"}),(0,s.jsxs)(n.td,{children:["Controls randomness in the output. Range: ",(0,s.jsx)(n.code,{children:"[0.0, 1.0]"}),". Default: ",(0,s.jsx)(n.code,{children:"0.1"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"n"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsx)(n.td,{children:"Number of chat completions to generate for each prompt."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"model_name"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["The name of the Groq model to use. Options are dynamically fetched from the Groq API after entering your API key and URL. To refresh your list of models, click ",(0,s.jsx)(d.A,{name:"RefreshCw","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Refresh"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"tool_mode_enabled"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"If enabled, the component only displays models that work with tools."})]})]})]})]})}function g(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 +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[9712],{17886:(e,n,t)=>{t.d(n,{A:()=>o});t(96540);var r=t(64058),s=t(74848);function o({name:e,...n}){const t=r[e];return t?(0,s.jsx)(t,{...n}):null}},23592:(e,n,t)=>{t.d(n,{A:()=>r});const r=t.p+"assets/images/component-groq-d3df19923f67805fd483632d537af9f4.png"},40561:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>g,frontMatter:()=>i,metadata:()=>r,toc:()=>c});const r=JSON.parse('{"id":"Components/bundles-groq","title":"Groq","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-groq.mdx","sourceDirName":"Components","slug":"/bundles-groq","permalink":"/bundles-groq","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Groq","slug":"/bundles-groq"},"sidebar":"docs","previous":{"title":"Google BigQuery","permalink":"/integrations-google-big-query"},"next":{"title":"Hugging Face","permalink":"/bundles-huggingface"}}');var s=t(74848),o=t(28453),d=t(17886);const i={title:"Groq",slug:"/bundles-groq"},a=void 0,l={},c=[{value:"Groq text generation",id:"groq-text-generation",level:2},{value:"Groq text generation parameters",id:"groq-text-generation-parameters",level:3}];function h(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",img:"img",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,s.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,s.jsx)(n.strong,{children:"Groq"})," bundle."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information, see the ",(0,s.jsx)(n.a,{href:"https://groq.com/",children:"Groq documentation"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"groq-text-generation",children:"Groq text generation"}),"\n",(0,s.jsx)(n.p,{children:"This component generates text using Groq's language models."}),"\n",(0,s.jsxs)(n.p,{children:["It can output either a ",(0,s.jsx)(n.strong,{children:"Model Response"})," (",(0,s.jsx)(n.a,{href:"/data-types#message",children:(0,s.jsx)(n.code,{children:"Message"})}),") or a ",(0,s.jsx)(n.strong,{children:"Language Model"})," (",(0,s.jsx)(n.a,{href:"/data-types#languagemodel",children:(0,s.jsx)(n.code,{children:"LanguageModel"})}),").\nSpecifically, the ",(0,s.jsx)(n.strong,{children:"Language Model"})," output is an instance of ",(0,s.jsx)(n.a,{href:"https://python.langchain.com/docs/integrations/chat/groq/",children:(0,s.jsx)(n.code,{children:"ChatGroq"})})," configured according to the component's parameters."]}),"\n",(0,s.jsxs)(n.p,{children:["Use the ",(0,s.jsx)(n.strong,{children:"Language Model"})," output when you want to use a Groq model as the LLM for another LLM-driven component, such as an ",(0,s.jsx)(n.strong,{children:"Agent"})," or ",(0,s.jsx)(n.strong,{children:"Smart Function"})," component."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information, see ",(0,s.jsxs)(n.a,{href:"/components-models",children:[(0,s.jsx)(n.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"Groq component in a basic prompting flow",src:t(23592).A+"",width:"1982",height:"1194"})}),"\n",(0,s.jsx)(n.h3,{id:"groq-text-generation-parameters",children:"Groq text generation parameters"}),"\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:"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:"groq_api_key"}),(0,s.jsx)(n.td,{children:"SecretString"}),(0,s.jsx)(n.td,{children:"Your Groq API key."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"groq_api_base"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Base URL path for API requests. Default: ",(0,s.jsx)(n.code,{children:"https://api.groq.com"}),"."]})]}),(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:"The maximum number of tokens to generate."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"temperature"}),(0,s.jsx)(n.td,{children:"Float"}),(0,s.jsxs)(n.td,{children:["Controls randomness in the output. Range: ",(0,s.jsx)(n.code,{children:"[0.0, 1.0]"}),". Default: ",(0,s.jsx)(n.code,{children:"0.1"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"n"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsx)(n.td,{children:"Number of chat completions to generate for each prompt."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"model_name"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["The name of the Groq model to use. Options are dynamically fetched from the Groq API after entering your API key and URL. To refresh your list of models, click ",(0,s.jsx)(d.A,{name:"RefreshCw","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Refresh"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"tool_mode_enabled"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"If enabled, the component only displays models that work with tools."})]})]})]})]})}function g(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/da1ad91e.362e3c9b.js b/assets/js/da1ad91e.362e3c9b.js new file mode 100644 index 0000000000..df30560b88 --- /dev/null +++ b/assets/js/da1ad91e.362e3c9b.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[8571],{10636:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>c,default:()=>p,frontMatter:()=>a,metadata:()=>r,toc:()=>h});const r=JSON.parse('{"id":"Components/bundles-anthropic","title":"Anthropic","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-anthropic.mdx","sourceDirName":"Components","slug":"/bundles-anthropic","permalink":"/bundles-anthropic","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Anthropic","slug":"/bundles-anthropic"},"sidebar":"docs","previous":{"title":"Amazon","permalink":"/bundles-amazon"},"next":{"title":"Apify","permalink":"/integrations-apify"}}');var s=t(74848),o=t(28453),i=(t(17886),t(31929));const a={title:"Anthropic",slug:"/bundles-anthropic"},c=void 0,d={},h=[{value:"Anthropic text generation",id:"anthropic-text-generation",level:2},{value:"Anthropic text generation parameters",id:"anthropic-text-generation-parameters",level:3},...i.RM];function l(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,s.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,s.jsx)(n.strong,{children:"Anthropic"})," bundle."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information about Anthropic features and functionality used by Anthropic components, see the ",(0,s.jsx)(n.a,{href:"https://docs.anthropic.com/en/docs/intro",children:"Anthropic documentation"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"anthropic-text-generation",children:"Anthropic text generation"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Anthropic"})," component generates text using Anthropic Chat and Language models like Claude."]}),"\n",(0,s.jsxs)(n.p,{children:["It can output either a ",(0,s.jsx)(n.strong,{children:"Model Response"})," (",(0,s.jsx)(n.a,{href:"/data-types#message",children:(0,s.jsx)(n.code,{children:"Message"})}),") or a ",(0,s.jsx)(n.strong,{children:"Language Model"})," (",(0,s.jsx)(n.a,{href:"/data-types#languagemodel",children:(0,s.jsx)(n.code,{children:"LanguageModel"})}),").\nSpecifically, the ",(0,s.jsx)(n.strong,{children:"Language Model"})," output is an instance of ",(0,s.jsx)(n.a,{href:"https://python.langchain.com/docs/integrations/chat/anthropic/",children:(0,s.jsx)(n.code,{children:"ChatAnthropic"})})," configured according to the component's parameters."]}),"\n",(0,s.jsxs)(n.p,{children:["Use the ",(0,s.jsx)(n.strong,{children:"Language Model"})," output when you want to use an Anthropic model as the LLM for another LLM-driven component, such as an ",(0,s.jsx)(n.strong,{children:"Agent"})," or ",(0,s.jsx)(n.strong,{children:"Smart Function"})," component."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information, see ",(0,s.jsxs)(n.a,{href:"/components-models",children:[(0,s.jsx)(n.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"anthropic-text-generation-parameters",children:"Anthropic text generation parameters"}),"\n",(0,s.jsx)(i.Ay,{}),"\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:"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:"max_tokens"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsxs)(n.td,{children:["Input parameter. The maximum number of tokens to generate. Set to 0 for unlimited tokens. Default: ",(0,s.jsx)(n.code,{children:"4096"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"model"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The name of the Anthropic model to use. Options include various Claude 3 models."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"anthropic_api_key"}),(0,s.jsx)(n.td,{children:"SecretString"}),(0,s.jsx)(n.td,{children:"Input parameter. Your Anthropic API key for authentication."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"temperature"}),(0,s.jsx)(n.td,{children:"Float"}),(0,s.jsxs)(n.td,{children:["Input parameter. Controls randomness in the output. Default: ",(0,s.jsx)(n.code,{children:"0.1"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"anthropic_api_url"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. Endpoint of the Anthropic API. Defaults to ",(0,s.jsx)(n.code,{children:"https://api.anthropic.com"})," if not specified (advanced)."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"prefill"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. Prefill text to guide the model's response (advanced)."})]})]})]})]})}function p(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},17886:(e,n,t)=>{t.d(n,{A:()=>o});t(96540);var r=t(64058),s=t(74848);function o({name:e,...n}){const t=r[e];return t?(0,s.jsx)(t,{...n}):null}},31929:(e,n,t)=>{t.d(n,{Ay:()=>c,RM:()=>i});var r=t(74848),s=t(28453),o=t(17886);const i=[];function a(e){const n={a:"a",p:"p",strong:"strong",...(0,s.R)(),...e.components};return(0,r.jsxs)(n.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,r.jsx)(o.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Controls"})," in the ",(0,r.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function c(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(a,{...e})}):a(e)}}}]); \ No newline at end of file diff --git a/assets/js/da1ad91e.7ba5573d.js b/assets/js/da1ad91e.7ba5573d.js deleted file mode 100644 index 071681a76c..0000000000 --- a/assets/js/da1ad91e.7ba5573d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[8571],{10636:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>c,default:()=>p,frontMatter:()=>a,metadata:()=>r,toc:()=>h});const r=JSON.parse('{"id":"Components/bundles-anthropic","title":"Anthropic","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-anthropic.mdx","sourceDirName":"Components","slug":"/bundles-anthropic","permalink":"/bundles-anthropic","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Anthropic","slug":"/bundles-anthropic"},"sidebar":"docs","previous":{"title":"Amazon","permalink":"/bundles-amazon"},"next":{"title":"Apify","permalink":"/integrations-apify"}}');var s=t(74848),o=t(28453),i=t(17886);const a={title:"Anthropic",slug:"/bundles-anthropic"},c=void 0,d={},h=[{value:"Anthropic text generation",id:"anthropic-text-generation",level:2},{value:"Anthropic text generation parameters",id:"anthropic-text-generation-parameters",level:3}];function l(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,s.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,s.jsx)(n.strong,{children:"Anthropic"})," bundle."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information about Anthropic features and functionality used by Anthropic components, see the ",(0,s.jsx)(n.a,{href:"https://docs.anthropic.com/en/docs/intro",children:"Anthropic documentation"}),"."]}),"\n",(0,s.jsx)(n.h2,{id:"anthropic-text-generation",children:"Anthropic text generation"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Anthropic"})," component generates text using Anthropic Chat and Language models like Claude."]}),"\n",(0,s.jsxs)(n.p,{children:["It can output either a ",(0,s.jsx)(n.strong,{children:"Model Response"})," (",(0,s.jsx)(n.a,{href:"/data-types#message",children:(0,s.jsx)(n.code,{children:"Message"})}),") or a ",(0,s.jsx)(n.strong,{children:"Language Model"})," (",(0,s.jsx)(n.a,{href:"/data-types#languagemodel",children:(0,s.jsx)(n.code,{children:"LanguageModel"})}),").\nSpecifically, the ",(0,s.jsx)(n.strong,{children:"Language Model"})," output is an instance of ",(0,s.jsx)(n.a,{href:"https://python.langchain.com/docs/integrations/chat/anthropic/",children:(0,s.jsx)(n.code,{children:"ChatAnthropic"})})," configured according to the component's parameters."]}),"\n",(0,s.jsxs)(n.p,{children:["Use the ",(0,s.jsx)(n.strong,{children:"Language Model"})," output when you want to use an Anthropic model as the LLM for another LLM-driven component, such as a ",(0,s.jsx)(n.strong,{children:"Language Model"})," or ",(0,s.jsx)(n.strong,{children:"Smart Function"})," component."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information, see ",(0,s.jsxs)(n.a,{href:"/components-models",children:[(0,s.jsx)(n.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"anthropic-text-generation-parameters",children:"Anthropic text generation parameters"}),"\n",(0,s.jsxs)(n.p,{children:["Many ",(0,s.jsx)(n.strong,{children:"Anthropic"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,s.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Controls"})," in the ",(0,s.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\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:"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:"max_tokens"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsxs)(n.td,{children:["Input parameter. The maximum number of tokens to generate. Set to 0 for unlimited tokens. Default: ",(0,s.jsx)(n.code,{children:"4096"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"model"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The name of the Anthropic model to use. Options include various Claude 3 models."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"anthropic_api_key"}),(0,s.jsx)(n.td,{children:"SecretString"}),(0,s.jsx)(n.td,{children:"Input parameter. Your Anthropic API key for authentication."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"temperature"}),(0,s.jsx)(n.td,{children:"Float"}),(0,s.jsxs)(n.td,{children:["Input parameter. Controls randomness in the output. Default: ",(0,s.jsx)(n.code,{children:"0.1"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"anthropic_api_url"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. Endpoint of the Anthropic API. Defaults to ",(0,s.jsx)(n.code,{children:"https://api.anthropic.com"})," if not specified (advanced)."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"prefill"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. Prefill text to guide the model's response (advanced)."})]})]})]})]})}function p(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},17886:(e,n,t)=>{t.d(n,{A:()=>o});t(96540);var r=t(64058),s=t(74848);function o({name:e,...n}){const t=r[e];return t?(0,s.jsx)(t,{...n}):null}}}]); \ No newline at end of file diff --git a/assets/js/dfa3dc90.7127ec5b.js b/assets/js/dfa3dc90.7127ec5b.js deleted file mode 100644 index 887d4dca4e..0000000000 --- a/assets/js/dfa3dc90.7127ec5b.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[129],{17886:(e,s,r)=>{r.d(s,{A:()=>d});r(96540);var t=r(64058),n=r(74848);function d({name:e,...s}){const r=t[e];return r?(0,n.jsx)(r,{...s}):null}},25958:(e,s,r)=>{r.r(s),r.d(s,{assets:()=>h,contentTitle:()=>a,default:()=>m,frontMatter:()=>o,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"Components/bundles-redis","title":"Redis","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-redis.mdx","sourceDirName":"Components","slug":"/bundles-redis","permalink":"/bundles-redis","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Redis","slug":"/bundles-redis"},"sidebar":"docs","previous":{"title":"Perplexity","permalink":"/bundles-perplexity"},"next":{"title":"SambaNova","permalink":"/bundles-sambanova"}}');var n=r(74848),d=r(28453),i=r(17886);const o={title:"Redis",slug:"/bundles-redis"},a=void 0,h={},c=[{value:"Redis Chat Memory",id:"redis-chat-memory",level:2},{value:"Redis Chat Memory parameters",id:"redis-chat-memory-parameters",level:3},{value:"Redis vector store",id:"redis-vector-store",level:2}];function l(e){const s={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,d.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,n.jsxs)(s.p,{children:["This page describes the components that are available in the ",(0,n.jsx)(s.strong,{children:"Redis"})," bundle."]}),"\n",(0,n.jsx)(s.h2,{id:"redis-chat-memory",children:"Redis Chat Memory"}),"\n",(0,n.jsxs)(s.p,{children:["The ",(0,n.jsx)(s.strong,{children:"Redis Chat Memory"})," component retrieves and stores chat messages using Redis memory storage."]}),"\n",(0,n.jsxs)(s.p,{children:["Chat memories are passed between memory storage components as the ",(0,n.jsx)(s.a,{href:"/data-types#memory",children:(0,n.jsx)(s.code,{children:"Memory"})})," data type."]}),"\n",(0,n.jsxs)(s.p,{children:["For more information about using external chat memory in flows, see the ",(0,n.jsxs)(s.a,{href:"/components-helpers#message-history",children:[(0,n.jsx)(s.strong,{children:"Message History"})," component"]}),"."]}),"\n",(0,n.jsx)(s.h3,{id:"redis-chat-memory-parameters",children:"Redis Chat Memory parameters"}),"\n",(0,n.jsxs)(s.p,{children:["Many ",(0,n.jsx)(s.strong,{children:"Redis Chat Memory"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,n.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,n.jsx)(s.strong,{children:"Controls"})," in the ",(0,n.jsx)(s.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Name"}),(0,n.jsx)(s.th,{children:"Display Name"}),(0,n.jsx)(s.th,{children:"Info"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:"host"}),(0,n.jsx)(s.td,{children:"hostname"}),(0,n.jsx)(s.td,{children:"Input parameter. The IP address or hostname."})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:"port"}),(0,n.jsx)(s.td,{children:"port"}),(0,n.jsx)(s.td,{children:"Input parameter. The Redis Port Number."})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:"database"}),(0,n.jsx)(s.td,{children:"database"}),(0,n.jsx)(s.td,{children:"Input parameter. The Redis database."})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:"username"}),(0,n.jsx)(s.td,{children:"Username"}),(0,n.jsx)(s.td,{children:"Input parameter. The Redis username."})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:"password"}),(0,n.jsx)(s.td,{children:"Password"}),(0,n.jsx)(s.td,{children:"Input parameter. The password for the username."})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:"key_prefix"}),(0,n.jsx)(s.td,{children:"Key prefix"}),(0,n.jsx)(s.td,{children:"Input parameter. The key prefix."})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:"session_id"}),(0,n.jsx)(s.td,{children:"Session ID"}),(0,n.jsx)(s.td,{children:"Input parameter. The unique session identifier for the message."})]})]})]}),"\n",(0,n.jsx)(s.h2,{id:"redis-vector-store",children:"Redis vector store"}),"\n",(0,n.jsxs)(s.p,{children:["See ",(0,n.jsxs)(s.a,{href:"/components-vector-stores#redis",children:[(0,n.jsx)(s.strong,{children:"Redis"})," vector store component"]}),"."]})]})}function m(e={}){const{wrapper:s}={...(0,d.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(l,{...e})}):l(e)}}}]); \ No newline at end of file diff --git a/assets/js/dfa3dc90.aed5ad3e.js b/assets/js/dfa3dc90.aed5ad3e.js new file mode 100644 index 0000000000..59e6b50227 --- /dev/null +++ b/assets/js/dfa3dc90.aed5ad3e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[129],{17886:(e,s,r)=>{r.d(s,{A:()=>d});r(96540);var t=r(64058),n=r(74848);function d({name:e,...s}){const r=t[e];return r?(0,n.jsx)(r,{...s}):null}},25958:(e,s,r)=>{r.r(s),r.d(s,{assets:()=>c,contentTitle:()=>a,default:()=>p,frontMatter:()=>o,metadata:()=>t,toc:()=>h});const t=JSON.parse('{"id":"Components/bundles-redis","title":"Redis","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-redis.mdx","sourceDirName":"Components","slug":"/bundles-redis","permalink":"/bundles-redis","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Redis","slug":"/bundles-redis"},"sidebar":"docs","previous":{"title":"Perplexity","permalink":"/bundles-perplexity"},"next":{"title":"SambaNova","permalink":"/bundles-sambanova"}}');var n=r(74848),d=r(28453),i=(r(17886),r(31929));const o={title:"Redis",slug:"/bundles-redis"},a=void 0,c={},h=[{value:"Redis Chat Memory",id:"redis-chat-memory",level:2},{value:"Redis Chat Memory parameters",id:"redis-chat-memory-parameters",level:3},...i.RM,{value:"Redis vector store",id:"redis-vector-store",level:2}];function l(e){const s={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,d.R)(),...e.components};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)(s.p,{children:[(0,n.jsx)(s.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,n.jsxs)(s.p,{children:["This page describes the components that are available in the ",(0,n.jsx)(s.strong,{children:"Redis"})," bundle."]}),"\n",(0,n.jsx)(s.h2,{id:"redis-chat-memory",children:"Redis Chat Memory"}),"\n",(0,n.jsxs)(s.p,{children:["The ",(0,n.jsx)(s.strong,{children:"Redis Chat Memory"})," component retrieves and stores chat messages using Redis memory storage."]}),"\n",(0,n.jsxs)(s.p,{children:["Chat memories are passed between memory storage components as the ",(0,n.jsx)(s.a,{href:"/data-types#memory",children:(0,n.jsx)(s.code,{children:"Memory"})})," data type."]}),"\n",(0,n.jsxs)(s.p,{children:["For more information about using external chat memory in flows, see the ",(0,n.jsxs)(s.a,{href:"/components-helpers#message-history",children:[(0,n.jsx)(s.strong,{children:"Message History"})," component"]}),"."]}),"\n",(0,n.jsx)(s.h3,{id:"redis-chat-memory-parameters",children:"Redis Chat Memory parameters"}),"\n",(0,n.jsx)(i.Ay,{}),"\n",(0,n.jsxs)(s.table,{children:[(0,n.jsx)(s.thead,{children:(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.th,{children:"Name"}),(0,n.jsx)(s.th,{children:"Display Name"}),(0,n.jsx)(s.th,{children:"Info"})]})}),(0,n.jsxs)(s.tbody,{children:[(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:"host"}),(0,n.jsx)(s.td,{children:"hostname"}),(0,n.jsx)(s.td,{children:"Input parameter. The IP address or hostname."})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:"port"}),(0,n.jsx)(s.td,{children:"port"}),(0,n.jsx)(s.td,{children:"Input parameter. The Redis Port Number."})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:"database"}),(0,n.jsx)(s.td,{children:"database"}),(0,n.jsx)(s.td,{children:"Input parameter. The Redis database."})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:"username"}),(0,n.jsx)(s.td,{children:"Username"}),(0,n.jsx)(s.td,{children:"Input parameter. The Redis username."})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:"password"}),(0,n.jsx)(s.td,{children:"Password"}),(0,n.jsx)(s.td,{children:"Input parameter. The password for the username."})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:"key_prefix"}),(0,n.jsx)(s.td,{children:"Key prefix"}),(0,n.jsx)(s.td,{children:"Input parameter. The key prefix."})]}),(0,n.jsxs)(s.tr,{children:[(0,n.jsx)(s.td,{children:"session_id"}),(0,n.jsx)(s.td,{children:"Session ID"}),(0,n.jsx)(s.td,{children:"Input parameter. The unique session identifier for the message."})]})]})]}),"\n",(0,n.jsx)(s.h2,{id:"redis-vector-store",children:"Redis vector store"}),"\n",(0,n.jsxs)(s.p,{children:["See ",(0,n.jsxs)(s.a,{href:"/components-vector-stores#redis",children:[(0,n.jsx)(s.strong,{children:"Redis"})," vector store component"]}),"."]})]})}function p(e={}){const{wrapper:s}={...(0,d.R)(),...e.components};return s?(0,n.jsx)(s,{...e,children:(0,n.jsx)(l,{...e})}):l(e)}},31929:(e,s,r)=>{r.d(s,{Ay:()=>a,RM:()=>i});var t=r(74848),n=r(28453),d=r(17886);const i=[];function o(e){const s={a:"a",p:"p",strong:"strong",...(0,n.R)(),...e.components};return(0,t.jsxs)(s.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,t.jsx)(d.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,t.jsx)(s.strong,{children:"Controls"})," in the ",(0,t.jsx)(s.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function a(e={}){const{wrapper:s}={...(0,n.R)(),...e.components};return s?(0,t.jsx)(s,{...e,children:(0,t.jsx)(o,{...e})}):o(e)}}}]); \ No newline at end of file diff --git a/assets/js/e24b341f.656dec8d.js b/assets/js/e24b341f.656dec8d.js new file mode 100644 index 0000000000..efc3093456 --- /dev/null +++ b/assets/js/e24b341f.656dec8d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[9592],{17886:(e,n,s)=>{s.d(n,{A:()=>r});s(96540);var o=s(64058),t=s(74848);function r({name:e,...n}){const s=o[e];return s?(0,t.jsx)(s,{...n}):null}},45184:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>a,contentTitle:()=>i,default:()=>p,frontMatter:()=>c,metadata:()=>o,toc:()=>d});const o=JSON.parse('{"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.","source":"@site/docs/Components/mcp-client.mdx","sourceDirName":"Components","slug":"/mcp-client","permalink":"/mcp-client","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Use Langflow as an MCP client","slug":"/mcp-client"},"sidebar":"docs","previous":{"title":"Configure tools for agents","permalink":"/agents-tools"},"next":{"title":"Use Langflow as an MCP server","permalink":"/mcp-server"}}');var t=s(74848),r=s(28453),l=s(17886);const c={title:"Use Langflow as an MCP client",slug:"/mcp-client"},i=void 0,a={},d=[{value:"Use the MCP tools component",id:"use-the-mcp-tools-component",level:2},{value:"Connect to a non-Langflow MCP server",id:"mcp-stdio-mode",level:3},{value:"Connect a Langflow MCP server",id:"mcp-sse-mode",level:3},{value:"MCP Tools parameters",id:"mcp-tools-parameters",level:2},{value:"Manage connected MCP servers",id:"manage-connected-mcp-servers",level:2},{value:"See also",id:"see-also",level:2}];function h(e){const n={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,r.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:["Langflow integrates with the ",(0,t.jsx)(n.a,{href:"https://modelcontextprotocol.io/introduction",children:"Model Context Protocol (MCP)"})," as both an MCP server and an MCP client."]}),"\n",(0,t.jsxs)(n.p,{children:["This page describes how to use Langflow as an MCP client with the ",(0,t.jsxs)(n.a,{href:"#use-the-mcp-tools-component",children:[(0,t.jsx)(n.strong,{children:"MCP Tools"})," component"]})," and connected ",(0,t.jsx)(n.a,{href:"#manage-connected-mcp-servers",children:"MCP servers"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["For information about using Langflow as an MCP server, see ",(0,t.jsx)(n.a,{href:"/mcp-server",children:"Use Langflow as an MCP server"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"use-the-mcp-tools-component",children:"Use the MCP tools component"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.strong,{children:"MCP Tools"})," component connects to an MCP server so that a ",(0,t.jsx)(n.a,{href:"/agents",children:"Langflow agent"})," can use the server's tools when responding to user queries."]}),"\n",(0,t.jsx)(n.p,{children:"This component has two modes, depending on the type of server you want to access:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"#mcp-stdio-mode",children:"Connect to a non-Langflow MCP server"})," with a JSON configuration file, server start command, or SSE URL to access tools provided by external, non-Langflow MCP servers."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"#mcp-sse-mode",children:"Connect to a Langflow MCP server"})," to use flows from your ",(0,t.jsx)(n.a,{href:"/concepts-flows#projects",children:"Langflow projects"})," as MCP tools."]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"mcp-stdio-mode",children:"Connect to a non-Langflow MCP server"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Add an ",(0,t.jsx)(n.strong,{children:"MCP Tools"})," component to your flow."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["In the ",(0,t.jsx)(n.strong,{children:"MCP Server"})," field, select the server you want to add, or click ",(0,t.jsx)(l.A,{name:"Plus","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"Add MCP Server"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"There are multiple ways to add a new server."}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["In the ",(0,t.jsx)(n.strong,{children:"JSON"})," pane, paste the MCP server's JSON configuration file, and then click ",(0,t.jsx)(n.strong,{children:"Add Server"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["In the ",(0,t.jsx)(n.strong,{children:"STDIO"})," pane, enter the MCP server's ",(0,t.jsx)(n.strong,{children:"Name"}),", ",(0,t.jsx)(n.strong,{children:"Command"}),", and any ",(0,t.jsx)(n.strong,{children:"Arguments"})," or ",(0,t.jsx)(n.strong,{children:"Environment Variables"})," the server uses, and then click ",(0,t.jsx)(n.strong,{children:"Add Server"}),".\nFor example, to start a ",(0,t.jsx)(n.a,{href:"https://github.com/modelcontextprotocol/servers/tree/main/src/fetch",children:"Fetch"})," server, the ",(0,t.jsx)(n.strong,{children:"Command"})," is ",(0,t.jsx)(n.code,{children:"uvx mcp-server-fetch"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["In the ",(0,t.jsx)(n.strong,{children:"SSE"})," pane, enter your Langflow MCP server's ",(0,t.jsx)(n.strong,{children:"Name"}),", ",(0,t.jsx)(n.strong,{children:"SSE URL"}),", and any ",(0,t.jsx)(n.strong,{children:"Headers"})," or ",(0,t.jsx)(n.strong,{children:"Environment Variables"})," the server uses, and then click ",(0,t.jsx)(n.strong,{children:"Add Server"}),".\nThe default ",(0,t.jsx)(n.strong,{children:"SSE URL"})," is ",(0,t.jsx)(n.code,{children:"http://localhost:7860/api/v1/mcp/sse"}),". For more information, see ",(0,t.jsx)(n.a,{href:"#mcp-sse-mode",children:"Use SSE mode"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"uvx"})," is included with ",(0,t.jsx)(n.code,{children:"uv"})," in the Langflow package.\nTo use ",(0,t.jsx)(n.code,{children:"npx"})," server commands, you must first install an LTS release of ",(0,t.jsx)(n.a,{href:"https://docs.npmjs.com/downloading-and-installing-node-js-and-npm",children:"Node.js"}),".\nFor an example of an ",(0,t.jsx)(n.code,{children:"npx"})," MCP server in Langflow, see ",(0,t.jsx)(n.a,{href:"/mcp-component-astra",children:"Connect an Astra DB MCP server to Langflow"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["To use environment variables in your server command, enter each variable in the ",(0,t.jsx)(n.strong,{children:"Env"})," fields as you would define them in a script, such as ",(0,t.jsx)(n.code,{children:"VARIABLE=value"}),"."]}),"\n",(0,t.jsx)(n.admonition,{type:"important",children:(0,t.jsxs)(n.p,{children:["Langflow passes environment variables from the ",(0,t.jsx)(n.code,{children:".env"})," file to MCP, but it doesn't pass global variables declared in your Langflow ",(0,t.jsx)(n.strong,{children:"Settings"}),".\nTo define an MCP server environment variable as a global variable, add it to Langflow's ",(0,t.jsx)(n.code,{children:".env"})," file at startup.\nFor more information, see ",(0,t.jsx)(n.a,{href:"/configuration-global-variables",children:"global variables"}),"."]})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["In the ",(0,t.jsx)(n.strong,{children:"Tool"})," field, select a tool that you want this component to use, or leave the field blank to allow access to all tools provided by the MCP server."]}),"\n",(0,t.jsx)(n.p,{children:"If you select a specific tool, you might need to configure additional tool-specific fields. For information about tool-specific fields, see your MCP server's documentation."}),"\n",(0,t.jsxs)(n.p,{children:["At this point, the ",(0,t.jsx)(n.strong,{children:"MCP Tools"})," component is serving a tool, but nothing is using the tool. The next steps explain how to make the tool available to an ",(0,t.jsxs)(n.a,{href:"/components-agents",children:[(0,t.jsx)(n.strong,{children:"Agent"})," component"]})," so that the agent can use the tool in its responses."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["In the ",(0,t.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),", enable ",(0,t.jsx)(n.strong,{children:"Tool mode"})," so you can use the component with an agent."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Connect the ",(0,t.jsx)(n.strong,{children:"MCP Tools"})," component's ",(0,t.jsx)(n.strong,{children:"Toolset"})," port to an ",(0,t.jsx)(n.strong,{children:"Agent"})," component's ",(0,t.jsx)(n.strong,{children:"Tools"})," port."]}),"\n",(0,t.jsxs)(n.p,{children:["If not already present in your flow, make sure you also attach ",(0,t.jsx)(n.strong,{children:"Chat Input"})," and ",(0,t.jsx)(n.strong,{children:"Chat Output"})," components to the ",(0,t.jsx)(n.strong,{children:"Agent"})," component."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"MCP Tools component in STDIO mode",src:s(63963).A+"",width:"4000",height:"2608"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Test your flow to make sure the MCP server is connected and the selected tool is used by the agent. Open the ",(0,t.jsx)(n.strong,{children:"Playground"}),", and then enter a prompt that uses the tool you connected through the ",(0,t.jsx)(n.strong,{children:"MCP Tools"})," component."]}),"\n",(0,t.jsxs)(n.p,{children:["For example, if you use ",(0,t.jsx)(n.code,{children:"mcp-server-fetch"})," with the ",(0,t.jsx)(n.code,{children:"fetch"})," tool, you could ask the agent to summarize recent tech news. The agent calls the MCP server function ",(0,t.jsx)(n.code,{children:"fetch"}),", and then returns the response."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"If you want the agent to be able to use more tools, repeat these steps to add more tools components with different servers or tools."}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"mcp-sse-mode",children:"Connect a Langflow MCP server"}),"\n",(0,t.jsxs)(n.p,{children:["Every Langflow project runs a separate MCP server that exposes the project's flows as MCP tools.\nFor more information about your projects' MCP servers, including exposing flows as MCP tools, see ",(0,t.jsx)(n.a,{href:"/mcp-server",children:"Use Langflow as an MCP server"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["To leverage flows-as-tools, use the ",(0,t.jsx)(n.strong,{children:"MCP Tools"})," component in ",(0,t.jsx)(n.strong,{children:"Server-Sent Events (SSE)"})," mode to connect to a project's ",(0,t.jsx)(n.code,{children:"/api/v1/mcp/sse"})," endpoint:"]}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Add an ",(0,t.jsx)(n.strong,{children:"MCP Tools"})," component to your flow, click ",(0,t.jsx)(l.A,{name:"Plus","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"Add MCP Server"}),", and then select ",(0,t.jsx)(n.strong,{children:"SSE"})," mode."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["In the ",(0,t.jsx)(n.strong,{children:"MCP SSE URL"})," field, modify the default address to point at your Langflow server's SSE endpoint. The default value for other Langflow installations is ",(0,t.jsx)(n.code,{children:"http://localhost:7860/api/v1/mcp/sse"}),".\nIn SSE mode, all flows available from the targeted server are treated as tools."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["In the ",(0,t.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),", enable ",(0,t.jsx)(n.strong,{children:"Tool Mode"})," so you can use the component with an agent."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Connect the ",(0,t.jsx)(n.strong,{children:"MCP Tools"})," component's ",(0,t.jsx)(n.strong,{children:"Toolset"})," port to an ",(0,t.jsx)(n.strong,{children:"Agent"})," component's ",(0,t.jsx)(n.strong,{children:"Tools"})," port."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["If not already present in your flow, make sure you also attach ",(0,t.jsx)(n.strong,{children:"Chat Input"})," and ",(0,t.jsx)(n.strong,{children:"Chat Output"})," components to the ",(0,t.jsx)(n.strong,{children:"Agent"})," component."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"MCP component with SSE mode enabled",src:s(68347).A+"",width:"4000",height:"2438"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Test your flow to make sure the agent uses your flows to respond to queries. Open the ",(0,t.jsx)(n.strong,{children:"Playground"}),", and then enter a prompt that uses a flow that you connected through the ",(0,t.jsx)(n.strong,{children:"MCP Tools"})," component."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"If you want the agent to be able to use more tools, repeat these steps to add more tools components with different servers or tools."}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"mcp-tools-parameters",children:"MCP Tools parameters"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Name"}),(0,t.jsx)(n.th,{children:"Type"}),(0,t.jsx)(n.th,{children:"Description"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"command"}),(0,t.jsx)(n.td,{children:"String"}),(0,t.jsxs)(n.td,{children:["Input parameter. Stdio mode only. The MCP server startup command. Default: ",(0,t.jsx)(n.code,{children:"uvx mcp-sse-shim@latest"}),"."]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"sse_url"}),(0,t.jsx)(n.td,{children:"String"}),(0,t.jsxs)(n.td,{children:["Input parameter. SSE mode only. The SSE URL for a Langflow project's MCP server. Default for Langflow Desktop: ",(0,t.jsx)(n.code,{children:"http://localhost:7868/"}),". Default for other installations: ",(0,t.jsx)(n.code,{children:"http://localhost:7860/api/v1/mcp/sse"})]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"tools"}),(0,t.jsx)(n.td,{children:"List[Tool]"}),(0,t.jsxs)(n.td,{children:["Output parameter. ",(0,t.jsx)(n.a,{href:"/data-types#tool",children:(0,t.jsx)(n.code,{children:"Tool"})})," object containing a list of tools exposed by the MCP server."]})]})]})]}),"\n",(0,t.jsx)(n.h2,{id:"manage-connected-mcp-servers",children:"Manage connected MCP servers"}),"\n",(0,t.jsxs)(n.p,{children:["To manage MCP servers connected to your Langflow client, go to ",(0,t.jsx)(n.strong,{children:"Settings"}),", and then click ",(0,t.jsx)(n.strong,{children:"MCP Servers"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["To add a new MCP server, click ",(0,t.jsx)(n.strong,{children:"Add MCP Server"}),", and then follow the steps in ",(0,t.jsx)(n.a,{href:"#use-the-mcp-tools-component",children:"Use the MCP Tools component"})," to configure the connection and use the server in a flow."]}),"\n",(0,t.jsxs)(n.p,{children:["Click ",(0,t.jsx)(l.A,{name:"Ellipsis","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"More"})," to edit or delete an MCP server connection."]}),"\n",(0,t.jsx)(n.h2,{id:"see-also",children:"See also"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/mcp-server",children:"Use Langflow as an MCP server"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/mcp-component-astra",children:"Use a DataStax Astra DB MCP server with the MCP Tools component"})}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},63963:(e,n,s)=>{s.d(n,{A:()=>o});const o=s.p+"assets/images/component-mcp-stdio-a13a643e61ceea972c4a3f64dd1ae72f.png"},68347:(e,n,s)=>{s.d(n,{A:()=>o});const o=s.p+"assets/images/component-mcp-sse-mode-2e742342a52231247733d8486ab612fd.png"}}]); \ No newline at end of file diff --git a/assets/js/e24b341f.66f5442d.js b/assets/js/e24b341f.66f5442d.js deleted file mode 100644 index 95e771d73c..0000000000 --- a/assets/js/e24b341f.66f5442d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[9592],{11470:(e,n,s)=>{s.d(n,{A:()=>C});var t=s(96540),o=s(18215),r=s(23104),l=s(56347),a=s(205),i=s(57485),c=s(31682),d=s(70679);function h(e){return t.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,t.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:s}=e;return(0,t.useMemo)(()=>{const e=n??function(e){return h(e).map(({props:{value:e,label:n,attributes:s,default:t}})=>({value:e,label:n,attributes:s,default:t}))}(s);return function(e){const n=(0,c.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,s])}function p({value:e,tabValues:n}){return n.some(n=>n.value===e)}function m({queryString:e=!1,groupId:n}){const s=(0,l.W6)(),o=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,i.aZ)(o),(0,t.useCallback)(e=>{if(!o)return;const n=new URLSearchParams(s.location.search);n.set(o,e),s.replace({...s.location,search:n.toString()})},[o,s])]}function x(e){const{defaultValue:n,queryString:s=!1,groupId:o}=e,r=u(e),[l,i]=(0,t.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(!p({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 s=n.find(e=>e.default)??n[0];if(!s)throw new Error("Unexpected error: 0 tabValues");return s.value}({defaultValue:n,tabValues:r})),[c,h]=m({queryString:s,groupId:o}),[x,j]=function({groupId:e}){const n=function(e){return e?`docusaurus.tab.${e}`:null}(e),[s,o]=(0,d.Dv)(n);return[s,(0,t.useCallback)(e=>{n&&o.set(e)},[n,o])]}({groupId:o}),f=(()=>{const e=c??x;return p({value:e,tabValues:r})?e:null})();(0,a.A)(()=>{f&&i(f)},[f]);return{selectedValue:l,selectValue:(0,t.useCallback)(e=>{if(!p({value:e,tabValues:r}))throw new Error(`Can't select invalid tab value=${e}`);i(e),h(e),j(e)},[h,j,r]),tabValues:r}}var j=s(92303);const f={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var g=s(74848);function v({className:e,block:n,selectedValue:s,selectValue:t,tabValues:l}){const a=[],{blockElementScrollPositionUntilNextRender:i}=(0,r.a_)(),c=e=>{const n=e.currentTarget,o=a.indexOf(n),r=l[o].value;r!==s&&(i(n),t(r))},d=e=>{let n=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const s=a.indexOf(e.currentTarget)+1;n=a[s]??a[0];break}case"ArrowLeft":{const s=a.indexOf(e.currentTarget)-1;n=a[s]??a[a.length-1];break}}n?.focus()};return(0,g.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,o.A)("tabs",{"tabs--block":n},e),children:l.map(({value:e,label:n,attributes:t})=>(0,g.jsx)("li",{role:"tab",tabIndex:s===e?0:-1,"aria-selected":s===e,ref:e=>{a.push(e)},onKeyDown:d,onClick:c,...t,className:(0,o.A)("tabs__item",f.tabItem,t?.className,{"tabs__item--active":s===e}),children:n??e},e))})}function b({lazy:e,children:n,selectedValue:s}){const r=(Array.isArray(n)?n:[n]).filter(Boolean);if(e){const e=r.find(e=>e.props.value===s);return e?(0,t.cloneElement)(e,{className:(0,o.A)("margin-top--md",e.props.className)}):null}return(0,g.jsx)("div",{className:"margin-top--md",children:r.map((e,n)=>(0,t.cloneElement)(e,{key:n,hidden:e.props.value!==s}))})}function w(e){const n=x(e);return(0,g.jsxs)("div",{className:(0,o.A)("tabs-container",f.tabList),children:[(0,g.jsx)(v,{...n,...e}),(0,g.jsx)(b,{...n,...e})]})}function C(e){const n=(0,j.A)();return(0,g.jsx)(w,{...e,children:h(e.children)},String(n))}},17886:(e,n,s)=>{s.d(n,{A:()=>r});s(96540);var t=s(64058),o=s(74848);function r({name:e,...n}){const s=t[e];return s?(0,o.jsx)(s,{...n}):null}},19365:(e,n,s)=>{s.d(n,{A:()=>l});s(96540);var t=s(18215);const o={tabItem:"tabItem_Ymn6"};var r=s(74848);function l({children:e,hidden:n,className:s}){return(0,r.jsx)("div",{role:"tabpanel",className:(0,t.A)(o.tabItem,s),hidden:n,children:e})}},45184:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>u,frontMatter:()=>a,metadata:()=>t,toc:()=>d});const t=JSON.parse('{"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.","source":"@site/docs/Components/mcp-client.mdx","sourceDirName":"Components","slug":"/mcp-client","permalink":"/mcp-client","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Use Langflow as an MCP client","slug":"/mcp-client"},"sidebar":"docs","previous":{"title":"Configure tools for agents","permalink":"/agents-tools"},"next":{"title":"Use Langflow as an MCP server","permalink":"/mcp-server"}}');var o=s(74848),r=s(28453),l=(s(11470),s(19365),s(17886));const a={title:"Use Langflow as an MCP client",slug:"/mcp-client"},i=void 0,c={},d=[{value:"Use the MCP tools component",id:"use-the-mcp-tools-component",level:2},{value:"Connect to a non-Langflow MCP server",id:"mcp-stdio-mode",level:3},{value:"Connect a Langflow MCP server",id:"mcp-sse-mode",level:3},{value:"MCP Tools parameters",id:"mcp-tools-parameters",level:2},{value:"Manage connected MCP servers",id:"manage-connected-mcp-servers",level:2},{value:"See also",id:"see-also",level:2}];function h(e){const n={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,r.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(n.p,{children:["Langflow integrates with the ",(0,o.jsx)(n.a,{href:"https://modelcontextprotocol.io/introduction",children:"Model Context Protocol (MCP)"})," as both an MCP server and an MCP client."]}),"\n",(0,o.jsxs)(n.p,{children:["This page describes how to use Langflow as an MCP client with the ",(0,o.jsxs)(n.a,{href:"#use-the-mcp-tools-component",children:[(0,o.jsx)(n.strong,{children:"MCP Tools"})," component"]})," and connected ",(0,o.jsx)(n.a,{href:"#manage-connected-mcp-servers",children:"MCP servers"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["For information about using Langflow as an MCP server, see ",(0,o.jsx)(n.a,{href:"/mcp-server",children:"Use Langflow as an MCP server"}),"."]}),"\n",(0,o.jsx)(n.h2,{id:"use-the-mcp-tools-component",children:"Use the MCP tools component"}),"\n",(0,o.jsxs)(n.p,{children:["The ",(0,o.jsx)(n.strong,{children:"MCP Tools"})," component connects to an MCP server so that a ",(0,o.jsx)(n.a,{href:"/agents",children:"Langflow agent"})," can use the server's tools when responding to user queries."]}),"\n",(0,o.jsx)(n.p,{children:"This component has two modes, depending on the type of server you want to access:"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"#mcp-stdio-mode",children:"Connect to a non-Langflow MCP server"})," with a JSON configuration file, server start command, or SSE URL to access tools provided by external, non-Langflow MCP servers."]}),"\n",(0,o.jsxs)(n.li,{children:[(0,o.jsx)(n.a,{href:"#mcp-sse-mode",children:"Connect to a Langflow MCP server"})," to use flows from your ",(0,o.jsx)(n.a,{href:"/concepts-flows#projects",children:"Langflow projects"})," as MCP tools."]}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"mcp-stdio-mode",children:"Connect to a non-Langflow MCP server"}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Add an ",(0,o.jsx)(n.strong,{children:"MCP Tools"})," component to your flow."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["In the ",(0,o.jsx)(n.strong,{children:"MCP Server"})," field, select the server you want to add, or click ",(0,o.jsx)(l.A,{name:"Plus","aria-hidden":"true"})," ",(0,o.jsx)(n.strong,{children:"Add MCP Server"}),"."]}),"\n",(0,o.jsx)(n.p,{children:"There are multiple ways to add a new server."}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsxs)(n.li,{children:["In the ",(0,o.jsx)(n.strong,{children:"JSON"})," pane, paste the MCP server's JSON configuration file, and then click ",(0,o.jsx)(n.strong,{children:"Add Server"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["In the ",(0,o.jsx)(n.strong,{children:"STDIO"})," pane, enter the MCP server's ",(0,o.jsx)(n.strong,{children:"Name"}),", ",(0,o.jsx)(n.strong,{children:"Command"}),", and any ",(0,o.jsx)(n.strong,{children:"Arguments"})," or ",(0,o.jsx)(n.strong,{children:"Environment Variables"})," the server uses, and then click ",(0,o.jsx)(n.strong,{children:"Add Server"}),".\nFor example, to start a ",(0,o.jsx)(n.a,{href:"https://github.com/modelcontextprotocol/servers/tree/main/src/fetch",children:"Fetch"})," server, the ",(0,o.jsx)(n.strong,{children:"Command"})," is ",(0,o.jsx)(n.code,{children:"uvx mcp-server-fetch"}),"."]}),"\n",(0,o.jsxs)(n.li,{children:["In the ",(0,o.jsx)(n.strong,{children:"SSE"})," pane, enter your Langflow MCP server's ",(0,o.jsx)(n.strong,{children:"Name"}),", ",(0,o.jsx)(n.strong,{children:"SSE URL"}),", and any ",(0,o.jsx)(n.strong,{children:"Headers"})," or ",(0,o.jsx)(n.strong,{children:"Environment Variables"})," the server uses, and then click ",(0,o.jsx)(n.strong,{children:"Add Server"}),".\nThe default ",(0,o.jsx)(n.strong,{children:"SSE URL"})," is ",(0,o.jsx)(n.code,{children:"http://localhost:7860/api/v1/mcp/sse"}),". For more information, see ",(0,o.jsx)(n.a,{href:"#mcp-sse-mode",children:"Use SSE mode"}),"."]}),"\n"]}),"\n",(0,o.jsxs)(n.p,{children:[(0,o.jsx)(n.code,{children:"uvx"})," is included with ",(0,o.jsx)(n.code,{children:"uv"})," in the Langflow package.\nTo use ",(0,o.jsx)(n.code,{children:"npx"})," server commands, you must first install an LTS release of ",(0,o.jsx)(n.a,{href:"https://docs.npmjs.com/downloading-and-installing-node-js-and-npm",children:"Node.js"}),".\nFor an example of an ",(0,o.jsx)(n.code,{children:"npx"})," MCP server in Langflow, see ",(0,o.jsx)(n.a,{href:"/mcp-component-astra",children:"Connect an Astra DB MCP server to Langflow"}),"."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["To use environment variables in your server command, enter each variable in the ",(0,o.jsx)(n.strong,{children:"Env"})," fields as you would define them in a script, such as ",(0,o.jsx)(n.code,{children:"VARIABLE=value"}),"."]}),"\n",(0,o.jsx)(n.admonition,{type:"important",children:(0,o.jsxs)(n.p,{children:["Langflow passes environment variables from the ",(0,o.jsx)(n.code,{children:".env"})," file to MCP, but it doesn't pass global variables declared in your Langflow ",(0,o.jsx)(n.strong,{children:"Settings"}),".\nTo define an MCP server environment variable as a global variable, add it to Langflow's ",(0,o.jsx)(n.code,{children:".env"})," file at startup.\nFor more information, see ",(0,o.jsx)(n.a,{href:"/configuration-global-variables",children:"global variables"}),"."]})}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["In the ",(0,o.jsx)(n.strong,{children:"Tool"})," field, select a tool that you want this component to use, or leave the field blank to allow access to all tools provided by the MCP server."]}),"\n",(0,o.jsx)(n.p,{children:"If you select a specific tool, you might need to configure additional tool-specific fields. For information about tool-specific fields, see your MCP server's documentation."}),"\n",(0,o.jsxs)(n.p,{children:["At this point, the ",(0,o.jsx)(n.strong,{children:"MCP Tools"})," component is serving a tool, but nothing is using the tool. The next steps explain how to make the tool available to an ",(0,o.jsxs)(n.a,{href:"/components-agents",children:[(0,o.jsx)(n.strong,{children:"Agent"})," component"]})," so that the agent can use the tool in its responses."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["In the ",(0,o.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),", enable ",(0,o.jsx)(n.strong,{children:"Tool mode"})," so you can use the component with an agent."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Connect the ",(0,o.jsx)(n.strong,{children:"MCP Tools"})," component's ",(0,o.jsx)(n.strong,{children:"Toolset"})," port to an ",(0,o.jsx)(n.strong,{children:"Agent"})," component's ",(0,o.jsx)(n.strong,{children:"Tools"})," port."]}),"\n",(0,o.jsxs)(n.p,{children:["If not already present in your flow, make sure you also attach ",(0,o.jsx)(n.strong,{children:"Chat Input"})," and ",(0,o.jsx)(n.strong,{children:"Chat Output"})," components to the ",(0,o.jsx)(n.strong,{children:"Agent"})," component."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"MCP Tools component in STDIO mode",src:s(63963).A+"",width:"4000",height:"2608"})}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Test your flow to make sure the MCP server is connected and the selected tool is used by the agent. Open the ",(0,o.jsx)(n.strong,{children:"Playground"}),", and then enter a prompt that uses the tool you connected through the ",(0,o.jsx)(n.strong,{children:"MCP Tools"})," component."]}),"\n",(0,o.jsxs)(n.p,{children:["For example, if you use ",(0,o.jsx)(n.code,{children:"mcp-server-fetch"})," with the ",(0,o.jsx)(n.code,{children:"fetch"})," tool, you could ask the agent to summarize recent tech news. The agent calls the MCP server function ",(0,o.jsx)(n.code,{children:"fetch"}),", and then returns the response."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"If you want the agent to be able to use more tools, repeat these steps to add more tools components with different servers or tools."}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.h3,{id:"mcp-sse-mode",children:"Connect a Langflow MCP server"}),"\n",(0,o.jsxs)(n.p,{children:["Every Langflow project runs a separate MCP server that exposes the project's flows as MCP tools.\nFor more information about your projects' MCP servers, including how to manage exposed flows, see ",(0,o.jsx)(n.a,{href:"/mcp-server",children:"Use Langflow as an MCP server"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["To leverage flows-as-tools, use the ",(0,o.jsx)(n.strong,{children:"MCP Tools"})," component in ",(0,o.jsx)(n.strong,{children:"Server-Sent Events (SSE)"})," mode to connect to a project's ",(0,o.jsx)(n.code,{children:"/api/v1/mcp/sse"})," endpoint:"]}),"\n",(0,o.jsxs)(n.ol,{children:["\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Add an ",(0,o.jsx)(n.strong,{children:"MCP Tools"})," component to your flow, click ",(0,o.jsx)(l.A,{name:"Plus","aria-hidden":"true"})," ",(0,o.jsx)(n.strong,{children:"Add MCP Server"}),", and then select ",(0,o.jsx)(n.strong,{children:"SSE"})," mode."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["In the ",(0,o.jsx)(n.strong,{children:"MCP SSE URL"})," field, modify the default address to point at your Langflow server's SSE endpoint. The default value for other Langflow installations is ",(0,o.jsx)(n.code,{children:"http://localhost:7860/api/v1/mcp/sse"}),".\nIn SSE mode, all flows available from the targeted server are treated as tools."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["In the ",(0,o.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),", enable ",(0,o.jsx)(n.strong,{children:"Tool Mode"})," so you can use the component with an agent."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Connect the ",(0,o.jsx)(n.strong,{children:"MCP Tools"})," component's ",(0,o.jsx)(n.strong,{children:"Toolset"})," port to an ",(0,o.jsx)(n.strong,{children:"Agent"})," component's ",(0,o.jsx)(n.strong,{children:"Tools"})," port."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["If not already present in your flow, make sure you also attach ",(0,o.jsx)(n.strong,{children:"Chat Input"})," and ",(0,o.jsx)(n.strong,{children:"Chat Output"})," components to the ",(0,o.jsx)(n.strong,{children:"Agent"})," component."]}),"\n",(0,o.jsx)(n.p,{children:(0,o.jsx)(n.img,{alt:"MCP component with SSE mode enabled",src:s(68347).A+"",width:"4000",height:"2438"})}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsxs)(n.p,{children:["Test your flow to make sure the agent uses your flows to respond to queries. Open the ",(0,o.jsx)(n.strong,{children:"Playground"}),", and then enter a prompt that uses a flow that you connected through the ",(0,o.jsx)(n.strong,{children:"MCP Tools"})," component."]}),"\n"]}),"\n",(0,o.jsxs)(n.li,{children:["\n",(0,o.jsx)(n.p,{children:"If you want the agent to be able to use more tools, repeat these steps to add more tools components with different servers or tools."}),"\n"]}),"\n"]}),"\n",(0,o.jsx)(n.h2,{id:"mcp-tools-parameters",children:"MCP Tools parameters"}),"\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:"command"}),(0,o.jsx)(n.td,{children:"String"}),(0,o.jsxs)(n.td,{children:["Input parameter. Stdio mode only. The MCP server startup command. Default: ",(0,o.jsx)(n.code,{children:"uvx mcp-sse-shim@latest"}),"."]})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"sse_url"}),(0,o.jsx)(n.td,{children:"String"}),(0,o.jsxs)(n.td,{children:["Input parameter. SSE mode only. The SSE URL for a Langflow project's MCP server. Default for Langflow Desktop: ",(0,o.jsx)(n.code,{children:"http://localhost:7868/"}),". Default for other installations: ",(0,o.jsx)(n.code,{children:"http://localhost:7860/api/v1/mcp/sse"})]})]}),(0,o.jsxs)(n.tr,{children:[(0,o.jsx)(n.td,{children:"tools"}),(0,o.jsx)(n.td,{children:"List[Tool]"}),(0,o.jsxs)(n.td,{children:["Output parameter. ",(0,o.jsx)(n.a,{href:"/data-types#tool",children:(0,o.jsx)(n.code,{children:"Tool"})})," object containing a list of tools exposed by the MCP server."]})]})]})]}),"\n",(0,o.jsx)(n.h2,{id:"manage-connected-mcp-servers",children:"Manage connected MCP servers"}),"\n",(0,o.jsxs)(n.p,{children:["To manage MCP servers connected to your Langflow client, go to ",(0,o.jsx)(n.strong,{children:"Settings"}),", and then click ",(0,o.jsx)(n.strong,{children:"MCP Servers"}),"."]}),"\n",(0,o.jsxs)(n.p,{children:["To add a new MCP server, click ",(0,o.jsx)(l.A,{name:"Plus","aria-hidden":"true"})," ",(0,o.jsx)(n.strong,{children:"Add MCP Server"}),", and then follow the steps in ",(0,o.jsx)(n.a,{href:"#use-the-mcp-tools-component",children:"Use the MCP Tools component"})," to configure the connection."]}),"\n",(0,o.jsxs)(n.p,{children:["Click ",(0,o.jsx)(l.A,{name:"Ellipsis","aria-hidden":"true"})," ",(0,o.jsx)(n.strong,{children:"More"})," to edit or delete an MCP server."]}),"\n",(0,o.jsx)(n.h2,{id:"see-also",children:"See also"}),"\n",(0,o.jsxs)(n.ul,{children:["\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/mcp-server",children:"Use Langflow as an MCP server"})}),"\n",(0,o.jsx)(n.li,{children:(0,o.jsx)(n.a,{href:"/mcp-component-astra",children:"Use a DataStax Astra DB MCP server with the MCP Tools component"})}),"\n"]})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(h,{...e})}):h(e)}},63963:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/component-mcp-stdio-a13a643e61ceea972c4a3f64dd1ae72f.png"},68347:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/component-mcp-sse-mode-2e742342a52231247733d8486ab612fd.png"}}]); \ No newline at end of file diff --git a/assets/js/e267ad05.1b71e9ca.js b/assets/js/e267ad05.1b71e9ca.js deleted file mode 100644 index 3a5b4dbf63..0000000000 --- a/assets/js/e267ad05.1b71e9ca.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[8069],{17886:(e,n,o)=>{o.d(n,{A:()=>r});o(96540);var s=o(64058),t=o(74848);function r({name:e,...n}){const o=s[e];return o?(0,t.jsx)(o,{...n}):null}},22202:(e,n,o)=>{o.d(n,{A:()=>s});const s=o.p+"assets/images/workspace-basic-prompting-61154cb9a883e7d5862f6c3d272add85.png"},22640:(e,n,o)=>{o.d(n,{A:()=>s});const s=o.p+"assets/images/my-projects-ecb47861c2d88557320b768d0c17b747.png"},64981:(e,n,o)=>{o.d(n,{A:()=>s});const s=o.p+"assets/images/connect-component-d52a14c256f3653e49ce2e2dd311fcef.png"},72113:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>p,frontMatter:()=>i,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"Concepts/concepts-flows","title":"Build flows","description":"A flow is a functional representation of an application workflow.","source":"@site/docs/Concepts/concepts-flows.mdx","sourceDirName":"Concepts","slug":"/concepts-flows","permalink":"/concepts-flows","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Build flows","slug":"/concepts-flows"},"sidebar":"docs","previous":{"title":"Use the visual editor","permalink":"/concepts-overview"},"next":{"title":"Trigger flows with the Langflow API","permalink":"/concepts-publish"}}');var t=o(74848),r=o(28453),l=o(17886);const i={title:"Build flows",slug:"/concepts-flows"},a=void 0,c={},d=[{value:"Create a flow",id:"create-a-flow",level:2},{value:"Add components",id:"add-components",level:3},{value:"Run a flow",id:"run-a-flow",level:3},{value:"Flow graphs",id:"flow-graphs",level:4},{value:"Manage flows in projects",id:"projects",level:2},{value:"Flow storage and logs",id:"flow-storage-and-logs",level:2},{value:"See also",id:"see-also",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components},{Details:s}=n;return s||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,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:["A ",(0,t.jsx)(n.em,{children:"flow"})," is a functional representation of an application workflow.\nFlows receive input, process it, and produce output."]}),"\n",(0,t.jsxs)(n.p,{children:["Flows consist of ",(0,t.jsx)(n.em,{children:"components"})," that represent individual steps in your application's workflow."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"Basic Prompting flow in the workspace",src:o(22202).A+"",width:"4000",height:"2188"})}),"\n",(0,t.jsx)(n.p,{children:"Langflow flows are fully serializable and can be saved and loaded from the file system where Langflow is installed."}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsxs)(n.p,{children:["To try building and running a flow in a few minutes, see the ",(0,t.jsx)(n.a,{href:"/get-started-quickstart",children:"Langflow quickstart"}),"."]})}),"\n",(0,t.jsx)(n.h2,{id:"create-a-flow",children:"Create a flow"}),"\n",(0,t.jsxs)(n.p,{children:["From the ",(0,t.jsxs)(n.a,{href:"#projects",children:[(0,t.jsx)(n.strong,{children:"Projects"})," page"]}),", there are four ways to create a flow:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Create a blank flow"}),": Select a project, click ",(0,t.jsx)(n.strong,{children:"New Flow"}),", and then click ",(0,t.jsx)(n.strong,{children:"Blank Flow"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Create a flow from a template"}),": Select a project, click ",(0,t.jsx)(n.strong,{children:"New Flow"}),", and then click the template that you want to use."]}),"\n",(0,t.jsxs)(s,{children:[(0,t.jsx)("summary",{children:"What are templates?"}),(0,t.jsx)(n.p,{children:"Templates are pre-built flows that you can use as a starting point for your own flow.\nThey range from basic flows with a few components to complex flows with many components and sub-flows."}),(0,t.jsxs)(n.p,{children:["For example, the ",(0,t.jsx)(n.strong,{children:"Basic Prompting"})," template demonstrates a small flow that passes both chat input and pre-defined instructions (as a prompt) to an LLM.\nIn contrast, the ",(0,t.jsx)(n.strong,{children:"Vector Store RAG"})," template consists of two sub-flows that demonstrate how to create a Retrieval Augmented Generation (RAG) chatbot. One sub-flow populates the vector store with contextually relevant data and embeddings, and the other sub-flow queries the vector store for similar data to answer user questions."]}),(0,t.jsxs)(n.p,{children:["You can also ",(0,t.jsx)(n.a,{href:"/contributing-templates",children:"contribute templates"})," to the Langflow codebase."]})]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Duplicate an existing flow"}),": Locate the flow you want to copy, click ",(0,t.jsx)(l.A,{name:"Ellipsis","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"More"}),", and then select ",(0,t.jsx)(n.strong,{children:"Duplicate"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Import a flow"}),": See ",(0,t.jsx)(n.a,{href:"/concepts-flows-import",children:"Import and export flows"}),"."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["You can also create a flow with the ",(0,t.jsx)(n.a,{href:"/api-flows",children:"Langflow API"}),", but the Langflow team recommends using the ",(0,t.jsx)(n.a,{href:"/concepts-overview",children:"visual editor"})," until you are familiar with flow creation."]}),"\n",(0,t.jsx)(n.h3,{id:"add-components",children:"Add components"}),"\n",(0,t.jsxs)(n.p,{children:["Flows consist of ",(0,t.jsx)(n.a,{href:"/concepts-components",children:"components"}),", which are nodes that you configure and connect in the ",(0,t.jsx)(n.a,{href:"/concepts-overview#workspace",children:"workspace"}),".\nEach component performs a specific task, like serving an AI model or connecting a data source."]}),"\n",(0,t.jsxs)(n.p,{children:["Drag and drop components from the ",(0,t.jsx)(n.strong,{children:"Components"})," menu to add them to your flow.\nThen, configure the component settings and connect the components together."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"Chat Input and Output connected to a Language Model component",src:o(64981).A+"",width:"3700",height:"1880"})}),"\n",(0,t.jsx)(n.p,{children:"Each component has configuration settings and options. Some of these are common to all components, and some are unique to specific components."}),"\n",(0,t.jsxs)(n.p,{children:["To form a cohesive flow, you connect components by ",(0,t.jsx)(n.em,{children:"edges"})," or ",(0,t.jsx)(n.em,{children:"ports"}),", which have a specific data type they receive or send.\nFor example, message ports send text strings between components."]}),"\n",(0,t.jsxs)(n.p,{children:["For more information about component configuration, including port types and underlying component code, see ",(0,t.jsx)(n.a,{href:"/concepts-components",children:"Components overview"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"run-a-flow",children:"Run a flow"}),"\n",(0,t.jsxs)(n.p,{children:["After you build a prototype flow, you can test it in the ",(0,t.jsx)(n.a,{href:"/concepts-playground",children:(0,t.jsx)(n.strong,{children:"Playground"})}),".\nWhen you're ready to use Langflow for application development, learn how to ",(0,t.jsx)(n.a,{href:"/concepts-publish",children:"trigger flows with the Langflow API"}),", explore more advanced configuration options like ",(0,t.jsx)(n.a,{href:"/install-custom-dependencies",children:"custom dependencies"}),", and, eventually, ",(0,t.jsx)(n.a,{href:"/develop-application",children:"containerize your Langflow application"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["When you're ready to go to production or deploy a Langflow MCP server for access over the public internet, see ",(0,t.jsx)(n.a,{href:"/deployment-overview",children:"Langflow deployment overview"}),"."]}),"\n",(0,t.jsx)(n.h4,{id:"flow-graphs",children:"Flow graphs"}),"\n",(0,t.jsx)(n.p,{children:"When a flow runs, Langflow builds a Directed Acyclic Graph (DAG) object from the nodes (components) and edges (connections), and the nodes are sorted to determine the order of execution."}),"\n",(0,t.jsxs)(n.p,{children:["The graph build calls each component's ",(0,t.jsx)(n.code,{children:"def_build"})," function to validate and prepare the nodes.\nThis graph is then processed in dependency order.\nEach node is built and executed sequentially, with results from each built node being passed to nodes that are dependent on that node's results."]}),"\n",(0,t.jsx)(n.h2,{id:"projects",children:"Manage flows in projects"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.strong,{children:"Projects"})," page is where you arrive when you launch Langflow.\nIt is where you view and manage flows on a high level."]}),"\n",(0,t.jsxs)(n.p,{children:["Langflow projects are like folders that you can use to organize related flows.\nThe default project is ",(0,t.jsx)(n.strong,{children:"Starter Project"}),", and your flows are stored here unless you create another project.\nTo create a project, click ",(0,t.jsx)(l.A,{name:"Plus","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"Create new project"}),"."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"Projects page with multiple flows in a project",src:o(22640).A+"",width:"4000",height:"2186"})}),"\n",(0,t.jsxs)(n.p,{children:["From the ",(0,t.jsx)(n.strong,{children:"Projects"})," page, you can manage flows within each of your projects:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"View flows in a project"}),": Select the project name in the ",(0,t.jsx)(n.strong,{children:"Projects"})," list."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Create flows"}),": See ",(0,t.jsx)(n.a,{href:"#create-a-flow",children:"Create a flow"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Edit a flow's name and description"}),": Locate the flow you want to edit, click ",(0,t.jsx)(l.A,{name:"Ellipsis","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"More"}),", and then select ",(0,t.jsx)(n.strong,{children:"Edit details"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Delete a flow"}),": Locate the flow you want to delete, click ",(0,t.jsx)(l.A,{name:"Ellipsis","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"More"}),", and then select ",(0,t.jsx)(n.strong,{children:"Delete"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Serve flows as MCP tools"}),": See ",(0,t.jsx)(n.a,{href:"/mcp-server",children:"Use Langflow as an MCP server"}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsxs)(n.p,{children:["To get back to the ",(0,t.jsx)(n.strong,{children:"Projects"})," page after editing a flow, click the project name or Langflow icon in the Langflow header."]})}),"\n",(0,t.jsx)(n.h2,{id:"flow-storage-and-logs",children:"Flow storage and logs"}),"\n",(0,t.jsxs)(n.p,{children:["By default, flows and ",(0,t.jsx)(n.a,{href:"/logging",children:"flow logs"})," are stored on local disk at the following default locations:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"macOS Desktop"}),": ",(0,t.jsx)(n.code,{children:"/Users//.langflow/cache"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Windows Desktop"}),": ",(0,t.jsx)(n.code,{children:"C:\\Users\\\\AppData\\Roaming\\com.Langflow\\cache"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"OSS macOS/Windows/Linux/WSL (uv pip install)"}),": ",(0,t.jsx)(n.code,{children:"/lib/python3.12/site-packages/langflow/cache"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"OSS macOS/Windows/Linux/WSL (git clone)"}),": ",(0,t.jsx)(n.code,{children:"/src/backend/base/langflow/cache"})]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["The overall storage location can be customized with the ",(0,t.jsx)(n.code,{children:"LANGFLOW_CONFIG_DIR"})," environment variable, and the flow log storage location can be customized separately with the ",(0,t.jsx)(n.code,{children:"LANGFLOW_LOG_FILE"})," environment variable."]}),"\n",(0,t.jsxs)(n.p,{children:["For more information, see ",(0,t.jsx)(n.a,{href:"/memory",children:"Memory management options"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"see-also",children:"See also"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/concepts-publish",children:"Share and embed flows"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/concepts-flows-import",children:"Import and export flows"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/environment-variables",children:"Langflow environment variables"})}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}}}]); \ No newline at end of file diff --git a/assets/js/e267ad05.a0b07365.js b/assets/js/e267ad05.a0b07365.js new file mode 100644 index 0000000000..ca8f4273a2 --- /dev/null +++ b/assets/js/e267ad05.a0b07365.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[8069],{17886:(e,n,o)=>{o.d(n,{A:()=>l});o(96540);var s=o(64058),t=o(74848);function l({name:e,...n}){const o=s[e];return o?(0,t.jsx)(o,{...n}):null}},22202:(e,n,o)=>{o.d(n,{A:()=>s});const s=o.p+"assets/images/workspace-basic-prompting-61154cb9a883e7d5862f6c3d272add85.png"},22640:(e,n,o)=>{o.d(n,{A:()=>s});const s=o.p+"assets/images/my-projects-ecb47861c2d88557320b768d0c17b747.png"},64981:(e,n,o)=>{o.d(n,{A:()=>s});const s=o.p+"assets/images/connect-component-d52a14c256f3653e49ce2e2dd311fcef.png"},72113:(e,n,o)=>{o.r(n),o.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>p,frontMatter:()=>i,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"Concepts/concepts-flows","title":"Build flows","description":"A flow is a functional representation of an application workflow.","source":"@site/docs/Concepts/concepts-flows.mdx","sourceDirName":"Concepts","slug":"/concepts-flows","permalink":"/concepts-flows","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Build flows","slug":"/concepts-flows"},"sidebar":"docs","previous":{"title":"Use the visual editor","permalink":"/concepts-overview"},"next":{"title":"Trigger flows with the Langflow API","permalink":"/concepts-publish"}}');var t=o(74848),l=o(28453),r=o(17886);const i={title:"Build flows",slug:"/concepts-flows"},a=void 0,c={},d=[{value:"Create a flow",id:"create-a-flow",level:2},{value:"Add components",id:"add-components",level:3},{value:"Run a flow",id:"run-a-flow",level:3},{value:"Flow graphs",id:"flow-graphs",level:4},{value:"Manage flows in projects",id:"projects",level:2},{value:"Edit flow details",id:"edit-flow-details",level:3},{value:"Delete a flow",id:"delete-a-flow",level:3},{value:"Flow storage and logs",id:"flow-storage-and-logs",level:2},{value:"See also",id:"see-also",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,l.R)(),...e.components},{Details:s}=n;return s||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,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:["A ",(0,t.jsx)(n.em,{children:"flow"})," is a functional representation of an application workflow.\nFlows receive input, process it, and produce output."]}),"\n",(0,t.jsxs)(n.p,{children:["Flows consist of ",(0,t.jsx)(n.em,{children:"components"})," that represent individual steps in your application's workflow."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"Basic Prompting flow in the workspace",src:o(22202).A+"",width:"4000",height:"2188"})}),"\n",(0,t.jsx)(n.p,{children:"Langflow flows are fully serializable and can be saved and loaded from the file system where Langflow is installed."}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsxs)(n.p,{children:["To try building and running a flow in a few minutes, see the ",(0,t.jsx)(n.a,{href:"/get-started-quickstart",children:"Langflow quickstart"}),"."]})}),"\n",(0,t.jsx)(n.h2,{id:"create-a-flow",children:"Create a flow"}),"\n",(0,t.jsxs)(n.p,{children:["From the ",(0,t.jsxs)(n.a,{href:"#projects",children:[(0,t.jsx)(n.strong,{children:"Projects"})," page"]}),", there are four ways to create a flow:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Create a blank flow"}),": Select a project, click ",(0,t.jsx)(n.strong,{children:"New Flow"}),", and then click ",(0,t.jsx)(n.strong,{children:"Blank Flow"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Create a flow from a template"}),": Select a project, click ",(0,t.jsx)(n.strong,{children:"New Flow"}),", and then click the template that you want to use."]}),"\n",(0,t.jsxs)(s,{children:[(0,t.jsx)("summary",{children:"What are templates?"}),(0,t.jsx)(n.p,{children:"Templates are pre-built flows that you can use as a starting point for your own flow.\nThey range from basic flows with a few components to complex flows with many components and sub-flows."}),(0,t.jsxs)(n.p,{children:["For example, the ",(0,t.jsx)(n.strong,{children:"Basic Prompting"})," template demonstrates a small flow that passes both chat input and pre-defined instructions (as a prompt) to an LLM.\nIn contrast, the ",(0,t.jsx)(n.strong,{children:"Vector Store RAG"})," template consists of two sub-flows that demonstrate how to create a Retrieval Augmented Generation (RAG) chatbot. One sub-flow populates the vector store with contextually relevant data and embeddings, and the other sub-flow queries the vector store for similar data to answer user questions."]}),(0,t.jsxs)(n.p,{children:["You can also ",(0,t.jsx)(n.a,{href:"/contributing-templates",children:"contribute templates"})," to the Langflow codebase."]})]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Duplicate an existing flow"}),": Locate the flow you want to copy, click ",(0,t.jsx)(r.A,{name:"Ellipsis","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"More"}),", and then select ",(0,t.jsx)(n.strong,{children:"Duplicate"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Import a flow"}),": See ",(0,t.jsx)(n.a,{href:"/concepts-flows-import",children:"Import and export flows"}),"."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["You can also create a flow with the ",(0,t.jsx)(n.a,{href:"/api-flows",children:"Langflow API"}),", but the Langflow team recommends using the ",(0,t.jsx)(n.a,{href:"/concepts-overview",children:"visual editor"})," until you are familiar with flow creation."]}),"\n",(0,t.jsx)(n.h3,{id:"add-components",children:"Add components"}),"\n",(0,t.jsxs)(n.p,{children:["Flows consist of ",(0,t.jsx)(n.a,{href:"/concepts-components",children:"components"}),", which are nodes that you configure and connect in the ",(0,t.jsx)(n.a,{href:"/concepts-overview#workspace",children:"workspace"}),".\nEach component performs a specific task, like serving an AI model or connecting a data source."]}),"\n",(0,t.jsxs)(n.p,{children:["Drag and drop components from the ",(0,t.jsx)(n.strong,{children:"Components"})," menu to add them to your flow.\nThen, configure the component settings and connect the components together."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"Chat Input and Output connected to a Language Model component",src:o(64981).A+"",width:"3700",height:"1880"})}),"\n",(0,t.jsx)(n.p,{children:"Each component has configuration settings and options. Some of these are common to all components, and some are unique to specific components."}),"\n",(0,t.jsxs)(n.p,{children:["To form a cohesive flow, you connect components by ",(0,t.jsx)(n.em,{children:"edges"})," or ",(0,t.jsx)(n.em,{children:"ports"}),", which have a specific data type they receive or send.\nFor example, message ports send text strings between components."]}),"\n",(0,t.jsxs)(n.p,{children:["For more information about component configuration, including port types and underlying component code, see ",(0,t.jsx)(n.a,{href:"/concepts-components",children:"Components overview"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"run-a-flow",children:"Run a flow"}),"\n",(0,t.jsxs)(n.p,{children:["After you build a prototype flow, you can test it in the ",(0,t.jsx)(n.a,{href:"/concepts-playground",children:(0,t.jsx)(n.strong,{children:"Playground"})}),".\nWhen you're ready to use Langflow for application development, learn how to ",(0,t.jsx)(n.a,{href:"/concepts-publish",children:"trigger flows with the Langflow API"}),", explore more advanced configuration options like ",(0,t.jsx)(n.a,{href:"/install-custom-dependencies",children:"custom dependencies"}),", and, eventually, ",(0,t.jsx)(n.a,{href:"/develop-application",children:"containerize your Langflow application"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["When you're ready to go to production or deploy a Langflow MCP server for access over the public internet, see ",(0,t.jsx)(n.a,{href:"/deployment-overview",children:"Langflow deployment overview"}),"."]}),"\n",(0,t.jsx)(n.h4,{id:"flow-graphs",children:"Flow graphs"}),"\n",(0,t.jsx)(n.p,{children:"When a flow runs, Langflow builds a Directed Acyclic Graph (DAG) object from the nodes (components) and edges (connections), and the nodes are sorted to determine the order of execution."}),"\n",(0,t.jsxs)(n.p,{children:["The graph build calls each component's ",(0,t.jsx)(n.code,{children:"def_build"})," function to validate and prepare the nodes.\nThis graph is then processed in dependency order.\nEach node is built and executed sequentially, with results from each built node being passed to nodes that are dependent on that node's results."]}),"\n",(0,t.jsx)(n.h2,{id:"projects",children:"Manage flows in projects"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.strong,{children:"Projects"})," page is where you arrive when you launch Langflow.\nFrom here, you can manage flows and your projects' ",(0,t.jsx)(n.a,{href:"/mcp-server",children:"MCP servers"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["Langflow projects are like folders that you can use to organize related flows.\nThe default project is ",(0,t.jsx)(n.strong,{children:"Starter Project"}),", and your flows are stored here unless you create another project.\nTo create a project, click ",(0,t.jsx)(r.A,{name:"Plus","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"Create new project"}),"."]}),"\n",(0,t.jsx)(n.p,{children:(0,t.jsx)(n.img,{alt:"Projects page with multiple flows in a project",src:o(22640).A+"",width:"4000",height:"2186"})}),"\n",(0,t.jsx)(n.admonition,{type:"tip",children:(0,t.jsxs)(n.p,{children:["To get back to the ",(0,t.jsx)(n.strong,{children:"Projects"})," page after editing a flow, click the project name or Langflow icon in the Langflow header."]})}),"\n",(0,t.jsx)(n.h3,{id:"edit-flow-details",children:"Edit flow details"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["On the ",(0,t.jsx)(n.strong,{children:"Projects"})," page, locate the flow you want to edit."]}),"\n",(0,t.jsxs)(n.li,{children:["Click ",(0,t.jsx)(r.A,{name:"Ellipsis","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"More"}),", and then select ",(0,t.jsx)(n.strong,{children:"Edit details"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["Edit the ",(0,t.jsx)(n.strong,{children:"Name"})," and ",(0,t.jsx)(n.strong,{children:"Description"}),", and then click ",(0,t.jsx)(n.strong,{children:"Save"}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.h3,{id:"delete-a-flow",children:"Delete a flow"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["On the ",(0,t.jsx)(n.strong,{children:"Projects"})," page, locate the flow you want to delete."]}),"\n",(0,t.jsxs)(n.li,{children:["Click ",(0,t.jsx)(r.A,{name:"Ellipsis","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"More"}),", and then select ",(0,t.jsx)(n.strong,{children:"Delete"}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"flow-storage-and-logs",children:"Flow storage and logs"}),"\n",(0,t.jsxs)(n.p,{children:["By default, flows and ",(0,t.jsx)(n.a,{href:"/logging",children:"flow logs"})," are stored on local disk at the following default locations:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"macOS Desktop"}),": ",(0,t.jsx)(n.code,{children:"/Users//.langflow/cache"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Windows Desktop"}),": ",(0,t.jsx)(n.code,{children:"C:\\Users\\\\AppData\\Roaming\\com.Langflow\\cache"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"OSS macOS/Windows/Linux/WSL (uv pip install)"}),": ",(0,t.jsx)(n.code,{children:"/lib/python3.12/site-packages/langflow/cache"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"OSS macOS/Windows/Linux/WSL (git clone)"}),": ",(0,t.jsx)(n.code,{children:"/src/backend/base/langflow/cache"})]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["The overall storage location can be customized with the ",(0,t.jsx)(n.code,{children:"LANGFLOW_CONFIG_DIR"})," environment variable, and the flow log storage location can be customized separately with the ",(0,t.jsx)(n.code,{children:"LANGFLOW_LOG_FILE"})," environment variable."]}),"\n",(0,t.jsxs)(n.p,{children:["For more information, see ",(0,t.jsx)(n.a,{href:"/memory",children:"Memory management options"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"see-also",children:"See also"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/concepts-publish",children:"Share and embed flows"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/concepts-flows-import",children:"Import and export flows"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/environment-variables",children:"Langflow environment variables"})}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,l.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}}}]); \ No newline at end of file diff --git a/assets/js/e3230154.0ec9668a.js b/assets/js/e3230154.0ec9668a.js deleted file mode 100644 index 8946589dd9..0000000000 --- a/assets/js/e3230154.0ec9668a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[9648],{4595:(e,o,n)=>{n.d(o,{A:()=>t});const t=n.p+"assets/images/mcp-server-tools-ddc0f1dc04109b9f3daf6a2f380073c4.png"},11470:(e,o,n)=>{n.d(o,{A:()=>b});var t=n(96540),s=n(18215),r=n(23104),l=n(56347),c=n(205),i=n(57485),a=n(31682),d=n(70679);function h(e){return t.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,t.isValidElement)(e)&&function(e){const{props:o}=e;return!!o&&"object"==typeof o&&"value"in o}(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 p(e){const{values:o,children:n}=e;return(0,t.useMemo)(()=>{const e=o??function(e){return h(e).map(({props:{value:e,label:o,attributes:n,default:t}})=>({value:e,label:o,attributes:n,default:t}))}(n);return function(e){const o=(0,a.XI)(e,(e,o)=>e.value===o.value);if(o.length>0)throw new Error(`Docusaurus error: Duplicate values "${o.map(e=>e.value).join(", ")}" found in . Every value needs to be unique.`)}(e),e},[o,n])}function u({value:e,tabValues:o}){return o.some(o=>o.value===e)}function f({queryString:e=!1,groupId:o}){const n=(0,l.W6)(),s=function({queryString:e=!1,groupId:o}){if("string"==typeof e)return e;if(!1===e)return null;if(!0===e&&!o)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 o??null}({queryString:e,groupId:o});return[(0,i.aZ)(s),(0,t.useCallback)(e=>{if(!s)return;const o=new URLSearchParams(n.location.search);o.set(s,e),n.replace({...n.location,search:o.toString()})},[s,n])]}function x(e){const{defaultValue:o,queryString:n=!1,groupId:s}=e,r=p(e),[l,i]=(0,t.useState)(()=>function({defaultValue:e,tabValues:o}){if(0===o.length)throw new Error("Docusaurus error: the component requires at least one children component");if(e){if(!u({value:e,tabValues:o}))throw new Error(`Docusaurus error: The has a defaultValue "${e}" but none of its children has the corresponding value. Available values are: ${o.map(e=>e.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return e}const n=o.find(e=>e.default)??o[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:o,tabValues:r})),[a,h]=f({queryString:n,groupId:s}),[x,j]=function({groupId:e}){const o=function(e){return e?`docusaurus.tab.${e}`:null}(e),[n,s]=(0,d.Dv)(o);return[n,(0,t.useCallback)(e=>{o&&s.set(e)},[o,s])]}({groupId:s}),g=(()=>{const e=a??x;return u({value:e,tabValues:r})?e:null})();(0,c.A)(()=>{g&&i(g)},[g]);return{selectedValue:l,selectValue:(0,t.useCallback)(e=>{if(!u({value:e,tabValues:r}))throw new Error(`Can't select invalid tab value=${e}`);i(e),h(e),j(e)},[h,j,r]),tabValues:r}}var j=n(92303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var y=n(74848);function m({className:e,block:o,selectedValue:n,selectValue:t,tabValues:l}){const c=[],{blockElementScrollPositionUntilNextRender:i}=(0,r.a_)(),a=e=>{const o=e.currentTarget,s=c.indexOf(o),r=l[s].value;r!==n&&(i(o),t(r))},d=e=>{let o=null;switch(e.key){case"Enter":a(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;o=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;o=c[n]??c[c.length-1];break}}o?.focus()};return(0,y.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":o},e),children:l.map(({value:e,label:o,attributes:t})=>(0,y.jsx)("li",{role:"tab",tabIndex:n===e?0:-1,"aria-selected":n===e,ref:e=>{c.push(e)},onKeyDown:d,onClick:a,...t,className:(0,s.A)("tabs__item",g.tabItem,t?.className,{"tabs__item--active":n===e}),children:o??e},e))})}function C({lazy:e,children:o,selectedValue:n}){const r=(Array.isArray(o)?o:[o]).filter(Boolean);if(e){const e=r.find(e=>e.props.value===n);return e?(0,t.cloneElement)(e,{className:(0,s.A)("margin-top--md",e.props.className)}):null}return(0,y.jsx)("div",{className:"margin-top--md",children:r.map((e,o)=>(0,t.cloneElement)(e,{key:o,hidden:e.props.value!==n}))})}function v(e){const o=x(e);return(0,y.jsxs)("div",{className:(0,s.A)("tabs-container",g.tabList),children:[(0,y.jsx)(m,{...o,...e}),(0,y.jsx)(C,{...o,...e})]})}function b(e){const o=(0,j.A)();return(0,y.jsx)(v,{...e,children:h(e.children)},String(o))}},17886:(e,o,n)=>{n.d(o,{A:()=>r});n(96540);var t=n(64058),s=n(74848);function r({name:e,...o}){const n=t[e];return n?(0,s.jsx)(n,{...o}):null}},19365:(e,o,n)=>{n.d(o,{A:()=>l});n(96540);var t=n(18215);const s={tabItem:"tabItem_Ymn6"};var r=n(74848);function l({children:e,hidden:o,className:n}){return(0,r.jsx)("div",{role:"tabpanel",className:(0,t.A)(s.tabItem,n),hidden:o,children:e})}},67577:(e,o,n)=>{n.d(o,{A:()=>t});const t=n.p+"assets/images/mcp-server-53850e4ac7599dec00dd7d01922ba79f.png"},93403:(e,o,n)=>{n.r(o),n.d(o,{CH:()=>u,assets:()=>p,chCodeConfig:()=>f,contentTitle:()=>h,default:()=>g,frontMatter:()=>d,metadata:()=>t,toc:()=>x});const t=JSON.parse('{"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.","source":"@site/docs/Concepts/mcp-server.mdx","sourceDirName":"Concepts","slug":"/mcp-server","permalink":"/mcp-server","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Use Langflow as an MCP server","slug":"/mcp-server"},"sidebar":"docs","previous":{"title":"Use Langflow as an MCP client","permalink":"/mcp-client"},"next":{"title":"Connect an Astra DB MCP server to Langflow","permalink":"/mcp-component-astra"}}');var s=n(74848),r=n(28453),l=n(24754),c=n(11470),i=n(19365),a=n(17886);const d={title:"Use Langflow as an MCP server",slug:"/mcp-server"},h=void 0,p={},u={annotations:l.hk,Code:l.Cy},f={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},x=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Select and configure flows to expose as MCP tools",id:"select-flows-to-serve",level:2},{value:"Connect clients to Langflow's MCP server",id:"connect-clients-to-use-the-servers-actions",level:2},{value:"MCP server authentication and environment variables",id:"authentication",level:3},{value:"Deploy your MCP server externally",id:"deploy-your-server-externally",level:3},{value:"Use MCP Inspector to test and debug flows",id:"test-and-debug-flows",level:2},{value:"Troubleshooting MCP server",id:"troubleshooting-mcp-server",level:2},{value:"See also",id:"see-also",level:2}];function j(e){const o={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components},{Details:t}=o;return u||y("CH",!1),u.Code||y("CH.Code",!0),t||y("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)(o.p,{children:["Langflow integrates with the ",(0,s.jsx)(o.a,{href:"https://modelcontextprotocol.io/introduction",children:"Model Context Protocol (MCP)"})," as both an MCP server and an MCP client."]}),"\n",(0,s.jsx)(o.p,{children:"This page describes how to use Langflow as an MCP server."}),"\n",(0,s.jsxs)(o.p,{children:["For information about using Langflow as an MCP client, see ",(0,s.jsx)(o.a,{href:"/mcp-client",children:"Use Langflow as an MCP client"}),"."]}),"\n",(0,s.jsxs)(o.p,{children:["As an MCP server, Langflow exposes your flows as ",(0,s.jsx)(o.a,{href:"https://modelcontextprotocol.io/docs/concepts/tools",children:"tools"})," that ",(0,s.jsx)(o.a,{href:"https://modelcontextprotocol.io/clients",children:"MCP clients"})," can use to take actions."]}),"\n",(0,s.jsx)(o.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsxs)(o.ul,{children:["\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["A ",(0,s.jsx)(o.a,{href:"/concepts-flows#projects",children:"Langflow project"})," with at least one flow."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Any LTS version of ",(0,s.jsx)(o.a,{href:"https://docs.npmjs.com/downloading-and-installing-node-js-and-npm",children:"Node.js"})," installed on your computer if you want to use MCP Inspector to ",(0,s.jsx)(o.a,{href:"#test-and-debug-flows",children:"test and debug flows"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:[(0,s.jsx)(o.a,{href:"https://ngrok.com/docs/getting-started/#1-install-ngrok",children:"ngrok installed"})," and an ",(0,s.jsx)(o.a,{href:"https://dashboard.ngrok.com/get-started/your-authtoken",children:"ngrok authtoken"})," if you want to ",(0,s.jsx)(o.a,{href:"/deployment-public-server",children:"deploy a public Langflow server"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(o.h2,{id:"select-flows-to-serve",children:"Select and configure flows to expose as MCP tools"}),"\n",(0,s.jsx)(o.admonition,{title:"MCP flow requirements",type:"important",children:(0,s.jsxs)(o.p,{children:["A flow must contain a ",(0,s.jsxs)(o.a,{href:"/components-io#chat-output",children:[(0,s.jsx)(o.strong,{children:"Chat Output"})," component"]})," to be used as a tool by MCP clients."]})}),"\n",(0,s.jsxs)(o.p,{children:["Each ",(0,s.jsx)(o.a,{href:"/concepts-flows#projects",children:"Langflow project"})," has an MCP server that exposes the project's flows as tools that MCP clients can use to generate responses."]}),"\n",(0,s.jsx)(o.p,{children:"By default, all flows in a project are exposed as tools on the project's MCP server."}),"\n",(0,s.jsx)(o.p,{children:"The following steps explain how to limit the exposed flows and, optionally, rename flows for agentic use:"}),"\n",(0,s.jsxs)(o.ol,{children:["\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["From the Langflow dashboard, select the project that contains the flows you want to serve as tools, and then click the ",(0,s.jsx)(o.strong,{children:"MCP Server"})," tab.\nAlternatively, you can quickly access the ",(0,s.jsx)(o.strong,{children:"MCP Server"})," tab from within any flow by selecting ",(0,s.jsx)(o.strong,{children:"Share > MCP Server"}),"."]}),"\n",(0,s.jsxs)(o.p,{children:["The ",(0,s.jsx)(o.strong,{children:"Auto install"})," and ",(0,s.jsx)(o.strong,{children:"JSON"})," tabs display options for connecting MCP clients to the project's MCP server."]}),"\n",(0,s.jsxs)(o.p,{children:["The ",(0,s.jsx)(o.strong,{children:"Flows/Tools"})," section lists the flows that are currently being served as tools."]}),"\n",(0,s.jsx)(o.p,{children:(0,s.jsx)(o.img,{alt:"MCP server projects page",src:n(67577).A+"",width:"4000",height:"2174"})}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Click ",(0,s.jsx)(a.A,{name:"Settings2","aria-hidden":"true"})," ",(0,s.jsx)(o.strong,{children:"Edit Tools"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["In the ",(0,s.jsx)(o.strong,{children:"MCP Server Tools"})," window, select the flows that you want exposed as tools."]}),"\n",(0,s.jsx)(o.p,{children:(0,s.jsx)(o.img,{alt:"MCP Server Tools",src:n(4595).A+"",width:"4000",height:"2030"})}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Recommended: Edit the ",(0,s.jsx)(o.strong,{children:"Tool Name"})," and ",(0,s.jsx)(o.strong,{children:"Tool Description"})," to help MCP clients determine which actions your flows provide and when to use those actions:"]}),"\n",(0,s.jsxs)(o.ul,{children:["\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:[(0,s.jsx)(o.strong,{children:"Tool Name"}),": Enter a name that makes it clear what the flow does when used as a tool by an agent."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:[(0,s.jsx)(o.strong,{children:"Tool Description"}),": Enter a description that accurately describes the specific actions the flow performs."]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Name and describe your flows for agentic use"}),(0,s.jsxs)(o.p,{children:["MCP clients use the ",(0,s.jsx)(o.strong,{children:"Tool Name"})," and ",(0,s.jsx)(o.strong,{children:"Tool Description"})," to determine which action to use."]}),(0,s.jsxs)(o.p,{children:["MCP clients like ",(0,s.jsx)(o.a,{href:"https://www.cursor.com/",children:"Cursor"})," treat your Langflow project as a single MCP server with all of your enabled flows listed as tools."]}),(0,s.jsxs)(o.p,{children:["This can confuse agents if the flows have unclear names or descriptions.\nFor example, a flow's default name is the flow ID, such as ",(0,s.jsx)(o.code,{children:"adbbf8c7-0a34-493b-90ea-5e8b42f78b66"}),".\nThis provides no information to an agent about the type of flow or it's purpose."]}),(0,s.jsx)(o.p,{children:"To provide more context about your flows, make sure to name and describe your flows clearly when configuring your Langflow project's MCP server."}),(0,s.jsx)(o.p,{children:"It's helpful to think of the names and descriptions as function names and code comments, using clear statements describing the problems your flows solve."}),(0,s.jsxs)(o.p,{children:["For example, assume you create a flow based on the ",(0,s.jsx)(o.strong,{children:"Document Q&A"})," template that uses an LLM to chat about resumes, and then you give the flow the following name and description:"]}),(0,s.jsxs)(o.ul,{children:["\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:[(0,s.jsx)(o.strong,{children:"Tool Name"}),": ",(0,s.jsx)(o.code,{children:"document_qa_for_resume"})]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:[(0,s.jsx)(o.strong,{children:"Tool Description"}),": ",(0,s.jsx)(o.code,{children:"A flow for analyzing Emily's resume."})]}),"\n"]}),"\n"]}),(0,s.jsxs)(o.p,{children:["After connecting your Langflow MCP server to Cursor, you can ask Cursor about the resume, such as ",(0,s.jsx)(o.code,{children:"What job experience does Emily have?"}),".\nUsing the context provided by your tool name and description, the agent can decide to use the ",(0,s.jsx)(o.code,{children:"document_qa_for_resume"})," MCP tool to create a response about Emily's resume.\nIf necessary, the agent asks permission to use the flow tool before generating the response."]}),(0,s.jsxs)(o.p,{children:["If you ask about a different resume, such as ",(0,s.jsx)(o.code,{children:"What job experience does Alex have?"}),", the agent can decide that ",(0,s.jsx)(o.code,{children:"document_qa_for_resume"})," isn't relevant to this request, because the tool description specifies that the flow is for Emily's resume.\nIn this case, the agent might use another available tool, or it can inform you that it doesn't have access to information about Alex's.\nFor example:"]}),(0,s.jsx)(u.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"I notice you're asking about Alex's job experience.",props:{}}]},{tokens:[{content:"Based on the available tools, I can see there is a Document QA for Resume flow that's designed for analyzing resumes.",props:{}}]},{tokens:[{content:"However, the description mentions it's for \"Emily's resume\" not Alex's. I don't have access to Alex's resume or job experience information.",props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Close the ",(0,s.jsx)(o.strong,{children:"MCP Server Tools"})," window to save your changes."]}),"\n"]}),"\n"]}),"\n","\n",(0,s.jsx)(o.h2,{id:"connect-clients-to-use-the-servers-actions",children:"Connect clients to Langflow's MCP server"}),"\n",(0,s.jsxs)(o.p,{children:["The following procedure describes how to connect ",(0,s.jsx)(o.a,{href:"https://www.cursor.com/",children:"Cursor"})," to your Langflow project's MCP server to consume your flows as tools.\nHowever, you can connect any ",(0,s.jsx)(o.a,{href:"https://modelcontextprotocol.io/clients",children:"MCP-compatible client"})," following similar steps."]}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsxs)(i.A,{value:"auto",label:"Auto install",default:!0,children:[(0,s.jsx)(o.admonition,{type:"important",children:(0,s.jsxs)(o.p,{children:["Auto installation only works if your HTTP client and Langflow server are on the same local machine.\nIf this isn't the case, use the ",(0,s.jsx)(o.strong,{children:"JSON"})," option to configure the MCP server."]})}),(0,s.jsxs)(o.ol,{children:["\n",(0,s.jsxs)(o.li,{children:["Install ",(0,s.jsx)(o.a,{href:"https://docs.cursor.com/get-started/installation",children:"Cursor"}),"."]}),"\n",(0,s.jsxs)(o.li,{children:["In the Langflow dashboard, select the project that contains the flows you want to serve, and then click the ",(0,s.jsx)(o.strong,{children:"MCP Server"})," tab."]}),"\n",(0,s.jsxs)(o.li,{children:["To auto install your current Langflow project as an MCP server, click ",(0,s.jsx)(a.A,{name:"Plus","aria-hidden":"True"})," ",(0,s.jsx)(o.strong,{children:"Add"}),"."]}),"\n"]}),(0,s.jsxs)(o.p,{children:["The installation adds the server's configuration file to Cursor's ",(0,s.jsx)(o.code,{children:"mcp.json"})," configuration file."]})]}),(0,s.jsx)(i.A,{value:"JSON",label:"JSON",children:(0,s.jsxs)(o.ol,{children:["\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Install ",(0,s.jsx)(o.a,{href:"https://docs.cursor.com/get-started/installation",children:"Cursor"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["In Cursor, go to ",(0,s.jsx)(o.strong,{children:"Cursor Settings > MCP"}),", and then click ",(0,s.jsx)(o.strong,{children:"Add New Global MCP Server"}),".\nThis opens Cursor's global MCP configuration file, ",(0,s.jsx)(o.code,{children:"mcp.json"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["In the Langflow dashboard, select the project that contains the flows you want to serve, and then click the ",(0,s.jsx)(o.strong,{children:"MCP Server"})," tab."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Copy the code template from the ",(0,s.jsx)(o.strong,{children:"JSON"})," tab, and then paste it into ",(0,s.jsx)(o.code,{children:"mcp.json"})," in Cursor.\nFor example:"]}),"\n",(0,s.jsx)(u.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "mcpServers"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "PROJECT_NAME"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "command"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"uvx"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "args"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "mcp-proxy"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "http://LANGFLOW_SERVER_ADDRESS/api/v1/mcp/project/PROJECT_ID/sse"',props:{style:{color:"#A5D6FF"}}}]},{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:"json"},annotations:[]}]}),"\n",(0,s.jsxs)(o.p,{children:["The ",(0,s.jsx)(o.strong,{children:"MCP Server"})," tab automatically includes the correct ",(0,s.jsx)(o.code,{children:"PROJECT_NAME"}),", ",(0,s.jsx)(o.code,{children:"LANGFLOW_SERVER_ADDRESS"}),", and ",(0,s.jsx)(o.code,{children:"PROJECT_ID"})," values.\nThe default Langflow server address is ",(0,s.jsx)(o.code,{children:"http://localhost:7860"}),"."]}),"\n",(0,s.jsxs)(o.p,{children:["If you have ",(0,s.jsx)(o.a,{href:"/deployment-public-server",children:"deployed a public Langflow server"}),", the address is automatically included."]}),"\n",(0,s.jsxs)(o.p,{children:["If your Langflow server requires authentication, you must include your Langflow API key in the configuration.\nFor more information, see ",(0,s.jsx)(o.a,{href:"#authentication",children:"MCP server authentication and environment variables"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Save and close the ",(0,s.jsx)(o.code,{children:"mcp.json"})," file in Cursor.\nThe newly added MCP server will appear in the ",(0,s.jsx)(o.strong,{children:"MCP Servers"})," section."]}),"\n"]}),"\n"]})})]}),"\n",(0,s.jsxs)(o.p,{children:["Cursor is now connected to your project's MCP server and your flows are registered as tools.\nCursor determines when to use tools based on your queries, and requests permissions when necessary.\nFor more information, see the ",(0,s.jsx)(o.a,{href:"https://docs.cursor.com/context/model-context-protocol",children:"Cursor's MCP documentation"}),"."]}),"\n",(0,s.jsx)(o.h3,{id:"authentication",children:"MCP server authentication and environment variables"}),"\n",(0,s.jsxs)(o.p,{children:["You must provide a Langflow API key in your MCP client configuration if your ",(0,s.jsx)(o.a,{href:"/api-keys-and-authentication#start-a-langflow-server-with-authentication-enabled",children:"Langflow server has authentication enabled"}),"."]}),"\n",(0,s.jsxs)(o.p,{children:["When this is the case, the code template in your project's ",(0,s.jsx)(o.strong,{children:"MCP Server"})," tab automatically includes the ",(0,s.jsx)(o.code,{children:"--header"})," and ",(0,s.jsx)(o.code,{children:"x-api-key"})," arguments:"]}),"\n",(0,s.jsx)(u.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "mcpServers"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "PROJECT_NAME"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "command"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"uvx"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "args"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "mcp-proxy"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "--headers"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "x-api-key"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "YOUR_API_KEY"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "http://LANGFLOW_SERVER_ADDRESS/api/v1/mcp/project/PROJECT_ID/sse"',props:{style:{color:"#A5D6FF"}}}]},{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:"json"},annotations:[]}]}),"\n",(0,s.jsxs)(o.p,{children:["Click ",(0,s.jsx)(a.A,{name:"key","aria-hidden":"true"})," ",(0,s.jsx)(o.strong,{children:"Generate API key"})," to automatically insert a new Langflow API key into the code template.\nAlternatively, you can replace ",(0,s.jsx)(o.code,{children:"YOUR_API_KEY"})," with an existing Langflow API key."]}),"\n",(0,s.jsx)(o.p,{children:(0,s.jsx)(o.img,{alt:"MCP server tab showing Generate API key button",src:n(95288).A+"",width:"4000",height:"2188"})}),"\n",(0,s.jsxs)(o.p,{children:["To include other environment variables with your MCP server command, use the ",(0,s.jsx)(o.code,{children:"env"})," object with key-value pairs of environment variables:"]}),"\n",(0,s.jsx)(u.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "mcpServers"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "PROJECT_NAME"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "command"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"uvx"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "args"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "mcp-proxy"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "http://LANGFLOW_SERVER_ADDRESS/api/v1/mcp/project/PROJECT_ID/sse"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "env"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "KEY"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"VALUE"',props:{style:{color:"#A5D6FF"}}}]},{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:"json"},annotations:[]}]}),"\n","\n",(0,s.jsx)(o.h3,{id:"deploy-your-server-externally",children:"Deploy your MCP server externally"}),"\n",(0,s.jsxs)(o.p,{children:["To deploy your MCP server externally with ngrok, see ",(0,s.jsx)(o.a,{href:"/deployment-public-server",children:"Deploy a public Langflow server"}),"."]}),"\n",(0,s.jsx)(o.h2,{id:"test-and-debug-flows",children:"Use MCP Inspector to test and debug flows"}),"\n",(0,s.jsxs)(o.p,{children:[(0,s.jsx)(o.a,{href:"https://modelcontextprotocol.io/docs/tools/inspector",children:"MCP Inspector"})," is a common tool for testing and debugging MCP servers.\nYou can use MCP Inspector to monitor your flows and get insights into how they are being consumed by the MCP server:"]}),"\n",(0,s.jsxs)(o.ol,{children:["\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsx)(o.p,{children:"Install MCP Inspector:"}),"\n",(0,s.jsx)(u.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"npx ",props:{style:{color:"#FFA657"}}},{content:"@modelcontextprotocol/inspector",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(o.p,{children:["For more information about configuring MCP Inspector, including specifying a proxy port, see the ",(0,s.jsx)(o.a,{href:"https://github.com/modelcontextprotocol/inspector",children:"MCP Inspector GitHub project"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Open a web browser and navigate to the MCP Inspector UI.\nThe default address is ",(0,s.jsx)(o.code,{children:"http://localhost:6274"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsx)(o.p,{children:"In the MCP Inspector UI, enter the connection details for your Langflow project's MCP server:"}),"\n",(0,s.jsxs)(o.ul,{children:["\n",(0,s.jsxs)(o.li,{children:[(0,s.jsx)(o.strong,{children:"Transport Type"}),": Select ",(0,s.jsx)(o.strong,{children:"SSE"}),"."]}),"\n",(0,s.jsxs)(o.li,{children:[(0,s.jsx)(o.strong,{children:"URL"}),": Enter the Langflow MCP server's ",(0,s.jsx)(o.code,{children:"sse"})," endpoint. For example: ",(0,s.jsx)(o.code,{children:"http://localhost:7860/api/v1/mcp/project/d359cbd4-6fa2-4002-9d53-fa05c645319c/sse"})]}),"\n"]}),"\n",(0,s.jsxs)(o.p,{children:["If you've ",(0,s.jsx)(o.a,{href:"#authentication",children:"configured authentication for your MCP server"}),", fill out the following additional fields:"]}),"\n",(0,s.jsxs)(o.ul,{children:["\n",(0,s.jsxs)(o.li,{children:[(0,s.jsx)(o.strong,{children:"Transport Type"}),": Select ",(0,s.jsx)(o.strong,{children:"STDIO"}),"."]}),"\n",(0,s.jsxs)(o.li,{children:[(0,s.jsx)(o.strong,{children:"Command"}),": ",(0,s.jsx)(o.code,{children:"uvx"})]}),"\n",(0,s.jsxs)(o.li,{children:[(0,s.jsx)(o.strong,{children:"Arguments"}),": Enter the following list of arguments, separated by spaces. Replace the values for ",(0,s.jsx)(o.code,{children:"YOUR_API_KEY"}),", ",(0,s.jsx)(o.code,{children:"LANGFLOW_SERVER_ADDRESS"}),", and ",(0,s.jsx)(o.code,{children:"PROJECT_ID"})," with the values from your Langflow MCP server. For example:"]}),"\n"]}),"\n",(0,s.jsx)(u.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"mcp-proxy ",props:{style:{color:"#FFA657"}}},{content:"--headers ",props:{style:{color:"#79C0FF"}}},{content:"x-api-key YOUR_API_KEY http://LANGFLOW_SERVER_ADDRESS/api/v1/mcp/project/PROJECT_ID/sse",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Click ",(0,s.jsx)(o.strong,{children:"Connect"}),"."]}),"\n",(0,s.jsxs)(o.p,{children:["If the connection was successful, you should see your project's flows in the ",(0,s.jsx)(o.strong,{children:"Tools"})," tab.\nFrom this tab, you can monitor how your flows are being registered as tools by MCP, as well as test the tools with custom input values."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["To quit MCP Inspector, press ",(0,s.jsx)("kbd",{children:"Control+C"})," in the same terminal window where you started it."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(o.h2,{id:"troubleshooting-mcp-server",children:"Troubleshooting MCP server"}),"\n",(0,s.jsxs)(o.p,{children:["If Claude for Desktop isn't using your server's tools correctly, you may need to explicitly define the path to your local ",(0,s.jsx)(o.code,{children:"uvx"})," or ",(0,s.jsx)(o.code,{children:"npx"})," executable file in the ",(0,s.jsx)(o.code,{children:"claude_desktop_config.json"})," configuration file."]}),"\n",(0,s.jsxs)(o.ol,{children:["\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["To find your UVX path, run ",(0,s.jsx)(o.code,{children:"which uvx"}),"."]}),"\n",(0,s.jsxs)(o.p,{children:["To find your NPX path, run ",(0,s.jsx)(o.code,{children:"which npx"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Copy the path, and then replace ",(0,s.jsx)(o.code,{children:"PATH_TO_UVX"})," or ",(0,s.jsx)(o.code,{children:"PATH_TO_NPX"})," in your ",(0,s.jsx)(o.code,{children:"claude_desktop_config.json"})," file."]}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(i.A,{value:"uvx",label:"uvx",default:!0,children:(0,s.jsx)(u.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "mcpServers"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "PROJECT_NAME"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "command"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"PATH_TO_UVX"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "args"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "mcp-proxy"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "http://LANGFLOW_SERVER_ADDRESS/api/v1/mcp/project/PROJECT_ID/sse"',props:{style:{color:"#A5D6FF"}}}]},{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:"json"},annotations:[]}]})}),(0,s.jsx)(i.A,{value:"npx",label:"npx",children:(0,s.jsx)(u.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "mcpServers"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "PROJECT_NAME"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "command"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"PATH_TO_NPX"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "args"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "-y"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "supergateway"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "--sse"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "http://LANGFLOW_SERVER_ADDRESS/api/v1/mcp/project/PROJECT_ID/sse"',props:{style:{color:"#A5D6FF"}}}]},{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:"json"},annotations:[]}]})})]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(o.h2,{id:"see-also",children:"See also"}),"\n",(0,s.jsxs)(o.ul,{children:["\n",(0,s.jsx)(o.li,{children:(0,s.jsx)(o.a,{href:"/mcp-client",children:"Use Langflow as an MCP client"})}),"\n",(0,s.jsx)(o.li,{children:(0,s.jsx)(o.a,{href:"/mcp-component-astra",children:"Use a DataStax Astra DB MCP server"})}),"\n"]})]})}function g(e={}){const{wrapper:o}={...(0,r.R)(),...e.components};return o?(0,s.jsx)(o,{...e,children:(0,s.jsx)(j,{...e})}):j(e)}function y(e,o){throw new Error("Expected "+(o?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},95288:(e,o,n)=>{n.d(o,{A:()=>t});const t=n.p+"assets/images/mcp-server-api-key-5a39d0de10227381df269c4595d4d896.png"}}]); \ No newline at end of file diff --git a/assets/js/e3230154.126cbc92.js b/assets/js/e3230154.126cbc92.js new file mode 100644 index 0000000000..7ec1ed132d --- /dev/null +++ b/assets/js/e3230154.126cbc92.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[9648],{4595:(e,o,n)=>{n.d(o,{A:()=>t});const t=n.p+"assets/images/mcp-server-tools-ddc0f1dc04109b9f3daf6a2f380073c4.png"},11470:(e,o,n)=>{n.d(o,{A:()=>b});var t=n(96540),s=n(18215),r=n(23104),l=n(56347),c=n(205),i=n(57485),a=n(31682),d=n(70679);function h(e){return t.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,t.isValidElement)(e)&&function(e){const{props:o}=e;return!!o&&"object"==typeof o&&"value"in o}(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 p(e){const{values:o,children:n}=e;return(0,t.useMemo)(()=>{const e=o??function(e){return h(e).map(({props:{value:e,label:o,attributes:n,default:t}})=>({value:e,label:o,attributes:n,default:t}))}(n);return function(e){const o=(0,a.XI)(e,(e,o)=>e.value===o.value);if(o.length>0)throw new Error(`Docusaurus error: Duplicate values "${o.map(e=>e.value).join(", ")}" found in . Every value needs to be unique.`)}(e),e},[o,n])}function u({value:e,tabValues:o}){return o.some(o=>o.value===e)}function f({queryString:e=!1,groupId:o}){const n=(0,l.W6)(),s=function({queryString:e=!1,groupId:o}){if("string"==typeof e)return e;if(!1===e)return null;if(!0===e&&!o)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 o??null}({queryString:e,groupId:o});return[(0,i.aZ)(s),(0,t.useCallback)(e=>{if(!s)return;const o=new URLSearchParams(n.location.search);o.set(s,e),n.replace({...n.location,search:o.toString()})},[s,n])]}function x(e){const{defaultValue:o,queryString:n=!1,groupId:s}=e,r=p(e),[l,i]=(0,t.useState)(()=>function({defaultValue:e,tabValues:o}){if(0===o.length)throw new Error("Docusaurus error: the component requires at least one children component");if(e){if(!u({value:e,tabValues:o}))throw new Error(`Docusaurus error: The has a defaultValue "${e}" but none of its children has the corresponding value. Available values are: ${o.map(e=>e.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return e}const n=o.find(e=>e.default)??o[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:o,tabValues:r})),[a,h]=f({queryString:n,groupId:s}),[x,j]=function({groupId:e}){const o=function(e){return e?`docusaurus.tab.${e}`:null}(e),[n,s]=(0,d.Dv)(o);return[n,(0,t.useCallback)(e=>{o&&s.set(e)},[o,s])]}({groupId:s}),g=(()=>{const e=a??x;return u({value:e,tabValues:r})?e:null})();(0,c.A)(()=>{g&&i(g)},[g]);return{selectedValue:l,selectValue:(0,t.useCallback)(e=>{if(!u({value:e,tabValues:r}))throw new Error(`Can't select invalid tab value=${e}`);i(e),h(e),j(e)},[h,j,r]),tabValues:r}}var j=n(92303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var m=n(74848);function y({className:e,block:o,selectedValue:n,selectValue:t,tabValues:l}){const c=[],{blockElementScrollPositionUntilNextRender:i}=(0,r.a_)(),a=e=>{const o=e.currentTarget,s=c.indexOf(o),r=l[s].value;r!==n&&(i(o),t(r))},d=e=>{let o=null;switch(e.key){case"Enter":a(e);break;case"ArrowRight":{const n=c.indexOf(e.currentTarget)+1;o=c[n]??c[0];break}case"ArrowLeft":{const n=c.indexOf(e.currentTarget)-1;o=c[n]??c[c.length-1];break}}o?.focus()};return(0,m.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":o},e),children:l.map(({value:e,label:o,attributes:t})=>(0,m.jsx)("li",{role:"tab",tabIndex:n===e?0:-1,"aria-selected":n===e,ref:e=>{c.push(e)},onKeyDown:d,onClick:a,...t,className:(0,s.A)("tabs__item",g.tabItem,t?.className,{"tabs__item--active":n===e}),children:o??e},e))})}function C({lazy:e,children:o,selectedValue:n}){const r=(Array.isArray(o)?o:[o]).filter(Boolean);if(e){const e=r.find(e=>e.props.value===n);return e?(0,t.cloneElement)(e,{className:(0,s.A)("margin-top--md",e.props.className)}):null}return(0,m.jsx)("div",{className:"margin-top--md",children:r.map((e,o)=>(0,t.cloneElement)(e,{key:o,hidden:e.props.value!==n}))})}function v(e){const o=x(e);return(0,m.jsxs)("div",{className:(0,s.A)("tabs-container",g.tabList),children:[(0,m.jsx)(y,{...o,...e}),(0,m.jsx)(C,{...o,...e})]})}function b(e){const o=(0,j.A)();return(0,m.jsx)(v,{...e,children:h(e.children)},String(o))}},17886:(e,o,n)=>{n.d(o,{A:()=>r});n(96540);var t=n(64058),s=n(74848);function r({name:e,...o}){const n=t[e];return n?(0,s.jsx)(n,{...o}):null}},19365:(e,o,n)=>{n.d(o,{A:()=>l});n(96540);var t=n(18215);const s={tabItem:"tabItem_Ymn6"};var r=n(74848);function l({children:e,hidden:o,className:n}){return(0,r.jsx)("div",{role:"tabpanel",className:(0,t.A)(s.tabItem,n),hidden:o,children:e})}},67577:(e,o,n)=>{n.d(o,{A:()=>t});const t=n.p+"assets/images/mcp-server-53850e4ac7599dec00dd7d01922ba79f.png"},93403:(e,o,n)=>{n.r(o),n.d(o,{CH:()=>u,assets:()=>p,chCodeConfig:()=>f,contentTitle:()=>h,default:()=>g,frontMatter:()=>d,metadata:()=>t,toc:()=>x});const t=JSON.parse('{"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.","source":"@site/docs/Concepts/mcp-server.mdx","sourceDirName":"Concepts","slug":"/mcp-server","permalink":"/mcp-server","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Use Langflow as an MCP server","slug":"/mcp-server"},"sidebar":"docs","previous":{"title":"Use Langflow as an MCP client","permalink":"/mcp-client"},"next":{"title":"Connect an Astra DB MCP server to Langflow","permalink":"/mcp-component-astra"}}');var s=n(74848),r=n(28453),l=n(24754),c=n(11470),i=n(19365),a=n(17886);const d={title:"Use Langflow as an MCP server",slug:"/mcp-server"},h=void 0,p={},u={annotations:l.hk,Code:l.Cy},f={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},x=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Serve flows as MCP tools",id:"select-flows-to-serve",level:2},{value:"Edit flow tool names and descriptions",id:"edit-flow-tool-names-and-descriptions",level:3},{value:"Importance of tool names and descriptions",id:"importance-of-tool-names-and-descriptions",level:4},{value:"Connect clients to your Langflow MCP server",id:"connect-clients-to-use-the-servers-actions",level:2},{value:"MCP server authentication and environment variables",id:"authentication",level:3},{value:"Deploy your Langflow MCP server externally",id:"deploy-your-server-externally",level:3},{value:"Use MCP Inspector to test and debug flows",id:"test-and-debug-flows",level:2},{value:"Troubleshoot Langflow MCP servers",id:"troubleshooting-mcp-server",level:2},{value:"See also",id:"see-also",level:2}];function j(e){const o={a:"a",admonition:"admonition",code:"code",h2:"h2",h3:"h3",h4:"h4",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components},{Details:t}=o;return u||m("CH",!1),u.Code||m("CH.Code",!0),t||m("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)(o.p,{children:["Langflow integrates with the ",(0,s.jsx)(o.a,{href:"https://modelcontextprotocol.io/introduction",children:"Model Context Protocol (MCP)"})," as both an MCP server and an MCP client."]}),"\n",(0,s.jsxs)(o.p,{children:["This page describes how to use Langflow as an MCP server that exposes your flows as ",(0,s.jsx)(o.a,{href:"https://modelcontextprotocol.io/docs/concepts/tools",children:"tools"})," that ",(0,s.jsx)(o.a,{href:"https://modelcontextprotocol.io/clients",children:"MCP clients"})," can use when generating responses."]}),"\n",(0,s.jsxs)(o.p,{children:["For information about using Langflow as an MCP client and managing MCP server connections within flows, see ",(0,s.jsx)(o.a,{href:"/mcp-client",children:"Use Langflow as an MCP client"}),"."]}),"\n",(0,s.jsx)(o.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,s.jsxs)(o.ul,{children:["\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["A ",(0,s.jsx)(o.a,{href:"/concepts-flows#projects",children:"Langflow project"})," with at least one flow that has a ",(0,s.jsxs)(o.a,{href:"/components-io#chat-output",children:[(0,s.jsx)(o.strong,{children:"Chat Output"})," component"]}),"."]}),"\n",(0,s.jsxs)(o.p,{children:["The ",(0,s.jsx)(o.strong,{children:"Chat Output"})," component is required to use a flow as an MCP tool."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Any LTS version of ",(0,s.jsx)(o.a,{href:"https://docs.npmjs.com/downloading-and-installing-node-js-and-npm",children:"Node.js"})," installed on your computer if you want to use MCP Inspector to ",(0,s.jsx)(o.a,{href:"#test-and-debug-flows",children:"test and debug flows"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:[(0,s.jsx)(o.a,{href:"https://ngrok.com/docs/getting-started/#1-install-ngrok",children:"ngrok installed"})," and an ",(0,s.jsx)(o.a,{href:"https://dashboard.ngrok.com/get-started/your-authtoken",children:"ngrok authtoken"})," if you want to ",(0,s.jsx)(o.a,{href:"/deployment-public-server",children:"deploy a public Langflow server"}),"."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(o.h2,{id:"select-flows-to-serve",children:"Serve flows as MCP tools"}),"\n",(0,s.jsx)(o.admonition,{title:"MCP flow requirements",type:"important",children:(0,s.jsxs)(o.p,{children:["A flow must contain a ",(0,s.jsxs)(o.a,{href:"/components-io#chat-output",children:[(0,s.jsx)(o.strong,{children:"Chat Output"})," component"]})," to be used as a tool by MCP clients."]})}),"\n",(0,s.jsxs)(o.p,{children:["Each ",(0,s.jsx)(o.a,{href:"/concepts-flows#projects",children:"Langflow project"})," has an MCP server that exposes the project's flows as tools for use by MCP clients."]}),"\n",(0,s.jsx)(o.p,{children:"By default, all flows in a project are exposed as tools on the project's MCP server.\nYou can change the exposed flows and tool metadata by managing the MCP server settings:"}),"\n",(0,s.jsxs)(o.ol,{children:["\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Click the ",(0,s.jsx)(o.strong,{children:"MCP Server"})," tab on the ",(0,s.jsxs)(o.a,{href:"/concepts-flows#projects",children:[(0,s.jsx)(o.strong,{children:"Projects"})," page"]}),", or, when editing a flow, click ",(0,s.jsx)(o.strong,{children:"Share"}),", and then select ",(0,s.jsx)(o.strong,{children:"MCP Server"}),"."]}),"\n",(0,s.jsx)(o.p,{children:(0,s.jsx)(o.img,{alt:"MCP server projects page",src:n(67577).A+"",width:"4000",height:"2174"})}),"\n",(0,s.jsxs)(o.p,{children:["The ",(0,s.jsx)(o.strong,{children:"Flows/Tools"})," section lists the flows that are currently being served as tools on this MCP server."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["To toggle exposed flows, click ",(0,s.jsx)(a.A,{name:"Settings2","aria-hidden":"true"})," ",(0,s.jsx)(o.strong,{children:"Edit Tools"}),", and then select the flows that you want exposed as tools.\nTo prevent a flow from being used as a tool, clear the checkbox in the first column."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Close the ",(0,s.jsx)(o.strong,{children:"MCP Server Tools"})," dialog to save your changes."]}),"\n",(0,s.jsx)(o.p,{children:(0,s.jsx)(o.img,{alt:"MCP Server Tools",src:n(4595).A+"",width:"4000",height:"2030"})}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(o.h3,{id:"edit-flow-tool-names-and-descriptions",children:"Edit flow tool names and descriptions"}),"\n",(0,s.jsx)(o.p,{children:"Tool names and descriptions help MCP clients determine which actions your flows provide and when to use those actions.\nIt is recommended to provide clear, descriptive names and descriptions for all tools that you serve to MCP clients."}),"\n",(0,s.jsx)(o.p,{children:"To edit the names and descriptions of flow tools on a Langflow MCP server, do the following:"}),"\n",(0,s.jsxs)(o.ol,{children:["\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Click the ",(0,s.jsx)(o.strong,{children:"MCP Server"})," tab on the ",(0,s.jsxs)(o.a,{href:"/concepts-flows#projects",children:[(0,s.jsx)(o.strong,{children:"Projects"})," page"]}),", or, when editing a flow, click ",(0,s.jsx)(o.strong,{children:"Share"}),", and then select ",(0,s.jsx)(o.strong,{children:"MCP Server"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Click ",(0,s.jsx)(a.A,{name:"Settings2","aria-hidden":"true"})," ",(0,s.jsx)(o.strong,{children:"Edit Tools"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Click the ",(0,s.jsx)(o.strong,{children:"Description"})," or ",(0,s.jsx)(o.strong,{children:"Tool"})," that you want to edit:"]}),"\n",(0,s.jsxs)(o.ul,{children:["\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:[(0,s.jsx)(o.strong,{children:"Tool name"}),": Enter a name that makes it clear what the flow does when used as a tool by an agent."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:[(0,s.jsx)(o.strong,{children:"Tool description"}),": Enter a description that completely and accurately describes the specific actions the flow performs."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Close the ",(0,s.jsx)(o.strong,{children:"MCP Server Tools"})," dialog to save your changes."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(o.h4,{id:"importance-of-tool-names-and-descriptions",children:"Importance of tool names and descriptions"}),"\n",(0,s.jsx)(o.p,{children:"MCP clients use tool names and descriptions to determine which actions to use when generating responses."}),"\n",(0,s.jsx)(o.p,{children:"Because MCP clients treat your Langflow project as a single MCP server with all of your enabled flows listed as tools, unclear names and descriptions can cause the agent to select tools incorrectly or inconsistently."}),"\n",(0,s.jsxs)(o.p,{children:["For example, a flow's default tool name is the flow ID, such as ",(0,s.jsx)(o.code,{children:"adbbf8c7-0a34-493b-90ea-5e8b42f78b66"}),".\nThis provides no information to an agent about the type of flow or its purpose."]}),"\n",(0,s.jsx)(o.p,{children:"To provide more context about your flows, make sure to name and describe your flows clearly when configuring your Langflow project's MCP server."}),"\n",(0,s.jsx)(o.p,{children:"Think of these names and descriptions as function names and code comments.\nUse clear statements to describe the problems your flows solve."}),"\n",(0,s.jsxs)(t,{children:[(0,s.jsx)("summary",{children:"Example: Tool name and description usage"}),(0,s.jsxs)(o.p,{children:["For example, assume you create a flow based on the ",(0,s.jsx)(o.strong,{children:"Document Q&A"})," template that uses an LLM to chat about resumes, and then you give the flow the following name and description:"]}),(0,s.jsxs)(o.ul,{children:["\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:[(0,s.jsx)(o.strong,{children:"Tool name"}),": ",(0,s.jsx)(o.code,{children:"document_qa_for_resume"})]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:[(0,s.jsx)(o.strong,{children:"Tool description"}),": ",(0,s.jsx)(o.code,{children:"A flow for analyzing Emily's resume."})]}),"\n"]}),"\n"]}),(0,s.jsxs)(o.p,{children:["After connecting your Langflow MCP server to Cursor, you can ask Cursor about the resume, such as ",(0,s.jsx)(o.code,{children:"What job experience does Emily have?"}),".\nUsing the context provided by your tool name and description, the agent can decide to use the ",(0,s.jsx)(o.code,{children:"document_qa_for_resume"})," MCP tool to create a response about Emily's resume.\nIf necessary, the agent asks permission to use the flow tool before generating the response."]}),(0,s.jsxs)(o.p,{children:["If you ask about a different resume, such as ",(0,s.jsx)(o.code,{children:"What job experience does Alex have?"}),", the agent can decide that ",(0,s.jsx)(o.code,{children:"document_qa_for_resume"})," isn't relevant to this request, because the tool description specifies that the flow is for Emily's resume.\nIn this case, the agent might use another available tool, or it can inform you that it doesn't have access to information about Alex's.\nFor example:"]}),(0,s.jsx)(u.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"I notice you're asking about Alex's job experience.",props:{}}]},{tokens:[{content:"Based on the available tools, I can see there is a Document QA for Resume flow that's designed for analyzing resumes.",props:{}}]},{tokens:[{content:"However, the description mentions it's for \"Emily's resume\" not Alex's. I don't have access to Alex's resume or job experience information.",props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n","\n",(0,s.jsx)(o.h2,{id:"connect-clients-to-use-the-servers-actions",children:"Connect clients to your Langflow MCP server"}),"\n",(0,s.jsx)(o.p,{children:"Langflow provides automatic installation and code snippets to help you deploy your Langflow MCP servers to your local MCP clients."}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsxs)(i.A,{value:"auto",label:"Auto install",default:!0,children:[(0,s.jsx)(o.admonition,{type:"info",children:(0,s.jsxs)(o.p,{children:["The auto install option is available only for specific MCP clients, and the client must be installed locally to your Langflow server.\nIf your client isn't supported or installed remotely from your Langflow server, use the ",(0,s.jsx)(o.strong,{children:"JSON"})," option."]})}),(0,s.jsxs)(o.ol,{children:["\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Install ",(0,s.jsx)(o.a,{href:"https://docs.cursor.com/get-started/installation",children:"Cursor"}),", Claude, or Windsurf local to your Langflow instance."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Recommended: Configure ",(0,s.jsx)(o.a,{href:"#authentication",children:"authentication"})," for your MCP server."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["In Langflow, on the ",(0,s.jsx)(o.strong,{children:"Projects"})," page, click the ",(0,s.jsx)(o.strong,{children:"MCP Server"})," tab."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["On the ",(0,s.jsx)(o.strong,{children:"Auto install"})," tab, find your MCP client provider, and then click ",(0,s.jsx)(a.A,{name:"Plus","aria-hidden":"true"})," ",(0,s.jsx)(o.strong,{children:"Add"}),"."]}),"\n"]}),"\n"]}),(0,s.jsxs)(o.p,{children:["Your Langflow project's MCP server is automatically added to the configuration file for your local Cursor, Claude, or Windsurf client.\nFor example, with Cursor, the server configuration is added to the ",(0,s.jsx)(o.code,{children:"mcp.json"})," configuration file."]}),(0,s.jsx)(o.p,{children:"Langflow attempts to add this configuration even if the selected client isn't installed.\nTo verify the installation, check the available MCP servers in your client."})]}),(0,s.jsxs)(i.A,{value:"JSON",label:"JSON",children:[(0,s.jsx)(o.p,{children:"The JSON option allows you to connect a Langflow MCP server to any local or remote MCP client."}),(0,s.jsxs)(o.p,{children:["You can modify this process for any ",(0,s.jsx)(o.a,{href:"https://modelcontextprotocol.io/clients",children:"MCP-compatible client"}),"."]}),(0,s.jsxs)(o.ol,{children:["\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Install ",(0,s.jsx)(o.a,{href:"https://docs.cursor.com/get-started/installation",children:"Cursor"})," or any other ",(0,s.jsx)(o.a,{href:"https://modelcontextprotocol.io/clients",children:"MCP-compatible client"}),"."]}),"\n",(0,s.jsx)(o.p,{children:"These steps use Cursor as an example.\nModify them as needed for other clients."}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["In Cursor, go to ",(0,s.jsx)(o.strong,{children:"Cursor Settings"}),", select ",(0,s.jsx)(o.strong,{children:"MCP"}),", and then click ",(0,s.jsx)(o.strong,{children:"Add New Global MCP Server"})," to open Cursor's global ",(0,s.jsx)(o.code,{children:"mcp.json"})," configuration file."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Recommended: Configure ",(0,s.jsx)(o.a,{href:"#authentication",children:"authentication"})," for your MCP server."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["In Langflow, on the ",(0,s.jsx)(o.strong,{children:"Projects"})," page, click the ",(0,s.jsx)(o.strong,{children:"MCP Server"})," tab."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Click the ",(0,s.jsx)(o.strong,{children:"JSON"})," tab, copy the code snippet for your operating system, and then paste it into Cursor's ",(0,s.jsx)(o.code,{children:"mcp.json"})," file.\nFor example:"]}),"\n",(0,s.jsx)(u.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "mcpServers"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "PROJECT_NAME"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "command"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"uvx"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "args"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "mcp-proxy"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "http://LANGFLOW_SERVER_ADDRESS/api/v1/mcp/project/PROJECT_ID/sse"',props:{style:{color:"#A5D6FF"}}}]},{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:"json"},annotations:[]}]}),"\n",(0,s.jsxs)(o.p,{children:["The ",(0,s.jsx)(o.strong,{children:"MCP Server"})," tab automatically populates the ",(0,s.jsx)(o.code,{children:"PROJECT_NAME"}),", ",(0,s.jsx)(o.code,{children:"LANGFLOW_SERVER_ADDRESS"}),", and ",(0,s.jsx)(o.code,{children:"PROJECT_ID"})," values."]}),"\n",(0,s.jsxs)(o.p,{children:["The default Langflow server address is ",(0,s.jsx)(o.code,{children:"http://localhost:7860"}),".\nIf you are using a ",(0,s.jsx)(o.a,{href:"/deployment-public-server",children:"public Langflow server"}),", the server address is automatically included."]}),"\n",(0,s.jsxs)(o.p,{children:["If your Langflow server requires authentication, you must include your Langflow API key in the configuration.\nFor more information, see ",(0,s.jsx)(o.a,{href:"#authentication",children:"MCP server authentication and environment variables"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["In Cursor, save and close the ",(0,s.jsx)(o.code,{children:"mcp.json"})," file."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Confirm that your Langflow MCP server is on Cursor's ",(0,s.jsx)(o.strong,{children:"MCP Servers"})," list."]}),"\n"]}),"\n"]})]})]}),"\n",(0,s.jsxs)(o.p,{children:["Once your MCP client is connected to your Langflow project's MCP server, your flows are registered as tools.\nCursor determines when to use tools based on your queries, and requests permissions when necessary.\nFor more information, see the MCP documentation for your client, such as ",(0,s.jsx)(o.a,{href:"https://docs.cursor.com/context/model-context-protocol",children:"Cursor's MCP documentation"}),"."]}),"\n",(0,s.jsx)(o.h3,{id:"authentication",children:"MCP server authentication and environment variables"}),"\n",(0,s.jsxs)(o.p,{children:["You must provide a Langflow API key in your MCP client configuration if your ",(0,s.jsx)(o.a,{href:"/api-keys-and-authentication#start-a-langflow-server-with-authentication-enabled",children:"Langflow server has authentication enabled"}),"."]}),"\n",(0,s.jsxs)(o.p,{children:["When this is the case, the code template in your project's ",(0,s.jsx)(o.strong,{children:"MCP Server"})," tab automatically includes the ",(0,s.jsx)(o.code,{children:"--header"})," and ",(0,s.jsx)(o.code,{children:"x-api-key"})," arguments:"]}),"\n",(0,s.jsx)(u.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "mcpServers"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "PROJECT_NAME"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "command"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"uvx"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "args"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "mcp-proxy"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "--headers"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "x-api-key"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "YOUR_API_KEY"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "http://LANGFLOW_SERVER_ADDRESS/api/v1/mcp/project/PROJECT_ID/sse"',props:{style:{color:"#A5D6FF"}}}]},{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:"json"},annotations:[]}]}),"\n",(0,s.jsxs)(o.p,{children:["Click ",(0,s.jsx)(a.A,{name:"key","aria-hidden":"true"})," ",(0,s.jsx)(o.strong,{children:"Generate API key"})," to automatically insert a new Langflow API key into the code template.\nAlternatively, you can replace ",(0,s.jsx)(o.code,{children:"YOUR_API_KEY"})," with an existing Langflow API key."]}),"\n",(0,s.jsx)(o.p,{children:(0,s.jsx)(o.img,{alt:"MCP server tab showing Generate API key button",src:n(95288).A+"",width:"4000",height:"2188"})}),"\n",(0,s.jsxs)(o.p,{children:["To include other environment variables with your MCP server command, use the ",(0,s.jsx)(o.code,{children:"env"})," object with key-value pairs of environment variables:"]}),"\n",(0,s.jsx)(u.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "mcpServers"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "PROJECT_NAME"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "command"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"uvx"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "args"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "mcp-proxy"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "http://LANGFLOW_SERVER_ADDRESS/api/v1/mcp/project/PROJECT_ID/sse"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "env"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "KEY"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"VALUE"',props:{style:{color:"#A5D6FF"}}}]},{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:"json"},annotations:[]}]}),"\n","\n",(0,s.jsx)(o.h3,{id:"deploy-your-server-externally",children:"Deploy your Langflow MCP server externally"}),"\n",(0,s.jsxs)(o.p,{children:["To deploy your Langflow MCP server externally, see ",(0,s.jsx)(o.a,{href:"/deployment-public-server",children:"Deploy a public Langflow server"}),"."]}),"\n",(0,s.jsx)(o.h2,{id:"test-and-debug-flows",children:"Use MCP Inspector to test and debug flows"}),"\n",(0,s.jsxs)(o.p,{children:[(0,s.jsx)(o.a,{href:"https://modelcontextprotocol.io/docs/tools/inspector",children:"MCP Inspector"})," is a common tool for testing and debugging MCP servers.\nYou can use MCP Inspector to monitor your flows and get insights into how they are being consumed by the MCP server:"]}),"\n",(0,s.jsxs)(o.ol,{children:["\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsx)(o.p,{children:"Install MCP Inspector:"}),"\n",(0,s.jsx)(u.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"npx ",props:{style:{color:"#FFA657"}}},{content:"@modelcontextprotocol/inspector",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(o.p,{children:["For more information about configuring MCP Inspector, including specifying a proxy port, see the ",(0,s.jsx)(o.a,{href:"https://github.com/modelcontextprotocol/inspector",children:"MCP Inspector GitHub project"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Open a web browser and navigate to the MCP Inspector UI.\nThe default address is ",(0,s.jsx)(o.code,{children:"http://localhost:6274"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsx)(o.p,{children:"In the MCP Inspector UI, enter the connection details for your Langflow project's MCP server:"}),"\n",(0,s.jsxs)(o.ul,{children:["\n",(0,s.jsxs)(o.li,{children:[(0,s.jsx)(o.strong,{children:"Transport Type"}),": Select ",(0,s.jsx)(o.strong,{children:"SSE"}),"."]}),"\n",(0,s.jsxs)(o.li,{children:[(0,s.jsx)(o.strong,{children:"URL"}),": Enter the Langflow MCP server's ",(0,s.jsx)(o.code,{children:"sse"})," endpoint. For example: ",(0,s.jsx)(o.code,{children:"http://localhost:7860/api/v1/mcp/project/d359cbd4-6fa2-4002-9d53-fa05c645319c/sse"})]}),"\n"]}),"\n",(0,s.jsxs)(o.p,{children:["If you've ",(0,s.jsx)(o.a,{href:"#authentication",children:"configured authentication for your MCP server"}),", fill out the following additional fields:"]}),"\n",(0,s.jsxs)(o.ul,{children:["\n",(0,s.jsxs)(o.li,{children:[(0,s.jsx)(o.strong,{children:"Transport Type"}),": Select ",(0,s.jsx)(o.strong,{children:"STDIO"}),"."]}),"\n",(0,s.jsxs)(o.li,{children:[(0,s.jsx)(o.strong,{children:"Command"}),": ",(0,s.jsx)(o.code,{children:"uvx"})]}),"\n",(0,s.jsxs)(o.li,{children:[(0,s.jsx)(o.strong,{children:"Arguments"}),": Enter the following list of arguments, separated by spaces. Replace the values for ",(0,s.jsx)(o.code,{children:"YOUR_API_KEY"}),", ",(0,s.jsx)(o.code,{children:"LANGFLOW_SERVER_ADDRESS"}),", and ",(0,s.jsx)(o.code,{children:"PROJECT_ID"})," with the values from your Langflow MCP server. For example:"]}),"\n"]}),"\n",(0,s.jsx)(u.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"mcp-proxy ",props:{style:{color:"#FFA657"}}},{content:"--headers ",props:{style:{color:"#79C0FF"}}},{content:"x-api-key YOUR_API_KEY http://LANGFLOW_SERVER_ADDRESS/api/v1/mcp/project/PROJECT_ID/sse",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Click ",(0,s.jsx)(o.strong,{children:"Connect"}),"."]}),"\n",(0,s.jsxs)(o.p,{children:["If the connection was successful, you should see your project's flows in the ",(0,s.jsx)(o.strong,{children:"Tools"})," tab.\nFrom this tab, you can monitor how your flows are being registered as tools by MCP, as well as test the tools with custom input values."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["To quit MCP Inspector, press ",(0,s.jsx)("kbd",{children:"Control+C"})," in the same terminal window where you started it."]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(o.h2,{id:"troubleshooting-mcp-server",children:"Troubleshoot Langflow MCP servers"}),"\n",(0,s.jsxs)(o.p,{children:["If Claude for Desktop isn't using your server's tools correctly, you may need to explicitly define the path to your local ",(0,s.jsx)(o.code,{children:"uvx"})," or ",(0,s.jsx)(o.code,{children:"npx"})," executable file in the ",(0,s.jsx)(o.code,{children:"claude_desktop_config.json"})," configuration file."]}),"\n",(0,s.jsxs)(o.ol,{children:["\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["To find your UVX path, run ",(0,s.jsx)(o.code,{children:"which uvx"}),"."]}),"\n",(0,s.jsxs)(o.p,{children:["To find your NPX path, run ",(0,s.jsx)(o.code,{children:"which npx"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(o.li,{children:["\n",(0,s.jsxs)(o.p,{children:["Copy the path, and then replace ",(0,s.jsx)(o.code,{children:"PATH_TO_UVX"})," or ",(0,s.jsx)(o.code,{children:"PATH_TO_NPX"})," in your ",(0,s.jsx)(o.code,{children:"claude_desktop_config.json"})," file."]}),"\n",(0,s.jsxs)(c.A,{children:[(0,s.jsx)(i.A,{value:"uvx",label:"uvx",default:!0,children:(0,s.jsx)(u.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "mcpServers"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "PROJECT_NAME"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "command"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"PATH_TO_UVX"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "args"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "mcp-proxy"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "http://LANGFLOW_SERVER_ADDRESS/api/v1/mcp/project/PROJECT_ID/sse"',props:{style:{color:"#A5D6FF"}}}]},{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:"json"},annotations:[]}]})}),(0,s.jsx)(i.A,{value:"npx",label:"npx",children:(0,s.jsx)(u.Code,{codeConfig:f,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"{",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "mcpServers"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "PROJECT_NAME"',props:{style:{color:"#7EE787"}}},{content:": {",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "command"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"PATH_TO_NPX"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "args"',props:{style:{color:"#7EE787"}}},{content:": [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "-y"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "supergateway"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "--sse"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "http://LANGFLOW_SERVER_ADDRESS/api/v1/mcp/project/PROJECT_ID/sse"',props:{style:{color:"#A5D6FF"}}}]},{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:"json"},annotations:[]}]})})]}),"\n"]}),"\n"]}),"\n",(0,s.jsx)(o.h2,{id:"see-also",children:"See also"}),"\n",(0,s.jsxs)(o.ul,{children:["\n",(0,s.jsx)(o.li,{children:(0,s.jsx)(o.a,{href:"/mcp-client",children:"Use Langflow as an MCP client"})}),"\n",(0,s.jsx)(o.li,{children:(0,s.jsx)(o.a,{href:"/mcp-component-astra",children:"Use a DataStax Astra DB MCP server"})}),"\n"]})]})}function g(e={}){const{wrapper:o}={...(0,r.R)(),...e.components};return o?(0,s.jsx)(o,{...e,children:(0,s.jsx)(j,{...e})}):j(e)}function m(e,o){throw new Error("Expected "+(o?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},95288:(e,o,n)=>{n.d(o,{A:()=>t});const t=n.p+"assets/images/mcp-server-api-key-5a39d0de10227381df269c4595d4d896.png"}}]); \ No newline at end of file diff --git a/assets/js/e55b8e98.0b8884b3.js b/assets/js/e55b8e98.0b8884b3.js new file mode 100644 index 0000000000..a529e7ff83 --- /dev/null +++ b/assets/js/e55b8e98.0b8884b3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[4614],{17886:(e,n,t)=>{t.d(n,{A:()=>i});t(96540);var s=t(64058),r=t(74848);function i({name:e,...n}){const t=s[e];return t?(0,r.jsx)(t,{...n}):null}},31929:(e,n,t)=>{t.d(n,{Ay:()=>o,RM:()=>d});var s=t(74848),r=t(28453),i=t(17886);const d=[];function a(e){const n={a:"a",p:"p",strong:"strong",...(0,r.R)(),...e.components};return(0,s.jsxs)(n.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,s.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Controls"})," in the ",(0,s.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function o(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},37826:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>p,frontMatter:()=>o,metadata:()=>s,toc:()=>h});const s=JSON.parse('{"id":"Components/bundles-aiml","title":"AI/ML API","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-aiml.mdx","sourceDirName":"Components","slug":"/bundles-aiml","permalink":"/bundles-aiml","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"AI/ML API","slug":"/bundles-aiml"},"sidebar":"docs","previous":{"title":"About bundles","permalink":"/components-bundle-components"},"next":{"title":"Amazon","permalink":"/bundles-amazon"}}');var r=t(74848),i=t(28453),d=t(17886),a=t(31929);const o={title:"AI/ML API",slug:"/bundles-aiml"},l=void 0,c={},h=[{value:"AI/ML API text generation",id:"aiml-api-text-generation",level:2},{value:"AI/ML API text generation parameters",id:"aiml-api-text-generation-parameters",level:3},{value:"AI/ML API Embeddings",id:"aiml-api-embeddings",level:2},{value:"AI/ML API Embeddings parameters",id:"aiml-api-embeddings-parameters",level:3},...a.RM];function m(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,r.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,r.jsx)(n.strong,{children:"AI/ML"})," bundle."]}),"\n",(0,r.jsx)(n.h2,{id:"aiml-api-text-generation",children:"AI/ML API text generation"}),"\n",(0,r.jsxs)(n.p,{children:["This component creates a ",(0,r.jsx)(n.code,{children:"ChatOpenAI"})," model instance using the AI/ML API.\nThe output is exclusively a ",(0,r.jsx)(n.strong,{children:"Language Model"})," (",(0,r.jsx)(n.a,{href:"/data-types#languagemodel",children:(0,r.jsx)(n.code,{children:"LanguageModel"})}),") that you can connect to another LLM-driven component, such as a ",(0,r.jsx)(n.strong,{children:"Smart Function"})," component."]}),"\n",(0,r.jsxs)(n.p,{children:["For more information, see the ",(0,r.jsx)(n.a,{href:"https://docs.aimlapi.com/integrations/langflow",children:"AI/ML API Langflow integration documentation"})," and ",(0,r.jsxs)(n.a,{href:"/components-models",children:[(0,r.jsx)(n.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"aiml-api-text-generation-parameters",children:"AI/ML API text generation parameters"}),"\n",(0,r.jsxs)(n.p,{children:["Many component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,r.jsx)(d.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Controls"})," in the ",(0,r.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(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:"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:"max_tokens"}),(0,r.jsx)(n.td,{children:"Integer"}),(0,r.jsx)(n.td,{children:"Input parameter. The maximum number of tokens to generate. Set to 0 for unlimited tokens. Range: 0-128000."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"model_kwargs"}),(0,r.jsx)(n.td,{children:"Dictionary"}),(0,r.jsx)(n.td,{children:"Input parameter. Additional keyword arguments for the model."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"model_name"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsxs)(n.td,{children:["Input parameter. The name of the AIML model to use. Options are predefined in ",(0,r.jsx)(n.code,{children:"AIML_CHAT_MODELS"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"aiml_api_base"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsxs)(n.td,{children:["Input parameter. The base URL of the AIML API. Defaults to ",(0,r.jsx)(n.code,{children:"https://api.aimlapi.com"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"api_key"}),(0,r.jsx)(n.td,{children:"SecretString"}),(0,r.jsx)(n.td,{children:"Input parameter. The AIML API Key to use for the model."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"temperature"}),(0,r.jsx)(n.td,{children:"Float"}),(0,r.jsxs)(n.td,{children:["Input parameter. Controls randomness in the output. Default: ",(0,r.jsx)(n.code,{children:"0.1"}),"."]})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"aiml-api-embeddings",children:"AI/ML API Embeddings"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"AI/ML API Embeddings"})," component generates embeddings using the ",(0,r.jsx)(n.a,{href:"https://docs.aimlapi.com/api-overview/embeddings",children:"AI/ML API"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["The output is ",(0,r.jsx)(n.a,{href:"/data-types#embeddings",children:(0,r.jsx)(n.code,{children:"Embeddings"})}),".\nSpecifically, an instance of ",(0,r.jsx)(n.code,{children:"AIMLEmbeddingsImpl"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["For more information about using embedding model components in flows, see ",(0,r.jsxs)(n.a,{href:"/components-embedding-models",children:[(0,r.jsx)(n.strong,{children:"Embedding Model"})," components"]}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"aiml-api-embeddings-parameters",children:"AI/ML API Embeddings parameters"}),"\n",(0,r.jsx)(a.Ay,{}),"\n",(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:"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:"model_name"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:"Input parameter. The name of the AI/ML embedding model to use."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"aiml_api_key"}),(0,r.jsx)(n.td,{children:"SecretString"}),(0,r.jsx)(n.td,{children:"Input parameter. The API key required for authenticating with the AI/ML service."})]})]})]})]})}function p(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(m,{...e})}):m(e)}}}]); \ No newline at end of file diff --git a/assets/js/e55b8e98.df33c9e2.js b/assets/js/e55b8e98.df33c9e2.js deleted file mode 100644 index f14b9c48f2..0000000000 --- a/assets/js/e55b8e98.df33c9e2.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[4614],{17886:(e,n,t)=>{t.d(n,{A:()=>i});t(96540);var s=t(64058),r=t(74848);function i({name:e,...n}){const t=s[e];return t?(0,r.jsx)(t,{...n}):null}},37826:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>o,default:()=>m,frontMatter:()=>a,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"Components/bundles-aiml","title":"AI/ML API","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-aiml.mdx","sourceDirName":"Components","slug":"/bundles-aiml","permalink":"/bundles-aiml","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"AI/ML API","slug":"/bundles-aiml"},"sidebar":"docs","previous":{"title":"About bundles","permalink":"/components-bundle-components"},"next":{"title":"Amazon","permalink":"/bundles-amazon"}}');var r=t(74848),i=t(28453),d=t(17886);const a={title:"AI/ML API",slug:"/bundles-aiml"},o=void 0,l={},c=[{value:"AI/ML API text generation",id:"aiml-api-text-generation",level:2},{value:"AI/ML API text generation parameters",id:"aiml-api-text-generation-parameters",level:3},{value:"AI/ML API Embeddings",id:"aiml-api-embeddings",level:2},{value:"AI/ML API Embeddings parameters",id:"aiml-api-embeddings-parameters",level:3}];function h(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,r.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,r.jsx)(n.strong,{children:"AI/ML"})," bundle."]}),"\n",(0,r.jsx)(n.h2,{id:"aiml-api-text-generation",children:"AI/ML API text generation"}),"\n",(0,r.jsxs)(n.p,{children:["This component creates a ",(0,r.jsx)(n.code,{children:"ChatOpenAI"})," model instance using the AI/ML API.\nThe output is exclusively a ",(0,r.jsx)(n.strong,{children:"Language Model"})," (",(0,r.jsx)(n.a,{href:"/data-types#languagemodel",children:(0,r.jsx)(n.code,{children:"LanguageModel"})}),") that you can connect to another LLM-driven component, such as a ",(0,r.jsx)(n.strong,{children:"Smart Function"})," component."]}),"\n",(0,r.jsxs)(n.p,{children:["For more information, see the ",(0,r.jsx)(n.a,{href:"https://docs.aimlapi.com/integrations/langflow",children:"AI/ML API Langflow integration documentation"})," and ",(0,r.jsxs)(n.a,{href:"/components-models",children:[(0,r.jsx)(n.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"aiml-api-text-generation-parameters",children:"AI/ML API text generation parameters"}),"\n",(0,r.jsxs)(n.p,{children:["Many component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,r.jsx)(d.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Controls"})," in the ",(0,r.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(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:"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:"max_tokens"}),(0,r.jsx)(n.td,{children:"Integer"}),(0,r.jsx)(n.td,{children:"Input parameter. The maximum number of tokens to generate. Set to 0 for unlimited tokens. Range: 0-128000."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"model_kwargs"}),(0,r.jsx)(n.td,{children:"Dictionary"}),(0,r.jsx)(n.td,{children:"Input parameter. Additional keyword arguments for the model."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"model_name"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsxs)(n.td,{children:["Input parameter. The name of the AIML model to use. Options are predefined in ",(0,r.jsx)(n.code,{children:"AIML_CHAT_MODELS"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"aiml_api_base"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsxs)(n.td,{children:["Input parameter. The base URL of the AIML API. Defaults to ",(0,r.jsx)(n.code,{children:"https://api.aimlapi.com"}),"."]})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"api_key"}),(0,r.jsx)(n.td,{children:"SecretString"}),(0,r.jsx)(n.td,{children:"Input parameter. The AIML API Key to use for the model."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"temperature"}),(0,r.jsx)(n.td,{children:"Float"}),(0,r.jsxs)(n.td,{children:["Input parameter. Controls randomness in the output. Default: ",(0,r.jsx)(n.code,{children:"0.1"}),"."]})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"aiml-api-embeddings",children:"AI/ML API Embeddings"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"AI/ML API Embeddings"})," component generates embeddings using the ",(0,r.jsx)(n.a,{href:"https://docs.aimlapi.com/api-overview/embeddings",children:"AI/ML API"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["The output is ",(0,r.jsx)(n.a,{href:"/data-types#embeddings",children:(0,r.jsx)(n.code,{children:"Embeddings"})}),".\nSpecifically, an instance of ",(0,r.jsx)(n.code,{children:"AIMLEmbeddingsImpl"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["For more information about using embedding model components in flows, see ",(0,r.jsxs)(n.a,{href:"/components-embedding-models",children:[(0,r.jsx)(n.strong,{children:"Embedding Model"})," components"]}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"aiml-api-embeddings-parameters",children:"AI/ML API Embeddings parameters"}),"\n",(0,r.jsxs)(n.p,{children:["Some ",(0,r.jsx)(n.strong,{children:"AI/ML API Embeddings"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,r.jsx)(d.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Controls"})," in the ",(0,r.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(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:"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:"model_name"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:"Input parameter. The name of the AI/ML embedding model to use."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"aiml_api_key"}),(0,r.jsx)(n.td,{children:"SecretString"}),(0,r.jsx)(n.td,{children:"Input parameter. The API key required for authenticating with the AI/ML service."})]})]})]})]})}function m(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}}}]); \ No newline at end of file diff --git a/assets/js/e627b1b2.51bf40a8.js b/assets/js/e627b1b2.51bf40a8.js new file mode 100644 index 0000000000..bc2114fff9 --- /dev/null +++ b/assets/js/e627b1b2.51bf40a8.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[5352],{20267:(e,t,n)=>{n.r(t),n.d(t,{CH:()=>d,assets:()=>l,chCodeConfig:()=>h,contentTitle:()=>s,default:()=>g,frontMatter:()=>c,metadata:()=>o,toc:()=>p});const o=JSON.parse('{"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.","source":"@site/docs/Integrations/integrations-opik.mdx","sourceDirName":"Integrations","slug":"/integrations-opik","permalink":"/integrations-opik","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Opik","slug":"/integrations-opik"},"sidebar":"docs","previous":{"title":"LangWatch","permalink":"/integrations-langwatch"},"next":{"title":"Telemetry","permalink":"/contributing-telemetry"}}');var i=n(74848),r=n(28453),a=n(24754);const c={title:"Opik",slug:"/integrations-opik"},s=void 0,l={},d={annotations:a.hk,Code:a.Cy},h={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},p=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Integrate Opik with Langflow",id:"integrate-opik-with-langflow",level:2},{value:"Disable the Opik integration",id:"disable-the-opik-integration",level:2}];function u(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",ul:"ul",...(0,r.R)(),...e.components};return d||f("CH",!1),d.Code||f("CH.Code",!0),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n",(0,i.jsxs)(t.p,{children:[(0,i.jsx)(t.a,{href:"https://www.comet.com/site/products/opik/",children:"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."]}),"\n",(0,i.jsxs)(t.p,{children:["You can configure Langflow to collect ",(0,i.jsx)(t.a,{href:"https://www.comet.com/docs/opik/tracing/log_traces",children:"tracing"})," data about your flow executions and automatically send the data to Opik."]}),"\n",(0,i.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:["An ",(0,i.jsx)(t.a,{href:"https://www.comet.com/docs/opik/faq#what-is-the-difference-between-opik-cloud-and-the-open-source-opik-platform-",children:"Open-Source Opik server or an Opik Cloud account"})]}),"\n",(0,i.jsxs)(t.li,{children:["A ",(0,i.jsx)(t.a,{href:"/get-started-installation",children:"running Langflow server"})," with a ",(0,i.jsx)(t.a,{href:"/concepts-flows",children:"flow"})," that you want to trace"]}),"\n"]}),"\n",(0,i.jsx)(t.admonition,{type:"tip",children:(0,i.jsxs)(t.p,{children:["If you need a flow to test the Opik integration, see the ",(0,i.jsx)(t.a,{href:"/get-started-quickstart",children:"Langflow quickstart"}),"."]})}),"\n",(0,i.jsx)(t.h2,{id:"integrate-opik-with-langflow",children:"Integrate Opik with Langflow"}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["If you use Opik Cloud, get an ",(0,i.jsx)(t.a,{href:"https://www.comet.com/docs/opik/faq#where-can-i-find-my-opik-api-key-",children:"Opik API key"}),"."]}),"\n",(0,i.jsx)(t.p,{children:"An API key isn't required with an Open-Source Opik server."}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["Call the ",(0,i.jsx)(t.code,{children:"opik configure"})," CLI to save your Opik configuration in the same environment where you run Langflow:"]}),"\n",(0,i.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"opik ",props:{style:{color:"#FFA657"}}},{content:"configure",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,i.jsx)(t.p,{children:"For self-hosted Opik, you can also use the following Opik CLI command:"}),"\n",(0,i.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"opik ",props:{style:{color:"#FFA657"}}},{content:"configure ",props:{style:{color:"#A5D6FF"}}},{content:"--use_local",props:{style:{color:"#79C0FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,i.jsxs)(t.p,{children:["For more information, see the ",(0,i.jsx)(t.a,{href:"https://www.comet.com/docs/opik/tracing/sdk_configuration",children:"Opik SDK configuration documentation"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsx)(t.p,{children:"Start Langflow in the same terminal or environment where you set the environment variables:"}),"\n",(0,i.jsx)(d.Code,{codeConfig:h,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"uv ",props:{style:{color:"#FFA657"}}},{content:"run langflow run",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsx)(t.p,{children:"In Langflow, run a flow to produce activity for Opik to trace."}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsx)(t.p,{children:"Navigate to your Opik project dashboard and view the collected tracing data."}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(t.h2,{id:"disable-the-opik-integration",children:"Disable the Opik integration"}),"\n",(0,i.jsxs)(t.p,{children:["To disable the Opik integration, remove the environment variables you set with ",(0,i.jsx)(t.code,{children:"opik configure"}),", and then restart Langflow."]})]})}function g(e={}){const{wrapper:t}={...(0,r.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(u,{...e})}):u(e)}function f(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},28453:(e,t,n)=>{n.d(t,{R:()=>a,x:()=>c});var o=n(96540);const i={},r=o.createContext(i);function a(e){const t=o.useContext(r);return o.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function c(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(i):e.components||i:a(e.components),o.createElement(r.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e627b1b2.9fcb9075.js b/assets/js/e627b1b2.9fcb9075.js deleted file mode 100644 index 3cdf4bfd9a..0000000000 --- a/assets/js/e627b1b2.9fcb9075.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[5352],{11470:(e,t,n)=>{n.d(t,{A:()=>y});var o=n(96540),r=n(18215),a=n(23104),i=n(56347),s=n(205),l=n(57485),c=n(31682),u=n(70679);function d(e){return o.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,o.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:n}=e;return(0,o.useMemo)(()=>{const e=t??function(e){return d(e).map(({props:{value:e,label:t,attributes:n,default:o}})=>({value:e,label:t,attributes:n,default:o}))}(n);return function(e){const t=(0,c.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,n])}function p({value:e,tabValues:t}){return t.some(t=>t.value===e)}function f({queryString:e=!1,groupId:t}){const n=(0,i.W6)(),r=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,l.aZ)(r),(0,o.useCallback)(e=>{if(!r)return;const t=new URLSearchParams(n.location.search);t.set(r,e),n.replace({...n.location,search:t.toString()})},[r,n])]}function g(e){const{defaultValue:t,queryString:n=!1,groupId:r}=e,a=h(e),[i,l]=(0,o.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(!p({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 n=t.find(e=>e.default)??t[0];if(!n)throw new Error("Unexpected error: 0 tabValues");return n.value}({defaultValue:t,tabValues:a})),[c,d]=f({queryString:n,groupId:r}),[g,m]=function({groupId:e}){const t=function(e){return e?`docusaurus.tab.${e}`:null}(e),[n,r]=(0,u.Dv)(t);return[n,(0,o.useCallback)(e=>{t&&r.set(e)},[t,r])]}({groupId:r}),b=(()=>{const e=c??g;return p({value:e,tabValues:a})?e:null})();(0,s.A)(()=>{b&&l(b)},[b]);return{selectedValue:i,selectValue:(0,o.useCallback)(e=>{if(!p({value:e,tabValues:a}))throw new Error(`Can't select invalid tab value=${e}`);l(e),d(e),m(e)},[d,m,a]),tabValues:a}}var m=n(92303);const b={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var k=n(74848);function v({className:e,block:t,selectedValue:n,selectValue:o,tabValues:i}){const s=[],{blockElementScrollPositionUntilNextRender:l}=(0,a.a_)(),c=e=>{const t=e.currentTarget,r=s.indexOf(t),a=i[r].value;a!==n&&(l(t),o(a))},u=e=>{let t=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const n=s.indexOf(e.currentTarget)+1;t=s[n]??s[0];break}case"ArrowLeft":{const n=s.indexOf(e.currentTarget)-1;t=s[n]??s[s.length-1];break}}t?.focus()};return(0,k.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":t},e),children:i.map(({value:e,label:t,attributes:o})=>(0,k.jsx)("li",{role:"tab",tabIndex:n===e?0:-1,"aria-selected":n===e,ref:e=>{s.push(e)},onKeyDown:u,onClick:c,...o,className:(0,r.A)("tabs__item",b.tabItem,o?.className,{"tabs__item--active":n===e}),children:t??e},e))})}function w({lazy:e,children:t,selectedValue:n}){const a=(Array.isArray(t)?t:[t]).filter(Boolean);if(e){const e=a.find(e=>e.props.value===n);return e?(0,o.cloneElement)(e,{className:(0,r.A)("margin-top--md",e.props.className)}):null}return(0,k.jsx)("div",{className:"margin-top--md",children:a.map((e,t)=>(0,o.cloneElement)(e,{key:t,hidden:e.props.value!==n}))})}function x(e){const t=g(e);return(0,k.jsxs)("div",{className:(0,r.A)("tabs-container",b.tabList),children:[(0,k.jsx)(v,{...t,...e}),(0,k.jsx)(w,{...t,...e})]})}function y(e){const t=(0,m.A)();return(0,k.jsx)(x,{...e,children:d(e.children)},String(t))}},19365:(e,t,n)=>{n.d(t,{A:()=>i});n(96540);var o=n(18215);const r={tabItem:"tabItem_Ymn6"};var a=n(74848);function i({children:e,hidden:t,className:n}){return(0,a.jsx)("div",{role:"tabpanel",className:(0,o.A)(r.tabItem,n),hidden:t,children:e})}},20267:(e,t,n)=>{n.r(t),n.d(t,{CH:()=>u,assets:()=>c,chCodeConfig:()=>d,contentTitle:()=>l,default:()=>f,frontMatter:()=>s,metadata:()=>o,toc:()=>h});const o=JSON.parse('{"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.","source":"@site/docs/Integrations/integrations-opik.mdx","sourceDirName":"Integrations","slug":"/integrations-opik","permalink":"/integrations-opik","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Opik","slug":"/integrations-opik"},"sidebar":"docs","previous":{"title":"LangWatch","permalink":"/integrations-langwatch"},"next":{"title":"Telemetry","permalink":"/contributing-telemetry"}}');var r=n(74848),a=n(28453),i=n(24754);n(11470),n(19365);const s={title:"Opik",slug:"/integrations-opik"},l=void 0,c={},u={annotations:i.hk,Code:i.Cy},d={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},h=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Integrate Opik with Langflow",id:"integrate-opik-with-langflow",level:2},{value:"Disable the Opik integration",id:"disable-the-opik-integration",level:2}];function p(e){const t={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",ul:"ul",...(0,a.R)(),...e.components};return u||g("CH",!1),u.Code||g("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)(t.p,{children:[(0,r.jsx)(t.a,{href:"https://www.comet.com/site/products/opik/",children:"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."]}),"\n",(0,r.jsxs)(t.p,{children:["You can configure Langflow to collect ",(0,r.jsx)(t.a,{href:"https://www.comet.com/docs/opik/tracing/log_traces",children:"tracing"})," data about your flow executions and automatically send the data to Opik."]}),"\n",(0,r.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,r.jsxs)(t.ul,{children:["\n",(0,r.jsxs)(t.li,{children:["An ",(0,r.jsx)(t.a,{href:"https://www.comet.com/docs/opik/faq#what-is-the-difference-between-opik-cloud-and-the-open-source-opik-platform-",children:"Open-Source Opik server or an Opik Cloud account"})]}),"\n",(0,r.jsxs)(t.li,{children:["A ",(0,r.jsx)(t.a,{href:"/get-started-installation",children:"running Langflow server"})," with a ",(0,r.jsx)(t.a,{href:"/concepts-flows",children:"flow"})," that you want to trace"]}),"\n"]}),"\n",(0,r.jsx)(t.admonition,{type:"tip",children:(0,r.jsxs)(t.p,{children:["If you need a flow to test the Opik integration, see the ",(0,r.jsx)(t.a,{href:"/get-started-quickstart",children:"Langflow quickstart"}),"."]})}),"\n",(0,r.jsx)(t.h2,{id:"integrate-opik-with-langflow",children:"Integrate Opik with Langflow"}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["If you use Opik Cloud, get an ",(0,r.jsx)(t.a,{href:"https://www.comet.com/docs/opik/faq#where-can-i-find-my-opik-api-key-",children:"Opik API key"}),"."]}),"\n",(0,r.jsx)(t.p,{children:"An API key isn't required with an Open-Source Opik server."}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Call the ",(0,r.jsx)(t.code,{children:"opik configure"})," CLI to save your Opik configuration in the same environment where you run Langflow:"]}),"\n",(0,r.jsx)(u.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"opik ",props:{style:{color:"#FFA657"}}},{content:"configure",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,r.jsx)(t.p,{children:"For self-hosted Opik, you can also use the following Opik CLI command:"}),"\n",(0,r.jsx)(u.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"opik ",props:{style:{color:"#FFA657"}}},{content:"configure ",props:{style:{color:"#A5D6FF"}}},{content:"--use_local",props:{style:{color:"#79C0FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,r.jsxs)(t.p,{children:["For more information, see the ",(0,r.jsx)(t.a,{href:"https://www.comet.com/docs/opik/tracing/sdk_configuration",children:"Opik SDK configuration documentation"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsx)(t.p,{children:"Start Langflow in the same terminal or environment where you set the environment variables:"}),"\n",(0,r.jsx)(u.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"uv ",props:{style:{color:"#FFA657"}}},{content:"run langflow run",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsx)(t.p,{children:"In Langflow, run a flow to produce activity for Opik to trace."}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsx)(t.p,{children:"Navigate to your Opik project dashboard and view the collected tracing data."}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(t.h2,{id:"disable-the-opik-integration",children:"Disable the Opik integration"}),"\n",(0,r.jsxs)(t.p,{children:["To disable the Opik integration, remove the environment variables you set with ",(0,r.jsx)(t.code,{children:"opik configure"}),", and then restart Langflow."]})]})}function f(e={}){const{wrapper:t}={...(0,a.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(p,{...e})}):p(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.")}},28453:(e,t,n)=>{n.d(t,{R:()=>i,x:()=>s});var o=n(96540);const r={},a=o.createContext(r);function i(e){const t=o.useContext(a);return o.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function s(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:i(e.components),o.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/e6c6a4d2.84fae6c2.js b/assets/js/e6c6a4d2.cabc981f.js similarity index 55% rename from assets/js/e6c6a4d2.84fae6c2.js rename to assets/js/e6c6a4d2.cabc981f.js index 25c1cbd224..50cbe21909 100644 --- a/assets/js/e6c6a4d2.84fae6c2.js +++ b/assets/js/e6c6a4d2.cabc981f.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.1"},"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__\\": \\"\\"\\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.1"},"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 \\"velit_29\\": \\"\\"\\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/e82d58ff.1237f227.js b/assets/js/e82d58ff.41285f40.js similarity index 98% rename from assets/js/e82d58ff.1237f227.js rename to assets/js/e82d58ff.41285f40.js index 1ef8476701..6c083c2c78 100644 --- a/assets/js/e82d58ff.1237f227.js +++ b/assets/js/e82d58ff.41285f40.js @@ -1 +1 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[5657],{17835:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/assemblyai-components-b88c7c97e04114bf658898f7fc633e23.png"},17886:(e,n,s)=>{s.d(n,{A:()=>l});s(96540);var t=s(64058),i=s(74848);function l({name:e,...n}){const s=t[e];return s?(0,i.jsx)(s,{...n}):null}},28618:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/files/AssemblyAI_Flow-368be24ae9542f0b8b5253cc9d97b42f.json"},91044:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>p,frontMatter:()=>o,metadata:()=>t,toc:()=>h});const t=JSON.parse('{"id":"Integrations/integrations-assemblyai","title":"AssemblyAI","description":"The AssemblyAI components allow you to apply powerful Speech AI models to your app for tasks like:","source":"@site/docs/Integrations/integrations-assemblyai.mdx","sourceDirName":"Integrations","slug":"/integrations-assemblyai","permalink":"/integrations-assemblyai","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"AssemblyAI","slug":"/integrations-assemblyai"},"sidebar":"docs","previous":{"title":"arXiv","permalink":"/bundles-arxiv"},"next":{"title":"Azure","permalink":"/bundles-azure"}}');var i=s(74848),l=s(28453),r=s(17886);const o={title:"AssemblyAI",slug:"/integrations-assemblyai"},a=void 0,c={},h=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Components",id:"components",level:2},{value:"AssemblyAI Start Transcript",id:"assemblyai-start-transcript",level:3},{value:"AssemblyAI Poll Transcript",id:"assemblyai-poll-transcript",level:3},{value:"AssemblyAI Get Subtitles",id:"assemblyai-get-subtitles",level:3},{value:"AssemblyAI LeMUR",id:"assemblyai-lemur",level:3},{value:"AssemblyAI List Transcripts",id:"assemblyai-list-transcripts",level:3},{value:"Flow Process",id:"flow-process",level:2},{value:"Run the Transcription and Speech AI Flow",id:"run-the-transcription-and-speech-ai-flow",level:2},{value:"Customization",id:"customization",level:2},{value:"Troubleshooting",id:"troubleshooting",level:2}];function d(e){const n={a:"a",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,l.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"The AssemblyAI components allow you to apply powerful Speech AI models to your app for tasks like:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Transcribing audio and video files"}),"\n",(0,i.jsx)(n.li,{children:"Formatting transcripts"}),"\n",(0,i.jsx)(n.li,{children:"Generating subtitles"}),"\n",(0,i.jsx)(n.li,{children:"Applying LLMs to audio files"}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["For more information about AssemblyAI features and functionality used by AssemblyAI components, see the ",(0,i.jsx)(n.a,{href:"https://www.assemblyai.com/docs",children:"AssemblyAI API Docs"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["An ",(0,i.jsx)(n.a,{href:"https://www.assemblyai.com/dashboard/signup",children:"AssemblyAI account"})," and an AssemblyAI API key."]}),"\n",(0,i.jsxs)(n.p,{children:["Enter the key in the ",(0,i.jsx)(n.em,{children:"AssemblyAI API Key"})," field in all Langflow components that require the AssemblyAI key."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Optional: To use LeMUR, you need a paid AssemblyAI account because LeMUR isn't included in the free account."}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"components",children:"Components"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"AssemblyAI components",src:s(17835).A+"",width:"1494",height:"1048"})}),"\n",(0,i.jsx)(n.h3,{id:"assemblyai-start-transcript",children:"AssemblyAI Start Transcript"}),"\n",(0,i.jsx)(n.p,{children:"This component allows you to submit an audio or video file for transcription."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Tip"}),": You can freeze the path of this component to only submit the file once."]}),"\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.strong,{children:"Input"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"AssemblyAI API Key: Your API key."}),"\n",(0,i.jsx)(n.li,{children:"Audio File: The audio or video file to transcribe."}),"\n",(0,i.jsxs)(n.li,{children:["Speech Model (Optional): Select the class of models. Default is ",(0,i.jsx)(n.em,{children:"Best"}),". See ",(0,i.jsx)(n.a,{href:"https://www.assemblyai.com/docs/speech-to-text/speech-recognition#select-the-speech-model-with-best-and-nano",children:"speech models"})," for more info."]}),"\n",(0,i.jsx)(n.li,{children:"Automatic Language Detection (Optional): Enable automatic language detection."}),"\n",(0,i.jsxs)(n.li,{children:["Language (Optional): The language of the audio file. Can be set manually if automatic language detection is disabled.\nSee ",(0,i.jsx)(n.a,{href:"https://www.assemblyai.com/docs/getting-started/supported-languages",children:"supported languages"})," for a list of supported language codes."]}),"\n",(0,i.jsx)(n.li,{children:"Enable Speaker Labels (Optional): Detect speakers in an audio file and what each speaker said."}),"\n",(0,i.jsx)(n.li,{children:"Expected Number of Speakers (Optional): Set the expected number of speakers, if Speaker Labels is enabled."}),"\n",(0,i.jsxs)(n.li,{children:["Audio File URL (Optional): The URL of the audio or video file to transcribe. Can be used instead of ",(0,i.jsx)(n.em,{children:"Audio File"}),"."]}),"\n",(0,i.jsx)(n.li,{children:"Punctuate (Optional): Apply punctuation. Default is true."}),"\n",(0,i.jsx)(n.li,{children:"Format Text (Optional): Apply casing and text formatting. Default is true."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Output"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Transcript ID: The id of the transcript"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"assemblyai-poll-transcript",children:"AssemblyAI Poll Transcript"}),"\n",(0,i.jsx)(n.p,{children:"This components allows you to poll the transcripts. It checks the status of the transcript every few seconds until the transcription is completed."}),"\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.strong,{children:"Input"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"AssemblyAI API Key: Your API key."}),"\n",(0,i.jsx)(n.li,{children:"Polling Interval (Optional): The polling interval in seconds. Default is 3."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Output"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Transcription Result: The AssemblyAI JSON response of a completed transcript. Contains the text and other info."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"assemblyai-get-subtitles",children:"AssemblyAI Get Subtitles"}),"\n",(0,i.jsx)(n.p,{children:"This component allows you to generate subtitles in SRT or VTT format."}),"\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.strong,{children:"Input"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"AssemblyAI API Key: Your API key."}),"\n",(0,i.jsxs)(n.li,{children:["Transcription Result: The output of the ",(0,i.jsx)(n.strong,{children:"Poll Transcript"})," component."]}),"\n",(0,i.jsx)(n.li,{children:"Subtitle Format: The format of the captions (SRT or VTT)."}),"\n",(0,i.jsx)(n.li,{children:"Character per Caption (Optional): The maximum number of characters per caption (0 for no limit)."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Output"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Subtitles: A JSON response with the ",(0,i.jsx)(n.code,{children:"subtitles"})," field containing the captions in SRT or VTT format."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"assemblyai-lemur",children:"AssemblyAI LeMUR"}),"\n",(0,i.jsxs)(n.p,{children:["This component allows you to apply Large Language Models to spoken data using the ",(0,i.jsx)(n.a,{href:"https://www.assemblyai.com/docs/lemur",children:"AssemblyAI LeMUR framework"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"LeMUR automatically ingests the transcript as additional context, making it easy to apply LLMs to audio data. You can use it for tasks like summarizing audio, extracting insights, or asking questions."}),"\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.strong,{children:"Input"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"AssemblyAI API Key: Your API key."}),"\n",(0,i.jsxs)(n.li,{children:["Transcription Result: The output of the ",(0,i.jsx)(n.strong,{children:"Poll Transcript"})," component."]}),"\n",(0,i.jsxs)(n.li,{children:["Input Prompt: The text to prompt the model. You can type your prompt in this field or connect it to a ",(0,i.jsx)(n.strong,{children:"Prompt Template"})," component."]}),"\n",(0,i.jsx)(n.li,{children:"Final Model: The model that is used for the final prompt after compression is performed. Default is Claude 3.5 Sonnet."}),"\n",(0,i.jsx)(n.li,{children:"Temperature (Optional): The temperature to use for the model. Default is 0.0."}),"\n",(0,i.jsx)(n.li,{children:"Max Output Size (Optional): Max output size in tokens, up to 4000. Default is 2000."}),"\n",(0,i.jsxs)(n.li,{children:['Endpoint (Optional): The LeMUR endpoint to use. Default is "task". For "summary" and "question-answer", no prompt input is needed. See ',(0,i.jsx)(n.a,{href:"https://www.assemblyai.com/docs/api-reference/lemur/",children:"LeMUR API docs"})," for more info."]}),"\n",(0,i.jsxs)(n.li,{children:["Questions (Optional): Comma-separated list of your questions. Only used if ",(0,i.jsx)(n.em,{children:"Endpoint"}),' is "question-answer".']}),"\n",(0,i.jsxs)(n.li,{children:["Transcript IDs (Optional): Comma-separated list of transcript IDs. LeMUR can perform actions over multiple transcripts. If provided, the ",(0,i.jsx)(n.em,{children:"Transcription Result"})," is ignored."]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Output"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"LeMUR Response: The generated LLM response."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"assemblyai-list-transcripts",children:"AssemblyAI List Transcripts"}),"\n",(0,i.jsx)(n.p,{children:"This component can be used as a standalone component to list all previously generated transcripts."}),"\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.strong,{children:"Input"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"AssemblyAI API Key: Your API key."}),"\n",(0,i.jsx)(n.li,{children:"Limit (Optional): Maximum number of transcripts to retrieve. Default is 20, use 0 for all."}),"\n",(0,i.jsx)(n.li,{children:"Filter (Optional): Filter by transcript status."}),"\n",(0,i.jsx)(n.li,{children:"Created On (Optional): Only get transcripts created on this date (YYYY-MM-DD)."}),"\n",(0,i.jsx)(n.li,{children:"Throttled Only (Optional): Only get throttled transcripts, overrides the status filter"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Output"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Transcript List: A list of all transcripts with info such as the transcript ID, the status, and the data."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"flow-process",children:"Flow Process"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"The user inputs an audio or video file."}),"\n",(0,i.jsx)(n.li,{children:"The user can also input an LLM prompt. In this example, we want to generate a summary of the transcript."}),"\n",(0,i.jsx)(n.li,{children:"The flow submits the audio file for transcription."}),"\n",(0,i.jsx)(n.li,{children:"The flow checks the status of the transcript every few seconds until transcription is completed."}),"\n",(0,i.jsx)(n.li,{children:"The flow parses the transcription result and outputs the transcribed text."}),"\n",(0,i.jsx)(n.li,{children:"The flow also generates subtitles."}),"\n",(0,i.jsx)(n.li,{children:"The flow applies the LLM prompt to generate a summary."}),"\n",(0,i.jsx)(n.li,{children:"As a standalone component, all transcripts can be listed."}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"run-the-transcription-and-speech-ai-flow",children:"Run the Transcription and Speech AI Flow"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Build the flow manually or import a pre-build JSON file:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Recommended: ",(0,i.jsx)(n.a,{target:"_blank","data-noBrokenLinkCheck":!0,href:s(28618).A+"",children:"Download the AssemblyAI Transcription and Speech AI flow JSON"}),", and then ",(0,i.jsx)(n.a,{href:"/concepts-flows-import",children:"import the flow"})," into Langflow."]}),"\n",(0,i.jsx)(n.li,{children:"Create a blank flow, and then add the previously described components to your flow, connecting them as shown in the flow diagram."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Input your AssemblyAI API key in all components that require the key (",(0,i.jsx)(n.strong,{children:"Start Transcript"}),", ",(0,i.jsx)(n.strong,{children:"Poll Transcript"}),", ",(0,i.jsx)(n.strong,{children:"Get Subtitles"}),", ",(0,i.jsx)(n.strong,{children:"LeMUR"}),", ",(0,i.jsx)(n.strong,{children:"List Transcripts"}),")."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Select an audio or video file for the ",(0,i.jsx)(n.strong,{children:"Start Transcript"})," component."]}),"\n",(0,i.jsxs)(n.p,{children:["Optional: After adding a file to the ",(0,i.jsx)(n.strong,{children:"Start Transcript"})," component, run and ",(0,i.jsx)(n.a,{href:"/concepts-components#freeze-a-component",children:"freeze the component"})," so you only submit the file once, no matter how many times you run the flow.\nTo do this, click ",(0,i.jsx)(r.A,{name:"Play","aria-hidden":"True"})," ",(0,i.jsx)(n.strong,{children:"Run component"})," to preload the file, and then click ",(0,i.jsx)(r.A,{name:"Ellipsis","aria-hidden":"true"})," ",(0,i.jsx)(n.strong,{children:"Show More"})," and select ",(0,i.jsx)(n.strong,{children:"Freeze"})," to lock the result.\nSubsequent flow runs use the frozen component's cached output."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Test the transcription by clicking ",(0,i.jsx)(r.A,{name:"Play","aria-hidden":"True"})," ",(0,i.jsx)(n.strong,{children:"Run component"})," on the ",(0,i.jsx)(n.strong,{children:"Parser"})," component. Make sure that the specified template is ",(0,i.jsx)(n.code,{children:"{text}"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["Running one component runs all upstream components as well as the selected component and then stops the flow run.\nIn this case, the ",(0,i.jsx)(n.strong,{children:"Start Transcript"})," and ",(0,i.jsx)(n.strong,{children:"Poll Transcript"})," components are upstream from the ",(0,i.jsx)(n.strong,{children:"Parser"})," component.\nIf you froze the ",(0,i.jsx)(n.strong,{children:"Start Transcript"})," component, the flow sends the cached output from ",(0,i.jsx)(n.strong,{children:"Start Transcript"}),", runs the ",(0,i.jsx)(n.strong,{children:"Poll Transcript"})," component, to get the transcription result.\nCheck the flow logs or inspect the output of the ",(0,i.jsx)(n.strong,{children:"Parser"})," component to see the transcribed text result."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["To generate subtitles and run the full flow, click ",(0,i.jsx)(r.A,{name:"Play","aria-hidden":"True"})," ",(0,i.jsx)(n.strong,{children:"Run component"})," on the ",(0,i.jsx)(n.strong,{children:"List Transcript"})," component."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"customization",children:"Customization"}),"\n",(0,i.jsx)(n.p,{children:"The flow can be customized by:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["Modifying the parameters in the ",(0,i.jsx)(n.strong,{children:"Start Transcript"})," component."]}),"\n",(0,i.jsxs)(n.li,{children:["Modifying the subtitle format in the ",(0,i.jsx)(n.strong,{children:"Get Subtitles"})," component."]}),"\n",(0,i.jsxs)(n.li,{children:["Modifying the LLM prompt for input of the ",(0,i.jsx)(n.strong,{children:"LeMUR"})," component."]}),"\n",(0,i.jsxs)(n.li,{children:["Modifying the LLM parameters (e.g., temperature) in the ",(0,i.jsx)(n.strong,{children:"LeMUR"})," component."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"troubleshooting",children:"Troubleshooting"}),"\n",(0,i.jsx)(n.p,{children:"If you encounter issues:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Ensure the API key is correctly set in all components that require the key."}),"\n",(0,i.jsx)(n.li,{children:"To use LeMUR, you need to upgrade your AssemblyAI account, since this isn't included in the free account."}),"\n",(0,i.jsx)(n.li,{children:"Verify that all components are properly connected in the flow."}),"\n",(0,i.jsx)(n.li,{children:"Review the Langflow logs for any error messages."}),"\n",(0,i.jsxs)(n.li,{children:["Check the ",(0,i.jsx)(n.a,{href:"https://www.assemblyai.com/docs/",children:"AssemblyAI API documentation"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["Contact ",(0,i.jsx)(n.a,{href:"https://www.assemblyai.com/contact/support",children:"AssemblyAI support"}),"."]}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,l.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}}}]); \ No newline at end of file +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[5657],{17835:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/images/assemblyai-components-b88c7c97e04114bf658898f7fc633e23.png"},17886:(e,n,s)=>{s.d(n,{A:()=>l});s(96540);var t=s(64058),i=s(74848);function l({name:e,...n}){const s=t[e];return s?(0,i.jsx)(s,{...n}):null}},28618:(e,n,s)=>{s.d(n,{A:()=>t});const t=s.p+"assets/files/AssemblyAI_Flow-368be24ae9542f0b8b5253cc9d97b42f.json"},91044:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>p,frontMatter:()=>o,metadata:()=>t,toc:()=>h});const t=JSON.parse('{"id":"Integrations/integrations-assemblyai","title":"AssemblyAI","description":"The AssemblyAI components allow you to apply powerful Speech AI models to your app for tasks like:","source":"@site/docs/Integrations/integrations-assemblyai.mdx","sourceDirName":"Integrations","slug":"/integrations-assemblyai","permalink":"/integrations-assemblyai","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"AssemblyAI","slug":"/integrations-assemblyai"},"sidebar":"docs","previous":{"title":"arXiv","permalink":"/bundles-arxiv"},"next":{"title":"Azure","permalink":"/bundles-azure"}}');var i=s(74848),l=s(28453),r=s(17886);const o={title:"AssemblyAI",slug:"/integrations-assemblyai"},a=void 0,c={},h=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Components",id:"components",level:2},{value:"AssemblyAI Start Transcript",id:"assemblyai-start-transcript",level:3},{value:"AssemblyAI Poll Transcript",id:"assemblyai-poll-transcript",level:3},{value:"AssemblyAI Get Subtitles",id:"assemblyai-get-subtitles",level:3},{value:"AssemblyAI LeMUR",id:"assemblyai-lemur",level:3},{value:"AssemblyAI List Transcripts",id:"assemblyai-list-transcripts",level:3},{value:"Flow Process",id:"flow-process",level:2},{value:"Run the Transcription and Speech AI Flow",id:"run-the-transcription-and-speech-ai-flow",level:2},{value:"Customization",id:"customization",level:2},{value:"Troubleshooting",id:"troubleshooting",level:2}];function d(e){const n={a:"a",code:"code",em:"em",h2:"h2",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,l.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(n.p,{children:"The AssemblyAI components allow you to apply powerful Speech AI models to your app for tasks like:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Transcribing audio and video files"}),"\n",(0,i.jsx)(n.li,{children:"Formatting transcripts"}),"\n",(0,i.jsx)(n.li,{children:"Generating subtitles"}),"\n",(0,i.jsx)(n.li,{children:"Applying LLMs to audio files"}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["For more information about AssemblyAI features and functionality used by AssemblyAI components, see the ",(0,i.jsx)(n.a,{href:"https://www.assemblyai.com/docs",children:"AssemblyAI API Docs"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["An ",(0,i.jsx)(n.a,{href:"https://www.assemblyai.com/dashboard/signup",children:"AssemblyAI account"})," and an AssemblyAI API key."]}),"\n",(0,i.jsxs)(n.p,{children:["Enter the key in the ",(0,i.jsx)(n.em,{children:"AssemblyAI API Key"})," field in all Langflow components that require the AssemblyAI key."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Optional: To use LeMUR, you need a paid AssemblyAI account because LeMUR isn't included in the free account."}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"components",children:"Components"}),"\n",(0,i.jsx)(n.p,{children:(0,i.jsx)(n.img,{alt:"AssemblyAI components",src:s(17835).A+"",width:"1494",height:"1048"})}),"\n",(0,i.jsx)(n.h3,{id:"assemblyai-start-transcript",children:"AssemblyAI Start Transcript"}),"\n",(0,i.jsx)(n.p,{children:"This component allows you to submit an audio or video file for transcription."}),"\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Tip"}),": You can freeze the path of this component to only submit the file once."]}),"\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.strong,{children:"Input"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"AssemblyAI API Key: Your API key."}),"\n",(0,i.jsx)(n.li,{children:"Audio File: The audio or video file to transcribe."}),"\n",(0,i.jsxs)(n.li,{children:["Speech Model (Optional): Select the class of models. Default is ",(0,i.jsx)(n.em,{children:"Best"}),". See ",(0,i.jsx)(n.a,{href:"https://www.assemblyai.com/docs/speech-to-text/speech-recognition#select-the-speech-model-with-best-and-nano",children:"speech models"})," for more info."]}),"\n",(0,i.jsx)(n.li,{children:"Automatic Language Detection (Optional): Enable automatic language detection."}),"\n",(0,i.jsxs)(n.li,{children:["Language (Optional): The language of the audio file. Can be set manually if automatic language detection is disabled.\nSee ",(0,i.jsx)(n.a,{href:"https://www.assemblyai.com/docs/getting-started/supported-languages",children:"supported languages"})," for a list of supported language codes."]}),"\n",(0,i.jsx)(n.li,{children:"Enable Speaker Labels (Optional): Detect speakers in an audio file and what each speaker said."}),"\n",(0,i.jsx)(n.li,{children:"Expected Number of Speakers (Optional): Set the expected number of speakers, if Speaker Labels is enabled."}),"\n",(0,i.jsxs)(n.li,{children:["Audio File URL (Optional): The URL of the audio or video file to transcribe. Can be used instead of ",(0,i.jsx)(n.em,{children:"Audio File"}),"."]}),"\n",(0,i.jsx)(n.li,{children:"Punctuate (Optional): Apply punctuation. Default is true."}),"\n",(0,i.jsx)(n.li,{children:"Format Text (Optional): Apply casing and text formatting. Default is true."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Output"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Transcript ID: The id of the transcript"}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"assemblyai-poll-transcript",children:"AssemblyAI Poll Transcript"}),"\n",(0,i.jsx)(n.p,{children:"This components allows you to poll the transcripts. It checks the status of the transcript every few seconds until the transcription is completed."}),"\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.strong,{children:"Input"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"AssemblyAI API Key: Your API key."}),"\n",(0,i.jsx)(n.li,{children:"Polling Interval (Optional): The polling interval in seconds. Default is 3."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Output"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Transcription Result: The AssemblyAI JSON response of a completed transcript. Contains the text and other info."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"assemblyai-get-subtitles",children:"AssemblyAI Get Subtitles"}),"\n",(0,i.jsx)(n.p,{children:"This component allows you to generate subtitles in SRT or VTT format."}),"\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.strong,{children:"Input"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"AssemblyAI API Key: Your API key."}),"\n",(0,i.jsxs)(n.li,{children:["Transcription Result: The output of the ",(0,i.jsx)(n.strong,{children:"Poll Transcript"})," component."]}),"\n",(0,i.jsx)(n.li,{children:"Subtitle Format: The format of the captions (SRT or VTT)."}),"\n",(0,i.jsx)(n.li,{children:"Character per Caption (Optional): The maximum number of characters per caption (0 for no limit)."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Output"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Subtitles: A JSON response with the ",(0,i.jsx)(n.code,{children:"subtitles"})," field containing the captions in SRT or VTT format."]}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"assemblyai-lemur",children:"AssemblyAI LeMUR"}),"\n",(0,i.jsxs)(n.p,{children:["This component allows you to apply Large Language Models to spoken data using the ",(0,i.jsx)(n.a,{href:"https://www.assemblyai.com/docs/lemur",children:"AssemblyAI LeMUR framework"}),"."]}),"\n",(0,i.jsx)(n.p,{children:"LeMUR automatically ingests the transcript as additional context, making it easy to apply LLMs to audio data. You can use it for tasks like summarizing audio, extracting insights, or asking questions."}),"\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.strong,{children:"Input"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"AssemblyAI API Key: Your API key."}),"\n",(0,i.jsxs)(n.li,{children:["Transcription Result: The output of the ",(0,i.jsx)(n.strong,{children:"Poll Transcript"})," component."]}),"\n",(0,i.jsxs)(n.li,{children:["Input Prompt: The text to prompt the model. You can type your prompt in this field or connect it to a ",(0,i.jsx)(n.strong,{children:"Prompt Template"})," component."]}),"\n",(0,i.jsx)(n.li,{children:"Final Model: The model that is used for the final prompt after compression is performed. Default is Claude 3.5 Sonnet."}),"\n",(0,i.jsx)(n.li,{children:"Temperature (Optional): The temperature to use for the model. Default is 0.0."}),"\n",(0,i.jsx)(n.li,{children:"Max Output Size (Optional): Max output size in tokens, up to 4000. Default is 2000."}),"\n",(0,i.jsxs)(n.li,{children:['Endpoint (Optional): The LeMUR endpoint to use. Default is "task". For "summary" and "question-answer", no prompt input is needed. See ',(0,i.jsx)(n.a,{href:"https://www.assemblyai.com/docs/api-reference/lemur/",children:"LeMUR API docs"})," for more info."]}),"\n",(0,i.jsxs)(n.li,{children:["Questions (Optional): Comma-separated list of your questions. Only used if ",(0,i.jsx)(n.em,{children:"Endpoint"}),' is "question-answer".']}),"\n",(0,i.jsxs)(n.li,{children:["Transcript IDs (Optional): Comma-separated list of transcript IDs. LeMUR can perform actions over multiple transcripts. If provided, the ",(0,i.jsx)(n.em,{children:"Transcription Result"})," is ignored."]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Output"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"LeMUR Response: The generated LLM response."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h3,{id:"assemblyai-list-transcripts",children:"AssemblyAI List Transcripts"}),"\n",(0,i.jsx)(n.p,{children:"This component can be used as a standalone component to list all previously generated transcripts."}),"\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.strong,{children:"Input"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"AssemblyAI API Key: Your API key."}),"\n",(0,i.jsx)(n.li,{children:"Limit (Optional): Maximum number of transcripts to retrieve. Default is 20, use 0 for all."}),"\n",(0,i.jsx)(n.li,{children:"Filter (Optional): Filter by transcript status."}),"\n",(0,i.jsx)(n.li,{children:"Created On (Optional): Only get transcripts created on this date (YYYY-MM-DD)."}),"\n",(0,i.jsx)(n.li,{children:"Throttled Only (Optional): Only get throttled transcripts, overrides the status filter"}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:[(0,i.jsx)(n.strong,{children:"Output"}),":"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsx)(n.li,{children:"Transcript List: A list of all transcripts with info such as the transcript ID, the status, and the data."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"flow-process",children:"Flow Process"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"The user inputs an audio or video file."}),"\n",(0,i.jsx)(n.li,{children:"The user can also input an LLM prompt. In this example, we want to generate a summary of the transcript."}),"\n",(0,i.jsx)(n.li,{children:"The flow submits the audio file for transcription."}),"\n",(0,i.jsx)(n.li,{children:"The flow checks the status of the transcript every few seconds until transcription is completed."}),"\n",(0,i.jsx)(n.li,{children:"The flow parses the transcription result and outputs the transcribed text."}),"\n",(0,i.jsx)(n.li,{children:"The flow also generates subtitles."}),"\n",(0,i.jsx)(n.li,{children:"The flow applies the LLM prompt to generate a summary."}),"\n",(0,i.jsx)(n.li,{children:"As a standalone component, all transcripts can be listed."}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"run-the-transcription-and-speech-ai-flow",children:"Run the Transcription and Speech AI Flow"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsx)(n.p,{children:"Build the flow manually or import a pre-build JSON file:"}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:["Recommended: ",(0,i.jsx)(n.a,{target:"_blank","data-noBrokenLinkCheck":!0,href:s(28618).A+"",children:"Download the AssemblyAI Transcription and Speech AI flow JSON"}),", and then ",(0,i.jsx)(n.a,{href:"/concepts-flows-import",children:"import the flow"})," into Langflow."]}),"\n",(0,i.jsx)(n.li,{children:"Create a blank flow, and then add the previously described components to your flow, connecting them as shown in the flow diagram."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Input your AssemblyAI API key in all components that require the key (",(0,i.jsx)(n.strong,{children:"Start Transcript"}),", ",(0,i.jsx)(n.strong,{children:"Poll Transcript"}),", ",(0,i.jsx)(n.strong,{children:"Get Subtitles"}),", ",(0,i.jsx)(n.strong,{children:"LeMUR"}),", ",(0,i.jsx)(n.strong,{children:"List Transcripts"}),")."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Select an audio or video file for the ",(0,i.jsx)(n.strong,{children:"Start Transcript"})," component."]}),"\n",(0,i.jsxs)(n.p,{children:["Optional: After adding a file to the ",(0,i.jsx)(n.strong,{children:"Start Transcript"})," component, run and ",(0,i.jsx)(n.a,{href:"/concepts-components#freeze-a-component",children:"freeze the component"})," so you only submit the file once, no matter how many times you run the flow.\nTo do this, click ",(0,i.jsx)(r.A,{name:"Play","aria-hidden":"true"})," ",(0,i.jsx)(n.strong,{children:"Run component"})," to preload the file, and then click ",(0,i.jsx)(r.A,{name:"Ellipsis","aria-hidden":"true"})," ",(0,i.jsx)(n.strong,{children:"Show More"})," and select ",(0,i.jsx)(n.strong,{children:"Freeze"})," to lock the result.\nSubsequent flow runs use the frozen component's cached output."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["Test the transcription by clicking ",(0,i.jsx)(r.A,{name:"Play","aria-hidden":"true"})," ",(0,i.jsx)(n.strong,{children:"Run component"})," on the ",(0,i.jsx)(n.strong,{children:"Parser"})," component. Make sure that the specified template is ",(0,i.jsx)(n.code,{children:"{text}"}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["Running one component runs all upstream components as well as the selected component and then stops the flow run.\nIn this case, the ",(0,i.jsx)(n.strong,{children:"Start Transcript"})," and ",(0,i.jsx)(n.strong,{children:"Poll Transcript"})," components are upstream from the ",(0,i.jsx)(n.strong,{children:"Parser"})," component.\nIf you froze the ",(0,i.jsx)(n.strong,{children:"Start Transcript"})," component, the flow sends the cached output from ",(0,i.jsx)(n.strong,{children:"Start Transcript"}),", runs the ",(0,i.jsx)(n.strong,{children:"Poll Transcript"})," component, to get the transcription result.\nCheck the flow logs or inspect the output of the ",(0,i.jsx)(n.strong,{children:"Parser"})," component to see the transcribed text result."]}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["\n",(0,i.jsxs)(n.p,{children:["To generate subtitles and run the full flow, click ",(0,i.jsx)(r.A,{name:"Play","aria-hidden":"true"})," ",(0,i.jsx)(n.strong,{children:"Run component"})," on the ",(0,i.jsx)(n.strong,{children:"List Transcript"})," component."]}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"customization",children:"Customization"}),"\n",(0,i.jsx)(n.p,{children:"The flow can be customized by:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsxs)(n.li,{children:["Modifying the parameters in the ",(0,i.jsx)(n.strong,{children:"Start Transcript"})," component."]}),"\n",(0,i.jsxs)(n.li,{children:["Modifying the subtitle format in the ",(0,i.jsx)(n.strong,{children:"Get Subtitles"})," component."]}),"\n",(0,i.jsxs)(n.li,{children:["Modifying the LLM prompt for input of the ",(0,i.jsx)(n.strong,{children:"LeMUR"})," component."]}),"\n",(0,i.jsxs)(n.li,{children:["Modifying the LLM parameters (e.g., temperature) in the ",(0,i.jsx)(n.strong,{children:"LeMUR"})," component."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"troubleshooting",children:"Troubleshooting"}),"\n",(0,i.jsx)(n.p,{children:"If you encounter issues:"}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Ensure the API key is correctly set in all components that require the key."}),"\n",(0,i.jsx)(n.li,{children:"To use LeMUR, you need to upgrade your AssemblyAI account, since this isn't included in the free account."}),"\n",(0,i.jsx)(n.li,{children:"Verify that all components are properly connected in the flow."}),"\n",(0,i.jsx)(n.li,{children:"Review the Langflow logs for any error messages."}),"\n",(0,i.jsxs)(n.li,{children:["Check the ",(0,i.jsx)(n.a,{href:"https://www.assemblyai.com/docs/",children:"AssemblyAI API documentation"}),"."]}),"\n",(0,i.jsxs)(n.li,{children:["Contact ",(0,i.jsx)(n.a,{href:"https://www.assemblyai.com/contact/support",children:"AssemblyAI support"}),"."]}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,l.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(d,{...e})}):d(e)}}}]); \ No newline at end of file diff --git a/assets/js/ec030ab7.5c14cd9a.js b/assets/js/ec030ab7.5c14cd9a.js new file mode 100644 index 0000000000..c9ed06f9cf --- /dev/null +++ b/assets/js/ec030ab7.5c14cd9a.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[1308],{28453:(o,t,e)=>{e.d(t,{R:()=>r,x:()=>l});var n=e(96540);const s={},c=n.createContext(s);function r(o){const t=n.useContext(c);return n.useMemo(function(){return"function"==typeof o?o(t):{...t,...o}},[t,o])}function l(o){let t;return t=o.disableParentContext?"function"==typeof o.components?o.components(s):o.components||s:r(o.components),n.createElement(c.Provider,{value:t},o.children)}},99340:(o,t,e)=>{e.r(t),e.d(t,{CH:()=>i,assets:()=>a,chCodeConfig:()=>F,contentTitle:()=>p,default:()=>D,frontMatter:()=>l,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"API-Reference/api-projects","title":"Projects endpoints","description":"Use the /projects endpoint to create, read, update, and delete Langflow projects.","source":"@site/docs/API-Reference/api-projects.mdx","sourceDirName":"API-Reference","slug":"/api-projects","permalink":"/api-projects","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Projects endpoints","slug":"/api-projects"},"sidebar":"docs","previous":{"title":"Files endpoints","permalink":"/api-files"},"next":{"title":"Logs endpoints","permalink":"/api-logs"}}');var s=e(74848),c=e(28453),r=e(24754);const l={title:"Projects endpoints",slug:"/api-projects"},p=void 0,a={},i={annotations:r.hk,Code:r.Cy},F={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},d=[{value:"Read projects",id:"read-projects",level:2},{value:"Create project",id:"create-project",level:2},{value:"Read project",id:"read-project",level:2},{value:"Update project",id:"update-project",level:2},{value:"Delete project",id:"delete-project",level:2},{value:"Export a project",id:"export-a-project",level:2},{value:"Import a project",id:"import-a-project",level:2}];function y(o){const t={a:"a",code:"code",h2:"h2",p:"p",...(0,c.R)(),...o.components},{Details:e}=t;return i||C("CH",!1),i.Code||C("CH.Code",!0),e||C("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",(0,s.jsxs)(t.p,{children:["Use the ",(0,s.jsx)(t.code,{children:"/projects"})," endpoint to create, read, update, and delete ",(0,s.jsx)(t.a,{href:"/concepts-flows#projects",children:"Langflow projects"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"read-projects",children:"Read projects"}),"\n",(0,s.jsx)(t.p,{children:"Get a list of Langflow projects, including project IDs, names, and descriptions."}),"\n",(0,s.jsx)(i.Code,{codeConfig:F,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/projects/" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(i.Code,{codeConfig:F,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:'"Starter Project"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "description"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Manage your own projects. Download and upload projects."',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"1415de42-8f01-4f36-bf34-539f23e47466"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "parent_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(t.h2,{id:"create-project",children:"Create project"}),"\n",(0,s.jsx)(t.p,{children:"Create a new project."}),"\n",(0,s.jsx)(i.Code,{codeConfig:F,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/projects/" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "name": "new_project_name",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "description": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "components_list": [],',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "flows_list": []',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(i.Code,{codeConfig:F,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:'"new_project_name"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "description"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"b408ddb9-6266-4431-9be8-e04a62758331"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "parent_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsxs)(t.p,{children:["To add flows and components at project creation, retrieve the ",(0,s.jsx)(t.code,{children:"components_list"})," and ",(0,s.jsx)(t.code,{children:"flows_list"})," values from the ",(0,s.jsx)(t.a,{href:"/api-reference-api-examples#get-all-components",children:(0,s.jsx)(t.code,{children:"/all"})})," and ",(0,s.jsx)(t.a,{href:"/api-flows#read-flows",children:"/flows/read"})," endpoints and add them to the request body."]}),"\n",(0,s.jsx)(t.p,{children:"Adding a flow to a project moves the flow from its previous location. The flow isn't copied."}),"\n",(0,s.jsx)(i.Code,{codeConfig:F,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/projects/" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "name": "new_project_name",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "description": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "components_list": [',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "3fa85f64-5717-4562-b3fc-2c963f66afa6"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ],",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "flows_list": [',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "3fa85f64-5717-4562-b3fc-2c963f66afa6"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ]",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsx)(t.h2,{id:"read-project",children:"Read project"}),"\n",(0,s.jsx)(t.p,{children:"Retrieve details of a specific project."}),"\n",(0,s.jsxs)(t.p,{children:["To find the UUID of your project, call the ",(0,s.jsx)(t.a,{href:"#read-projects",children:"read projects"})," endpoint."]}),"\n",(0,s.jsx)(i.Code,{codeConfig:F,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/projects/",props:{style:{color:"#A5D6FF"}}},{content:"$PROJECT_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(i.Code,{codeConfig:F,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:'"Starter Project"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "description"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Manage your own projects. Download and upload projects."',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"3fa85f64-5717-4562-b3fc-2c963f66afa6"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "parent_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(t.h2,{id:"update-project",children:"Update project"}),"\n",(0,s.jsxs)(t.p,{children:["Update the information of a specific project with a ",(0,s.jsx)(t.code,{children:"PATCH"})," request."]}),"\n",(0,s.jsx)(t.p,{children:"Each PATCH request updates the project with the values you send.\nOnly the fields you include in your request are updated.\nIf you send the same values multiple times, the update is still processed, even if the values are unchanged."}),"\n",(0,s.jsx)(i.Code,{codeConfig:F,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"PATCH ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/projects/b408ddb9-6266-4431-9be8-e04a62758331" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "name": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "description": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "parent_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "components": [',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "3fa85f64-5717-4562-b3fc-2c963f66afa6"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ],",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "flows": [',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "3fa85f64-5717-4562-b3fc-2c963f66afa6"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ]",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(i.Code,{codeConfig:F,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:'"string"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "description"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"b408ddb9-6266-4431-9be8-e04a62758331"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "parent_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(t.h2,{id:"delete-project",children:"Delete project"}),"\n",(0,s.jsx)(t.p,{children:"Delete a specific project."}),"\n",(0,s.jsx)(i.Code,{codeConfig:F,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"DELETE ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/projects/",props:{style:{color:"#A5D6FF"}}},{content:"$PROJECT_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: */*" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(i.Code,{codeConfig:F,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"204 No Content",props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n",(0,s.jsx)(t.h2,{id:"export-a-project",children:"Export a project"}),"\n",(0,s.jsx)(t.p,{children:"Download all flows from a project as a zip file."}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"--output"})," flag is optional."]}),"\n",(0,s.jsx)(i.Code,{codeConfig:F,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/projects/download/",props:{style:{color:"#A5D6FF"}}},{content:"$PROJECT_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --output ",props:{style:{color:"#79C0FF"}}},{content:"langflow-project.zip",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsx)(t.h2,{id:"import-a-project",children:"Import a project"}),"\n",(0,s.jsx)(t.p,{children:"Import a project and its flows by uploading a Langflow project zip file:"}),"\n",(0,s.jsx)(i.Code,{codeConfig:F,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/projects/upload/" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"Content-Type: multipart/form-data" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -F ",props:{style:{color:"#79C0FF"}}},{content:'"file=@20241230_135006_langflow_flows.zip;type=application/zip"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]})]})}function D(o={}){const{wrapper:t}={...(0,c.R)(),...o.components};return t?(0,s.jsx)(t,{...o,children:(0,s.jsx)(y,{...o})}):y(o)}function C(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/ec030ab7.788cb4bd.js b/assets/js/ec030ab7.788cb4bd.js deleted file mode 100644 index 9ddd813a97..0000000000 --- a/assets/js/ec030ab7.788cb4bd.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[1308],{11470:(o,t,e)=>{e.d(t,{A:()=>g});var n=e(96540),s=e(18215),r=e(23104),c=e(56347),l=e(205),p=e(57485),a=e(31682),i=e(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:t}=o;return!!t&&"object"==typeof t&&"value"in t}(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 F(o){const{values:t,children:e}=o;return(0,n.useMemo)(()=>{const o=t??function(o){return d(o).map(({props:{value:o,label:t,attributes:e,default:n}})=>({value:o,label:t,attributes:e,default:n}))}(e);return function(o){const t=(0,a.XI)(o,(o,t)=>o.value===t.value);if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map(o=>o.value).join(", ")}" found in . Every value needs to be unique.`)}(o),o},[t,e])}function u({value:o,tabValues:t}){return t.some(t=>t.value===o)}function y({queryString:o=!1,groupId:t}){const e=(0,c.W6)(),s=function({queryString:o=!1,groupId:t}){if("string"==typeof o)return o;if(!1===o)return null;if(!0===o&&!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:o,groupId:t});return[(0,p.aZ)(s),(0,n.useCallback)(o=>{if(!s)return;const t=new URLSearchParams(e.location.search);t.set(s,o),e.replace({...e.location,search:t.toString()})},[s,e])]}function D(o){const{defaultValue:t,queryString:e=!1,groupId:s}=o,r=F(o),[c,p]=(0,n.useState)(()=>function({defaultValue:o,tabValues:t}){if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(o){if(!u({value:o,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${o}" but none of its children has the corresponding value. Available values are: ${t.map(o=>o.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return o}const e=t.find(o=>o.default)??t[0];if(!e)throw new Error("Unexpected error: 0 tabValues");return e.value}({defaultValue:t,tabValues:r})),[a,d]=y({queryString:e,groupId:s}),[D,h]=function({groupId:o}){const t=function(o){return o?`docusaurus.tab.${o}`:null}(o),[e,s]=(0,i.Dv)(t);return[e,(0,n.useCallback)(o=>{t&&s.set(o)},[t,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),h(o)},[d,h,r]),tabValues:r}}var h=e(92303);const f={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var C=e(74848);function j({className:o,block:t,selectedValue:e,selectValue:n,tabValues:c}){const l=[],{blockElementScrollPositionUntilNextRender:p}=(0,r.a_)(),a=o=>{const t=o.currentTarget,s=l.indexOf(t),r=c[s].value;r!==e&&(p(t),n(r))},i=o=>{let t=null;switch(o.key){case"Enter":a(o);break;case"ArrowRight":{const e=l.indexOf(o.currentTarget)+1;t=l[e]??l[0];break}case"ArrowLeft":{const e=l.indexOf(o.currentTarget)-1;t=l[e]??l[l.length-1];break}}t?.focus()};return(0,C.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,s.A)("tabs",{"tabs--block":t},o),children:c.map(({value:o,label:t,attributes:n})=>(0,C.jsx)("li",{role:"tab",tabIndex:e===o?0:-1,"aria-selected":e===o,ref:o=>{l.push(o)},onKeyDown:i,onClick:a,...n,className:(0,s.A)("tabs__item",f.tabItem,n?.className,{"tabs__item--active":e===o}),children:t??o},o))})}function A({lazy:o,children:t,selectedValue:e}){const r=(Array.isArray(t)?t:[t]).filter(Boolean);if(o){const o=r.find(o=>o.props.value===e);return o?(0,n.cloneElement)(o,{className:(0,s.A)("margin-top--md",o.props.className)}):null}return(0,C.jsx)("div",{className:"margin-top--md",children:r.map((o,t)=>(0,n.cloneElement)(o,{key:t,hidden:o.props.value!==e}))})}function k(o){const t=D(o);return(0,C.jsxs)("div",{className:(0,s.A)("tabs-container",f.tabList),children:[(0,C.jsx)(j,{...t,...o}),(0,C.jsx)(A,{...t,...o})]})}function g(o){const t=(0,h.A)();return(0,C.jsx)(k,{...o,children:d(o.children)},String(t))}},19365:(o,t,e)=>{e.d(t,{A:()=>c});e(96540);var n=e(18215);const s={tabItem:"tabItem_Ymn6"};var r=e(74848);function c({children:o,hidden:t,className:e}){return(0,r.jsx)("div",{role:"tabpanel",className:(0,n.A)(s.tabItem,e),hidden:t,children:o})}},28453:(o,t,e)=>{e.d(t,{R:()=>c,x:()=>l});var n=e(96540);const s={},r=n.createContext(s);function c(o){const t=n.useContext(r);return n.useMemo(function(){return"function"==typeof o?o(t):{...t,...o}},[t,o])}function l(o){let t;return t=o.disableParentContext?"function"==typeof o.components?o.components(s):o.components||s:c(o.components),n.createElement(r.Provider,{value:t},o.children)}},99340:(o,t,e)=>{e.r(t),e.d(t,{CH:()=>i,assets:()=>a,chCodeConfig:()=>d,contentTitle:()=>p,default:()=>y,frontMatter:()=>l,metadata:()=>n,toc:()=>F});const n=JSON.parse('{"id":"API-Reference/api-projects","title":"Projects endpoints","description":"Use the /projects endpoint to create, read, update, and delete Langflow projects.","source":"@site/docs/API-Reference/api-projects.mdx","sourceDirName":"API-Reference","slug":"/api-projects","permalink":"/api-projects","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Projects endpoints","slug":"/api-projects"},"sidebar":"docs","previous":{"title":"Files endpoints","permalink":"/api-files"},"next":{"title":"Logs endpoints","permalink":"/api-logs"}}');var s=e(74848),r=e(28453),c=e(24754);e(11470),e(19365);const l={title:"Projects endpoints",slug:"/api-projects"},p=void 0,a={},i={annotations:c.hk,Code:c.Cy},d={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},F=[{value:"Read projects",id:"read-projects",level:2},{value:"Create project",id:"create-project",level:2},{value:"Read project",id:"read-project",level:2},{value:"Update project",id:"update-project",level:2},{value:"Delete project",id:"delete-project",level:2},{value:"Export a project",id:"export-a-project",level:2},{value:"Import a project",id:"import-a-project",level:2}];function u(o){const t={a:"a",code:"code",h2:"h2",p:"p",...(0,r.R)(),...o.components},{Details:e}=t;return i||D("CH",!1),i.Code||D("CH.Code",!0),e||D("Details",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n","\n",(0,s.jsxs)(t.p,{children:["Use the ",(0,s.jsx)(t.code,{children:"/projects"})," endpoint to create, read, update, and delete ",(0,s.jsx)(t.a,{href:"/concepts-flows#projects",children:"Langflow projects"}),"."]}),"\n",(0,s.jsx)(t.h2,{id:"read-projects",children:"Read projects"}),"\n",(0,s.jsx)(t.p,{children:"Get a list of Langflow projects, including project IDs, names, and descriptions."}),"\n",(0,s.jsx)(i.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/projects/" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(i.Code,{codeConfig:d,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:'"Starter Project"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "description"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Manage your own projects. Download and upload projects."',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"1415de42-8f01-4f36-bf34-539f23e47466"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "parent_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(t.h2,{id:"create-project",children:"Create project"}),"\n",(0,s.jsx)(t.p,{children:"Create a new project."}),"\n",(0,s.jsx)(i.Code,{codeConfig:d,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/projects/" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "name": "new_project_name",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "description": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "components_list": [],',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "flows_list": []',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(i.Code,{codeConfig:d,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:'"new_project_name"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "description"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"b408ddb9-6266-4431-9be8-e04a62758331"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "parent_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsxs)(t.p,{children:["To add flows and components at project creation, retrieve the ",(0,s.jsx)(t.code,{children:"components_list"})," and ",(0,s.jsx)(t.code,{children:"flows_list"})," values from the ",(0,s.jsx)(t.a,{href:"/api-reference-api-examples#get-all-components",children:(0,s.jsx)(t.code,{children:"/all"})})," and ",(0,s.jsx)(t.a,{href:"/api-flows#read-flows",children:"/flows/read"})," endpoints and add them to the request body."]}),"\n",(0,s.jsx)(t.p,{children:"Adding a flow to a project moves the flow from its previous location. The flow isn't copied."}),"\n",(0,s.jsx)(i.Code,{codeConfig:d,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/projects/" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',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: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "name": "new_project_name",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "description": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "components_list": [',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "3fa85f64-5717-4562-b3fc-2c963f66afa6"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ],",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "flows_list": [',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "3fa85f64-5717-4562-b3fc-2c963f66afa6"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ]",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsx)(t.h2,{id:"read-project",children:"Read project"}),"\n",(0,s.jsx)(t.p,{children:"Retrieve details of a specific project."}),"\n",(0,s.jsxs)(t.p,{children:["To find the UUID of your project, call the ",(0,s.jsx)(t.a,{href:"#read-projects",children:"read projects"})," endpoint."]}),"\n",(0,s.jsx)(i.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/projects/",props:{style:{color:"#A5D6FF"}}},{content:"$PROJECT_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(i.Code,{codeConfig:d,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:'"Starter Project"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "description"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"Manage your own projects. Download and upload projects."',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"3fa85f64-5717-4562-b3fc-2c963f66afa6"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "parent_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" }",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"]",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(t.h2,{id:"update-project",children:"Update project"}),"\n",(0,s.jsxs)(t.p,{children:["Update the information of a specific project with a ",(0,s.jsx)(t.code,{children:"PATCH"})," request."]}),"\n",(0,s.jsx)(t.p,{children:"Each PATCH request updates the project with the values you send.\nOnly the fields you include in your request are updated.\nIf you send the same values multiple times, the update is still processed, even if the values are unchanged."}),"\n",(0,s.jsx)(i.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"PATCH ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/projects/b408ddb9-6266-4431-9be8-e04a62758331" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -d ",props:{style:{color:"#79C0FF"}}},{content:"'{",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "name": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "description": "string",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "parent_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "components": [',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "3fa85f64-5717-4562-b3fc-2c963f66afa6"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ],",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "flows": [',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:' "3fa85f64-5717-4562-b3fc-2c963f66afa6"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" ]",props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"}'",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(i.Code,{codeConfig:d,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:'"string"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "description"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"string"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:'"b408ddb9-6266-4431-9be8-e04a62758331"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' "parent_id"',props:{style:{color:"#7EE787"}}},{content:": ",props:{style:{color:"#C9D1D9"}}},{content:"null",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:"}",props:{style:{color:"#C9D1D9"}}}]}],lang:"json"},annotations:[]}]})]}),"\n",(0,s.jsx)(t.h2,{id:"delete-project",children:"Delete project"}),"\n",(0,s.jsx)(t.p,{children:"Delete a specific project."}),"\n",(0,s.jsx)(i.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"DELETE ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/projects/",props:{style:{color:"#A5D6FF"}}},{content:"$PROJECT_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: */*" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsxs)(e,{children:[(0,s.jsx)("summary",{children:"Result"}),(0,s.jsx)(i.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"204 No Content",props:{}}]}],lang:"text"},annotations:[]}]})]}),"\n",(0,s.jsx)(t.h2,{id:"export-a-project",children:"Export a project"}),"\n",(0,s.jsx)(t.p,{children:"Download all flows from a project as a zip file."}),"\n",(0,s.jsxs)(t.p,{children:["The ",(0,s.jsx)(t.code,{children:"--output"})," flag is optional."]}),"\n",(0,s.jsx)(i.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"curl ",props:{style:{color:"#FFA657"}}},{content:"-X ",props:{style:{color:"#79C0FF"}}},{content:"GET ",props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:"/api/v1/projects/download/",props:{style:{color:"#A5D6FF"}}},{content:"$PROJECT_ID",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" --output ",props:{style:{color:"#79C0FF"}}},{content:"langflow-project.zip",props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]}),"\n",(0,s.jsx)(t.h2,{id:"import-a-project",children:"Import a project"}),"\n",(0,s.jsx)(t.p,{children:"Import a project and its flows by uploading a Langflow project zip file:"}),"\n",(0,s.jsx)(i.Code,{codeConfig:d,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:' "',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_URL",props:{style:{color:"#C9D1D9"}}},{content:'/api/v1/projects/upload/" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"accept: application/json" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"Content-Type: multipart/form-data" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -H ",props:{style:{color:"#79C0FF"}}},{content:'"x-api-key: ',props:{style:{color:"#A5D6FF"}}},{content:"$LANGFLOW_API_KEY",props:{style:{color:"#C9D1D9"}}},{content:'" ',props:{style:{color:"#A5D6FF"}}},{content:"\\",props:{style:{color:"#79C0FF"}}}]},{tokens:[{content:" -F ",props:{style:{color:"#79C0FF"}}},{content:'"file=@20241230_135006_langflow_flows.zip;type=application/zip"',props:{style:{color:"#A5D6FF"}}}]}],lang:"bash"},annotations:[]}]})]})}function y(o={}){const{wrapper:t}={...(0,r.R)(),...o.components};return t?(0,s.jsx)(t,{...o,children:(0,s.jsx)(u,{...o})}):u(o)}function D(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/f01590dc.7eb36a75.js b/assets/js/f01590dc.7eb36a75.js deleted file mode 100644 index e30707f971..0000000000 --- a/assets/js/f01590dc.7eb36a75.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[4223],{17886:(e,t,n)=>{n.d(t,{A:()=>s});n(96540);var r=n(64058),i=n(74848);function s({name:e,...t}){const n=r[e];return n?(0,i.jsx)(n,{...t}):null}},26928:(e,t,n)=>{n.r(t),n.d(t,{CH:()=>h,assets:()=>a,chCodeConfig:()=>x,contentTitle:()=>l,default:()=>j,frontMatter:()=>d,metadata:()=>r,toc:()=>p});const r=JSON.parse('{"id":"Integrations/Nvidia/integrations-nvidia-ingest","title":"Integrate NVIDIA Retriever Extraction with Langflow","description":"The NVIDIA Retriever Extraction component integrates with the NVIDIA nv-ingest microservice for data ingestion, processing, and extraction of text files.","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":"NVIDIA components","permalink":"/bundles-nvidia"},"next":{"title":"NVIDIA NIM on WSL2","permalink":"/integrations-nvidia-ingest-wsl2"}}');var i=n(74848),s=n(28453),o=n(24754),c=n(17886);const d={title:"Integrate NVIDIA Retriever Extraction with Langflow",slug:"/integrations-nvidia-ingest"},l=void 0,a={},h={annotations:o.hk,Code:o.Cy},x={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},p=[{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 u(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 h||g("CH",!1),h.Code||g("CH.Code",!0),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n","\n",(0,i.jsxs)(t.p,{children:["The ",(0,i.jsx)(t.strong,{children:"NVIDIA Retriever Extraction"})," component integrates with the ",(0,i.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,i.jsxs)(t.p,{children:["The ",(0,i.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,i.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,i.jsxs)(t.p,{children:["The ",(0,i.jsx)(t.strong,{children:"NVIDIA Retriever Extraction"})," component imports the NVIDIA ",(0,i.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,i.jsx)(t.a,{href:"/data-types#data",children:(0,i.jsx)(t.code,{children:"Data"})})," objects. ",(0,i.jsx)(t.code,{children:"Ingestor"})," accepts additional configuration options for data extraction from other text formats. To configure these options, see the ",(0,i.jsx)(t.a,{href:"#parameters",children:"component parameters"}),"."]}),"\n",(0,i.jsx)(t.admonition,{type:"tip",children:(0,i.jsx)(t.p,{children:"NVIDIA Retriever Extraction is also known as NV-Ingest and NeMo Retriever Extraction."})}),"\n",(0,i.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["An NVIDIA Ingest endpoint. For more information on setting up an NVIDIA Ingest endpoint, see the ",(0,i.jsx)(t.a,{href:"https://github.com/NVIDIA/nv-ingest?tab=readme-ov-file#quickstart",children:"NVIDIA Ingest quickstart"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["The ",(0,i.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,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"If you have the Langflow repository cloned and installed from source:"}),"\n"]}),"\n",(0,i.jsx)(h.Code,{codeConfig:x,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,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"If you are installing Langflow from the Python Package Index:"}),"\n"]}),"\n",(0,i.jsx)(h.Code,{codeConfig:x,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,i.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,i.jsxs)(t.p,{children:["The ",(0,i.jsx)(t.strong,{children:"NVIDIA Retriever Extraction"})," component accepts ",(0,i.jsx)(t.code,{children:"Message"})," inputs, and then outputs ",(0,i.jsx)(t.code,{children:"Data"}),". The component calls an NVIDIA Ingest microservice's endpoint to ingest a local file and extract the text."]}),"\n",(0,i.jsxs)(t.p,{children:["To use the ",(0,i.jsx)(t.strong,{children:"NVIDIA Retriever Extraction"})," component in your flow, follow these steps:"]}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["Add the ",(0,i.jsx)(t.strong,{children:"NVIDIA Retriever Extraction"})," component to your flow."]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["In the ",(0,i.jsx)(t.strong,{children:"Base URL"})," field, enter the URL of the NVIDIA Ingest endpoint.\nYou can also store the URL as a ",(0,i.jsx)(t.a,{href:"/configuration-global-variables",children:"global variable"})," to reuse it in multiple components and flows."]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["Click ",(0,i.jsx)(t.strong,{children:"Select Files"})," to select a file to ingest."]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsx)(t.p,{children:"Select which text type to extract from the file: text, charts, tables, images, or infographics."}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["Optional: For PDF files, enable ",(0,i.jsx)(t.strong,{children:"High Resolution Mode"})," for better quality extraction from scanned documents."]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsx)(t.p,{children:"Select whether to split the text into chunks."}),"\n",(0,i.jsxs)(t.p,{children:["You can modify the splitting parameters and other hidden settings through the ",(0,i.jsx)(c.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,i.jsx)(t.strong,{children:"Controls"})," in the ",(0,i.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["Click ",(0,i.jsx)(t.strong,{children:"Run component"})," to ingest the file, and then open the ",(0,i.jsx)(t.strong,{children:"Logs"})," pane to confirm the component ingested the file."]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["To store the processed data in a vector database, add a ",(0,i.jsx)(t.strong,{children:"Vector Store"})," component to your flow, and then connect the ",(0,i.jsx)(t.strong,{children:"NVIDIA Retriever Extraction"})," component's ",(0,i.jsx)(t.code,{children:"Data"})," output to the ",(0,i.jsx)(t.strong,{children:"Vector Store"})," component's input."]}),"\n",(0,i.jsxs)(t.p,{children:["When you run the flow with a ",(0,i.jsx)(t.strong,{children:"Vector Store"})," component, the processed data is stored in the vector database.\nYou can query your database to retrieve the uploaded data."]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"NVIDIA Retriever Extraction component flow",src:n(76102).A+"",width:"1722",height:"1548"})}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(t.h2,{id:"parameters",children:"NVIDIA Retriever Extraction component parameters"}),"\n",(0,i.jsxs)(t.p,{children:["The ",(0,i.jsx)(t.strong,{children:"NVIDIA Retriever Extraction"})," component has the following parameters."]}),"\n",(0,i.jsxs)(t.p,{children:["For more information, see the ",(0,i.jsx)(t.a,{href:"https://nvidia.github.io/nv-ingest/user-guide/",children:"NV-Ingest documentation"}),"."]}),"\n",(0,i.jsx)(t.h3,{id:"inputs",children:"Inputs"}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Name"}),(0,i.jsx)(t.th,{children:"Display Name"}),(0,i.jsx)(t.th,{children:"Info"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"base_url"}),(0,i.jsx)(t.td,{children:"NVIDIA Ingestion URL"}),(0,i.jsx)(t.td,{children:"The URL of the NVIDIA Ingestion API."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"path"}),(0,i.jsx)(t.td,{children:"Path"}),(0,i.jsx)(t.td,{children:"File path to process."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"extract_text"}),(0,i.jsx)(t.td,{children:"Extract Text"}),(0,i.jsx)(t.td,{children:"Extract text from documents. Default: true."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"extract_charts"}),(0,i.jsx)(t.td,{children:"Extract Charts"}),(0,i.jsx)(t.td,{children:"Extract text from charts. Default: false."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"extract_tables"}),(0,i.jsx)(t.td,{children:"Extract Tables"}),(0,i.jsx)(t.td,{children:"Extract text from tables. Default: true."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"extract_images"}),(0,i.jsx)(t.td,{children:"Extract Images"}),(0,i.jsx)(t.td,{children:"Extract images from document. Default: true."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"extract_infographics"}),(0,i.jsx)(t.td,{children:"Extract Infographics"}),(0,i.jsx)(t.td,{children:"Extract infographics from document. Default: false."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"text_depth"}),(0,i.jsx)(t.td,{children:"Text Depth"}),(0,i.jsxs)(t.td,{children:["The level at which text is extracted. Options: 'document', 'page', 'block', 'line', 'span'. Default: ",(0,i.jsx)(t.code,{children:"page"}),"."]})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"split_text"}),(0,i.jsx)(t.td,{children:"Split Text"}),(0,i.jsx)(t.td,{children:"Split text into smaller chunks. Default: true."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"chunk_size"}),(0,i.jsx)(t.td,{children:"Chunk Size"}),(0,i.jsxs)(t.td,{children:["The number of tokens per chunk. Default: ",(0,i.jsx)(t.code,{children:"500"}),". Make sure the chunk size is compatible with your embedding model. For more information, see ",(0,i.jsx)(t.a,{href:"/components-processing#chunk-size",children:"Tokenization errors due to chunk size"}),"."]})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"chunk_overlap"}),(0,i.jsx)(t.td,{children:"Chunk Overlap"}),(0,i.jsxs)(t.td,{children:["Number of tokens to overlap from previous chunk. Default: ",(0,i.jsx)(t.code,{children:"150"}),"."]})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"filter_images"}),(0,i.jsx)(t.td,{children:"Filter Images"}),(0,i.jsx)(t.td,{children:"Filter images (see advanced options for filtering criteria). Default: false."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"min_image_size"}),(0,i.jsx)(t.td,{children:"Minimum Image Size Filter"}),(0,i.jsxs)(t.td,{children:["Minimum image width/length in pixels. Default: ",(0,i.jsx)(t.code,{children:"128"}),"."]})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"min_aspect_ratio"}),(0,i.jsx)(t.td,{children:"Minimum Aspect Ratio Filter"}),(0,i.jsxs)(t.td,{children:["Minimum allowed aspect ratio (width / height). Default: ",(0,i.jsx)(t.code,{children:"0.2"}),"."]})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"max_aspect_ratio"}),(0,i.jsx)(t.td,{children:"Maximum Aspect Ratio Filter"}),(0,i.jsxs)(t.td,{children:["Maximum allowed aspect ratio (width / height). Default: ",(0,i.jsx)(t.code,{children:"5.0"}),"."]})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"dedup_images"}),(0,i.jsx)(t.td,{children:"Deduplicate Images"}),(0,i.jsx)(t.td,{children:"Filter duplicated images. Default: true."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"caption_images"}),(0,i.jsx)(t.td,{children:"Caption Images"}),(0,i.jsx)(t.td,{children:"Generate captions for images using the NVIDIA captioning model. Default: true."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"high_resolution"}),(0,i.jsx)(t.td,{children:"High Resolution (PDF only)"}),(0,i.jsx)(t.td,{children:"Process PDF in high-resolution mode for better quality extraction from scanned PDF. Default: false."})]})]})]}),"\n",(0,i.jsx)(t.h3,{id:"outputs",children:"Outputs"}),"\n",(0,i.jsxs)(t.p,{children:["The ",(0,i.jsx)(t.strong,{children:"NVIDIA Retriever Extraction"})," component outputs a list of ",(0,i.jsx)(t.a,{href:"/data-types#data",children:(0,i.jsx)(t.code,{children:"Data"})})," objects where each object contains:"]}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"text"}),": The extracted content.","\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"For text documents: The extracted text content."}),"\n",(0,i.jsx)(t.li,{children:"For tables and charts: The extracted table/chart content."}),"\n",(0,i.jsx)(t.li,{children:"For images: The image caption."}),"\n",(0,i.jsx)(t.li,{children:"For infographics: The extracted infographic content."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"file_path"}),": The source file name and path."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"document_type"}),": The type of the document, which can be ",(0,i.jsx)(t.code,{children:"text"}),", ",(0,i.jsx)(t.code,{children:"structured"}),", or ",(0,i.jsx)(t.code,{children:"image"}),"."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"description"}),": Additional description of the content."]}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:["The output varies based on the ",(0,i.jsx)(t.code,{children:"document_type"}),":"]}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["Documents with ",(0,i.jsx)(t.code,{children:'document_type: "text"'})," contain:"]}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Raw text content extracted from documents, for example, paragraphs from PDFs or DOCX files."}),"\n",(0,i.jsxs)(t.li,{children:["Content stored directly in the ",(0,i.jsx)(t.code,{children:"text"})," field."]}),"\n",(0,i.jsxs)(t.li,{children:["Content extracted using the ",(0,i.jsx)(t.code,{children:"extract_text"})," parameter."]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["Documents with ",(0,i.jsx)(t.code,{children:'document_type: "structured"'})," contain:"]}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Text extracted from tables, charts, and infographics and processed to preserve structural information."}),"\n",(0,i.jsxs)(t.li,{children:["Content extracted using the ",(0,i.jsx)(t.code,{children:"extract_tables"}),", ",(0,i.jsx)(t.code,{children:"extract_charts"}),", and ",(0,i.jsx)(t.code,{children:"extract_infographics"})," parameters."]}),"\n",(0,i.jsxs)(t.li,{children:["Content stored in the ",(0,i.jsx)(t.code,{children:"text"})," field after being processed from the ",(0,i.jsx)(t.code,{children:"table_content"})," metadata."]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["Documents with ",(0,i.jsx)(t.code,{children:'document_type: "image"'})," contain:"]}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Image content extracted from documents."}),"\n",(0,i.jsxs)(t.li,{children:["Caption text stored in the ",(0,i.jsx)(t.code,{children:"text"})," field when ",(0,i.jsx)(t.code,{children:"caption_images"})," is enabled."]}),"\n",(0,i.jsxs)(t.li,{children:["Content extracted using the ",(0,i.jsx)(t.code,{children:"extract_images"})," parameter."]}),"\n"]}),"\n"]}),"\n"]})]})}function j(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(u,{...e})}):u(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.")}},76102:(e,t,n)=>{n.d(t,{A:()=>r});const r=n.p+"assets/images/nvidia-component-ingest-astra-c6f0107751252206ab0d500a25ba3f9c.png"}}]); \ No newline at end of file diff --git a/assets/js/f01590dc.cd2d7fa9.js b/assets/js/f01590dc.cd2d7fa9.js new file mode 100644 index 0000000000..783fb0f175 --- /dev/null +++ b/assets/js/f01590dc.cd2d7fa9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[4223],{17886:(e,t,n)=>{n.d(t,{A:()=>s});n(96540);var r=n(64058),i=n(74848);function s({name:e,...t}){const n=r[e];return n?(0,i.jsx)(n,{...t}):null}},26928:(e,t,n)=>{n.r(t),n.d(t,{CH:()=>x,assets:()=>h,chCodeConfig:()=>p,contentTitle:()=>a,default:()=>g,frontMatter:()=>l,metadata:()=>r,toc:()=>u});const r=JSON.parse('{"id":"Integrations/Nvidia/integrations-nvidia-ingest","title":"Integrate NVIDIA Retriever Extraction with Langflow","description":"The NVIDIA Retriever Extraction component integrates with the NVIDIA nv-ingest microservice for data ingestion, processing, and extraction of text files.","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":"NVIDIA components","permalink":"/bundles-nvidia"},"next":{"title":"NVIDIA NIM on WSL2","permalink":"/integrations-nvidia-ingest-wsl2"}}');var i=n(74848),s=n(28453),o=n(24754),c=n(17886),d=n(31929);const l={title:"Integrate NVIDIA Retriever Extraction with Langflow",slug:"/integrations-nvidia-ingest"},a=void 0,h={},x={annotations:o.hk,Code:o.Cy},p={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},u=[{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},...d.RM,{value:"NVIDIA Retriever Extraction component parameters",id:"parameters",level:2},{value:"Inputs",id:"inputs",level:3},{value:"Outputs",id:"outputs",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,s.R)(),...e.components};return x||m("CH",!1),x.Code||m("CH.Code",!0),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n","\n",(0,i.jsxs)(t.p,{children:["The ",(0,i.jsx)(t.strong,{children:"NVIDIA Retriever Extraction"})," component integrates with the ",(0,i.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,i.jsxs)(t.p,{children:["The ",(0,i.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,i.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,i.jsxs)(t.p,{children:["The ",(0,i.jsx)(t.strong,{children:"NVIDIA Retriever Extraction"})," component imports the NVIDIA ",(0,i.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,i.jsx)(t.a,{href:"/data-types#data",children:(0,i.jsx)(t.code,{children:"Data"})})," objects. ",(0,i.jsx)(t.code,{children:"Ingestor"})," accepts additional configuration options for data extraction from other text formats. To configure these options, see the ",(0,i.jsx)(t.a,{href:"#parameters",children:"component parameters"}),"."]}),"\n",(0,i.jsx)(t.admonition,{type:"tip",children:(0,i.jsx)(t.p,{children:"NVIDIA Retriever Extraction is also known as NV-Ingest and NeMo Retriever Extraction."})}),"\n",(0,i.jsx)(t.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["An NVIDIA Ingest endpoint. For more information on setting up an NVIDIA Ingest endpoint, see the ",(0,i.jsx)(t.a,{href:"https://github.com/NVIDIA/nv-ingest?tab=readme-ov-file#quickstart",children:"NVIDIA Ingest quickstart"}),"."]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["The ",(0,i.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,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"If you have the Langflow repository cloned and installed from source:"}),"\n"]}),"\n",(0,i.jsx)(x.Code,{codeConfig:p,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,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"If you are installing Langflow from the Python Package Index:"}),"\n"]}),"\n",(0,i.jsx)(x.Code,{codeConfig:p,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,i.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,i.jsxs)(t.p,{children:["The ",(0,i.jsx)(t.strong,{children:"NVIDIA Retriever Extraction"})," component accepts ",(0,i.jsx)(t.code,{children:"Message"})," inputs, and then outputs ",(0,i.jsx)(t.code,{children:"Data"}),". The component calls an NVIDIA Ingest microservice's endpoint to ingest a local file and extract the text."]}),"\n",(0,i.jsxs)(t.p,{children:["To use the ",(0,i.jsx)(t.strong,{children:"NVIDIA Retriever Extraction"})," component in your flow, follow these steps:"]}),"\n",(0,i.jsxs)(t.ol,{children:["\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["Add the ",(0,i.jsx)(t.strong,{children:"NVIDIA Retriever Extraction"})," component to your flow."]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["In the ",(0,i.jsx)(t.strong,{children:"Base URL"})," field, enter the URL of the NVIDIA Ingest endpoint.\nYou can also store the URL as a ",(0,i.jsx)(t.a,{href:"/configuration-global-variables",children:"global variable"})," to reuse it in multiple components and flows."]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["Click ",(0,i.jsx)(t.strong,{children:"Select Files"})," to select a file to ingest."]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsx)(t.p,{children:"Select which text type to extract from the file: text, charts, tables, images, or infographics."}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["Optional: For PDF files, enable ",(0,i.jsx)(t.strong,{children:"High Resolution Mode"})," for better quality extraction from scanned documents."]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsx)(t.p,{children:"Select whether to split the text into chunks."}),"\n",(0,i.jsx)(d.Ay,{}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["Click ",(0,i.jsx)(c.A,{name:"Play","aria-hidden":"true"})," ",(0,i.jsx)(t.strong,{children:"Run component"})," to ingest the file, and then click ",(0,i.jsx)(t.strong,{children:"Logs"})," or ",(0,i.jsx)(c.A,{name:"TextSearch","aria-hidden":"true"})," ",(0,i.jsx)(t.strong,{children:"Inspect output"})," to confirm the component ingested the file."]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["To store the processed data in a vector database, add a ",(0,i.jsx)(t.strong,{children:"Vector Store"})," component to your flow, and then connect the ",(0,i.jsx)(t.strong,{children:"NVIDIA Retriever Extraction"})," component's ",(0,i.jsx)(t.code,{children:"Data"})," output to the ",(0,i.jsx)(t.strong,{children:"Vector Store"})," component's input."]}),"\n",(0,i.jsxs)(t.p,{children:["When you run the flow with a ",(0,i.jsx)(t.strong,{children:"Vector Store"})," component, the processed data is stored in the vector database.\nYou can query your database to retrieve the uploaded data."]}),"\n",(0,i.jsx)(t.p,{children:(0,i.jsx)(t.img,{alt:"NVIDIA Retriever Extraction component flow",src:n(76102).A+"",width:"1722",height:"1548"})}),"\n"]}),"\n"]}),"\n",(0,i.jsx)(t.h2,{id:"parameters",children:"NVIDIA Retriever Extraction component parameters"}),"\n",(0,i.jsxs)(t.p,{children:["The ",(0,i.jsx)(t.strong,{children:"NVIDIA Retriever Extraction"})," component has the following parameters."]}),"\n",(0,i.jsxs)(t.p,{children:["For more information, see the ",(0,i.jsx)(t.a,{href:"https://nvidia.github.io/nv-ingest/user-guide/",children:"NV-Ingest documentation"}),"."]}),"\n",(0,i.jsx)(t.h3,{id:"inputs",children:"Inputs"}),"\n",(0,i.jsxs)(t.table,{children:[(0,i.jsx)(t.thead,{children:(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.th,{children:"Name"}),(0,i.jsx)(t.th,{children:"Display Name"}),(0,i.jsx)(t.th,{children:"Info"})]})}),(0,i.jsxs)(t.tbody,{children:[(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"base_url"}),(0,i.jsx)(t.td,{children:"NVIDIA Ingestion URL"}),(0,i.jsx)(t.td,{children:"The URL of the NVIDIA Ingestion API."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"path"}),(0,i.jsx)(t.td,{children:"Path"}),(0,i.jsx)(t.td,{children:"File path to process."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"extract_text"}),(0,i.jsx)(t.td,{children:"Extract Text"}),(0,i.jsx)(t.td,{children:"Extract text from documents. Default: true."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"extract_charts"}),(0,i.jsx)(t.td,{children:"Extract Charts"}),(0,i.jsx)(t.td,{children:"Extract text from charts. Default: false."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"extract_tables"}),(0,i.jsx)(t.td,{children:"Extract Tables"}),(0,i.jsx)(t.td,{children:"Extract text from tables. Default: true."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"extract_images"}),(0,i.jsx)(t.td,{children:"Extract Images"}),(0,i.jsx)(t.td,{children:"Extract images from document. Default: true."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"extract_infographics"}),(0,i.jsx)(t.td,{children:"Extract Infographics"}),(0,i.jsx)(t.td,{children:"Extract infographics from document. Default: false."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"text_depth"}),(0,i.jsx)(t.td,{children:"Text Depth"}),(0,i.jsxs)(t.td,{children:["The level at which text is extracted. Options: 'document', 'page', 'block', 'line', 'span'. Default: ",(0,i.jsx)(t.code,{children:"page"}),"."]})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"split_text"}),(0,i.jsx)(t.td,{children:"Split Text"}),(0,i.jsx)(t.td,{children:"Split text into smaller chunks. Default: true."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"chunk_size"}),(0,i.jsx)(t.td,{children:"Chunk Size"}),(0,i.jsxs)(t.td,{children:["The number of tokens per chunk. Default: ",(0,i.jsx)(t.code,{children:"500"}),". Make sure the chunk size is compatible with your embedding model. For more information, see ",(0,i.jsx)(t.a,{href:"/components-processing#chunk-size",children:"Tokenization errors due to chunk size"}),"."]})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"chunk_overlap"}),(0,i.jsx)(t.td,{children:"Chunk Overlap"}),(0,i.jsxs)(t.td,{children:["Number of tokens to overlap from previous chunk. Default: ",(0,i.jsx)(t.code,{children:"150"}),"."]})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"filter_images"}),(0,i.jsx)(t.td,{children:"Filter Images"}),(0,i.jsx)(t.td,{children:"Filter images (see advanced options for filtering criteria). Default: false."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"min_image_size"}),(0,i.jsx)(t.td,{children:"Minimum Image Size Filter"}),(0,i.jsxs)(t.td,{children:["Minimum image width/length in pixels. Default: ",(0,i.jsx)(t.code,{children:"128"}),"."]})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"min_aspect_ratio"}),(0,i.jsx)(t.td,{children:"Minimum Aspect Ratio Filter"}),(0,i.jsxs)(t.td,{children:["Minimum allowed aspect ratio (width / height). Default: ",(0,i.jsx)(t.code,{children:"0.2"}),"."]})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"max_aspect_ratio"}),(0,i.jsx)(t.td,{children:"Maximum Aspect Ratio Filter"}),(0,i.jsxs)(t.td,{children:["Maximum allowed aspect ratio (width / height). Default: ",(0,i.jsx)(t.code,{children:"5.0"}),"."]})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"dedup_images"}),(0,i.jsx)(t.td,{children:"Deduplicate Images"}),(0,i.jsx)(t.td,{children:"Filter duplicated images. Default: true."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"caption_images"}),(0,i.jsx)(t.td,{children:"Caption Images"}),(0,i.jsx)(t.td,{children:"Generate captions for images using the NVIDIA captioning model. Default: true."})]}),(0,i.jsxs)(t.tr,{children:[(0,i.jsx)(t.td,{children:"high_resolution"}),(0,i.jsx)(t.td,{children:"High Resolution (PDF only)"}),(0,i.jsx)(t.td,{children:"Process PDF in high-resolution mode for better quality extraction from scanned PDF. Default: false."})]})]})]}),"\n",(0,i.jsx)(t.h3,{id:"outputs",children:"Outputs"}),"\n",(0,i.jsxs)(t.p,{children:["The ",(0,i.jsx)(t.strong,{children:"NVIDIA Retriever Extraction"})," component outputs a list of ",(0,i.jsx)(t.a,{href:"/data-types#data",children:(0,i.jsx)(t.code,{children:"Data"})})," objects where each object contains:"]}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"text"}),": The extracted content.","\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"For text documents: The extracted text content."}),"\n",(0,i.jsx)(t.li,{children:"For tables and charts: The extracted table/chart content."}),"\n",(0,i.jsx)(t.li,{children:"For images: The image caption."}),"\n",(0,i.jsx)(t.li,{children:"For infographics: The extracted infographic content."}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"file_path"}),": The source file name and path."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"document_type"}),": The type of the document, which can be ",(0,i.jsx)(t.code,{children:"text"}),", ",(0,i.jsx)(t.code,{children:"structured"}),", or ",(0,i.jsx)(t.code,{children:"image"}),"."]}),"\n",(0,i.jsxs)(t.li,{children:[(0,i.jsx)(t.code,{children:"description"}),": Additional description of the content."]}),"\n"]}),"\n",(0,i.jsxs)(t.p,{children:["The output varies based on the ",(0,i.jsx)(t.code,{children:"document_type"}),":"]}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["Documents with ",(0,i.jsx)(t.code,{children:'document_type: "text"'})," contain:"]}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Raw text content extracted from documents, for example, paragraphs from PDFs or DOCX files."}),"\n",(0,i.jsxs)(t.li,{children:["Content stored directly in the ",(0,i.jsx)(t.code,{children:"text"})," field."]}),"\n",(0,i.jsxs)(t.li,{children:["Content extracted using the ",(0,i.jsx)(t.code,{children:"extract_text"})," parameter."]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["Documents with ",(0,i.jsx)(t.code,{children:'document_type: "structured"'})," contain:"]}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Text extracted from tables, charts, and infographics and processed to preserve structural information."}),"\n",(0,i.jsxs)(t.li,{children:["Content extracted using the ",(0,i.jsx)(t.code,{children:"extract_tables"}),", ",(0,i.jsx)(t.code,{children:"extract_charts"}),", and ",(0,i.jsx)(t.code,{children:"extract_infographics"})," parameters."]}),"\n",(0,i.jsxs)(t.li,{children:["Content stored in the ",(0,i.jsx)(t.code,{children:"text"})," field after being processed from the ",(0,i.jsx)(t.code,{children:"table_content"})," metadata."]}),"\n"]}),"\n"]}),"\n",(0,i.jsxs)(t.li,{children:["\n",(0,i.jsxs)(t.p,{children:["Documents with ",(0,i.jsx)(t.code,{children:'document_type: "image"'})," contain:"]}),"\n",(0,i.jsxs)(t.ul,{children:["\n",(0,i.jsx)(t.li,{children:"Image content extracted from documents."}),"\n",(0,i.jsxs)(t.li,{children:["Caption text stored in the ",(0,i.jsx)(t.code,{children:"text"})," field when ",(0,i.jsx)(t.code,{children:"caption_images"})," is enabled."]}),"\n",(0,i.jsxs)(t.li,{children:["Content extracted using the ",(0,i.jsx)(t.code,{children:"extract_images"})," parameter."]}),"\n"]}),"\n"]}),"\n"]})]})}function g(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,i.jsx)(t,{...e,children:(0,i.jsx)(j,{...e})}):j(e)}function m(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},31929:(e,t,n)=>{n.d(t,{Ay:()=>d,RM:()=>o});var r=n(74848),i=n(28453),s=n(17886);const o=[];function c(e){const t={a:"a",p:"p",strong:"strong",...(0,i.R)(),...e.components};return(0,r.jsxs)(t.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,r.jsx)(s.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Controls"})," in the ",(0,r.jsx)(t.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function d(e={}){const{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(c,{...e})}):c(e)}},76102:(e,t,n)=>{n.d(t,{A:()=>r});const r=n.p+"assets/images/nvidia-component-ingest-astra-c6f0107751252206ab0d500a25ba3f9c.png"}}]); \ No newline at end of file diff --git a/assets/js/f0b67137.2df6cb53.js b/assets/js/f0b67137.2df6cb53.js deleted file mode 100644 index abc5ba422f..0000000000 --- a/assets/js/f0b67137.2df6cb53.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[3247],{8921:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>l,contentTitle:()=>a,default:()=>p,frontMatter:()=>o,metadata:()=>t,toc:()=>c});const t=JSON.parse('{"id":"Components/bundles-azure","title":"Azure","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-azure.mdx","sourceDirName":"Components","slug":"/bundles-azure","permalink":"/bundles-azure","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Azure","slug":"/bundles-azure"},"sidebar":"docs","previous":{"title":"AssemblyAI","permalink":"/integrations-assemblyai"},"next":{"title":"Baidu","permalink":"/bundles-baidu"}}');var s=r(74848),d=r(28453),i=r(17886);const o={title:"Azure",slug:"/bundles-azure"},a=void 0,l={},c=[{value:"Azure OpenAI",id:"azure-openai",level:2},{value:"Azure OpenAI parameters",id:"azure-openai-parameters",level:3},{value:"Azure OpenAI Embeddings",id:"azure-openai-embeddings",level:2},{value:"Azure OpenAI Embeddings parameters",id:"azure-openai-embeddings-parameters",level:3}];function h(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,d.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,s.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,s.jsx)(n.strong,{children:"Azure"})," bundle."]}),"\n",(0,s.jsx)(n.h2,{id:"azure-openai",children:"Azure OpenAI"}),"\n",(0,s.jsxs)(n.p,{children:["This component generates text using ",(0,s.jsx)(n.a,{href:"https://learn.microsoft.com/en-us/azure/ai-services/openai/",children:"Azure OpenAI LLMs"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["It can output either a ",(0,s.jsx)(n.strong,{children:"Model Response"})," (",(0,s.jsx)(n.a,{href:"/data-types#message",children:(0,s.jsx)(n.code,{children:"Message"})}),") or a ",(0,s.jsx)(n.strong,{children:"Language Model"})," (",(0,s.jsx)(n.a,{href:"/data-types#languagemodel",children:(0,s.jsx)(n.code,{children:"LanguageModel"})}),").\nSpecifically, the ",(0,s.jsx)(n.strong,{children:"Language Model"})," output is an instance of ",(0,s.jsx)(n.a,{href:"https://python.langchain.com/docs/integrations/chat/azure_chat_openai/",children:(0,s.jsx)(n.code,{children:"AzureChatOpenAI"})})," configured according to the component's parameters."]}),"\n",(0,s.jsxs)(n.p,{children:["Use the ",(0,s.jsx)(n.strong,{children:"Language Model"})," output when you want to use an Azure OpenAI model as the LLM for another LLM-driven component, such as a ",(0,s.jsx)(n.strong,{children:"Language Model"})," or ",(0,s.jsx)(n.strong,{children:"Smart Function"})," component."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information, see ",(0,s.jsxs)(n.a,{href:"/components-models",children:[(0,s.jsx)(n.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"azure-openai-parameters",children:"Azure OpenAI parameters"}),"\n",(0,s.jsxs)(n.p,{children:["Many ",(0,s.jsx)(n.strong,{children:"Azure OpenAI"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,s.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Controls"})," in the ",(0,s.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\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:"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:"Model Name"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. Specifies the name of the Azure OpenAI model to be used for text generation."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Azure Endpoint"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. Your Azure endpoint, including the resource."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Deployment Name"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. Specifies the name of the deployment."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"API Version"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. Specifies the version of the Azure OpenAI API to be used."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"API Key"}),(0,s.jsx)(n.td,{children:"SecretString"}),(0,s.jsx)(n.td,{children:"Input parameter. Your Azure OpenAI API key."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Temperature"}),(0,s.jsx)(n.td,{children:"Float"}),(0,s.jsxs)(n.td,{children:["Input parameter. Specifies the sampling temperature. Defaults to ",(0,s.jsx)(n.code,{children:"0.7"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Max Tokens"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsxs)(n.td,{children:["Input parameter. Specifies the maximum number of tokens to generate. Defaults to ",(0,s.jsx)(n.code,{children:"1000"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Input Value"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. Specifies the input text for text generation."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Stream"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"Input parameter. Specifies whether to stream the response from the model. Default to false."})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"azure-openai-embeddings",children:"Azure OpenAI Embeddings"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Azure OpenAI Embeddings"})," component generates embeddings using Azure OpenAI models."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information about using embedding model components in flows, see ",(0,s.jsxs)(n.a,{href:"/components-embedding-models",children:[(0,s.jsx)(n.strong,{children:"Embedding Model"})," components"]}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"azure-openai-embeddings-parameters",children:"Azure OpenAI Embeddings parameters"}),"\n",(0,s.jsxs)(n.p,{children:["Some ",(0,s.jsx)(n.strong,{children:"Azure OpenAI Embeddings"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,s.jsx)(i.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Controls"})," in the ",(0,s.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\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:"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:"Model"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. The name of the model to use. Default: ",(0,s.jsx)(n.code,{children:"text-embedding-3-small"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Azure Endpoint"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. Your Azure endpoint, including the resource, such as ",(0,s.jsx)(n.code,{children:"https://example-resource.azure.openai.com/"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Deployment Name"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The name of the deployment."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"API Version"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The API version to use, with options including various dates."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"API Key"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The API key required to access the Azure OpenAI service."})]})]})]})]})}function p(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},17886:(e,n,r)=>{r.d(n,{A:()=>d});r(96540);var t=r(64058),s=r(74848);function d({name:e,...n}){const r=t[e];return r?(0,s.jsx)(r,{...n}):null}}}]); \ No newline at end of file diff --git a/assets/js/f0b67137.bc9be628.js b/assets/js/f0b67137.bc9be628.js new file mode 100644 index 0000000000..445632c5bb --- /dev/null +++ b/assets/js/f0b67137.bc9be628.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[3247],{8921:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>p,frontMatter:()=>o,metadata:()=>t,toc:()=>l});const t=JSON.parse('{"id":"Components/bundles-azure","title":"Azure","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-azure.mdx","sourceDirName":"Components","slug":"/bundles-azure","permalink":"/bundles-azure","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Azure","slug":"/bundles-azure"},"sidebar":"docs","previous":{"title":"AssemblyAI","permalink":"/integrations-assemblyai"},"next":{"title":"Baidu","permalink":"/bundles-baidu"}}');var s=r(74848),d=r(28453),i=(r(17886),r(31929));const o={title:"Azure",slug:"/bundles-azure"},a=void 0,c={},l=[{value:"Azure OpenAI",id:"azure-openai",level:2},{value:"Azure OpenAI parameters",id:"azure-openai-parameters",level:3},...i.RM,{value:"Azure OpenAI Embeddings",id:"azure-openai-embeddings",level:2},{value:"Azure OpenAI Embeddings parameters",id:"azure-openai-embeddings-parameters",level:3},...i.RM];function h(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,d.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,s.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,s.jsx)(n.strong,{children:"Azure"})," bundle."]}),"\n",(0,s.jsx)(n.h2,{id:"azure-openai",children:"Azure OpenAI"}),"\n",(0,s.jsxs)(n.p,{children:["This component generates text using ",(0,s.jsx)(n.a,{href:"https://learn.microsoft.com/en-us/azure/ai-services/openai/",children:"Azure OpenAI LLMs"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["It can output either a ",(0,s.jsx)(n.strong,{children:"Model Response"})," (",(0,s.jsx)(n.a,{href:"/data-types#message",children:(0,s.jsx)(n.code,{children:"Message"})}),") or a ",(0,s.jsx)(n.strong,{children:"Language Model"})," (",(0,s.jsx)(n.a,{href:"/data-types#languagemodel",children:(0,s.jsx)(n.code,{children:"LanguageModel"})}),").\nSpecifically, the ",(0,s.jsx)(n.strong,{children:"Language Model"})," output is an instance of ",(0,s.jsx)(n.a,{href:"https://python.langchain.com/docs/integrations/chat/azure_chat_openai/",children:(0,s.jsx)(n.code,{children:"AzureChatOpenAI"})})," configured according to the component's parameters."]}),"\n",(0,s.jsxs)(n.p,{children:["Use the ",(0,s.jsx)(n.strong,{children:"Language Model"})," output when you want to use an Azure OpenAI model as the LLM for another LLM-driven component, such as an ",(0,s.jsx)(n.strong,{children:"Agent"})," or ",(0,s.jsx)(n.strong,{children:"Smart Function"})," component."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information, see ",(0,s.jsxs)(n.a,{href:"/components-models",children:[(0,s.jsx)(n.strong,{children:"Language Model"})," components"]}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"azure-openai-parameters",children:"Azure OpenAI parameters"}),"\n",(0,s.jsx)(i.Ay,{}),"\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:"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:"Model Name"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. Specifies the name of the Azure OpenAI model to be used for text generation."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Azure Endpoint"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. Your Azure endpoint, including the resource."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Deployment Name"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. Specifies the name of the deployment."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"API Version"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. Specifies the version of the Azure OpenAI API to be used."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"API Key"}),(0,s.jsx)(n.td,{children:"SecretString"}),(0,s.jsx)(n.td,{children:"Input parameter. Your Azure OpenAI API key."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Temperature"}),(0,s.jsx)(n.td,{children:"Float"}),(0,s.jsxs)(n.td,{children:["Input parameter. Specifies the sampling temperature. Defaults to ",(0,s.jsx)(n.code,{children:"0.7"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Max Tokens"}),(0,s.jsx)(n.td,{children:"Integer"}),(0,s.jsxs)(n.td,{children:["Input parameter. Specifies the maximum number of tokens to generate. Defaults to ",(0,s.jsx)(n.code,{children:"1000"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Input Value"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. Specifies the input text for text generation."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Stream"}),(0,s.jsx)(n.td,{children:"Boolean"}),(0,s.jsx)(n.td,{children:"Input parameter. Specifies whether to stream the response from the model. Default to false."})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"azure-openai-embeddings",children:"Azure OpenAI Embeddings"}),"\n",(0,s.jsxs)(n.p,{children:["The ",(0,s.jsx)(n.strong,{children:"Azure OpenAI Embeddings"})," component generates embeddings using Azure OpenAI models."]}),"\n",(0,s.jsxs)(n.p,{children:["For more information about using embedding model components in flows, see ",(0,s.jsxs)(n.a,{href:"/components-embedding-models",children:[(0,s.jsx)(n.strong,{children:"Embedding Model"})," components"]}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"azure-openai-embeddings-parameters",children:"Azure OpenAI Embeddings parameters"}),"\n",(0,s.jsx)(i.Ay,{}),"\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:"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:"Model"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. The name of the model to use. Default: ",(0,s.jsx)(n.code,{children:"text-embedding-3-small"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Azure Endpoint"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsxs)(n.td,{children:["Input parameter. Your Azure endpoint, including the resource, such as ",(0,s.jsx)(n.code,{children:"https://example-resource.azure.openai.com/"}),"."]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"Deployment Name"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The name of the deployment."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"API Version"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The API version to use, with options including various dates."})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:"API Key"}),(0,s.jsx)(n.td,{children:"String"}),(0,s.jsx)(n.td,{children:"Input parameter. The API key required to access the Azure OpenAI service."})]})]})]})]})}function p(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},17886:(e,n,r)=>{r.d(n,{A:()=>d});r(96540);var t=r(64058),s=r(74848);function d({name:e,...n}){const r=t[e];return r?(0,s.jsx)(r,{...n}):null}},31929:(e,n,r)=>{r.d(n,{Ay:()=>a,RM:()=>i});var t=r(74848),s=r(28453),d=r(17886);const i=[];function o(e){const n={a:"a",p:"p",strong:"strong",...(0,s.R)(),...e.components};return(0,t.jsxs)(n.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,t.jsx)(d.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"Controls"})," in the ",(0,t.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function a(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(o,{...e})}):o(e)}}}]); \ No newline at end of file diff --git a/assets/js/ff7f32ba.15da425f.js b/assets/js/ff7f32ba.15da425f.js new file mode 100644 index 0000000000..99f9d94ac7 --- /dev/null +++ b/assets/js/ff7f32ba.15da425f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[5200],{607:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>d,contentTitle:()=>c,default:()=>p,frontMatter:()=>i,metadata:()=>s,toc:()=>o});const s=JSON.parse('{"id":"Components/bundles-glean","title":"Glean","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-glean.mdx","sourceDirName":"Components","slug":"/bundles-glean","permalink":"/bundles-glean","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Glean","slug":"/bundles-glean"},"sidebar":"docs","previous":{"title":"Exa","permalink":"/bundles-exa"},"next":{"title":"Google components","permalink":"/bundles-google"}}');var r=t(74848),a=t(28453),l=(t(17886),t(31929));const i={title:"Glean",slug:"/bundles-glean"},c=void 0,d={},o=[{value:"Glean Search API",id:"glean-search-api",level:2},{value:"Glean Search API parameters",id:"glean-search-api-parameters",level:3},...l.RM,{value:"See also",id:"see-also",level:2}];function h(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,r.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,r.jsx)(n.strong,{children:"Glean"})," bundle."]}),"\n",(0,r.jsx)(n.h2,{id:"glean-search-api",children:"Glean Search API"}),"\n",(0,r.jsx)(n.p,{children:"This component allows you to call the Glean Search API."}),"\n",(0,r.jsxs)(n.p,{children:["It returns a list of search results as a ",(0,r.jsx)(n.a,{href:"/data-types#dataframe",children:(0,r.jsx)(n.code,{children:"DataFrame"})}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"glean-search-api-parameters",children:"Glean Search API parameters"}),"\n",(0,r.jsx)(l.Ay,{}),"\n",(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:"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:"glean_api_url"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:"Input parameter. The URL of the Glean API."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"glean_access_token"}),(0,r.jsx)(n.td,{children:"SecretString"}),(0,r.jsx)(n.td,{children:"Input parameter. An access token for Glean API authentication."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"query"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:"Input parameter. The search query input."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"page_size"}),(0,r.jsx)(n.td,{children:"Integer"}),(0,r.jsx)(n.td,{children:"Input parameter. The number of results per page. Default: 10."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request_options"}),(0,r.jsx)(n.td,{children:"Dict"}),(0,r.jsx)(n.td,{children:"Input parameter. Additional options for the API request."})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"see-also",children:"See also"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsxs)(n.a,{href:"/components-data#web-search",children:[(0,r.jsx)(n.strong,{children:"Web Search"})," component"]})}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},17886:(e,n,t)=>{t.d(n,{A:()=>a});t(96540);var s=t(64058),r=t(74848);function a({name:e,...n}){const t=s[e];return t?(0,r.jsx)(t,{...n}):null}},31929:(e,n,t)=>{t.d(n,{Ay:()=>c,RM:()=>l});var s=t(74848),r=t(28453),a=t(17886);const l=[];function i(e){const n={a:"a",p:"p",strong:"strong",...(0,r.R)(),...e.components};return(0,s.jsxs)(n.p,{children:["Some parameters are hidden by default in the visual editor.\nYou can modify all parameters through the ",(0,s.jsx)(a.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Controls"})," in the ",(0,s.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]})}function c(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(i,{...e})}):i(e)}}}]); \ No newline at end of file diff --git a/assets/js/ff7f32ba.ac2c7408.js b/assets/js/ff7f32ba.ac2c7408.js deleted file mode 100644 index 59531bf1ec..0000000000 --- a/assets/js/ff7f32ba.ac2c7408.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[5200],{607:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>d,default:()=>p,frontMatter:()=>i,metadata:()=>s,toc:()=>o});const s=JSON.parse('{"id":"Components/bundles-glean","title":"Glean","description":"Bundles contain custom components that support specific third-party integrations with Langflow.","source":"@site/docs/Components/bundles-glean.mdx","sourceDirName":"Components","slug":"/bundles-glean","permalink":"/bundles-glean","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Glean","slug":"/bundles-glean"},"sidebar":"docs","previous":{"title":"Exa","permalink":"/bundles-exa"},"next":{"title":"Google components","permalink":"/bundles-google"}}');var r=t(74848),a=t(28453),l=t(17886);const i={title:"Glean",slug:"/bundles-glean"},d=void 0,c={},o=[{value:"Glean Search API",id:"glean-search-api",level:2},{value:"Glean Search API parameters",id:"glean-search-api-parameters",level:3},{value:"See also",id:"see-also",level:2}];function h(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"/components-bundle-components",children:"Bundles"})," contain custom components that support specific third-party integrations with Langflow."]}),"\n",(0,r.jsxs)(n.p,{children:["This page describes the components that are available in the ",(0,r.jsx)(n.strong,{children:"Glean"})," bundle."]}),"\n",(0,r.jsx)(n.h2,{id:"glean-search-api",children:"Glean Search API"}),"\n",(0,r.jsx)(n.p,{children:"This component allows you to call the Glean Search API."}),"\n",(0,r.jsxs)(n.p,{children:["It returns a list of search results as a ",(0,r.jsx)(n.a,{href:"/data-types#dataframe",children:(0,r.jsx)(n.code,{children:"DataFrame"})}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"glean-search-api-parameters",children:"Glean Search API parameters"}),"\n",(0,r.jsxs)(n.p,{children:["Some ",(0,r.jsx)(n.strong,{children:"Glean Search API"})," component input parameters are hidden by default in the visual editor.\nYou can toggle parameters through the ",(0,r.jsx)(l.A,{name:"SlidersHorizontal","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Controls"})," in the ",(0,r.jsx)(n.a,{href:"/concepts-components#component-menus",children:"component's header menu"}),"."]}),"\n",(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:"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:"glean_api_url"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:"Input parameter. The URL of the Glean API."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"glean_access_token"}),(0,r.jsx)(n.td,{children:"SecretString"}),(0,r.jsx)(n.td,{children:"Input parameter. An access token for Glean API authentication."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"query"}),(0,r.jsx)(n.td,{children:"String"}),(0,r.jsx)(n.td,{children:"Input parameter. The search query input."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"page_size"}),(0,r.jsx)(n.td,{children:"Integer"}),(0,r.jsx)(n.td,{children:"Input parameter. The number of results per page. Default: 10."})]}),(0,r.jsxs)(n.tr,{children:[(0,r.jsx)(n.td,{children:"request_options"}),(0,r.jsx)(n.td,{children:"Dict"}),(0,r.jsx)(n.td,{children:"Input parameter. Additional options for the API request."})]})]})]}),"\n",(0,r.jsx)(n.h2,{id:"see-also",children:"See also"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsxs)(n.a,{href:"/components-data#web-search",children:[(0,r.jsx)(n.strong,{children:"Web Search"})," component"]})}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},17886:(e,n,t)=>{t.d(n,{A:()=>a});t(96540);var s=t(64058),r=t(74848);function a({name:e,...n}){const t=s[e];return t?(0,r.jsx)(t,{...n}):null}}}]); \ No newline at end of file diff --git a/assets/js/main.14a877c9.js b/assets/js/main.14a877c9.js deleted file mode 100644 index cbee42c8f3..0000000000 --- a/assets/js/main.14a877c9.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see main.14a877c9.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),s=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)?s(r.call(e)):s(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 s=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 s.name="Invariant Violation",s}}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 s=Object.prototype.hasOwnProperty.bind(t),l=0;l{"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="",_={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(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,s="",l=!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(_[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?s="\n ".concat(h).concat(s):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 E=c.split("\n");if(E.length>30)for(E[26]="".concat(w,"...").concat(S);E.length>27;)E.pop();return"".concat(_.notIdentical,"\n\n").concat(E.join("\n"),"\n")}p>3&&(s="\n".concat(w,"...").concat(S).concat(s),l=!0),""!==o&&(s="\n ".concat(o).concat(s),o="");var O=0,A=_[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),l=!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),l=!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),l=!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=_[o];"notDeepEqual"===o||"notEqual"===o?(m="".concat(_[o],"\n\n").concat(m)).length>1024&&(m="".concat(m.slice(0,1021),"...")):(h="".concat(j(s)),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=l,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=s,t.operator=o,Error.captureStackTrace&&Error.captureStackTrace(u(t),a),t.stack,t.name="AssertionError",c(t)}return i=v,(l=[{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}))}}])&&s(i.prototype,l),d&&s(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},s={};function l(e){return r.isMemo(e)?i:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[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 s=l(t),h=l(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:"/data-types",from:["/guides-data-message","/configuration-objects"]},{to:"/concepts-flows",from:["/travel-planning-agent","/starter-projects-travel-planning-agent","/tutorials-travel-planning-agent","/starter-projects-dynamic-agent/","/simple-agent","/math-agent","/starter-projects-simple-agent","/starter-projects-math-agent","/tutorials-math-agent","/sequential-agent","/starter-projects-sequential-agent","/tutorials-sequential-agent","/memory-chatbot","/starter-projects-memory-chatbot","/tutorials-memory-chatbot","/financial-report-parser","/document-qa","/starter-projects-document-qa","/tutorials-document-qa","/blog-writer","/starter-projects-blog-writer","/tutorials-blog-writer","/basic-prompting","/starter-projects-basic-prompting","/vector-store-rag","/starter-projects-vector-store-rag"]},{to:"/components-vector-stores",from:"/components-rag"},{to:"/api-keys-and-authentication",from:["/configuration-api-keys","/configuration-authentication","/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:"/contributing-github-issues",from:"/contributing-github-discussions"},{to:"/agents",from:"/agents-tool-calling-agent-component"},{to:"/concepts-publish",from:"/embedded-chat-widget"},{to:"/bundles-google",from:"/integrations-setup-google-oauth-langflow"},{to:"/bundles-vertexai",from:"/integrations-setup-google-cloud-vertex-ai-langflow"},{to:"/develop-application",from:"/develop-overview"},{to:"/data-types",from:"/concepts-objects"}]}],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:{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,s(function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),l(c,i(e,u,d)),1===e?(l(a,{transition:"none",opacity:1}),a.offsetWidth,setTimeout(function(){l(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),s=e?"-100":a(n.status||0),c=document.querySelector(r.parent);return l(i,{transition:"all 0 linear",transform:"translate3d("+s+"%,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 s=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),l=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__"),s=Object,l=s.getPrototypeOf;e.exports=i&&"function"==typeof i.get?o([i.get]):"function"==typeof l&&function(e){return l(null==e?e:s(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;rs(l,n))cs(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[i]=n,r=i);else{if(!(cs(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function s(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 l=performance;t.unstable_now=function(){return l.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(_);else{var t=a(p);null!==t&&L(S,t.startTime-e)}}function _(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 s=o(m.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?m.callback=s:m===a(d)&&i(d),k(n)}else i(d);m=a(d)}if(null!==m)var l=!0;else{var c=a(p);null!==c&&L(S,c.startTime-n),l=!1}return l}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 E,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=s,o(d,e),b||g||(b=!0,D(_))),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,s=0,l="",c=t&&t.delimiter||"/";null!=(n=o.exec(e));){var u=n[0],p=n[1],f=n.index;if(l+=e.slice(s,f),s=f+u.length,p)l+=p[1];else{var m=e[s],h=n[2],g=n[3],b=n[4],y=n[5],v=n[6],w=n[7];l&&(r.push(l),l="");var x=null!=h&&null!=m&&m!==h,k="+"===v||"*"===v,S="?"===v||"*"===v,_=h||c,E=b||y,j=h||("string"==typeof r[r.length-1]?r[r.length-1]:"");r.push({name:g||a++,prefix:h||"",delimiter:_,optional:S,repeat:k,partial:x,asterisk:!!w,pattern:E?d(E):w?".*":i(_,j)})}}return s-1?"[^"+u(e)+"]+?":u(t)+"|(?:(?!"+u(t)+")[^"+u(e)+"])+?"}function s(e){return encodeURI(e).replace(/[\/?#]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})}function l(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 s(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(s.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)})}s.silent=!1,e.exports=s},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),s=n(56347),l=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,s.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,l.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){return(0,u.jsx)("button",{type:"button","aria-label":(0,l.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 E={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)(E.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)(_,{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,l.T)({message:"system mode",id:"theme.colorToggle.ariaLabel.mode.system",description:"The name for the system color mode"});case"light":return(0,l.T)({message:"light mode",id:"theme.colorToggle.ariaLabel.mode.light",description:"The name for the light color mode"});case"dark":return(0,l.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,l.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 se(){const e=(0,C.M)();return(0,u.jsx)("button",{type:"button","aria-label":(0,l.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 le(){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)(se,{})]})}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:s,...l}){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:s?p:r,...l,...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)},...l,...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,l.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,l.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 _e({items:e,className:t,position:n,onClick:a,...i}){const l=function(){const{siteConfig:{baseUrl:e}}=(0,we.A)(),{pathname:t}=(0,s.zy)();return t.replace(e,"/")}(),c=(0,ve.ys)(i.to,l),d=ke(e,l),{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 Ee({items:e,position:t,className:n,onClick:a,...i}){const s=(0,r.useRef)(null),[l,c]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{const e=e=>{s.current&&!s.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)}},[s]),(0,u.jsxs)("div",{ref:s,className:(0,o.A)("navbar__item","dropdown","dropdown--hoverable",{"dropdown--right":"right"===t,"dropdown--show":l}),children:[(0,u.jsx)(me,{"aria-haspopup":"true","aria-expanded":l,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(!l))},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?_e:Ee;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,l.T)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"}),buttonAriaLabel:(0,l.T)({id:"theme.SearchBar.label",message:"Search",description:"The ARIA label and placeholder for search button"})},modal:{searchBox:{resetButtonTitle:(0,l.T)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),resetButtonAriaLabel:(0,l.T)({id:"theme.SearchModal.searchBox.resetButtonTitle",message:"Clear the query",description:"The label and ARIA label for search box reset button"}),cancelButtonText:(0,l.T)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"}),cancelButtonAriaLabel:(0,l.T)({id:"theme.SearchModal.searchBox.cancelButtonText",message:"Cancel",description:"The label and ARIA label for search box cancel button"})},startScreen:{recentSearchesTitle:(0,l.T)({id:"theme.SearchModal.startScreen.recentSearchesTitle",message:"Recent",description:"The title for recent searches"}),noRecentSearchesText:(0,l.T)({id:"theme.SearchModal.startScreen.noRecentSearchesText",message:"No recent searches",description:"The text when no recent searches"}),saveRecentSearchButtonTitle:(0,l.T)({id:"theme.SearchModal.startScreen.saveRecentSearchButtonTitle",message:"Save this search",description:"The label for save recent search button"}),removeRecentSearchButtonTitle:(0,l.T)({id:"theme.SearchModal.startScreen.removeRecentSearchButtonTitle",message:"Remove this search from history",description:"The label for remove recent search button"}),favoriteSearchesTitle:(0,l.T)({id:"theme.SearchModal.startScreen.favoriteSearchesTitle",message:"Favorite",description:"The title for favorite searches"}),removeFavoriteSearchButtonTitle:(0,l.T)({id:"theme.SearchModal.startScreen.removeFavoriteSearchButtonTitle",message:"Remove this search from favorites",description:"The label for remove favorite search button"})},errorScreen:{titleText:(0,l.T)({id:"theme.SearchModal.errorScreen.titleText",message:"Unable to fetch results",description:"The title for error screen of search modal"}),helpText:(0,l.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,l.T)({id:"theme.SearchModal.footer.selectText",message:"to select",description:"The explanatory text of the action for the enter key"}),selectKeyAriaLabel:(0,l.T)({id:"theme.SearchModal.footer.selectKeyAriaLabel",message:"Enter key",description:"The ARIA label for the Enter key button that makes the selection"}),navigateText:(0,l.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,l.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,l.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,l.T)({id:"theme.SearchModal.footer.closeText",message:"to close",description:"The explanatory text of the action for Escape key"}),closeKeyAriaLabel:(0,l.T)({id:"theme.SearchModal.footer.closeKeyAriaLabel",message:"Escape key",description:"The ARIA label for the Escape key button that close the modal"}),searchByText:(0,l.T)({id:"theme.SearchModal.footer.searchByText",message:"Search by",description:"The text explain that the search is making by Algolia"})},noResultsScreen:{noResultsText:(0,l.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,l.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,l.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,l.T)({id:"theme.SearchModal.noResultsScreen.reportMissingResultsLinkText",message:"Let us know.",description:"The text for the link to report missing results"})}},placeholder:(0,l.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(416)]).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)(l.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,s.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])}(),l=(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(!l.current){const e=document.createElement("div");l.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&&l.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}),l.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,s.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,l.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,s.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,l.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)(l.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)(le,{}),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:s}=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+l{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,l.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,!s&&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 st=n(70440);const lt={errorBoundaryError:"errorBoundaryError_a6uf",errorBoundaryFallback:"errorBoundaryFallback_VBag"};function ct(e){return(0,u.jsx)("button",{type:"button",...e,children:(0,u.jsx)(l.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,st.rA)(e).map(e=>e.message).join("\n\nCause:\n");return(0,u.jsx)("p",{className:lt.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,l.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,...s}=e,l=(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:l},...s,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 _t(){return(0,u.jsx)("span",{className:"footer__link-separator",children:"\xb7"})}function Et({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)(Et,{item:t}),e.length!==n+1&&(0,u.jsx)(_t,{})]},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:"21px",bottom:"21px",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)(l.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:s,description:l}=e;return(0,b.J)(),(0,u.jsxs)(Ft,{children:[(0,u.jsx)(i.be,{title:s,description:l}),(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(/[#?]/),s="/"===i||i===r?i:(l=i,c=n,c?o(l):a(l));var l,c;return e.replace(i,s)},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),s=n(75795);if(a){var l=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=s(e,"lastIndex");if(!(t&&i(t,"value")))return!1;try{l(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),s=n(74848);const l=({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,s.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:s}=t,{plugin:u}=(0,a.A)();return{format:t=>e({title:t,siteTitle:n,titleDelimiter:s,plugin:u,defaultFormatter:l})}}},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}},s={selectors:[{selector:"h1, h2, h3, h4, h5, h6",eventName:"Scroll - Heading Viewed",properties:{element_type:"heading"}}]};function l(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(s){o.warn(`Scroll tracking: Error executing function for property "${r}":`,s)}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(s){o.warn(`Scroll tracking: Error executing helper "${t}" for property "${r}":`,s)}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=l(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}({...s,...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"),s=Symbol.for("react.provider"),l=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},_={key:!0,ref:!0,__self:!0,__source:!0};function E(e,t,r){var o,a={},i=null,s=null;if(null!=t)for(o in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(i=""+t.key),t)k.call(t,o)&&!_.hasOwnProperty(o)&&(a[o]=t[o]);var l=arguments.length-2;if(1===l)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,s=i.length;-1!==n.code.indexOf(o=t(r,s));)++s;return i[s]=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(s){for(var l=0;l=a.length);l++){var c=s[l];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?s.splice.apply(s,[l,1].concat(y)):c.content=y}}else c.content&&i(c.content)}return s}(n.tokens)}}}})}(Prism)},20311:e=>{"use strict";e.exports=function(e,t,n,r,o,a,i,s){if(!e){var l;if(void 0===t)l=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,s],u=0;(l=new Error(t.replace(/%s/g,function(){return c[u++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}}},21020:(e,t,n)=>{"use strict";var r=n(96540),o=Symbol.for("react.element"),a=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={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)&&!l.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:s.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 s={themedComponent:"themedComponent_mlkZ","themedComponent--light":"themedComponent--light_NVdE","themedComponent--dark":"themedComponent--dark_xIcU"};var l=n(74848);function c({className:e,children:t}){const n=(0,a.A)(),{colorMode:c}=(0,i.G)();return(0,l.jsx)(l.Fragment,{children:(n?"dark"===c?["dark"]:["light"]:["light","dark"]).map(n=>{const a=t({theme:n,className:(0,o.A)(e,s.themedComponent,s[`themedComponent--${n}`])});return(0,l.jsx)(r.Fragment,{children:a},n)})})}function u(e){const{sources:t,className:n,alt:r,...o}=e;return(0,l.jsx)(c,{className:n,children:({theme:e,className:n})=>(0,l.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),s=n(96763);function l({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(l({message:e,id:t}),n)}function u({children:e,id:t,values:n}){if(e&&"string"!=typeof e)throw s.warn("Illegal children",e),new Error("The Docusaurus component only accept simple string values");const r=l({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),s=n(4784),l=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),_=n(32131),E=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,_.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:E.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=l.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 se=n(96763);function le({children:e}){return"hash"===s.A.future.experimental_router?(0,f.jsx)(i.I9,{children:e}):(0,f.jsx)(i.Kd,{children:e})}const ce=Boolean(!0);if(l.A.canUseDOM){window.docusaurus=ie;const e=document.getElementById("__docusaurus"),t=(0,f.jsx)(a.vd,{children:(0,f.jsx)(le,{children:(0,f.jsx)(Z,{})})}),n=(e,t)=>{se.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),s=n(6342),l=n(89532),c=n(74848);const u=r.createContext(void 0);function d(){const e=function(){const e=(0,o.YL)(),{items:t}=(0,s.p)().navbar;return 0===t.length&&!e.component}(),t=(0,a.l)(),n=!e&&"mobile"===t,[i,l]=(0,r.useState)(!1),c=(0,r.useCallback)(()=>{l(e=>!e)},[]);return(0,r.useEffect)(()=>{"desktop"===t&&l(!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 l.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
.

For more information about using embedding model components in flows, see Embedding Model components.

AI/ML API Embeddings parameters

-

Some AI/ML API Embeddings component input parameters are hidden by default in the visual editor. -You can toggle parameters through the Controls in the component's header menu.

+

Some parameters are hidden by default in the visual editor. +You can modify all parameters through the Controls in the component's header menu.

NameTypeDescription
model_nameStringInput parameter. The name of the AI/ML embedding model to use.
aiml_api_keySecretStringInput parameter. The API key required for authenticating with the AI/ML service.
Search
diff --git a/bundles-anthropic.html b/bundles-anthropic.html index ae833c3dd9..875ad6e3a3 100644 --- a/bundles-anthropic.html +++ b/bundles-anthropic.html @@ -23,8 +23,8 @@ - - + + @@ -54,11 +54,11 @@

The Anthropic component generates text using Anthropic Chat and Language models like Claude.

It can output either a Model Response (Message) or a Language Model (LanguageModel). Specifically, the Language Model output is an instance of ChatAnthropic configured according to the component's parameters.

-

Use the Language Model output when you want to use an Anthropic model as the LLM for another LLM-driven component, such as a Language Model or Smart Function component.

+

Use the Language Model output when you want to use an Anthropic model as the LLM for another LLM-driven component, such as an Agent or Smart Function component.

For more information, see Language Model components.

Anthropic text generation parameters

-

Many Anthropic component input parameters are hidden by default in the visual editor. -You can toggle parameters through the Controls in the component's header menu.

+

Some parameters are hidden by default in the visual editor. +You can modify all parameters through the Controls in the component's header menu.

NameTypeDescription
max_tokensIntegerInput parameter. The maximum number of tokens to generate. Set to 0 for unlimited tokens. Default: 4096.
modelStringInput parameter. The name of the Anthropic model to use. Options include various Claude 3 models.
anthropic_api_keySecretStringInput parameter. Your Anthropic API key for authentication.
temperatureFloatInput parameter. Controls randomness in the output. Default: 0.1.
anthropic_api_urlStringInput parameter. Endpoint of the Anthropic API. Defaults to https://api.anthropic.com if not specified (advanced).
prefillStringInput parameter. Prefill text to guide the model's response (advanced).

Cohere

Bundles contain custom components that support specific third-party integrations with Langflow.

This page describes the components that are available in the Cohere bundle.

For more information about Cohere features and functionality used by Cohere components, see the Cohere documentation.

-

Cohere text generation

+

Cohere text generation

This component generates text using Cohere's language models.

It can output either a Model Response (Message) or a Language Model (LanguageModel).

-

Use the Language Model output when you want to use a Cohere model as the LLM for another LLM-driven component, such as a Language Model or Smart Function component.

+

Use the Language Model output when you want to use a Cohere model as the LLM for another LLM-driven component, such as an Agent or Smart Function component.

For more information, see Language Model components.

Cohere text generation parameters

-

Many Cohere component input parameters are hidden by default in the visual editor. -You can toggle parameters through the Controls in the component's header menu.

-
NameTypeDescription
Cohere API KeySecretStringInput parameter. Your Cohere API key.
Max TokensIntegerInput parameter. Specifies the maximum number of tokens to generate. Defaults to 256.
TemperatureFloatInput parameter. Specifies the sampling temperature. Defaults to 0.75.
Input ValueStringInput parameter. Specifies the input text for text generation.
-

Cohere Embeddings

+

Some parameters are hidden by default in the visual editor. +You can modify all parameters through the Controls in the component's header menu.

+
NameTypeDescription
InputStringInput parameter. Specifies the input text for text generation.
System MessageStringInput parameter. A system message to pass to the model.
StreamBooleanInput parameter. Whether to stream the response. Only works in chat. Default: false.
Cohere API KeySecretStringInput parameter. Your Cohere API key.
TemperatureFloatInput parameter. Specifies the randomness of sampling. Lower values (near 0) are more deterministic, and higher values (near 1) are more creative. Defaults to 0.75.
+

Cohere Embeddings

The Cohere Embeddings component is used to load embedding models from Cohere.

For more information about using embedding model components in flows, see Embedding Model components.

Cohere Embeddings parameters

-
NameTypeDescription
cohere_api_keyStringInput parameter. The API key required to authenticate with the Cohere service.
modelStringInput parameter. The language model used for embedding text documents and performing queries. Default: embed-english-v2.0.
truncateBooleanInput parameter. Whether to truncate the input text to fit within the model's constraints. Default: false.
Search
diff --git a/bundles-datastax.html b/bundles-datastax.html index f31af59b30..44b650691e 100644 --- a/bundles-datastax.html +++ b/bundles-datastax.html @@ -23,8 +23,8 @@ - - + + diff --git a/bundles-deepseek.html b/bundles-deepseek.html index b507b2cfd6..5e1b620e1a 100644 --- a/bundles-deepseek.html +++ b/bundles-deepseek.html @@ -23,8 +23,8 @@ - - + + @@ -53,11 +53,11 @@

DeepSeek text generation

The DeepSeek component generates text using DeepSeek's language models.

It can output either a Model Response (Message) or a Language Model (LanguageModel).

-

Use the Language Model output when you want to use a DeepSeek model as the LLM for another LLM-driven component, such as a Language Model or Smart Function component.

+

Use the Language Model output when you want to use a DeepSeek model as the LLM for another LLM-driven component, such as an Agent or Smart Function component.

For more information, see Language Model components.

DeepSeek text generation parameters

-

Many DeepSeek component input parameters are hidden by default in the visual editor. -You can toggle parameters through the Controls in the component's header menu.

+

Some parameters are hidden by default in the visual editor. +You can modify all parameters through the Controls in the component's header menu.

NameTypeDescription
max_tokensIntegerInput parameter. Maximum number of tokens to generate. Set to 0 for unlimited. Range: 0-128000.
model_kwargsDictionaryInput parameter. Additional keyword arguments for the model.
json_modeBooleanInput parameter. If true, outputs JSON regardless of passing a schema.
model_nameStringInput parameter. The DeepSeek model to use. Default: deepseek-chat.
api_baseStringInput parameter. Base URL for API requests. Default: https://api.deepseek.com.
api_keySecretStringInput parameter. Your DeepSeek API key for authentication.
temperatureFloatInput parameter. Controls randomness in responses. Range: [0.0, 2.0]. Default: 1.0.
seedIntegerInput parameter. Number initialized for random number generation. Use the same seed integer for more reproducible results, and use a different seed number for more random results.
Search
diff --git a/bundles-lmstudio.html b/bundles-lmstudio.html index 5a10376223..b615f181f0 100644 --- a/bundles-lmstudio.html +++ b/bundles-lmstudio.html @@ -23,8 +23,8 @@ - - + + @@ -53,18 +53,18 @@ Components can require authentication with an LM Studio API key. For information

LM Studio text generation

The LM Studio component generates text using LM Studio's local language models.

It can output either a Model Response (Message) or a Language Model (LanguageModel).

-

Use the Language Model output when you want to use an LM Studio model as the LLM for another LLM-driven component, such as a Language Model or Smart Function component.

+

Use the Language Model output when you want to use an LM Studio model as the LLM for another LLM-driven component, such as an Agent or Smart Function component.

For more information, see Language Model components.

LM Studio text generation parameters

-

Many LM Studio component input parameters are hidden by default in the visual editor. -You can toggle parameters through the Controls in the component's header menu.

+

Some parameters are hidden by default in the visual editor. +You can modify all parameters through the Controls in the component's header menu.

NameTypeDescription
base_urlStringInput parameter. The URL where LM Studio is running. Default: "http://localhost:1234".
api_keyLM Studio API KeyInput parameter. The API key for authentication with LM Studio, if required.
max_tokensIntegerInput parameter. Maximum number of tokens to generate in the response. Default: 512.
temperatureFloatInput parameter. Controls randomness in the output. Range: [0.0, 2.0]. Default: 0.7.
top_pFloatInput parameter. Controls diversity with nucleus sampling. Range: [0.0, 1.0]. Default: 1.0.
stopList[String]Input parameter. List of strings that stop generation when encountered.
streamBooleanInput parameter. Whether to stream the response. Default: false.
presence_penaltyFloatInput parameter. Penalizes repeated tokens. Range: [-2.0, 2.0]. Default: 0.0.
frequency_penaltyFloatInput parameter. Penalizes frequent tokens. Range: [-2.0, 2.0]. Default: 0.0.

LM Studio Embeddings

The LM Studio Embeddings component generates embeddings using LM Studio models.

For more information about using embedding model components in flows, see Embedding Model components.

LM Studio Embeddings parameters

-

Many LM Studio Embeddings component input parameters are hidden by default in the visual editor. -You can toggle parameters through the Controls in the component's header menu.

+

Some parameters are hidden by default in the visual editor. +You can modify all parameters through the Controls in the component's header menu.

NameDisplay NameInfo
modelModelInput parameter. The LM Studio model to use for generating embeddings.
base_urlLM Studio Base URLInput parameter. The base URL for the LM Studio API.
api_keyLM Studio API KeyInput parameter. The API key for authentication with LM Studio.
temperatureModel TemperatureInput parameter. The temperature setting for the model.
Search
diff --git a/bundles-ollama.html b/bundles-ollama.html index 5723a9ef46..e715cd53dd 100644 --- a/bundles-ollama.html +++ b/bundles-ollama.html @@ -23,8 +23,8 @@ - - + + @@ -71,7 +71,7 @@ The default base URL is http://127.0.0.1:11434.

  • Connect the Ollama component to other components in the flow, depending on how you want to use the model.

    -

    Language Model components can output either a Model Response (Message) or a Language Model (LanguageModel). Use the Language Model output when you want to use an Ollama model as the LLM for another LLM-driven component, such as a Language Model or Smart Function component. For more information, see Language Model components.

    +

    Language model components can output either a Model Response (Message) or a Language Model (LanguageModel). Use the Language Model output when you want to use an Ollama model as the LLM for another LLM-driven component, such as an Agent or Smart Function component. For more information, see Language Model components.

    In the following example, the flow uses LanguageModel output to use an Ollama model as the LLM for an Agent component.

    Ollama component used as the LLM in an agent flow

  • diff --git a/bundles-openai.html b/bundles-openai.html index 4f53e30bbb..ef20e0e455 100644 --- a/bundles-openai.html +++ b/bundles-openai.html @@ -23,8 +23,8 @@ - - + + @@ -54,19 +54,19 @@

    The OpenAI component generates text using OpenAI's language models.

    It provides access to the same OpenAI models that are available in the core Language Model component, but the OpenAI component provides additional parameters for customizing the request to the OpenAI API.

    It can output either a Model Response (Message) or a Language Model (LanguageModel).

    -

    Use the Language Model output when you want to use a specific OpenAI model configuration as the LLM for another LLM-driven component, such as a Language Model or Smart Function component.

    +

    Use the Language Model output when you want to use a specific OpenAI model configuration as the LLM for another LLM-driven component, such as an Agent or Smart Function component.

    For more information, see Language Model components.

    OpenAI text generation parameters

    -

    Many OpenAI component input parameters are hidden by default in the visual editor. -You can toggle parameters through the Controls in the component's header menu.

    +

    Some parameters are hidden by default in the visual editor. +You can modify all parameters through the Controls in the component's header menu.

    NameTypeDescription
    api_keySecretStringInput parameter. Your OpenAI API Key.
    modelStringInput parameter. The name of the OpenAI model to use. Options include "gpt-3.5-turbo" and "gpt-4".
    max_tokensIntegerInput parameter. The maximum number of tokens to generate. Set to 0 for unlimited tokens.
    temperatureFloatInput parameter. Controls randomness in the output. Range: [0.0, 1.0]. Default: 0.7.
    top_pFloatInput parameter. Controls the nucleus sampling. Range: [0.0, 1.0]. Default: 1.0.
    frequency_penaltyFloatInput parameter. Controls the frequency penalty. Range: [0.0, 2.0]. Default: 0.0.
    presence_penaltyFloatInput parameter. Controls the presence penalty. Range: [0.0, 2.0]. Default: 0.0.

    OpenAI Embeddings

    The OpenAI Embeddings component uses OpenAI embedding models for embedding generation.

    It provides access to the same OpenAI models that are available in the core Embedding Model component, but the OpenAI Embeddings component provides additional parameters for customizing the request to the OpenAI embedding API.

    For more information about using embedding model components in flows, see Embedding Model components.

    OpenAI Embeddings parameters

    -

    Many OpenAI Embeddings component input parameters are hidden by default in the visual editor. -You can toggle parameters through the Controls in the component's header menu.

    +

    Some parameters are hidden by default in the visual editor. +You can modify all parameters through the Controls in the component's header menu.

    NameTypeDescription
    OpenAI API KeyStringInput parameter. The API key to use for accessing the OpenAI API.
    Default HeadersDictInput parameter. The default headers for the HTTP requests.
    Default QueryNestedDictInput parameter. The default query parameters for the HTTP requests.
    Allowed SpecialListInput parameter. The special tokens allowed for processing. Default: [].
    Disallowed SpecialListInput parameter. The special tokens disallowed for processing. Default: ["all"].
    Chunk SizeIntegerInput parameter. The chunk size for processing. Default: 1000.
    ClientAnyInput parameter. The HTTP client for making requests.
    DeploymentStringInput parameter. The deployment name for the model. Default: text-embedding-3-small.
    Embedding Context LengthIntegerInput parameter. The length of embedding context. Default: 8191.
    Max RetriesIntegerInput parameter. The maximum number of retries for failed requests. Default: 6.
    ModelStringInput parameter. The name of the model to use. Default: text-embedding-3-small.
    Model KwargsNestedDictInput parameter. Additional keyword arguments for the model.
    OpenAI API BaseStringInput parameter. The base URL of the OpenAI API.
    OpenAI API TypeStringInput parameter. The type of the OpenAI API.
    OpenAI API VersionStringInput parameter. The version of the OpenAI API.
    OpenAI OrganizationStringInput parameter. The organization associated with the API key.
    OpenAI ProxyStringInput parameter. The proxy server for the requests.
    Request TimeoutFloatInput parameter. The timeout for the HTTP requests.
    Show Progress BarBooleanInput parameter. Whether to show a progress bar for processing. Default: false.
    Skip EmptyBooleanInput parameter. Whether to skip empty inputs. Default: false.
    TikToken EnableBooleanInput parameter. Whether to enable TikToken. Default: true.
    TikToken Model NameStringInput parameter. The name of the TikToken model.

    See also

      diff --git a/bundles-openrouter.html b/bundles-openrouter.html index 9f74ada668..79c0a4582d 100644 --- a/bundles-openrouter.html +++ b/bundles-openrouter.html @@ -23,8 +23,8 @@ - - + + @@ -53,11 +53,11 @@

      OpenRouter text generation

      This component generates text using OpenRouter's unified API for multiple AI models from different providers.

      It can output either a Model Response (Message) or a Language Model (LanguageModel).

      -

      Use the Language Model output when you want to use an OpenRouter model as the LLM for another LLM-driven component, such as a Language Model or Smart Function component.

      +

      Use the Language Model output when you want to use an OpenRouter model as the LLM for another LLM-driven component, such as an Agent or Smart Function component.

      For more information, see Language Model components.

      OpenRouter text generation parameters

      -

      Many OpenRouter component input parameters are hidden by default in the visual editor. -You can toggle parameters through the Controls in the component's header menu.

      +

      Some parameters are hidden by default in the visual editor. +You can modify all parameters through the Controls in the component's header menu.

      NameTypeDescription
      api_keySecretStringInput parameter. Your OpenRouter API key for authentication.
      site_urlStringInput parameter. Your site URL for OpenRouter rankings (advanced).
      app_nameStringInput parameter. Your app name for OpenRouter rankings (advanced).
      providerStringInput parameter. The AI model provider to use.
      model_nameStringInput parameter. The specific model to use for chat completion.
      temperatureFloatInput parameter. Controls randomness in the output. Range: [0.0, 2.0]. Default: 0.7.
      max_tokensIntegerInput parameter. The maximum number of tokens to generate (advanced).
    -
    Text Embedder

    The Text Embedder component is replaced by the Embedding Model component.

    This component generates embeddings for a given message using a specified embedding model.

    It accepts the following parameters:

    NameDisplay NameInfo
    embedding_modelEmbedding ModelInput parameter. The embedding model to use for generating embeddings.
    messageMessageInput parameter. The message for which to generate embeddings.
    embeddingsEmbedding DataOutput parameter. A data object containing the original text and its embedding vector.