openrag/assets/js/915a24fd.fd7e64ec.js
2025-12-18 23:00:04 +00:00

1 line
No EOL
17 KiB
JavaScript

"use strict";(globalThis.webpackChunkopenrag_docs=globalThis.webpackChunkopenrag_docs||[]).push([[6235],{1470:(e,n,r)=>{r.d(n,{A:()=>A});var s=r(6540),t=r(4164),a=r(7559),i=r(3104),o=r(6347),l=r(205),c=r(7485),d=r(1682),u=r(679);function p(e){return s.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,s.isValidElement)(e)&&function(e){const{props:n}=e;return!!n&&"object"==typeof n&&"value"in n}(e))return e;throw new Error(`Docusaurus error: Bad <Tabs> child <${"string"==typeof e.type?e.type:e.type.name}>: all children of the <Tabs> component should be <TabItem>, and every <TabItem> should have a unique "value" prop.`)})?.filter(Boolean)??[]}function h(e){const{values:n,children:r}=e;return(0,s.useMemo)(()=>{const e=n??function(e){return p(e).map(({props:{value:e,label:n,attributes:r,default:s}})=>({value:e,label:n,attributes:r,default:s}))}(r);return function(e){const n=(0,d.XI)(e,(e,n)=>e.value===n.value);if(n.length>0)throw new Error(`Docusaurus error: Duplicate values "${n.map(e=>e.value).join(", ")}" found in <Tabs>. Every value needs to be unique.`)}(e),e},[n,r])}function g({value:e,tabValues:n}){return n.some(n=>n.value===e)}function x({queryString:e=!1,groupId:n}){const r=(0,o.W6)(),t=function({queryString:e=!1,groupId:n}){if("string"==typeof e)return e;if(!1===e)return null;if(!0===e&&!n)throw new Error('Docusaurus error: The <Tabs> component groupId prop is required if queryString=true, because this value is used as the search param name. You can also provide an explicit value such as queryString="my-search-param".');return n??null}({queryString:e,groupId:n});return[(0,c.aZ)(t),(0,s.useCallback)(e=>{if(!t)return;const n=new URLSearchParams(r.location.search);n.set(t,e),r.replace({...r.location,search:n.toString()})},[t,r])]}function f(e){const{defaultValue:n,queryString:r=!1,groupId:t}=e,a=h(e),[i,o]=(0,s.useState)(()=>function({defaultValue:e,tabValues:n}){if(0===n.length)throw new Error("Docusaurus error: the <Tabs> component requires at least one <TabItem> children component");if(e){if(!g({value:e,tabValues:n}))throw new Error(`Docusaurus error: The <Tabs> has a defaultValue "${e}" but none of its children has the corresponding value. Available values are: ${n.map(e=>e.value).join(", ")}. If you intend to show no default tab, use defaultValue={null} instead.`);return e}const r=n.find(e=>e.default)??n[0];if(!r)throw new Error("Unexpected error: 0 tabValues");return r.value}({defaultValue:n,tabValues:a})),[c,d]=x({queryString:r,groupId:t}),[p,f]=function({groupId:e}){const n=function(e){return e?`docusaurus.tab.${e}`:null}(e),[r,t]=(0,u.Dv)(n);return[r,(0,s.useCallback)(e=>{n&&t.set(e)},[n,t])]}({groupId:t}),j=(()=>{const e=c??p;return g({value:e,tabValues:a})?e:null})();(0,l.A)(()=>{j&&o(j)},[j]);return{selectedValue:i,selectValue:(0,s.useCallback)(e=>{if(!g({value:e,tabValues:a}))throw new Error(`Can't select invalid tab value=${e}`);o(e),d(e),f(e)},[d,f,a]),tabValues:a}}var j=r(2303);const m={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=r(4848);function b({className:e,block:n,selectedValue:r,selectValue:s,tabValues:a}){const o=[],{blockElementScrollPositionUntilNextRender:l}=(0,i.a_)(),c=e=>{const n=e.currentTarget,t=o.indexOf(n),i=a[t].value;i!==r&&(l(n),s(i))},d=e=>{let n=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const r=o.indexOf(e.currentTarget)+1;n=o[r]??o[0];break}case"ArrowLeft":{const r=o.indexOf(e.currentTarget)-1;n=o[r]??o[o.length-1];break}}n?.focus()};return(0,v.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,t.A)("tabs",{"tabs--block":n},e),children:a.map(({value:e,label:n,attributes:s})=>(0,v.jsx)("li",{role:"tab",tabIndex:r===e?0:-1,"aria-selected":r===e,ref:e=>{o.push(e)},onKeyDown:d,onClick:c,...s,className:(0,t.A)("tabs__item",m.tabItem,s?.className,{"tabs__item--active":r===e}),children:n??e},e))})}function y({lazy:e,children:n,selectedValue:r}){const a=(Array.isArray(n)?n:[n]).filter(Boolean);if(e){const e=a.find(e=>e.props.value===r);return e?(0,s.cloneElement)(e,{className:(0,t.A)("margin-top--md",e.props.className)}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:a.map((e,n)=>(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==r}))})}function w(e){const n=f(e);return(0,v.jsxs)("div",{className:(0,t.A)(a.G.tabs.container,"tabs-container",m.tabList),children:[(0,v.jsx)(b,{...n,...e}),(0,v.jsx)(y,{...n,...e})]})}function A(e){const n=(0,j.A)();return(0,v.jsx)(w,{...e,children:p(e.children)},String(n))}},2134:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>u,contentTitle:()=>d,default:()=>g,frontMatter:()=>c,metadata:()=>s,toc:()=>p});const s=JSON.parse('{"id":"get-started/upgrade","title":"Upgrade OpenRAG","description":"Use these steps to upgrade your OpenRAG deployment to the latest version or a specific version.","source":"@site/docs/get-started/upgrade.mdx","sourceDirName":"get-started","slug":"/upgrade","permalink":"/upgrade","draft":false,"unlisted":false,"editUrl":"https://github.com/openrag/openrag/tree/main/docs/docs/get-started/upgrade.mdx","tags":[],"version":"current","frontMatter":{"title":"Upgrade OpenRAG","slug":"/upgrade"},"sidebar":"tutorialSidebar","previous":{"title":"Deploy self-managed services","permalink":"/docker"},"next":{"title":"Reinstall OpenRAG","permalink":"/reinstall"}}');var t=r(4848),a=r(8453),i=r(1470),o=r(9365),l=r(9870);const c={title:"Upgrade OpenRAG",slug:"/upgrade"},d=void 0,u={},p=[{value:"Export customized flows before upgrading",id:"export-customized-flows-before-upgrading",level:2},{value:"Upgrade TUI-managed installations",id:"upgrade-tui-managed-installations",level:2},...l.RM,{value:"Upgrade self-managed containers",id:"upgrade-self-managed-containers",level:2},...l.RM,{value:"See also",id:"see-also",level:2}];function h(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:"Use these steps to upgrade your OpenRAG deployment to the latest version or a specific version."}),"\n",(0,t.jsx)(n.h2,{id:"export-customized-flows-before-upgrading",children:"Export customized flows before upgrading"}),"\n",(0,t.jsxs)(n.p,{children:["If you modified the built-in flows or created custom flows in your OpenRAG Langflow instance, ",(0,t.jsx)(n.a,{href:"https://docs.langflow.org/concepts-flows-import",children:"export your flows"})," before upgrading.\nThis ensure that you won't lose your flows after upgrading, and you can reference the exported flows if there are any breaking changes in the new version."]}),"\n",(0,t.jsx)(n.h2,{id:"upgrade-tui-managed-installations",children:"Upgrade TUI-managed installations"}),"\n",(0,t.jsx)(n.p,{children:"To upgrade OpenRAG, you need to upgrade the OpenRAG Python package, and then upgrade the OpenRAG containers."}),"\n",(0,t.jsxs)(n.p,{children:["Upgrading the Python package also upgrades Docling by bumping the dependency in ",(0,t.jsx)(n.code,{children:"pyproject.toml"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["This is a two-part process because upgrading the OpenRAG Python package updates the Terminal User Interface (TUI) and Python code, but the container versions are controlled by environment variables in your ",(0,t.jsxs)(n.a,{href:"/reference/configuration",children:["OpenRAG ",(0,t.jsx)(n.code,{children:".env"})," file"]}),"."]}),"\n",(0,t.jsx)(l.Ay,{}),"\n",(0,t.jsxs)(n.ol,{start:"2",children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["To check for updates, open the TUI's ",(0,t.jsx)(n.strong,{children:"Status"})," menu (",(0,t.jsx)("kbd",{children:"3"}),"), and then click ",(0,t.jsx)(n.strong,{children:"Upgrade"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["If there is an update, stop all OpenRAG services.\nIn the ",(0,t.jsx)(n.strong,{children:"Status"})," menu, click ",(0,t.jsx)(n.strong,{children:"Stop Services"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Upgrade the OpenRAG Python package to the latest version from ",(0,t.jsx)(n.a,{href:"https://pypi.org/project/openrag/",children:"PyPI"}),".\nThe commands to upgrade the package depend on how you installed OpenRAG."]}),"\n",(0,t.jsxs)(i.A,{children:[(0,t.jsxs)(o.A,{value:"installer",label:"Script or uvx",default:!0,children:[(0,t.jsxs)(n.p,{children:["Use these steps to upgrade the Python package if you installed OpenRAG using the ",(0,t.jsx)(n.a,{href:"/install",children:"installer script"})," or ",(0,t.jsx)(n.a,{href:"/install-uvx",children:(0,t.jsx)(n.code,{children:"uvx"})}),":"]}),(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Navigate to your OpenRAG workspace directory:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"cd openrag-workspace\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Upgrade the OpenRAG package:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"uvx --from openrag openrag\n"})}),"\n",(0,t.jsxs)(n.p,{children:["You can invoke a specific version using any of the ",(0,t.jsxs)(n.a,{href:"https://docs.astral.sh/uv/guides/tools/#requesting-specific-versions",children:[(0,t.jsx)(n.code,{children:"uvx"})," version specifiers"]}),", such as ",(0,t.jsx)(n.code,{children:"--from"}),":"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"uvx --from openrag==0.1.30 openrag\n"})}),"\n"]}),"\n"]})]}),(0,t.jsxs)(o.A,{value:"uv-add",label:"uv add",children:[(0,t.jsxs)(n.p,{children:["Use these steps to upgrade the Python package if you installed OpenRAG with ",(0,t.jsx)(n.a,{href:"/install-uv",children:(0,t.jsx)(n.code,{children:"uv add"})}),":"]}),(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Navigate to your project directory:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"cd YOUR_PROJECT_NAME\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Update OpenRAG to the latest version:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"uv add --upgrade openrag\n"})}),"\n",(0,t.jsx)(n.p,{children:"To upgrade to a specific version:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"uv add --upgrade openrag==0.1.33\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Start the OpenRAG TUI:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"uv run openrag\n"})}),"\n"]}),"\n"]})]}),(0,t.jsxs)(o.A,{value:"uv-pip",label:"uv pip install",children:[(0,t.jsxs)(n.p,{children:["Use these steps to upgrade the Python package if you installed OpenRAG with ",(0,t.jsx)(n.a,{href:"/install-uv",children:(0,t.jsx)(n.code,{children:"uv pip install"})}),":"]}),(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Activate your virtual environment."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Upgrade OpenRAG:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"uv pip install --upgrade openrag\n"})}),"\n",(0,t.jsx)(n.p,{children:"To upgrade to a specific version:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"uv pip install --upgrade openrag==0.1.33\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Start the OpenRAG TUI:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"uv run openrag\n"})}),"\n"]}),"\n"]})]})]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["In the OpenRAG TUI, click ",(0,t.jsx)(n.strong,{children:"Start All Services"}),", and then wait while the upgraded containers start."]}),"\n",(0,t.jsxs)(n.p,{children:["When you start services after upgrading the Python package, OpenRAG runs ",(0,t.jsx)(n.code,{children:"docker compose pull"})," to get the appropriate container images matching the version specified in your OpenRAG ",(0,t.jsx)(n.code,{children:".env"})," file. Then, it recreates the containers with the new images using ",(0,t.jsx)(n.code,{children:"docker compose up -d --force-recreate"}),"."]}),"\n",(0,t.jsxs)(n.admonition,{title:"Pin container versions",type:"tip",children:[(0,t.jsxs)(n.p,{children:["In the OpenRAG ",(0,t.jsx)(n.code,{children:".env"})," file, the ",(0,t.jsx)(n.code,{children:"OPENRAG_VERSION"})," ",(0,t.jsx)(n.a,{href:"/reference/configuration#system-settings",children:"environment variable"})," is set to ",(0,t.jsx)(n.code,{children:"latest"})," by default, which pulls the ",(0,t.jsx)(n.code,{children:"latest"})," available container images.\nTo pin a specific container image version, you can set ",(0,t.jsx)(n.code,{children:"OPENRAG_VERSION"})," to the desired container image version, such as ",(0,t.jsx)(n.code,{children:"OPENRAG_VERSION=0.1.33"}),"."]}),(0,t.jsxs)(n.p,{children:["However, when you upgrade the Python package, OpenRAG automatically attempts to keep the ",(0,t.jsx)(n.code,{children:"OPENRAG_VERSION"})," synchronized with the Python package version.\nYou might need to edit the ",(0,t.jsx)(n.code,{children:".env"})," file after upgrading the Python package to enforce a different container version.\nThe TUI warns you if it detects a version mismatch."]})]}),"\n",(0,t.jsxs)(n.p,{children:["If you get an error that ",(0,t.jsx)(n.code,{children:"langflow container already exists"})," error during upgrade, see ",(0,t.jsx)(n.a,{href:"/support/troubleshoot#langflow-container-already-exists-during-upgrade",children:"Langflow container already exists during upgrade"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Under ",(0,t.jsx)(n.a,{href:"/manage-services",children:(0,t.jsx)(n.strong,{children:"Native Services"})}),", click ",(0,t.jsx)(n.strong,{children:"Start"})," to start the Docling service."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["When the upgrade process is complete, you can close the ",(0,t.jsx)(n.strong,{children:"Status"})," window and continue using OpenRAG."]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"upgrade-self-managed-containers",children:"Upgrade self-managed containers"}),"\n",(0,t.jsx)(l.Ay,{}),"\n",(0,t.jsxs)(n.ol,{start:"2",children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Fetch and apply the latest container images while preserving your OpenRAG data:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",metastring:'title="Docker"',children:"docker compose pull\ndocker compose up -d --force-recreate\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",metastring:'title="Podman"',children:"podman compose pull\npodman compose up -d --force-recreate\n"})}),"\n",(0,t.jsxs)(n.p,{children:["By default, OpenRAG's ",(0,t.jsx)(n.code,{children:"docker-compose"})," files pull the latest container images."]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"see-also",children:"See also"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/manage-services",children:"Manage OpenRAG services"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"/support/troubleshoot",children:"Troubleshoot OpenRAG"})}),"\n"]})]})}function g(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>i,x:()=>o});var s=r(6540);const t={},a=s.createContext(t);function i(e){const n=s.useContext(a);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function o(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:i(e.components),s.createElement(a.Provider,{value:n},e.children)}},9365:(e,n,r)=>{r.d(n,{A:()=>i});r(6540);var s=r(4164);const t={tabItem:"tabItem_Ymn6"};var a=r(4848);function i({children:e,hidden:n,className:r}){return(0,a.jsx)("div",{role:"tabpanel",className:(0,s.A)(t.tabItem,r),hidden:n,children:e})}},9870:(e,n,r)=>{r.d(n,{Ay:()=>o,RM:()=>a});var s=r(4848),t=r(8453);const a=[];function i(e){const n={a:"a",li:"li",ol:"ol",...(0,t.R)(),...e.components};return(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["If you modified the built-in flows or created custom flows in your ",(0,s.jsx)(n.a,{href:"/agents",children:"OpenRAG Langflow instance"}),", and you want to preserve those changes, then you must ",(0,s.jsx)(n.a,{href:"https://docs.langflow.org/concepts-flows-import",children:"export your flows"})," before starting this process. Afterwards, you can import your flows or reference the exported flow JSON as needed."]}),"\n"]})}function o(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(i,{...e})}):i(e)}}}]);