Files
langflow/components-processing.html
github-merge-queue[bot] 6421f7a4b6 deploy: 483af5b090
2025-07-30 20:22:13 +00:00

435 lines
122 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!doctype html>
<html lang="en" dir="ltr" class="docs-wrapper plugin-docs plugin-id-default docs-version-current docs-doc-page docs-doc-id-Components/components-processing" data-has-hydrated="false">
<head>
<meta charset="UTF-8">
<meta name="generator" content="Docusaurus v3.8.1">
<title data-rh="true">Processing components | Langflow Documentation</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://docs.langflow.org/components-processing"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docusaurus_version" content="current"><meta data-rh="true" name="docusaurus_tag" content="docs-default-current"><meta data-rh="true" name="docsearch:version" content="current"><meta data-rh="true" name="docsearch:docusaurus_tag" content="docs-default-current"><meta data-rh="true" property="og:title" content="Processing components | Langflow Documentation"><meta data-rh="true" name="description" content="Langflow&#x27;s processing components process and transform data within a flow."><meta data-rh="true" property="og:description" content="Langflow&#x27;s processing components process and transform data within a flow."><link data-rh="true" rel="icon" href="/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://docs.langflow.org/components-processing"><link data-rh="true" rel="alternate" href="https://docs.langflow.org/components-processing" hreflang="en"><link data-rh="true" rel="alternate" href="https://docs.langflow.org/components-processing" hreflang="x-default"><link data-rh="true" rel="preconnect" href="https://UZK6BDPCVY-dsn.algolia.net" crossorigin="anonymous"><script data-rh="true" type="application/ld+json">{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Processing components","item":"https://docs.langflow.org/components-processing"}]}</script><link rel="preconnect" href="https://www.google-analytics.com">
<link rel="preconnect" href="https://www.googletagmanager.com">
<script async src="https://www.googletagmanager.com/gtag/js?id=G-SLQFLQ3KPT"></script>
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","G-SLQFLQ3KPT",{})</script>
<link rel="search" type="application/opensearchdescription+xml" title="Langflow Documentation" href="/opensearch.xml">
<script>!function(){var e="analytics",t=window[e]=window[e]||[];if(!t.initialize)if(t.invoked)window.console&&console.error&&console.error("Segment snippet included twice.");else{t.invoked=!0,t.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","screen","once","off","on","addSourceMiddleware","addIntegrationMiddleware","setAnonymousId","addDestinationMiddleware","register"],t.factory=function(n){return function(){if(window[e].initialized)return window[e][n].apply(window[e],arguments);var r=Array.prototype.slice.call(arguments);if(["track","screen","alias","group","page","identify"].indexOf(n)>-1){var i=document.querySelector("link[rel='canonical']");r.push({__t:"bpc",c:i&&i.getAttribute("href")||void 0,p:location.pathname,u:location.href,s:location.search,t:document.title,r:document.referrer})}return r.unshift(n),t.push(r),t}};for(var n=0;n<t.methods.length;n++){var r=t.methods[n];t[r]=t.factory(r)}t.load=function(n,r){var i=document.createElement("script");i.type="text/javascript",i.async=!0,i.setAttribute("data-global-segment-analytics-key",e),i.src="https://cdn.segment.com/analytics.js/v1/"+n+"/analytics.min.js";var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(i,a),t._loadOptions=r},t._writeKey="60AfGDrVxy8nAGJngo3fCYWG4LvhMAlG",t.SNIPPET_VERSION="5.2.0",t.load("60AfGDrVxy8nAGJngo3fCYWG4LvhMAlG"),t.page()}}()</script>
<script>window.__SCROLL_TRACKING_CONFIG__={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"}}]}</script>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Sora:wght@550;600&amp;display=swap">
<script>!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)}()</script>
<script defer="true">!function(){const e=e=>{if(window.gtag&&e.purposes&&"analytics"in e.purposes&&"targeted_advertising"in e.purposes){const n=!0===e.purposes.analytics?"granted":"denied",t=!0===e.purposes.targeted_advertising?"granted":"denied",a={analytics_storage:n,ad_personalization:t,ad_storage:t,ad_user_data:t};window.gtag("consent","update",a)}};window.ketch&&window.ketch("on","consent",e)}()</script><link rel="stylesheet" href="/assets/css/styles.e756ed1e.css">
<script src="/assets/js/runtime~main.9ab1be7e.js" defer="defer"></script>
<script src="/assets/js/main.a53144de.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;"><defs>
<symbol id="theme-svg-external-link" viewBox="0 0 24 24"><path fill="currentColor" d="M21 13v10h-21v-19h12v2h-10v15h17v-8h2zm3-12h-10.988l4.035 4-6.977 7.07 2.828 2.828 6.977-7.07 4.125 4.172v-11z"/></symbol>
</defs></svg>
<script>!function(){var t=function(){try{return new URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}}()||function(){try{return window.localStorage.getItem("theme")}catch(t){}}();document.documentElement.setAttribute("data-theme",t||(window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light")),document.documentElement.setAttribute("data-theme-choice",t||"system")}(),function(){try{const c=new URLSearchParams(window.location.search).entries();for(var[t,e]of c)if(t.startsWith("docusaurus-data-")){var a=t.replace("docusaurus-data-","data-");document.documentElement.setAttribute(a,e)}}catch(t){}}()</script><div id="__docusaurus"><div role="region" aria-label="Skip to main content"><a class="skipToContent_fXgn" href="#__docusaurus_skipToContent_fallback">Skip to main content</a></div><nav aria-label="Main" class="theme-layout-navbar navbar navbar--fixed-top navbarHideable_m1mJ"><div class="navbar__inner"><div class="theme-layout-navbar-left navbar__items"><button aria-label="Toggle navigation bar" aria-expanded="false" class="navbar__toggle clean-btn" type="button"><svg width="30" height="30" viewBox="0 0 30 30" aria-hidden="true"><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/"><div class="navbar__logo"><img src="/img/lf-docs-light.svg" alt="Langflow" class="themedComponent_mlkZ themedComponent--light_NVdE"><img src="/img/lf-docs-dark.svg" alt="Langflow" class="themedComponent_mlkZ themedComponent--dark_xIcU"></div></a></div><div class="theme-layout-navbar-right navbar__items navbar__items--right"><a href="https://github.com/langflow-ai/langflow" target="_blank" class="navbar__item navbar__link header-github-link" data-event="Docs.langflow.org - Social Clicked" data-platform="github"></a><a href="https://twitter.com/langflow_ai" target="_blank" class="navbar__item navbar__link header-twitter-link" data-event="Docs.langflow.org - Social Clicked" data-platform="x"></a><a href="https://discord.gg/EqksyE2EX9" target="_blank" class="navbar__item navbar__link header-discord-link" data-event="Docs.langflow.org - Social Clicked" data-platform="discord"></a><div class="toggle_vylO colorModeToggle_DEke"><button class="clean-btn toggleButton_gllP toggleButtonDisabled_aARS" type="button" disabled="" title="system mode" aria-label="Switch between dark and light mode (currently system mode)"><svg viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" class="toggleIcon_g3eP lightToggleIcon_pyhR"><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"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" class="toggleIcon_g3eP darkToggleIcon_wfgR"><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"></path></svg><svg viewBox="0 0 24 24" width="24" height="24" aria-hidden="true" class="toggleIcon_g3eP systemToggleIcon_QzmC"><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"></path></svg></button></div><div class="navbarSearchContainer_Bca1"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search (Command+K)"><span class="DocSearch-Button-Container"><svg width="20" height="20" class="DocSearch-Search-Icon" viewBox="0 0 20 20" aria-hidden="true"><path d="M14.386 14.386l4.0877 4.0877-4.0877-4.0877c-2.9418 2.9419-7.7115 2.9419-10.6533 0-2.9419-2.9418-2.9419-7.7115 0-10.6533 2.9418-2.9419 7.7115-2.9419 10.6533 0 2.9419 2.9418 2.9419 7.7115 0 10.6533z" stroke="currentColor" fill="none" fill-rule="evenodd" stroke-linecap="round" stroke-linejoin="round"></path></svg><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"></span></button></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div></nav><div id="__docusaurus_skipToContent_fallback" class="theme-layout-main main-wrapper mainWrapper_z2l0"><div class="docsWrapper_hBAB"><button aria-label="Scroll back to top" class="clean-btn theme-back-to-top-button backToTopButton_sjWU" type="button"></button><div class="docRoot_UBD9"><aside class="theme-doc-sidebar-container docSidebarContainer_YfHR"><div class="sidebarViewport_aRkj"><div class="sidebar_njMd sidebarWithHideableNavbar_wUlq"><a tabindex="-1" class="sidebarLogo_isFc" href="/"><img src="/img/lf-docs-light.svg" alt="Langflow" class="themedComponent_mlkZ themedComponent--light_NVdE"><img src="/img/lf-docs-dark.svg" alt="Langflow" class="themedComponent_mlkZ themedComponent--dark_xIcU"></a><nav aria-label="Docs sidebar" class="menu thin-scrollbar menu_SIkG"><ul class="theme-doc-sidebar-menu menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 menu__list-item"><a class="menu__link" href="/">Welcome to Langflow</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/about-langflow">Get started</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/concepts-overview">Flows</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/agents">Agents</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/mcp-client">Model Context Protocol (MCP)</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/api-keys-and-authentication">Develop</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/deployment-overview">Deploy</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret menu__link--active" role="button" aria-expanded="true" href="/concepts-components">Components reference</a></div><ul class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/concepts-components">Components overview</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret menu__link--active" role="button" aria-expanded="true" tabindex="0" href="/components-io">Core components</a></div><ul class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/components-io">Input / Output</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/components-agents">Agents</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-3 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" tabindex="0" href="/components-models">Models</a></div></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/components-data">Data</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/components-vector-stores">Vector Stores</a></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-3 menu__list-item"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret menu__link--active" role="button" aria-expanded="true" tabindex="0" href="/components-processing">Processing</a></div><ul class="menu__list"><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-4 menu__list-item"><a class="menu__link menu__link--active" aria-current="page" tabindex="0" href="/components-processing">Processing components</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-4 menu__list-item"><a class="menu__link" tabindex="0" href="/components-prompts">Prompt Template</a></li></ul></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/components-logic">Logic</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/components-helpers">Helpers</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/components-tools">Tools</a></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-3 menu__list-item"><a class="menu__link" tabindex="0" href="/components-memories">Memories</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-2 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" tabindex="0" href="/components-bundle-components">Bundles</a></div></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-2 menu__list-item"><a class="menu__link" tabindex="0" href="/components-custom-components">Create custom Python components</a></li></ul></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/api-reference-api-examples">API reference</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/contributing-community">Contribute</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/release-notes">Release notes</a></div></li><li class="theme-doc-sidebar-item-category theme-doc-sidebar-item-category-level-1 menu__list-item menu__list-item--collapsed"><div class="menu__list-item-collapsible"><a class="menu__link menu__link--sublist menu__link--sublist-caret" role="button" aria-expanded="false" href="/troubleshoot">Support</a></div></li><li class="theme-doc-sidebar-item-link theme-doc-sidebar-item-link-level-1 sidebar-ad">
<a href="https://www.langflow.org/desktop" target="_blank" class="menu__link">
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1645_37)">
<path d="M12 17H20C21.1046 17 22 16.1046 22 15V13M12 17H4C2.89543 17 2 16.1046 2 15V5C2 3.89543 2.89543 3 4 3H10M12 17V21M8 21H12M12 21H16M11.75 10.2917H13.2083L16.125 7.375H17.5833L20.5 4.45833H21.9583M16.125 11.75H17.5833L20.5 8.83333H21.9583M11.75 5.91667H13.2083L16.125 3H17.5833" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
</g>
<defs>
<clipPath id="clip0_1645_37">
<rect width="24" height="24" fill="white"/>
</clipPath>
</defs>
</svg>
<div class="sidebar-ad-text-container">
<span class="sidebar-ad-text">Get started in minutes</span>
<span class="sidebar-ad-text sidebar-ad-text-gradient">Download Langflow Desktop</span>
</div>
</a>
</li></ul></nav></div></div></aside><main class="docMainContainer_TBSr"><div class="container padding-top--md padding-bottom--lg"><div class="row"><div class="col docItemCol_VOVn"><div class="docItemContainer_Djhp"><article><nav class="theme-doc-breadcrumbs breadcrumbsContainer_Z_bl" aria-label="Breadcrumbs"><ul class="breadcrumbs"><li class="breadcrumbs__item"><a aria-label="Home page" class="breadcrumbs__link" href="/"><svg viewBox="0 0 24 24" class="breadcrumbHomeIcon_YNFT"><path d="M10 19v-5h4v5c0 .55.45 1 1 1h3c.55 0 1-.45 1-1v-7h1.7c.46 0 .68-.57.33-.87L12.67 3.6c-.38-.34-.96-.34-1.34 0l-8.36 7.53c-.34.3-.13.87.33.87H5v7c0 .55.45 1 1 1h3c.55 0 1-.45 1-1z" fill="currentColor"></path></svg></a></li><li class="breadcrumbs__item"><span class="breadcrumbs__link">Components reference</span></li><li class="breadcrumbs__item"><span class="breadcrumbs__link">Core components</span></li><li class="breadcrumbs__item"><span class="breadcrumbs__link">Processing</span></li><li class="breadcrumbs__item breadcrumbs__item--active"><span class="breadcrumbs__link">Processing components</span></li></ul></nav><div class="tocCollapsible_ETCw theme-doc-toc-mobile tocMobile_ITEo"><button type="button" class="clean-btn tocCollapsibleButton_TO0P">On this page</button></div><div class="theme-doc-markdown markdown"><header><h1>Processing components</h1></header><style>[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; }</style>
<!-- -->
<p>Langflow&#x27;s processing components process and transform data within a flow.
They have many uses, including:</p>
<ul>
<li>Feed instructions and context to your LLMs and agents with the <a href="#prompt-template"><strong>Prompt Template</strong> component</a>.</li>
<li>Extract content from larger chunks of data with a <a href="#parser"><strong>Parser</strong> component</a>.</li>
<li>Filter data with natural language with the <a href="#smart-function"><strong>Smart Function</strong> component</a>.</li>
<li>Save data to your local machine with the <a href="#save-file"><strong>Save File</strong> component</a>.</li>
<li>Transform data into a different data type with the <a href="#type-convert"><strong>Type Convert</strong> component</a> to pass it between incompatible components.</li>
</ul>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="prompt-template">Prompt Template<a href="#prompt-template" class="hash-link" aria-label="Direct link to Prompt Template" title="Direct link to Prompt Template"></a></h2>
<p>See <a href="/components-prompts">Prompt Template</a>.</p>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="batch-run">Batch Run<a href="#batch-run" class="hash-link" aria-label="Direct link to Batch Run" title="Direct link to Batch Run"></a></h2>
<p>The <strong>Batch Run</strong> component runs a language model over <em>each row of one text column</em> in a <a href="/data-types#dataframe"><code>DataFrame</code></a>, and then returns a new <code>DataFrame</code> with the original text and an LLM response.</p>
<p>The response contains the following columns:</p>
<ul>
<li><code>text_input</code>: The original text from the input <code>DataFrame</code></li>
<li><code>model_response</code>: The model&#x27;s response for each input</li>
<li><code>batch_index</code>: The 0-indexed processing order for all rows in the <code>DataFrame</code></li>
<li><code>metadata</code> (optional): Additional information about the processing</li>
</ul>
<h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="use-the-batch-run-component-in-a-flow">Use the Batch Run component in a flow<a href="#use-the-batch-run-component-in-a-flow" class="hash-link" aria-label="Direct link to Use the Batch Run component in a flow" title="Direct link to Use the Batch Run component in a flow"></a></h3>
<p>If you pass this output to a <a href="/components-processing#parser"><strong>Parser</strong> component</a>, you can use variables in the parsing template to reference these keys, such as <code>{text_input}</code> and <code>{model_response}</code>.
This is demonstrated in the following example.</p>
<p><img decoding="async" loading="lazy" alt="A batch run component connected to OpenAI and a Parser" src="/assets/images/component-batch-run-19c94fbb0646b2731b37013b84dff1f6.png" width="4000" height="2728" class="img_ev3q"></p>
<ol>
<li>
<p>Connect a <strong>Language Model</strong> component to a <strong>Batch Run</strong> component&#x27;s <strong>Language model</strong> port.</p>
</li>
<li>
<p>Connect <code>DataFrame</code> output from another component to the <strong>Batch Run</strong> component&#x27;s <strong>DataFrame</strong> input.
For example, you could connect a <strong>File</strong> component with a CSV file.</p>
</li>
<li>
<p>In the <strong>Batch Run</strong> component&#x27;s <strong>Column Name</strong> field, enter the name of the column in the incoming <code>DataFrame</code> that contains the text to process.
For example, if you want to extract text from a <code>name</code> column in a CSV file, enter <code>name</code> in the <strong>Column Name</strong> field.</p>
</li>
<li>
<p>Connect the <strong>Batch Run</strong> component&#x27;s <strong>Batch Results</strong> output to a <strong>Parser</strong> component&#x27;s <strong>DataFrame</strong> input.</p>
</li>
<li>
<p>Optional: In the <strong>Batch Run</strong> <a href="/concepts-components#component-menus">component&#x27;s header menu</a>, click <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sliders-horizontal" aria-hidden="true"><line x1="21" x2="14" y1="4" y2="4"></line><line x1="10" x2="3" y1="4" y2="4"></line><line x1="21" x2="12" y1="12" y2="12"></line><line x1="8" x2="3" y1="12" y2="12"></line><line x1="21" x2="16" y1="20" y2="20"></line><line x1="12" x2="3" y1="20" y2="20"></line><line x1="14" x2="14" y1="2" y2="6"></line><line x1="8" x2="8" y1="10" y2="14"></line><line x1="16" x2="16" y1="18" y2="22"></line></svg> <strong>Controls</strong>, enable the <strong>System Message</strong> parameter, click <strong>Close</strong>, and then enter an instruction for how you want the LLM to process each cell extracted from the file.
For example, <code>Create a business card for each name.</code></p>
</li>
<li>
<p>In the <strong>Parser</strong> component&#x27;s <strong>Template</strong> field, enter a template for processing the <strong>Batch Run</strong> component&#x27;s new <code>DataFrame</code> columns (<code>text_input</code>, <code>model_response</code>, and <code>batch_index</code>):</p>
<p>For example, this template uses three columns from the resulting, post-batch <code>DataFrame</code>:</p>
<div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>record_number: {batch_index}, name: {text_input}, summary: {model_response}</span></div></div><br></code></div></div>
</li>
<li>
<p>To test the processing, click the <strong>Parser</strong> component, and then click <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-play" aria-hidden="True"><polygon points="6 3 20 12 6 21 6 3"></polygon></svg> <strong>Run component</strong>, and then click <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-text-search" aria-hidden="True"><path d="M21 6H3"></path><path d="M10 12H3"></path><path d="M10 18H3"></path><circle cx="17" cy="15" r="3"></circle><path d="m21 19-1.9-1.9"></path></svg> <strong>Inspect output</strong> to view the final <code>DataFrame</code>.</p>
<p>You can also connect a <strong>Chat Output</strong> component to the <strong>Parser</strong> component if you want to see the output in the <strong>Playground</strong>.</p>
</li>
</ol>
<h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="batch-run-parameters">Batch Run parameters<a href="#batch-run-parameters" class="hash-link" aria-label="Direct link to Batch Run parameters" title="Direct link to Batch Run parameters"></a></h3>
<p>Some <strong>Batch Run</strong> component input parameters are hidden by default in the visual editor.
You can toggle parameters through the <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sliders-horizontal" aria-hidden="true"><line x1="21" x2="14" y1="4" y2="4"></line><line x1="10" x2="3" y1="4" y2="4"></line><line x1="21" x2="12" y1="12" y2="12"></line><line x1="8" x2="3" y1="12" y2="12"></line><line x1="21" x2="16" y1="20" y2="20"></line><line x1="12" x2="3" y1="20" y2="20"></line><line x1="14" x2="14" y1="2" y2="6"></line><line x1="8" x2="8" y1="10" y2="14"></line><line x1="16" x2="16" y1="18" y2="22"></line></svg> <strong>Controls</strong> in the <a href="/concepts-components#component-menus">component&#x27;s header menu</a>.</p>
<table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>model</td><td>HandleInput</td><td>Input parameter. Connect the &#x27;Language Model&#x27; output from your LLM component here. Required.</td></tr><tr><td>system_message</td><td>MultilineInput</td><td>Input parameter. A multi-line system instruction for all rows in the DataFrame.</td></tr><tr><td>df</td><td>DataFrameInput</td><td>Input parameter. The DataFrame whose column is treated as text messages, as specified by &#x27;column_name&#x27;. Required.</td></tr><tr><td>column_name</td><td>MessageTextInput</td><td>Input parameter. The name of the DataFrame column to treat as text messages. If empty, all columns are formatted in TOML.</td></tr><tr><td>output_column_name</td><td>MessageTextInput</td><td>Input parameter. Name of the column where the model&#x27;s response is stored. Default=<code>model_response</code>.</td></tr><tr><td>enable_metadata</td><td>BoolInput</td><td>Input parameter. If True, add metadata to the output DataFrame.</td></tr><tr><td>batch_results</td><td>DataFrame</td><td>Output parameter. A DataFrame with all original columns plus the model&#x27;s response column.</td></tr></tbody></table>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="data-operations">Data Operations<a href="#data-operations" class="hash-link" aria-label="Direct link to Data Operations" title="Direct link to Data Operations"></a></h2>
<p>The <strong>Data Operations</strong> component performs operations on <a href="/data-types#data"><code>Data</code></a> objects, including selecting keys, evaluating literals, combining data, filtering values, appending/updating data, removing keys, and renaming keys.</p>
<ol>
<li>
<p>To use the <strong>Data Operations</strong> component in a flow, you must connect its <strong>Data</strong> input port to the output port of a component that outputs <code>Data</code>.
All operations in the <strong>Data Operations</strong> component require at least one <code>Data</code> input.</p>
<p>For this example, add a <strong>Webhook</strong> component to the flow, and then connect it to a <strong>Data Operations</strong> component. Assume you&#x27;ll send requests to the webhook with a consistent payload that has <code>name</code>, <code>username</code>, and <code>email</code> keys.</p>
</li>
<li>
<p>In the <strong>Operations</strong> field, select the operation you want to perform on the incoming <code>Data</code>.
For this example, select the <strong>Select Keys</strong> operation to extract specific user information.</p>
</li>
<li>
<p>Add keys for <code>name</code>, <code>username</code>, and <code>email</code> to select those values from the incoming request payload.</p>
<p>To add additional keys, click <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-plus" aria-hidden="True"><path d="M5 12h14"></path><path d="M12 5v14"></path></svg> <strong>Add more</strong>.</p>
</li>
<li>
<p>Connect a <strong>Chat Output</strong> component.</p>
<p><img decoding="async" loading="lazy" alt="A flow with Webhook, Data Operations, and Chat Output components" src="/assets/images/component-data-operations-select-key-80bade862d29f2851b01ee26413d495f.png" width="4000" height="1920" class="img_ev3q"></p>
</li>
<li>
<p>To test the flow, send the following request to your flow&#x27;s webhook endpoint, and then open the <strong>Playground</strong> to see the resulting output from processing the payload.</p>
<div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->26</span><div style="display:inline-block;margin-left:16px"><span>curl -X POST &quot;http://$LANGFLOW_SERVER_URL/api/v1/webhook/$FLOW_ID&quot; \</span></div></div><div><span class="ch-code-line-number">_<!-- -->26</span><div style="display:inline-block;margin-left:16px"><span>-H &quot;Content-Type: application/json&quot; \</span></div></div><div><span class="ch-code-line-number">_<!-- -->26</span><div style="display:inline-block;margin-left:16px"><span>-H &quot;x-api-key: $LANGFLOW_API_KEY&quot; \</span></div></div><div><span class="ch-code-line-number">_<!-- -->26</span><div style="display:inline-block;margin-left:16px"><span>-d &#x27;{</span></div></div><div><span class="ch-code-line-number">_<!-- -->26</span><div style="display:inline-block;margin-left:16px"><span> &quot;id&quot;: 1,</span></div></div><div><span class="ch-code-line-number">_<!-- -->26</span><div style="display:inline-block;margin-left:16px"><span> &quot;name&quot;: &quot;Leanne Graham&quot;,</span></div></div><div><span class="ch-code-line-number">_<!-- -->26</span><div style="display:inline-block;margin-left:16px"><span> &quot;username&quot;: &quot;Bret&quot;,</span></div></div><div><span class="ch-code-line-number">_<!-- -->26</span><div style="display:inline-block;margin-left:16px"><span> &quot;email&quot;: &quot;Sincere@april.biz&quot;,</span></div></div><div><span class="ch-code-line-number">_<!-- -->26</span><div style="display:inline-block;margin-left:16px"><span> &quot;address&quot;: {</span></div></div><div><span class="ch-code-line-number">_<!-- -->26</span><div style="display:inline-block;margin-left:16px"><span> &quot;street&quot;: &quot;Main Street&quot;,</span></div></div><div><span class="ch-code-line-number">_<!-- -->26</span><div style="display:inline-block;margin-left:16px"><span> &quot;suite&quot;: &quot;Apt. 556&quot;,</span></div></div><div><span class="ch-code-line-number">_<!-- -->26</span><div style="display:inline-block;margin-left:16px"><span> &quot;city&quot;: &quot;Springfield&quot;,</span></div></div><div><span class="ch-code-line-number">_<!-- -->26</span><div style="display:inline-block;margin-left:16px"><span> &quot;zipcode&quot;: &quot;92998-3874&quot;,</span></div></div><div><span class="ch-code-line-number">_<!-- -->26</span><div style="display:inline-block;margin-left:16px"><span> &quot;geo&quot;: {</span></div></div><div><span class="ch-code-line-number">_<!-- -->26</span><div style="display:inline-block;margin-left:16px"><span> &quot;lat&quot;: &quot;-37.3159&quot;,</span></div></div><div><span class="ch-code-line-number">_<!-- -->26</span><div style="display:inline-block;margin-left:16px"><span> &quot;lng&quot;: &quot;81.1496&quot;</span></div></div><div><span class="ch-code-line-number">_<!-- -->26</span><div style="display:inline-block;margin-left:16px"><span> }</span></div></div><div><span class="ch-code-line-number">_<!-- -->26</span><div style="display:inline-block;margin-left:16px"><span> },</span></div></div><div><span class="ch-code-line-number">_<!-- -->26</span><div style="display:inline-block;margin-left:16px"><span> &quot;phone&quot;: &quot;1-770-736-8031 x56442&quot;,</span></div></div><div><span class="ch-code-line-number">_<!-- -->26</span><div style="display:inline-block;margin-left:16px"><span> &quot;website&quot;: &quot;hildegard.org&quot;,</span></div></div><div><span class="ch-code-line-number">_<!-- -->26</span><div style="display:inline-block;margin-left:16px"><span> &quot;company&quot;: {</span></div></div><div><span class="ch-code-line-number">_<!-- -->26</span><div style="display:inline-block;margin-left:16px"><span> &quot;name&quot;: &quot;Acme-Corp&quot;,</span></div></div><div><span class="ch-code-line-number">_<!-- -->26</span><div style="display:inline-block;margin-left:16px"><span> &quot;catchPhrase&quot;: &quot;Multi-layered client-server neural-net&quot;,</span></div></div><div><span class="ch-code-line-number">_<!-- -->26</span><div style="display:inline-block;margin-left:16px"><span> &quot;bs&quot;: &quot;harness real-time e-markets&quot;</span></div></div><div><span class="ch-code-line-number">_<!-- -->26</span><div style="display:inline-block;margin-left:16px"><span> }</span></div></div><div><span class="ch-code-line-number">_<!-- -->26</span><div style="display:inline-block;margin-left:16px"><span>}&#x27;</span></div></div><br></code></div></div>
</li>
</ol>
<h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="data-operations-parameters">Data Operations parameters<a href="#data-operations-parameters" class="hash-link" aria-label="Direct link to Data Operations parameters" title="Direct link to Data Operations parameters"></a></h3>
<p>Some <strong>Data Operations</strong> component input parameters are hidden by default in the visual editor.
You can toggle parameters through the <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-sliders-horizontal" aria-hidden="true"><line x1="21" x2="14" y1="4" y2="4"></line><line x1="10" x2="3" y1="4" y2="4"></line><line x1="21" x2="12" y1="12" y2="12"></line><line x1="8" x2="3" y1="12" y2="12"></line><line x1="21" x2="16" y1="20" y2="20"></line><line x1="12" x2="3" y1="20" y2="20"></line><line x1="14" x2="14" y1="2" y2="6"></line><line x1="8" x2="8" y1="10" y2="14"></line><line x1="16" x2="16" y1="18" y2="22"></line></svg> <strong>Controls</strong> in the <a href="/concepts-components#component-menus">component&#x27;s header menu</a>.</p>
<table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>data</td><td>Data</td><td>Input parameter. The <code>Data</code> object to operate on.</td></tr><tr><td>operations</td><td>Operations</td><td>Input parameter. The operation to perform on the data. See <a href="#data-operations-operations">Data Operations operations</a></td></tr><tr><td>select_keys_input</td><td>Select Keys</td><td>Input parameter. A list of keys to select from the data.</td></tr><tr><td>filter_key</td><td>Filter Key</td><td>Input parameter. The key to filter by.</td></tr><tr><td>operator</td><td>Comparison Operator</td><td>Input parameter. The operator to apply for comparing values.</td></tr><tr><td>filter_values</td><td>Filter Values</td><td>Input parameter. A list of values to filter by.</td></tr><tr><td>append_update_data</td><td>Append or Update</td><td>Input parameter. The data to append or update the existing data with.</td></tr><tr><td>remove_keys_input</td><td>Remove Keys</td><td>Input parameter. A list of keys to remove from the data.</td></tr><tr><td>rename_keys_input</td><td>Rename Keys</td><td>Input parameter. A list of keys to rename in the data.</td></tr><tr><td>data_output</td><td>Data</td><td>Output parameter. The resulting Data object after the operation.</td></tr></tbody></table>
<h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="data-operations-operations">Data Operations operations<a href="#data-operations-operations" class="hash-link" aria-label="Direct link to Data Operations operations" title="Direct link to Data Operations operations"></a></h3>
<p>Options for the <code>operations</code> input parameter are as follows.
All operations act on an incoming <code>Data</code> object.</p>
<table><thead><tr><th>Name</th><th>Required Inputs</th><th>Process</th></tr></thead><tbody><tr><td>Select Keys</td><td><code>select_keys_input</code></td><td>Selects specific keys from the data.</td></tr><tr><td>Literal Eval</td><td>None</td><td>Evaluates string values as Python literals.</td></tr><tr><td>Combine</td><td>None</td><td>Combines multiple data objects into one.</td></tr><tr><td>Filter Values</td><td><code>filter_key</code>, <code>filter_values</code>, <code>operator</code></td><td>Filters data based on key-value pair.</td></tr><tr><td>Append or Update</td><td><code>append_update_data</code></td><td>Adds or updates key-value pairs.</td></tr><tr><td>Remove Keys</td><td><code>remove_keys_input</code></td><td>Removes specified keys from the data.</td></tr><tr><td>Rename Keys</td><td><code>rename_keys_input</code></td><td>Renames keys in the data.</td></tr></tbody></table>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="dataframe-operations">DataFrame operations<a href="#dataframe-operations" class="hash-link" aria-label="Direct link to DataFrame operations" title="Direct link to DataFrame operations"></a></h2>
<p>The <strong>DataFrame</strong> component performs operations on <a href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html" target="_blank" rel="noopener noreferrer"><code>DataFrame</code></a> rows and columns.</p>
<p>To use the <strong>DataFrame Operations</strong> component in a flow, you must connect its <strong>DataFrame</strong> input port to the output port of a component that outputs <code>DataFrame</code>.
All operations in the <strong>DataFrame Operations</strong> component require at least one <code>DataFrame</code> input.</p>
<p>The following example fetches JSON data from an API. The <strong>Smart Filter</strong> component extracts and flattens the results into a tabular <code>DataFrame</code> that is then processed through the <strong>DataFrame Operations</strong> component.</p>
<p><img decoding="async" loading="lazy" alt="A flow that ingests an API response, extracts it to a DataFrame with a Smart Filter component, and the processes it through a DataFrame Operations component" src="/assets/images/component-dataframe-operations-031488ccf4e3d3378f8842f0ea10682c.png" width="4000" height="2120" class="img_ev3q"></p>
<ol>
<li>The <strong>API Request</strong> component retrieves data with only <code>source</code> and <code>result</code> fields.
For this example, the desired data is nested within the <code>result</code> field.</li>
<li>Connect a <strong>Smart Filter</strong> to the API request component, and a <strong>Language model</strong> to the <strong>Smart Filter</strong>. This example connects a <strong>Groq</strong> model component.</li>
<li>In the <strong>Groq</strong> model component, add your <strong>Groq</strong> API key.</li>
<li>To filter the data, in the <strong>Smart filter</strong> component, in the <strong>Instructions</strong> field, use natural language to describe how the data should be filtered.
For this example, enter:</li>
</ol>
<div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>I want to explode the result column out into a Data object</span></div></div><br></code></div></div>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>tip</div><div class="admonitionContent_BuS1"><p>Avoid punctuation in the <strong>Instructions</strong> field, as it can cause errors.</p></div></div>
<ol start="5">
<li>To run the flow, in the <strong>Smart Filter</strong> component, click <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-play" aria-hidden="true"><polygon points="6 3 20 12 6 21 6 3"></polygon></svg> <strong>Run component</strong>.</li>
<li>To inspect the filtered data, in the <strong>Smart Filter</strong> component, click <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-text-search" aria-hidden="true"><path d="M21 6H3"></path><path d="M10 12H3"></path><path d="M10 18H3"></path><circle cx="17" cy="15" r="3"></circle><path d="m21 19-1.9-1.9"></path></svg> <strong>Inspect output</strong>.
The result is a structured DataFrame.</li>
</ol>
<div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>id | name | company | username | email | address | zip</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>---|------------------|----------------------|-----------------|------------------------------------|-------------------|-------</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>1 | Emily Johnson | ABC Corporation | emily_johnson | emily.johnson@abccorporation.com | 123 Main St | 12345</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>2 | Michael Williams | XYZ Corp | michael_williams| michael.williams@xyzcorp.com | 456 Elm Ave | 67890</span></div></div><br></code></div></div>
<ol start="7">
<li>Add the <strong>DataFrame Operations</strong> component, and a <strong>Chat Output</strong> component to the flow.</li>
<li>In the <strong>DataFrame Operations</strong> component, in the <strong>Operation</strong> field, select <strong>Filter</strong>.</li>
<li>To apply a filter, in the <strong>Column Name</strong> field, enter a column to filter on. This example filters by <code>name</code>.</li>
<li>Click <strong>Playground</strong>, and then click <strong>Run Flow</strong>.
The flow extracts the values from the <code>name</code> column.</li>
</ol>
<div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>name</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>Emily Johnson</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>Michael Williams</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>John Smith</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>...</span></div></div><br></code></div></div>
<h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="operations">Operations<a href="#operations" class="hash-link" aria-label="Direct link to Operations" title="Direct link to Operations"></a></h3>
<p>This component can perform the following operations on Pandas <a href="https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html" target="_blank" rel="noopener noreferrer">DataFrame</a>.</p>
<table><thead><tr><th>Operation</th><th>Required Inputs</th><th>Info</th></tr></thead><tbody><tr><td>Add Column</td><td>new_column_name, new_column_value</td><td>Adds a new column with a constant value.</td></tr><tr><td>Drop Column</td><td>column_name</td><td>Removes a specified column.</td></tr><tr><td>Filter</td><td>column_name, filter_value</td><td>Filters rows based on column value.</td></tr><tr><td>Head</td><td>num_rows</td><td>Returns first <code>n</code> rows.</td></tr><tr><td>Rename Column</td><td>column_name, new_column_name</td><td>Renames an existing column.</td></tr><tr><td>Replace Value</td><td>column_name, replace_value, replacement_value</td><td>Replaces values in a column.</td></tr><tr><td>Select Columns</td><td>columns_to_select</td><td>Selects specific columns.</td></tr><tr><td>Sort</td><td>column_name, ascending</td><td>Sorts DataFrame by column.</td></tr><tr><td>Tail</td><td>num_rows</td><td>Returns last <code>n</code> rows.</td></tr></tbody></table>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>df</td><td>DataFrame</td><td>The input DataFrame to operate on.</td></tr><tr><td>operation</td><td>Operation</td><td>The DataFrame operation to perform. Options include Add Column, Drop Column, Filter, Head, Rename Column, Replace Value, Select Columns, Sort, and Tail.</td></tr><tr><td>column_name</td><td>Column Name</td><td>The column name to use for the operation.</td></tr><tr><td>filter_value</td><td>Filter Value</td><td>The value to filter rows by.</td></tr><tr><td>ascending</td><td>Sort Ascending</td><td>Whether to sort in ascending order.</td></tr><tr><td>new_column_name</td><td>New Column Name</td><td>The new column name when renaming or adding a column.</td></tr><tr><td>new_column_value</td><td>New Column Value</td><td>The value to populate the new column with.</td></tr><tr><td>columns_to_select</td><td>Columns to Select</td><td>A list of column names to select.</td></tr><tr><td>num_rows</td><td>Number of Rows</td><td>The number of rows to return for head/tail operations. The default is 5.</td></tr><tr><td>replace_value</td><td>Value to Replace</td><td>The value to replace in the column.</td></tr><tr><td>replacement_value</td><td>Replacement Value</td><td>The value to replace with.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>output</td><td>DataFrame</td><td>The resulting DataFrame after the operation.</td></tr></tbody></table></div></div></details>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="llm-router">LLM router<a href="#llm-router" class="hash-link" aria-label="Direct link to LLM router" title="Direct link to LLM router"></a></h2>
<p>This component routes requests to the most appropriate LLM based on <a href="https://openrouter.ai/docs/quickstart" target="_blank" rel="noopener noreferrer">OpenRouter</a> model specifications.</p>
<p>The judge LLM analyzed your input message to understand the evaluation context, and then selects the most appropriate model from your LLM pool.</p>
<p>The selected model processes your input and returns the response.</p>
<p>To use the <strong>LLM Router</strong> component in a flow, do the following:</p>
<ol>
<li>
<p>Connect multiple <strong>Language Model</strong> components to the <strong>LLM Router</strong>&#x27;s <strong>Language Models</strong> input.</p>
</li>
<li>
<p>Connect a <strong>Judge LLM</strong> component to the <strong>Judge LLM</strong> input.</p>
</li>
<li>
<p>Connect <strong>Chat Input</strong> and <strong>Chat Output</strong> components to the <strong>LLM Router</strong>.
The flow looks like this:</p>
</li>
</ol>
<p><img decoding="async" loading="lazy" alt="LLM router component" src="/assets/images/component-llm-router-1b417082a0208a70065bc177a78fab67.png" width="3316" height="2492" class="img_ev3q"></p>
<ol start="4">
<li>
<p>In the LLM Router component, set your <strong>Optimization</strong> preference:</p>
<ul>
<li><strong>Quality</strong>: Prioritizes the highest quality response.</li>
<li><strong>Speed</strong>: Prioritizes the fastest response time.</li>
<li><strong>Cost</strong>: Prioritizes the most cost-effective option.</li>
<li><strong>Balanced</strong>: Strikes a balance between quality, speed, and cost.</li>
</ul>
</li>
<li>
<p>Run the flow.
Your input is the task that the LLM router evaluates the models against, such as <code>Write a story about horses</code> or <code>How do I parse data objects out of JSON?</code>.</p>
</li>
<li>
<p>In the LLM Router component, select the <strong>Model Selection Decision</strong> output to view the router&#x27;s reasoning.</p>
<div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>Model Selection Decision:</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>- Selected Model Index: 0</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>- Selected Langflow Model Name: gpt-4o-mini</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>- Selected API Model ID (if resolved): openai/gpt-4o-mini</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>- Optimization Preference: cost</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>- Input Query Length: 27 characters (~5 tokens)</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>- Number of Models Considered: 2</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>- Specifications Source: OpenRouter API</span></div></div><br></code></div></div>
</li>
</ol>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>models</td><td>Language Models</td><td>A list of LLMs to route between.</td></tr><tr><td>input_value</td><td>Input</td><td>The input message to be routed.</td></tr><tr><td>judge_llm</td><td>Judge LLM</td><td>The LLM that evaluates and selects the most appropriate model.</td></tr><tr><td>optimization</td><td>Optimization</td><td>The optimization preference between quality, speed, cost, or balanced.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>output</td><td>Output</td><td>The response from the selected model.</td></tr><tr><td>selected_model</td><td>Selected Model</td><td>The name of the chosen model.</td></tr></tbody></table></div></div></details>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="parser">Parser<a href="#parser" class="hash-link" aria-label="Direct link to Parser" title="Direct link to Parser"></a></h2>
<p>This component formats <code>DataFrame</code> or <code>Data</code> objects into text using templates, with an option to convert inputs directly to strings using <code>stringify</code>.</p>
<p>To use this component, create variables for values in the <code>template</code> the same way you would in a <a href="/components-prompts">Prompt</a> component. For <code>DataFrames</code>, use column names, for example <code>Name: {Name}</code>. For <code>Data</code> objects, use <code>{text}</code>.</p>
<p>To use the <strong>Parser</strong> component with a <strong>Structured Output</strong> component, do the following:</p>
<ol>
<li>Connect a <strong>Structured Output</strong> component&#x27;s <strong>DataFrame</strong> output to the <strong>Parser</strong> component&#x27;s <strong>DataFrame</strong> input.</li>
<li>Connect the <strong>File</strong> component to the <strong>Structured Output</strong> component&#x27;s <strong>Message</strong> input.</li>
<li>Connect the <strong>OpenAI</strong> model component&#x27;s <strong>Language Model</strong> output to the <strong>Structured Output</strong> component&#x27;s <strong>Language Model</strong> input.</li>
</ol>
<p>The flow looks like this:</p>
<p><img decoding="async" loading="lazy" alt="A parser component connected to OpenAI and structured output" src="/assets/images/component-parser-1d1d72593f02991e5b14b6b1c112a744.png" width="4000" height="2202" class="img_ev3q"></p>
<ol start="4">
<li>In the <strong>Structured Output</strong> component, click <strong>Open Table</strong>.
This opens a pane for structuring your table.
The table contains the rows <strong>Name</strong>, <strong>Description</strong>, <strong>Type</strong>, and <strong>Multiple</strong>.</li>
<li>Create a table that maps to the data you&#x27;re loading from the <strong>File</strong> loader.
For example, to create a table for employees, you might have the rows <code>id</code>, <code>name</code>, and <code>email</code>, all of type <code>string</code>.</li>
<li>In the <strong>Template</strong> field of the <strong>Parser</strong> component, enter a template for parsing the <strong>Structured Output</strong> component&#x27;s DataFrame output into structured text.
Create variables for values in the <code>template</code> the same way you would in a <a href="/components-prompts">Prompt</a> component.
For example, to present a table of employees in Markdown:</li>
</ol>
<div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span># Employee Profile</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>## Personal Information</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>- **Name:** {name}</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>- **ID:** {id}</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>- **Email:** {email}</span></div></div><br></code></div></div>
<ol start="7">
<li>To run the flow, in the <strong>Parser</strong> component, click <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-play" aria-hidden="true"><polygon points="6 3 20 12 6 21 6 3"></polygon></svg> <strong>Run component</strong>.</li>
<li>To view your parsed text, in the <strong>Parser</strong> component, click <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-text-search" aria-hidden="true"><path d="M21 6H3"></path><path d="M10 12H3"></path><path d="M10 18H3"></path><circle cx="17" cy="15" r="3"></circle><path d="m21 19-1.9-1.9"></path></svg> <strong>Inspect output</strong>.</li>
<li>Optionally, connect a <strong>Chat Output</strong> component, and open the <strong>Playground</strong> to see the output.</li>
</ol>
<p>For an additional example of using the <strong>Parser</strong> component to format a DataFrame from a <strong>Structured Output</strong> component, see the <strong>Market Research</strong> template flow.</p>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>mode</td><td>Mode</td><td>The tab selection between &quot;Parser&quot; and &quot;Stringify&quot; modes. &quot;Stringify&quot; converts input to a string instead of using a template.</td></tr><tr><td>pattern</td><td>Template</td><td>The template for formatting using variables in curly brackets. For DataFrames, use column names, such as <code>Name: {Name}</code>. For Data objects, use <code>{text}</code>.</td></tr><tr><td>input_data</td><td>Data or DataFrame</td><td>The input to parse. Accepts either a DataFrame or Data object.</td></tr><tr><td>sep</td><td>Separator</td><td>The string used to separate rows or items. The default is a newline.</td></tr><tr><td>clean_data</td><td>Clean Data</td><td>When stringify is enabled, this option cleans data by removing empty rows and lines.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>parsed_text</td><td>Parsed Text</td><td>The resulting formatted text as a <a href="/data-types#message">Message</a> object.</td></tr></tbody></table></div></div></details>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="python-interpreter">Python Interpreter<a href="#python-interpreter" class="hash-link" aria-label="Direct link to Python Interpreter" title="Direct link to Python Interpreter"></a></h2>
<p>This component allows you to execute Python code with imported packages.</p>
<h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="use-the-python-interpreter-in-a-flow">Use the Python Interpreter in a flow<a href="#use-the-python-interpreter-in-a-flow" class="hash-link" aria-label="Direct link to Use the Python Interpreter in a flow" title="Direct link to Use the Python Interpreter in a flow"></a></h3>
<ol>
<li>To use this component in a flow,in the <strong>Global Imports</strong> field, add the packages you want to import as a comma-separated list, such as <code>math,pandas</code>.
At least one import is required.</li>
<li>In the <strong>Python Code</strong> field, enter the Python code you want to execute. Use <code>print()</code> to see the output.</li>
<li>Optionally, enable <strong>Tool Mode</strong> and connect the interpreter to an <strong>Agent</strong> as a tool.
For example, connect a <strong>Python Interpreter</strong> and a <a href="/components-helpers#calculator">Calculator</a> as tools for an Agent, and test how it chooses different tools to solve math problems.
The flow looks like this:
<img decoding="async" loading="lazy" alt="Python Interpreter and calculator connected to Agent" src="/assets/images/component-python-interpreter-1ef9e7dec643a216fd5e83c2139d09c9.png" width="3988" height="2928" class="img_ev3q"></li>
<li>Ask the agent an easier math question.
The <strong>Calculator</strong> tool can add, subtract, multiple, divide, or perform exponentiation.
The agent executes the <code>evaluate_expression</code> tool to correctly answer the question.</li>
</ol>
<p>Result:</p>
<div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>Executed evaluate_expression</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>Input:</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>{</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span> &quot;expression&quot;: &quot;2+5&quot;</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>}</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>Output:</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>{</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span> &quot;result&quot;: &quot;7&quot;</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>}</span></div></div><br></code></div></div>
<ol start="5">
<li>Give the agent complete Python code.
This example creates a Pandas DataFrame table with the imported <code>pandas</code> packages, and returns the square root of the mean squares.</li>
</ol>
<div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span>import pandas as pd</span></div></div><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span>import math</span></div></div><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span></span></div></div><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span># Create a simple DataFrame</span></div></div><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span>df = pd.DataFrame({</span></div></div><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span> &#x27;numbers&#x27;: [1, 2, 3, 4, 5],</span></div></div><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span> &#x27;squares&#x27;: [x**2 for x in range(1, 6)]</span></div></div><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span>})</span></div></div><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span></span></div></div><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span># Calculate the square root of the mean</span></div></div><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span>result = math.sqrt(df[&#x27;squares&#x27;].mean())</span></div></div><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span>print(f&quot;Square root of mean squares: {result}&quot;)</span></div></div><br></code></div></div>
<p>The Agent correctly chooses the <code>run_python_repl</code> tool to solve the problem.</p>
<p>Result:</p>
<div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span>Executed run_python_repl</span></div></div><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span></span></div></div><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span>Input:</span></div></div><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span></span></div></div><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span>{</span></div></div><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span> &quot;python_code&quot;: &quot;import pandas as pd\nimport math\n\n# Create a simple DataFrame\ndf = pd.DataFrame({\n &#x27;numbers&#x27;: [1, 2, 3, 4, 5],\n &#x27;squares&#x27;: [x**2 for x in range(1, 6)]\n})\n\n# Calculate the square root of the mean\nresult = math.sqrt(df[&#x27;squares&#x27;].mean())\nprint(f\&quot;Square root of mean squares: {result}\&quot;)&quot;</span></div></div><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span>}</span></div></div><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span>Output:</span></div></div><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span></span></div></div><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span>{</span></div></div><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span> &quot;result&quot;: &quot;Square root of mean squares: 3.3166247903554&quot;</span></div></div><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span>}</span></div></div><br></code></div></div>
<p>If you don&#x27;t include the package imports in the chat, the Agent can still create the table using <code>pd.DataFrame</code>, because the <code>pandas</code> package is imported globally by the Python interpreter component in the <strong>Global Imports</strong> field.</p>
<h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="python-interpreter-parameters">Python Interpreter parameters<a href="#python-interpreter-parameters" class="hash-link" aria-label="Direct link to Python Interpreter parameters" title="Direct link to Python Interpreter parameters"></a></h3>
<table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>global_imports</td><td>String</td><td>Input parameter. A comma-separated list of modules to import globally, such as <code>math,pandas,numpy</code>.</td></tr><tr><td>python_code</td><td>Code</td><td>Input parameter. The Python code to execute. Only modules specified in Global Imports can be used.</td></tr><tr><td>results</td><td>Data</td><td>Output parameter. The output of the executed Python code, including any printed results or errors.</td></tr></tbody></table>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="save-file">Save file<a href="#save-file" class="hash-link" aria-label="Direct link to Save file" title="Direct link to Save file"></a></h2>
<p>This component saves <a href="/data-types#data">DataFrames, Data, or Messages</a> to various file formats.</p>
<ol>
<li>To use this component in a flow, connect a component that outputs <a href="/data-types#data">DataFrames, Data, or Messages</a> to the <strong>Save to File</strong> component&#x27;s input.
The following example connects a <strong>Webhook</strong> component to two <strong>Save to File</strong> components to demonstrate the different outputs.</li>
</ol>
<p><img decoding="async" loading="lazy" alt="Two Save-to File components connected to a webhook" src="/assets/images/component-save-to-file-67ebbb733732670897bedd9fd1b87583.png" width="1458" height="1732" class="img_ev3q"></p>
<ol start="2">
<li>In the <strong>Save to File</strong> component&#x27;s <strong>Input Type</strong> field, select the expected input type.
This example expects <strong>Data</strong> from the <strong>Webhook</strong>.</li>
<li>In the <strong>File Format</strong> field, select the file type for your saved file.
This example uses <code>.md</code> in one <strong>Save to File</strong> component, and <code>.xlsx</code> in another.</li>
<li>In the <strong>File Path</strong> field, enter the path for your saved file.
This example uses <code>./output/employees.xlsx</code> and <code>./output/employees.md</code> to save the files in a directory relative to where Langflow is running.
The component accepts both relative and absolute paths, and creates any necessary directories if they don&#x27;t exist.</li>
</ol>
<div class="theme-admonition theme-admonition-tip admonition_xJq3 alert alert--success"><div class="admonitionHeading_Gvgb"><span class="admonitionIcon_Rf37"><svg viewBox="0 0 12 16"><path fill-rule="evenodd" d="M6.5 0C3.48 0 1 2.19 1 5c0 .92.55 2.25 1 3 1.34 2.25 1.78 2.78 2 4v1h5v-1c.22-1.22.66-1.75 2-4 .45-.75 1-2.08 1-3 0-2.81-2.48-5-5.5-5zm3.64 7.48c-.25.44-.47.8-.67 1.11-.86 1.41-1.25 2.06-1.45 3.23-.02.05-.02.11-.02.17H5c0-.06 0-.13-.02-.17-.2-1.17-.59-1.83-1.45-3.23-.2-.31-.42-.67-.67-1.11C2.44 6.78 2 5.65 2 5c0-2.2 2.02-4 4.5-4 1.22 0 2.36.42 3.22 1.19C10.55 2.94 11 3.94 11 5c0 .66-.44 1.78-.86 2.48zM4 14h5c-.23 1.14-1.3 2-2.5 2s-2.27-.86-2.5-2z"></path></svg></span>tip</div><div class="admonitionContent_BuS1"><p>If you enter a format in the <code>file_path</code> that is not accepted, the component appends the proper format to the file.
For example, if the selected <code>file_format</code> is <code>csv</code>, and you enter <code>file_path</code> as <code>./output/test.txt</code>, the file is saved as <code>./output/test.txt.csv</code> so the file is not corrupted.</p></div></div>
<ol start="5">
<li>Send a POST request to the <strong>Webhook</strong> containing your JSON data.
Replace <code>YOUR_FLOW_ID</code> with your flow ID.
This example uses the default Langflow server address.</li>
</ol>
<div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>curl -X POST &quot;http://127.0.0.1:7860/api/v1/webhook/YOUR_FLOW_ID&quot; \</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>-H &#x27;Content-Type: application/json&#x27; \</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>-H &#x27;x-api-key: LANGFLOW_API_KEY&#x27; \</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>-d &#x27;{</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span> &quot;Name&quot;: [&quot;Alex Cruz&quot;, &quot;Kalani Smith&quot;, &quot;Noam Johnson&quot;],</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span> &quot;Role&quot;: [&quot;Developer&quot;, &quot;Designer&quot;, &quot;Manager&quot;],</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span> &quot;Department&quot;: [&quot;Engineering&quot;, &quot;Design&quot;, &quot;Management&quot;]</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>}&#x27;</span></div></div><br></code></div></div>
<ol start="6">
<li>In your local filesystem, open the <code>outputs</code> directory.
You should see two files created from the data you&#x27;ve sent: one in <code>.xlsx</code> for structured spreadsheets, and one in Markdown.</li>
</ol>
<div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>| Name | Role | Department |</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>|:-------------|:----------|:-------------|</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>| Alex Cruz | Developer | Engineering |</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>| Kalani Smith | Designer | Design |</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>| Noam Johnson | Manager | Management |</span></div></div><br></code></div></div>
<h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="file-input-format-options">File input format options<a href="#file-input-format-options" class="hash-link" aria-label="Direct link to File input format options" title="Direct link to File input format options"></a></h3>
<p>For <code>DataFrame</code> and <code>Data</code> inputs, the component can create:</p>
<ul>
<li><code>csv</code></li>
<li><code>excel</code></li>
<li><code>json</code></li>
<li><code>markdown</code></li>
<li><code>pdf</code></li>
</ul>
<p>For <code>Message</code> inputs, the component can create:</p>
<ul>
<li><code>txt</code></li>
<li><code>json</code></li>
<li><code>markdown</code></li>
<li><code>pdf</code></li>
</ul>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>input_text</td><td>Input Text</td><td>The text to analyze and extract patterns from.</td></tr><tr><td>pattern</td><td>Regex Pattern</td><td>The regular expression pattern to match in the text.</td></tr><tr><td>input_type</td><td>Input Type</td><td>The type of input to save.</td></tr><tr><td>df</td><td>DataFrame</td><td>The DataFrame to save.</td></tr><tr><td>data</td><td>Data</td><td>The Data object to save.</td></tr><tr><td>message</td><td>Message</td><td>The Message to save.</td></tr><tr><td>file_format</td><td>File Format</td><td>The file format to save the input in.</td></tr><tr><td>file_path</td><td>File Path</td><td>The full file path including filename and extension.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>data</td><td>Data</td><td>A list of extracted matches as Data objects.</td></tr><tr><td>text</td><td>Message</td><td>The extracted matches formatted as a Message object.</td></tr><tr><td>confirmation</td><td>Confirmation</td><td>The confirmation message after saving the file.</td></tr></tbody></table></div></div></details>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="smart-function">Smart Function<a href="#smart-function" class="hash-link" aria-label="Direct link to Smart Function" title="Direct link to Smart Function"></a></h2>
<p>In Langflow version 1.5, this component was renamed from <strong>Lambda Filter</strong> to <strong>Smart Function</strong>.</p>
<p>This component uses an LLM to generate a function for filtering or transforming structured data.</p>
<p>To use the <strong>Smart function</strong> component, you must connect it to a <a href="/components-models">Language Model</a> component, which the component uses to generate a function based on the natural language instructions in the <strong>Instructions</strong> field.</p>
<p>This example gets JSON data from the <code>https://jsonplaceholder.typicode.com/users</code> API endpoint.
The <strong>Instructions</strong> field in the <strong>Smart function</strong> component specifies the task <code>extract emails</code>.
The connected LLM creates a filter based on the instructions, and successfully extracts a list of email addresses from the JSON data.</p>
<p><img decoding="async" loading="lazy" alt="Smart function connected to an LLM" src="/assets/images/component-lambda-filter-76cd345c52fa41a59dcfac0205dc3068.png" width="4000" height="1796" class="img_ev3q"></p>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>data</td><td>Data</td><td>The structured data to filter or transform using a Lambda function.</td></tr><tr><td>llm</td><td>Language Model</td><td>The connection port for a <a href="/components-models">Model</a> component.</td></tr><tr><td>filter_instruction</td><td>Instructions</td><td>The natural language instructions for how to filter or transform the data using a Lambda function, such as <code>Filter the data to only include items where the &#x27;status&#x27; is &#x27;active&#x27;</code>.</td></tr><tr><td>sample_size</td><td>Sample Size</td><td>For large datasets, the number of characters to sample from the dataset head and tail.</td></tr><tr><td>max_size</td><td>Max Size</td><td>The number of characters for the data to be considered &quot;large&quot;, which triggers sampling by the <code>sample_size</code> value.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>filtered_data</td><td>Filtered Data</td><td>The filtered or transformed <a href="/data-types#data">Data object</a>.</td></tr><tr><td>dataframe</td><td>DataFrame</td><td>The filtered data as a <a href="/data-types#dataframe">DataFrame</a>.</td></tr></tbody></table></div></div></details>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="split-text">Split Text<a href="#split-text" class="hash-link" aria-label="Direct link to Split Text" title="Direct link to Split Text"></a></h2>
<p>This component splits text into chunks based on specified criteria. It&#x27;s ideal for chunking data to be tokenized and embedded into vector databases.</p>
<p>The <strong>Split Text</strong> component outputs <strong>Chunks</strong> or <strong>DataFrame</strong>.
The <strong>Chunks</strong> output returns a list of individual text chunks.
The <strong>DataFrame</strong> output returns a structured data format, with additional <code>text</code> and <code>metadata</code> columns applied.</p>
<ol>
<li>To use this component in a flow, connect a component that outputs <a href="/data-types#data">Data or DataFrame</a> to the <strong>Split Text</strong> component&#x27;s <strong>Data</strong> port.
This example uses the <strong>URL</strong> component, which is fetching JSON placeholder data.</li>
</ol>
<p><img decoding="async" loading="lazy" alt="Split text component and chroma-db" src="/assets/images/component-split-text-fec2b1abb28e0852c8a172bbeb164b2c.png" width="4000" height="2766" class="img_ev3q"></p>
<ol start="2">
<li>In the <strong>Split Text</strong> component, define your data splitting parameters.</li>
</ol>
<p>This example splits incoming JSON data at the separator <code>},</code>, so each chunk contains one JSON object.</p>
<p>The order of precedence is <strong>Separator</strong>, then <strong>Chunk Size</strong>, and then <strong>Chunk Overlap</strong>.
If any segment after separator splitting is longer than <code>chunk_size</code>, it is split again to fit within <code>chunk_size</code>.</p>
<p>After <code>chunk_size</code>, <strong>Chunk Overlap</strong> is applied between chunks to maintain context.</p>
<ol start="3">
<li>Connect a <strong>Chat Output</strong> component to the <strong>Split Text</strong> component&#x27;s <strong>DataFrame</strong> output to view its output.</li>
<li>Click <strong>Playground</strong>, and then click <strong>Run Flow</strong>.
The output contains a table of JSON objects split at <code>},</code>.</li>
</ol>
<div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->16</span><div style="display:inline-block;margin-left:16px"><span>{</span></div></div><div><span class="ch-code-line-number">_<!-- -->16</span><div style="display:inline-block;margin-left:16px"><span>&quot;userId&quot;: 1,</span></div></div><div><span class="ch-code-line-number">_<!-- -->16</span><div style="display:inline-block;margin-left:16px"><span>&quot;id&quot;: 1,</span></div></div><div><span class="ch-code-line-number">_<!-- -->16</span><div style="display:inline-block;margin-left:16px"><span>&quot;title&quot;: &quot;Introduction to Artificial Intelligence&quot;,</span></div></div><div><span class="ch-code-line-number">_<!-- -->16</span><div style="display:inline-block;margin-left:16px"><span>&quot;body&quot;: &quot;Learn the basics of Artificial Intelligence and its applications in various industries.&quot;,</span></div></div><div><span class="ch-code-line-number">_<!-- -->16</span><div style="display:inline-block;margin-left:16px"><span>&quot;link&quot;: &quot;https://example.com/article1&quot;,</span></div></div><div><span class="ch-code-line-number">_<!-- -->16</span><div style="display:inline-block;margin-left:16px"><span>&quot;comment_count&quot;: 8</span></div></div><div><span class="ch-code-line-number">_<!-- -->16</span><div style="display:inline-block;margin-left:16px"><span>},</span></div></div><div><span class="ch-code-line-number">_<!-- -->16</span><div style="display:inline-block;margin-left:16px"><span>{</span></div></div><div><span class="ch-code-line-number">_<!-- -->16</span><div style="display:inline-block;margin-left:16px"><span>&quot;userId&quot;: 2,</span></div></div><div><span class="ch-code-line-number">_<!-- -->16</span><div style="display:inline-block;margin-left:16px"><span>&quot;id&quot;: 2,</span></div></div><div><span class="ch-code-line-number">_<!-- -->16</span><div style="display:inline-block;margin-left:16px"><span>&quot;title&quot;: &quot;Web Development with React&quot;,</span></div></div><div><span class="ch-code-line-number">_<!-- -->16</span><div style="display:inline-block;margin-left:16px"><span>&quot;body&quot;: &quot;Build modern web applications using React.js and explore its powerful features.&quot;,</span></div></div><div><span class="ch-code-line-number">_<!-- -->16</span><div style="display:inline-block;margin-left:16px"><span>&quot;link&quot;: &quot;https://example.com/article2&quot;,</span></div></div><div><span class="ch-code-line-number">_<!-- -->16</span><div style="display:inline-block;margin-left:16px"><span>&quot;comment_count&quot;: 12</span></div></div><div><span class="ch-code-line-number">_<!-- -->16</span><div style="display:inline-block;margin-left:16px"><span>},</span></div></div><br></code></div></div>
<ol start="5">
<li>Clear the <strong>Separator</strong> field, and then run the flow again.
Instead of JSON objects, the output contains 50-character lines of text with 10 characters of overlap.</li>
</ol>
<div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>First chunk: &quot;title&quot;: &quot;Introduction to Artificial Intelligence&quot;&quot;</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>Second chunk: &quot;elligence&quot;, &quot;body&quot;: &quot;Learn the basics of Artif&quot;</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>Third chunk: &quot;s of Artificial Intelligence and its applications&quot;</span></div></div><br></code></div></div>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>data_inputs</td><td>Input Documents</td><td>The data to split. The component accepts <a href="/data-types#data">Data</a> or <a href="/data-types#dataframe">DataFrame</a> objects.</td></tr><tr><td>chunk_overlap</td><td>Chunk Overlap</td><td>The number of characters to overlap between chunks. Default: <code>200</code>.</td></tr><tr><td>chunk_size</td><td>Chunk Size</td><td>The maximum number of characters in each chunk. Default: <code>1000</code>.</td></tr><tr><td>separator</td><td>Separator</td><td>The character to split on. Default: <code>newline</code>.</td></tr><tr><td>text_key</td><td>Text Key</td><td>The key to use for the text column. Default: <code>text</code>.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>chunks</td><td>Chunks</td><td>A list of split text chunks as <a href="/data-types#data">Data</a> objects.</td></tr><tr><td>dataframe</td><td>DataFrame</td><td>A list of split text chunks as <a href="/data-types#dataframe">DataFrame</a> objects.</td></tr></tbody></table></div></div></details>
<h3 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="other-text-splitters">Other text splitters<a href="#other-text-splitters" class="hash-link" aria-label="Direct link to Other text splitters" title="Direct link to Other text splitters"></a></h3>
<ul>
<li><a href="/bundles-langchain#text-splitters">LangChain text splitter components</a></li>
</ul>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="structured-output">Structured output<a href="#structured-output" class="hash-link" aria-label="Direct link to Structured output" title="Direct link to Structured output"></a></h2>
<p>This component transforms LLM responses into structured data formats.</p>
<p>In this example from the <strong>Financial Support Parser</strong> template, the <strong>Structured Output</strong> component transforms unstructured financial reports into structured data.</p>
<p><img decoding="async" loading="lazy" alt="Structured output example" src="/assets/images/component-structured-output-23458b0d29eed6d092b557c7aaf6ab2c.png" width="4000" height="1724" class="img_ev3q"></p>
<p>The connected LLM model is prompted by the <strong>Structured Output</strong> component&#x27;s <code>Format Instructions</code> parameter to extract structured output from the unstructured text. <code>Format Instructions</code> is utilized as the system prompt for the <strong>Structured Output</strong> component.</p>
<p>In the <strong>Structured Output</strong> component, click the <strong>Open table</strong> button to view the <code>Output Schema</code> table.
The <code>Output Schema</code> parameter defines the structure and data types for the model&#x27;s output using a table with the following fields:</p>
<ul>
<li><strong>Name</strong>: The name of the output field.</li>
<li><strong>Description</strong>: The purpose of the output field.</li>
<li><strong>Type</strong>: The data type of the output field. The available types are <code>str</code>, <code>int</code>, <code>float</code>, <code>bool</code>, <code>list</code>, or <code>dict</code>. The default is <code>text</code>.</li>
<li><strong>Multiple</strong>: This feature is deprecated. Currently, it is set to <code>True</code> by default if you expect multiple values for a single field. For example, a <code>list</code> of <code>features</code> is set to <code>True</code> to contain multiple values, such as <code>[&quot;waterproof&quot;, &quot;durable&quot;, &quot;lightweight&quot;]</code>. Default: <code>True</code>.</li>
</ul>
<p>The <strong>Parse DataFrame</strong> component parses the structured output into a template for orderly presentation in chat output. The template receives the values from the <code>output_schema</code> table with curly braces.</p>
<p>For example, the template <code>EBITDA: {EBITDA} , Net Income: {NET_INCOME} , GROSS_PROFIT: {GROSS_PROFIT}</code> presents the extracted values in the <strong>Playground</strong> as <code>EBITDA: 900 million , Net Income: 500 million , GROSS_PROFIT: 1.2 billion</code>.</p>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>llm</td><td>LanguageModel</td><td>The language model to use to generate the structured output.</td></tr><tr><td>input_value</td><td>String</td><td>The input message to the language model.</td></tr><tr><td>system_prompt</td><td>String</td><td>The instructions to the language model for formatting the output.</td></tr><tr><td>schema_name</td><td>String</td><td>The name for the output data schema.</td></tr><tr><td>output_schema</td><td>Table</td><td>The structure and data types for the model&#x27;s output.</td></tr><tr><td>multiple</td><td>Boolean</td><td>[Deprecated] Always set to <code>True</code>.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>structured_output</td><td>Data</td><td>The structured output is a Data object based on the defined schema.</td></tr></tbody></table></div></div></details>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="type-convert">Type convert<a href="#type-convert" class="hash-link" aria-label="Direct link to Type convert" title="Direct link to Type convert"></a></h2>
<p>This component converts data types between different formats. It can transform data between <a href="/data-types#data">Data</a>, <a href="/data-types#dataframe">DataFrame</a>, and <a href="/data-types#message">Message</a> objects.</p>
<ul>
<li><strong>Data</strong>: A structured object that contains both text and metadata.</li>
</ul>
<div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>{</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span> &quot;text&quot;: &quot;User Profile&quot;,</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span> &quot;data&quot;: {</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span> &quot;name&quot;: &quot;John Smith&quot;,</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span> &quot;age&quot;: 30,</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span> &quot;email&quot;: &quot;john@example.com&quot;</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span> }</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>}</span></div></div><br></code></div></div>
<ul>
<li><strong>DataFrame</strong>: A tabular data structure with rows and columns.
Keys are columns, and each dictionary (a collection of key-value pairs) in the list is a row.</li>
</ul>
<div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span>[</span></div></div><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span> {</span></div></div><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span> &quot;name&quot;: &quot;John Smith&quot;,</span></div></div><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span> &quot;age&quot;: 30,</span></div></div><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span> &quot;email&quot;: &quot;john@example.com&quot;</span></div></div><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span> },</span></div></div><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span> {</span></div></div><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span> &quot;name&quot;: &quot;Jane Doe&quot;,</span></div></div><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span> &quot;age&quot;: 25,</span></div></div><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span> &quot;email&quot;: &quot;jane@example.com&quot;</span></div></div><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span> }</span></div></div><div><span class="ch-code-line-number">_<!-- -->12</span><div style="display:inline-block;margin-left:16px"><span>]</span></div></div><br></code></div></div>
<ul>
<li><strong>Message</strong>: A string, such as<code>&quot;Name: John Smith, Age: 30, Email: john@example.com&quot;</code>.</li>
</ul>
<p>To use this component in a flow, do the following:</p>
<ol>
<li>Add the <strong>Web search</strong> component to the <strong>Basic Prompting</strong> template. In the <strong>Search Query</strong> field, enter a query, such as <code>environmental news</code>.</li>
<li>Connect the <strong>Web search</strong> component&#x27;s output to a component that accepts the DataFrame input.
This example uses a <strong>Prompt</strong> component to give the chatbot context, so you must convert the <strong>Web search</strong> component&#x27;s DataFrame output to a Message type.</li>
<li>Connect a <strong>Type Convert</strong> component to convert the DataFrame to a Message.</li>
<li>In the <strong>Type Convert</strong> component, in the <strong>Output Type</strong> field, select <strong>Message</strong>.
Your flow looks like this:</li>
</ol>
<p><img decoding="async" loading="lazy" alt="Type convert web search output to chat" src="/assets/images/component-type-convert-and-web-search-1eef7b9a7c1a243f4a08d9717728d0e1.png" width="4000" height="1826" class="img_ev3q"></p>
<ol start="5">
<li>In the <strong>Language Model</strong> component, in the <strong>OpenAI API Key</strong> field, add your OpenAI API key.</li>
<li>Click <strong>Playground</strong>, and then ask about <code>latest news</code>.</li>
</ol>
<p>The search results are returned to the Playground as a message.</p>
<p>Result:</p>
<div class="ch-codeblock not-prose" data-ch-theme="github-dark"><div class="ch-code-wrapper ch-code" data-ch-measured="false"><code class="ch-code-scroll-parent"><br><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>Latest news</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>AI</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>gpt-4o-mini</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>Here are some of the latest news articles related to the environment:</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>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</span></div></div><div><span class="ch-code-line-number">_<!-- -->10</span><div style="display:inline-block;margin-left:16px"><span>...</span></div></div><br></code></div></div>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parameters</summary><div><div class="collapsibleContent_i85q"><p><strong>Inputs</strong></p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>input_data</td><td>Input Data</td><td>The data to convert. Accepts Data, DataFrame, or Message objects.</td></tr><tr><td>output_type</td><td>Output Type</td><td>The desired output type. Options: Data, DataFrame, or Message.</td></tr></tbody></table><p><strong>Outputs</strong></p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>output</td><td>Output</td><td>The converted data in the specified format.</td></tr></tbody></table></div></div></details>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="legacy-processing-components">Legacy processing components<a href="#legacy-processing-components" class="hash-link" aria-label="Direct link to Legacy processing components" title="Direct link to Legacy processing components"></a></h2>
<p>The following processing components are legacy components.
You can still use them in your flows, but they are no longer supported and can be removed in a future release.</p>
<p>Replace these components with suggested alternatives as soon as possible.</p>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Alter Metadata</summary><div><div class="collapsibleContent_i85q"><p>Replace this legacy component with the <a href="#data-operations"><strong>Data Operations</strong> component</a>.</p><p>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 <code>Message</code> and <code>Data</code> objects, and can also create a new <code>Data</code> object from user-provided text.</p><p>It accepts the following parameters:</p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>input_value</td><td>Input</td><td>Input parameter. Objects to which Metadata should be added.</td></tr><tr><td>text_in</td><td>User Text</td><td>Input parameter. Text input; the value is contained in the &#x27;text&#x27; attribute of the <code>Data</code> object. Empty text entries are ignored.</td></tr><tr><td>metadata</td><td>Metadata</td><td>Input parameter. Metadata to add to each object.</td></tr><tr><td>remove_fields</td><td>Fields to Remove</td><td>Input parameter. Metadata fields to remove.</td></tr><tr><td>data</td><td>Data</td><td>Output parameter. List of Input objects, each with added metadata.</td></tr></tbody></table></div></div></details>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Combine Data/Merge Data</summary><div><div class="collapsibleContent_i85q"><p>Replace this legacy component with the <a href="#data-operations"><strong>Data Operations</strong> component</a> or the <a href="/components-logic#loop"><strong>Loop</strong> component</a>.</p><p>This component combines multiple data sources into a single unified <code>Data</code> object.</p><p>The component iterates through a list of <code>Data</code> objects, merging them into a single <code>Data</code> object (<code>merged_data</code>).
If the input list is empty, it returns an empty data object.
If there&#x27;s only one input data object, it returns that object unchanged.</p><p>The merging process uses the addition operator to combine data objects.</p></div></div></details>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Combine Text</summary><div><div class="collapsibleContent_i85q"><p>Replace this legacy component with the <a href="#data-operations"><strong>Data Operations</strong> component</a>.</p><p>This component concatenates two text inputs into a single text chunk using a specified delimiter, outputting a <code>Message</code> object with the combined text.</p></div></div></details>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Create Data</summary><div><div class="collapsibleContent_i85q"><p>Replace this legacy component with the <a href="#data-operations"><strong>Data Operations</strong> component</a>.</p><p>This component dynamically creates a <code>Data</code> object with a specified number of fields and a text key.</p><p>It accepts the following parameters:</p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>number_of_fields</td><td>Number of Fields</td><td>Input parameter. The number of fields to be added to the record.</td></tr><tr><td>text_key</td><td>Text Key</td><td>Input parameter. Key that identifies the field to be used as the text content.</td></tr><tr><td>text_key_validator</td><td>Text Key Validator</td><td>Input parameter. If enabled, checks if the given <code>Text Key</code> is present in the given <code>Data</code>.</td></tr></tbody></table></div></div></details>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Extract Key</summary><div><div class="collapsibleContent_i85q"><p>Replace this legacy component with the <a href="#data-operations"><strong>Data Operations</strong> component</a>.</p><p>This component extracts a specific key from a <code>Data</code> object and returns the value associated with that key.</p></div></div></details>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Data to DataFrame/Data to Message</summary><div><div class="collapsibleContent_i85q"><p>Replace these legacy components with newer processing components, such as the <a href="#data-operations"><strong>Data Operations</strong> component</a> and <a href="#type-convert"><strong>Type Convert</strong> component</a>.</p><p>These components converted one or more <code>Data</code> objects into a <code>DataFrame</code> or <code>Message</code> object.</p><p>For the <strong>Data to DataFrame</strong> component, each <code>Data</code> object corresponds to one row in the resulting <code>DataFrame</code>.
Fields from the <code>.data</code> attribute become columns, and the <code>.text</code> field (if present) is placed in a <code>text</code> column.</p></div></div></details>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Filter Data</summary><div><div class="collapsibleContent_i85q"><p>Replace this legacy component with the <a href="#data-operations"><strong>Data Operations</strong> component</a>.</p><p>This component filters a <code>Data</code> object based on a list of keys (<code>filter_criteria</code>), returning a new <code>Data</code> object (<code>filtered_data</code>) that contains only the key-value pairs that match the filter criteria.</p></div></div></details>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Filter Values</summary><div><div class="collapsibleContent_i85q"><p>Replace this legacy component with the <a href="#data-operations"><strong>Data Operations</strong> component</a>.</p><p>The Filter values component filters a list of data items based on a specified key, filter value, and comparison operator.</p><p>It accepts the following parameters:</p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>input_data</td><td>Input data</td><td>Input parameter. The list of data items to filter.</td></tr><tr><td>filter_key</td><td>Filter Key</td><td>Input parameter. The key to filter on.</td></tr><tr><td>filter_value</td><td>Filter Value</td><td>Input parameter. The value to filter by.</td></tr><tr><td>operator</td><td>Comparison Operator</td><td>Input parameter. The operator to apply for comparing the values.</td></tr><tr><td>filtered_data</td><td>Filtered data</td><td>Output parameter. The resulting list of filtered data items.</td></tr></tbody></table></div></div></details>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>JSON Cleaner</summary><div><div class="collapsibleContent_i85q"><p>Replace this legacy component with the <a href="#parser"><strong>Parser</strong> component</a>.</p><p>This component cleans JSON strings to ensure they are fully compliant with the JSON specification.</p><p>It accepts the following parameters:</p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>json_str</td><td>JSON String</td><td>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.</td></tr><tr><td>remove_control_chars</td><td>Remove Control Characters</td><td>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.</td></tr><tr><td>normalize_unicode</td><td>Normalize Unicode</td><td>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.</td></tr><tr><td>validate_json</td><td>Validate JSON</td><td>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.</td></tr><tr><td>output</td><td>Cleaned JSON String</td><td>Output parameter. The resulting cleaned, repaired, and validated JSON string that fully complies with the JSON specification.</td></tr></tbody></table></div></div></details>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Message to Data</summary><div><div class="collapsibleContent_i85q"><p>Replace this legacy component with the <a href="#type-convert"><strong>Type Convert</strong> component</a>.</p><p>This component converts <code>Message</code> objects to <code>Data</code> objects.</p></div></div></details>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parse DataFrame</summary><div><div class="collapsibleContent_i85q"><p>Replace this legacy component with the <a href="#dataframe-operations"><strong>DataFrame Operations</strong> component</a> or <a href="#parser"><strong>Parser</strong> component</a>.</p><p>This component converts <code>DataFrame</code> objects into plain text using templates.</p><p>It accepts the following parameters:</p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>df</td><td>DataFrame</td><td>Input parameter. The DataFrame to convert to text rows.</td></tr><tr><td>template</td><td>Template</td><td>Input parameter. Template for formatting (use <code>{column_name}</code> placeholders).</td></tr><tr><td>sep</td><td>Separator</td><td>Input parameter. String to join rows in output.</td></tr><tr><td>text</td><td>Text</td><td>Output parameter. All rows combined into single text.</td></tr></tbody></table></div></div></details>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Parse JSON</summary><div><div class="collapsibleContent_i85q"><p>Replace this legacy component with the <a href="#parser"><strong>Parser</strong> component</a>.</p><p>This component converts and extracts JSON fields in <code>Message</code> and <code>Data</code> objects using JQ queries, then returns <code>filtered_data</code>, which is a list of <code>Data</code> objects.</p></div></div></details>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Python REPL</summary><div><div class="collapsibleContent_i85q"><p>Replace this legacy component with the <a href="#python-interpreter"><strong>Python Interpreter</strong> component</a> or another processing or logic component.</p><p>This component creates a Python REPL (Read-Eval-Print Loop) tool for executing Python code.</p><p>It accepts the following parameters:</p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>name</td><td>String</td><td>Input parameter. The name of the tool. Default: <code>python_repl</code>.</td></tr><tr><td>description</td><td>String</td><td>Input parameter. A description of the tool&#x27;s functionality.</td></tr><tr><td>global_imports</td><td>List[String]</td><td>Input parameter. A list of modules to import globally. Default: <code>math</code>.</td></tr><tr><td>tool</td><td>Tool</td><td>Output parameter. A Python REPL tool for use in LangChain.</td></tr></tbody></table></div></div></details>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Python Code Structured</summary><div><div class="collapsibleContent_i85q"><p>Replace this legacy component with the <a href="#python-interpreter"><strong>Python Interpreter</strong> component</a> or another processing or logic component.</p><p>This component creates a structured tool from Python code using a dataclass.</p><p>The component dynamically updates its configuration based on the provided Python code, allowing for custom function arguments and descriptions.</p><p>It accepts the following parameters:</p><table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>tool_code</td><td>String</td><td>Input parameter. The Python code for the tool&#x27;s dataclass.</td></tr><tr><td>tool_name</td><td>String</td><td>Input parameter. The name of the tool.</td></tr><tr><td>tool_description</td><td>String</td><td>Input parameter. The description of the tool.</td></tr><tr><td>return_direct</td><td>Boolean</td><td>Input parameter. Whether to return the function output directly.</td></tr><tr><td>tool_function</td><td>String</td><td>Input parameter. The selected function for the tool.</td></tr><tr><td>global_variables</td><td>Dict</td><td>Input parameter. Global variables or data for the tool.</td></tr><tr><td>result_tool</td><td>Tool</td><td>Output parameter. A structured tool created from the Python code.</td></tr></tbody></table></div></div></details>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Regex Extractor</summary><div><div class="collapsibleContent_i85q"><p>Replace this legacy component with the <a href="#parser"><strong>Parser</strong> component</a>.</p><p>This component extracts patterns in text using regular expressions. It can be used to find and extract specific patterns or information in text.</p></div></div></details>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Select Data</summary><div><div class="collapsibleContent_i85q"><p>Replace this legacy component with the <a href="#data-operations"><strong>Data Operations</strong> component</a>.</p><p>This component selects a single <code>Data</code> object from a list.</p><p>It accepts the following parameters:</p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>data_list</td><td>Data List</td><td>Input parameter. List of data to select from</td></tr><tr><td>data_index</td><td>Data Index</td><td>Input parameter. Index of the data to select</td></tr><tr><td>selected_data</td><td>Selected Data</td><td>Output parameter. The selected <code>Data</code> object.</td></tr></tbody></table></div></div></details>
<details class="details_lb9f alert alert--info details_b_Ee" data-collapsed="true"><summary>Update Data</summary><div><div class="collapsibleContent_i85q"><p>Replace this legacy component with the <a href="#data-operations"><strong>Data Operations</strong> component</a>.</p><p>This component dynamically updates or appends data with specified fields.</p><p>It accepts the following parameters:</p><table><thead><tr><th>Name</th><th>Display Name</th><th>Info</th></tr></thead><tbody><tr><td>old_data</td><td>Data</td><td>Input parameter. The records to update.</td></tr><tr><td>number_of_fields</td><td>Number of Fields</td><td>Input parameter. The number of fields to add. The maximum is 15.</td></tr><tr><td>text_key</td><td>Text Key</td><td>Input parameter. The key for text content.</td></tr><tr><td>text_key_validator</td><td>Text Key Validator</td><td>Input parameter. Validates the text key presence.</td></tr><tr><td>data</td><td>Data</td><td>Output parameter. The updated Data objects.</td></tr></tbody></table></div></div></details></div></article><nav class="docusaurus-mt-lg pagination-nav" aria-label="Docs pages"><a class="pagination-nav__link pagination-nav__link--prev" href="/components-vector-stores"><div class="pagination-nav__sublabel">Previous</div><div class="pagination-nav__label">Vector Stores</div></a><a class="pagination-nav__link pagination-nav__link--next" href="/components-prompts"><div class="pagination-nav__sublabel">Next</div><div class="pagination-nav__label">Prompt Template</div></a></nav></div></div><div class="col col--3"><div class="tableOfContents_bqdL thin-scrollbar theme-doc-toc-desktop"><ul class="table-of-contents table-of-contents__left-border"><li><a href="#prompt-template" class="table-of-contents__link toc-highlight">Prompt Template</a></li><li><a href="#batch-run" class="table-of-contents__link toc-highlight">Batch Run</a><ul><li><a href="#use-the-batch-run-component-in-a-flow" class="table-of-contents__link toc-highlight">Use the Batch Run component in a flow</a></li><li><a href="#batch-run-parameters" class="table-of-contents__link toc-highlight">Batch Run parameters</a></li></ul></li><li><a href="#data-operations" class="table-of-contents__link toc-highlight">Data Operations</a><ul><li><a href="#data-operations-parameters" class="table-of-contents__link toc-highlight">Data Operations parameters</a></li><li><a href="#data-operations-operations" class="table-of-contents__link toc-highlight">Data Operations operations</a></li></ul></li><li><a href="#dataframe-operations" class="table-of-contents__link toc-highlight">DataFrame operations</a><ul><li><a href="#operations" class="table-of-contents__link toc-highlight">Operations</a></li></ul></li><li><a href="#llm-router" class="table-of-contents__link toc-highlight">LLM router</a></li><li><a href="#parser" class="table-of-contents__link toc-highlight">Parser</a></li><li><a href="#python-interpreter" class="table-of-contents__link toc-highlight">Python Interpreter</a><ul><li><a href="#use-the-python-interpreter-in-a-flow" class="table-of-contents__link toc-highlight">Use the Python Interpreter in a flow</a></li><li><a href="#python-interpreter-parameters" class="table-of-contents__link toc-highlight">Python Interpreter parameters</a></li></ul></li><li><a href="#save-file" class="table-of-contents__link toc-highlight">Save file</a><ul><li><a href="#file-input-format-options" class="table-of-contents__link toc-highlight">File input format options</a></li></ul></li><li><a href="#smart-function" class="table-of-contents__link toc-highlight">Smart Function</a></li><li><a href="#split-text" class="table-of-contents__link toc-highlight">Split Text</a><ul><li><a href="#other-text-splitters" class="table-of-contents__link toc-highlight">Other text splitters</a></li></ul></li><li><a href="#structured-output" class="table-of-contents__link toc-highlight">Structured output</a></li><li><a href="#type-convert" class="table-of-contents__link toc-highlight">Type convert</a></li><li><a href="#legacy-processing-components" class="table-of-contents__link toc-highlight">Legacy processing components</a></li></ul></div></div></div></div></main></div></div></div><footer class="theme-layout-footer footer"><div class="container container-fluid"><div class="row footer__links"><div class="theme-layout-footer-column col footer__col"><div class="footer__title"></div><ul class="footer__items clean-list"><li class="footer__item"><div class="footer-links">
<span>© 2025 Langflow</span>
<span id="preferenceCenterContainer"> ·&nbsp; <a href="https://langflow.org/preferences">Manage Privacy Choices</a></span>
</div></li></ul></div></div><div class="footer__bottom text--center"><div class="margin-bottom--sm"><img src="/img/lf-docs-light.svg" alt="Langflow" class="footer__logo themedComponent_mlkZ themedComponent--light_NVdE" width="160" height="40"><img src="/img/lf-docs-dark.svg" alt="Langflow" class="footer__logo themedComponent_mlkZ themedComponent--dark_xIcU" width="160" height="40"></div></div></div></footer><div style="position:fixed;right:20px;bottom:20px;z-index:100;display:flex;align-items:center;gap:10px;cursor:pointer"><div style="background-color:#f6f6f6;border-radius:50%;width:48px;height:48px;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 4px rgba(0,0,0,0.1)"><img src="/img/langflow-icon-black-transparent.svg" style="width:40px" alt="Search"></div></div></div>
</body>
</html>