diff --git a/365085a8-a90a-43f9-a779-f8769ec7eca1.html b/365085a8-a90a-43f9-a779-f8769ec7eca1.html index 2af533bcd3..3090c7a076 100644 --- a/365085a8-a90a-43f9-a779-f8769ec7eca1.html +++ b/365085a8-a90a-43f9-a779-f8769ec7eca1.html @@ -7,7 +7,7 @@ - + diff --git a/404.html b/404.html index 4c069316b8..dd7d9a18a1 100644 --- a/404.html +++ b/404.html @@ -7,7 +7,7 @@ - + diff --git a/assets/js/0575dfc8.ec28c239.js b/assets/js/0575dfc8.18a02a68.js similarity index 76% rename from assets/js/0575dfc8.ec28c239.js rename to assets/js/0575dfc8.18a02a68.js index ab478c606d..50fd8691e4 100644 --- a/assets/js/0575dfc8.ec28c239.js +++ b/assets/js/0575dfc8.18a02a68.js @@ -1 +1 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[2005],{3112:(e,n,i)=>{i.r(n),i.d(n,{CH:()=>b,assets:()=>h,chCodeConfig:()=>g,contentTitle:()=>d,default:()=>u,frontMatter:()=>a,metadata:()=>c,toc:()=>x});var l=i(4848),r=i(8453),t=i(4754),o=i(3554),s=i.n(o);const a={title:"Global Variables",sidebar_position:0,slug:"/settings-global-variables"},d=void 0,c={id:"Settings/settings-global-variables",title:"Global Variables",description:"This page may contain outdated information. It will be updated as soon as possible.",source:"@site/docs/Settings/settings-global-variables.md",sourceDirName:"Settings",slug:"/settings-global-variables",permalink:"/settings-global-variables",draft:!1,unlisted:!1,tags:[],version:"current",sidebarPosition:0,frontMatter:{title:"Global Variables",sidebar_position:0,slug:"/settings-global-variables"},sidebar:"defaultSidebar",previous:{title:"Railway",permalink:"/deployment-railway"},next:{title:"Project & General Settings",permalink:"/settings-project-general-settings"}},h={},b={annotations:t.hk,InlineCode:t.R0},g={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},x=[{value:"Create and Add a Global Variable",id:"3543d5ef00eb453aa459b97ba85501e5",level:3},{value:"Configure Environment Variables in your .env file",id:"76844a93dbbc4d1ba551ea1a4a89ccdd",level:3}];function j(e){const n={admonition:"admonition",code:"code",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return b||A("CH",!1),b.InlineCode||A("CH.InlineCode",!0),(0,l.jsxs)(l.Fragment,{children:[(0,l.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,l.jsx)(n.admonition,{type:"info",children:(0,l.jsx)(n.p,{children:"This page may contain outdated information. It will be updated as soon as possible."})}),"\n",(0,l.jsx)(n.p,{children:"Global Variables are a useful feature of Langflow, allowing you to define reusable variables accessed from any Text field in your project."}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"TL;DR"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Global Variables are reusable variables accessible from any Text field in your project."}),"\n",(0,l.jsxs)(n.li,{children:["To create one, click the \ud83c\udf10 button in a Text field and then ",(0,l.jsx)(n.strong,{children:"+ Add New Variable"}),"."]}),"\n",(0,l.jsxs)(n.li,{children:["Define the ",(0,l.jsx)(n.strong,{children:"Name"}),", ",(0,l.jsx)(n.strong,{children:"Type"}),", and ",(0,l.jsx)(n.strong,{children:"Value"})," of the variable."]}),"\n",(0,l.jsxs)(n.li,{children:["Click ",(0,l.jsx)(n.strong,{children:"Save Variable"})," to create it."]}),"\n",(0,l.jsx)(n.li,{children:"All Credential Global Variables are encrypted and accessible only by you."}),"\n",(0,l.jsxs)(n.li,{children:["Set ",(0,l.jsx)(b.InlineCode,{codeConfig:g,code:{lines:[{tokens:[{content:"LANGFLOW_STORE_ENVIRONMENT_VARIABLES",props:{style:{color:"#79C0FF"}}}]}],lang:"jsx"},children:"LANGFLOW_STORE_ENVIRONMENT_VARIABLES"})," to ",(0,l.jsx)(b.InlineCode,{codeConfig:g,code:{lines:[{tokens:[{content:"true",props:{style:{color:"#79C0FF"}}}]}],lang:"jsx"},children:"true"})," in your ",(0,l.jsx)(n.code,{children:".env"})," file to add all variables in ",(0,l.jsx)(b.InlineCode,{codeConfig:g,code:{lines:[{tokens:[{content:"LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT",props:{style:{color:"#79C0FF"}}}]}],lang:"jsx"},children:"LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT"})," to your user's Global Variables."]}),"\n"]}),"\n",(0,l.jsx)(n.h3,{id:"3543d5ef00eb453aa459b97ba85501e5",children:"Create and Add a Global Variable"}),"\n",(0,l.jsxs)(n.p,{children:["To create and add a global variable, click the \ud83c\udf10 button in a Text field, and then click ",(0,l.jsx)(n.strong,{children:"+ Add New Variable"}),"."]}),"\n",(0,l.jsx)(n.p,{children:"Text fields are where you write text without opening a Text area, and are identified with the \ud83c\udf10 icon."}),"\n",(0,l.jsxs)(n.p,{children:["For example, to create an environment variable for the ",(0,l.jsx)(n.strong,{children:"OpenAI"})," component:"]}),"\n",(0,l.jsxs)(n.ol,{children:["\n",(0,l.jsxs)(n.li,{children:["In the ",(0,l.jsx)(n.strong,{children:"OpenAI API Key"})," text field, click the \ud83c\udf10 button, then ",(0,l.jsx)(n.strong,{children:"Add New Variable"}),"."]}),"\n",(0,l.jsxs)(n.li,{children:["Enter ",(0,l.jsx)(n.code,{children:"openai_api_key"})," in the ",(0,l.jsx)(n.strong,{children:"Variable Name"})," field."]}),"\n",(0,l.jsxs)(n.li,{children:["Paste your OpenAI API Key (",(0,l.jsx)(n.code,{children:"sk-..."}),") in the ",(0,l.jsx)(n.strong,{children:"Value"})," field."]}),"\n",(0,l.jsxs)(n.li,{children:["Select ",(0,l.jsx)(n.strong,{children:"Credential"})," for the ",(0,l.jsx)(n.strong,{children:"Type"}),"."]}),"\n",(0,l.jsxs)(n.li,{children:["Choose ",(0,l.jsx)(n.strong,{children:"OpenAI API Key"})," in the ",(0,l.jsx)(n.strong,{children:"Apply to Fields"})," field to apply this variable to all fields named ",(0,l.jsx)(n.strong,{children:"OpenAI API Key"}),"."]}),"\n",(0,l.jsxs)(n.li,{children:["Click ",(0,l.jsx)(n.strong,{children:"Save Variable"}),"."]}),"\n"]}),"\n",(0,l.jsxs)(n.p,{children:["You now have a ",(0,l.jsx)(n.code,{children:"openai_api_key"})," global environment variable for your Langflow project.\nSubsequently, clicking the \ud83c\udf10 button in a Text field will display the new variable in the dropdown."]}),"\n",(0,l.jsx)(n.admonition,{type:"tip",children:(0,l.jsx)(n.p,{children:"You can also create global variables in Settings > Variables and Secrets."})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.img,{src:i(4730).A+"",width:"1236",height:"1240"})}),"\n",(0,l.jsxs)(n.p,{children:["To view and manage your project's global environment variables, visit ",(0,l.jsx)(n.strong,{children:"Settings"})," > ",(0,l.jsx)(n.strong,{children:"Variables and Secrets"}),"."]}),"\n",(0,l.jsx)(n.h3,{id:"76844a93dbbc4d1ba551ea1a4a89ccdd",children:"Configure Environment Variables in your .env file"}),"\n",(0,l.jsxs)(n.p,{children:["Setting ",(0,l.jsx)(n.code,{children:"LANGFLOW_STORE_ENVIRONMENT_VARIABLES"})," to ",(0,l.jsx)(n.code,{children:"true"})," in your ",(0,l.jsx)(n.code,{children:".env"})," file (default) adds all variables in ",(0,l.jsx)(n.code,{children:"LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT"})," to your user's Global Variables."]}),"\n",(0,l.jsx)(n.p,{children:"These variables are accessible like any other Global Variable."}),"\n",(0,l.jsx)(n.admonition,{type:"info",children:(0,l.jsxs)(n.p,{children:["To prevent this behavior, set ",(0,l.jsx)(n.code,{children:"LANGFLOW_STORE_ENVIRONMENT_VARIABLES"})," to ",(0,l.jsx)(n.code,{children:"false"})," in your ",(0,l.jsx)(n.code,{children:".env"})," file."]})}),"\n",(0,l.jsxs)(n.p,{children:["You can specify variables to get from the environment by listing them in ",(0,l.jsx)(n.code,{children:"LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT"}),"."]}),"\n",(0,l.jsxs)(n.p,{children:["Specify variables as a comma-separated list (e.g., ",(0,l.jsx)(b.InlineCode,{codeConfig:g,code:{lines:[{tokens:[{content:'"VARIABLE1, VARIABLE2"',props:{style:{color:"#A5D6FF"}}}]}],lang:"jsx"},children:'"VARIABLE1, VARIABLE2"'}),") or a JSON-encoded string (e.g., ",(0,l.jsx)(b.InlineCode,{codeConfig:g,code:{lines:[{tokens:[{content:'\'["VARIABLE1", "VARIABLE2"]\'',props:{style:{color:"#A5D6FF"}}}]}],lang:"jsx"},children:'\'["VARIABLE1", "VARIABLE2"]\''}),")."]}),"\n",(0,l.jsx)(n.p,{children:"The default list of variables includes the ones below and more:"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"ANTHROPIC_API_KEY"}),"\n",(0,l.jsx)(n.li,{children:"ASTRA_DB_API_ENDPOINT"}),"\n",(0,l.jsx)(n.li,{children:"ASTRA_DB_APPLICATION_TOKEN"}),"\n",(0,l.jsx)(n.li,{children:"AZURE_OPENAI_API_KEY"}),"\n",(0,l.jsx)(n.li,{children:"AZURE_OPENAI_API_DEPLOYMENT_NAME"}),"\n",(0,l.jsx)(n.li,{children:"AZURE_OPENAI_API_EMBEDDINGS_DEPLOYMENT_NAME"}),"\n",(0,l.jsx)(n.li,{children:"AZURE_OPENAI_API_INSTANCE_NAME"}),"\n",(0,l.jsx)(n.li,{children:"AZURE_OPENAI_API_VERSION"}),"\n",(0,l.jsx)(n.li,{children:"COHERE_API_KEY"}),"\n",(0,l.jsx)(n.li,{children:"GOOGLE_API_KEY"}),"\n",(0,l.jsx)(n.li,{children:"GROQ_API_KEY"}),"\n",(0,l.jsx)(n.li,{children:"HUGGINGFACEHUB_API_TOKEN"}),"\n",(0,l.jsx)(n.li,{children:"OPENAI_API_KEY"}),"\n",(0,l.jsx)(n.li,{children:"PINECONE_API_KEY"}),"\n",(0,l.jsx)(n.li,{children:"SEARCHAPI_API_KEY"}),"\n",(0,l.jsx)(n.li,{children:"SERPAPI_API_KEY"}),"\n",(0,l.jsx)(n.li,{children:"UPSTASH_VECTOR_REST_URL"}),"\n",(0,l.jsx)(n.li,{children:"UPSTASH_VECTOR_REST_TOKEN"}),"\n",(0,l.jsx)(n.li,{children:"VECTARA_CUSTOMER_ID"}),"\n",(0,l.jsx)(n.li,{children:"VECTARA_CORPUS_ID"}),"\n",(0,l.jsx)(n.li,{children:"VECTARA_API_KEY"}),"\n"]}),"\n",(0,l.jsx)(s(),{controls:!0,url:"https://youtu.be/RedPOCsYNAM"})]})}function u(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(j,{...e})}):j(e)}function A(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},4730:(e,n,i)=>{i.d(n,{A:()=>l});const l=i.p+"assets/images/418277339-098b93e44d60be390c71469029fb4910.png"}}]); \ No newline at end of file +"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[2005],{3112:(e,n,i)=>{i.r(n),i.d(n,{CH:()=>b,assets:()=>h,chCodeConfig:()=>g,contentTitle:()=>d,default:()=>j,frontMatter:()=>a,metadata:()=>c,toc:()=>x});var l=i(4848),r=i(8453),t=i(4754),o=i(3554),s=i.n(o);const a={title:"Global Variables",sidebar_position:0,slug:"/settings-global-variables"},d=void 0,c={id:"Settings/settings-global-variables",title:"Global Variables",description:"This page may contain outdated information. It will be updated as soon as possible.",source:"@site/docs/Settings/settings-global-variables.md",sourceDirName:"Settings",slug:"/settings-global-variables",permalink:"/settings-global-variables",draft:!1,unlisted:!1,tags:[],version:"current",sidebarPosition:0,frontMatter:{title:"Global Variables",sidebar_position:0,slug:"/settings-global-variables"},sidebar:"defaultSidebar",previous:{title:"Railway",permalink:"/deployment-railway"},next:{title:"Project & General Settings",permalink:"/settings-project-general-settings"}},h={},b={annotations:t.hk,InlineCode:t.R0},g={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},x=[{value:"Create and Add a Global Variable",id:"3543d5ef00eb453aa459b97ba85501e5",level:3},{value:"Configure Environment Variables in your .env file",id:"76844a93dbbc4d1ba551ea1a4a89ccdd",level:3}];function u(e){const n={admonition:"admonition",code:"code",h3:"h3",img:"img",li:"li",ol:"ol",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components};return b||A("CH",!1),b.InlineCode||A("CH.InlineCode",!0),(0,l.jsxs)(l.Fragment,{children:[(0,l.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,l.jsx)(n.admonition,{type:"info",children:(0,l.jsx)(n.p,{children:"This page may contain outdated information. It will be updated as soon as possible."})}),"\n",(0,l.jsx)(n.p,{children:"Global Variables are a useful feature of Langflow, allowing you to define reusable variables accessed from any Text field in your project."}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.strong,{children:"TL;DR"})}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"Global Variables are reusable variables accessible from any Text field in your project."}),"\n",(0,l.jsxs)(n.li,{children:["To create one, click the \ud83c\udf10 button in a Text field and then ",(0,l.jsx)(n.strong,{children:"+ Add New Variable"}),"."]}),"\n",(0,l.jsxs)(n.li,{children:["Define the ",(0,l.jsx)(n.strong,{children:"Name"}),", ",(0,l.jsx)(n.strong,{children:"Type"}),", and ",(0,l.jsx)(n.strong,{children:"Value"})," of the variable."]}),"\n",(0,l.jsxs)(n.li,{children:["Click ",(0,l.jsx)(n.strong,{children:"Save Variable"})," to create it."]}),"\n",(0,l.jsx)(n.li,{children:"All Credential Global Variables are encrypted and accessible only by you."}),"\n",(0,l.jsxs)(n.li,{children:["Set ",(0,l.jsx)(b.InlineCode,{codeConfig:g,code:{lines:[{tokens:[{content:"LANGFLOW_STORE_ENVIRONMENT_VARIABLES",props:{style:{color:"#79C0FF"}}}]}],lang:"jsx"},children:"LANGFLOW_STORE_ENVIRONMENT_VARIABLES"})," to ",(0,l.jsx)(b.InlineCode,{codeConfig:g,code:{lines:[{tokens:[{content:"true",props:{style:{color:"#79C0FF"}}}]}],lang:"jsx"},children:"true"})," in your ",(0,l.jsx)(n.code,{children:".env"})," file to add all variables in ",(0,l.jsx)(b.InlineCode,{codeConfig:g,code:{lines:[{tokens:[{content:"LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT",props:{style:{color:"#79C0FF"}}}]}],lang:"jsx"},children:"LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT"})," to your user's Global Variables."]}),"\n"]}),"\n",(0,l.jsx)(n.h3,{id:"3543d5ef00eb453aa459b97ba85501e5",children:"Create and Add a Global Variable"}),"\n",(0,l.jsxs)(n.p,{children:["To create and add a global variable, click the \ud83c\udf10 button in a Text field, and then click ",(0,l.jsx)(n.strong,{children:"+ Add New Variable"}),"."]}),"\n",(0,l.jsx)(n.p,{children:"Text fields are where you write text without opening a Text area, and are identified with the \ud83c\udf10 icon."}),"\n",(0,l.jsxs)(n.p,{children:["For example, to create an environment variable for the ",(0,l.jsx)(n.strong,{children:"OpenAI"})," component:"]}),"\n",(0,l.jsxs)(n.ol,{children:["\n",(0,l.jsxs)(n.li,{children:["In the ",(0,l.jsx)(n.strong,{children:"OpenAI API Key"})," text field, click the \ud83c\udf10 button, then ",(0,l.jsx)(n.strong,{children:"Add New Variable"}),"."]}),"\n",(0,l.jsxs)(n.li,{children:["Enter ",(0,l.jsx)(n.code,{children:"openai_api_key"})," in the ",(0,l.jsx)(n.strong,{children:"Variable Name"})," field."]}),"\n",(0,l.jsxs)(n.li,{children:["Paste your OpenAI API Key (",(0,l.jsx)(n.code,{children:"sk-..."}),") in the ",(0,l.jsx)(n.strong,{children:"Value"})," field."]}),"\n",(0,l.jsxs)(n.li,{children:["Select ",(0,l.jsx)(n.strong,{children:"Credential"})," for the ",(0,l.jsx)(n.strong,{children:"Type"}),"."]}),"\n",(0,l.jsxs)(n.li,{children:["Choose ",(0,l.jsx)(n.strong,{children:"OpenAI API Key"})," in the ",(0,l.jsx)(n.strong,{children:"Apply to Fields"})," field to apply this variable to all fields named ",(0,l.jsx)(n.strong,{children:"OpenAI API Key"}),"."]}),"\n",(0,l.jsxs)(n.li,{children:["Click ",(0,l.jsx)(n.strong,{children:"Save Variable"}),"."]}),"\n"]}),"\n",(0,l.jsxs)(n.p,{children:["You now have a ",(0,l.jsx)(n.code,{children:"openai_api_key"})," global environment variable for your Langflow project.\nSubsequently, clicking the \ud83c\udf10 button in a Text field will display the new variable in the dropdown."]}),"\n",(0,l.jsx)(n.admonition,{type:"tip",children:(0,l.jsx)(n.p,{children:"You can also create global variables in Settings > Variables and Secrets."})}),"\n",(0,l.jsx)(n.p,{children:(0,l.jsx)(n.img,{src:i(4730).A+"",width:"1236",height:"1240"})}),"\n",(0,l.jsxs)(n.p,{children:["To view and manage your project's global environment variables, visit ",(0,l.jsx)(n.strong,{children:"Settings"})," > ",(0,l.jsx)(n.strong,{children:"Variables and Secrets"}),"."]}),"\n",(0,l.jsx)(n.h3,{id:"76844a93dbbc4d1ba551ea1a4a89ccdd",children:"Configure Environment Variables in your .env file"}),"\n",(0,l.jsxs)(n.p,{children:["Setting ",(0,l.jsx)(n.code,{children:"LANGFLOW_STORE_ENVIRONMENT_VARIABLES"})," to ",(0,l.jsx)(n.code,{children:"true"})," in your ",(0,l.jsx)(n.code,{children:".env"})," file (default) adds all variables in ",(0,l.jsx)(n.code,{children:"LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT"})," to your user's Global Variables."]}),"\n",(0,l.jsx)(n.p,{children:"These variables are accessible like any other Global Variable."}),"\n",(0,l.jsx)(n.admonition,{type:"info",children:(0,l.jsxs)(n.p,{children:["To prevent this behavior, set ",(0,l.jsx)(n.code,{children:"LANGFLOW_STORE_ENVIRONMENT_VARIABLES"})," to ",(0,l.jsx)(n.code,{children:"false"})," in your ",(0,l.jsx)(n.code,{children:".env"})," file."]})}),"\n",(0,l.jsxs)(n.p,{children:["You can specify variables to get from the environment by listing them in ",(0,l.jsx)(n.code,{children:"LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT"}),", as a comma-separated list (e.g., ",(0,l.jsx)(b.InlineCode,{codeConfig:g,code:{lines:[{tokens:[{content:"VARIABLE1",props:{style:{color:"#79C0FF"}}},{content:", ",props:{style:{color:"#C9D1D9"}}},{content:"VARIABLE2",props:{style:{color:"#79C0FF"}}}]}],lang:"jsx"},children:"VARIABLE1, VARIABLE2"}),")."]}),"\n",(0,l.jsx)(n.p,{children:"The default list of variables includes the ones below and more:"}),"\n",(0,l.jsxs)(n.ul,{children:["\n",(0,l.jsx)(n.li,{children:"ANTHROPIC_API_KEY"}),"\n",(0,l.jsx)(n.li,{children:"ASTRA_DB_API_ENDPOINT"}),"\n",(0,l.jsx)(n.li,{children:"ASTRA_DB_APPLICATION_TOKEN"}),"\n",(0,l.jsx)(n.li,{children:"AZURE_OPENAI_API_KEY"}),"\n",(0,l.jsx)(n.li,{children:"AZURE_OPENAI_API_DEPLOYMENT_NAME"}),"\n",(0,l.jsx)(n.li,{children:"AZURE_OPENAI_API_EMBEDDINGS_DEPLOYMENT_NAME"}),"\n",(0,l.jsx)(n.li,{children:"AZURE_OPENAI_API_INSTANCE_NAME"}),"\n",(0,l.jsx)(n.li,{children:"AZURE_OPENAI_API_VERSION"}),"\n",(0,l.jsx)(n.li,{children:"COHERE_API_KEY"}),"\n",(0,l.jsx)(n.li,{children:"GOOGLE_API_KEY"}),"\n",(0,l.jsx)(n.li,{children:"GROQ_API_KEY"}),"\n",(0,l.jsx)(n.li,{children:"HUGGINGFACEHUB_API_TOKEN"}),"\n",(0,l.jsx)(n.li,{children:"OPENAI_API_KEY"}),"\n",(0,l.jsx)(n.li,{children:"PINECONE_API_KEY"}),"\n",(0,l.jsx)(n.li,{children:"SEARCHAPI_API_KEY"}),"\n",(0,l.jsx)(n.li,{children:"SERPAPI_API_KEY"}),"\n",(0,l.jsx)(n.li,{children:"UPSTASH_VECTOR_REST_URL"}),"\n",(0,l.jsx)(n.li,{children:"UPSTASH_VECTOR_REST_TOKEN"}),"\n",(0,l.jsx)(n.li,{children:"VECTARA_CUSTOMER_ID"}),"\n",(0,l.jsx)(n.li,{children:"VECTARA_CORPUS_ID"}),"\n",(0,l.jsx)(n.li,{children:"VECTARA_API_KEY"}),"\n"]}),"\n",(0,l.jsx)(s(),{controls:!0,url:"https://youtu.be/RedPOCsYNAM"})]})}function j(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,l.jsx)(n,{...e,children:(0,l.jsx)(u,{...e})}):u(e)}function A(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}},4730:(e,n,i)=>{i.d(n,{A:()=>l});const l=i.p+"assets/images/418277339-098b93e44d60be390c71469029fb4910.png"}}]); \ No newline at end of file diff --git a/assets/js/23d0e682.ee1f6423.js b/assets/js/23d0e682.f73e4482.js similarity index 63% rename from assets/js/23d0e682.ee1f6423.js rename to assets/js/23d0e682.f73e4482.js index eb50128282..4fe704879e 100644 --- a/assets/js/23d0e682.ee1f6423.js +++ b/assets/js/23d0e682.f73e4482.js @@ -1 +1 @@ -"use strict";(self.webpackChunklangflow_docs=self.webpackChunklangflow_docs||[]).push([[9461],{6459:(e,t,o)=>{o.r(t),o.d(t,{CH:()=>p,assets:()=>a,chCodeConfig:()=>u,contentTitle:()=>i,default:()=>g,frontMatter:()=>d,metadata:()=>h,toc:()=>j});var n=o(4848),s=o(8453),r=o(4754),c=o(3554),l=o.n(c);const d={title:"API",sidebar_position:2,slug:"/workspace-api"},i=void 0,h={id:"Workspace/workspace-api",title:"API",description:"The\xa0API\xa0section presents code templates for integrating your flow into external applications.",source:"@site/docs/Workspace/workspace-api.md",sourceDirName:"Workspace",slug:"/workspace-api",permalink:"/workspace-api",draft:!1,unlisted:!1,tags:[],version:"current",sidebarPosition:2,frontMatter:{title:"API",sidebar_position:2,slug:"/workspace-api"},sidebar:"defaultSidebar",previous:{title:"Playground",permalink:"/workspace-playground"},next:{title:"Logs",permalink:"/workspace-logs"}},a={},p={annotations:r.hk,Code:r.Cy},u={staticMediaQuery:"not screen, (max-width: 768px)",lineNumbers:!0,showCopyButton:!0,themeName:"github-dark"},j=[{value:"cURL",id:"4eb287a8424349c4b0b436a6703de5f3",level:3},{value:"Python API",id:"fb7db14e6330418389562ef647aa2354",level:3},{value:"Python Code",id:"7af87438549b4972907ac310a4193067",level:3},{value:"Tweaks",id:"5680600063724590ac2302b4ddeea867",level:3},{value:"Chat Widget",id:"48f121a6cb3243979a341753da0c2700",level:2},{value:"Embed your flow into HTML",id:"6e84db2f2a0d451db6fa03c57e9bf9a4",level:3},{value:"Embed your flow with React",id:"fe5d3b1c42e74e4c84ebc9d1799b7665",level:3},{value:"Embed your flow with Angular",id:"4fd87355b9aa409894acfbb9e1497980",level:3},{value:"Chat Widget Configuration",id:"5ede4bbbd2ac43e29c90f3edb43cba58",level:2}];function x(e){const t={admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",hr:"hr",img:"img",li:"li",p:"p",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,s.R)(),...e.components};return p||y("CH",!1),p.Code||y("CH.Code",!0),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("style",{dangerouslySetInnerHTML:{__html:'[data-ch-theme="github-dark"] { --ch-t-colorScheme: dark;--ch-t-foreground: #c9d1d9;--ch-t-background: #0d1117;--ch-t-lighter-inlineBackground: #0d1117e6;--ch-t-editor-background: #0d1117;--ch-t-editor-foreground: #c9d1d9;--ch-t-editor-lineHighlightBackground: #6e76811a;--ch-t-editor-rangeHighlightBackground: #ffffff0b;--ch-t-editor-infoForeground: #3794FF;--ch-t-editor-selectionBackground: #264F78;--ch-t-focusBorder: #1f6feb;--ch-t-tab-activeBackground: #0d1117;--ch-t-tab-activeForeground: #c9d1d9;--ch-t-tab-inactiveBackground: #010409;--ch-t-tab-inactiveForeground: #8b949e;--ch-t-tab-border: #30363d;--ch-t-tab-activeBorder: #0d1117;--ch-t-editorGroup-border: #30363d;--ch-t-editorGroupHeader-tabsBackground: #010409;--ch-t-editorLineNumber-foreground: #6e7681;--ch-t-input-background: #0d1117;--ch-t-input-foreground: #c9d1d9;--ch-t-input-border: #30363d;--ch-t-icon-foreground: #8b949e;--ch-t-sideBar-background: #010409;--ch-t-sideBar-foreground: #c9d1d9;--ch-t-sideBar-border: #30363d;--ch-t-list-activeSelectionBackground: #6e768166;--ch-t-list-activeSelectionForeground: #c9d1d9;--ch-t-list-hoverBackground: #6e76811a;--ch-t-list-hoverForeground: #c9d1d9; }'}}),"\n","\n",(0,n.jsxs)(t.p,{children:["The\xa0",(0,n.jsx)(t.strong,{children:"API"}),"\xa0section presents code templates for integrating your flow into external applications."]}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{src:o(9065).A+"",width:"2656",height:"1494"})}),"\n",(0,n.jsx)(t.h3,{id:"4eb287a8424349c4b0b436a6703de5f3",children:"cURL"}),"\n",(0,n.jsxs)(t.p,{children:["The\xa0",(0,n.jsx)(t.strong,{children:"cURL"}),"\xa0tab displays sample code for posting a query to your flow. Modify the\xa0",(0,n.jsx)(t.code,{children:"input_value"}),"\xa0to change your input message. Copy the code and run it to post a query to your flow and get the result."]}),"\n",(0,n.jsx)(t.h3,{id:"fb7db14e6330418389562ef647aa2354",children:"Python API"}),"\n",(0,n.jsxs)(t.p,{children:["The\xa0",(0,n.jsx)(t.strong,{children:"Python API"}),"\xa0tab displays code to interact with your flow using the Python HTTP requests library."]}),"\n",(0,n.jsx)(t.h3,{id:"7af87438549b4972907ac310a4193067",children:"Python Code"}),"\n",(0,n.jsxs)(t.p,{children:["The\xa0",(0,n.jsx)(t.strong,{children:"Python Code"}),"\xa0tab displays code to interact with your flow's\xa0",(0,n.jsx)(t.code,{children:".json"}),"\xa0file using the Langflow runtime."]}),"\n",(0,n.jsx)(t.h3,{id:"5680600063724590ac2302b4ddeea867",children:"Tweaks"}),"\n",(0,n.jsxs)(t.p,{children:["The\xa0",(0,n.jsx)(t.strong,{children:"Tweaks"}),"\xa0tab displays the available parameters for your flow. Modifying the parameters changes the code parameters across all windows. For example, changing the\xa0",(0,n.jsx)(t.strong,{children:"Chat Input"}),"\xa0component's\xa0",(0,n.jsx)(t.code,{children:"input_value"}),"\xa0will change that value across all API calls."]}),"\n",(0,n.jsx)(l(),{controls:!0,url:"https://youtu.be/ISGKvHzJG8o"}),"\n",(0,n.jsx)(t.h2,{id:"48f121a6cb3243979a341753da0c2700",children:"Chat Widget"}),"\n",(0,n.jsx)(t.hr,{}),"\n",(0,n.jsxs)(t.p,{children:["The\xa0",(0,n.jsx)(t.strong,{children:"Chat Widget HTML"}),"\xa0tab displays code that can be inserted in the\xa0",(0,n.jsx)(t.code,{children:""}),"\xa0of your HTML to interact with your flow."]}),"\n",(0,n.jsxs)(t.p,{children:["The\xa0",(0,n.jsx)(t.strong,{children:"Langflow Chat Widget"}),"\xa0is a powerful web component that enables communication with a Langflow project. This widget allows for a chat interface embedding, allowing the integration of Langflow into web applications effortlessly."]}),"\n",(0,n.jsx)(t.p,{children:"You can get the HTML code embedded with the chat by clicking the Code button at the Sidebar after building a flow."}),"\n",(0,n.jsx)(t.p,{children:"Clicking the Chat Widget HTML tab, you'll get the code to be inserted. Read below to learn how to use it with HTML, React and Angular."}),"\n",(0,n.jsx)(t.p,{children:(0,n.jsx)(t.img,{src:o(1056).A+"",width:"2974",height:"2006"})}),"\n",(0,n.jsx)(t.h3,{id:"6e84db2f2a0d451db6fa03c57e9bf9a4",children:"Embed your flow into HTML"}),"\n",(0,n.jsxs)(t.p,{children:["The Chat Widget can be embedded into any HTML page, inside a\xa0",(0,n.jsx)(t.code,{children:""}),"\xa0tag, as demonstrated in the video below."]}),"\n",(0,n.jsx)(l(),{controls:!0,url:"https://youtu.be/cVpNc-osfxQ"}),"\n",(0,n.jsx)(t.h3,{id:"fe5d3b1c42e74e4c84ebc9d1799b7665",children:"Embed your flow with React"}),"\n",(0,n.jsxs)(t.p,{children:["To embed the Chat Widget using React, insert this\xa0",(0,n.jsx)(t.code,{children:" - + diff --git a/components-data.html b/components-data.html index 59568c89a2..2a89ca43db 100644 --- a/components-data.html +++ b/components-data.html @@ -7,7 +7,7 @@ - + diff --git a/components-embedding-models.html b/components-embedding-models.html index c23817f894..b099a3100d 100644 --- a/components-embedding-models.html +++ b/components-embedding-models.html @@ -7,7 +7,7 @@ - + diff --git a/components-helpers.html b/components-helpers.html index e9811003cd..1d28e8cea1 100644 --- a/components-helpers.html +++ b/components-helpers.html @@ -7,7 +7,7 @@ - + diff --git a/components-io.html b/components-io.html index 1df2fe3543..748e401ca3 100644 --- a/components-io.html +++ b/components-io.html @@ -7,7 +7,7 @@ - + diff --git a/components-models.html b/components-models.html index de7c85e01a..285813bd04 100644 --- a/components-models.html +++ b/components-models.html @@ -7,7 +7,7 @@ - + diff --git a/components-prompts.html b/components-prompts.html index fe58272488..47c0b501d6 100644 --- a/components-prompts.html +++ b/components-prompts.html @@ -7,7 +7,7 @@ - + diff --git a/components-rag.html b/components-rag.html index 0ad2aa1042..b47e08fc8b 100644 --- a/components-rag.html +++ b/components-rag.html @@ -7,7 +7,7 @@ - + diff --git a/components-vector-stores.html b/components-vector-stores.html index bae08854aa..cc76234702 100644 --- a/components-vector-stores.html +++ b/components-vector-stores.html @@ -7,7 +7,7 @@ - + diff --git a/components.html b/components.html index 80b45ae505..af6d70c866 100644 --- a/components.html +++ b/components.html @@ -7,7 +7,7 @@ - + diff --git a/configuration-api-keys.html b/configuration-api-keys.html index 1246db387f..67ed40f157 100644 --- a/configuration-api-keys.html +++ b/configuration-api-keys.html @@ -7,7 +7,7 @@ - + diff --git a/configuration-authentication.html b/configuration-authentication.html index 4a7f8fa2dd..dd6bae44e7 100644 --- a/configuration-authentication.html +++ b/configuration-authentication.html @@ -7,7 +7,7 @@ - + diff --git a/configuration-backend-only.html b/configuration-backend-only.html index c4212a3476..c6f168d309 100644 --- a/configuration-backend-only.html +++ b/configuration-backend-only.html @@ -7,7 +7,7 @@ - + diff --git a/configuration-cli.html b/configuration-cli.html index 74cd7cdbd6..2ef34de944 100644 --- a/configuration-cli.html +++ b/configuration-cli.html @@ -7,7 +7,7 @@ - + diff --git a/contributing-community.html b/contributing-community.html index 2ff442396e..5f7b907991 100644 --- a/contributing-community.html +++ b/contributing-community.html @@ -7,7 +7,7 @@ - + diff --git a/contributing-github-issues.html b/contributing-github-issues.html index 70d1ba1ffe..fca6922422 100644 --- a/contributing-github-issues.html +++ b/contributing-github-issues.html @@ -7,7 +7,7 @@ - + diff --git a/contributing-how-to-contribute.html b/contributing-how-to-contribute.html index cbecfa35cf..b778665f65 100644 --- a/contributing-how-to-contribute.html +++ b/contributing-how-to-contribute.html @@ -7,7 +7,7 @@ - + diff --git a/contributing-telemetry.html b/contributing-telemetry.html index 1b410985e7..f0bf73dc59 100644 --- a/contributing-telemetry.html +++ b/contributing-telemetry.html @@ -7,7 +7,7 @@ - + diff --git a/deployment-docker.html b/deployment-docker.html index 3aa3de3d53..7163ad2188 100644 --- a/deployment-docker.html +++ b/deployment-docker.html @@ -7,7 +7,7 @@ - + diff --git a/deployment-gcp.html b/deployment-gcp.html index 178f84602a..246f84def8 100644 --- a/deployment-gcp.html +++ b/deployment-gcp.html @@ -7,7 +7,7 @@ - + diff --git a/deployment-hugging-face-spaces.html b/deployment-hugging-face-spaces.html index 56b34cdf91..cabe3385b1 100644 --- a/deployment-hugging-face-spaces.html +++ b/deployment-hugging-face-spaces.html @@ -7,7 +7,7 @@ - + diff --git a/deployment-kubernetes.html b/deployment-kubernetes.html index ea3a6f99ac..a0ea50d3d6 100644 --- a/deployment-kubernetes.html +++ b/deployment-kubernetes.html @@ -7,7 +7,7 @@ - + diff --git a/deployment-railway.html b/deployment-railway.html index 8502be3e89..a8871a99de 100644 --- a/deployment-railway.html +++ b/deployment-railway.html @@ -7,7 +7,7 @@ - + diff --git a/deployment-render.html b/deployment-render.html index 9649420389..8349053fc0 100644 --- a/deployment-render.html +++ b/deployment-render.html @@ -7,7 +7,7 @@ - + diff --git a/getting-started-common-installation-issues.html b/getting-started-common-installation-issues.html index e8facc0e08..c1bdf4ff7b 100644 --- a/getting-started-common-installation-issues.html +++ b/getting-started-common-installation-issues.html @@ -7,7 +7,7 @@ - + diff --git a/getting-started-installation.html b/getting-started-installation.html index 68177c8b56..891a2c57e5 100644 --- a/getting-started-installation.html +++ b/getting-started-installation.html @@ -7,7 +7,7 @@ - + diff --git a/getting-started-quickstart.html b/getting-started-quickstart.html index 15cbfa69d7..e692dcdd08 100644 --- a/getting-started-quickstart.html +++ b/getting-started-quickstart.html @@ -7,7 +7,7 @@ - + diff --git a/guides-chat-memory.html b/guides-chat-memory.html index 91045fcecf..dfbc2ceb83 100644 --- a/guides-chat-memory.html +++ b/guides-chat-memory.html @@ -7,7 +7,7 @@ - + diff --git a/guides-data-message.html b/guides-data-message.html index 72132d5289..addc52bcb8 100644 --- a/guides-data-message.html +++ b/guides-data-message.html @@ -7,7 +7,7 @@ - + diff --git a/guides-new-to-llms.html b/guides-new-to-llms.html index 135dde6c86..ee5b6405fb 100644 --- a/guides-new-to-llms.html +++ b/guides-new-to-llms.html @@ -7,7 +7,7 @@ - + diff --git a/index.html b/index.html index a6ee789dc2..cf4e1e6b65 100644 --- a/index.html +++ b/index.html @@ -7,7 +7,7 @@ - + diff --git a/integrations-langsmith.html b/integrations-langsmith.html index c008468edc..19aaf9c3fc 100644 --- a/integrations-langsmith.html +++ b/integrations-langsmith.html @@ -7,7 +7,7 @@ - + diff --git a/integrations-langwatch.html b/integrations-langwatch.html index 99997aa83f..68d96dcf71 100644 --- a/integrations-langwatch.html +++ b/integrations-langwatch.html @@ -7,7 +7,7 @@ - + @@ -17,7 +17,7 @@

To integrate with Langflow, just add your LangWatch API as a Langflow environment variable and you are good to go!

Step-by-step Configuration

    -
  1. Obtain your LangWatch API key from https://app.langwatch.com/
  2. +
  3. Obtain your LangWatch API key from https://app.langwatch.ai/
  4. Add the following key to Langflow .env file:

_10
LANGWATCH_API_KEY="your-api-key"

diff --git a/settings-global-variables.html b/settings-global-variables.html index 8536e2696a..bb1031545c 100644 --- a/settings-global-variables.html +++ b/settings-global-variables.html @@ -7,7 +7,7 @@ - + @@ -45,8 +45,7 @@ Subsequently, clicking the 🌐 button in a Text field will display the new vari

Setting LANGFLOW_STORE_ENVIRONMENT_VARIABLES to true in your .env file (default) adds all variables in LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT to your user's Global Variables.

These variables are accessible like any other Global Variable.

info

To prevent this behavior, set LANGFLOW_STORE_ENVIRONMENT_VARIABLES to false in your .env file.

-

You can specify variables to get from the environment by listing them in LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT.

-

Specify variables as a comma-separated list (e.g., "VARIABLE1, VARIABLE2") or a JSON-encoded string (e.g., '["VARIABLE1", "VARIABLE2"]').

+

You can specify variables to get from the environment by listing them in LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT, as a comma-separated list (e.g., VARIABLE1, VARIABLE2).

The default list of variables includes the ones below and more:


_10
@NgModule({ declarations: [ // ... Other components and directives ... ], imports: [ // ... Other imported modules ... ], schemas: [CUSTOM_ELEMENTS_SCHEMA], // Add the CUSTOM_ELEMENTS_SCHEMA here})export class YourModule {}

In your Angular project, find the component belonging to the module where CUSTOM_ELEMENTS_SCHEMA was added. Inside the template, add the langflow-chat tag to include the Chat Widget in your component's view:

-

_10
<langflow-chat
_10
chat_inputs='{"your_key":"value"}'
_10
chat_input_field="your_chat_key"
_10
flow_id="your_flow_id"
_10
host_url="langflow_url"
_10
></langflow-chat>

+

_10
<langflow-chat chat_inputs='{"your_key":"value"}' chat_input_field="your_chat_key" flow_id="your_flow_id" host_url="langflow_url"></langflow-chat>

tip

CUSTOM_ELEMENTS_SCHEMA is a built-in schema that allows Angular to recognize custom elements. Adding CUSTOM_ELEMENTS_SCHEMA tells Angular to allow custom elements in your templates, and it will suppress the warning related to unknown elements like langflow-chat. Notice that you can only use the Chat Widget in components that are part of the module where you added CUSTOM_ELEMENTS_SCHEMA.

Chat Widget Configuration


diff --git a/workspace-logs.html b/workspace-logs.html index 5fdb12d961..463089eb58 100644 --- a/workspace-logs.html +++ b/workspace-logs.html @@ -7,7 +7,7 @@ - + diff --git a/workspace-playground.html b/workspace-playground.html index 8e3e3656b0..87d4f50ab3 100644 --- a/workspace-playground.html +++ b/workspace-playground.html @@ -7,7 +7,7 @@ - + diff --git a/workspace.html b/workspace.html index 3a71761e8e..cb16fdab13 100644 --- a/workspace.html +++ b/workspace.html @@ -7,7 +7,7 @@ - +