openrag/assets/js/915a24fd.d7dd439e.js
2025-12-16 14:05:59 +00:00

1 line
No EOL
16 KiB
JavaScript

"use strict";(globalThis.webpackChunkopenrag_docs=globalThis.webpackChunkopenrag_docs||[]).push([[6235],{1470:(e,n,r)=>{r.d(n,{A:()=>w});var s=r(6540),a=r(4164),t=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)(),a=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)(a),(0,s.useCallback)(e=>{if(!a)return;const n=new URLSearchParams(r.location.search);n.set(a,e),r.replace({...r.location,search:n.toString()})},[a,r])]}function f(e){const{defaultValue:n,queryString:r=!1,groupId:a}=e,t=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:t})),[c,d]=x({queryString:r,groupId:a}),[p,f]=function({groupId:e}){const n=function(e){return e?`docusaurus.tab.${e}`:null}(e),[r,a]=(0,u.Dv)(n);return[r,(0,s.useCallback)(e=>{n&&a.set(e)},[n,a])]}({groupId:a}),m=(()=>{const e=c??p;return g({value:e,tabValues:t})?e:null})();(0,l.A)(()=>{m&&o(m)},[m]);return{selectedValue:i,selectValue:(0,s.useCallback)(e=>{if(!g({value:e,tabValues:t}))throw new Error(`Can't select invalid tab value=${e}`);o(e),d(e),f(e)},[d,f,t]),tabValues:t}}var m=r(2303);const j={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var v=r(4848);function b({className:e,block:n,selectedValue:r,selectValue:s,tabValues:t}){const o=[],{blockElementScrollPositionUntilNextRender:l}=(0,i.a_)(),c=e=>{const n=e.currentTarget,a=o.indexOf(n),i=t[a].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,a.A)("tabs",{"tabs--block":n},e),children:t.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,a.A)("tabs__item",j.tabItem,s?.className,{"tabs__item--active":r===e}),children:n??e},e))})}function y({lazy:e,children:n,selectedValue:r}){const t=(Array.isArray(n)?n:[n]).filter(Boolean);if(e){const e=t.find(e=>e.props.value===r);return e?(0,s.cloneElement)(e,{className:(0,a.A)("margin-top--md",e.props.className)}):null}return(0,v.jsx)("div",{className:"margin-top--md",children:t.map((e,n)=>(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==r}))})}function A(e){const n=f(e);return(0,v.jsxs)("div",{className:(0,a.A)(t.G.tabs.container,"tabs-container",j.tabList),children:[(0,v.jsx)(b,{...n,...e}),(0,v.jsx)(y,{...n,...e})]})}function w(e){const n=(0,m.A)();return(0,v.jsx)(A,{...e,children:p(e.children)},String(n))}},2134:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>d,contentTitle:()=>c,default:()=>h,frontMatter:()=>l,metadata:()=>s,toc:()=>u});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 a=r(4848),t=r(8453),i=r(1470),o=r(9365);const l={title:"Upgrade OpenRAG",slug:"/upgrade"},c=void 0,d={},u=[{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},{value:"Upgrade self-managed containers",id:"upgrade-self-managed-containers",level:2},{value:"See also",id:"see-also",level:2}];function p(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,t.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.p,{children:"Use these steps to upgrade your OpenRAG deployment to the latest version or a specific version."}),"\n",(0,a.jsx)(n.h2,{id:"export-customized-flows-before-upgrading",children:"Export customized flows before upgrading"}),"\n",(0,a.jsxs)(n.p,{children:["If you modified the built-in flows or created custom flows in your OpenRAG Langflow instance, ",(0,a.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,a.jsx)(n.h2,{id:"upgrade-tui-managed-installations",children:"Upgrade TUI-managed installations"}),"\n",(0,a.jsx)(n.p,{children:"To upgrade OpenRAG, you need to upgrade the OpenRAG Python package, and then upgrade the OpenRAG containers."}),"\n",(0,a.jsxs)(n.p,{children:["Upgrading the Python package also upgrades Docling by bumping the dependency in ",(0,a.jsx)(n.code,{children:"pyproject.toml"}),"."]}),"\n",(0,a.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,a.jsxs)(n.a,{href:"/reference/configuration",children:["OpenRAG ",(0,a.jsx)(n.code,{children:".env"})," file"]}),"."]}),"\n",(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["To check for updates, open the TUI's ",(0,a.jsx)(n.strong,{children:"Status"})," menu (",(0,a.jsx)("kbd",{children:"3"}),"), and then click ",(0,a.jsx)(n.strong,{children:"Upgrade"}),"."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["If there is an update, stop all OpenRAG services.\nIn the ",(0,a.jsx)(n.strong,{children:"Status"})," menu, click ",(0,a.jsx)(n.strong,{children:"Stop Services"}),"."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Upgrade the OpenRAG Python package to the latest version from ",(0,a.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,a.jsxs)(i.A,{children:[(0,a.jsxs)(o.A,{value:"installer",label:"Script or uvx",default:!0,children:[(0,a.jsxs)(n.p,{children:["Use these steps to upgrade the Python package if you installed OpenRAG using the ",(0,a.jsx)(n.a,{href:"/install",children:"installer script"})," or ",(0,a.jsx)(n.a,{href:"/install-uvx",children:(0,a.jsx)(n.code,{children:"uvx"})}),":"]}),(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Navigate to your OpenRAG workspace directory:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"cd openrag-workspace\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Upgrade the OpenRAG package:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"uvx --from openrag openrag\n"})}),"\n",(0,a.jsxs)(n.p,{children:["You can invoke a specific version using any of the ",(0,a.jsxs)(n.a,{href:"https://docs.astral.sh/uv/guides/tools/#requesting-specific-versions",children:[(0,a.jsx)(n.code,{children:"uvx"})," version specifiers"]}),", such as ",(0,a.jsx)(n.code,{children:"--from"}),":"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"uvx --from openrag==0.1.30 openrag\n"})}),"\n"]}),"\n"]})]}),(0,a.jsxs)(o.A,{value:"uv-add",label:"uv add",children:[(0,a.jsxs)(n.p,{children:["Use these steps to upgrade the Python package if you installed OpenRAG with ",(0,a.jsx)(n.a,{href:"/install-uv",children:(0,a.jsx)(n.code,{children:"uv add"})}),":"]}),(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Navigate to your project directory:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"cd YOUR_PROJECT_NAME\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Update OpenRAG to the latest version:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"uv add --upgrade openrag\n"})}),"\n",(0,a.jsx)(n.p,{children:"To upgrade to a specific version:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"uv add --upgrade openrag==0.1.33\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Start the OpenRAG TUI:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"uv run openrag\n"})}),"\n"]}),"\n"]})]}),(0,a.jsxs)(o.A,{value:"uv-pip",label:"uv pip install",children:[(0,a.jsxs)(n.p,{children:["Use these steps to upgrade the Python package if you installed OpenRAG with ",(0,a.jsx)(n.a,{href:"/install-uv",children:(0,a.jsx)(n.code,{children:"uv pip install"})}),":"]}),(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Activate your virtual environment."}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Upgrade OpenRAG:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"uv pip install --upgrade openrag\n"})}),"\n",(0,a.jsx)(n.p,{children:"To upgrade to a specific version:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"uv pip install --upgrade openrag==0.1.33\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Start the OpenRAG TUI:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"uv run openrag\n"})}),"\n"]}),"\n"]})]})]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["In the OpenRAG TUI, click ",(0,a.jsx)(n.strong,{children:"Start All Services"}),", and then wait while the upgraded containers start."]}),"\n",(0,a.jsxs)(n.p,{children:["When you start services after upgrading the Python package, OpenRAG runs ",(0,a.jsx)(n.code,{children:"docker compose pull"})," to get the appropriate container images matching the version specified in your OpenRAG ",(0,a.jsx)(n.code,{children:".env"})," file. Then, it recreates the containers with the new images using ",(0,a.jsx)(n.code,{children:"docker compose up -d --force-recreate"}),"."]}),"\n",(0,a.jsxs)(n.admonition,{title:"Pin container versions",type:"tip",children:[(0,a.jsxs)(n.p,{children:["In the ",(0,a.jsx)(n.code,{children:".env"})," file, the ",(0,a.jsx)(n.code,{children:"OPENRAG_VERSION"})," ",(0,a.jsx)(n.a,{href:"/reference/configuration#system-settings",children:"environment variable"})," is set to ",(0,a.jsx)(n.code,{children:"latest"})," by default, which pulls the ",(0,a.jsx)(n.code,{children:"latest"})," available container images.\nTo pin a specific container image version, you can set ",(0,a.jsx)(n.code,{children:"OPENRAG_VERSION"})," to the desired container image version, such as ",(0,a.jsx)(n.code,{children:"OPENRAG_VERSION=0.1.33"}),"."]}),(0,a.jsxs)(n.p,{children:["However, when you upgrade the Python package, OpenRAG automatically attempts to keep the ",(0,a.jsx)(n.code,{children:"OPENRAG_VERSION"})," synchronized with the Python package version.\nYou might need to edit the ",(0,a.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,a.jsxs)(n.p,{children:["If you get an error that ",(0,a.jsx)(n.code,{children:"langflow container already exists"})," error during upgrade, see ",(0,a.jsx)(n.a,{href:"/support/troubleshoot#langflow-container-already-exists-during-upgrade",children:"Langflow container already exists during upgrade"}),"."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Under ",(0,a.jsx)(n.a,{href:"/manage-services",children:(0,a.jsx)(n.strong,{children:"Native Services"})}),", click ",(0,a.jsx)(n.strong,{children:"Start"})," to start the Docling service."]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["When the upgrade process is complete, you can close the ",(0,a.jsx)(n.strong,{children:"Status"})," window and continue using OpenRAG."]}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"upgrade-self-managed-containers",children:"Upgrade self-managed containers"}),"\n",(0,a.jsxs)(n.p,{children:["To fetch and apply the latest container images while preserving your OpenRAG data, run the commands for your container management tool.\nBy default, OpenRAG's ",(0,a.jsx)(n.code,{children:"docker-compose"})," files pull the latest container images."]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",metastring:'title="Docker"',children:"docker compose pull\ndocker compose up -d --force-recreate\n"})}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",metastring:'title="Podman"',children:"podman compose pull\npodman compose up -d --force-recreate\n"})}),"\n",(0,a.jsx)(n.h2,{id:"see-also",children:"See also"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"/manage-services",children:"Manage OpenRAG services"})}),"\n",(0,a.jsx)(n.li,{children:(0,a.jsx)(n.a,{href:"/support/troubleshoot",children:"Troubleshoot OpenRAG"})}),"\n"]})]})}function h(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(p,{...e})}):p(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>i,x:()=>o});var s=r(6540);const a={},t=s.createContext(a);function i(e){const n=s.useContext(t);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(a):e.components||a:i(e.components),s.createElement(t.Provider,{value:n},e.children)}},9365:(e,n,r)=>{r.d(n,{A:()=>i});r(6540);var s=r(4164);const a={tabItem:"tabItem_Ymn6"};var t=r(4848);function i({children:e,hidden:n,className:r}){return(0,t.jsx)("div",{role:"tabpanel",className:(0,s.A)(a.tabItem,r),hidden:n,children:e})}}}]);