diff --git a/404.html b/404.html index 9b349f292d..5969f0bdfa 100644 --- a/404.html +++ b/404.html @@ -24,7 +24,7 @@ - + diff --git a/agent-tutorial.html b/agent-tutorial.html index bb55aee5f9..f07de9568c 100644 --- a/agent-tutorial.html +++ b/agent-tutorial.html @@ -24,7 +24,7 @@ - + diff --git a/agents-tools.html b/agents-tools.html index ebf3b204a2..da04535a52 100644 --- a/agents-tools.html +++ b/agents-tools.html @@ -24,7 +24,7 @@ - + diff --git a/agents.html b/agents.html index ebb8f9eca4..bd1fd6cd9c 100644 --- a/agents.html +++ b/agents.html @@ -24,7 +24,7 @@ - + diff --git a/api-build.html b/api-build.html index f3446af801..a6d163fa49 100644 --- a/api-build.html +++ b/api-build.html @@ -24,7 +24,7 @@ - + diff --git a/api-files.html b/api-files.html index b9a8142899..055ed979b5 100644 --- a/api-files.html +++ b/api-files.html @@ -24,7 +24,7 @@ - + diff --git a/api-flows-run.html b/api-flows-run.html index 74dae45829..0d273f68f9 100644 --- a/api-flows-run.html +++ b/api-flows-run.html @@ -24,7 +24,7 @@ - + diff --git a/api-flows.html b/api-flows.html index 0681da5205..df05c7a62b 100644 --- a/api-flows.html +++ b/api-flows.html @@ -24,7 +24,7 @@ - + diff --git a/api-keys-and-authentication.html b/api-keys-and-authentication.html index cd4019b104..72c8e1aa9d 100644 --- a/api-keys-and-authentication.html +++ b/api-keys-and-authentication.html @@ -24,7 +24,7 @@ - + diff --git a/api-logs.html b/api-logs.html index 42d2e8b254..10df2c42bd 100644 --- a/api-logs.html +++ b/api-logs.html @@ -24,7 +24,7 @@ - + diff --git a/api-monitor.html b/api-monitor.html index 734cea95fc..24777a35df 100644 --- a/api-monitor.html +++ b/api-monitor.html @@ -24,7 +24,7 @@ - + diff --git a/api-openai-responses.html b/api-openai-responses.html index d139139e61..8bfc135698 100644 --- a/api-openai-responses.html +++ b/api-openai-responses.html @@ -24,7 +24,7 @@ - + diff --git a/api-projects.html b/api-projects.html index 8f94791fff..f645828ea6 100644 --- a/api-projects.html +++ b/api-projects.html @@ -24,7 +24,7 @@ - + diff --git a/api-reference-api-examples.html b/api-reference-api-examples.html index 71b1257dc2..a4ff621ea2 100644 --- a/api-reference-api-examples.html +++ b/api-reference-api-examples.html @@ -24,7 +24,7 @@ - + diff --git a/api-request.html b/api-request.html index 4ac8ae69d5..2072cb4cbf 100644 --- a/api-request.html +++ b/api-request.html @@ -24,7 +24,7 @@ - + diff --git a/api-users.html b/api-users.html index 9a9a2d2d9c..6666e0f9d0 100644 --- a/api-users.html +++ b/api-users.html @@ -24,7 +24,7 @@ - + diff --git a/api.html b/api.html index 374604689e..2ab720e943 100644 --- a/api.html +++ b/api.html @@ -24,7 +24,7 @@ - + diff --git a/api/openapi.json.html b/api/openapi.json.html index 7f8cd38869..bf3ade5b3f 100644 --- a/api/openapi.json.html +++ b/api/openapi.json.html @@ -24,7 +24,7 @@ - + diff --git a/api/openapi.yaml.html b/api/openapi.yaml.html index 257bce3c2e..7ed2b1ad2c 100644 --- a/api/openapi.yaml.html +++ b/api/openapi.yaml.html @@ -24,7 +24,7 @@ - + diff --git a/assets/js/1a29c454.98aaee60.js b/assets/js/1a29c454.98aaee60.js new file mode 100644 index 0000000000..26d38fccd8 --- /dev/null +++ b/assets/js/1a29c454.98aaee60.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[3140],{11470:(o,t,e)=>{e.d(t,{A:()=>x});var n=e(96540),r=e(18215),s=e(23104),l=e(56347),c=e(205),p=e(57485),a=e(31682),y=e(70679);function i(o){return n.Children.toArray(o).filter(o=>"\n"!==o).map(o=>{if(!o||(0,n.isValidElement)(o)&&function(o){const{props:t}=o;return!!t&&"object"==typeof t&&"value"in t}(o))return o;throw new Error(`Docusaurus error: Bad child <${"string"==typeof o.type?o.type:o.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)})?.filter(Boolean)??[]}function F(o){const{values:t,children:e}=o;return(0,n.useMemo)(()=>{const o=t??function(o){return i(o).map(({props:{value:o,label:t,attributes:e,default:n}})=>({value:o,label:t,attributes:e,default:n}))}(e);return function(o){const t=(0,a.XI)(o,(o,t)=>o.value===t.value);if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map(o=>o.value).join(", ")}" found in . Every value needs to be unique.`)}(o),o},[t,e])}function d({value:o,tabValues:t}){return t.some(t=>t.value===o)}function D({queryString:o=!1,groupId:t}){const e=(0,l.W6)(),r=function({queryString:o=!1,groupId:t}){if("string"==typeof o)return o;if(!1===o)return null;if(!0===o&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:o,groupId:t});return[(0,p.aZ)(r),(0,n.useCallback)(o=>{if(!r)return;const t=new URLSearchParams(e.location.search);t.set(r,o),e.replace({...e.location,search:t.toString()})},[r,e])]}function u(o){const{defaultValue:t,queryString:e=!1,groupId:r}=o,s=F(o),[l,p]=(0,n.useState)(()=>function({defaultValue:o,tabValues:t}){if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(o){if(!d({value:o,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${o}" but none of its children has the corresponding value. Available values are: ${t.map(o=>o.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return o}const e=t.find(o=>o.default)??t[0];if(!e)throw new Error("Unexpected error: 0 tabValues");return e.value}({defaultValue:t,tabValues:s})),[a,i]=D({queryString:e,groupId:r}),[u,h]=function({groupId:o}){const t=function(o){return o?`docusaurus.tab.${o}`:null}(o),[e,r]=(0,y.Dv)(t);return[e,(0,n.useCallback)(o=>{t&&r.set(o)},[t,r])]}({groupId:r}),C=(()=>{const o=a??u;return d({value:o,tabValues:s})?o:null})();(0,c.A)(()=>{C&&p(C)},[C]);return{selectedValue:l,selectValue:(0,n.useCallback)(o=>{if(!d({value:o,tabValues:s}))throw new Error(`Can't select invalid tab value=${o}`);p(o),i(o),h(o)},[i,h,s]),tabValues:s}}var h=e(92303);const C={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var m=e(74848);function f({className:o,block:t,selectedValue:e,selectValue:n,tabValues:l}){const c=[],{blockElementScrollPositionUntilNextRender:p}=(0,s.a_)(),a=o=>{const t=o.currentTarget,r=c.indexOf(t),s=l[r].value;s!==e&&(p(t),n(s))},y=o=>{let t=null;switch(o.key){case"Enter":a(o);break;case"ArrowRight":{const e=c.indexOf(o.currentTarget)+1;t=c[e]??c[0];break}case"ArrowLeft":{const e=c.indexOf(o.currentTarget)-1;t=c[e]??c[c.length-1];break}}t?.focus()};return(0,m.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":t},o),children:l.map(({value:o,label:t,attributes:n})=>(0,m.jsx)("li",{role:"tab",tabIndex:e===o?0:-1,"aria-selected":e===o,ref:o=>{c.push(o)},onKeyDown:y,onClick:a,...n,className:(0,r.A)("tabs__item",C.tabItem,n?.className,{"tabs__item--active":e===o}),children:t??o},o))})}function g({lazy:o,children:t,selectedValue:e}){const s=(Array.isArray(t)?t:[t]).filter(Boolean);if(o){const o=s.find(o=>o.props.value===e);return o?(0,n.cloneElement)(o,{className:(0,r.A)("margin-top--md",o.props.className)}):null}return(0,m.jsx)("div",{className:"margin-top--md",children:s.map((o,t)=>(0,n.cloneElement)(o,{key:t,hidden:o.props.value!==e}))})}function k(o){const t=u(o);return(0,m.jsxs)("div",{className:(0,r.A)("tabs-container",C.tabList),children:[(0,m.jsx)(f,{...t,...o}),(0,m.jsx)(g,{...t,...o})]})}function x(o){const t=(0,h.A)();return(0,m.jsx)(k,{...o,children:i(o.children)},String(t))}},19365:(o,t,e)=>{e.d(t,{A:()=>l});e(96540);var n=e(18215);const r={tabItem:"tabItem_Ymn6"};var s=e(74848);function l({children:o,hidden:t,className:e}){return(0,s.jsx)("div",{role:"tabpanel",className:(0,n.A)(r.tabItem,e),hidden:t,children:o})}},59474:(o,t,e)=>{e.r(t),e.d(t,{CH:()=>i,assets:()=>y,chCodeConfig:()=>F,contentTitle:()=>a,default:()=>u,frontMatter:()=>p,metadata:()=>n,toc:()=>d});const n=JSON.parse('{"id":"Components/python-interpreter","title":"Python Interpreter","description":"This component allows you to execute Python code with imported packages.","source":"@site/docs/Components/python-interpreter.mdx","sourceDirName":"Components","slug":"/python-interpreter","permalink":"/python-interpreter","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Python Interpreter","slug":"/python-interpreter"},"sidebar":"docs","previous":{"title":"Current Date","permalink":"/current-date"},"next":{"title":"SQL Database","permalink":"/sql-database"}}');var r=e(74848),s=e(28453),l=e(24754),c=e(40619);e(11470),e(19365);const p={title:"Python Interpreter",slug:"/python-interpreter"},a=void 0,y={},i={annotations:l.hk,Code:l.Cy},F={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},d=[{value:"Use the Python Interpreter in a flow",id:"use-the-python-interpreter-in-a-flow",level:2},{value:"Pass inputs to the Python Interpreter",id:"pass-inputs-to-the-python-interpreter",level:2},{value:"Python Interpreter parameters",id:"python-interpreter-parameters",level:2}];function D(o){const t={a:"a",code:"code",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.R)(),...o.components},{Details:n}=t;return i||h("CH",!1),i.Code||h("CH.Code",!0),n||h("Details",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n","\n",(0,r.jsx)(t.p,{children:"This component allows you to execute Python code with imported packages."}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Python Interpreter"})," component can only import packages that are already installed in your Langflow environment.\nIf you encounter an ",(0,r.jsx)(t.code,{children:"ImportError"})," when trying to use a package, you need to install it first."]}),"\n",(0,r.jsxs)(t.p,{children:["To install custom packages, see ",(0,r.jsx)(t.a,{href:"/install-custom-dependencies",children:"Install custom dependencies"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"use-the-python-interpreter-in-a-flow",children:"Use the Python Interpreter in a flow"}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["To use this component in a flow, in the ",(0,r.jsx)(t.strong,{children:"Global Imports"})," field, add the packages you want to import as a comma-separated list, such as ",(0,r.jsx)(t.code,{children:"math,pandas"}),".\nAt least one import is required."]}),"\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Python Code"})," field, enter the Python code you want to execute. Use ",(0,r.jsx)(t.code,{children:"print()"})," to see the output."]}),"\n",(0,r.jsxs)(t.li,{children:["Optional: Enable ",(0,r.jsx)(t.strong,{children:"Tool Mode"}),", and then connect the ",(0,r.jsx)(t.strong,{children:"Python Interpreter"})," component to an ",(0,r.jsx)(t.strong,{children:"Agent"})," component as a tool.\nFor example, connect a ",(0,r.jsx)(t.strong,{children:"Python Interpreter"})," component and a ",(0,r.jsxs)(t.a,{href:"/calculator",children:[(0,r.jsx)(t.strong,{children:"Calculator"})," component"]})," as tools for an ",(0,r.jsx)(t.strong,{children:"Agent"})," component, and then test how it chooses different tools to solve math problems.\n",(0,r.jsx)(t.img,{alt:"Python Interpreter and Calculator components connected to an Agent component",src:e(99e3).A+"",width:"3988",height:"2928"})]}),"\n",(0,r.jsxs)(t.li,{children:["Ask the agent an easier math question.\nThe ",(0,r.jsx)(t.strong,{children:"Calculator"})," tool can add, subtract, multiple, divide, or perform exponentiation.\nThe agent executes the ",(0,r.jsx)(t.code,{children:"evaluate_expression"})," tool to correctly answer the question."]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:"Result:"}),"\n",(0,r.jsx)(i.Code,{codeConfig:F,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Executed evaluate_expression",props:{}}]},{tokens:[{content:"Input:",props:{}}]},{tokens:[{content:"{",props:{}}]},{tokens:[{content:' "expression": "2+5"',props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Output:",props:{}}]},{tokens:[{content:"{",props:{}}]},{tokens:[{content:' "result": "7"',props:{}}]},{tokens:[{content:"}",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(t.ol,{start:"5",children:["\n",(0,r.jsxs)(t.li,{children:["Give the agent complete Python code.\nThis example creates a Pandas DataFrame table with the imported ",(0,r.jsx)(t.code,{children:"pandas"})," packages, and returns the square root of the mean squares."]}),"\n"]}),"\n",(0,r.jsx)(i.Code,{codeConfig:F,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" pandas ",props:{style:{color:"#C9D1D9"}}},{content:"as",props:{style:{color:"#FF7B72"}}},{content:" pd",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" math",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# Create a simple DataFrame",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"df ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" pd.DataFrame({",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" 'numbers'",props:{style:{color:"#A5D6FF"}}},{content:": [",props:{style:{color:"#C9D1D9"}}},{content:"1",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"2",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"3",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"4",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"5",props:{style:{color:"#79C0FF"}}},{content:"],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" 'squares'",props:{style:{color:"#A5D6FF"}}},{content:": [x",props:{style:{color:"#C9D1D9"}}},{content:"**",props:{style:{color:"#FF7B72"}}},{content:"2 ",props:{style:{color:"#79C0FF"}}},{content:"for",props:{style:{color:"#FF7B72"}}},{content:" x ",props:{style:{color:"#C9D1D9"}}},{content:"in ",props:{style:{color:"#FF7B72"}}},{content:"range",props:{style:{color:"#79C0FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"1",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"6",props:{style:{color:"#79C0FF"}}},{content:")]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"})",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# Calculate the square root of the mean",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"result ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" math.sqrt(df[",props:{style:{color:"#C9D1D9"}}},{content:"'squares'",props:{style:{color:"#A5D6FF"}}},{content:"].mean())",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"print",props:{style:{color:"#79C0FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"f",props:{style:{color:"#FF7B72"}}},{content:'"Square root of mean squares: ',props:{style:{color:"#A5D6FF"}}},{content:"{",props:{style:{color:"#79C0FF"}}},{content:"result",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:'"',props:{style:{color:"#A5D6FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,r.jsxs)(t.p,{children:["The agent correctly chooses the ",(0,r.jsx)(t.code,{children:"run_python_repl"})," tool to solve the problem."]}),"\n",(0,r.jsx)(t.p,{children:"Result:"}),"\n",(0,r.jsx)(i.Code,{codeConfig:F,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Executed run_python_repl",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"Input:",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"{",props:{}}]},{tokens:[{content:" \"python_code\": \"import pandas as pd\\nimport math\\n\\n# Create a simple DataFrame\\ndf = pd.DataFrame({\\n 'numbers': [1, 2, 3, 4, 5],\\n 'squares': [x**2 for x in range(1, 6)]\\n})\\n\\n# Calculate the square root of the mean\\nresult = math.sqrt(df['squares'].mean())\\nprint(f\\\"Square root of mean squares: {result}\\\")\"",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Output:",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"{",props:{}}]},{tokens:[{content:' "result": "Square root of mean squares: 3.3166247903554"',props:{}}]},{tokens:[{content:"}",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(t.p,{children:["If you don't include the package imports in the chat, the agent can still create the table using ",(0,r.jsx)(t.code,{children:"pd.DataFrame"}),", because the ",(0,r.jsx)(t.code,{children:"pandas"})," package is imported globally by the ",(0,r.jsx)(t.strong,{children:"Python Interpreter"})," component in the ",(0,r.jsx)(t.strong,{children:"Global Imports"})," field."]}),"\n",(0,r.jsx)(t.h2,{id:"pass-inputs-to-the-python-interpreter",children:"Pass inputs to the Python Interpreter"}),"\n",(0,r.jsxs)(t.p,{children:["To pass inputs to the ",(0,r.jsx)(t.strong,{children:"Python Interpreter"})," component, you need to customize the component's code to add input fields.\nAfter the input field is added to the component code, the port becomes available for connections.\nFor example, to connect a ",(0,r.jsxs)(t.a,{href:"/text-input-and-output",children:[(0,r.jsx)(t.strong,{children:"Text"})," component"]})," and pass a URL value to the ",(0,r.jsx)(t.strong,{children:"Python Interpreter"})," component, do the following:"]}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Add a ",(0,r.jsx)(t.strong,{children:"Python Interpreter"})," component to your flow."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["To modify the ",(0,r.jsx)(t.strong,{children:"Python Interpreter"})," component's code, click ",(0,r.jsx)(c.A,{name:"Code","aria-hidden":"true"})," ",(0,r.jsx)(t.strong,{children:"Edit Code"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["To pass a URL input to the ",(0,r.jsx)(t.strong,{children:"Python Interpreter"})," component, make the following changes to the code:"]}),"\n",(0,r.jsxs)(t.p,{children:["a. Add the URL input field to the ",(0,r.jsx)(t.code,{children:"inputs"})," list. This creates the input port that other components can connect to."]}),"\n",(0,r.jsxs)(t.p,{children:["b. Update the ",(0,r.jsx)(t.code,{children:"get_globals"})," method to extract the URL value and add it to the globals dictionary.\nThis makes the ",(0,r.jsx)(t.code,{children:"url"})," variable available in the component's Python code."]}),"\n",(0,r.jsxs)(t.p,{children:["c. Update the default Python code value to use the ",(0,r.jsx)(t.code,{children:"url"})," variable."]}),"\n",(0,r.jsx)(t.p,{children:"The following example demonstrates these modifications."}),"\n",(0,r.jsxs)(n,{open:!0,children:[(0,r.jsx)("summary",{children:"Python code example"}),(0,r.jsx)(i.Code,{codeConfig:F,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" importlib",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" langchain_experimental.utilities ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" PythonREPL",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" lfx.custom.custom_component.component ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Component",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" lfx.io ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" MultilineInput, Output, StrInput",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" lfx.schema.data ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Data",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"from",props:{style:{color:"#FF7B72"}}},{content:" lfx.schema.message ",props:{style:{color:"#C9D1D9"}}},{content:"import",props:{style:{color:"#FF7B72"}}},{content:" Message ",props:{style:{color:"#C9D1D9"}}},{content:"# Needed to extract text from Message objects",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"class ",props:{style:{color:"#FF7B72"}}},{content:"PythonREPLComponent",props:{style:{color:"#FFA657"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"Component",props:{style:{color:"#79C0FF"}}},{content:"):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"Python Interpreter"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" description ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"Run Python code with optional imports. Use print() to see the output."',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" documentation: ",props:{style:{color:"#C9D1D9"}}},{content:"str ",props:{style:{color:"#79C0FF"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"https://docs.langflow.org/python-interpreter"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" icon ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"square-terminal"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" inputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" StrInput(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"global_imports"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Global Imports"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" info",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"\"A comma-separated list of modules to import globally, e.g. 'math,numpy,pandas'.\"",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" value",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"math,pandas"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" required",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"True",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" MultilineInput(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"python_code"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Python Code"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" info",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"\"The Python code to execute. Only modules specified in Global Imports can be used. Use 'url' variable if URL input is connected.\"",props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" value",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"\"print(f'URL: ",props:{style:{color:"#A5D6FF"}}},{content:"{url}",props:{style:{color:"#79C0FF"}}},{content:"')\"",props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"# Updated to make the URL variable available to the Python code execution",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" input_types",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"[",props:{style:{color:"#C9D1D9"}}},{content:'"Message"',props:{style:{color:"#A5D6FF"}}},{content:"],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" tool_mode",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"True",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" required",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"True",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" # Add the URL input field to inputs list",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" StrInput(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"url"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"URL"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" info",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"URL variable that can be used in Python code. Connect a Text component or enter manually."',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" value",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'""',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" input_types",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"[",props:{style:{color:"#C9D1D9"}}},{content:'"Text"',props:{style:{color:"#A5D6FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"Message"',props:{style:{color:"#A5D6FF"}}},{content:"],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" required",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"False",props:{style:{color:"#79C0FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" outputs ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" Output(",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" display_name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"Results"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" name",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"results"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" type_",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"Data,",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" method",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:'"run_python_repl"',props:{style:{color:"#A5D6FF"}}},{content:",",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ),",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" ]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" def ",props:{style:{color:"#FF7B72"}}},{content:"get_globals",props:{style:{color:"#D2A8FF"}}},{content:"(self, global_imports: ",props:{style:{color:"#C9D1D9"}}},{content:"str ",props:{style:{color:"#79C0FF"}}},{content:"|",props:{style:{color:"#FF7B72"}}},{content:" list[",props:{style:{color:"#C9D1D9"}}},{content:"str",props:{style:{color:"#79C0FF"}}},{content:"]) -> ",props:{style:{color:"#C9D1D9"}}},{content:"dict",props:{style:{color:"#79C0FF"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:' """Create a globals dictionary with only the specified allowed imports and input variables."""',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" global_dict ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" {}",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" try",props:{style:{color:"#FF7B72"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" if ",props:{style:{color:"#FF7B72"}}},{content:"isinstance",props:{style:{color:"#79C0FF"}}},{content:"(global_imports, ",props:{style:{color:"#C9D1D9"}}},{content:"str",props:{style:{color:"#79C0FF"}}},{content:"):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" modules ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" [module.strip() ",props:{style:{color:"#C9D1D9"}}},{content:"for",props:{style:{color:"#FF7B72"}}},{content:" module ",props:{style:{color:"#C9D1D9"}}},{content:"in",props:{style:{color:"#FF7B72"}}},{content:" global_imports.split(",props:{style:{color:"#C9D1D9"}}},{content:'","',props:{style:{color:"#A5D6FF"}}},{content:")]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" elif ",props:{style:{color:"#FF7B72"}}},{content:"isinstance",props:{style:{color:"#79C0FF"}}},{content:"(global_imports, ",props:{style:{color:"#C9D1D9"}}},{content:"list",props:{style:{color:"#79C0FF"}}},{content:"):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" modules ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" global_imports",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" else",props:{style:{color:"#FF7B72"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" msg ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:'"global_imports must be either a string or a list"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" raise ",props:{style:{color:"#FF7B72"}}},{content:"TypeError",props:{style:{color:"#79C0FF"}}},{content:"(msg)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" for",props:{style:{color:"#FF7B72"}}},{content:" module ",props:{style:{color:"#C9D1D9"}}},{content:"in",props:{style:{color:"#FF7B72"}}},{content:" modules:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" try",props:{style:{color:"#FF7B72"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" imported_module ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" importlib.import_module(module)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" global_dict[imported_module.",props:{style:{color:"#C9D1D9"}}},{content:"__name__",props:{style:{color:"#79C0FF"}}},{content:"] ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" imported_module",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" except ",props:{style:{color:"#FF7B72"}}},{content:"ImportError ",props:{style:{color:"#79C0FF"}}},{content:"as",props:{style:{color:"#FF7B72"}}},{content:" e:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" msg ",props:{style:{color:"#C9D1D9"}}},{content:"= f",props:{style:{color:"#FF7B72"}}},{content:'"Could not import module ',props:{style:{color:"#A5D6FF"}}},{content:"{",props:{style:{color:"#79C0FF"}}},{content:"module",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:": ",props:{style:{color:"#A5D6FF"}}},{content:"{",props:{style:{color:"#79C0FF"}}},{content:"e",props:{style:{color:"#C9D1D9"}}},{content:"!s",props:{style:{color:"#FF7B72"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" raise ",props:{style:{color:"#FF7B72"}}},{content:"ImportError",props:{style:{color:"#79C0FF"}}},{content:"(msg) ",props:{style:{color:"#C9D1D9"}}},{content:"from",props:{style:{color:"#FF7B72"}}},{content:" e",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" # Add the URL variable to the component's globals dictionary",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" # Extract from Message object or use the string directly",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" if ",props:{style:{color:"#FF7B72"}}},{content:"hasattr",props:{style:{color:"#79C0FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:'"url"',props:{style:{color:"#A5D6FF"}}},{content:") ",props:{style:{color:"#C9D1D9"}}},{content:"and ",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".url:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" url_value ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".url.text ",props:{style:{color:"#C9D1D9"}}},{content:"if ",props:{style:{color:"#FF7B72"}}},{content:"isinstance",props:{style:{color:"#79C0FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".url, Message) ",props:{style:{color:"#C9D1D9"}}},{content:"else ",props:{style:{color:"#FF7B72"}}},{content:"str",props:{style:{color:"#79C0FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".url)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" if",props:{style:{color:"#FF7B72"}}},{content:" url_value:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" global_dict[",props:{style:{color:"#C9D1D9"}}},{content:'"url"',props:{style:{color:"#A5D6FF"}}},{content:"] ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" url_value ",props:{style:{color:"#C9D1D9"}}},{content:"# Makes 'url' available in Python code",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" self",props:{style:{color:"#79C0FF"}}},{content:".log(",props:{style:{color:"#C9D1D9"}}},{content:"f",props:{style:{color:"#FF7B72"}}},{content:'"URL variable set: ',props:{style:{color:"#A5D6FF"}}},{content:"{",props:{style:{color:"#79C0FF"}}},{content:"url_value",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:'"',props:{style:{color:"#A5D6FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" except ",props:{style:{color:"#FF7B72"}}},{content:"Exception ",props:{style:{color:"#79C0FF"}}},{content:"as",props:{style:{color:"#FF7B72"}}},{content:" e:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" self",props:{style:{color:"#79C0FF"}}},{content:".log(",props:{style:{color:"#C9D1D9"}}},{content:"f",props:{style:{color:"#FF7B72"}}},{content:'"Error in global imports: ',props:{style:{color:"#A5D6FF"}}},{content:"{",props:{style:{color:"#79C0FF"}}},{content:"e",props:{style:{color:"#C9D1D9"}}},{content:"!s",props:{style:{color:"#FF7B72"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:'"',props:{style:{color:"#A5D6FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" raise",props:{style:{color:"#FF7B72"}}}]},{tokens:[{content:" else",props:{style:{color:"#FF7B72"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" self",props:{style:{color:"#79C0FF"}}},{content:".log(",props:{style:{color:"#C9D1D9"}}},{content:"f",props:{style:{color:"#FF7B72"}}},{content:'"Successfully imported modules: ',props:{style:{color:"#A5D6FF"}}},{content:"{list",props:{style:{color:"#79C0FF"}}},{content:"(global_dict.keys())",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:'"',props:{style:{color:"#A5D6FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" global_dict",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" def ",props:{style:{color:"#FF7B72"}}},{content:"run_python_repl",props:{style:{color:"#D2A8FF"}}},{content:"(self) -> Data:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" try",props:{style:{color:"#FF7B72"}}},{content:":",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" # Extract Python code text if it's a Message object",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:" python_code_text ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".python_code",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" if ",props:{style:{color:"#FF7B72"}}},{content:"isinstance",props:{style:{color:"#79C0FF"}}},{content:"(python_code_text, Message):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" python_code_text ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" python_code_text.text ",props:{style:{color:"#C9D1D9"}}},{content:"if",props:{style:{color:"#FF7B72"}}},{content:" python_code_text.text ",props:{style:{color:"#C9D1D9"}}},{content:"else ",props:{style:{color:"#FF7B72"}}},{content:'""',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" elif not ",props:{style:{color:"#FF7B72"}}},{content:"isinstance",props:{style:{color:"#79C0FF"}}},{content:"(python_code_text, ",props:{style:{color:"#C9D1D9"}}},{content:"str",props:{style:{color:"#79C0FF"}}},{content:"):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" python_code_text ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"str",props:{style:{color:"#79C0FF"}}},{content:"(python_code_text)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" globals_ ",props:{style:{color:"#C9D1D9"}}},{content:"= ",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".get_globals(",props:{style:{color:"#C9D1D9"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".global_imports)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" python_repl ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" PythonREPL(",props:{style:{color:"#C9D1D9"}}},{content:"_globals",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"globals_)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" result ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" python_repl.run(python_code_text)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" result ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" result.strip() ",props:{style:{color:"#C9D1D9"}}},{content:"if",props:{style:{color:"#FF7B72"}}},{content:" result ",props:{style:{color:"#C9D1D9"}}},{content:"else ",props:{style:{color:"#FF7B72"}}},{content:'""',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" self",props:{style:{color:"#79C0FF"}}},{content:".log(",props:{style:{color:"#C9D1D9"}}},{content:'"Code execution completed successfully"',props:{style:{color:"#A5D6FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" Data(",props:{style:{color:"#C9D1D9"}}},{content:"data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"{",props:{style:{color:"#C9D1D9"}}},{content:'"result"',props:{style:{color:"#A5D6FF"}}},{content:": result})",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" except ",props:{style:{color:"#FF7B72"}}},{content:"ImportError ",props:{style:{color:"#79C0FF"}}},{content:"as",props:{style:{color:"#FF7B72"}}},{content:" e:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" error_message ",props:{style:{color:"#C9D1D9"}}},{content:"= f",props:{style:{color:"#FF7B72"}}},{content:'"Import Error: ',props:{style:{color:"#A5D6FF"}}},{content:"{",props:{style:{color:"#79C0FF"}}},{content:"e",props:{style:{color:"#C9D1D9"}}},{content:"!s",props:{style:{color:"#FF7B72"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" self",props:{style:{color:"#79C0FF"}}},{content:".log(error_message)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" Data(",props:{style:{color:"#C9D1D9"}}},{content:"data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"{",props:{style:{color:"#C9D1D9"}}},{content:'"error"',props:{style:{color:"#A5D6FF"}}},{content:": error_message})",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" except ",props:{style:{color:"#FF7B72"}}},{content:"SyntaxError ",props:{style:{color:"#79C0FF"}}},{content:"as",props:{style:{color:"#FF7B72"}}},{content:" e:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" error_message ",props:{style:{color:"#C9D1D9"}}},{content:"= f",props:{style:{color:"#FF7B72"}}},{content:'"Syntax Error: ',props:{style:{color:"#A5D6FF"}}},{content:"{",props:{style:{color:"#79C0FF"}}},{content:"e",props:{style:{color:"#C9D1D9"}}},{content:"!s",props:{style:{color:"#FF7B72"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" self",props:{style:{color:"#79C0FF"}}},{content:".log(error_message)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" Data(",props:{style:{color:"#C9D1D9"}}},{content:"data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"{",props:{style:{color:"#C9D1D9"}}},{content:'"error"',props:{style:{color:"#A5D6FF"}}},{content:": error_message})",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" except",props:{style:{color:"#FF7B72"}}},{content:" (",props:{style:{color:"#C9D1D9"}}},{content:"NameError",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"TypeError",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"ValueError",props:{style:{color:"#79C0FF"}}},{content:") ",props:{style:{color:"#C9D1D9"}}},{content:"as",props:{style:{color:"#FF7B72"}}},{content:" e:",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" error_message ",props:{style:{color:"#C9D1D9"}}},{content:"= f",props:{style:{color:"#FF7B72"}}},{content:'"Error during execution: ',props:{style:{color:"#A5D6FF"}}},{content:"{",props:{style:{color:"#79C0FF"}}},{content:"e",props:{style:{color:"#C9D1D9"}}},{content:"!s",props:{style:{color:"#FF7B72"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:'"',props:{style:{color:"#A5D6FF"}}}]},{tokens:[{content:" self",props:{style:{color:"#79C0FF"}}},{content:".log(error_message)",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return",props:{style:{color:"#FF7B72"}}},{content:" Data(",props:{style:{color:"#C9D1D9"}}},{content:"data",props:{style:{color:"#FFA657"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:"{",props:{style:{color:"#C9D1D9"}}},{content:'"error"',props:{style:{color:"#A5D6FF"}}},{content:": error_message})",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" def ",props:{style:{color:"#FF7B72"}}},{content:"build",props:{style:{color:"#D2A8FF"}}},{content:"(self):",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" return ",props:{style:{color:"#FF7B72"}}},{content:"self",props:{style:{color:"#79C0FF"}}},{content:".run_python_repl",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]})]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["To save the modifications, click ",(0,r.jsx)(t.strong,{children:"Check & Save"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Add a ",(0,r.jsx)(t.strong,{children:"Text"})," component to your flow and set its value, such as ",(0,r.jsx)(t.code,{children:"google.com"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(t.li,{children:["\n",(0,r.jsxs)(t.p,{children:["Connect the ",(0,r.jsx)(t.strong,{children:"Text"})," component's output to the new ",(0,r.jsx)(t.strong,{children:"URL"})," input field on your customized ",(0,r.jsx)(t.strong,{children:"Python Interpreter"})," component."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Python Interpreter"})," component can now use the ",(0,r.jsx)(t.code,{children:"url"})," variable in the Python code that it executes."]}),"\n",(0,r.jsx)(t.h2,{id:"python-interpreter-parameters",children:"Python Interpreter parameters"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"global_imports"}),(0,r.jsx)(t.td,{children:"String"}),(0,r.jsxs)(t.td,{children:["Input parameter. A comma-separated list of modules to import globally, such as ",(0,r.jsx)(t.code,{children:"math,pandas,numpy"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"python_code"}),(0,r.jsx)(t.td,{children:"Code"}),(0,r.jsx)(t.td,{children:"Input parameter. The Python code to execute. Only modules specified in Global Imports can be used."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"results"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsx)(t.td,{children:"Output parameter. The output of the executed Python code, including any printed results or errors."})]})]})]})]})}function u(o={}){const{wrapper:t}={...(0,s.R)(),...o.components};return t?(0,r.jsx)(t,{...o,children:(0,r.jsx)(D,{...o})}):D(o)}function h(o,t){throw new Error("Expected "+(t?"component":"object")+" `"+o+"` to be defined: you likely forgot to import, pass, or provide it.")}},99e3:(o,t,e)=>{e.d(t,{A:()=>n});const n=e.p+"assets/images/component-python-interpreter-1ef9e7dec643a216fd5e83c2139d09c9.png"}}]); \ No newline at end of file diff --git a/assets/js/1a29c454.a9d3e28a.js b/assets/js/1a29c454.a9d3e28a.js deleted file mode 100644 index 2fbd74da35..0000000000 --- a/assets/js/1a29c454.a9d3e28a.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[3140],{11470:(e,t,o)=>{o.d(t,{A:()=>C});var n=o(96540),r=o(18215),s=o(23104),a=o(56347),c=o(205),l=o(57485),i=o(31682),p=o(70679);function d(e){return n.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,n.isValidElement)(e)&&function(e){const{props:t}=e;return!!t&&"object"==typeof t&&"value"in t}(e))return e;throw new Error(`Docusaurus error: Bad child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the component should be , and every should have a unique "value" prop.`)})?.filter(Boolean)??[]}function u(e){const{values:t,children:o}=e;return(0,n.useMemo)(()=>{const e=t??function(e){return d(e).map(({props:{value:e,label:t,attributes:o,default:n}})=>({value:e,label:t,attributes:o,default:n}))}(o);return function(e){const t=(0,i.XI)(e,(e,t)=>e.value===t.value);if(t.length>0)throw new Error(`Docusaurus error: Duplicate values "${t.map(e=>e.value).join(", ")}" found in . Every value needs to be unique.`)}(e),e},[t,o])}function h({value:e,tabValues:t}){return t.some(t=>t.value===e)}function m({queryString:e=!1,groupId:t}){const o=(0,a.W6)(),r=function({queryString:e=!1,groupId:t}){if("string"==typeof e)return e;if(!1===e)return null;if(!0===e&&!t)throw new Error('Docusaurus error: The component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return t??null}({queryString:e,groupId:t});return[(0,l.aZ)(r),(0,n.useCallback)(e=>{if(!r)return;const t=new URLSearchParams(o.location.search);t.set(r,e),o.replace({...o.location,search:t.toString()})},[r,o])]}function y(e){const{defaultValue:t,queryString:o=!1,groupId:r}=e,s=u(e),[a,l]=(0,n.useState)(()=>function({defaultValue:e,tabValues:t}){if(0===t.length)throw new Error("Docusaurus error: the component requires at least one children component");if(e){if(!h({value:e,tabValues:t}))throw new Error(`Docusaurus error: The has a defaultValue "${e}" but none of its children has the corresponding value. Available values are: ${t.map(e=>e.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return e}const o=t.find(e=>e.default)??t[0];if(!o)throw new Error("Unexpected error: 0 tabValues");return o.value}({defaultValue:t,tabValues:s})),[i,d]=m({queryString:o,groupId:r}),[y,f]=function({groupId:e}){const t=function(e){return e?`docusaurus.tab.${e}`:null}(e),[o,r]=(0,p.Dv)(t);return[o,(0,n.useCallback)(e=>{t&&r.set(e)},[t,r])]}({groupId:r}),g=(()=>{const e=i??y;return h({value:e,tabValues:s})?e:null})();(0,c.A)(()=>{g&&l(g)},[g]);return{selectedValue:a,selectValue:(0,n.useCallback)(e=>{if(!h({value:e,tabValues:s}))throw new Error(`Can't select invalid tab value=${e}`);l(e),d(e),f(e)},[d,f,s]),tabValues:s}}var f=o(92303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var b=o(74848);function x({className:e,block:t,selectedValue:o,selectValue:n,tabValues:a}){const c=[],{blockElementScrollPositionUntilNextRender:l}=(0,s.a_)(),i=e=>{const t=e.currentTarget,r=c.indexOf(t),s=a[r].value;s!==o&&(l(t),n(s))},p=e=>{let t=null;switch(e.key){case"Enter":i(e);break;case"ArrowRight":{const o=c.indexOf(e.currentTarget)+1;t=c[o]??c[0];break}case"ArrowLeft":{const o=c.indexOf(e.currentTarget)-1;t=c[o]??c[c.length-1];break}}t?.focus()};return(0,b.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,r.A)("tabs",{"tabs--block":t},e),children:a.map(({value:e,label:t,attributes:n})=>(0,b.jsx)("li",{role:"tab",tabIndex:o===e?0:-1,"aria-selected":o===e,ref:e=>{c.push(e)},onKeyDown:p,onClick:i,...n,className:(0,r.A)("tabs__item",g.tabItem,n?.className,{"tabs__item--active":o===e}),children:t??e},e))})}function k({lazy:e,children:t,selectedValue:o}){const s=(Array.isArray(t)?t:[t]).filter(Boolean);if(e){const e=s.find(e=>e.props.value===o);return e?(0,n.cloneElement)(e,{className:(0,r.A)("margin-top--md",e.props.className)}):null}return(0,b.jsx)("div",{className:"margin-top--md",children:s.map((e,t)=>(0,n.cloneElement)(e,{key:t,hidden:e.props.value!==o}))})}function j(e){const t=y(e);return(0,b.jsxs)("div",{className:(0,r.A)("tabs-container",g.tabList),children:[(0,b.jsx)(x,{...t,...e}),(0,b.jsx)(k,{...t,...e})]})}function C(e){const t=(0,f.A)();return(0,b.jsx)(j,{...e,children:d(e.children)},String(t))}},19365:(e,t,o)=>{o.d(t,{A:()=>a});o(96540);var n=o(18215);const r={tabItem:"tabItem_Ymn6"};var s=o(74848);function a({children:e,hidden:t,className:o}){return(0,s.jsx)("div",{role:"tabpanel",className:(0,n.A)(r.tabItem,o),hidden:t,children:e})}},59474:(e,t,o)=>{o.r(t),o.d(t,{CH:()=>p,assets:()=>i,chCodeConfig:()=>d,contentTitle:()=>l,default:()=>m,frontMatter:()=>c,metadata:()=>n,toc:()=>u});const n=JSON.parse('{"id":"Components/python-interpreter","title":"Python Interpreter","description":"This component allows you to execute Python code with imported packages.","source":"@site/docs/Components/python-interpreter.mdx","sourceDirName":"Components","slug":"/python-interpreter","permalink":"/python-interpreter","draft":false,"unlisted":false,"tags":[],"version":"current","frontMatter":{"title":"Python Interpreter","slug":"/python-interpreter"},"sidebar":"docs","previous":{"title":"Current Date","permalink":"/current-date"},"next":{"title":"SQL Database","permalink":"/sql-database"}}');var r=o(74848),s=o(28453),a=o(24754);o(40619),o(11470),o(19365);const c={title:"Python Interpreter",slug:"/python-interpreter"},l=void 0,i={},p={annotations:a.hk,Code:a.Cy},d={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},u=[{value:"Use the Python Interpreter in a flow",id:"use-the-python-interpreter-in-a-flow",level:2},{value:"Python Interpreter parameters",id:"python-interpreter-parameters",level:2}];function h(e){const t={a:"a",code:"code",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,s.R)(),...e.components};return p||y("CH",!1),p.Code||y("CH.Code",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n","\n",(0,r.jsx)(t.p,{children:"This component allows you to execute Python code with imported packages."}),"\n",(0,r.jsxs)(t.p,{children:["The ",(0,r.jsx)(t.strong,{children:"Python Interpreter"})," component can only import packages that are already installed in your Langflow environment.\nIf you encounter an ",(0,r.jsx)(t.code,{children:"ImportError"})," when trying to use a package, you need to install it first."]}),"\n",(0,r.jsxs)(t.p,{children:["To install custom packages, see ",(0,r.jsx)(t.a,{href:"/install-custom-dependencies",children:"Install custom dependencies"}),"."]}),"\n",(0,r.jsx)(t.h2,{id:"use-the-python-interpreter-in-a-flow",children:"Use the Python Interpreter in a flow"}),"\n",(0,r.jsxs)(t.ol,{children:["\n",(0,r.jsxs)(t.li,{children:["To use this component in a flow, in the ",(0,r.jsx)(t.strong,{children:"Global Imports"})," field, add the packages you want to import as a comma-separated list, such as ",(0,r.jsx)(t.code,{children:"math,pandas"}),".\nAt least one import is required."]}),"\n",(0,r.jsxs)(t.li,{children:["In the ",(0,r.jsx)(t.strong,{children:"Python Code"})," field, enter the Python code you want to execute. Use ",(0,r.jsx)(t.code,{children:"print()"})," to see the output."]}),"\n",(0,r.jsxs)(t.li,{children:["Optional: Enable ",(0,r.jsx)(t.strong,{children:"Tool Mode"}),", and then connect the ",(0,r.jsx)(t.strong,{children:"Python Interpreter"})," component to an ",(0,r.jsx)(t.strong,{children:"Agent"})," component as a tool.\nFor example, connect a ",(0,r.jsx)(t.strong,{children:"Python Interpreter"})," component and a ",(0,r.jsxs)(t.a,{href:"/calculator",children:[(0,r.jsx)(t.strong,{children:"Calculator"})," component"]})," as tools for an ",(0,r.jsx)(t.strong,{children:"Agent"})," component, and then test how it chooses different tools to solve math problems.\n",(0,r.jsx)(t.img,{alt:"Python Interpreter and Calculator components connected to an Agent component",src:o(99e3).A+"",width:"3988",height:"2928"})]}),"\n",(0,r.jsxs)(t.li,{children:["Ask the agent an easier math question.\nThe ",(0,r.jsx)(t.strong,{children:"Calculator"})," tool can add, subtract, multiple, divide, or perform exponentiation.\nThe agent executes the ",(0,r.jsx)(t.code,{children:"evaluate_expression"})," tool to correctly answer the question."]}),"\n"]}),"\n",(0,r.jsx)(t.p,{children:"Result:"}),"\n",(0,r.jsx)(p.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Executed evaluate_expression",props:{}}]},{tokens:[{content:"Input:",props:{}}]},{tokens:[{content:"{",props:{}}]},{tokens:[{content:' "expression": "2+5"',props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Output:",props:{}}]},{tokens:[{content:"{",props:{}}]},{tokens:[{content:' "result": "7"',props:{}}]},{tokens:[{content:"}",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(t.ol,{start:"5",children:["\n",(0,r.jsxs)(t.li,{children:["Give the agent complete Python code.\nThis example creates a Pandas DataFrame table with the imported ",(0,r.jsx)(t.code,{children:"pandas"})," packages, and returns the square root of the mean squares."]}),"\n"]}),"\n",(0,r.jsx)(p.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" pandas ",props:{style:{color:"#C9D1D9"}}},{content:"as",props:{style:{color:"#FF7B72"}}},{content:" pd",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"import",props:{style:{color:"#FF7B72"}}},{content:" math",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# Create a simple DataFrame",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"df ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" pd.DataFrame({",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" 'numbers'",props:{style:{color:"#A5D6FF"}}},{content:": [",props:{style:{color:"#C9D1D9"}}},{content:"1",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"2",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"3",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"4",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"5",props:{style:{color:"#79C0FF"}}},{content:"],",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:" 'squares'",props:{style:{color:"#A5D6FF"}}},{content:": [x",props:{style:{color:"#C9D1D9"}}},{content:"**",props:{style:{color:"#FF7B72"}}},{content:"2 ",props:{style:{color:"#79C0FF"}}},{content:"for",props:{style:{color:"#FF7B72"}}},{content:" x ",props:{style:{color:"#C9D1D9"}}},{content:"in ",props:{style:{color:"#FF7B72"}}},{content:"range",props:{style:{color:"#79C0FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"1",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"6",props:{style:{color:"#79C0FF"}}},{content:")]",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"})",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"# Calculate the square root of the mean",props:{style:{color:"#8B949E"}}}]},{tokens:[{content:"result ",props:{style:{color:"#C9D1D9"}}},{content:"=",props:{style:{color:"#FF7B72"}}},{content:" math.sqrt(df[",props:{style:{color:"#C9D1D9"}}},{content:"'squares'",props:{style:{color:"#A5D6FF"}}},{content:"].mean())",props:{style:{color:"#C9D1D9"}}}]},{tokens:[{content:"print",props:{style:{color:"#79C0FF"}}},{content:"(",props:{style:{color:"#C9D1D9"}}},{content:"f",props:{style:{color:"#FF7B72"}}},{content:'"Square root of mean squares: ',props:{style:{color:"#A5D6FF"}}},{content:"{",props:{style:{color:"#79C0FF"}}},{content:"result",props:{style:{color:"#C9D1D9"}}},{content:"}",props:{style:{color:"#79C0FF"}}},{content:'"',props:{style:{color:"#A5D6FF"}}},{content:")",props:{style:{color:"#C9D1D9"}}}]}],lang:"python"},annotations:[]}]}),"\n",(0,r.jsxs)(t.p,{children:["The agent correctly chooses the ",(0,r.jsx)(t.code,{children:"run_python_repl"})," tool to solve the problem."]}),"\n",(0,r.jsx)(t.p,{children:"Result:"}),"\n",(0,r.jsx)(p.Code,{codeConfig:d,northPanel:{tabs:[""],active:"",heightRatio:1},files:[{name:"",focus:"",code:{lines:[{tokens:[{content:"Executed run_python_repl",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"Input:",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"{",props:{}}]},{tokens:[{content:" \"python_code\": \"import pandas as pd\\nimport math\\n\\n# Create a simple DataFrame\\ndf = pd.DataFrame({\\n 'numbers': [1, 2, 3, 4, 5],\\n 'squares': [x**2 for x in range(1, 6)]\\n})\\n\\n# Calculate the square root of the mean\\nresult = math.sqrt(df['squares'].mean())\\nprint(f\\\"Square root of mean squares: {result}\\\")\"",props:{}}]},{tokens:[{content:"}",props:{}}]},{tokens:[{content:"Output:",props:{}}]},{tokens:[{content:"",props:{}}]},{tokens:[{content:"{",props:{}}]},{tokens:[{content:' "result": "Square root of mean squares: 3.3166247903554"',props:{}}]},{tokens:[{content:"}",props:{}}]}],lang:"text"},annotations:[]}]}),"\n",(0,r.jsxs)(t.p,{children:["If you don't include the package imports in the chat, the agent can still create the table using ",(0,r.jsx)(t.code,{children:"pd.DataFrame"}),", because the ",(0,r.jsx)(t.code,{children:"pandas"})," package is imported globally by the ",(0,r.jsx)(t.strong,{children:"Python Interpreter"})," component in the ",(0,r.jsx)(t.strong,{children:"Global Imports"})," field."]}),"\n",(0,r.jsx)(t.h2,{id:"python-interpreter-parameters",children:"Python Interpreter parameters"}),"\n",(0,r.jsxs)(t.table,{children:[(0,r.jsx)(t.thead,{children:(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.th,{children:"Name"}),(0,r.jsx)(t.th,{children:"Type"}),(0,r.jsx)(t.th,{children:"Description"})]})}),(0,r.jsxs)(t.tbody,{children:[(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"global_imports"}),(0,r.jsx)(t.td,{children:"String"}),(0,r.jsxs)(t.td,{children:["Input parameter. A comma-separated list of modules to import globally, such as ",(0,r.jsx)(t.code,{children:"math,pandas,numpy"}),"."]})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"python_code"}),(0,r.jsx)(t.td,{children:"Code"}),(0,r.jsx)(t.td,{children:"Input parameter. The Python code to execute. Only modules specified in Global Imports can be used."})]}),(0,r.jsxs)(t.tr,{children:[(0,r.jsx)(t.td,{children:"results"}),(0,r.jsx)(t.td,{children:"Data"}),(0,r.jsx)(t.td,{children:"Output parameter. The output of the executed Python code, including any printed results or errors."})]})]})]})]})}function m(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,r.jsx)(t,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}function y(e,t){throw new Error("Expected "+(t?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},99e3:(e,t,o)=>{o.d(t,{A:()=>n});const n=o.p+"assets/images/component-python-interpreter-1ef9e7dec643a216fd5e83c2139d09c9.png"}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.1ce3b1ea.js b/assets/js/runtime~main.981daf90.js similarity index 99% rename from assets/js/runtime~main.1ce3b1ea.js rename to assets/js/runtime~main.981daf90.js index 913875fb62..556d2ffb6d 100644 --- a/assets/js/runtime~main.1ce3b1ea.js +++ b/assets/js/runtime~main.981daf90.js @@ -1 +1 @@ -(()=>{"use strict";var e,a,f,d,b,c={},t={};function r(e){var a=t[e];if(void 0!==a)return a.exports;var f=t[e]={id:e,loaded:!1,exports:{}};return c[e].call(f.exports,f,f.exports,r),f.loaded=!0,f.exports}r.m=c,r.c=t,e=[],r.O=(a,f,d,b)=>{if(!f){var c=1/0;for(i=0;i=b)&&Object.keys(r.O).every(e=>r.O[e](f[o]))?f.splice(o--,1):(t=!1,b0&&e[i-1][2]>b;i--)e[i]=e[i-1];e[i]=[f,d,b]},r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a:a}),a},f=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,d){if(1&d&&(e=this(e)),8&d)return e;if("object"==typeof e&&e){if(4&d&&e.__esModule)return e;if(16&d&&"function"==typeof e.then)return e}var b=Object.create(null);r.r(b);var c={};a=a||[null,f({}),f([]),f(f)];for(var t=2&d&&e;"object"==typeof t&&!~a.indexOf(t);t=f(t))Object.getOwnPropertyNames(t).forEach(a=>c[a]=()=>e[a]);return c.default=()=>e,r.d(b,c),b},r.d=(e,a)=>{for(var f in a)r.o(a,f)&&!r.o(e,f)&&Object.defineProperty(e,f,{enumerable:!0,get:a[f]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((a,f)=>(r.f[f](e,a),a),[])),r.u=e=>"assets/js/"+({15:"d803fa53",30:"db8c087e",38:"a99a45c9",44:"e3f369d5",78:"b768a3a5",93:"a3702f61",126:"ae70dfbf",129:"dfa3dc90",253:"bb45d4f9",351:"b9acb8d9",375:"3d81f1cf",446:"a4232cf8",534:"76e36fb0",596:"c2e0ed62",598:"db4f3bbd",600:"ee87c775",681:"ffa0f8b1",750:"33b5ee95",879:"8bee5443",883:"1dfb8d43",889:"08b309e9",956:"03735ec1",957:"c141421f",1006:"47e58a89",1151:"890279ba",1162:"f7e6b9d6",1193:"444a6da6",1303:"41d45d82",1308:"ec030ab7",1345:"fe6d5b4f",1408:"2fc7e024",1446:"c78349fc",1490:"0f761898",1567:"22dd74f7",1703:"ff8bad6c",1861:"8ad67c3b",1876:"5c3b537a",1895:"d375ca1d",1966:"b1582da4",2076:"common",2102:"755d162a",2116:"0f1bef30",2138:"1a4e3797",2272:"ca5faf5d",2278:"c4280da9",2348:"f2da9399",2360:"017d425f",2394:"c2ea283c",2423:"19bcb67f",2457:"46abd5bb",2460:"954b19af",2469:"cd086441",2472:"62f97fbe",2475:"1ab69cbd",2565:"622fd833",2651:"8cd0650d",2741:"43ad9ba4",2752:"e14655eb",2888:"32270e71",2909:"144a43f5",2969:"f0ad3fbb",2990:"1d50b418",3035:"87b7bbd6",3038:"6df123cd",3140:"1a29c454",3147:"c83c70df",3164:"67f2dc6c",3240:"b079b393",3247:"f0b67137",3263:"730da84e",3284:"6398c398",3345:"040305fb",3353:"2b4d41d7",3361:"8f633f11",3368:"efa0f9ee",3387:"3d67876e",3468:"c76bd485",3500:"c3c63498",3536:"2eb731bc",3683:"5a0b74d9",4036:"fbcfc90d",4085:"cb17b4e0",4090:"a8ca941b",4173:"d51059db",4263:"9a5e6f6b",4314:"f6a246db",4341:"e1a0f423",4356:"7b864b08",4384:"622bdc6f",4474:"3db73d6f",4573:"baacc2a1",4612:"6a9eca1a",4614:"e55b8e98",4644:"d3e886ab",4876:"44691977",4907:"86116998",4919:"ce43de4b",4995:"62266e9d",5048:"3c440e04",5110:"e9fe1d10",5144:"944c5f91",5200:"ff7f32ba",5217:"fb0a7a3f",5270:"99931d31",5333:"70909872",5343:"1b10d5ba",5397:"eba86ea4",5412:"a6d50436",5660:"1b208f60",5663:"b1379b2b",5739:"69079906",5742:"aba21aa0",5757:"ad42ff54",5838:"bbb8ec1d",5903:"69d616f2",5985:"e3536031",6108:"2fed9fb3",6224:"ef9aa223",6256:"6888b60e",6289:"45e5859c",6311:"cce672fb",6329:"a7b545c5",6459:"290c78e6",6513:"f13693f0",6538:"719cba95",6559:"7431813e",6601:"81bb6a5c",6801:"acefda8b",6839:"80866714",6999:"d5ec984b",7098:"a7bd4aaa",7118:"7996108c",7243:"5d9d4350",7356:"2ea623f2",7484:"ad01e028",7498:"e4400415",7502:"1a547ad8",7512:"4c09a7b3",7567:"4545d55b",7586:"17856424",7705:"2b91b6ca",7720:"3bfbe7c9",7807:"1a8a0a64",7824:"2b56b65e",7829:"7c27dc91",7859:"593d9d00",7902:"619c7267",7964:"ff35961a",7968:"9b0af131",8090:"6e85978c",8240:"0102a83b",8267:"02f8077b",8268:"a4b6c971",8269:"c7f91cbe",8294:"f2bedfce",8336:"e7fd9095",8392:"20177945",8401:"17896441",8508:"10dd1586",8571:"da1ad91e",8593:"56350599",8607:"681e5335",8611:"0c23d011",8625:"3a9e0e6c",8649:"7de42fc9",8702:"42962acd",8750:"8a484c94",8765:"1a2eaade",8822:"555ae514",8862:"e87b52ac",8963:"56c23a02",8990:"5f1a63c6",9033:"9f55b2fc",9048:"a94703ab",9213:"62d1268c",9227:"7e40e6b3",9264:"c7f32161",9315:"16faf8bf",9331:"ffcd190c",9363:"f3312674",9459:"97254d1d",9482:"a9c1003f",9522:"85dc2a2b",9610:"453ae64a",9640:"3b25a2ae",9647:"5e95c892",9674:"feac1fba",9712:"d8c8efb9",9758:"439d880a",9763:"aece522a",9781:"b796be74",9897:"f0eeb72e",9976:"230d5fdc",9986:"d1f3cfe5"}[e]||e)+"."+{15:"baffcb6d",30:"588897ea",38:"05b1dfd7",44:"3af5a9c7",78:"b07f2ac1",93:"6a9e26d9",126:"69e57f51",129:"922b0385",253:"602a1444",351:"51b77e3f",375:"acd073ae",416:"3c613765",446:"3f8fb95b",534:"bad02455",596:"899f3ed3",598:"b3822b4a",600:"0b7c16ab",681:"c0f429a0",750:"ec12f875",879:"3d01ca35",883:"66682cce",889:"0f7676df",956:"c0e5141d",957:"da9e1d2b",1006:"892452a4",1151:"6ad55045",1162:"b63a4c1a",1193:"924d287f",1303:"1120f076",1308:"cae4889c",1345:"76c30ac9",1408:"a9123c42",1446:"e0ac4e92",1490:"1f031ac3",1567:"a19bb19c",1703:"48cbd885",1861:"8a5bfff3",1876:"6bdd7026",1895:"0c24dc6a",1966:"d5baab98",2076:"cb526175",2102:"b08c6c97",2116:"5b3bf41a",2138:"ba6348e7",2237:"8bc4ac99",2272:"461102c6",2278:"8a309036",2348:"b86340f7",2360:"bab31521",2394:"d8061ee9",2423:"5c01df73",2457:"0fa6da83",2460:"cfcc42bb",2469:"e484157e",2472:"ae5234e8",2475:"750b5600",2565:"91cfdf30",2651:"7e09ae01",2741:"2fc59463",2752:"c3faf5cc",2888:"60c72989",2909:"d9a5bd42",2969:"01715cea",2990:"f6c9c00c",3035:"12083b6c",3038:"4f835b02",3140:"a9d3e28a",3147:"6fe59f6e",3164:"29b40649",3240:"9f0f684b",3247:"96427961",3263:"cf1155c1",3284:"bc6a4c8e",3345:"65fdaf51",3353:"103e3390",3361:"a51e13a9",3368:"226e2f3b",3387:"3a6a06c6",3468:"b20a7a9f",3500:"5e15b033",3536:"c0823170",3683:"67f9857d",4036:"3c18a78e",4085:"a714d09d",4090:"e72df6e6",4115:"24161c0a",4173:"4288db99",4263:"9bd48e3b",4314:"b71b2f50",4341:"ab638b24",4356:"d90c61ab",4384:"a1487de7",4474:"70812503",4573:"c25186b9",4612:"b3b7c321",4614:"3b89e382",4644:"ee339ce8",4754:"5b9f9c4a",4876:"3bb7a6fc",4907:"66d74cf0",4919:"8f7c52da",4995:"5a913426",5048:"0ff3b516",5110:"2db0c2e8",5144:"a356ed87",5200:"a1204262",5217:"fb7941d0",5270:"2703ead3",5333:"2ef0f7df",5343:"a607e9fb",5397:"f1c28d74",5412:"9aea15f7",5660:"4f9d6a2a",5663:"e41659bb",5739:"6f0fb038",5742:"60b1d5b2",5757:"2c2ff793",5838:"c1447ec2",5903:"d370e7dc",5985:"c91b62e9",6108:"739b3f08",6224:"8b8a903c",6256:"2d642783",6289:"71aa9f57",6311:"7438370e",6329:"c0b1252c",6459:"c563dca9",6513:"5855f531",6538:"13f4f1bb",6559:"8259502f",6601:"2c7b9168",6801:"7a082c1b",6839:"f9b9f7a4",6999:"049a151a",7098:"fc1f6434",7118:"99cbb21e",7243:"b03b36c5",7356:"0e2c6a23",7484:"7e1f923c",7498:"acb8ee9d",7502:"e9ba960c",7512:"42ad58ab",7567:"036961e6",7586:"addc410c",7705:"d8c41f9c",7720:"ee160c19",7807:"488d1d4c",7824:"2c9c9f90",7829:"e275577d",7859:"fe6d9284",7902:"63fecb6c",7964:"bd456230",7968:"ec61cdd3",8090:"ead047d3",8158:"20de8b80",8240:"f3dcfc96",8267:"01bbf89b",8268:"a9b26385",8269:"616126eb",8294:"a8414e18",8336:"753075cb",8392:"5cb8ae15",8401:"56391867",8508:"9fc1aa5e",8571:"b75a8dcf",8593:"626400c2",8607:"47994c69",8611:"b3d2a395",8625:"b86b7c95",8649:"71663b3e",8702:"1eb7faa3",8750:"4941669d",8765:"b2631b08",8822:"66b38a8d",8862:"282df59f",8913:"47209f3b",8963:"4c5bc320",8990:"8d682809",9033:"71ba1188",9048:"8548a600",9213:"3a315812",9227:"822df862",9264:"ca0d1f52",9315:"9cce3ec4",9331:"35225395",9363:"812e635e",9459:"23f3e7b3",9482:"2068dcd9",9522:"70002579",9610:"0b6b391e",9640:"58b339b5",9647:"5cb928a1",9674:"7677c370",9712:"09c81dcc",9758:"677593e2",9763:"4c61d226",9781:"bc00a87b",9897:"e22bb448",9976:"bd4c3069",9986:"5f537262"}[e]+".js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),d={},b="langflow-docs:",r.l=(e,a,f,c)=>{if(d[e])d[e].push(a);else{var t,o;if(void 0!==f)for(var n=document.getElementsByTagName("script"),i=0;i{t.onerror=t.onload=null,clearTimeout(s);var b=d[e];if(delete d[e],t.parentNode&&t.parentNode.removeChild(t),b&&b.forEach(e=>e(f)),a)return a(f)},s=setTimeout(u.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=u.bind(null,t.onerror),t.onload=u.bind(null,t.onload),o&&document.head.appendChild(t)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r.p="/",r.gca=function(e){return e={17856424:"7586",17896441:"8401",20177945:"8392",44691977:"4876",56350599:"8593",69079906:"5739",70909872:"5333",80866714:"6839",86116998:"4907",d803fa53:"15",db8c087e:"30",a99a45c9:"38",e3f369d5:"44",b768a3a5:"78",a3702f61:"93",ae70dfbf:"126",dfa3dc90:"129",bb45d4f9:"253",b9acb8d9:"351","3d81f1cf":"375",a4232cf8:"446","76e36fb0":"534",c2e0ed62:"596",db4f3bbd:"598",ee87c775:"600",ffa0f8b1:"681","33b5ee95":"750","8bee5443":"879","1dfb8d43":"883","08b309e9":"889","03735ec1":"956",c141421f:"957","47e58a89":"1006","890279ba":"1151",f7e6b9d6:"1162","444a6da6":"1193","41d45d82":"1303",ec030ab7:"1308",fe6d5b4f:"1345","2fc7e024":"1408",c78349fc:"1446","0f761898":"1490","22dd74f7":"1567",ff8bad6c:"1703","8ad67c3b":"1861","5c3b537a":"1876",d375ca1d:"1895",b1582da4:"1966",common:"2076","755d162a":"2102","0f1bef30":"2116","1a4e3797":"2138",ca5faf5d:"2272",c4280da9:"2278",f2da9399:"2348","017d425f":"2360",c2ea283c:"2394","19bcb67f":"2423","46abd5bb":"2457","954b19af":"2460",cd086441:"2469","62f97fbe":"2472","1ab69cbd":"2475","622fd833":"2565","8cd0650d":"2651","43ad9ba4":"2741",e14655eb:"2752","32270e71":"2888","144a43f5":"2909",f0ad3fbb:"2969","1d50b418":"2990","87b7bbd6":"3035","6df123cd":"3038","1a29c454":"3140",c83c70df:"3147","67f2dc6c":"3164",b079b393:"3240",f0b67137:"3247","730da84e":"3263","6398c398":"3284","040305fb":"3345","2b4d41d7":"3353","8f633f11":"3361",efa0f9ee:"3368","3d67876e":"3387",c76bd485:"3468",c3c63498:"3500","2eb731bc":"3536","5a0b74d9":"3683",fbcfc90d:"4036",cb17b4e0:"4085",a8ca941b:"4090",d51059db:"4173","9a5e6f6b":"4263",f6a246db:"4314",e1a0f423:"4341","7b864b08":"4356","622bdc6f":"4384","3db73d6f":"4474",baacc2a1:"4573","6a9eca1a":"4612",e55b8e98:"4614",d3e886ab:"4644",ce43de4b:"4919","62266e9d":"4995","3c440e04":"5048",e9fe1d10:"5110","944c5f91":"5144",ff7f32ba:"5200",fb0a7a3f:"5217","99931d31":"5270","1b10d5ba":"5343",eba86ea4:"5397",a6d50436:"5412","1b208f60":"5660",b1379b2b:"5663",aba21aa0:"5742",ad42ff54:"5757",bbb8ec1d:"5838","69d616f2":"5903",e3536031:"5985","2fed9fb3":"6108",ef9aa223:"6224","6888b60e":"6256","45e5859c":"6289",cce672fb:"6311",a7b545c5:"6329","290c78e6":"6459",f13693f0:"6513","719cba95":"6538","7431813e":"6559","81bb6a5c":"6601",acefda8b:"6801",d5ec984b:"6999",a7bd4aaa:"7098","7996108c":"7118","5d9d4350":"7243","2ea623f2":"7356",ad01e028:"7484",e4400415:"7498","1a547ad8":"7502","4c09a7b3":"7512","4545d55b":"7567","2b91b6ca":"7705","3bfbe7c9":"7720","1a8a0a64":"7807","2b56b65e":"7824","7c27dc91":"7829","593d9d00":"7859","619c7267":"7902",ff35961a:"7964","9b0af131":"7968","6e85978c":"8090","0102a83b":"8240","02f8077b":"8267",a4b6c971:"8268",c7f91cbe:"8269",f2bedfce:"8294",e7fd9095:"8336","10dd1586":"8508",da1ad91e:"8571","681e5335":"8607","0c23d011":"8611","3a9e0e6c":"8625","7de42fc9":"8649","42962acd":"8702","8a484c94":"8750","1a2eaade":"8765","555ae514":"8822",e87b52ac:"8862","56c23a02":"8963","5f1a63c6":"8990","9f55b2fc":"9033",a94703ab:"9048","62d1268c":"9213","7e40e6b3":"9227",c7f32161:"9264","16faf8bf":"9315",ffcd190c:"9331",f3312674:"9363","97254d1d":"9459",a9c1003f:"9482","85dc2a2b":"9522","453ae64a":"9610","3b25a2ae":"9640","5e95c892":"9647",feac1fba:"9674",d8c8efb9:"9712","439d880a":"9758",aece522a:"9763",b796be74:"9781",f0eeb72e:"9897","230d5fdc":"9976",d1f3cfe5:"9986"}[e]||e,r.p+r.u(e)},(()=>{var e={5354:0,1869:0};r.f.j=(a,f)=>{var d=r.o(e,a)?e[a]:void 0;if(0!==d)if(d)f.push(d[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var b=new Promise((f,b)=>d=e[a]=[f,b]);f.push(d[2]=b);var c=r.p+r.u(a),t=new Error;r.l(c,f=>{if(r.o(e,a)&&(0!==(d=e[a])&&(e[a]=void 0),d)){var b=f&&("load"===f.type?"missing":f.type),c=f&&f.target&&f.target.src;t.message="Loading chunk "+a+" failed.\n("+b+": "+c+")",t.name="ChunkLoadError",t.type=b,t.request=c,d[1](t)}},"chunk-"+a,a)}},r.O.j=a=>0===e[a];var a=(a,f)=>{var d,b,c=f[0],t=f[1],o=f[2],n=0;if(c.some(a=>0!==e[a])){for(d in t)r.o(t,d)&&(r.m[d]=t[d]);if(o)var i=o(r)}for(a&&a(f);n{"use strict";var e,a,f,d,b,c={},t={};function r(e){var a=t[e];if(void 0!==a)return a.exports;var f=t[e]={id:e,loaded:!1,exports:{}};return c[e].call(f.exports,f,f.exports,r),f.loaded=!0,f.exports}r.m=c,r.c=t,e=[],r.O=(a,f,d,b)=>{if(!f){var c=1/0;for(i=0;i=b)&&Object.keys(r.O).every(e=>r.O[e](f[o]))?f.splice(o--,1):(t=!1,b0&&e[i-1][2]>b;i--)e[i]=e[i-1];e[i]=[f,d,b]},r.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return r.d(a,{a:a}),a},f=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,r.t=function(e,d){if(1&d&&(e=this(e)),8&d)return e;if("object"==typeof e&&e){if(4&d&&e.__esModule)return e;if(16&d&&"function"==typeof e.then)return e}var b=Object.create(null);r.r(b);var c={};a=a||[null,f({}),f([]),f(f)];for(var t=2&d&&e;"object"==typeof t&&!~a.indexOf(t);t=f(t))Object.getOwnPropertyNames(t).forEach(a=>c[a]=()=>e[a]);return c.default=()=>e,r.d(b,c),b},r.d=(e,a)=>{for(var f in a)r.o(a,f)&&!r.o(e,f)&&Object.defineProperty(e,f,{enumerable:!0,get:a[f]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((a,f)=>(r.f[f](e,a),a),[])),r.u=e=>"assets/js/"+({15:"d803fa53",30:"db8c087e",38:"a99a45c9",44:"e3f369d5",78:"b768a3a5",93:"a3702f61",126:"ae70dfbf",129:"dfa3dc90",253:"bb45d4f9",351:"b9acb8d9",375:"3d81f1cf",446:"a4232cf8",534:"76e36fb0",596:"c2e0ed62",598:"db4f3bbd",600:"ee87c775",681:"ffa0f8b1",750:"33b5ee95",879:"8bee5443",883:"1dfb8d43",889:"08b309e9",956:"03735ec1",957:"c141421f",1006:"47e58a89",1151:"890279ba",1162:"f7e6b9d6",1193:"444a6da6",1303:"41d45d82",1308:"ec030ab7",1345:"fe6d5b4f",1408:"2fc7e024",1446:"c78349fc",1490:"0f761898",1567:"22dd74f7",1703:"ff8bad6c",1861:"8ad67c3b",1876:"5c3b537a",1895:"d375ca1d",1966:"b1582da4",2076:"common",2102:"755d162a",2116:"0f1bef30",2138:"1a4e3797",2272:"ca5faf5d",2278:"c4280da9",2348:"f2da9399",2360:"017d425f",2394:"c2ea283c",2423:"19bcb67f",2457:"46abd5bb",2460:"954b19af",2469:"cd086441",2472:"62f97fbe",2475:"1ab69cbd",2565:"622fd833",2651:"8cd0650d",2741:"43ad9ba4",2752:"e14655eb",2888:"32270e71",2909:"144a43f5",2969:"f0ad3fbb",2990:"1d50b418",3035:"87b7bbd6",3038:"6df123cd",3140:"1a29c454",3147:"c83c70df",3164:"67f2dc6c",3240:"b079b393",3247:"f0b67137",3263:"730da84e",3284:"6398c398",3345:"040305fb",3353:"2b4d41d7",3361:"8f633f11",3368:"efa0f9ee",3387:"3d67876e",3468:"c76bd485",3500:"c3c63498",3536:"2eb731bc",3683:"5a0b74d9",4036:"fbcfc90d",4085:"cb17b4e0",4090:"a8ca941b",4173:"d51059db",4263:"9a5e6f6b",4314:"f6a246db",4341:"e1a0f423",4356:"7b864b08",4384:"622bdc6f",4474:"3db73d6f",4573:"baacc2a1",4612:"6a9eca1a",4614:"e55b8e98",4644:"d3e886ab",4876:"44691977",4907:"86116998",4919:"ce43de4b",4995:"62266e9d",5048:"3c440e04",5110:"e9fe1d10",5144:"944c5f91",5200:"ff7f32ba",5217:"fb0a7a3f",5270:"99931d31",5333:"70909872",5343:"1b10d5ba",5397:"eba86ea4",5412:"a6d50436",5660:"1b208f60",5663:"b1379b2b",5739:"69079906",5742:"aba21aa0",5757:"ad42ff54",5838:"bbb8ec1d",5903:"69d616f2",5985:"e3536031",6108:"2fed9fb3",6224:"ef9aa223",6256:"6888b60e",6289:"45e5859c",6311:"cce672fb",6329:"a7b545c5",6459:"290c78e6",6513:"f13693f0",6538:"719cba95",6559:"7431813e",6601:"81bb6a5c",6801:"acefda8b",6839:"80866714",6999:"d5ec984b",7098:"a7bd4aaa",7118:"7996108c",7243:"5d9d4350",7356:"2ea623f2",7484:"ad01e028",7498:"e4400415",7502:"1a547ad8",7512:"4c09a7b3",7567:"4545d55b",7586:"17856424",7705:"2b91b6ca",7720:"3bfbe7c9",7807:"1a8a0a64",7824:"2b56b65e",7829:"7c27dc91",7859:"593d9d00",7902:"619c7267",7964:"ff35961a",7968:"9b0af131",8090:"6e85978c",8240:"0102a83b",8267:"02f8077b",8268:"a4b6c971",8269:"c7f91cbe",8294:"f2bedfce",8336:"e7fd9095",8392:"20177945",8401:"17896441",8508:"10dd1586",8571:"da1ad91e",8593:"56350599",8607:"681e5335",8611:"0c23d011",8625:"3a9e0e6c",8649:"7de42fc9",8702:"42962acd",8750:"8a484c94",8765:"1a2eaade",8822:"555ae514",8862:"e87b52ac",8963:"56c23a02",8990:"5f1a63c6",9033:"9f55b2fc",9048:"a94703ab",9213:"62d1268c",9227:"7e40e6b3",9264:"c7f32161",9315:"16faf8bf",9331:"ffcd190c",9363:"f3312674",9459:"97254d1d",9482:"a9c1003f",9522:"85dc2a2b",9610:"453ae64a",9640:"3b25a2ae",9647:"5e95c892",9674:"feac1fba",9712:"d8c8efb9",9758:"439d880a",9763:"aece522a",9781:"b796be74",9897:"f0eeb72e",9976:"230d5fdc",9986:"d1f3cfe5"}[e]||e)+"."+{15:"baffcb6d",30:"588897ea",38:"05b1dfd7",44:"3af5a9c7",78:"b07f2ac1",93:"6a9e26d9",126:"69e57f51",129:"922b0385",253:"602a1444",351:"51b77e3f",375:"acd073ae",416:"3c613765",446:"3f8fb95b",534:"bad02455",596:"899f3ed3",598:"b3822b4a",600:"0b7c16ab",681:"c0f429a0",750:"ec12f875",879:"3d01ca35",883:"66682cce",889:"0f7676df",956:"c0e5141d",957:"da9e1d2b",1006:"892452a4",1151:"6ad55045",1162:"b63a4c1a",1193:"924d287f",1303:"1120f076",1308:"cae4889c",1345:"76c30ac9",1408:"a9123c42",1446:"e0ac4e92",1490:"1f031ac3",1567:"a19bb19c",1703:"48cbd885",1861:"8a5bfff3",1876:"6bdd7026",1895:"0c24dc6a",1966:"d5baab98",2076:"cb526175",2102:"b08c6c97",2116:"5b3bf41a",2138:"ba6348e7",2237:"8bc4ac99",2272:"461102c6",2278:"8a309036",2348:"b86340f7",2360:"bab31521",2394:"d8061ee9",2423:"5c01df73",2457:"0fa6da83",2460:"cfcc42bb",2469:"e484157e",2472:"ae5234e8",2475:"750b5600",2565:"91cfdf30",2651:"7e09ae01",2741:"2fc59463",2752:"c3faf5cc",2888:"60c72989",2909:"d9a5bd42",2969:"01715cea",2990:"f6c9c00c",3035:"12083b6c",3038:"4f835b02",3140:"98aaee60",3147:"6fe59f6e",3164:"29b40649",3240:"9f0f684b",3247:"96427961",3263:"cf1155c1",3284:"bc6a4c8e",3345:"65fdaf51",3353:"103e3390",3361:"a51e13a9",3368:"226e2f3b",3387:"3a6a06c6",3468:"b20a7a9f",3500:"5e15b033",3536:"c0823170",3683:"67f9857d",4036:"3c18a78e",4085:"a714d09d",4090:"e72df6e6",4115:"24161c0a",4173:"4288db99",4263:"9bd48e3b",4314:"b71b2f50",4341:"ab638b24",4356:"d90c61ab",4384:"a1487de7",4474:"70812503",4573:"c25186b9",4612:"b3b7c321",4614:"3b89e382",4644:"ee339ce8",4754:"5b9f9c4a",4876:"3bb7a6fc",4907:"66d74cf0",4919:"8f7c52da",4995:"5a913426",5048:"0ff3b516",5110:"2db0c2e8",5144:"a356ed87",5200:"a1204262",5217:"fb7941d0",5270:"2703ead3",5333:"2ef0f7df",5343:"a607e9fb",5397:"f1c28d74",5412:"9aea15f7",5660:"4f9d6a2a",5663:"e41659bb",5739:"6f0fb038",5742:"60b1d5b2",5757:"2c2ff793",5838:"c1447ec2",5903:"d370e7dc",5985:"c91b62e9",6108:"739b3f08",6224:"8b8a903c",6256:"2d642783",6289:"71aa9f57",6311:"7438370e",6329:"c0b1252c",6459:"c563dca9",6513:"5855f531",6538:"13f4f1bb",6559:"8259502f",6601:"2c7b9168",6801:"7a082c1b",6839:"f9b9f7a4",6999:"049a151a",7098:"fc1f6434",7118:"99cbb21e",7243:"b03b36c5",7356:"0e2c6a23",7484:"7e1f923c",7498:"acb8ee9d",7502:"e9ba960c",7512:"42ad58ab",7567:"036961e6",7586:"addc410c",7705:"d8c41f9c",7720:"ee160c19",7807:"488d1d4c",7824:"2c9c9f90",7829:"e275577d",7859:"fe6d9284",7902:"63fecb6c",7964:"bd456230",7968:"ec61cdd3",8090:"ead047d3",8158:"20de8b80",8240:"f3dcfc96",8267:"01bbf89b",8268:"a9b26385",8269:"616126eb",8294:"a8414e18",8336:"753075cb",8392:"5cb8ae15",8401:"56391867",8508:"9fc1aa5e",8571:"b75a8dcf",8593:"626400c2",8607:"47994c69",8611:"b3d2a395",8625:"b86b7c95",8649:"71663b3e",8702:"1eb7faa3",8750:"4941669d",8765:"b2631b08",8822:"66b38a8d",8862:"282df59f",8913:"47209f3b",8963:"4c5bc320",8990:"8d682809",9033:"71ba1188",9048:"8548a600",9213:"3a315812",9227:"822df862",9264:"ca0d1f52",9315:"9cce3ec4",9331:"35225395",9363:"812e635e",9459:"23f3e7b3",9482:"2068dcd9",9522:"70002579",9610:"0b6b391e",9640:"58b339b5",9647:"5cb928a1",9674:"7677c370",9712:"09c81dcc",9758:"677593e2",9763:"4c61d226",9781:"bc00a87b",9897:"e22bb448",9976:"bd4c3069",9986:"5f537262"}[e]+".js",r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),d={},b="langflow-docs:",r.l=(e,a,f,c)=>{if(d[e])d[e].push(a);else{var t,o;if(void 0!==f)for(var n=document.getElementsByTagName("script"),i=0;i{t.onerror=t.onload=null,clearTimeout(s);var b=d[e];if(delete d[e],t.parentNode&&t.parentNode.removeChild(t),b&&b.forEach(e=>e(f)),a)return a(f)},s=setTimeout(u.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=u.bind(null,t.onerror),t.onload=u.bind(null,t.onload),o&&document.head.appendChild(t)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),r.p="/",r.gca=function(e){return e={17856424:"7586",17896441:"8401",20177945:"8392",44691977:"4876",56350599:"8593",69079906:"5739",70909872:"5333",80866714:"6839",86116998:"4907",d803fa53:"15",db8c087e:"30",a99a45c9:"38",e3f369d5:"44",b768a3a5:"78",a3702f61:"93",ae70dfbf:"126",dfa3dc90:"129",bb45d4f9:"253",b9acb8d9:"351","3d81f1cf":"375",a4232cf8:"446","76e36fb0":"534",c2e0ed62:"596",db4f3bbd:"598",ee87c775:"600",ffa0f8b1:"681","33b5ee95":"750","8bee5443":"879","1dfb8d43":"883","08b309e9":"889","03735ec1":"956",c141421f:"957","47e58a89":"1006","890279ba":"1151",f7e6b9d6:"1162","444a6da6":"1193","41d45d82":"1303",ec030ab7:"1308",fe6d5b4f:"1345","2fc7e024":"1408",c78349fc:"1446","0f761898":"1490","22dd74f7":"1567",ff8bad6c:"1703","8ad67c3b":"1861","5c3b537a":"1876",d375ca1d:"1895",b1582da4:"1966",common:"2076","755d162a":"2102","0f1bef30":"2116","1a4e3797":"2138",ca5faf5d:"2272",c4280da9:"2278",f2da9399:"2348","017d425f":"2360",c2ea283c:"2394","19bcb67f":"2423","46abd5bb":"2457","954b19af":"2460",cd086441:"2469","62f97fbe":"2472","1ab69cbd":"2475","622fd833":"2565","8cd0650d":"2651","43ad9ba4":"2741",e14655eb:"2752","32270e71":"2888","144a43f5":"2909",f0ad3fbb:"2969","1d50b418":"2990","87b7bbd6":"3035","6df123cd":"3038","1a29c454":"3140",c83c70df:"3147","67f2dc6c":"3164",b079b393:"3240",f0b67137:"3247","730da84e":"3263","6398c398":"3284","040305fb":"3345","2b4d41d7":"3353","8f633f11":"3361",efa0f9ee:"3368","3d67876e":"3387",c76bd485:"3468",c3c63498:"3500","2eb731bc":"3536","5a0b74d9":"3683",fbcfc90d:"4036",cb17b4e0:"4085",a8ca941b:"4090",d51059db:"4173","9a5e6f6b":"4263",f6a246db:"4314",e1a0f423:"4341","7b864b08":"4356","622bdc6f":"4384","3db73d6f":"4474",baacc2a1:"4573","6a9eca1a":"4612",e55b8e98:"4614",d3e886ab:"4644",ce43de4b:"4919","62266e9d":"4995","3c440e04":"5048",e9fe1d10:"5110","944c5f91":"5144",ff7f32ba:"5200",fb0a7a3f:"5217","99931d31":"5270","1b10d5ba":"5343",eba86ea4:"5397",a6d50436:"5412","1b208f60":"5660",b1379b2b:"5663",aba21aa0:"5742",ad42ff54:"5757",bbb8ec1d:"5838","69d616f2":"5903",e3536031:"5985","2fed9fb3":"6108",ef9aa223:"6224","6888b60e":"6256","45e5859c":"6289",cce672fb:"6311",a7b545c5:"6329","290c78e6":"6459",f13693f0:"6513","719cba95":"6538","7431813e":"6559","81bb6a5c":"6601",acefda8b:"6801",d5ec984b:"6999",a7bd4aaa:"7098","7996108c":"7118","5d9d4350":"7243","2ea623f2":"7356",ad01e028:"7484",e4400415:"7498","1a547ad8":"7502","4c09a7b3":"7512","4545d55b":"7567","2b91b6ca":"7705","3bfbe7c9":"7720","1a8a0a64":"7807","2b56b65e":"7824","7c27dc91":"7829","593d9d00":"7859","619c7267":"7902",ff35961a:"7964","9b0af131":"7968","6e85978c":"8090","0102a83b":"8240","02f8077b":"8267",a4b6c971:"8268",c7f91cbe:"8269",f2bedfce:"8294",e7fd9095:"8336","10dd1586":"8508",da1ad91e:"8571","681e5335":"8607","0c23d011":"8611","3a9e0e6c":"8625","7de42fc9":"8649","42962acd":"8702","8a484c94":"8750","1a2eaade":"8765","555ae514":"8822",e87b52ac:"8862","56c23a02":"8963","5f1a63c6":"8990","9f55b2fc":"9033",a94703ab:"9048","62d1268c":"9213","7e40e6b3":"9227",c7f32161:"9264","16faf8bf":"9315",ffcd190c:"9331",f3312674:"9363","97254d1d":"9459",a9c1003f:"9482","85dc2a2b":"9522","453ae64a":"9610","3b25a2ae":"9640","5e95c892":"9647",feac1fba:"9674",d8c8efb9:"9712","439d880a":"9758",aece522a:"9763",b796be74:"9781",f0eeb72e:"9897","230d5fdc":"9976",d1f3cfe5:"9986"}[e]||e,r.p+r.u(e)},(()=>{var e={5354:0,1869:0};r.f.j=(a,f)=>{var d=r.o(e,a)?e[a]:void 0;if(0!==d)if(d)f.push(d[2]);else if(/^(1869|5354)$/.test(a))e[a]=0;else{var b=new Promise((f,b)=>d=e[a]=[f,b]);f.push(d[2]=b);var c=r.p+r.u(a),t=new Error;r.l(c,f=>{if(r.o(e,a)&&(0!==(d=e[a])&&(e[a]=void 0),d)){var b=f&&("load"===f.type?"missing":f.type),c=f&&f.target&&f.target.src;t.message="Loading chunk "+a+" failed.\n("+b+": "+c+")",t.name="ChunkLoadError",t.type=b,t.request=c,d[1](t)}},"chunk-"+a,a)}},r.O.j=a=>0===e[a];var a=(a,f)=>{var d,b,c=f[0],t=f[1],o=f[2],n=0;if(c.some(a=>0!==e[a])){for(d in t)r.o(t,d)&&(r.m[d]=t[d]);if(o)var i=o(r)}for(a&&a(f);n - + diff --git a/bundles-aiml.html b/bundles-aiml.html index c979e2ba58..a85744b101 100644 --- a/bundles-aiml.html +++ b/bundles-aiml.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-altk.html b/bundles-altk.html index 493f60e4e8..fc4a3f9138 100644 --- a/bundles-altk.html +++ b/bundles-altk.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-amazon.html b/bundles-amazon.html index 3256dfa28d..0567bbe381 100644 --- a/bundles-amazon.html +++ b/bundles-amazon.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-anthropic.html b/bundles-anthropic.html index 4ace7a0e43..9f4f108933 100644 --- a/bundles-anthropic.html +++ b/bundles-anthropic.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-apify.html b/bundles-apify.html index b187c0d5e1..6a4e4d08f7 100644 --- a/bundles-apify.html +++ b/bundles-apify.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-arxiv.html b/bundles-arxiv.html index 1aae265a80..e1f74e4104 100644 --- a/bundles-arxiv.html +++ b/bundles-arxiv.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-assemblyai.html b/bundles-assemblyai.html index e4272d4e14..19567ff6a2 100644 --- a/bundles-assemblyai.html +++ b/bundles-assemblyai.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-azure.html b/bundles-azure.html index a3d1f2201b..5f7672a8a5 100644 --- a/bundles-azure.html +++ b/bundles-azure.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-baidu.html b/bundles-baidu.html index b087049ca9..cf4b0cffda 100644 --- a/bundles-baidu.html +++ b/bundles-baidu.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-bing.html b/bundles-bing.html index 7a4c2664ed..e2f3241ed9 100644 --- a/bundles-bing.html +++ b/bundles-bing.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-cassandra.html b/bundles-cassandra.html index f48494af5a..0d7b59321f 100644 --- a/bundles-cassandra.html +++ b/bundles-cassandra.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-chroma.html b/bundles-chroma.html index 022de50e19..2bd87685dd 100644 --- a/bundles-chroma.html +++ b/bundles-chroma.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-cleanlab.html b/bundles-cleanlab.html index 1978d3036d..13f08226a4 100644 --- a/bundles-cleanlab.html +++ b/bundles-cleanlab.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-clickhouse.html b/bundles-clickhouse.html index 252cae51f9..31d4895f90 100644 --- a/bundles-clickhouse.html +++ b/bundles-clickhouse.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-cloudflare.html b/bundles-cloudflare.html index 4ae9ec92a5..7137816877 100644 --- a/bundles-cloudflare.html +++ b/bundles-cloudflare.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-cohere.html b/bundles-cohere.html index 4c0c1a3f20..8b3ddc1800 100644 --- a/bundles-cohere.html +++ b/bundles-cohere.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-cometapi.html b/bundles-cometapi.html index 5fe9ec7f0b..dae5faab1a 100644 --- a/bundles-cometapi.html +++ b/bundles-cometapi.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-composio.html b/bundles-composio.html index b6535001b6..afd5e19b3c 100644 --- a/bundles-composio.html +++ b/bundles-composio.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-couchbase.html b/bundles-couchbase.html index ad01a5272a..5c0d600cd8 100644 --- a/bundles-couchbase.html +++ b/bundles-couchbase.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-cuga.html b/bundles-cuga.html index 597a11e322..2dfda9c4da 100644 --- a/bundles-cuga.html +++ b/bundles-cuga.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-datastax.html b/bundles-datastax.html index d300cae9da..6c6beeb135 100644 --- a/bundles-datastax.html +++ b/bundles-datastax.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-deepseek.html b/bundles-deepseek.html index a2025834fe..c242e600b6 100644 --- a/bundles-deepseek.html +++ b/bundles-deepseek.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-docling.html b/bundles-docling.html index 2578a90363..c2780d4b7e 100644 --- a/bundles-docling.html +++ b/bundles-docling.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-duckduckgo.html b/bundles-duckduckgo.html index 8734ffdf35..a24a892e48 100644 --- a/bundles-duckduckgo.html +++ b/bundles-duckduckgo.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-elastic.html b/bundles-elastic.html index 75ea4a2552..4c7f0406d8 100644 --- a/bundles-elastic.html +++ b/bundles-elastic.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-exa.html b/bundles-exa.html index 119cb0a8c2..95532ba20b 100644 --- a/bundles-exa.html +++ b/bundles-exa.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-faiss.html b/bundles-faiss.html index ca9b622db1..6759b5ebc2 100644 --- a/bundles-faiss.html +++ b/bundles-faiss.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-glean.html b/bundles-glean.html index 743b1b2dc8..bfedae3254 100644 --- a/bundles-glean.html +++ b/bundles-glean.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-google.html b/bundles-google.html index 741c0cb55a..7de98d0625 100644 --- a/bundles-google.html +++ b/bundles-google.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-groq.html b/bundles-groq.html index b51294d2c1..4ece86bde5 100644 --- a/bundles-groq.html +++ b/bundles-groq.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-huggingface.html b/bundles-huggingface.html index 93b0987ada..71924d3d97 100644 --- a/bundles-huggingface.html +++ b/bundles-huggingface.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-ibm.html b/bundles-ibm.html index 31f1ad14df..fcbbd7fce3 100644 --- a/bundles-ibm.html +++ b/bundles-ibm.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-icosacomputing.html b/bundles-icosacomputing.html index eb694228fb..ee90ca7429 100644 --- a/bundles-icosacomputing.html +++ b/bundles-icosacomputing.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-langchain.html b/bundles-langchain.html index b730a16086..a27f910218 100644 --- a/bundles-langchain.html +++ b/bundles-langchain.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-lmstudio.html b/bundles-lmstudio.html index 3b90567c42..c983c38a54 100644 --- a/bundles-lmstudio.html +++ b/bundles-lmstudio.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-maritalk.html b/bundles-maritalk.html index c23439ec6f..de86ecf0ac 100644 --- a/bundles-maritalk.html +++ b/bundles-maritalk.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-mem0.html b/bundles-mem0.html index 56371d94e8..ea85a5e070 100644 --- a/bundles-mem0.html +++ b/bundles-mem0.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-milvus.html b/bundles-milvus.html index 930c390a9e..e7bd01e2b9 100644 --- a/bundles-milvus.html +++ b/bundles-milvus.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-mistralai.html b/bundles-mistralai.html index d23f68a6d3..4ec6418f25 100644 --- a/bundles-mistralai.html +++ b/bundles-mistralai.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-mongodb.html b/bundles-mongodb.html index e2a2561d80..1bfd83b865 100644 --- a/bundles-mongodb.html +++ b/bundles-mongodb.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-notion.html b/bundles-notion.html index c88e2ee920..3a5e2ab6fd 100644 --- a/bundles-notion.html +++ b/bundles-notion.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-novita.html b/bundles-novita.html index baefcefeae..068ed1b76c 100644 --- a/bundles-novita.html +++ b/bundles-novita.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-nvidia.html b/bundles-nvidia.html index 83ec90cfc0..2a330883b7 100644 --- a/bundles-nvidia.html +++ b/bundles-nvidia.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-ollama.html b/bundles-ollama.html index ee29cf3839..95072323b4 100644 --- a/bundles-ollama.html +++ b/bundles-ollama.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-openai.html b/bundles-openai.html index acd10185a9..fbda55326d 100644 --- a/bundles-openai.html +++ b/bundles-openai.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-openrouter.html b/bundles-openrouter.html index e548c60be6..93ac00dc8c 100644 --- a/bundles-openrouter.html +++ b/bundles-openrouter.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-perplexity.html b/bundles-perplexity.html index 613ad2893f..fd2fb446ff 100644 --- a/bundles-perplexity.html +++ b/bundles-perplexity.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-pgvector.html b/bundles-pgvector.html index d7ba298c68..aa9abe8bff 100644 --- a/bundles-pgvector.html +++ b/bundles-pgvector.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-pinecone.html b/bundles-pinecone.html index 6f19a97dc6..10d42c64d3 100644 --- a/bundles-pinecone.html +++ b/bundles-pinecone.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-qdrant.html b/bundles-qdrant.html index 420745867b..e2e27a352c 100644 --- a/bundles-qdrant.html +++ b/bundles-qdrant.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-redis.html b/bundles-redis.html index 8d0fc493c4..82274fd6e3 100644 --- a/bundles-redis.html +++ b/bundles-redis.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-sambanova.html b/bundles-sambanova.html index 41f14d33b6..f1bf797ec9 100644 --- a/bundles-sambanova.html +++ b/bundles-sambanova.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-searchapi.html b/bundles-searchapi.html index 829a169bf7..ffc58de2cb 100644 --- a/bundles-searchapi.html +++ b/bundles-searchapi.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-serper.html b/bundles-serper.html index 430ef289e9..f3fa720a2d 100644 --- a/bundles-serper.html +++ b/bundles-serper.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-supabase.html b/bundles-supabase.html index 24c9069ce7..969f8b6911 100644 --- a/bundles-supabase.html +++ b/bundles-supabase.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-upstash.html b/bundles-upstash.html index eff1061a3e..2aeeba677e 100644 --- a/bundles-upstash.html +++ b/bundles-upstash.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-vectara.html b/bundles-vectara.html index 1bdd499ab7..c79bb22eff 100644 --- a/bundles-vectara.html +++ b/bundles-vectara.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-vertexai.html b/bundles-vertexai.html index 1650ec287d..fa54ee97a6 100644 --- a/bundles-vertexai.html +++ b/bundles-vertexai.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-vllm.html b/bundles-vllm.html index b0e5f01368..739d94f3e1 100644 --- a/bundles-vllm.html +++ b/bundles-vllm.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-weaviate.html b/bundles-weaviate.html index 2bcf53cb1b..293cebbba7 100644 --- a/bundles-weaviate.html +++ b/bundles-weaviate.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-wikipedia.html b/bundles-wikipedia.html index a60ddfce79..1b1935d227 100644 --- a/bundles-wikipedia.html +++ b/bundles-wikipedia.html @@ -24,7 +24,7 @@ - + diff --git a/bundles-xai.html b/bundles-xai.html index 529a7332f0..71ad344c99 100644 --- a/bundles-xai.html +++ b/bundles-xai.html @@ -24,7 +24,7 @@ - + diff --git a/calculator.html b/calculator.html index 95c826fbad..593beefea6 100644 --- a/calculator.html +++ b/calculator.html @@ -24,7 +24,7 @@ - + diff --git a/chat-input-and-output.html b/chat-input-and-output.html index bb7622e4fb..5b3435a9e3 100644 --- a/chat-input-and-output.html +++ b/chat-input-and-output.html @@ -24,7 +24,7 @@ - + diff --git a/chat-with-files.html b/chat-with-files.html index d7a3e40732..481e8794ff 100644 --- a/chat-with-files.html +++ b/chat-with-files.html @@ -24,7 +24,7 @@ - + diff --git a/chat-with-rag.html b/chat-with-rag.html index ac4f796976..de84d2c7ed 100644 --- a/chat-with-rag.html +++ b/chat-with-rag.html @@ -24,7 +24,7 @@ - + diff --git a/component-webhook.html b/component-webhook.html index 3069b64914..65c088e002 100644 --- a/component-webhook.html +++ b/component-webhook.html @@ -24,7 +24,7 @@ - + diff --git a/components-agents.html b/components-agents.html index d17100954f..83f56510a0 100644 --- a/components-agents.html +++ b/components-agents.html @@ -24,7 +24,7 @@ - + diff --git a/components-bundle-components.html b/components-bundle-components.html index 43f442385f..02558326b9 100644 --- a/components-bundle-components.html +++ b/components-bundle-components.html @@ -24,7 +24,7 @@ - + diff --git a/components-custom-components.html b/components-custom-components.html index 98c56ce920..5f25919cce 100644 --- a/components-custom-components.html +++ b/components-custom-components.html @@ -24,7 +24,7 @@ - + diff --git a/components-embedding-models.html b/components-embedding-models.html index 180a7b5ed3..6e6a794169 100644 --- a/components-embedding-models.html +++ b/components-embedding-models.html @@ -24,7 +24,7 @@ - + diff --git a/components-models.html b/components-models.html index 91d9848e26..0fb337e4a8 100644 --- a/components-models.html +++ b/components-models.html @@ -24,7 +24,7 @@ - + diff --git a/components-prompts.html b/components-prompts.html index 6f26352bca..f3c7bbb67d 100644 --- a/components-prompts.html +++ b/components-prompts.html @@ -24,7 +24,7 @@ - + diff --git a/concepts-components.html b/concepts-components.html index 5c3f5a24b7..72f4891fc6 100644 --- a/concepts-components.html +++ b/concepts-components.html @@ -24,7 +24,7 @@ - + diff --git a/concepts-file-management.html b/concepts-file-management.html index 424525e9ed..fe5662d368 100644 --- a/concepts-file-management.html +++ b/concepts-file-management.html @@ -24,7 +24,7 @@ - + diff --git a/concepts-flows-import.html b/concepts-flows-import.html index ad5900de61..251c0fbeca 100644 --- a/concepts-flows-import.html +++ b/concepts-flows-import.html @@ -24,7 +24,7 @@ - + diff --git a/concepts-flows.html b/concepts-flows.html index 2daadc7169..5b7a3eddb7 100644 --- a/concepts-flows.html +++ b/concepts-flows.html @@ -24,7 +24,7 @@ - + diff --git a/concepts-overview.html b/concepts-overview.html index 5a52b4d7a7..777b3be084 100644 --- a/concepts-overview.html +++ b/concepts-overview.html @@ -24,7 +24,7 @@ - + diff --git a/concepts-playground.html b/concepts-playground.html index 18fb7997ca..5db5505e10 100644 --- a/concepts-playground.html +++ b/concepts-playground.html @@ -24,7 +24,7 @@ - + diff --git a/concepts-publish.html b/concepts-publish.html index b9a901eccd..828dde82ed 100644 --- a/concepts-publish.html +++ b/concepts-publish.html @@ -24,7 +24,7 @@ - + diff --git a/concepts-voice-mode.html b/concepts-voice-mode.html index a781d67f5b..10f598cefb 100644 --- a/concepts-voice-mode.html +++ b/concepts-voice-mode.html @@ -24,7 +24,7 @@ - + diff --git a/configuration-cli.html b/configuration-cli.html index 1c090cb896..4b39669595 100644 --- a/configuration-cli.html +++ b/configuration-cli.html @@ -24,7 +24,7 @@ - + diff --git a/configuration-custom-database.html b/configuration-custom-database.html index 25cf8d9ce3..4078ff46e7 100644 --- a/configuration-custom-database.html +++ b/configuration-custom-database.html @@ -24,7 +24,7 @@ - + diff --git a/configuration-global-variables.html b/configuration-global-variables.html index ed4aeed158..5a336898bf 100644 --- a/configuration-global-variables.html +++ b/configuration-global-variables.html @@ -24,7 +24,7 @@ - + diff --git a/contributing-bundles.html b/contributing-bundles.html index 569d4e0cce..43f0f6762c 100644 --- a/contributing-bundles.html +++ b/contributing-bundles.html @@ -24,7 +24,7 @@ - + diff --git a/contributing-community.html b/contributing-community.html index 1f53989fb0..603be9dfa8 100644 --- a/contributing-community.html +++ b/contributing-community.html @@ -24,7 +24,7 @@ - + diff --git a/contributing-component-tests.html b/contributing-component-tests.html index 328f9be382..c5d23bcd9c 100644 --- a/contributing-component-tests.html +++ b/contributing-component-tests.html @@ -24,7 +24,7 @@ - + diff --git a/contributing-components.html b/contributing-components.html index 44188b0e3c..372f0dfe9b 100644 --- a/contributing-components.html +++ b/contributing-components.html @@ -24,7 +24,7 @@ - + diff --git a/contributing-github-issues.html b/contributing-github-issues.html index 2c2438897d..bcc19f8e2d 100644 --- a/contributing-github-issues.html +++ b/contributing-github-issues.html @@ -24,7 +24,7 @@ - + diff --git a/contributing-how-to-contribute.html b/contributing-how-to-contribute.html index 9faf29b193..a6cb9191b1 100644 --- a/contributing-how-to-contribute.html +++ b/contributing-how-to-contribute.html @@ -24,7 +24,7 @@ - + diff --git a/contributing-telemetry.html b/contributing-telemetry.html index 6991f871b0..f94709ed39 100644 --- a/contributing-telemetry.html +++ b/contributing-telemetry.html @@ -24,7 +24,7 @@ - + diff --git a/contributing-templates.html b/contributing-templates.html index 794f3bfb8e..c1f6be6cfd 100644 --- a/contributing-templates.html +++ b/contributing-templates.html @@ -24,7 +24,7 @@ - + diff --git a/current-date.html b/current-date.html index 06337ac8a9..c70b95d439 100644 --- a/current-date.html +++ b/current-date.html @@ -24,7 +24,7 @@ - + diff --git a/data-operations.html b/data-operations.html index dd8bfad19d..e155202164 100644 --- a/data-operations.html +++ b/data-operations.html @@ -24,7 +24,7 @@ - + diff --git a/data-types.html b/data-types.html index 7537da0d92..46bb0925da 100644 --- a/data-types.html +++ b/data-types.html @@ -24,7 +24,7 @@ - + diff --git a/dataframe-operations.html b/dataframe-operations.html index b91694fdb0..50f9004c27 100644 --- a/dataframe-operations.html +++ b/dataframe-operations.html @@ -24,7 +24,7 @@ - + diff --git a/deployment-architecture.html b/deployment-architecture.html index df4c262417..62c045fc3f 100644 --- a/deployment-architecture.html +++ b/deployment-architecture.html @@ -24,7 +24,7 @@ - + diff --git a/deployment-caddyfile.html b/deployment-caddyfile.html index 141576c28e..76c836835b 100644 --- a/deployment-caddyfile.html +++ b/deployment-caddyfile.html @@ -24,7 +24,7 @@ - + diff --git a/deployment-docker.html b/deployment-docker.html index d03bd774c8..263f4d4a28 100644 --- a/deployment-docker.html +++ b/deployment-docker.html @@ -24,7 +24,7 @@ - + diff --git a/deployment-gcp.html b/deployment-gcp.html index 50e7621ba5..6f26175d55 100644 --- a/deployment-gcp.html +++ b/deployment-gcp.html @@ -24,7 +24,7 @@ - + diff --git a/deployment-hugging-face-spaces.html b/deployment-hugging-face-spaces.html index 2384a3dc76..e8f2bb755e 100644 --- a/deployment-hugging-face-spaces.html +++ b/deployment-hugging-face-spaces.html @@ -24,7 +24,7 @@ - + diff --git a/deployment-kubernetes-dev.html b/deployment-kubernetes-dev.html index 33b28046a3..e850d0ed07 100644 --- a/deployment-kubernetes-dev.html +++ b/deployment-kubernetes-dev.html @@ -24,7 +24,7 @@ - + diff --git a/deployment-kubernetes-prod.html b/deployment-kubernetes-prod.html index b16b66e4f8..bac3b707cf 100644 --- a/deployment-kubernetes-prod.html +++ b/deployment-kubernetes-prod.html @@ -24,7 +24,7 @@ - + diff --git a/deployment-nginx-ssl.html b/deployment-nginx-ssl.html index 6da3ef038f..60aa4a5774 100644 --- a/deployment-nginx-ssl.html +++ b/deployment-nginx-ssl.html @@ -24,7 +24,7 @@ - + diff --git a/deployment-overview.html b/deployment-overview.html index 3456a14c04..8c89221881 100644 --- a/deployment-overview.html +++ b/deployment-overview.html @@ -24,7 +24,7 @@ - + diff --git a/deployment-prod-best-practices.html b/deployment-prod-best-practices.html index 021f74fd26..beeaca98f7 100644 --- a/deployment-prod-best-practices.html +++ b/deployment-prod-best-practices.html @@ -24,7 +24,7 @@ - + diff --git a/deployment-public-server.html b/deployment-public-server.html index a80cf91403..54829b3064 100644 --- a/deployment-public-server.html +++ b/deployment-public-server.html @@ -24,7 +24,7 @@ - + diff --git a/deployment-railway.html b/deployment-railway.html index 78282e5780..42969ca756 100644 --- a/deployment-railway.html +++ b/deployment-railway.html @@ -24,7 +24,7 @@ - + diff --git a/deployment-render.html b/deployment-render.html index 57b0144114..eff39e79a4 100644 --- a/deployment-render.html +++ b/deployment-render.html @@ -24,7 +24,7 @@ - + diff --git a/develop-application.html b/develop-application.html index 97dcf3be2d..787fe6fc7a 100644 --- a/develop-application.html +++ b/develop-application.html @@ -24,7 +24,7 @@ - + diff --git a/directory.html b/directory.html index 7e382a7442..71d4907478 100644 --- a/directory.html +++ b/directory.html @@ -24,7 +24,7 @@ - + diff --git a/dynamic-create-data.html b/dynamic-create-data.html index 91b19fec32..025b3dcafd 100644 --- a/dynamic-create-data.html +++ b/dynamic-create-data.html @@ -24,7 +24,7 @@ - + diff --git a/enterprise-database-guide.html b/enterprise-database-guide.html index 27784d132d..afbdf69849 100644 --- a/enterprise-database-guide.html +++ b/enterprise-database-guide.html @@ -24,7 +24,7 @@ - + diff --git a/environment-variables.html b/environment-variables.html index e4e8f22255..c604b5f6cc 100644 --- a/environment-variables.html +++ b/environment-variables.html @@ -24,7 +24,7 @@ - + diff --git a/get-started-installation.html b/get-started-installation.html index 0601e7c28a..f0b757d7d8 100644 --- a/get-started-installation.html +++ b/get-started-installation.html @@ -24,7 +24,7 @@ - + diff --git a/get-started-quickstart.html b/get-started-quickstart.html index 0230ac2bdf..471204af44 100644 --- a/get-started-quickstart.html +++ b/get-started-quickstart.html @@ -24,7 +24,7 @@ - + diff --git a/if-else.html b/if-else.html index b0ec5d94aa..6348296796 100644 --- a/if-else.html +++ b/if-else.html @@ -24,7 +24,7 @@ - + diff --git a/index.html b/index.html index 9db09c9dc8..6d01400cf8 100644 --- a/index.html +++ b/index.html @@ -24,7 +24,7 @@ - + diff --git a/install-custom-dependencies.html b/install-custom-dependencies.html index 9168d944b3..8d8149699e 100644 --- a/install-custom-dependencies.html +++ b/install-custom-dependencies.html @@ -24,7 +24,7 @@ - + diff --git a/integrations-arize.html b/integrations-arize.html index 95fdf091aa..8397087b50 100644 --- a/integrations-arize.html +++ b/integrations-arize.html @@ -24,7 +24,7 @@ - + diff --git a/integrations-instana-traceloop.html b/integrations-instana-traceloop.html index 12edf0b84a..0030f0b8a8 100644 --- a/integrations-instana-traceloop.html +++ b/integrations-instana-traceloop.html @@ -24,7 +24,7 @@ - + diff --git a/integrations-langfuse.html b/integrations-langfuse.html index 91acda1c90..71b9bf58aa 100644 --- a/integrations-langfuse.html +++ b/integrations-langfuse.html @@ -24,7 +24,7 @@ - + diff --git a/integrations-langsmith.html b/integrations-langsmith.html index d3b472e18f..bb1ad0bb08 100644 --- a/integrations-langsmith.html +++ b/integrations-langsmith.html @@ -24,7 +24,7 @@ - + diff --git a/integrations-langwatch.html b/integrations-langwatch.html index 4b267efb3a..1036217c0e 100644 --- a/integrations-langwatch.html +++ b/integrations-langwatch.html @@ -24,7 +24,7 @@ - + diff --git a/integrations-opik.html b/integrations-opik.html index 05356badc5..c478cbf7f2 100644 --- a/integrations-opik.html +++ b/integrations-opik.html @@ -24,7 +24,7 @@ - + diff --git a/legacy-core-components.html b/legacy-core-components.html index db26ca36ad..f044bebb65 100644 --- a/legacy-core-components.html +++ b/legacy-core-components.html @@ -24,7 +24,7 @@ - + diff --git a/llm-selector.html b/llm-selector.html index 89c1390ef7..da027ba58a 100644 --- a/llm-selector.html +++ b/llm-selector.html @@ -24,7 +24,7 @@ - + diff --git a/logging.html b/logging.html index ebc94440c6..193e686fdb 100644 --- a/logging.html +++ b/logging.html @@ -24,7 +24,7 @@ - + diff --git a/loop.html b/loop.html index 80ee763014..40a4bbd86a 100644 --- a/loop.html +++ b/loop.html @@ -24,7 +24,7 @@ - + diff --git a/luna-for-langflow.html b/luna-for-langflow.html index c41189a24b..2eb3aa1975 100644 --- a/luna-for-langflow.html +++ b/luna-for-langflow.html @@ -24,7 +24,7 @@ - + diff --git a/mcp-client.html b/mcp-client.html index a4a4d010bf..ebbbf688bf 100644 --- a/mcp-client.html +++ b/mcp-client.html @@ -24,7 +24,7 @@ - + diff --git a/mcp-component-astra.html b/mcp-component-astra.html index 19d178d9db..551db850ef 100644 --- a/mcp-component-astra.html +++ b/mcp-component-astra.html @@ -24,7 +24,7 @@ - + diff --git a/mcp-server.html b/mcp-server.html index 2a5d55ac6b..86f2798ff3 100644 --- a/mcp-server.html +++ b/mcp-server.html @@ -24,7 +24,7 @@ - + diff --git a/mcp-tools.html b/mcp-tools.html index 5da97ba123..8980b3d9a5 100644 --- a/mcp-tools.html +++ b/mcp-tools.html @@ -24,7 +24,7 @@ - + diff --git a/mcp-tutorial.html b/mcp-tutorial.html index 4e7d8e1061..045dfe29c9 100644 --- a/mcp-tutorial.html +++ b/mcp-tutorial.html @@ -24,7 +24,7 @@ - + diff --git a/memory.html b/memory.html index 5e114212c3..9ce927d12c 100644 --- a/memory.html +++ b/memory.html @@ -24,7 +24,7 @@ - + diff --git a/message-history.html b/message-history.html index 92df4bba7d..dda66f49b0 100644 --- a/message-history.html +++ b/message-history.html @@ -24,7 +24,7 @@ - + diff --git a/mock-data.html b/mock-data.html index 3b92d5f775..9b41c68b85 100644 --- a/mock-data.html +++ b/mock-data.html @@ -24,7 +24,7 @@ - + diff --git a/notify-and-listen.html b/notify-and-listen.html index a5138ba4f2..33d48210d1 100644 --- a/notify-and-listen.html +++ b/notify-and-listen.html @@ -24,7 +24,7 @@ - + diff --git a/parser.html b/parser.html index 41d3e83405..b7d32d6539 100644 --- a/parser.html +++ b/parser.html @@ -24,7 +24,7 @@ - + diff --git a/python-interpreter.html b/python-interpreter.html index 219d814a5c..2325c89dd8 100644 --- a/python-interpreter.html +++ b/python-interpreter.html @@ -24,7 +24,7 @@ - + @@ -77,8 +77,39 @@ This example creates a Pandas DataFrame table with the imported pandasResult:


_12
Executed run_python_repl
_12
_12
Input:
_12
_12
{
_12
"python_code": "import pandas as pd\nimport math\n\n# Create a simple DataFrame\ndf = pd.DataFrame({\n 'numbers': [1, 2, 3, 4, 5],\n 'squares': [x**2 for x in range(1, 6)]\n})\n\n# Calculate the square root of the mean\nresult = math.sqrt(df['squares'].mean())\nprint(f\"Square root of mean squares: {result}\")"
_12
}
_12
Output:
_12
_12
{
_12
"result": "Square root of mean squares: 3.3166247903554"
_12
}

If you don't include the package imports in the chat, the agent can still create the table using pd.DataFrame, because the pandas package is imported globally by the Python Interpreter component in the Global Imports field.

+

Pass inputs to the Python Interpreter​

+

To pass inputs to the Python Interpreter component, you need to customize the component's code to add input fields. +After the input field is added to the component code, the port becomes available for connections. +For example, to connect a Text component and pass a URL value to the Python Interpreter component, do the following:

+
    +
  1. +

    Add a Python Interpreter component to your flow.

    +
  2. +
  3. +

    To modify the Python Interpreter component's code, click Edit Code.

    +
  4. +
  5. +

    To pass a URL input to the Python Interpreter component, make the following changes to the code:

    +

    a. Add the URL input field to the inputs list. This creates the input port that other components can connect to.

    +

    b. Update the get_globals method to extract the URL value and add it to the globals dictionary. +This makes the url variable available in the component's Python code.

    +

    c. Update the default Python code value to use the url variable.

    +

    The following example demonstrates these modifications.

    +
    Python code example

    _121
    import importlib
    _121
    _121
    from langchain_experimental.utilities import PythonREPL
    _121
    from lfx.custom.custom_component.component import Component
    _121
    from lfx.io import MultilineInput, Output, StrInput
    _121
    from lfx.schema.data import Data
    _121
    from lfx.schema.message import Message # Needed to extract text from Message objects
    _121
    _121
    class PythonREPLComponent(Component):
    _121
    display_name = "Python Interpreter"
    _121
    description = "Run Python code with optional imports. Use print() to see the output."
    _121
    documentation: str = "https://docs.langflow.org/python-interpreter"
    _121
    icon = "square-terminal"
    _121
    _121
    inputs = [
    _121
    StrInput(
    _121
    name="global_imports",
    _121
    display_name="Global Imports",
    _121
    info="A comma-separated list of modules to import globally, e.g. 'math,numpy,pandas'.",
    _121
    value="math,pandas",
    _121
    required=True,
    _121
    ),
    _121
    MultilineInput(
    _121
    name="python_code",
    _121
    display_name="Python Code",
    _121
    info="The Python code to execute. Only modules specified in Global Imports can be used. Use 'url' variable if URL input is connected.",
    _121
    value="print(f'URL: {url}')", # Updated to make the URL variable available to the Python code execution
    _121
    input_types=["Message"],
    _121
    tool_mode=True,
    _121
    required=True,
    _121
    ),
    _121
    # Add the URL input field to inputs list
    _121
    StrInput(
    _121
    name="url",
    _121
    display_name="URL",
    _121
    info="URL variable that can be used in Python code. Connect a Text component or enter manually.",
    _121
    value="",
    _121
    input_types=["Text", "Message"],
    _121
    required=False,
    _121
    ),
    _121
    ]
    _121
    _121
    outputs = [
    _121
    Output(
    _121
    display_name="Results",
    _121
    name="results",
    _121
    type_=Data,
    _121
    method="run_python_repl",
    _121
    ),
    _121
    ]
    _121
    _121
    def get_globals(self, global_imports: str | list[str]) -> dict:
    _121
    """Create a globals dictionary with only the specified allowed imports and input variables."""
    _121
    global_dict = {}
    _121
    _121
    try:
    _121
    if isinstance(global_imports, str):
    _121
    modules = [module.strip() for module in global_imports.split(",")]
    _121
    elif isinstance(global_imports, list):
    _121
    modules = global_imports
    _121
    else:
    _121
    msg = "global_imports must be either a string or a list"
    _121
    raise TypeError(msg)
    _121
    _121
    for module in modules:
    _121
    try:
    _121
    imported_module = importlib.import_module(module)
    _121
    global_dict[imported_module.__name__] = imported_module
    _121
    except ImportError as e:
    _121
    msg = f"Could not import module {module}: {e!s}"
    _121
    raise ImportError(msg) from e
    _121
    _121
    # Add the URL variable to the component's globals dictionary
    _121
    # Extract from Message object or use the string directly
    _121
    if hasattr(self, "url") and self.url:
    _121
    url_value = self.url.text if isinstance(self.url, Message) else str(self.url)
    _121
    if url_value:
    _121
    global_dict["url"] = url_value # Makes 'url' available in Python code
    _121
    self.log(f"URL variable set: {url_value}")
    _121
    _121
    except Exception as e:
    _121
    self.log(f"Error in global imports: {e!s}")
    _121
    raise
    _121
    else:
    _121
    self.log(f"Successfully imported modules: {list(global_dict.keys())}")
    _121
    return global_dict
    _121
    _121
    def run_python_repl(self) -> Data:
    _121
    try:
    _121
    # Extract Python code text if it's a Message object
    _121
    python_code_text = self.python_code
    _121
    if isinstance(python_code_text, Message):
    _121
    python_code_text = python_code_text.text if python_code_text.text else ""
    _121
    elif not isinstance(python_code_text, str):
    _121
    python_code_text = str(python_code_text)
    _121
    _121
    globals_ = self.get_globals(self.global_imports)
    _121
    python_repl = PythonREPL(_globals=globals_)
    _121
    result = python_repl.run(python_code_text)
    _121
    result = result.strip() if result else ""
    _121
    _121
    self.log("Code execution completed successfully")
    _121
    return Data(data={"result": result})
    _121
    _121
    except ImportError as e:
    _121
    error_message = f"Import Error: {e!s}"
    _121
    self.log(error_message)
    _121
    return Data(data={"error": error_message})
    _121
    _121
    except SyntaxError as e:
    _121
    error_message = f"Syntax Error: {e!s}"
    _121
    self.log(error_message)
    _121
    return Data(data={"error": error_message})
    _121
    _121
    except (NameError, TypeError, ValueError) as e:
    _121
    error_message = f"Error during execution: {e!s}"
    _121
    self.log(error_message)
    _121
    return Data(data={"error": error_message})
    _121
    _121
    def build(self):
    _121
    return self.run_python_repl

    +
  6. +
  7. +

    To save the modifications, click Check & Save.

    +
  8. +
  9. +

    Add a Text component to your flow and set its value, such as google.com.

    +
  10. +
  11. +

    Connect the Text component's output to the new URL input field on your customized Python Interpreter component.

    +
  12. +
+

The Python Interpreter component can now use the url variable in the Python code that it executes.

Python Interpreter parameters​

-
NameTypeDescription
global_importsStringInput parameter. A comma-separated list of modules to import globally, such as math,pandas,numpy.
python_codeCodeInput parameter. The Python code to execute. Only modules specified in Global Imports can be used.
resultsDataOutput parameter. The output of the executed Python code, including any printed results or errors.