diff --git a/404.html b/404.html index 2b40f763..aac92450 100644 --- a/404.html +++ b/404.html @@ -4,7 +4,7 @@ OpenRAG - + diff --git a/agents/index.html b/agents/index.html index c8cc83c4..77fc9616 100644 --- a/agents/index.html +++ b/agents/index.html @@ -3,15 +3,15 @@ -Langflow Agents | OpenRAG - +Langflow in OpenRAG | OpenRAG + -
Skip to main content

Langflow Agents

OpenRAG leverages Langflow's Agent component to power the OpenRAG OpenSearch Agent flow.

+

Langflow in OpenRAG

OpenRAG leverages Langflow's Agent component to power the OpenRAG OpenSearch Agent flow.

Flows in Langflow are functional representations of application workflows, with multiple component nodes connected as single steps in a workflow.

In the OpenRAG OpenSearch Agent flow, components like the Langflow Agent component and OpenSearch component are connected to intelligently chat with your knowledge by embedding your query, comparing it the vector database embeddings, and generating a response with the LLM.

OpenRAG Open Search Agent Flow

@@ -51,7 +51,7 @@ OpenRAG warns you that this discards all custom settings. Click Restore<
  • Langflow offers component bundles to integrate with many popular vector stores, AI/ML providers, and search APIs.

  • -
    diff --git a/assets/js/0ba6a408.17c091b7.js b/assets/js/0ba6a408.17c091b7.js new file mode 100644 index 00000000..cce72492 --- /dev/null +++ b/assets/js/0ba6a408.17c091b7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkopenrag_docs=self.webpackChunkopenrag_docs||[]).push([[571],{3227:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>u,contentTitle:()=>h,default:()=>x,frontMatter:()=>a,metadata:()=>i,toc:()=>p});const i=JSON.parse('{"id":"core-components/knowledge","title":"OpenSearch in OpenRAG","description":"OpenRAG uses OpenSearch for its vector-backed knowledge store.","source":"@site/docs/core-components/knowledge.mdx","sourceDirName":"core-components","slug":"/knowledge","permalink":"/knowledge","draft":false,"unlisted":false,"editUrl":"https://github.com/openrag/openrag/tree/main/docs/docs/core-components/knowledge.mdx","tags":[],"version":"current","frontMatter":{"title":"OpenSearch in OpenRAG","slug":"/knowledge"},"sidebar":"tutorialSidebar","previous":{"title":"Langflow in OpenRAG","permalink":"/agents"},"next":{"title":"Docling in OpenRAG","permalink":"/ingestion"}}');var t=s(4848),o=s(8453),r=s(9179),l=s(1470),d=s(9365),c=s(3782);const a={title:"OpenSearch in OpenRAG",slug:"/knowledge"},h=void 0,u={},p=[{value:"Authentication and document access",id:"auth",level:2},{value:"Ingest knowledge",id:"ingest-knowledge",level:2},{value:"Direct file ingestion",id:"direct-file-ingestion",level:3},{value:"Ingest files through OAuth connectors",id:"oauth-ingestion",level:3},{value:"Explore knowledge",id:"explore-knowledge",level:2},...c.RM,{value:"Create knowledge filters",id:"create-knowledge-filters",level:2},{value:"OpenRAG default configuration",id:"openrag-default-configuration",level:2}];function g(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:["OpenRAG uses ",(0,t.jsx)(n.a,{href:"https://docs.opensearch.org/latest/",children:"OpenSearch"})," for its vector-backed knowledge store.\nThis is a specialized database for storing and retrieving embeddings, which helps your Agent efficiently find relevant information.\nOpenSearch provides powerful hybrid search capabilities with enterprise-grade security and multi-tenancy support."]}),"\n",(0,t.jsx)(n.h2,{id:"auth",children:"Authentication and document access"}),"\n",(0,t.jsxs)(n.p,{children:["OpenRAG supports two authentication modes based on how you ",(0,t.jsx)(n.a,{href:"/install",children:"install OpenRAG"}),", and which mode you choose affects document access."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"No-auth mode (Basic Setup)"}),": This mode uses a single anonymous JWT token for OpenSearch authentication, so documents uploaded to the ",(0,t.jsx)(n.code,{children:"documents"})," index by one user are visible to all other users on the OpenRAG server."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"OAuth mode (Advanced Setup)"}),": Each OpenRAG user is granted a JWT token, and each document is tagged with user ownership. Documents are filtered by user ownership, ensuring users only see documents they uploaded or have access to."]}),"\n",(0,t.jsx)(n.h2,{id:"ingest-knowledge",children:"Ingest knowledge"}),"\n",(0,t.jsxs)(n.p,{children:["OpenRAG supports knowledge ingestion through direct file uploads and OAuth connectors.\nTo configure the knowledge ingestion pipeline parameters, see ",(0,t.jsx)(n.a,{href:"/ingestion",children:"Docling Ingestion"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"direct-file-ingestion",children:"Direct file ingestion"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.strong,{children:"Knowledge Ingest"})," flow uses Langflow's ",(0,t.jsxs)(n.a,{href:"https://docs.langflow.org/components-data#file",children:[(0,t.jsx)(n.strong,{children:"File"})," component"]})," to split and embed files loaded from your local machine into the OpenSearch database."]}),"\n",(0,t.jsxs)(n.p,{children:["The default path to your local folder is mounted from the ",(0,t.jsx)(n.code,{children:"./documents"})," folder in your OpenRAG project directory to the ",(0,t.jsx)(n.code,{children:"/app/documents/"})," directory inside the Docker container. Files added to the host or the container will be visible in both locations. To configure this location, modify the ",(0,t.jsx)(n.strong,{children:"Documents Paths"})," variable in either the TUI's ",(0,t.jsx)(n.a,{href:"/install#setup",children:"Advanced Setup"})," menu or in the ",(0,t.jsx)(n.code,{children:".env"})," used by Docker Compose."]}),"\n",(0,t.jsxs)(n.p,{children:["To load and process a single file from the mapped location, click ",(0,t.jsx)(r.A,{name:"Plus","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"Add Knowledge"}),", and then click ",(0,t.jsx)(n.strong,{children:"Add File"}),".\nThe file is loaded into your OpenSearch database, and appears in the Knowledge page."]}),"\n",(0,t.jsxs)(n.p,{children:["To load and process a directory from the mapped location, click ",(0,t.jsx)(r.A,{name:"Plus","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"Add Knowledge"}),", and then click ",(0,t.jsx)(n.strong,{children:"Process Folder"}),".\nThe files are loaded into your OpenSearch database, and appear in the Knowledge page."]}),"\n",(0,t.jsx)(n.h3,{id:"oauth-ingestion",children:"Ingest files through OAuth connectors"}),"\n",(0,t.jsx)(n.p,{children:"OpenRAG supports Google Drive, OneDrive, and Sharepoint as OAuth connectors for seamless document synchronization."}),"\n",(0,t.jsx)(n.p,{children:"OAuth integration allows individual users to connect their personal cloud storage accounts to OpenRAG. Each user must separately authorize OpenRAG to access their own cloud storage files. When a user connects a cloud service, they are redirected to authenticate with that service provider and grant OpenRAG permission to sync documents from their personal cloud storage."}),"\n",(0,t.jsx)(n.p,{children:"Before users can connect their cloud storage accounts, you must configure OAuth credentials in OpenRAG. This requires registering OpenRAG as an OAuth application with a cloud provider and obtaining client ID and secret keys for each service you want to support."}),"\n",(0,t.jsx)(n.p,{children:"To add an OAuth connector to OpenRAG, do the following.\nThis example uses Google OAuth.\nIf you wish to use another provider, add the secrets to another provider."}),"\n",(0,t.jsxs)(l.A,{groupId:"Installation type",children:[(0,t.jsx)(d.A,{value:"TUI",label:"TUI",default:!0,children:(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["If OpenRAG is running, stop it with ",(0,t.jsx)(n.strong,{children:"Status"})," > ",(0,t.jsx)(n.strong,{children:"Stop Services"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["Click ",(0,t.jsx)(n.strong,{children:"Advanced Setup"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["Add the OAuth provider's client and secret key in the ",(0,t.jsx)(n.a,{href:"/install#setup",children:"Advanced Setup"})," menu."]}),"\n",(0,t.jsxs)(n.li,{children:["Click ",(0,t.jsx)(n.strong,{children:"Save Configuration"}),".\nThe TUI generates a new ",(0,t.jsx)(n.code,{children:".env"})," file with your OAuth values."]}),"\n",(0,t.jsxs)(n.li,{children:["Click ",(0,t.jsx)(n.strong,{children:"Start Container Services"}),"."]}),"\n"]})}),(0,t.jsxs)(d.A,{value:".env",label:".env",children:[(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsx)(n.li,{children:"Stop the Docker deployment."}),"\n",(0,t.jsxs)(n.li,{children:["Add the OAuth provider's client and secret key in the ",(0,t.jsx)(n.code,{children:".env"})," file for Docker Compose."]}),"\n"]}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"GOOGLE_OAUTH_CLIENT_ID='YOUR_OAUTH_CLIENT_ID'\nGOOGLE_OAUTH_CLIENT_SECRET='YOUR_OAUTH_CLIENT_SECRET'\n"})}),(0,t.jsxs)(n.ol,{start:"3",children:["\n",(0,t.jsxs)(n.li,{children:["Save your ",(0,t.jsx)(n.code,{children:".env"}),". file."]}),"\n",(0,t.jsx)(n.li,{children:"Start the Docker deployment."}),"\n"]})]})]}),"\n",(0,t.jsxs)(n.p,{children:["The OpenRAG frontend at ",(0,t.jsx)(n.code,{children:"http://localhost:3000"})," now redirects to an OAuth callback login page for your OAuth provider.\nA successful authentication opens OpenRAG with the required scopes for your connected storage."]}),"\n",(0,t.jsx)(n.p,{children:"To add knowledge from an OAuth-connected storage provider, do the following:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["Click ",(0,t.jsx)(r.A,{name:"Plus","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"Add Knowledge"}),", and then select the storage provider, for example, ",(0,t.jsx)(n.strong,{children:"Google Drive"}),".\nThe ",(0,t.jsx)(n.strong,{children:"Add Cloud Knowledge"})," page opens."]}),"\n",(0,t.jsxs)(n.li,{children:["To add files or folders from the connected storage, click ",(0,t.jsx)(r.A,{name:"Plus","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"Add Files"}),".\nSelect the files or folders you want and click ",(0,t.jsx)(n.strong,{children:"Select"}),".\nYou can select multiples."]}),"\n",(0,t.jsxs)(n.li,{children:["When your files are selected, click ",(0,t.jsx)(n.strong,{children:"Ingest Files"}),".\nThe ingestion process may take some time, depending on the size of your documents."]}),"\n",(0,t.jsx)(n.li,{children:"When ingestion is complete, your documents are available in the Knowledge screen."}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"explore-knowledge",children:"Explore knowledge"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.strong,{children:"Knowledge"})," page lists the documents OpenRAG has ingested into the OpenSearch vector database's ",(0,t.jsx)(n.code,{children:"documents"})," index."]}),"\n",(0,t.jsxs)(n.p,{children:["To explore your current knowledge, click ",(0,t.jsx)(r.A,{name:"Library","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"Knowledge"}),".\nClick on a document to display the chunks derived from splitting the default documents into the vector database."]}),"\n",(0,t.jsxs)(n.p,{children:["Documents are processed with the default ",(0,t.jsx)(n.strong,{children:"Knowledge Ingest"})," flow, so if you want to split your documents differently, edit the ",(0,t.jsx)(n.strong,{children:"Knowledge Ingest"})," flow."]}),"\n",(0,t.jsx)(c.Ay,{}),"\n",(0,t.jsx)(n.h2,{id:"create-knowledge-filters",children:"Create knowledge filters"}),"\n",(0,t.jsx)(n.p,{children:"OpenRAG includes a knowledge filter system for organizing and managing document collections.\nKnowledge filters are saved search configurations that allow you to create custom views of your document collection. They store search queries, filter criteria, and display settings that can be reused across different parts of OpenRAG."}),"\n",(0,t.jsx)(n.p,{children:"Knowledge filters help agents work more efficiently with large document collections by focusing their context within relevant documents sets."}),"\n",(0,t.jsx)(n.p,{children:"To create a knowledge filter, do the following:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Click ",(0,t.jsx)(r.A,{name:"Funnel","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"All Knowledge"}),", and then click ",(0,t.jsx)(r.A,{name:"Plus","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"Create New Filter"}),".\nThe ",(0,t.jsx)(n.strong,{children:"Create New Knowledge Filter"})," pane appears."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Enter a ",(0,t.jsx)(n.strong,{children:"Name"})," and ",(0,t.jsx)(n.strong,{children:"Description"}),", and then click ",(0,t.jsx)(r.A,{name:"Save","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"Create Filter"}),".\nA new filter is created with default settings that match everything."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["To modify the default filter, click ",(0,t.jsx)(r.A,{name:"Funnel","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"All Knowledge"}),", and then click your new filter to edit it in the ",(0,t.jsx)(n.strong,{children:"Knowledge Filter"})," pane."]}),"\n",(0,t.jsx)(n.p,{children:"The following filter options are configurable."}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Search Query"}),': Enter text for semantic search, such as "financial reports from Q4".']}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Data Sources"}),": Select specific data sources or folders to include."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Document Types"}),": Filter by file type."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Owners"}),": Filter by who uploaded the documents."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Sources"}),": Filter by connector types, such as local upload or Google Drive."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Result Limit"}),": Set maximum number of results. The default is ",(0,t.jsx)(n.code,{children:"10"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Score Threshold"}),": Set minimum relevance score. The default score is ",(0,t.jsx)(n.code,{children:"0"}),"."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["When you're done editing the filter, click ",(0,t.jsx)(r.A,{name:"Save","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"Save Configuration"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["To apply the filter to OpenRAG globally, click ",(0,t.jsx)(r.A,{name:"Funnel","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"All Knowledge"}),", and then select the filter to apply."]}),"\n",(0,t.jsxs)(n.p,{children:["To apply the filter to a single chat session, in the ",(0,t.jsx)(r.A,{name:"MessageSquare","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"Chat"})," window, click ",(0,t.jsx)(n.strong,{children:"@"}),", and then select the filter to apply."]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"openrag-default-configuration",children:"OpenRAG default configuration"}),"\n",(0,t.jsx)(n.p,{children:"OpenRAG automatically detects and configures the correct vector dimensions for embedding models, ensuring optimal search performance and compatibility."}),"\n",(0,t.jsxs)(n.p,{children:["The complete list of supported models is available at ",(0,t.jsxs)(n.a,{href:"https://github.com/langflow-ai/openrag/blob/main/src/services/models_service.py",children:[(0,t.jsx)(n.code,{children:"models_service.py"})," in the OpenRAG repository"]}),"."]}),"\n",(0,t.jsx)(n.p,{children:"You can use custom embedding models by specifying them in your configuration."}),"\n",(0,t.jsxs)(n.p,{children:["If you use an unknown embedding model, OpenRAG will automatically fall back to ",(0,t.jsx)(n.code,{children:"1536"})," dimensions and log a warning. The system will continue to work, but search quality may be affected if the actual model dimensions differ from ",(0,t.jsx)(n.code,{children:"1536"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["The default embedding dimension is ",(0,t.jsx)(n.code,{children:"1536"})," and the default model is ",(0,t.jsx)(n.code,{children:"text-embedding-3-small"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["For models with known vector dimensions, see ",(0,t.jsxs)(n.a,{href:"https://github.com/langflow-ai/openrag/blob/main/src/config/settings.py",children:[(0,t.jsx)(n.code,{children:"settings.py"})," in the OpenRAG repository"]}),"."]})]})}function x(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(g,{...e})}):g(e)}},3782:(e,n,s)=>{s.d(n,{Ay:()=>d,RM:()=>r});var i=s(4848),t=s(8453),o=s(9179);const r=[];function l(e){const n={a:"a",p:"p",strong:"strong",...(0,t.R)(),...e.components};return(0,i.jsxs)(n.p,{children:["All flows included with OpenRAG are designed to be modular, performant, and provider-agnostic.\nTo modify a flow, click ",(0,i.jsx)(o.A,{name:"Settings2","aria-hidden":"true"})," ",(0,i.jsx)(n.strong,{children:"Settings"}),", and click ",(0,i.jsx)(n.strong,{children:"Edit in Langflow"}),".\nOpenRAG's visual editor is based on the ",(0,i.jsx)(n.a,{href:"https://docs.langflow.org/concepts-overview",children:"Langflow visual editor"}),", so you can edit your flows to match your specific use case."]})}function d(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},9179:(e,n,s)=>{s.d(n,{A:()=>o});s(6540);var i=s(4827),t=s(4848);function o({name:e,...n}){const s=i[e];return s?(0,t.jsx)(s,{...n}):null}}}]); \ No newline at end of file diff --git a/assets/js/0ba6a408.eb57b569.js b/assets/js/0ba6a408.eb57b569.js deleted file mode 100644 index acf74e9f..00000000 --- a/assets/js/0ba6a408.eb57b569.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkopenrag_docs=self.webpackChunkopenrag_docs||[]).push([[571],{3227:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>u,contentTitle:()=>h,default:()=>x,frontMatter:()=>a,metadata:()=>i,toc:()=>p});const i=JSON.parse('{"id":"core-components/knowledge","title":"OpenSearch Knowledge","description":"OpenRAG uses OpenSearch for its vector-backed knowledge store.","source":"@site/docs/core-components/knowledge.mdx","sourceDirName":"core-components","slug":"/knowledge","permalink":"/knowledge","draft":false,"unlisted":false,"editUrl":"https://github.com/openrag/openrag/tree/main/docs/docs/core-components/knowledge.mdx","tags":[],"version":"current","frontMatter":{"title":"OpenSearch Knowledge","slug":"/knowledge"},"sidebar":"tutorialSidebar","previous":{"title":"Langflow Agents","permalink":"/agents"},"next":{"title":"Docling Ingestion","permalink":"/ingestion"}}');var t=s(4848),o=s(8453),r=s(9179),l=s(1470),d=s(9365),c=s(3782);const a={title:"OpenSearch Knowledge",slug:"/knowledge"},h=void 0,u={},p=[{value:"Authentication and document access",id:"auth",level:2},{value:"Ingest knowledge",id:"ingest-knowledge",level:2},{value:"Direct file ingestion",id:"direct-file-ingestion",level:3},{value:"Ingest files through OAuth connectors",id:"oauth-ingestion",level:3},{value:"Explore knowledge",id:"explore-knowledge",level:2},...c.RM,{value:"Create knowledge filters",id:"create-knowledge-filters",level:2},{value:"OpenRAG default configuration",id:"openrag-default-configuration",level:2}];function g(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:["OpenRAG uses ",(0,t.jsx)(n.a,{href:"https://docs.opensearch.org/latest/",children:"OpenSearch"})," for its vector-backed knowledge store.\nThis is a specialized database for storing and retrieving embeddings, which helps your Agent efficiently find relevant information.\nOpenSearch provides powerful hybrid search capabilities with enterprise-grade security and multi-tenancy support."]}),"\n",(0,t.jsx)(n.h2,{id:"auth",children:"Authentication and document access"}),"\n",(0,t.jsxs)(n.p,{children:["OpenRAG supports two authentication modes based on how you ",(0,t.jsx)(n.a,{href:"/install",children:"install OpenRAG"}),", and which mode you choose affects document access."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"No-auth mode (Basic Setup)"}),": This mode uses a single anonymous JWT token for OpenSearch authentication, so documents uploaded to the ",(0,t.jsx)(n.code,{children:"documents"})," index by one user are visible to all other users on the OpenRAG server."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"OAuth mode (Advanced Setup)"}),": Each OpenRAG user is granted a JWT token, and each document is tagged with user ownership. Documents are filtered by user ownership, ensuring users only see documents they uploaded or have access to."]}),"\n",(0,t.jsx)(n.h2,{id:"ingest-knowledge",children:"Ingest knowledge"}),"\n",(0,t.jsxs)(n.p,{children:["OpenRAG supports knowledge ingestion through direct file uploads and OAuth connectors.\nTo configure the knowledge ingestion pipeline parameters, see ",(0,t.jsx)(n.a,{href:"/ingestion",children:"Docling Ingestion"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"direct-file-ingestion",children:"Direct file ingestion"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.strong,{children:"Knowledge Ingest"})," flow uses Langflow's ",(0,t.jsxs)(n.a,{href:"https://docs.langflow.org/components-data#file",children:[(0,t.jsx)(n.strong,{children:"File"})," component"]})," to split and embed files loaded from your local machine into the OpenSearch database."]}),"\n",(0,t.jsxs)(n.p,{children:["The default path to your local folder is mounted from the ",(0,t.jsx)(n.code,{children:"./documents"})," folder in your OpenRAG project directory to the ",(0,t.jsx)(n.code,{children:"/app/documents/"})," directory inside the Docker container. Files added to the host or the container will be visible in both locations. To configure this location, modify the ",(0,t.jsx)(n.strong,{children:"Documents Paths"})," variable in either the TUI's ",(0,t.jsx)(n.a,{href:"/install#setup",children:"Advanced Setup"})," menu or in the ",(0,t.jsx)(n.code,{children:".env"})," used by Docker Compose."]}),"\n",(0,t.jsxs)(n.p,{children:["To load and process a single file from the mapped location, click ",(0,t.jsx)(r.A,{name:"Plus","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"Add Knowledge"}),", and then click ",(0,t.jsx)(n.strong,{children:"Add File"}),".\nThe file is loaded into your OpenSearch database, and appears in the Knowledge page."]}),"\n",(0,t.jsxs)(n.p,{children:["To load and process a directory from the mapped location, click ",(0,t.jsx)(r.A,{name:"Plus","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"Add Knowledge"}),", and then click ",(0,t.jsx)(n.strong,{children:"Process Folder"}),".\nThe files are loaded into your OpenSearch database, and appear in the Knowledge page."]}),"\n",(0,t.jsx)(n.h3,{id:"oauth-ingestion",children:"Ingest files through OAuth connectors"}),"\n",(0,t.jsx)(n.p,{children:"OpenRAG supports Google Drive, OneDrive, and Sharepoint as OAuth connectors for seamless document synchronization."}),"\n",(0,t.jsx)(n.p,{children:"OAuth integration allows individual users to connect their personal cloud storage accounts to OpenRAG. Each user must separately authorize OpenRAG to access their own cloud storage files. When a user connects a cloud service, they are redirected to authenticate with that service provider and grant OpenRAG permission to sync documents from their personal cloud storage."}),"\n",(0,t.jsx)(n.p,{children:"Before users can connect their cloud storage accounts, you must configure OAuth credentials in OpenRAG. This requires registering OpenRAG as an OAuth application with a cloud provider and obtaining client ID and secret keys for each service you want to support."}),"\n",(0,t.jsx)(n.p,{children:"To add an OAuth connector to OpenRAG, do the following.\nThis example uses Google OAuth.\nIf you wish to use another provider, add the secrets to another provider."}),"\n",(0,t.jsxs)(l.A,{groupId:"Installation type",children:[(0,t.jsx)(d.A,{value:"TUI",label:"TUI",default:!0,children:(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["If OpenRAG is running, stop it with ",(0,t.jsx)(n.strong,{children:"Status"})," > ",(0,t.jsx)(n.strong,{children:"Stop Services"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["Click ",(0,t.jsx)(n.strong,{children:"Advanced Setup"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["Add the OAuth provider's client and secret key in the ",(0,t.jsx)(n.a,{href:"/install#setup",children:"Advanced Setup"})," menu."]}),"\n",(0,t.jsxs)(n.li,{children:["Click ",(0,t.jsx)(n.strong,{children:"Save Configuration"}),".\nThe TUI generates a new ",(0,t.jsx)(n.code,{children:".env"})," file with your OAuth values."]}),"\n",(0,t.jsxs)(n.li,{children:["Click ",(0,t.jsx)(n.strong,{children:"Start Container Services"}),"."]}),"\n"]})}),(0,t.jsxs)(d.A,{value:".env",label:".env",children:[(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsx)(n.li,{children:"Stop the Docker deployment."}),"\n",(0,t.jsxs)(n.li,{children:["Add the OAuth provider's client and secret key in the ",(0,t.jsx)(n.code,{children:".env"})," file for Docker Compose."]}),"\n"]}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"GOOGLE_OAUTH_CLIENT_ID='YOUR_OAUTH_CLIENT_ID'\nGOOGLE_OAUTH_CLIENT_SECRET='YOUR_OAUTH_CLIENT_SECRET'\n"})}),(0,t.jsxs)(n.ol,{start:"3",children:["\n",(0,t.jsxs)(n.li,{children:["Save your ",(0,t.jsx)(n.code,{children:".env"}),". file."]}),"\n",(0,t.jsx)(n.li,{children:"Start the Docker deployment."}),"\n"]})]})]}),"\n",(0,t.jsxs)(n.p,{children:["The OpenRAG frontend at ",(0,t.jsx)(n.code,{children:"http://localhost:3000"})," now redirects to an OAuth callback login page for your OAuth provider.\nA successful authentication opens OpenRAG with the required scopes for your connected storage."]}),"\n",(0,t.jsx)(n.p,{children:"To add knowledge from an OAuth-connected storage provider, do the following:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["Click ",(0,t.jsx)(r.A,{name:"Plus","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"Add Knowledge"}),", and then select the storage provider, for example, ",(0,t.jsx)(n.strong,{children:"Google Drive"}),".\nThe ",(0,t.jsx)(n.strong,{children:"Add Cloud Knowledge"})," page opens."]}),"\n",(0,t.jsxs)(n.li,{children:["To add files or folders from the connected storage, click ",(0,t.jsx)(r.A,{name:"Plus","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"Add Files"}),".\nSelect the files or folders you want and click ",(0,t.jsx)(n.strong,{children:"Select"}),".\nYou can select multiples."]}),"\n",(0,t.jsxs)(n.li,{children:["When your files are selected, click ",(0,t.jsx)(n.strong,{children:"Ingest Files"}),".\nThe ingestion process may take some time, depending on the size of your documents."]}),"\n",(0,t.jsx)(n.li,{children:"When ingestion is complete, your documents are available in the Knowledge screen."}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"explore-knowledge",children:"Explore knowledge"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.strong,{children:"Knowledge"})," page lists the documents OpenRAG has ingested into the OpenSearch vector database's ",(0,t.jsx)(n.code,{children:"documents"})," index."]}),"\n",(0,t.jsxs)(n.p,{children:["To explore your current knowledge, click ",(0,t.jsx)(r.A,{name:"Library","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"Knowledge"}),".\nClick on a document to display the chunks derived from splitting the default documents into the vector database."]}),"\n",(0,t.jsxs)(n.p,{children:["Documents are processed with the default ",(0,t.jsx)(n.strong,{children:"Knowledge Ingest"})," flow, so if you want to split your documents differently, edit the ",(0,t.jsx)(n.strong,{children:"Knowledge Ingest"})," flow."]}),"\n",(0,t.jsx)(c.Ay,{}),"\n",(0,t.jsx)(n.h2,{id:"create-knowledge-filters",children:"Create knowledge filters"}),"\n",(0,t.jsx)(n.p,{children:"OpenRAG includes a knowledge filter system for organizing and managing document collections.\nKnowledge filters are saved search configurations that allow you to create custom views of your document collection. They store search queries, filter criteria, and display settings that can be reused across different parts of OpenRAG."}),"\n",(0,t.jsx)(n.p,{children:"Knowledge filters help agents work more efficiently with large document collections by focusing their context within relevant documents sets."}),"\n",(0,t.jsx)(n.p,{children:"To create a knowledge filter, do the following:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Click ",(0,t.jsx)(r.A,{name:"Funnel","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"All Knowledge"}),", and then click ",(0,t.jsx)(r.A,{name:"Plus","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"Create New Filter"}),".\nThe ",(0,t.jsx)(n.strong,{children:"Create New Knowledge Filter"})," pane appears."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Enter a ",(0,t.jsx)(n.strong,{children:"Name"})," and ",(0,t.jsx)(n.strong,{children:"Description"}),", and then click ",(0,t.jsx)(r.A,{name:"Save","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"Create Filter"}),".\nA new filter is created with default settings that match everything."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["To modify the default filter, click ",(0,t.jsx)(r.A,{name:"Funnel","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"All Knowledge"}),", and then click your new filter to edit it in the ",(0,t.jsx)(n.strong,{children:"Knowledge Filter"})," pane."]}),"\n",(0,t.jsx)(n.p,{children:"The following filter options are configurable."}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Search Query"}),': Enter text for semantic search, such as "financial reports from Q4".']}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Data Sources"}),": Select specific data sources or folders to include."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Document Types"}),": Filter by file type."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Owners"}),": Filter by who uploaded the documents."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Sources"}),": Filter by connector types, such as local upload or Google Drive."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Result Limit"}),": Set maximum number of results. The default is ",(0,t.jsx)(n.code,{children:"10"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Score Threshold"}),": Set minimum relevance score. The default score is ",(0,t.jsx)(n.code,{children:"0"}),"."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["When you're done editing the filter, click ",(0,t.jsx)(r.A,{name:"Save","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"Save Configuration"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["To apply the filter to OpenRAG globally, click ",(0,t.jsx)(r.A,{name:"Funnel","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"All Knowledge"}),", and then select the filter to apply."]}),"\n",(0,t.jsxs)(n.p,{children:["To apply the filter to a single chat session, in the ",(0,t.jsx)(r.A,{name:"MessageSquare","aria-hidden":"true"})," ",(0,t.jsx)(n.strong,{children:"Chat"})," window, click ",(0,t.jsx)(n.strong,{children:"@"}),", and then select the filter to apply."]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"openrag-default-configuration",children:"OpenRAG default configuration"}),"\n",(0,t.jsx)(n.p,{children:"OpenRAG automatically detects and configures the correct vector dimensions for embedding models, ensuring optimal search performance and compatibility."}),"\n",(0,t.jsxs)(n.p,{children:["The complete list of supported models is available at ",(0,t.jsxs)(n.a,{href:"https://github.com/langflow-ai/openrag/blob/main/src/services/models_service.py",children:[(0,t.jsx)(n.code,{children:"models_service.py"})," in the OpenRAG repository"]}),"."]}),"\n",(0,t.jsx)(n.p,{children:"You can use custom embedding models by specifying them in your configuration."}),"\n",(0,t.jsxs)(n.p,{children:["If you use an unknown embedding model, OpenRAG will automatically fall back to ",(0,t.jsx)(n.code,{children:"1536"})," dimensions and log a warning. The system will continue to work, but search quality may be affected if the actual model dimensions differ from ",(0,t.jsx)(n.code,{children:"1536"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["The default embedding dimension is ",(0,t.jsx)(n.code,{children:"1536"})," and the default model is ",(0,t.jsx)(n.code,{children:"text-embedding-3-small"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:["For models with known vector dimensions, see ",(0,t.jsxs)(n.a,{href:"https://github.com/langflow-ai/openrag/blob/main/src/config/settings.py",children:[(0,t.jsx)(n.code,{children:"settings.py"})," in the OpenRAG repository"]}),"."]})]})}function x(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(g,{...e})}):g(e)}},3782:(e,n,s)=>{s.d(n,{Ay:()=>d,RM:()=>r});var i=s(4848),t=s(8453),o=s(9179);const r=[];function l(e){const n={a:"a",p:"p",strong:"strong",...(0,t.R)(),...e.components};return(0,i.jsxs)(n.p,{children:["All flows included with OpenRAG are designed to be modular, performant, and provider-agnostic.\nTo modify a flow, click ",(0,i.jsx)(o.A,{name:"Settings2","aria-hidden":"true"})," ",(0,i.jsx)(n.strong,{children:"Settings"}),", and click ",(0,i.jsx)(n.strong,{children:"Edit in Langflow"}),".\nOpenRAG's visual editor is based on the ",(0,i.jsx)(n.a,{href:"https://docs.langflow.org/concepts-overview",children:"Langflow visual editor"}),", so you can edit your flows to match your specific use case."]})}function d(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(l,{...e})}):l(e)}},9179:(e,n,s)=>{s.d(n,{A:()=>o});s(6540);var i=s(4827),t=s(4848);function o({name:e,...n}){const s=i[e];return s?(0,t.jsx)(s,{...n}):null}}}]); \ No newline at end of file diff --git a/assets/js/21afe7ac.e09a4f35.js b/assets/js/21afe7ac.e09a4f35.js deleted file mode 100644 index 8c21f34f..00000000 --- a/assets/js/21afe7ac.e09a4f35.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkopenrag_docs=self.webpackChunkopenrag_docs||[]).push([[961],{5689:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/OpenRAG_TUI_2025-09-10T13_04_11_757637-9441c53ba39162a88ac6c11cbeaed0e0.svg"},6239:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>o,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"get-started/tui","title":"Terminal User Interface (TUI) commands","description":"The OpenRAG Terminal User Interface (TUI) allows you to set up, configure, and monitor your OpenRAG deployment directly from the terminal, on any operating system.","source":"@site/docs/get-started/tui.mdx","sourceDirName":"get-started","slug":"/get-started/tui","permalink":"/get-started/tui","draft":false,"unlisted":false,"editUrl":"https://github.com/openrag/openrag/tree/main/docs/docs/get-started/tui.mdx","tags":[],"version":"current","frontMatter":{"title":"Terminal User Interface (TUI) commands","slug":"/get-started/tui"},"sidebar":"tutorialSidebar","previous":{"title":"Quickstart","permalink":"/quickstart"},"next":{"title":"Langflow Agents","permalink":"/agents"}}');var r=t(4848),i=t(8453);const o={title:"Terminal User Interface (TUI) commands",slug:"/get-started/tui"},a=void 0,c={},d=[{value:"Start the TUI",id:"start-the-tui",level:2},{value:"Navigation",id:"navigation",level:2},{value:"Container management",id:"container-management",level:2},{value:"Start container services",id:"start-container-services",level:3},{value:"Start native services",id:"start-native-services",level:3},{value:"Status",id:"status",level:3},{value:"Diagnostics",id:"diagnostics",level:2}];function l(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.p,{children:"The OpenRAG Terminal User Interface (TUI) allows you to set up, configure, and monitor your OpenRAG deployment directly from the terminal, on any operating system."}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"OpenRAG TUI Interface",src:t(5689).A+"",width:"1995",height:"1099"})}),"\n",(0,r.jsxs)(n.p,{children:["Instead of starting OpenRAG using Docker commands and manually editing values in the ",(0,r.jsx)(n.code,{children:".env"})," file, the TUI walks you through the setup. It prompts for variables where required, creates a ",(0,r.jsx)(n.code,{children:".env"})," file for you, and then starts OpenRAG."]}),"\n",(0,r.jsx)(n.p,{children:"Once OpenRAG is running, use the TUI to monitor your application, control your containers, and retrieve logs."}),"\n",(0,r.jsx)(n.h2,{id:"start-the-tui",children:"Start the TUI"}),"\n",(0,r.jsx)(n.p,{children:"To start the TUI, run the following commands from the directory where you installed OpenRAG."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"uv sync\nuv run openrag\n"})}),"\n",(0,r.jsxs)(n.p,{children:["The TUI Welcome Screen offers basic and advanced setup options.\nFor more information on setup values during installation, see ",(0,r.jsx)(n.a,{href:"/install",children:"Install OpenRAG"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"navigation",children:"Navigation"}),"\n",(0,r.jsx)(n.p,{children:"The TUI accepts mouse input or keyboard commands."}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)("kbd",{children:"Arrow keys"}),": move between options"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)("kbd",{children:"Tab"}),"/",(0,r.jsx)("kbd",{children:"Shift+Tab"}),": switch fields and buttons"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)("kbd",{children:"Enter"}),": select/confirm"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)("kbd",{children:"Escape"}),": back"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)("kbd",{children:"Q"}),": quit"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)("kbd",{children:"Number keys (1-4)"}),": quick access to main screens"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"container-management",children:"Container management"}),"\n",(0,r.jsx)(n.p,{children:"The TUI can deploy, manage, and upgrade your OpenRAG containers."}),"\n",(0,r.jsx)(n.h3,{id:"start-container-services",children:"Start container services"}),"\n",(0,r.jsxs)(n.p,{children:["Click ",(0,r.jsx)(n.strong,{children:"Start Container Services"})," to start the OpenRAG containers.\nThe TUI automatically detects your container runtime, and then checks if your machine has compatible GPU support by checking for ",(0,r.jsx)(n.code,{children:"CUDA"}),", ",(0,r.jsx)(n.code,{children:"NVIDIA_SMI"}),", and Docker/Podman runtime support. This check determines which Docker Compose file OpenRAG uses.\nThe TUI then pulls the images and deploys the containers with the following command."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"docker compose up -d\n"})}),"\n",(0,r.jsxs)(n.p,{children:["If images are missing, the TUI runs ",(0,r.jsx)(n.code,{children:"docker compose pull"}),", then runs ",(0,r.jsx)(n.code,{children:"docker compose up -d"}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"start-native-services",children:"Start native services"}),"\n",(0,r.jsxs)(n.p,{children:['A "native" service in OpenRAG refers to a service run natively on your machine, and not within a container.\nThe ',(0,r.jsx)(n.code,{children:"docling serve"})," process is a native service in OpenRAG, because it's a document processing service that is run on your local machine, and controlled separately from the containers."]}),"\n",(0,r.jsxs)(n.p,{children:["To start or stop ",(0,r.jsx)(n.code,{children:"docling serve"})," or any other native services, in the TUI main menu, click ",(0,r.jsx)(n.strong,{children:"Start Native Services"})," or ",(0,r.jsx)(n.strong,{children:"Stop Native Services"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["To view the status, port, or PID of a native service, in the TUI main menu, click ",(0,r.jsx)(n.a,{href:"#status",children:"Status"}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"status",children:"Status"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Status"})," menu displays information on your container deployment.\nHere you can check container health, find your service ports, view logs, and upgrade your containers."]}),"\n",(0,r.jsxs)(n.p,{children:["To view streaming logs, select the container you want to view, and press ",(0,r.jsx)("kbd",{children:"l"}),".\nTo copy your logs, click ",(0,r.jsx)(n.strong,{children:"Copy to Clipboard"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["To ",(0,r.jsx)(n.strong,{children:"upgrade"})," your containers, click ",(0,r.jsx)(n.strong,{children:"Upgrade"}),".\n",(0,r.jsx)(n.strong,{children:"Upgrade"})," runs ",(0,r.jsx)(n.code,{children:"docker compose pull"})," and then ",(0,r.jsx)(n.code,{children:"docker compose up -d --force-recreate"}),".\nThe first command pulls the latest images of OpenRAG.\nThe second command recreates the containers with your data persisted."]}),"\n",(0,r.jsxs)(n.p,{children:["To ",(0,r.jsx)(n.strong,{children:"reset"})," your containers, click ",(0,r.jsx)(n.strong,{children:"Reset"}),".\nReset gives you a completely fresh start.\nReset deletes all of your data, including OpenSearch data, uploaded documents, and authentication.\n",(0,r.jsx)(n.strong,{children:"Reset"})," runs two commands.\nIt first stops and removes all containers, volumes, and local images."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"docker compose down --volumes --remove-orphans --rmi local\n"})}),"\n",(0,r.jsxs)(n.p,{children:["When the first command is complete, OpenRAG removes any additional Docker objects with ",(0,r.jsx)(n.code,{children:"prune"}),"."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"docker system prune -f\n"})}),"\n",(0,r.jsx)(n.h2,{id:"diagnostics",children:"Diagnostics"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Diagnostics"})," menu provides health monitoring for your container runtimes and monitoring of your OpenSearch security."]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>a});var s=t(6540);const r={},i=s.createContext(r);function o(e){const n=s.useContext(i);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/21afe7ac.e40588c0.js b/assets/js/21afe7ac.e40588c0.js new file mode 100644 index 00000000..fcb10b85 --- /dev/null +++ b/assets/js/21afe7ac.e40588c0.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkopenrag_docs=self.webpackChunkopenrag_docs||[]).push([[961],{5689:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/OpenRAG_TUI_2025-09-10T13_04_11_757637-9441c53ba39162a88ac6c11cbeaed0e0.svg"},6239:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>c,contentTitle:()=>a,default:()=>h,frontMatter:()=>o,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"get-started/tui","title":"Terminal User Interface (TUI) commands","description":"The OpenRAG Terminal User Interface (TUI) allows you to set up, configure, and monitor your OpenRAG deployment directly from the terminal, on any operating system.","source":"@site/docs/get-started/tui.mdx","sourceDirName":"get-started","slug":"/get-started/tui","permalink":"/get-started/tui","draft":false,"unlisted":false,"editUrl":"https://github.com/openrag/openrag/tree/main/docs/docs/get-started/tui.mdx","tags":[],"version":"current","frontMatter":{"title":"Terminal User Interface (TUI) commands","slug":"/get-started/tui"},"sidebar":"tutorialSidebar","previous":{"title":"Quickstart","permalink":"/quickstart"},"next":{"title":"Langflow in OpenRAG","permalink":"/agents"}}');var r=t(4848),i=t(8453);const o={title:"Terminal User Interface (TUI) commands",slug:"/get-started/tui"},a=void 0,c={},d=[{value:"Start the TUI",id:"start-the-tui",level:2},{value:"Navigation",id:"navigation",level:2},{value:"Container management",id:"container-management",level:2},{value:"Start container services",id:"start-container-services",level:3},{value:"Start native services",id:"start-native-services",level:3},{value:"Status",id:"status",level:3},{value:"Diagnostics",id:"diagnostics",level:2}];function l(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.p,{children:"The OpenRAG Terminal User Interface (TUI) allows you to set up, configure, and monitor your OpenRAG deployment directly from the terminal, on any operating system."}),"\n",(0,r.jsx)(n.p,{children:(0,r.jsx)(n.img,{alt:"OpenRAG TUI Interface",src:t(5689).A+"",width:"1995",height:"1099"})}),"\n",(0,r.jsxs)(n.p,{children:["Instead of starting OpenRAG using Docker commands and manually editing values in the ",(0,r.jsx)(n.code,{children:".env"})," file, the TUI walks you through the setup. It prompts for variables where required, creates a ",(0,r.jsx)(n.code,{children:".env"})," file for you, and then starts OpenRAG."]}),"\n",(0,r.jsx)(n.p,{children:"Once OpenRAG is running, use the TUI to monitor your application, control your containers, and retrieve logs."}),"\n",(0,r.jsx)(n.h2,{id:"start-the-tui",children:"Start the TUI"}),"\n",(0,r.jsx)(n.p,{children:"To start the TUI, run the following commands from the directory where you installed OpenRAG."}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"uv sync\nuv run openrag\n"})}),"\n",(0,r.jsxs)(n.p,{children:["The TUI Welcome Screen offers basic and advanced setup options.\nFor more information on setup values during installation, see ",(0,r.jsx)(n.a,{href:"/install",children:"Install OpenRAG"}),"."]}),"\n",(0,r.jsx)(n.h2,{id:"navigation",children:"Navigation"}),"\n",(0,r.jsx)(n.p,{children:"The TUI accepts mouse input or keyboard commands."}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)("kbd",{children:"Arrow keys"}),": move between options"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)("kbd",{children:"Tab"}),"/",(0,r.jsx)("kbd",{children:"Shift+Tab"}),": switch fields and buttons"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)("kbd",{children:"Enter"}),": select/confirm"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)("kbd",{children:"Escape"}),": back"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)("kbd",{children:"Q"}),": quit"]}),"\n",(0,r.jsxs)(n.li,{children:[(0,r.jsx)("kbd",{children:"Number keys (1-4)"}),": quick access to main screens"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"container-management",children:"Container management"}),"\n",(0,r.jsx)(n.p,{children:"The TUI can deploy, manage, and upgrade your OpenRAG containers."}),"\n",(0,r.jsx)(n.h3,{id:"start-container-services",children:"Start container services"}),"\n",(0,r.jsxs)(n.p,{children:["Click ",(0,r.jsx)(n.strong,{children:"Start Container Services"})," to start the OpenRAG containers.\nThe TUI automatically detects your container runtime, and then checks if your machine has compatible GPU support by checking for ",(0,r.jsx)(n.code,{children:"CUDA"}),", ",(0,r.jsx)(n.code,{children:"NVIDIA_SMI"}),", and Docker/Podman runtime support. This check determines which Docker Compose file OpenRAG uses.\nThe TUI then pulls the images and deploys the containers with the following command."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:"docker compose up -d\n"})}),"\n",(0,r.jsxs)(n.p,{children:["If images are missing, the TUI runs ",(0,r.jsx)(n.code,{children:"docker compose pull"}),", then runs ",(0,r.jsx)(n.code,{children:"docker compose up -d"}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"start-native-services",children:"Start native services"}),"\n",(0,r.jsxs)(n.p,{children:['A "native" service in OpenRAG refers to a service run natively on your machine, and not within a container.\nThe ',(0,r.jsx)(n.code,{children:"docling serve"})," process is a native service in OpenRAG, because it's a document processing service that is run on your local machine, and controlled separately from the containers."]}),"\n",(0,r.jsxs)(n.p,{children:["To start or stop ",(0,r.jsx)(n.code,{children:"docling serve"})," or any other native services, in the TUI main menu, click ",(0,r.jsx)(n.strong,{children:"Start Native Services"})," or ",(0,r.jsx)(n.strong,{children:"Stop Native Services"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["To view the status, port, or PID of a native service, in the TUI main menu, click ",(0,r.jsx)(n.a,{href:"#status",children:"Status"}),"."]}),"\n",(0,r.jsx)(n.h3,{id:"status",children:"Status"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Status"})," menu displays information on your container deployment.\nHere you can check container health, find your service ports, view logs, and upgrade your containers."]}),"\n",(0,r.jsxs)(n.p,{children:["To view streaming logs, select the container you want to view, and press ",(0,r.jsx)("kbd",{children:"l"}),".\nTo copy your logs, click ",(0,r.jsx)(n.strong,{children:"Copy to Clipboard"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["To ",(0,r.jsx)(n.strong,{children:"upgrade"})," your containers, click ",(0,r.jsx)(n.strong,{children:"Upgrade"}),".\n",(0,r.jsx)(n.strong,{children:"Upgrade"})," runs ",(0,r.jsx)(n.code,{children:"docker compose pull"})," and then ",(0,r.jsx)(n.code,{children:"docker compose up -d --force-recreate"}),".\nThe first command pulls the latest images of OpenRAG.\nThe second command recreates the containers with your data persisted."]}),"\n",(0,r.jsxs)(n.p,{children:["To ",(0,r.jsx)(n.strong,{children:"reset"})," your containers, click ",(0,r.jsx)(n.strong,{children:"Reset"}),".\nReset gives you a completely fresh start.\nReset deletes all of your data, including OpenSearch data, uploaded documents, and authentication.\n",(0,r.jsx)(n.strong,{children:"Reset"})," runs two commands.\nIt first stops and removes all containers, volumes, and local images."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"docker compose down --volumes --remove-orphans --rmi local\n"})}),"\n",(0,r.jsxs)(n.p,{children:["When the first command is complete, OpenRAG removes any additional Docker objects with ",(0,r.jsx)(n.code,{children:"prune"}),"."]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{children:"docker system prune -f\n"})}),"\n",(0,r.jsx)(n.h2,{id:"diagnostics",children:"Diagnostics"}),"\n",(0,r.jsxs)(n.p,{children:["The ",(0,r.jsx)(n.strong,{children:"Diagnostics"})," menu provides health monitoring for your container runtimes and monitoring of your OpenSearch security."]})]})}function h(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(l,{...e})}):l(e)}},8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>a});var s=t(6540);const r={},i=s.createContext(r);function o(e){const n=s.useContext(i);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),s.createElement(i.Provider,{value:n},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/22dd74f7.4cc55718.js b/assets/js/22dd74f7.4cc55718.js deleted file mode 100644 index 83e280f0..00000000 --- a/assets/js/22dd74f7.4cc55718.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkopenrag_docs=self.webpackChunkopenrag_docs||[]).push([[567],{5226:e=>{e.exports=JSON.parse('{"version":{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"tutorialSidebar":[{"type":"category","label":"Get Started","items":[{"type":"link","label":"About OpenRAG","href":"/","docId":"get-started/what-is-openrag","unlisted":false},{"type":"link","label":"Install OpenRAG","href":"/install","docId":"get-started/install","unlisted":false},{"type":"link","label":"Install with Docker","href":"/get-started/docker","docId":"get-started/docker","unlisted":false},{"type":"link","label":"Quickstart","href":"/quickstart","docId":"get-started/quickstart","unlisted":false},{"type":"link","label":"Terminal User Interface (TUI)","href":"/get-started/tui","docId":"get-started/tui","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Core components","items":[{"type":"link","label":"Langflow Agents","href":"/agents","docId":"core-components/agents","unlisted":false},{"type":"link","label":"OpenSearch Knowledge","href":"/knowledge","docId":"core-components/knowledge","unlisted":false},{"type":"link","label":"Docling Ingestion","href":"/ingestion","docId":"core-components/ingestion","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Reference","items":[{"type":"link","label":"Environment variables","href":"/reference/configuration","docId":"reference/configuration","unlisted":false}],"collapsed":true,"collapsible":true},{"type":"category","label":"Support","items":[{"type":"link","label":"Troubleshoot","href":"/support/troubleshoot","docId":"support/troubleshoot","unlisted":false}],"collapsed":true,"collapsible":true}]},"docs":{"core-components/agents":{"id":"core-components/agents","title":"Langflow Agents","description":"OpenRAG leverages Langflow\'s Agent component to power the OpenRAG OpenSearch Agent flow.","sidebar":"tutorialSidebar"},"core-components/ingestion":{"id":"core-components/ingestion","title":"Docling Ingestion","description":"OpenRAG uses Docling for its document ingestion pipeline.","sidebar":"tutorialSidebar"},"core-components/knowledge":{"id":"core-components/knowledge","title":"OpenSearch Knowledge","description":"OpenRAG uses OpenSearch for its vector-backed knowledge store.","sidebar":"tutorialSidebar"},"get-started/docker":{"id":"get-started/docker","title":"Install with Docker","description":"There are two different Docker Compose files.","sidebar":"tutorialSidebar"},"get-started/install":{"id":"get-started/install","title":"Install OpenRAG","description":"Install the OpenRAG Python wheel, and then run the OpenRAG Terminal User Interface(TUI) to start your OpenRAG deployment with a guided setup process.","sidebar":"tutorialSidebar"},"get-started/quickstart":{"id":"get-started/quickstart","title":"Quickstart","description":"Get started with OpenRAG by loading your knowledge, swapping out your language model, and then chatting with the OpenRAG API.","sidebar":"tutorialSidebar"},"get-started/tui":{"id":"get-started/tui","title":"Terminal User Interface (TUI) commands","description":"The OpenRAG Terminal User Interface (TUI) allows you to set up, configure, and monitor your OpenRAG deployment directly from the terminal, on any operating system.","sidebar":"tutorialSidebar"},"get-started/what-is-openrag":{"id":"get-started/what-is-openrag","title":"What is OpenRAG?","description":"OpenRAG is an open-source package for building agentic RAG systems.","sidebar":"tutorialSidebar"},"reference/configuration":{"id":"reference/configuration","title":"Environment variables","description":"OpenRAG recognizes supported environment variables from the following sources:","sidebar":"tutorialSidebar"},"support/troubleshoot":{"id":"support/troubleshoot","title":"Troubleshoot","description":"This page provides troubleshooting advice for issues you might encounter when using OpenRAG or contributing to OpenRAG.","sidebar":"tutorialSidebar"}}}}')}}]); \ No newline at end of file diff --git a/assets/js/22dd74f7.dd618abe.js b/assets/js/22dd74f7.dd618abe.js new file mode 100644 index 00000000..767262be --- /dev/null +++ b/assets/js/22dd74f7.dd618abe.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkopenrag_docs=self.webpackChunkopenrag_docs||[]).push([[567],{5226:e=>{e.exports=JSON.parse('{"version":{"pluginId":"default","version":"current","label":"Next","banner":null,"badge":false,"noIndex":false,"className":"docs-version-current","isLast":true,"docsSidebars":{"tutorialSidebar":[{"type":"link","label":"About OpenRAG","href":"/","docId":"get-started/what-is-openrag","unlisted":false},{"type":"link","label":"Install OpenRAG with TUI","href":"/install","docId":"get-started/install","unlisted":false},{"type":"link","label":"Install OpenRAG containers","href":"/get-started/docker","docId":"get-started/docker","unlisted":false},{"type":"link","label":"Quickstart","href":"/quickstart","docId":"get-started/quickstart","unlisted":false},{"type":"link","label":"Terminal User Interface (TUI)","href":"/get-started/tui","docId":"get-started/tui","unlisted":false},{"type":"link","label":"Langflow in OpenRAG","href":"/agents","docId":"core-components/agents","unlisted":false},{"type":"link","label":"OpenSearch in OpenRAG","href":"/knowledge","docId":"core-components/knowledge","unlisted":false},{"type":"link","label":"Docling in OpenRAG","href":"/ingestion","docId":"core-components/ingestion","unlisted":false},{"type":"link","label":"Environment variables","href":"/reference/configuration","docId":"reference/configuration","unlisted":false},{"type":"link","label":"Troubleshooting","href":"/support/troubleshoot","docId":"support/troubleshoot","unlisted":false}]},"docs":{"core-components/agents":{"id":"core-components/agents","title":"Langflow in OpenRAG","description":"OpenRAG leverages Langflow\'s Agent component to power the OpenRAG OpenSearch Agent flow.","sidebar":"tutorialSidebar"},"core-components/ingestion":{"id":"core-components/ingestion","title":"Docling in OpenRAG","description":"OpenRAG uses Docling for its document ingestion pipeline.","sidebar":"tutorialSidebar"},"core-components/knowledge":{"id":"core-components/knowledge","title":"OpenSearch in OpenRAG","description":"OpenRAG uses OpenSearch for its vector-backed knowledge store.","sidebar":"tutorialSidebar"},"get-started/docker":{"id":"get-started/docker","title":"Install OpenRAG containers","description":"There are two different Docker Compose files.","sidebar":"tutorialSidebar"},"get-started/install":{"id":"get-started/install","title":"Install OpenRAG with TUI","description":"Install the OpenRAG Python wheel, and then run the OpenRAG Terminal User Interface(TUI) to start your OpenRAG deployment with a guided setup process.","sidebar":"tutorialSidebar"},"get-started/quickstart":{"id":"get-started/quickstart","title":"Quickstart","description":"Get started with OpenRAG by loading your knowledge, swapping out your language model, and then chatting with the OpenRAG API.","sidebar":"tutorialSidebar"},"get-started/tui":{"id":"get-started/tui","title":"Terminal User Interface (TUI) commands","description":"The OpenRAG Terminal User Interface (TUI) allows you to set up, configure, and monitor your OpenRAG deployment directly from the terminal, on any operating system.","sidebar":"tutorialSidebar"},"get-started/what-is-openrag":{"id":"get-started/what-is-openrag","title":"What is OpenRAG?","description":"OpenRAG is an open-source package for building agentic RAG systems.","sidebar":"tutorialSidebar"},"reference/configuration":{"id":"reference/configuration","title":"Environment variables","description":"OpenRAG recognizes supported environment variables from the following sources:","sidebar":"tutorialSidebar"},"support/troubleshoot":{"id":"support/troubleshoot","title":"Troubleshooting","description":"This page provides troubleshooting advice for issues you might encounter when using OpenRAG or contributing to OpenRAG.","sidebar":"tutorialSidebar"}}}}')}}]); \ No newline at end of file diff --git a/assets/js/33362219.39c0bb64.js b/assets/js/33362219.39c0bb64.js new file mode 100644 index 00000000..ebf52da5 --- /dev/null +++ b/assets/js/33362219.39c0bb64.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkopenrag_docs=self.webpackChunkopenrag_docs||[]).push([[532],{3782:(e,n,t)=>{t.d(n,{Ay:()=>c,RM:()=>i});var o=t(4848),s=t(8453),r=t(9179);const i=[];function a(e){const n={a:"a",p:"p",strong:"strong",...(0,s.R)(),...e.components};return(0,o.jsxs)(n.p,{children:["All flows included with OpenRAG are designed to be modular, performant, and provider-agnostic.\nTo modify a flow, click ",(0,o.jsx)(r.A,{name:"Settings2","aria-hidden":"true"})," ",(0,o.jsx)(n.strong,{children:"Settings"}),", and click ",(0,o.jsx)(n.strong,{children:"Edit in Langflow"}),".\nOpenRAG's visual editor is based on the ",(0,o.jsx)(n.a,{href:"https://docs.langflow.org/concepts-overview",children:"Langflow visual editor"}),", so you can edit your flows to match your specific use case."]})}function c(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(a,{...e})}):a(e)}},3982:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/opensearch-agent-flow-a759d00657f2fdb62e64c84c643e8896.png"},8748:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>h,contentTitle:()=>l,default:()=>g,frontMatter:()=>c,metadata:()=>o,toc:()=>d});const o=JSON.parse('{"id":"core-components/agents","title":"Langflow in OpenRAG","description":"OpenRAG leverages Langflow\'s Agent component to power the OpenRAG OpenSearch Agent flow.","source":"@site/docs/core-components/agents.mdx","sourceDirName":"core-components","slug":"/agents","permalink":"/agents","draft":false,"unlisted":false,"editUrl":"https://github.com/openrag/openrag/tree/main/docs/docs/core-components/agents.mdx","tags":[],"version":"current","frontMatter":{"title":"Langflow in OpenRAG","slug":"/agents"},"sidebar":"tutorialSidebar","previous":{"title":"Terminal User Interface (TUI)","permalink":"/get-started/tui"},"next":{"title":"OpenSearch in OpenRAG","permalink":"/knowledge"}}');var s=t(4848),r=t(8453),i=t(9179),a=(t(1470),t(9365),t(3782));const c={title:"Langflow in OpenRAG",slug:"/agents"},l=void 0,h={},d=[{value:"Use the OpenRAG OpenSearch Agent flow",id:"flow",level:2},...a.RM,{value:"Additional Langflow functionality",id:"additional-langflow-functionality",level:2}];function p(e){const n={a:"a",code:"code",h2:"h2",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components},{Details:o}=n;return o||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"OpenRAG leverages Langflow's Agent component to power the OpenRAG OpenSearch Agent flow."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"https://docs.langflow.org/concepts-overview",children:"Flows"})," in Langflow are functional representations of application workflows, with multiple ",(0,s.jsx)(n.a,{href:"https://docs.langflow.org/concepts-components",children:"component"})," nodes connected as single steps in a workflow."]}),"\n",(0,s.jsxs)(n.p,{children:["In the OpenRAG OpenSearch Agent flow, components like the Langflow ",(0,s.jsxs)(n.a,{href:"https://docs.langflow.org/agents",children:[(0,s.jsx)(n.strong,{children:"Agent"})," component"]})," and ",(0,s.jsxs)(n.a,{href:"https://docs.langflow.org/bundles-elastic#opensearch",children:[(0,s.jsx)(n.strong,{children:"OpenSearch"})," component"]})," are connected to intelligently chat with your knowledge by embedding your query, comparing it the vector database embeddings, and generating a response with the LLM."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"OpenRAG Open Search Agent Flow",src:t(3982).A+"",width:"4086",height:"2240"})}),"\n",(0,s.jsx)(n.p,{children:"The Agent component shines here in its ability to make decisions on not only what query should be sent, but when a query is necessary to solve the problem at hand."}),"\n",(0,s.jsxs)(o,{closed:!0,children:[(0,s.jsx)("summary",{children:"How do agents work?"}),(0,s.jsx)(n.p,{children:"Agents extend Large Language Models (LLMs) by integrating tools, which are functions that provide additional context and enable autonomous task execution. These integrations make agents more specialized and powerful than standalone LLMs."}),(0,s.jsx)(n.p,{children:"Whereas an LLM might generate acceptable, inert responses to general queries and tasks, an agent can leverage the integrated context and tools to provide more relevant responses and even take action. For example, you might create an agent that can access your company's documentation, repositories, and other resources to help your team with tasks that require knowledge of your specific products, customers, and code."}),(0,s.jsx)(n.p,{children:"Agents use LLMs as a reasoning engine to process input, determine which actions to take to address the query, and then generate a response. The response could be a typical text-based LLM response, or it could involve an action, like editing a file, running a script, or calling an external API."}),(0,s.jsx)(n.p,{children:"In an agentic context, tools are functions that the agent can run to perform tasks or access external resources. A function is wrapped as a Tool object with a common interface that the agent understands. Agents become aware of tools through tool registration, which is when the agent is provided a list of available tools typically at agent initialization. The Tool object's description tells the agent what the tool can do so that it can decide whether the tool is appropriate for a given request."})]}),"\n",(0,s.jsx)(n.h2,{id:"flow",children:"Use the OpenRAG OpenSearch Agent flow"}),"\n",(0,s.jsxs)(n.p,{children:["If you've chatted with your knowledge in OpenRAG, you've already experienced the OpenRAG OpenSearch Agent chat flow.\nTo switch OpenRAG over to the ",(0,s.jsx)(n.a,{href:"https://docs.langflow.org/concepts-overview",children:"Langflow visual editor"})," and view the OpenRAG OpenSearch Agentflow, click ",(0,s.jsx)(i.A,{name:"Settings2","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Settings"}),", and then click ",(0,s.jsx)(n.strong,{children:"Edit in Langflow"}),".\nThis flow contains eight components connected together to chat with your data:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["The ",(0,s.jsxs)(n.a,{href:"https://docs.langflow.org/agents",children:[(0,s.jsx)(n.strong,{children:"Agent"})," component"]})," orchestrates the entire flow by deciding when to search the knowledge base, how to formulate search queries, and how to combine retrieved information with the user's question to generate a comprehensive response.\nThe ",(0,s.jsx)(n.strong,{children:"Agent"})," behaves according to the prompt in the ",(0,s.jsx)(n.strong,{children:"Agent Instructions"})," field."]}),"\n",(0,s.jsxs)(n.li,{children:["The ",(0,s.jsxs)(n.a,{href:"https://docs.langflow.org/components-io",children:[(0,s.jsx)(n.strong,{children:"Chat Input"})," component"]})," is connected to the Agent component's Input port. This allows to flow to be triggered by an incoming prompt from a user or application."]}),"\n",(0,s.jsxs)(n.li,{children:["The ",(0,s.jsxs)(n.a,{href:"https://docs.langflow.org/bundles-elastic#opensearch",children:[(0,s.jsx)(n.strong,{children:"OpenSearch"})," component"]})," is connected to the Agent component's Tools port. The agent may not use this database for every request; the agent only uses this connection if it decides the knowledge can help respond to the prompt."]}),"\n",(0,s.jsxs)(n.li,{children:["The ",(0,s.jsxs)(n.a,{href:"https://docs.langflow.org/components-models",children:[(0,s.jsx)(n.strong,{children:"Language Model"})," component"]})," is connected to the Agent component's Language Model port. The agent uses the connected LLM to reason through the request sent through Chat Input."]}),"\n",(0,s.jsxs)(n.li,{children:["The ",(0,s.jsxs)(n.a,{href:"https://docs.langflow.org/components-embedding-models",children:[(0,s.jsx)(n.strong,{children:"Embedding Model"})," component"]})," is connected to the OpenSearch component's Embedding port. This component converts text queries into vector representations that are compared with document embeddings stored in OpenSearch for semantic similarity matching. This gives your Agent's queries context."]}),"\n",(0,s.jsxs)(n.li,{children:["The ",(0,s.jsxs)(n.a,{href:"https://docs.langflow.org/components-io",children:[(0,s.jsx)(n.strong,{children:"Text Input"})," component"]})," is populated with the global variable ",(0,s.jsx)(n.code,{children:"OPENRAG-QUERY-FILTER"}),".\nThis filter is the ",(0,s.jsx)(n.a,{href:"/knowledge#create-knowledge-filters",children:"Knowledge filter"}),", and filters which knowledge sources to search through."]}),"\n",(0,s.jsxs)(n.li,{children:["The ",(0,s.jsx)(n.strong,{children:"Agent"})," component's Output port is connected to the ",(0,s.jsxs)(n.a,{href:"https://docs.langflow.org/components-io",children:[(0,s.jsx)(n.strong,{children:"Chat Output"})," component"]}),", which returns the final response to the user or application."]}),"\n",(0,s.jsxs)(n.li,{children:["An ",(0,s.jsxs)(n.a,{href:"https://docs.langflow.org/mcp-client",children:[(0,s.jsx)(n.strong,{children:"MCP Tools"})," component"]})," is connected to the Agent's ",(0,s.jsx)(n.strong,{children:"Tools"})," port. This component calls the ",(0,s.jsx)(n.a,{href:"/ingestion#url-flow",children:"OpenSearch URL Ingestion flow"}),", which Langflow uses as an MCP server to fetch content from URLs and store in OpenSearch."]}),"\n"]}),"\n",(0,s.jsx)(a.Ay,{}),"\n",(0,s.jsxs)(n.p,{children:["For an example of changing out the agent's language model in OpenRAG, see the ",(0,s.jsx)(n.a,{href:"/quickstart#change-components",children:"Quickstart"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["To restore the flow to its initial state, in OpenRAG, click ",(0,s.jsx)(i.A,{name:"Settings","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Settings"}),", and then click ",(0,s.jsx)(n.strong,{children:"Restore Flow"}),".\nOpenRAG warns you that this discards all custom settings. Click ",(0,s.jsx)(n.strong,{children:"Restore"})," to restore the flow."]}),"\n",(0,s.jsx)(n.h2,{id:"additional-langflow-functionality",children:"Additional Langflow functionality"}),"\n",(0,s.jsx)(n.p,{children:"Langflow includes features beyond Agents to help you integrate OpenRAG into your application, and all Langflow features are included in OpenRAG."}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Langflow can serve your flows as an ",(0,s.jsx)(n.a,{href:"https://docs.langflow.org/mcp-server",children:"MCP server"}),", or consume other MCP servers as an ",(0,s.jsx)(n.a,{href:"https://docs.langflow.org/mcp-client",children:"MCP client"}),". Get started with the ",(0,s.jsx)(n.a,{href:"https://docs.langflow.org/mcp-tutorial",children:"MCP tutorial"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["If you don't see the component you need, extend Langflow's functionality by creating ",(0,s.jsx)(n.a,{href:"https://docs.langflow.org/components-custom-components",children:"custom Python components"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Langflow offers component ",(0,s.jsx)(n.a,{href:"https://docs.langflow.org/components-bundle-components",children:"bundles"})," to integrate with many popular vector stores, AI/ML providers, and search APIs."]}),"\n"]}),"\n"]})]})}function g(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(p,{...e})}):p(e)}},9179:(e,n,t)=>{t.d(n,{A:()=>r});t(6540);var o=t(4827),s=t(4848);function r({name:e,...n}){const t=o[e];return t?(0,s.jsx)(t,{...n}):null}}}]); \ No newline at end of file diff --git a/assets/js/33362219.d86f431d.js b/assets/js/33362219.d86f431d.js deleted file mode 100644 index 846003b2..00000000 --- a/assets/js/33362219.d86f431d.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkopenrag_docs=self.webpackChunkopenrag_docs||[]).push([[532],{3782:(e,n,t)=>{t.d(n,{Ay:()=>c,RM:()=>i});var o=t(4848),s=t(8453),r=t(9179);const i=[];function a(e){const n={a:"a",p:"p",strong:"strong",...(0,s.R)(),...e.components};return(0,o.jsxs)(n.p,{children:["All flows included with OpenRAG are designed to be modular, performant, and provider-agnostic.\nTo modify a flow, click ",(0,o.jsx)(r.A,{name:"Settings2","aria-hidden":"true"})," ",(0,o.jsx)(n.strong,{children:"Settings"}),", and click ",(0,o.jsx)(n.strong,{children:"Edit in Langflow"}),".\nOpenRAG's visual editor is based on the ",(0,o.jsx)(n.a,{href:"https://docs.langflow.org/concepts-overview",children:"Langflow visual editor"}),", so you can edit your flows to match your specific use case."]})}function c(e={}){const{wrapper:n}={...(0,s.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(a,{...e})}):a(e)}},3982:(e,n,t)=>{t.d(n,{A:()=>o});const o=t.p+"assets/images/opensearch-agent-flow-a759d00657f2fdb62e64c84c643e8896.png"},8748:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>h,contentTitle:()=>l,default:()=>p,frontMatter:()=>c,metadata:()=>o,toc:()=>d});const o=JSON.parse('{"id":"core-components/agents","title":"Langflow Agents","description":"OpenRAG leverages Langflow\'s Agent component to power the OpenRAG OpenSearch Agent flow.","source":"@site/docs/core-components/agents.mdx","sourceDirName":"core-components","slug":"/agents","permalink":"/agents","draft":false,"unlisted":false,"editUrl":"https://github.com/openrag/openrag/tree/main/docs/docs/core-components/agents.mdx","tags":[],"version":"current","frontMatter":{"title":"Langflow Agents","slug":"/agents"},"sidebar":"tutorialSidebar","previous":{"title":"Terminal User Interface (TUI)","permalink":"/get-started/tui"},"next":{"title":"OpenSearch Knowledge","permalink":"/knowledge"}}');var s=t(4848),r=t(8453),i=t(9179),a=(t(1470),t(9365),t(3782));const c={title:"Langflow Agents",slug:"/agents"},l=void 0,h={},d=[{value:"Use the OpenRAG OpenSearch Agent flow",id:"flow",level:2},...a.RM,{value:"Additional Langflow functionality",id:"additional-langflow-functionality",level:2}];function g(e){const n={a:"a",code:"code",h2:"h2",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,r.R)(),...e.components},{Details:o}=n;return o||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"OpenRAG leverages Langflow's Agent component to power the OpenRAG OpenSearch Agent flow."}),"\n",(0,s.jsxs)(n.p,{children:[(0,s.jsx)(n.a,{href:"https://docs.langflow.org/concepts-overview",children:"Flows"})," in Langflow are functional representations of application workflows, with multiple ",(0,s.jsx)(n.a,{href:"https://docs.langflow.org/concepts-components",children:"component"})," nodes connected as single steps in a workflow."]}),"\n",(0,s.jsxs)(n.p,{children:["In the OpenRAG OpenSearch Agent flow, components like the Langflow ",(0,s.jsxs)(n.a,{href:"https://docs.langflow.org/agents",children:[(0,s.jsx)(n.strong,{children:"Agent"})," component"]})," and ",(0,s.jsxs)(n.a,{href:"https://docs.langflow.org/bundles-elastic#opensearch",children:[(0,s.jsx)(n.strong,{children:"OpenSearch"})," component"]})," are connected to intelligently chat with your knowledge by embedding your query, comparing it the vector database embeddings, and generating a response with the LLM."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{alt:"OpenRAG Open Search Agent Flow",src:t(3982).A+"",width:"4086",height:"2240"})}),"\n",(0,s.jsx)(n.p,{children:"The Agent component shines here in its ability to make decisions on not only what query should be sent, but when a query is necessary to solve the problem at hand."}),"\n",(0,s.jsxs)(o,{closed:!0,children:[(0,s.jsx)("summary",{children:"How do agents work?"}),(0,s.jsx)(n.p,{children:"Agents extend Large Language Models (LLMs) by integrating tools, which are functions that provide additional context and enable autonomous task execution. These integrations make agents more specialized and powerful than standalone LLMs."}),(0,s.jsx)(n.p,{children:"Whereas an LLM might generate acceptable, inert responses to general queries and tasks, an agent can leverage the integrated context and tools to provide more relevant responses and even take action. For example, you might create an agent that can access your company's documentation, repositories, and other resources to help your team with tasks that require knowledge of your specific products, customers, and code."}),(0,s.jsx)(n.p,{children:"Agents use LLMs as a reasoning engine to process input, determine which actions to take to address the query, and then generate a response. The response could be a typical text-based LLM response, or it could involve an action, like editing a file, running a script, or calling an external API."}),(0,s.jsx)(n.p,{children:"In an agentic context, tools are functions that the agent can run to perform tasks or access external resources. A function is wrapped as a Tool object with a common interface that the agent understands. Agents become aware of tools through tool registration, which is when the agent is provided a list of available tools typically at agent initialization. The Tool object's description tells the agent what the tool can do so that it can decide whether the tool is appropriate for a given request."})]}),"\n",(0,s.jsx)(n.h2,{id:"flow",children:"Use the OpenRAG OpenSearch Agent flow"}),"\n",(0,s.jsxs)(n.p,{children:["If you've chatted with your knowledge in OpenRAG, you've already experienced the OpenRAG OpenSearch Agent chat flow.\nTo switch OpenRAG over to the ",(0,s.jsx)(n.a,{href:"https://docs.langflow.org/concepts-overview",children:"Langflow visual editor"})," and view the OpenRAG OpenSearch Agentflow, click ",(0,s.jsx)(i.A,{name:"Settings2","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Settings"}),", and then click ",(0,s.jsx)(n.strong,{children:"Edit in Langflow"}),".\nThis flow contains eight components connected together to chat with your data:"]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["The ",(0,s.jsxs)(n.a,{href:"https://docs.langflow.org/agents",children:[(0,s.jsx)(n.strong,{children:"Agent"})," component"]})," orchestrates the entire flow by deciding when to search the knowledge base, how to formulate search queries, and how to combine retrieved information with the user's question to generate a comprehensive response.\nThe ",(0,s.jsx)(n.strong,{children:"Agent"})," behaves according to the prompt in the ",(0,s.jsx)(n.strong,{children:"Agent Instructions"})," field."]}),"\n",(0,s.jsxs)(n.li,{children:["The ",(0,s.jsxs)(n.a,{href:"https://docs.langflow.org/components-io",children:[(0,s.jsx)(n.strong,{children:"Chat Input"})," component"]})," is connected to the Agent component's Input port. This allows to flow to be triggered by an incoming prompt from a user or application."]}),"\n",(0,s.jsxs)(n.li,{children:["The ",(0,s.jsxs)(n.a,{href:"https://docs.langflow.org/bundles-elastic#opensearch",children:[(0,s.jsx)(n.strong,{children:"OpenSearch"})," component"]})," is connected to the Agent component's Tools port. The agent may not use this database for every request; the agent only uses this connection if it decides the knowledge can help respond to the prompt."]}),"\n",(0,s.jsxs)(n.li,{children:["The ",(0,s.jsxs)(n.a,{href:"https://docs.langflow.org/components-models",children:[(0,s.jsx)(n.strong,{children:"Language Model"})," component"]})," is connected to the Agent component's Language Model port. The agent uses the connected LLM to reason through the request sent through Chat Input."]}),"\n",(0,s.jsxs)(n.li,{children:["The ",(0,s.jsxs)(n.a,{href:"https://docs.langflow.org/components-embedding-models",children:[(0,s.jsx)(n.strong,{children:"Embedding Model"})," component"]})," is connected to the OpenSearch component's Embedding port. This component converts text queries into vector representations that are compared with document embeddings stored in OpenSearch for semantic similarity matching. This gives your Agent's queries context."]}),"\n",(0,s.jsxs)(n.li,{children:["The ",(0,s.jsxs)(n.a,{href:"https://docs.langflow.org/components-io",children:[(0,s.jsx)(n.strong,{children:"Text Input"})," component"]})," is populated with the global variable ",(0,s.jsx)(n.code,{children:"OPENRAG-QUERY-FILTER"}),".\nThis filter is the ",(0,s.jsx)(n.a,{href:"/knowledge#create-knowledge-filters",children:"Knowledge filter"}),", and filters which knowledge sources to search through."]}),"\n",(0,s.jsxs)(n.li,{children:["The ",(0,s.jsx)(n.strong,{children:"Agent"})," component's Output port is connected to the ",(0,s.jsxs)(n.a,{href:"https://docs.langflow.org/components-io",children:[(0,s.jsx)(n.strong,{children:"Chat Output"})," component"]}),", which returns the final response to the user or application."]}),"\n",(0,s.jsxs)(n.li,{children:["An ",(0,s.jsxs)(n.a,{href:"https://docs.langflow.org/mcp-client",children:[(0,s.jsx)(n.strong,{children:"MCP Tools"})," component"]})," is connected to the Agent's ",(0,s.jsx)(n.strong,{children:"Tools"})," port. This component calls the ",(0,s.jsx)(n.a,{href:"/ingestion#url-flow",children:"OpenSearch URL Ingestion flow"}),", which Langflow uses as an MCP server to fetch content from URLs and store in OpenSearch."]}),"\n"]}),"\n",(0,s.jsx)(a.Ay,{}),"\n",(0,s.jsxs)(n.p,{children:["For an example of changing out the agent's language model in OpenRAG, see the ",(0,s.jsx)(n.a,{href:"/quickstart#change-components",children:"Quickstart"}),"."]}),"\n",(0,s.jsxs)(n.p,{children:["To restore the flow to its initial state, in OpenRAG, click ",(0,s.jsx)(i.A,{name:"Settings","aria-hidden":"true"})," ",(0,s.jsx)(n.strong,{children:"Settings"}),", and then click ",(0,s.jsx)(n.strong,{children:"Restore Flow"}),".\nOpenRAG warns you that this discards all custom settings. Click ",(0,s.jsx)(n.strong,{children:"Restore"})," to restore the flow."]}),"\n",(0,s.jsx)(n.h2,{id:"additional-langflow-functionality",children:"Additional Langflow functionality"}),"\n",(0,s.jsx)(n.p,{children:"Langflow includes features beyond Agents to help you integrate OpenRAG into your application, and all Langflow features are included in OpenRAG."}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Langflow can serve your flows as an ",(0,s.jsx)(n.a,{href:"https://docs.langflow.org/mcp-server",children:"MCP server"}),", or consume other MCP servers as an ",(0,s.jsx)(n.a,{href:"https://docs.langflow.org/mcp-client",children:"MCP client"}),". Get started with the ",(0,s.jsx)(n.a,{href:"https://docs.langflow.org/mcp-tutorial",children:"MCP tutorial"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["If you don't see the component you need, extend Langflow's functionality by creating ",(0,s.jsx)(n.a,{href:"https://docs.langflow.org/components-custom-components",children:"custom Python components"}),"."]}),"\n"]}),"\n",(0,s.jsxs)(n.li,{children:["\n",(0,s.jsxs)(n.p,{children:["Langflow offers component ",(0,s.jsx)(n.a,{href:"https://docs.langflow.org/components-bundle-components",children:"bundles"})," to integrate with many popular vector stores, AI/ML providers, and search APIs."]}),"\n"]}),"\n"]})]})}function p(e={}){const{wrapper:n}={...(0,r.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(g,{...e})}):g(e)}},9179:(e,n,t)=>{t.d(n,{A:()=>r});t(6540);var o=t(4827),s=t(4848);function r({name:e,...n}){const t=o[e];return t?(0,s.jsx)(t,{...n}):null}}}]); \ No newline at end of file diff --git a/assets/js/749371cc.0134aeef.js b/assets/js/749371cc.0134aeef.js new file mode 100644 index 00000000..7bf1b3a7 --- /dev/null +++ b/assets/js/749371cc.0134aeef.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkopenrag_docs=self.webpackChunkopenrag_docs||[]).push([[272],{887:(e,n,r)=>{r.d(n,{Ay:()=>c,RM:()=>a});var s=r(4848),t=r(8453),o=r(1470),l=r(9365);const a=[{value:"Application onboarding",id:"application-onboarding",level:2}];function i(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",strong:"strong",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"application-onboarding",children:"Application onboarding"}),"\n",(0,s.jsxs)(n.p,{children:["The first time you start OpenRAG, whether using the TUI or a ",(0,s.jsx)(n.code,{children:".env"})," file, you must complete application onboarding."]}),"\n",(0,s.jsxs)(n.p,{children:["Values from onboarding can be changed later in the OpenRAG ",(0,s.jsx)(n.strong,{children:"Settings"})," page."]}),"\n",(0,s.jsxs)(o.A,{groupId:"Provider",children:[(0,s.jsx)(l.A,{value:"OpenAI",label:"OpenAI",default:!0,children:(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Enable ",(0,s.jsx)(n.strong,{children:"Get API key from environment variable"})," to automatically enter your key from the TUI-generated ",(0,s.jsx)(n.code,{children:".env"})," file.\nAlternatively, paste an OpenAI API key into the field."]}),"\n",(0,s.jsxs)(n.li,{children:["Under ",(0,s.jsx)(n.strong,{children:"Advanced settings"}),", select your ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," and ",(0,s.jsx)(n.strong,{children:"Language Model"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["To load 2 sample PDFs, enable ",(0,s.jsx)(n.strong,{children:"Sample dataset"}),".\nThis is recommended, but not required."]}),"\n",(0,s.jsxs)(n.li,{children:["Click ",(0,s.jsx)(n.strong,{children:"Complete"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Continue with the ",(0,s.jsx)(n.a,{href:"/quickstart",children:"Quickstart"}),"."]}),"\n"]})}),(0,s.jsx)(l.A,{value:"IBM watsonx.ai",label:"IBM watsonx.ai",children:(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Complete the fields for ",(0,s.jsx)(n.strong,{children:"watsonx.ai API Endpoint"}),", ",(0,s.jsx)(n.strong,{children:"IBM API key"}),", and ",(0,s.jsx)(n.strong,{children:"IBM Project ID"}),".\nThese values are found in your IBM watsonx deployment."]}),"\n",(0,s.jsxs)(n.li,{children:["Under ",(0,s.jsx)(n.strong,{children:"Advanced settings"}),", select your ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," and ",(0,s.jsx)(n.strong,{children:"Language Model"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["To load 2 sample PDFs, enable ",(0,s.jsx)(n.strong,{children:"Sample dataset"}),".\nThis is recommended, but not required."]}),"\n",(0,s.jsxs)(n.li,{children:["Click ",(0,s.jsx)(n.strong,{children:"Complete"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Continue with the ",(0,s.jsx)(n.a,{href:"/quickstart",children:"Quickstart"}),"."]}),"\n"]})}),(0,s.jsxs)(l.A,{value:"Ollama",label:"Ollama",children:[(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsxs)(n.p,{children:["Ollama is not included with OpenRAG. To install Ollama, see the ",(0,s.jsx)(n.a,{href:"https://docs.ollama.com/",children:"Ollama documentation"}),"."]})}),(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Enter your Ollama server's base URL address.\nThe default Ollama server address is ",(0,s.jsx)(n.code,{children:"http://localhost:11434"}),".\nOpenRAG automatically transforms ",(0,s.jsx)(n.code,{children:"localhost"})," to access services outside of the container, and sends a test connection to your Ollama server to confirm connectivity."]}),"\n",(0,s.jsxs)(n.li,{children:["Select the ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," and ",(0,s.jsx)(n.strong,{children:"Language Model"})," your Ollama server is running.\nOpenRAG retrieves the available models from your Ollama server."]}),"\n",(0,s.jsxs)(n.li,{children:["To load 2 sample PDFs, enable ",(0,s.jsx)(n.strong,{children:"Sample dataset"}),".\nThis is recommended, but not required."]}),"\n",(0,s.jsxs)(n.li,{children:["Click ",(0,s.jsx)(n.strong,{children:"Complete"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Continue with the ",(0,s.jsx)(n.a,{href:"/quickstart",children:"Quickstart"}),"."]}),"\n"]})]})]})]})}function c(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(i,{...e})}):i(e)}},1470:(e,n,r)=>{r.d(n,{A:()=>k});var s=r(6540),t=r(4164),o=r(3104),l=r(6347),a=r(205),i=r(7485),c=r(1682),d=r(679);function h(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 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:n,children:r}=e;return(0,s.useMemo)(()=>{const e=n??function(e){return h(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,c.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 . Every value needs to be unique.`)}(e),e},[n,r])}function p({value:e,tabValues:n}){return n.some(n=>n.value===e)}function m({queryString:e=!1,groupId:n}){const r=(0,l.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 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,i.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 x(e){const{defaultValue:n,queryString:r=!1,groupId:t}=e,o=u(e),[l,i]=(0,s.useState)(()=>function({defaultValue:e,tabValues:n}){if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(e){if(!p({value:e,tabValues:n}))throw new Error(`Docusaurus error: The 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:o})),[c,h]=m({queryString:r,groupId:t}),[x,j]=function({groupId:e}){const n=function(e){return e?`docusaurus.tab.${e}`:null}(e),[r,t]=(0,d.Dv)(n);return[r,(0,s.useCallback)(e=>{n&&t.set(e)},[n,t])]}({groupId:t}),g=(()=>{const e=c??x;return p({value:e,tabValues:o})?e:null})();(0,a.A)(()=>{g&&i(g)},[g]);return{selectedValue:l,selectValue:(0,s.useCallback)(e=>{if(!p({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);i(e),h(e),j(e)},[h,j,o]),tabValues:o}}var j=r(2303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var f=r(4848);function b({className:e,block:n,selectedValue:r,selectValue:s,tabValues:l}){const a=[],{blockElementScrollPositionUntilNextRender:i}=(0,o.a_)(),c=e=>{const n=e.currentTarget,t=a.indexOf(n),o=l[t].value;o!==r&&(i(n),s(o))},d=e=>{let n=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const r=a.indexOf(e.currentTarget)+1;n=a[r]??a[0];break}case"ArrowLeft":{const r=a.indexOf(e.currentTarget)-1;n=a[r]??a[a.length-1];break}}n?.focus()};return(0,f.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,t.A)("tabs",{"tabs--block":n},e),children:l.map(({value:e,label:n,attributes:s})=>(0,f.jsx)("li",{role:"tab",tabIndex:r===e?0:-1,"aria-selected":r===e,ref:e=>{a.push(e)},onKeyDown:d,onClick:c,...s,className:(0,t.A)("tabs__item",g.tabItem,s?.className,{"tabs__item--active":r===e}),children:n??e},e))})}function v({lazy:e,children:n,selectedValue:r}){const o=(Array.isArray(n)?n:[n]).filter(Boolean);if(e){const e=o.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,f.jsx)("div",{className:"margin-top--md",children:o.map((e,n)=>(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==r}))})}function y(e){const n=x(e);return(0,f.jsxs)("div",{className:(0,t.A)("tabs-container",g.tabList),children:[(0,f.jsx)(b,{...n,...e}),(0,f.jsx)(v,{...n,...e})]})}function k(e){const n=(0,j.A)();return(0,f.jsx)(y,{...e,children:h(e.children)},String(n))}},5788:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>u,frontMatter:()=>a,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"get-started/docker","title":"Install OpenRAG containers","description":"There are two different Docker Compose files.","source":"@site/docs/get-started/docker.mdx","sourceDirName":"get-started","slug":"/get-started/docker","permalink":"/get-started/docker","draft":false,"unlisted":false,"editUrl":"https://github.com/openrag/openrag/tree/main/docs/docs/get-started/docker.mdx","tags":[],"version":"current","frontMatter":{"title":"Install OpenRAG containers","slug":"/get-started/docker"},"sidebar":"tutorialSidebar","previous":{"title":"Install OpenRAG with TUI","permalink":"/install"},"next":{"title":"Quickstart","permalink":"/quickstart"}}');var t=r(4848),o=r(8453),l=r(887);const a={title:"Install OpenRAG containers",slug:"/get-started/docker"},i=void 0,c={},d=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Install OpenRAG with Docker Compose",id:"install-openrag-with-docker-compose",level:2},...l.RM,{value:"Container management commands",id:"container-management-commands",level:2},{value:"Upgrade containers",id:"upgrade-containers",level:3},{value:"Rebuild containers (destructive)",id:"rebuild-containers-destructive",level:3},{value:"Remove all containers and data (destructive)",id:"remove-all-containers-and-data-destructive",level:3}];function h(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:"There are two different Docker Compose files.\nThey deploy the same applications and containers locally, but to different environments."}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://github.com/langflow-ai/openrag/blob/main/docker-compose.yml",children:(0,t.jsx)(n.code,{children:"docker-compose.yml"})})," is an OpenRAG deployment with GPU support for accelerated AI processing."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://github.com/langflow-ai/openrag/blob/main/docker-compose-cpu.yml",children:(0,t.jsx)(n.code,{children:"docker-compose-cpu.yml"})})," is a CPU-only version of OpenRAG for systems without GPU support. Use this Docker compose file for environments where GPU drivers aren't available."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Both Docker deployments depend on ",(0,t.jsx)(n.code,{children:"docling serve"})," to be running on port ",(0,t.jsx)(n.code,{children:"5001"})," on the host machine. This enables ",(0,t.jsx)(n.a,{href:"https://opensource.apple.com/projects/mlx/",children:"Mac MLX"})," support for document processing. Installing OpenRAG with the TUI starts ",(0,t.jsx)(n.code,{children:"docling serve"})," automatically, but for a Docker deployment you must manually start the ",(0,t.jsx)(n.code,{children:"docling serve"})," process."]}),"\n",(0,t.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://www.python.org/downloads/release/python-3100/",children:"Python Version 3.10 to 3.13"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://docs.astral.sh/uv/getting-started/installation/",children:"uv"})}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://podman.io/docs/installation",children:"Podman"})," (recommended) or ",(0,t.jsx)(n.a,{href:"https://docs.docker.com/get-docker/",children:"Docker"})," installed"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://docs.docker.com/compose/install/",children:"Docker Compose"})," installed. If you're using Podman, use ",(0,t.jsx)(n.a,{href:"https://docs.podman.io/en/latest/markdown/podman-compose.1.html",children:"podman-compose"})," or alias Docker compose commands to Podman commands."]}),"\n",(0,t.jsxs)(n.li,{children:["Create an ",(0,t.jsx)(n.a,{href:"https://platform.openai.com/api-keys",children:"OpenAI API key"}),". This key is ",(0,t.jsx)(n.strong,{children:"required"})," to start OpenRAG, but you can choose a different model provider during ",(0,t.jsx)(n.a,{href:"#application-onboarding",children:"Application Onboarding"}),"."]}),"\n",(0,t.jsx)(n.li,{children:"Optional: GPU support requires an NVIDIA GPU with CUDA support and compatible NVIDIA drivers installed on the OpenRAG host machine. If you don't have GPU capabilities, OpenRAG provides an alternate CPU-only deployment."}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"install-openrag-with-docker-compose",children:"Install OpenRAG with Docker Compose"}),"\n",(0,t.jsx)(n.p,{children:"To install OpenRAG with Docker Compose, do the following:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Clone the OpenRAG repository."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"git clone https://github.com/langflow-ai/openrag.git\ncd openrag\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Install dependencies."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"uv sync\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Copy the example ",(0,t.jsx)(n.code,{children:".env"})," file included in the repository root.\nThe example file includes all environment variables with comments to guide you in finding and setting their values."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"cp .env.example .env\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Alternatively, create a new ",(0,t.jsx)(n.code,{children:".env"})," file in the repository root."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"touch .env\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Set environment variables. The Docker Compose files will be populated with values from your ",(0,t.jsx)(n.code,{children:".env"}),".\nThe following values are ",(0,t.jsx)(n.strong,{children:"required"})," to be set:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"OPENSEARCH_PASSWORD=your_secure_password\nOPENAI_API_KEY=your_openai_api_key\nLANGFLOW_SUPERUSER=admin\nLANGFLOW_SUPERUSER_PASSWORD=your_langflow_password\nLANGFLOW_SECRET_KEY=your_secret_key\n"})}),"\n",(0,t.jsxs)(n.p,{children:["For more information on configuring OpenRAG with environment variables, see ",(0,t.jsx)(n.a,{href:"/reference/configuration",children:"Environment variables"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Start ",(0,t.jsx)(n.code,{children:"docling serve"})," on the host machine.\nBoth Docker deployments depend on ",(0,t.jsx)(n.code,{children:"docling serve"})," to be running on port ",(0,t.jsx)(n.code,{children:"5001"})," on the host machine. This enables ",(0,t.jsx)(n.a,{href:"https://opensource.apple.com/projects/mlx/",children:"Mac MLX"})," support for document processing."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"uv run python scripts/docling_ctl.py start --port 5001\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Confirm ",(0,t.jsx)(n.code,{children:"docling serve"})," is running."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"uv run python scripts/docling_ctl.py status\n"})}),"\n",(0,t.jsx)(n.p,{children:"Successful result:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"Status: running\nEndpoint: http://127.0.0.1:5001\nDocs: http://127.0.0.1:5001/docs\nPID: 27746\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Deploy OpenRAG locally with Docker Compose based on your deployment type."}),"\n",(0,t.jsx)(n.p,{children:"For GPU-enabled systems, run the following commands:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"docker compose build\ndocker compose up -d\n"})}),"\n",(0,t.jsx)(n.p,{children:"For environments without GPU support, run:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"docker compose -f docker-compose-cpu.yml up -d\n"})}),"\n",(0,t.jsx)(n.p,{children:"The OpenRAG Docker Compose file starts five containers:"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Container Name"}),(0,t.jsx)(n.th,{children:"Default Address"}),(0,t.jsx)(n.th,{children:"Purpose"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"OpenRAG Backend"}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.a,{href:"http://localhost:8000",children:"http://localhost:8000"})}),(0,t.jsx)(n.td,{children:"FastAPI server and core functionality."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"OpenRAG Frontend"}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.a,{href:"http://localhost:3000",children:"http://localhost:3000"})}),(0,t.jsx)(n.td,{children:"React web interface for users."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Langflow"}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.a,{href:"http://localhost:7860",children:"http://localhost:7860"})}),(0,t.jsx)(n.td,{children:"AI workflow engine and flow management."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"OpenSearch"}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.a,{href:"http://localhost:9200",children:"http://localhost:9200"})}),(0,t.jsx)(n.td,{children:"Vector database for document storage."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"OpenSearch Dashboards"}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.a,{href:"http://localhost:5601",children:"http://localhost:5601"})}),(0,t.jsx)(n.td,{children:"Database administration interface."})]})]})]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Verify installation by confirming all services are running."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"docker compose ps\n"})}),"\n",(0,t.jsx)(n.p,{children:"You can now access the application at:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Frontend"}),": ",(0,t.jsx)(n.a,{href:"http://localhost:3000",children:"http://localhost:3000"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Backend API"}),": ",(0,t.jsx)(n.a,{href:"http://localhost:8000",children:"http://localhost:8000"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Langflow"}),": ",(0,t.jsx)(n.a,{href:"http://localhost:7860",children:"http://localhost:7860"})]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Continue with ",(0,t.jsx)(n.a,{href:"#application-onboarding",children:"Application Onboarding"}),"."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["To stop ",(0,t.jsx)(n.code,{children:"docling serve"})," when you're done with your OpenRAG deployment, run:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"uv run python scripts/docling_ctl.py stop\n"})}),"\n",(0,t.jsx)(l.Ay,{}),"\n",(0,t.jsx)(n.h2,{id:"container-management-commands",children:"Container management commands"}),"\n",(0,t.jsxs)(n.p,{children:["Manage your OpenRAG containers with the following commands.\nThese commands are also available in the TUI's ",(0,t.jsx)(n.a,{href:"/get-started/tui#status",children:"Status menu"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"upgrade-containers",children:"Upgrade containers"}),"\n",(0,t.jsx)(n.p,{children:"Upgrade your containers to the latest version while preserving your data."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"docker compose pull\ndocker compose up -d --force-recreate\n"})}),"\n",(0,t.jsx)(n.h3,{id:"rebuild-containers-destructive",children:"Rebuild containers (destructive)"}),"\n",(0,t.jsxs)(n.p,{children:["Reset state by rebuilding all of your containers.\nYour OpenSearch and Langflow databases will be lost.\nDocuments stored in the ",(0,t.jsx)(n.code,{children:"./documents"})," directory will persist, since the directory is mounted as a volume in the OpenRAG backend container."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"docker compose up --build --force-recreate --remove-orphans\n"})}),"\n",(0,t.jsx)(n.h3,{id:"remove-all-containers-and-data-destructive",children:"Remove all containers and data (destructive)"}),"\n",(0,t.jsx)(n.p,{children:"Completely remove your OpenRAG installation and delete all data.\nThis deletes all of your data, including OpenSearch data, uploaded documents, and authentication."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"docker compose down --volumes --remove-orphans --rmi local\ndocker system prune -f\n"})})]})}function u(e={}){const{wrapper:n}={...(0,o.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:()=>l,x:()=>a});var s=r(6540);const t={},o=s.createContext(t);function l(e){const n=s.useContext(o);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:l(e.components),s.createElement(o.Provider,{value:n},e.children)}},9365:(e,n,r)=>{r.d(n,{A:()=>l});r(6540);var s=r(4164);const t={tabItem:"tabItem_Ymn6"};var o=r(4848);function l({children:e,hidden:n,className:r}){return(0,o.jsx)("div",{role:"tabpanel",className:(0,s.A)(t.tabItem,r),hidden:n,children:e})}}}]); \ No newline at end of file diff --git a/assets/js/749371cc.c90a8e18.js b/assets/js/749371cc.c90a8e18.js deleted file mode 100644 index c73b9a3b..00000000 --- a/assets/js/749371cc.c90a8e18.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkopenrag_docs=self.webpackChunkopenrag_docs||[]).push([[272],{887:(e,n,r)=>{r.d(n,{Ay:()=>c,RM:()=>a});var s=r(4848),t=r(8453),o=r(1470),l=r(9365);const a=[{value:"Application onboarding",id:"application-onboarding",level:2}];function i(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",strong:"strong",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"application-onboarding",children:"Application onboarding"}),"\n",(0,s.jsxs)(n.p,{children:["The first time you start OpenRAG, whether using the TUI or a ",(0,s.jsx)(n.code,{children:".env"})," file, you must complete application onboarding."]}),"\n",(0,s.jsxs)(n.p,{children:["Values from onboarding can be changed later in the OpenRAG ",(0,s.jsx)(n.strong,{children:"Settings"})," page."]}),"\n",(0,s.jsxs)(o.A,{groupId:"Provider",children:[(0,s.jsx)(l.A,{value:"OpenAI",label:"OpenAI",default:!0,children:(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Enable ",(0,s.jsx)(n.strong,{children:"Get API key from environment variable"})," to automatically enter your key from the TUI-generated ",(0,s.jsx)(n.code,{children:".env"})," file.\nAlternatively, paste an OpenAI API key into the field."]}),"\n",(0,s.jsxs)(n.li,{children:["Under ",(0,s.jsx)(n.strong,{children:"Advanced settings"}),", select your ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," and ",(0,s.jsx)(n.strong,{children:"Language Model"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["To load 2 sample PDFs, enable ",(0,s.jsx)(n.strong,{children:"Sample dataset"}),".\nThis is recommended, but not required."]}),"\n",(0,s.jsxs)(n.li,{children:["Click ",(0,s.jsx)(n.strong,{children:"Complete"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Continue with the ",(0,s.jsx)(n.a,{href:"/quickstart",children:"Quickstart"}),"."]}),"\n"]})}),(0,s.jsx)(l.A,{value:"IBM watsonx.ai",label:"IBM watsonx.ai",children:(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Complete the fields for ",(0,s.jsx)(n.strong,{children:"watsonx.ai API Endpoint"}),", ",(0,s.jsx)(n.strong,{children:"IBM API key"}),", and ",(0,s.jsx)(n.strong,{children:"IBM Project ID"}),".\nThese values are found in your IBM watsonx deployment."]}),"\n",(0,s.jsxs)(n.li,{children:["Under ",(0,s.jsx)(n.strong,{children:"Advanced settings"}),", select your ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," and ",(0,s.jsx)(n.strong,{children:"Language Model"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["To load 2 sample PDFs, enable ",(0,s.jsx)(n.strong,{children:"Sample dataset"}),".\nThis is recommended, but not required."]}),"\n",(0,s.jsxs)(n.li,{children:["Click ",(0,s.jsx)(n.strong,{children:"Complete"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Continue with the ",(0,s.jsx)(n.a,{href:"/quickstart",children:"Quickstart"}),"."]}),"\n"]})}),(0,s.jsxs)(l.A,{value:"Ollama",label:"Ollama",children:[(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsxs)(n.p,{children:["Ollama is not included with OpenRAG. To install Ollama, see the ",(0,s.jsx)(n.a,{href:"https://docs.ollama.com/",children:"Ollama documentation"}),"."]})}),(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Enter your Ollama server's base URL address.\nThe default Ollama server address is ",(0,s.jsx)(n.code,{children:"http://localhost:11434"}),".\nOpenRAG automatically transforms ",(0,s.jsx)(n.code,{children:"localhost"})," to access services outside of the container, and sends a test connection to your Ollama server to confirm connectivity."]}),"\n",(0,s.jsxs)(n.li,{children:["Select the ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," and ",(0,s.jsx)(n.strong,{children:"Language Model"})," your Ollama server is running.\nOpenRAG retrieves the available models from your Ollama server."]}),"\n",(0,s.jsxs)(n.li,{children:["To load 2 sample PDFs, enable ",(0,s.jsx)(n.strong,{children:"Sample dataset"}),".\nThis is recommended, but not required."]}),"\n",(0,s.jsxs)(n.li,{children:["Click ",(0,s.jsx)(n.strong,{children:"Complete"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Continue with the ",(0,s.jsx)(n.a,{href:"/quickstart",children:"Quickstart"}),"."]}),"\n"]})]})]})]})}function c(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(i,{...e})}):i(e)}},1470:(e,n,r)=>{r.d(n,{A:()=>k});var s=r(6540),t=r(4164),o=r(3104),l=r(6347),a=r(205),i=r(7485),c=r(1682),d=r(679);function h(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 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:n,children:r}=e;return(0,s.useMemo)(()=>{const e=n??function(e){return h(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,c.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 . Every value needs to be unique.`)}(e),e},[n,r])}function p({value:e,tabValues:n}){return n.some(n=>n.value===e)}function m({queryString:e=!1,groupId:n}){const r=(0,l.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 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,i.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 x(e){const{defaultValue:n,queryString:r=!1,groupId:t}=e,o=u(e),[l,i]=(0,s.useState)(()=>function({defaultValue:e,tabValues:n}){if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(e){if(!p({value:e,tabValues:n}))throw new Error(`Docusaurus error: The 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:o})),[c,h]=m({queryString:r,groupId:t}),[x,j]=function({groupId:e}){const n=function(e){return e?`docusaurus.tab.${e}`:null}(e),[r,t]=(0,d.Dv)(n);return[r,(0,s.useCallback)(e=>{n&&t.set(e)},[n,t])]}({groupId:t}),g=(()=>{const e=c??x;return p({value:e,tabValues:o})?e:null})();(0,a.A)(()=>{g&&i(g)},[g]);return{selectedValue:l,selectValue:(0,s.useCallback)(e=>{if(!p({value:e,tabValues:o}))throw new Error(`Can't select invalid tab value=${e}`);i(e),h(e),j(e)},[h,j,o]),tabValues:o}}var j=r(2303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var f=r(4848);function b({className:e,block:n,selectedValue:r,selectValue:s,tabValues:l}){const a=[],{blockElementScrollPositionUntilNextRender:i}=(0,o.a_)(),c=e=>{const n=e.currentTarget,t=a.indexOf(n),o=l[t].value;o!==r&&(i(n),s(o))},d=e=>{let n=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const r=a.indexOf(e.currentTarget)+1;n=a[r]??a[0];break}case"ArrowLeft":{const r=a.indexOf(e.currentTarget)-1;n=a[r]??a[a.length-1];break}}n?.focus()};return(0,f.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,t.A)("tabs",{"tabs--block":n},e),children:l.map(({value:e,label:n,attributes:s})=>(0,f.jsx)("li",{role:"tab",tabIndex:r===e?0:-1,"aria-selected":r===e,ref:e=>{a.push(e)},onKeyDown:d,onClick:c,...s,className:(0,t.A)("tabs__item",g.tabItem,s?.className,{"tabs__item--active":r===e}),children:n??e},e))})}function v({lazy:e,children:n,selectedValue:r}){const o=(Array.isArray(n)?n:[n]).filter(Boolean);if(e){const e=o.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,f.jsx)("div",{className:"margin-top--md",children:o.map((e,n)=>(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==r}))})}function y(e){const n=x(e);return(0,f.jsxs)("div",{className:(0,t.A)("tabs-container",g.tabList),children:[(0,f.jsx)(b,{...n,...e}),(0,f.jsx)(v,{...n,...e})]})}function k(e){const n=(0,j.A)();return(0,f.jsx)(y,{...e,children:h(e.children)},String(n))}},5788:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>i,default:()=>u,frontMatter:()=>a,metadata:()=>s,toc:()=>d});const s=JSON.parse('{"id":"get-started/docker","title":"Install with Docker","description":"There are two different Docker Compose files.","source":"@site/docs/get-started/docker.mdx","sourceDirName":"get-started","slug":"/get-started/docker","permalink":"/get-started/docker","draft":false,"unlisted":false,"editUrl":"https://github.com/openrag/openrag/tree/main/docs/docs/get-started/docker.mdx","tags":[],"version":"current","frontMatter":{"title":"Install with Docker","slug":"/get-started/docker"},"sidebar":"tutorialSidebar","previous":{"title":"Install OpenRAG","permalink":"/install"},"next":{"title":"Quickstart","permalink":"/quickstart"}}');var t=r(4848),o=r(8453),l=r(887);const a={title:"Install with Docker",slug:"/get-started/docker"},i=void 0,c={},d=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Install OpenRAG with Docker Compose",id:"install-openrag-with-docker-compose",level:2},...l.RM,{value:"Container management commands",id:"container-management-commands",level:2},{value:"Upgrade containers",id:"upgrade-containers",level:3},{value:"Rebuild containers (destructive)",id:"rebuild-containers-destructive",level:3},{value:"Remove all containers and data (destructive)",id:"remove-all-containers-and-data-destructive",level:3}];function h(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,o.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:"There are two different Docker Compose files.\nThey deploy the same applications and containers locally, but to different environments."}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://github.com/langflow-ai/openrag/blob/main/docker-compose.yml",children:(0,t.jsx)(n.code,{children:"docker-compose.yml"})})," is an OpenRAG deployment with GPU support for accelerated AI processing."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://github.com/langflow-ai/openrag/blob/main/docker-compose-cpu.yml",children:(0,t.jsx)(n.code,{children:"docker-compose-cpu.yml"})})," is a CPU-only version of OpenRAG for systems without GPU support. Use this Docker compose file for environments where GPU drivers aren't available."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["Both Docker deployments depend on ",(0,t.jsx)(n.code,{children:"docling serve"})," to be running on port ",(0,t.jsx)(n.code,{children:"5001"})," on the host machine. This enables ",(0,t.jsx)(n.a,{href:"https://opensource.apple.com/projects/mlx/",children:"Mac MLX"})," support for document processing. Installing OpenRAG with the TUI starts ",(0,t.jsx)(n.code,{children:"docling serve"})," automatically, but for a Docker deployment you must manually start the ",(0,t.jsx)(n.code,{children:"docling serve"})," process."]}),"\n",(0,t.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://www.python.org/downloads/release/python-3100/",children:"Python Version 3.10 to 3.13"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://docs.astral.sh/uv/getting-started/installation/",children:"uv"})}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://podman.io/docs/installation",children:"Podman"})," (recommended) or ",(0,t.jsx)(n.a,{href:"https://docs.docker.com/get-docker/",children:"Docker"})," installed"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://docs.docker.com/compose/install/",children:"Docker Compose"})," installed. If you're using Podman, use ",(0,t.jsx)(n.a,{href:"https://docs.podman.io/en/latest/markdown/podman-compose.1.html",children:"podman-compose"})," or alias Docker compose commands to Podman commands."]}),"\n",(0,t.jsxs)(n.li,{children:["Create an ",(0,t.jsx)(n.a,{href:"https://platform.openai.com/api-keys",children:"OpenAI API key"}),". This key is ",(0,t.jsx)(n.strong,{children:"required"})," to start OpenRAG, but you can choose a different model provider during ",(0,t.jsx)(n.a,{href:"#application-onboarding",children:"Application Onboarding"}),"."]}),"\n",(0,t.jsx)(n.li,{children:"Optional: GPU support requires an NVIDIA GPU with CUDA support and compatible NVIDIA drivers installed on the OpenRAG host machine. If you don't have GPU capabilities, OpenRAG provides an alternate CPU-only deployment."}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"install-openrag-with-docker-compose",children:"Install OpenRAG with Docker Compose"}),"\n",(0,t.jsx)(n.p,{children:"To install OpenRAG with Docker Compose, do the following:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Clone the OpenRAG repository."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"git clone https://github.com/langflow-ai/openrag.git\ncd openrag\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Install dependencies."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"uv sync\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Copy the example ",(0,t.jsx)(n.code,{children:".env"})," file included in the repository root.\nThe example file includes all environment variables with comments to guide you in finding and setting their values."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"cp .env.example .env\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Alternatively, create a new ",(0,t.jsx)(n.code,{children:".env"})," file in the repository root."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"touch .env\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Set environment variables. The Docker Compose files will be populated with values from your ",(0,t.jsx)(n.code,{children:".env"}),".\nThe following values are ",(0,t.jsx)(n.strong,{children:"required"})," to be set:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"OPENSEARCH_PASSWORD=your_secure_password\nOPENAI_API_KEY=your_openai_api_key\nLANGFLOW_SUPERUSER=admin\nLANGFLOW_SUPERUSER_PASSWORD=your_langflow_password\nLANGFLOW_SECRET_KEY=your_secret_key\n"})}),"\n",(0,t.jsxs)(n.p,{children:["For more information on configuring OpenRAG with environment variables, see ",(0,t.jsx)(n.a,{href:"/reference/configuration",children:"Environment variables"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Start ",(0,t.jsx)(n.code,{children:"docling serve"})," on the host machine.\nBoth Docker deployments depend on ",(0,t.jsx)(n.code,{children:"docling serve"})," to be running on port ",(0,t.jsx)(n.code,{children:"5001"})," on the host machine. This enables ",(0,t.jsx)(n.a,{href:"https://opensource.apple.com/projects/mlx/",children:"Mac MLX"})," support for document processing."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"uv run python scripts/docling_ctl.py start --port 5001\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Confirm ",(0,t.jsx)(n.code,{children:"docling serve"})," is running."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{children:"uv run python scripts/docling_ctl.py status\n"})}),"\n",(0,t.jsx)(n.p,{children:"Successful result:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"Status: running\nEndpoint: http://127.0.0.1:5001\nDocs: http://127.0.0.1:5001/docs\nPID: 27746\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Deploy OpenRAG locally with Docker Compose based on your deployment type."}),"\n",(0,t.jsx)(n.p,{children:"For GPU-enabled systems, run the following commands:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"docker compose build\ndocker compose up -d\n"})}),"\n",(0,t.jsx)(n.p,{children:"For environments without GPU support, run:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"docker compose -f docker-compose-cpu.yml up -d\n"})}),"\n",(0,t.jsx)(n.p,{children:"The OpenRAG Docker Compose file starts five containers:"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Container Name"}),(0,t.jsx)(n.th,{children:"Default Address"}),(0,t.jsx)(n.th,{children:"Purpose"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"OpenRAG Backend"}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.a,{href:"http://localhost:8000",children:"http://localhost:8000"})}),(0,t.jsx)(n.td,{children:"FastAPI server and core functionality."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"OpenRAG Frontend"}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.a,{href:"http://localhost:3000",children:"http://localhost:3000"})}),(0,t.jsx)(n.td,{children:"React web interface for users."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Langflow"}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.a,{href:"http://localhost:7860",children:"http://localhost:7860"})}),(0,t.jsx)(n.td,{children:"AI workflow engine and flow management."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"OpenSearch"}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.a,{href:"http://localhost:9200",children:"http://localhost:9200"})}),(0,t.jsx)(n.td,{children:"Vector database for document storage."})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"OpenSearch Dashboards"}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.a,{href:"http://localhost:5601",children:"http://localhost:5601"})}),(0,t.jsx)(n.td,{children:"Database administration interface."})]})]})]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Verify installation by confirming all services are running."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"docker compose ps\n"})}),"\n",(0,t.jsx)(n.p,{children:"You can now access the application at:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Frontend"}),": ",(0,t.jsx)(n.a,{href:"http://localhost:3000",children:"http://localhost:3000"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Backend API"}),": ",(0,t.jsx)(n.a,{href:"http://localhost:8000",children:"http://localhost:8000"})]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:"Langflow"}),": ",(0,t.jsx)(n.a,{href:"http://localhost:7860",children:"http://localhost:7860"})]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Continue with ",(0,t.jsx)(n.a,{href:"#application-onboarding",children:"Application Onboarding"}),"."]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.p,{children:["To stop ",(0,t.jsx)(n.code,{children:"docling serve"})," when you're done with your OpenRAG deployment, run:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"uv run python scripts/docling_ctl.py stop\n"})}),"\n",(0,t.jsx)(l.Ay,{}),"\n",(0,t.jsx)(n.h2,{id:"container-management-commands",children:"Container management commands"}),"\n",(0,t.jsxs)(n.p,{children:["Manage your OpenRAG containers with the following commands.\nThese commands are also available in the TUI's ",(0,t.jsx)(n.a,{href:"/get-started/tui#status",children:"Status menu"}),"."]}),"\n",(0,t.jsx)(n.h3,{id:"upgrade-containers",children:"Upgrade containers"}),"\n",(0,t.jsx)(n.p,{children:"Upgrade your containers to the latest version while preserving your data."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"docker compose pull\ndocker compose up -d --force-recreate\n"})}),"\n",(0,t.jsx)(n.h3,{id:"rebuild-containers-destructive",children:"Rebuild containers (destructive)"}),"\n",(0,t.jsxs)(n.p,{children:["Reset state by rebuilding all of your containers.\nYour OpenSearch and Langflow databases will be lost.\nDocuments stored in the ",(0,t.jsx)(n.code,{children:"./documents"})," directory will persist, since the directory is mounted as a volume in the OpenRAG backend container."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"docker compose up --build --force-recreate --remove-orphans\n"})}),"\n",(0,t.jsx)(n.h3,{id:"remove-all-containers-and-data-destructive",children:"Remove all containers and data (destructive)"}),"\n",(0,t.jsx)(n.p,{children:"Completely remove your OpenRAG installation and delete all data.\nThis deletes all of your data, including OpenSearch data, uploaded documents, and authentication."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"docker compose down --volumes --remove-orphans --rmi local\ndocker system prune -f\n"})})]})}function u(e={}){const{wrapper:n}={...(0,o.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:()=>l,x:()=>a});var s=r(6540);const t={},o=s.createContext(t);function l(e){const n=s.useContext(o);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:l(e.components),s.createElement(o.Provider,{value:n},e.children)}},9365:(e,n,r)=>{r.d(n,{A:()=>l});r(6540);var s=r(4164);const t={tabItem:"tabItem_Ymn6"};var o=r(4848);function l({children:e,hidden:n,className:r}){return(0,o.jsx)("div",{role:"tabpanel",className:(0,s.A)(t.tabItem,r),hidden:n,children:e})}}}]); \ No newline at end of file diff --git a/assets/js/af920ffe.87292094.js b/assets/js/af920ffe.87292094.js deleted file mode 100644 index 30537f7a..00000000 --- a/assets/js/af920ffe.87292094.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkopenrag_docs=self.webpackChunkopenrag_docs||[]).push([[717],{1260:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>h,contentTitle:()=>c,default:()=>g,frontMatter:()=>d,metadata:()=>s,toc:()=>u});const s=JSON.parse('{"id":"get-started/quickstart","title":"Quickstart","description":"Get started with OpenRAG by loading your knowledge, swapping out your language model, and then chatting with the OpenRAG API.","source":"@site/docs/get-started/quickstart.mdx","sourceDirName":"get-started","slug":"/quickstart","permalink":"/quickstart","draft":false,"unlisted":false,"editUrl":"https://github.com/openrag/openrag/tree/main/docs/docs/get-started/quickstart.mdx","tags":[],"version":"current","frontMatter":{"title":"Quickstart","slug":"/quickstart"},"sidebar":"tutorialSidebar","previous":{"title":"Install with Docker","permalink":"/get-started/docker"},"next":{"title":"Terminal User Interface (TUI)","permalink":"/get-started/tui"}}');var r=t(4848),o=t(8453),a=t(9179),i=t(1470),l=t(9365);const d={title:"Quickstart",slug:"/quickstart"},c=void 0,h={},u=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Find your way around",id:"find-your-way-around",level:2},{value:"Add your own knowledge",id:"add-your-own-knowledge",level:2},{value:"Swap out the language model to modify agent behavior",id:"change-components",level:2},{value:"Integrate OpenRAG into your application",id:"integrate-openrag-into-your-application",level:2}];function p(e){const n={a:"a",code:"code",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components},{Details:s}=n;return s||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.p,{children:"Get started with OpenRAG by loading your knowledge, swapping out your language model, and then chatting with the OpenRAG API."}),"\n",(0,r.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/install",children:"Install and start OpenRAG"})}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"find-your-way-around",children:"Find your way around"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["In OpenRAG, click ",(0,r.jsx)(a.A,{name:"MessageSquare","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Chat"}),".\nThe chat is powered by the OpenRAG OpenSearch Agent.\nFor more information, see ",(0,r.jsx)(n.a,{href:"/agents",children:"Langflow Agents"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["Ask ",(0,r.jsx)(n.code,{children:"What documents are available to you?"}),"\nThe agent responds with a message summarizing the documents that OpenRAG loads by default, which are PDFs about evaluating data quality when using LLMs in health care.\nKnowledge is stored in OpenSearch.\nFor more information, see ",(0,r.jsx)(n.a,{href:"/knowledge",children:"Knowledge"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["To confirm the agent is correct, click ",(0,r.jsx)(a.A,{name:"Library","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Knowledge"}),".\nThe ",(0,r.jsx)(n.strong,{children:"Knowledge"})," page lists the documents OpenRAG has ingested into the OpenSearch vector database.\nClick on a document to display the chunks derived from splitting the default documents into the vector database."]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"add-your-own-knowledge",children:"Add your own knowledge"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["To add documents to your knowledge base, click ",(0,r.jsx)(a.A,{name:"Plus","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Add Knowledge"}),".","\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Select ",(0,r.jsx)(n.strong,{children:"Add File"})," to add a single file from your local machine (mapped with the Docker volume mount)."]}),"\n",(0,r.jsxs)(n.li,{children:["Select ",(0,r.jsx)(n.strong,{children:"Process Folder"})," to process an entire folder of documents from your local machine (mapped with the Docker volume mount)."]}),"\n",(0,r.jsxs)(n.li,{children:["Select your cloud storage provider to add knowledge from an OAuth-connected storage provider. For more information, see ",(0,r.jsx)(n.a,{href:"/knowledge#oauth-ingestion",children:"OAuth ingestion"}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["Return to the Chat window and ask a question about your loaded data.\nFor example, with a manual about a PC tablet loaded, ask ",(0,r.jsx)(n.code,{children:"How do I connect this device to WiFI?"}),"\nThe agent responds with a message indicating it now has your knowledge as context for answering questions."]}),"\n",(0,r.jsxs)(n.li,{children:["Click the ",(0,r.jsx)(a.A,{name:"Gear","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Function Call: search_documents (tool_call)"})," that is printed in the Playground.\nThese events log the agent's request to the tool and the tool's response, so you have direct visibility into your agent's functionality.\nIf you aren't getting the results you need, you can further tune the knowledge ingestion and agent behavior in the next section."]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"change-components",children:"Swap out the language model to modify agent behavior"}),"\n",(0,r.jsxs)(n.p,{children:["To modify the knowledge ingestion or Agent behavior, click ",(0,r.jsx)(a.A,{name:"Settings2","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Settings"}),"."]}),"\n",(0,r.jsx)(n.p,{children:"In this example, you'll try a different LLM to demonstrate how the Agent's response changes."}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["To edit the Agent's behavior, click ",(0,r.jsx)(n.strong,{children:"Edit in Langflow"}),".\nYou can more quickly access the ",(0,r.jsx)(n.strong,{children:"Language Model"})," and ",(0,r.jsx)(n.strong,{children:"Agent Instructions"})," fields in this page, but for illustration purposes, navigate to the Langflow visual builder."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["OpenRAG warns you that you're entering Langflow. Click ",(0,r.jsx)(n.strong,{children:"Proceed"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["The OpenRAG OpenSearch Agent flow appears.\n",(0,r.jsx)(n.img,{alt:"OpenRAG Open Search Agent Flow",src:t(3982).A+"",width:"4086",height:"2240"})]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["In the ",(0,r.jsx)(n.strong,{children:"Language Model"})," component, under ",(0,r.jsx)(n.strong,{children:"Model"}),", select a different OpenAI model."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Save your flow with ",(0,r.jsx)("kbd",{children:"Command+S"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["In OpenRAG, start a new conversation by clicking the ",(0,r.jsx)(a.A,{name:"Plus","aria-hidden":"true"})," in the ",(0,r.jsx)(n.strong,{children:"Conversations"})," tab."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Ask the same question as before to demonstrate how a different language model changes the results."}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"integrate-openrag-into-your-application",children:"Integrate OpenRAG into your application"}),"\n",(0,r.jsxs)(n.p,{children:["To integrate OpenRAG into your application, use the ",(0,r.jsx)(n.a,{href:"https://docs.langflow.org/api-reference-api-examples",children:"Langflow API"}),".\nMake requests with Python, TypeScript, or any HTTP client to run one of OpenRAG's default flows and get a response, and then modify the flow further to improve results. Langflow provides code snippets to help you get started."]}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Create a ",(0,r.jsx)(n.a,{href:"https://docs.langflow.org/api-keys-and-authentication",children:"Langflow API key"}),"."]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Create a Langflow API key"}),(0,r.jsxs)(n.p,{children:["A Langflow API key is a user-specific token you can use with Langflow.\nIt is ",(0,r.jsx)(n.strong,{children:"only"})," used for sending requests to the Langflow server.\nIt does ",(0,r.jsx)(n.strong,{children:"not"})," access to OpenRAG."]}),(0,r.jsx)(n.p,{children:"To create a Langflow API key, do the following:"}),(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["In Langflow, click your user icon, and then select ",(0,r.jsx)(n.strong,{children:"Settings"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Click ",(0,r.jsx)(n.strong,{children:"Langflow API Keys"}),", and then click ",(0,r.jsx)(a.A,{name:"Plus","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Add New"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Name your key, and then click ",(0,r.jsx)(n.strong,{children:"Create API Key"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Copy the API key and store it securely."}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["To use your Langflow API key in a request, set a ",(0,r.jsx)(n.code,{children:"LANGFLOW_API_KEY"})," environment variable in your terminal, and then include an ",(0,r.jsx)(n.code,{children:"x-api-key"})," header or query parameter with your request.\nFor example:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'# Set variable\nexport LANGFLOW_API_KEY="sk..."\n\n# Send request\ncurl --request POST \\\n--url "http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID" \\\n--header "Content-Type: application/json" \\\n--header "x-api-key: $LANGFLOW_API_KEY" \\\n--data \'{\n "output_type": "chat",\n "input_type": "chat",\n "input_value": "Hello"\n}\'\n'})}),"\n"]}),"\n"]})]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["To navigate to the OpenRAG OpenSearch Agent flow, click ",(0,r.jsx)(a.A,{name:"Settings2","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Settings"}),", and then click ",(0,r.jsx)(n.strong,{children:"Edit in Langflow"})," in the OpenRAG OpenSearch Agent flow."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Click ",(0,r.jsx)(n.strong,{children:"Share"}),", and then click ",(0,r.jsx)(n.strong,{children:"API access"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["The default code in the API access pane constructs a request with the Langflow server ",(0,r.jsx)(n.code,{children:"url"}),", ",(0,r.jsx)(n.code,{children:"headers"}),", and a ",(0,r.jsx)(n.code,{children:"payload"})," of request data. The code snippets automatically include the ",(0,r.jsx)(n.code,{children:"LANGFLOW_SERVER_ADDRESS"})," and ",(0,r.jsx)(n.code,{children:"FLOW_ID"})," values for the flow. Replace these values if you're using the code for a different server or flow. The default Langflow server address is ",(0,r.jsx)(n.a,{href:"http://localhost:7860",children:"http://localhost:7860"}),"."]}),"\n",(0,r.jsxs)(i.A,{children:[(0,r.jsx)(l.A,{value:"python",label:"Python",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'import requests\nimport os\nimport uuid\n\napi_key = \'LANGFLOW_API_KEY\'\nurl = "http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID" # The complete API endpoint URL for this flow\n\n# Request payload configuration\npayload = {\n "output_type": "chat",\n "input_type": "chat",\n "input_value": "hello world!"\n}\npayload["session_id"] = str(uuid.uuid4())\n\nheaders = {"x-api-key": api_key}\n\ntry:\n # Send API request\n response = requests.request("POST", url, json=payload, headers=headers)\n response.raise_for_status() # Raise exception for bad status codes\n\n # Print response\n print(response.text)\n\nexcept requests.exceptions.RequestException as e:\n print(f"Error making API request: {e}")\nexcept ValueError as e:\n print(f"Error parsing response: {e}")\n'})})}),(0,r.jsx)(l.A,{value:"typescript",label:"TypeScript",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:'const crypto = require(\'crypto\');\nconst apiKey = \'LANGFLOW_API_KEY\';\nconst payload = {\n "output_type": "chat",\n "input_type": "chat",\n "input_value": "hello world!"\n};\npayload.session_id = crypto.randomUUID();\n\nconst options = {\n method: \'POST\',\n headers: {\n \'Content-Type\': \'application/json\',\n "x-api-key": apiKey\n },\n body: JSON.stringify(payload)\n};\n\nfetch(\'http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID\', options)\n .then(response => response.json())\n .then(response => console.warn(response))\n .catch(err => console.error(err));\n'})})}),(0,r.jsx)(l.A,{value:"curl",label:"curl",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'curl --request POST \\\n --url \'http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID?stream=false\' \\\n --header \'Content-Type: application/json\' \\\n --header "x-api-key: LANGFLOW_API_KEY" \\ \n --data \'{\n\t\t "output_type": "chat",\n\t\t "input_type": "chat",\n\t\t "input_value": "hello world!",\n\t\t }\'\n'})})})]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Copy the snippet, paste it in a script file, and then run the script to send the request. If you are using the curl snippet, you can run the command directly in your terminal."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["If the request is successful, the response includes many details about the flow run, including the session ID, inputs, outputs, components, durations, and more.\nThe following is an example of a response from running the ",(0,r.jsx)(n.strong,{children:"Simple Agent"})," template flow:"]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Result"}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "session_id": "29deb764-af3f-4d7d-94a0-47491ed241d6",\n "outputs": [\n {\n "inputs": {\n "input_value": "hello world!"\n },\n "outputs": [\n {\n "results": {\n "message": {\n "text_key": "text",\n "data": {\n "timestamp": "2025-06-16 19:58:23 UTC",\n "sender": "Machine",\n "sender_name": "AI",\n "session_id": "29deb764-af3f-4d7d-94a0-47491ed241d6",\n "text": "Hello world! \ud83c\udf0d How can I assist you today?",\n "files": [],\n "error": false,\n "edit": false,\n "properties": {\n "text_color": "",\n "background_color": "",\n "edited": false,\n "source": {\n "id": "Agent-ZOknz",\n "display_name": "Agent",\n "source": "gpt-4o-mini"\n },\n "icon": "bot",\n "allow_markdown": false,\n "positive_feedback": null,\n "state": "complete",\n "targets": []\n },\n "category": "message",\n "content_blocks": [\n {\n "title": "Agent Steps",\n "contents": [\n {\n "type": "text",\n "duration": 2,\n "header": {\n "title": "Input",\n "icon": "MessageSquare"\n },\n "text": "**Input**: hello world!"\n },\n {\n "type": "text",\n "duration": 226,\n "header": {\n "title": "Output",\n "icon": "MessageSquare"\n },\n "text": "Hello world! \ud83c\udf0d How can I assist you today?"\n }\n ],\n "allow_markdown": true,\n "media_url": null\n }\n ],\n "id": "f3d85d9a-261c-4325-b004-95a1bf5de7ca",\n "flow_id": "29deb764-af3f-4d7d-94a0-47491ed241d6",\n "duration": null\n },\n "default_value": "",\n "text": "Hello world! \ud83c\udf0d How can I assist you today?",\n "sender": "Machine",\n "sender_name": "AI",\n "files": [],\n "session_id": "29deb764-af3f-4d7d-94a0-47491ed241d6",\n "timestamp": "2025-06-16T19:58:23+00:00",\n "flow_id": "29deb764-af3f-4d7d-94a0-47491ed241d6",\n "error": false,\n "edit": false,\n "properties": {\n "text_color": "",\n "background_color": "",\n "edited": false,\n "source": {\n "id": "Agent-ZOknz",\n "display_name": "Agent",\n "source": "gpt-4o-mini"\n },\n "icon": "bot",\n "allow_markdown": false,\n "positive_feedback": null,\n "state": "complete",\n "targets": []\n },\n "category": "message",\n "content_blocks": [\n {\n "title": "Agent Steps",\n "contents": [\n {\n "type": "text",\n "duration": 2,\n "header": {\n "title": "Input",\n "icon": "MessageSquare"\n },\n "text": "**Input**: hello world!"\n },\n {\n "type": "text",\n "duration": 226,\n "header": {\n "title": "Output",\n "icon": "MessageSquare"\n },\n "text": "Hello world! \ud83c\udf0d How can I assist you today?"\n }\n ],\n "allow_markdown": true,\n "media_url": null\n }\n ],\n "duration": null\n }\n },\n "artifacts": {\n "message": "Hello world! \ud83c\udf0d How can I assist you today?",\n "sender": "Machine",\n "sender_name": "AI",\n "files": [],\n "type": "object"\n },\n "outputs": {\n "message": {\n "message": "Hello world! \ud83c\udf0d How can I assist you today?",\n "type": "text"\n }\n },\n "logs": {\n "message": []\n },\n "messages": [\n {\n "message": "Hello world! \ud83c\udf0d How can I assist you today?",\n "sender": "Machine",\n "sender_name": "AI",\n "session_id": "29deb764-af3f-4d7d-94a0-47491ed241d6",\n "stream_url": null,\n "component_id": "ChatOutput-aF5lw",\n "files": [],\n "type": "text"\n }\n ],\n "timedelta": null,\n "duration": null,\n "component_display_name": "Chat Output",\n "component_id": "ChatOutput-aF5lw",\n "used_frozen_result": false\n }\n ]\n }\n ]\n}\n'})})]}),"\n",(0,r.jsx)(n.p,{children:"To further explore the API, see:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["The Langflow ",(0,r.jsx)(n.a,{href:"https://docs.langflow.org/quickstart#extract-data-from-the-response",children:"Quickstart"})," extends this example with extracting fields from the response."]}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://docs.langflow.org/api-reference-api-examples",children:"Get started with the Langflow API"})}),"\n"]})]})}function g(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},3982:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/opensearch-agent-flow-a759d00657f2fdb62e64c84c643e8896.png"},9179:(e,n,t)=>{t.d(n,{A:()=>o});t(6540);var s=t(4827),r=t(4848);function o({name:e,...n}){const t=s[e];return t?(0,r.jsx)(t,{...n}):null}}}]); \ No newline at end of file diff --git a/assets/js/af920ffe.dd590fc3.js b/assets/js/af920ffe.dd590fc3.js new file mode 100644 index 00000000..b7e44f63 --- /dev/null +++ b/assets/js/af920ffe.dd590fc3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkopenrag_docs=self.webpackChunkopenrag_docs||[]).push([[717],{1260:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>h,contentTitle:()=>c,default:()=>g,frontMatter:()=>d,metadata:()=>s,toc:()=>u});const s=JSON.parse('{"id":"get-started/quickstart","title":"Quickstart","description":"Get started with OpenRAG by loading your knowledge, swapping out your language model, and then chatting with the OpenRAG API.","source":"@site/docs/get-started/quickstart.mdx","sourceDirName":"get-started","slug":"/quickstart","permalink":"/quickstart","draft":false,"unlisted":false,"editUrl":"https://github.com/openrag/openrag/tree/main/docs/docs/get-started/quickstart.mdx","tags":[],"version":"current","frontMatter":{"title":"Quickstart","slug":"/quickstart"},"sidebar":"tutorialSidebar","previous":{"title":"Install OpenRAG containers","permalink":"/get-started/docker"},"next":{"title":"Terminal User Interface (TUI)","permalink":"/get-started/tui"}}');var r=t(4848),o=t(8453),a=t(9179),i=t(1470),l=t(9365);const d={title:"Quickstart",slug:"/quickstart"},c=void 0,h={},u=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Find your way around",id:"find-your-way-around",level:2},{value:"Add your own knowledge",id:"add-your-own-knowledge",level:2},{value:"Swap out the language model to modify agent behavior",id:"change-components",level:2},{value:"Integrate OpenRAG into your application",id:"integrate-openrag-into-your-application",level:2}];function p(e){const n={a:"a",code:"code",h2:"h2",img:"img",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,o.R)(),...e.components},{Details:s}=n;return s||function(e,n){throw new Error("Expected "+(n?"component":"object")+" `"+e+"` to be defined: you likely forgot to import, pass, or provide it.")}("Details",!0),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.p,{children:"Get started with OpenRAG by loading your knowledge, swapping out your language model, and then chatting with the OpenRAG API."}),"\n",(0,r.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"/install",children:"Install and start OpenRAG"})}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"find-your-way-around",children:"Find your way around"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["In OpenRAG, click ",(0,r.jsx)(a.A,{name:"MessageSquare","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Chat"}),".\nThe chat is powered by the OpenRAG OpenSearch Agent.\nFor more information, see ",(0,r.jsx)(n.a,{href:"/agents",children:"Langflow Agents"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["Ask ",(0,r.jsx)(n.code,{children:"What documents are available to you?"}),"\nThe agent responds with a message summarizing the documents that OpenRAG loads by default, which are PDFs about evaluating data quality when using LLMs in health care.\nKnowledge is stored in OpenSearch.\nFor more information, see ",(0,r.jsx)(n.a,{href:"/knowledge",children:"Knowledge"}),"."]}),"\n",(0,r.jsxs)(n.li,{children:["To confirm the agent is correct, click ",(0,r.jsx)(a.A,{name:"Library","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Knowledge"}),".\nThe ",(0,r.jsx)(n.strong,{children:"Knowledge"})," page lists the documents OpenRAG has ingested into the OpenSearch vector database.\nClick on a document to display the chunks derived from splitting the default documents into the vector database."]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"add-your-own-knowledge",children:"Add your own knowledge"}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["To add documents to your knowledge base, click ",(0,r.jsx)(a.A,{name:"Plus","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Add Knowledge"}),".","\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["Select ",(0,r.jsx)(n.strong,{children:"Add File"})," to add a single file from your local machine (mapped with the Docker volume mount)."]}),"\n",(0,r.jsxs)(n.li,{children:["Select ",(0,r.jsx)(n.strong,{children:"Process Folder"})," to process an entire folder of documents from your local machine (mapped with the Docker volume mount)."]}),"\n",(0,r.jsxs)(n.li,{children:["Select your cloud storage provider to add knowledge from an OAuth-connected storage provider. For more information, see ",(0,r.jsx)(n.a,{href:"/knowledge#oauth-ingestion",children:"OAuth ingestion"}),"."]}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["Return to the Chat window and ask a question about your loaded data.\nFor example, with a manual about a PC tablet loaded, ask ",(0,r.jsx)(n.code,{children:"How do I connect this device to WiFI?"}),"\nThe agent responds with a message indicating it now has your knowledge as context for answering questions."]}),"\n",(0,r.jsxs)(n.li,{children:["Click the ",(0,r.jsx)(a.A,{name:"Gear","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Function Call: search_documents (tool_call)"})," that is printed in the Playground.\nThese events log the agent's request to the tool and the tool's response, so you have direct visibility into your agent's functionality.\nIf you aren't getting the results you need, you can further tune the knowledge ingestion and agent behavior in the next section."]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"change-components",children:"Swap out the language model to modify agent behavior"}),"\n",(0,r.jsxs)(n.p,{children:["To modify the knowledge ingestion or Agent behavior, click ",(0,r.jsx)(a.A,{name:"Settings2","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Settings"}),"."]}),"\n",(0,r.jsx)(n.p,{children:"In this example, you'll try a different LLM to demonstrate how the Agent's response changes."}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["To edit the Agent's behavior, click ",(0,r.jsx)(n.strong,{children:"Edit in Langflow"}),".\nYou can more quickly access the ",(0,r.jsx)(n.strong,{children:"Language Model"})," and ",(0,r.jsx)(n.strong,{children:"Agent Instructions"})," fields in this page, but for illustration purposes, navigate to the Langflow visual builder."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["OpenRAG warns you that you're entering Langflow. Click ",(0,r.jsx)(n.strong,{children:"Proceed"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["The OpenRAG OpenSearch Agent flow appears.\n",(0,r.jsx)(n.img,{alt:"OpenRAG Open Search Agent Flow",src:t(3982).A+"",width:"4086",height:"2240"})]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["In the ",(0,r.jsx)(n.strong,{children:"Language Model"})," component, under ",(0,r.jsx)(n.strong,{children:"Model"}),", select a different OpenAI model."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Save your flow with ",(0,r.jsx)("kbd",{children:"Command+S"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["In OpenRAG, start a new conversation by clicking the ",(0,r.jsx)(a.A,{name:"Plus","aria-hidden":"true"})," in the ",(0,r.jsx)(n.strong,{children:"Conversations"})," tab."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Ask the same question as before to demonstrate how a different language model changes the results."}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.h2,{id:"integrate-openrag-into-your-application",children:"Integrate OpenRAG into your application"}),"\n",(0,r.jsxs)(n.p,{children:["To integrate OpenRAG into your application, use the ",(0,r.jsx)(n.a,{href:"https://docs.langflow.org/api-reference-api-examples",children:"Langflow API"}),".\nMake requests with Python, TypeScript, or any HTTP client to run one of OpenRAG's default flows and get a response, and then modify the flow further to improve results. Langflow provides code snippets to help you get started."]}),"\n",(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Create a ",(0,r.jsx)(n.a,{href:"https://docs.langflow.org/api-keys-and-authentication",children:"Langflow API key"}),"."]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Create a Langflow API key"}),(0,r.jsxs)(n.p,{children:["A Langflow API key is a user-specific token you can use with Langflow.\nIt is ",(0,r.jsx)(n.strong,{children:"only"})," used for sending requests to the Langflow server.\nIt does ",(0,r.jsx)(n.strong,{children:"not"})," access to OpenRAG."]}),(0,r.jsx)(n.p,{children:"To create a Langflow API key, do the following:"}),(0,r.jsxs)(n.ol,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["In Langflow, click your user icon, and then select ",(0,r.jsx)(n.strong,{children:"Settings"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Click ",(0,r.jsx)(n.strong,{children:"Langflow API Keys"}),", and then click ",(0,r.jsx)(a.A,{name:"Plus","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Add New"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Name your key, and then click ",(0,r.jsx)(n.strong,{children:"Create API Key"}),"."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Copy the API key and store it securely."}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["To use your Langflow API key in a request, set a ",(0,r.jsx)(n.code,{children:"LANGFLOW_API_KEY"})," environment variable in your terminal, and then include an ",(0,r.jsx)(n.code,{children:"x-api-key"})," header or query parameter with your request.\nFor example:"]}),"\n",(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'# Set variable\nexport LANGFLOW_API_KEY="sk..."\n\n# Send request\ncurl --request POST \\\n--url "http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID" \\\n--header "Content-Type: application/json" \\\n--header "x-api-key: $LANGFLOW_API_KEY" \\\n--data \'{\n "output_type": "chat",\n "input_type": "chat",\n "input_value": "Hello"\n}\'\n'})}),"\n"]}),"\n"]})]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["To navigate to the OpenRAG OpenSearch Agent flow, click ",(0,r.jsx)(a.A,{name:"Settings2","aria-hidden":"true"})," ",(0,r.jsx)(n.strong,{children:"Settings"}),", and then click ",(0,r.jsx)(n.strong,{children:"Edit in Langflow"})," in the OpenRAG OpenSearch Agent flow."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:["Click ",(0,r.jsx)(n.strong,{children:"Share"}),", and then click ",(0,r.jsx)(n.strong,{children:"API access"}),"."]}),"\n",(0,r.jsxs)(n.p,{children:["The default code in the API access pane constructs a request with the Langflow server ",(0,r.jsx)(n.code,{children:"url"}),", ",(0,r.jsx)(n.code,{children:"headers"}),", and a ",(0,r.jsx)(n.code,{children:"payload"})," of request data. The code snippets automatically include the ",(0,r.jsx)(n.code,{children:"LANGFLOW_SERVER_ADDRESS"})," and ",(0,r.jsx)(n.code,{children:"FLOW_ID"})," values for the flow. Replace these values if you're using the code for a different server or flow. The default Langflow server address is ",(0,r.jsx)(n.a,{href:"http://localhost:7860",children:"http://localhost:7860"}),"."]}),"\n",(0,r.jsxs)(i.A,{children:[(0,r.jsx)(l.A,{value:"python",label:"Python",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-python",children:'import requests\nimport os\nimport uuid\n\napi_key = \'LANGFLOW_API_KEY\'\nurl = "http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID" # The complete API endpoint URL for this flow\n\n# Request payload configuration\npayload = {\n "output_type": "chat",\n "input_type": "chat",\n "input_value": "hello world!"\n}\npayload["session_id"] = str(uuid.uuid4())\n\nheaders = {"x-api-key": api_key}\n\ntry:\n # Send API request\n response = requests.request("POST", url, json=payload, headers=headers)\n response.raise_for_status() # Raise exception for bad status codes\n\n # Print response\n print(response.text)\n\nexcept requests.exceptions.RequestException as e:\n print(f"Error making API request: {e}")\nexcept ValueError as e:\n print(f"Error parsing response: {e}")\n'})})}),(0,r.jsx)(l.A,{value:"typescript",label:"TypeScript",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-typescript",children:'const crypto = require(\'crypto\');\nconst apiKey = \'LANGFLOW_API_KEY\';\nconst payload = {\n "output_type": "chat",\n "input_type": "chat",\n "input_value": "hello world!"\n};\npayload.session_id = crypto.randomUUID();\n\nconst options = {\n method: \'POST\',\n headers: {\n \'Content-Type\': \'application/json\',\n "x-api-key": apiKey\n },\n body: JSON.stringify(payload)\n};\n\nfetch(\'http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID\', options)\n .then(response => response.json())\n .then(response => console.warn(response))\n .catch(err => console.error(err));\n'})})}),(0,r.jsx)(l.A,{value:"curl",label:"curl",children:(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-bash",children:'curl --request POST \\\n --url \'http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID?stream=false\' \\\n --header \'Content-Type: application/json\' \\\n --header "x-api-key: LANGFLOW_API_KEY" \\ \n --data \'{\n\t\t "output_type": "chat",\n\t\t "input_type": "chat",\n\t\t "input_value": "hello world!",\n\t\t }\'\n'})})})]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsx)(n.p,{children:"Copy the snippet, paste it in a script file, and then run the script to send the request. If you are using the curl snippet, you can run the command directly in your terminal."}),"\n"]}),"\n"]}),"\n",(0,r.jsxs)(n.p,{children:["If the request is successful, the response includes many details about the flow run, including the session ID, inputs, outputs, components, durations, and more.\nThe following is an example of a response from running the ",(0,r.jsx)(n.strong,{children:"Simple Agent"})," template flow:"]}),"\n",(0,r.jsxs)(s,{children:[(0,r.jsx)("summary",{children:"Result"}),(0,r.jsx)(n.pre,{children:(0,r.jsx)(n.code,{className:"language-json",children:'{\n "session_id": "29deb764-af3f-4d7d-94a0-47491ed241d6",\n "outputs": [\n {\n "inputs": {\n "input_value": "hello world!"\n },\n "outputs": [\n {\n "results": {\n "message": {\n "text_key": "text",\n "data": {\n "timestamp": "2025-06-16 19:58:23 UTC",\n "sender": "Machine",\n "sender_name": "AI",\n "session_id": "29deb764-af3f-4d7d-94a0-47491ed241d6",\n "text": "Hello world! \ud83c\udf0d How can I assist you today?",\n "files": [],\n "error": false,\n "edit": false,\n "properties": {\n "text_color": "",\n "background_color": "",\n "edited": false,\n "source": {\n "id": "Agent-ZOknz",\n "display_name": "Agent",\n "source": "gpt-4o-mini"\n },\n "icon": "bot",\n "allow_markdown": false,\n "positive_feedback": null,\n "state": "complete",\n "targets": []\n },\n "category": "message",\n "content_blocks": [\n {\n "title": "Agent Steps",\n "contents": [\n {\n "type": "text",\n "duration": 2,\n "header": {\n "title": "Input",\n "icon": "MessageSquare"\n },\n "text": "**Input**: hello world!"\n },\n {\n "type": "text",\n "duration": 226,\n "header": {\n "title": "Output",\n "icon": "MessageSquare"\n },\n "text": "Hello world! \ud83c\udf0d How can I assist you today?"\n }\n ],\n "allow_markdown": true,\n "media_url": null\n }\n ],\n "id": "f3d85d9a-261c-4325-b004-95a1bf5de7ca",\n "flow_id": "29deb764-af3f-4d7d-94a0-47491ed241d6",\n "duration": null\n },\n "default_value": "",\n "text": "Hello world! \ud83c\udf0d How can I assist you today?",\n "sender": "Machine",\n "sender_name": "AI",\n "files": [],\n "session_id": "29deb764-af3f-4d7d-94a0-47491ed241d6",\n "timestamp": "2025-06-16T19:58:23+00:00",\n "flow_id": "29deb764-af3f-4d7d-94a0-47491ed241d6",\n "error": false,\n "edit": false,\n "properties": {\n "text_color": "",\n "background_color": "",\n "edited": false,\n "source": {\n "id": "Agent-ZOknz",\n "display_name": "Agent",\n "source": "gpt-4o-mini"\n },\n "icon": "bot",\n "allow_markdown": false,\n "positive_feedback": null,\n "state": "complete",\n "targets": []\n },\n "category": "message",\n "content_blocks": [\n {\n "title": "Agent Steps",\n "contents": [\n {\n "type": "text",\n "duration": 2,\n "header": {\n "title": "Input",\n "icon": "MessageSquare"\n },\n "text": "**Input**: hello world!"\n },\n {\n "type": "text",\n "duration": 226,\n "header": {\n "title": "Output",\n "icon": "MessageSquare"\n },\n "text": "Hello world! \ud83c\udf0d How can I assist you today?"\n }\n ],\n "allow_markdown": true,\n "media_url": null\n }\n ],\n "duration": null\n }\n },\n "artifacts": {\n "message": "Hello world! \ud83c\udf0d How can I assist you today?",\n "sender": "Machine",\n "sender_name": "AI",\n "files": [],\n "type": "object"\n },\n "outputs": {\n "message": {\n "message": "Hello world! \ud83c\udf0d How can I assist you today?",\n "type": "text"\n }\n },\n "logs": {\n "message": []\n },\n "messages": [\n {\n "message": "Hello world! \ud83c\udf0d How can I assist you today?",\n "sender": "Machine",\n "sender_name": "AI",\n "session_id": "29deb764-af3f-4d7d-94a0-47491ed241d6",\n "stream_url": null,\n "component_id": "ChatOutput-aF5lw",\n "files": [],\n "type": "text"\n }\n ],\n "timedelta": null,\n "duration": null,\n "component_display_name": "Chat Output",\n "component_id": "ChatOutput-aF5lw",\n "used_frozen_result": false\n }\n ]\n }\n ]\n}\n'})})]}),"\n",(0,r.jsx)(n.p,{children:"To further explore the API, see:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["The Langflow ",(0,r.jsx)(n.a,{href:"https://docs.langflow.org/quickstart#extract-data-from-the-response",children:"Quickstart"})," extends this example with extracting fields from the response."]}),"\n",(0,r.jsx)(n.li,{children:(0,r.jsx)(n.a,{href:"https://docs.langflow.org/api-reference-api-examples",children:"Get started with the Langflow API"})}),"\n"]})]})}function g(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(p,{...e})}):p(e)}},3982:(e,n,t)=>{t.d(n,{A:()=>s});const s=t.p+"assets/images/opensearch-agent-flow-a759d00657f2fdb62e64c84c643e8896.png"},9179:(e,n,t)=>{t.d(n,{A:()=>o});t(6540);var s=t(4827),r=t(4848);function o({name:e,...n}){const t=s[e];return t?(0,r.jsx)(t,{...n}):null}}}]); \ No newline at end of file diff --git a/assets/js/c8078f0a.95121b15.js b/assets/js/c8078f0a.95121b15.js deleted file mode 100644 index 303f18be..00000000 --- a/assets/js/c8078f0a.95121b15.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkopenrag_docs=self.webpackChunkopenrag_docs||[]).push([[26],{9179:(e,n,r)=>{r.d(n,{A:()=>d});r(6540);var s=r(4827),i=r(4848);function d({name:e,...n}){const r=s[e];return r?(0,i.jsx)(r,{...n}):null}},9196:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>t,default:()=>a,frontMatter:()=>l,metadata:()=>s,toc:()=>o});const s=JSON.parse('{"id":"reference/configuration","title":"Environment variables","description":"OpenRAG recognizes supported environment variables from the following sources:","source":"@site/docs/reference/configuration.mdx","sourceDirName":"reference","slug":"/reference/configuration","permalink":"/reference/configuration","draft":false,"unlisted":false,"editUrl":"https://github.com/openrag/openrag/tree/main/docs/docs/reference/configuration.mdx","tags":[],"version":"current","frontMatter":{"title":"Environment variables","slug":"/reference/configuration"},"sidebar":"tutorialSidebar","previous":{"title":"Docling Ingestion","permalink":"/ingestion"},"next":{"title":"Troubleshoot","permalink":"/support/troubleshoot"}}');var i=r(4848),d=r(8453);r(9179),r(1470),r(9365);const l={title:"Environment variables",slug:"/reference/configuration"},t=void 0,c={},o=[{value:"Configure environment variables",id:"configure-environment-variables",level:2},{value:"Set environment variables",id:"set-environment-variables",level:3},{value:"Supported environment variables",id:"supported-environment-variables",level:2},{value:"AI provider settings",id:"ai-provider-settings",level:3},{value:"Document processing",id:"document-processing",level:3},{value:"Langflow settings",id:"langflow-settings",level:3},{value:"OAuth provider settings",id:"oauth-provider-settings",level:3},{value:"OpenSearch settings",id:"opensearch-settings",level:3},{value:"System settings",id:"system-settings",level:3},{value:"Langflow runtime overrides",id:"langflow-runtime-overrides",level:2},{value:"Default values and fallbacks",id:"default-values-and-fallbacks",level:2},{value:"OpenRAG configuration defaults",id:"openrag-configuration-defaults",level:3},{value:"System configuration defaults",id:"system-configuration-defaults",level:3}];function h(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,d.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.p,{children:["OpenRAG recognizes ",(0,i.jsx)(n.a,{href:"#supported-environment-variables",children:"supported environment variables"})," from the following sources:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"#supported-environment-variables",children:"Environment variables"})," - Values set in the ",(0,i.jsx)(n.code,{children:".env"})," file."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"#langflow-runtime-overrides",children:"Langflow runtime overrides"})," - Langflow components may tweak environment variables at runtime."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"#default-values-and-fallbacks",children:"Default or fallback values"})," - These values are default or fallback values if OpenRAG doesn't find a value."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"configure-environment-variables",children:"Configure environment variables"}),"\n",(0,i.jsxs)(n.p,{children:["Environment variables are set in a ",(0,i.jsx)(n.code,{children:".env"})," file in the root of your OpenRAG project directory."]}),"\n",(0,i.jsxs)(n.p,{children:["For an example ",(0,i.jsx)(n.code,{children:".env"})," file, see ",(0,i.jsxs)(n.a,{href:"https://github.com/langflow-ai/openrag/blob/main/.env.example",children:[(0,i.jsx)(n.code,{children:".env.example"})," in the OpenRAG repository"]}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["The Docker Compose files are populated with values from your ",(0,i.jsx)(n.code,{children:".env"}),", so you don't need to edit the Docker Compose files manually."]}),"\n",(0,i.jsx)(n.p,{children:"Environment variables always take precedence over other variables."}),"\n",(0,i.jsx)(n.h3,{id:"set-environment-variables",children:"Set environment variables"}),"\n",(0,i.jsx)(n.p,{children:"To set environment variables, do the following."}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Stop OpenRAG."}),"\n",(0,i.jsxs)(n.li,{children:["Set the values in the ",(0,i.jsx)(n.code,{children:".env"})," file:","\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"LOG_LEVEL=DEBUG\nLOG_FORMAT=json\nSERVICE_NAME=openrag-dev\n"})}),"\n"]}),"\n",(0,i.jsx)(n.li,{children:"Start OpenRAG."}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["Updating provider API keys or provider endpoints in the ",(0,i.jsx)(n.code,{children:".env"})," file will not take effect after ",(0,i.jsx)(n.a,{href:"/install#application-onboarding",children:"Application onboarding"}),". To change these values, you must:"]}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Stop OpenRAG."}),"\n",(0,i.jsxs)(n.li,{children:["Remove the containers:","\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"docker-compose down\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["Update the values in your ",(0,i.jsx)(n.code,{children:".env"})," file."]}),"\n",(0,i.jsxs)(n.li,{children:["Start OpenRAG containers.","\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"docker-compose up -d\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["Complete ",(0,i.jsx)(n.a,{href:"/install#application-onboarding",children:"Application onboarding"})," again."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"supported-environment-variables",children:"Supported environment variables"}),"\n",(0,i.jsx)(n.p,{children:"All OpenRAG configuration can be controlled through environment variables."}),"\n",(0,i.jsx)(n.h3,{id:"ai-provider-settings",children:"AI provider settings"}),"\n",(0,i.jsxs)(n.p,{children:["Configure which AI models and providers OpenRAG uses for language processing and embeddings.\nFor more information, see ",(0,i.jsx)(n.a,{href:"/install#application-onboarding",children:"Application onboarding"}),"."]}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Variable"}),(0,i.jsx)(n.th,{children:"Default"}),(0,i.jsx)(n.th,{children:"Description"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"EMBEDDING_MODEL"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"text-embedding-3-small"})}),(0,i.jsx)(n.td,{children:"Embedding model for vector search."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LLM_MODEL"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"gpt-4o-mini"})}),(0,i.jsx)(n.td,{children:"Language model for the chat agent."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"MODEL_PROVIDER"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"openai"})}),(0,i.jsx)(n.td,{children:"Model provider, such as OpenAI or IBM watsonx.ai."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"OPENAI_API_KEY"})}),(0,i.jsx)(n.td,{children:"-"}),(0,i.jsx)(n.td,{children:"Your OpenAI API key. Required."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"PROVIDER_API_KEY"})}),(0,i.jsx)(n.td,{children:"-"}),(0,i.jsx)(n.td,{children:"API key for the model provider."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"PROVIDER_ENDPOINT"})}),(0,i.jsx)(n.td,{children:"-"}),(0,i.jsx)(n.td,{children:"Custom provider endpoint. Only used for IBM or Ollama providers."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"PROVIDER_PROJECT_ID"})}),(0,i.jsx)(n.td,{children:"-"}),(0,i.jsx)(n.td,{children:"Project ID for providers. Only required for the IBM watsonx.ai provider."})]})]})]}),"\n",(0,i.jsx)(n.h3,{id:"document-processing",children:"Document processing"}),"\n",(0,i.jsxs)(n.p,{children:["Control how OpenRAG processes and ingests documents into your knowledge base.\nFor more information, see ",(0,i.jsx)(n.a,{href:"/ingestion",children:"Ingestion"}),"."]}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Variable"}),(0,i.jsx)(n.th,{children:"Default"}),(0,i.jsx)(n.th,{children:"Description"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"CHUNK_OVERLAP"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"200"})}),(0,i.jsx)(n.td,{children:"Overlap between chunks."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"CHUNK_SIZE"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"1000"})}),(0,i.jsx)(n.td,{children:"Text chunk size for document processing."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"DISABLE_INGEST_WITH_LANGFLOW"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"false"})}),(0,i.jsx)(n.td,{children:"Disable Langflow ingestion pipeline."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"DOCLING_OCR_ENGINE"})}),(0,i.jsx)(n.td,{children:"-"}),(0,i.jsx)(n.td,{children:"OCR engine for document processing."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"OCR_ENABLED"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"false"})}),(0,i.jsx)(n.td,{children:"Enable OCR for image processing."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"OPENRAG_DOCUMENTS_PATHS"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"./documents"})}),(0,i.jsx)(n.td,{children:"Document paths for ingestion."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"PICTURE_DESCRIPTIONS_ENABLED"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"false"})}),(0,i.jsx)(n.td,{children:"Enable picture descriptions."})]})]})]}),"\n",(0,i.jsx)(n.h3,{id:"langflow-settings",children:"Langflow settings"}),"\n",(0,i.jsx)(n.p,{children:"Configure Langflow authentication."}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Variable"}),(0,i.jsx)(n.th,{children:"Default"}),(0,i.jsx)(n.th,{children:"Description"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LANGFLOW_AUTO_LOGIN"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"False"})}),(0,i.jsx)(n.td,{children:"Enable auto-login for Langflow."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LANGFLOW_CHAT_FLOW_ID"})}),(0,i.jsx)(n.td,{children:"pre-filled"}),(0,i.jsxs)(n.td,{children:["This value is pre-filled. The default value is found in ",(0,i.jsx)(n.a,{href:"https://github.com/langflow-ai/openrag/blob/main/.env.example",children:".env.example"}),"."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LANGFLOW_ENABLE_SUPERUSER_CLI"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"False"})}),(0,i.jsx)(n.td,{children:"Enable superuser CLI."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LANGFLOW_INGEST_FLOW_ID"})}),(0,i.jsx)(n.td,{children:"pre-filled"}),(0,i.jsxs)(n.td,{children:["This value is pre-filled. The default value is found in ",(0,i.jsx)(n.a,{href:"https://github.com/langflow-ai/openrag/blob/main/.env.example",children:".env.example"}),"."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LANGFLOW_KEY"})}),(0,i.jsx)(n.td,{children:"auto-generated"}),(0,i.jsx)(n.td,{children:"Explicit Langflow API key."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LANGFLOW_NEW_USER_IS_ACTIVE"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"False"})}),(0,i.jsx)(n.td,{children:"New users are active by default."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LANGFLOW_PUBLIC_URL"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"http://localhost:7860"})}),(0,i.jsx)(n.td,{children:"Public URL for Langflow."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LANGFLOW_SECRET_KEY"})}),(0,i.jsx)(n.td,{children:"-"}),(0,i.jsx)(n.td,{children:"Secret key for Langflow internal operations."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LANGFLOW_SUPERUSER"})}),(0,i.jsx)(n.td,{children:"-"}),(0,i.jsx)(n.td,{children:"Langflow admin username. Required."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LANGFLOW_SUPERUSER_PASSWORD"})}),(0,i.jsx)(n.td,{children:"-"}),(0,i.jsx)(n.td,{children:"Langflow admin password. Required."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LANGFLOW_URL"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"http://localhost:7860"})}),(0,i.jsx)(n.td,{children:"Langflow URL."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"NUDGES_FLOW_ID"})}),(0,i.jsx)(n.td,{children:"pre-filled"}),(0,i.jsxs)(n.td,{children:["This value is pre-filled. The default value is found in ",(0,i.jsx)(n.a,{href:"https://github.com/langflow-ai/openrag/blob/main/.env.example",children:".env.example"}),"."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"SYSTEM_PROMPT"})}),(0,i.jsx)(n.td,{children:'"You are a helpful AI assistant with access to a knowledge base. Answer questions based on the provided context."'}),(0,i.jsx)(n.td,{children:"System prompt for the Langflow agent."})]})]})]}),"\n",(0,i.jsx)(n.h3,{id:"oauth-provider-settings",children:"OAuth provider settings"}),"\n",(0,i.jsx)(n.p,{children:"Configure OAuth providers and external service integrations."}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Variable"}),(0,i.jsx)(n.th,{children:"Default"}),(0,i.jsx)(n.th,{children:"Description"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsxs)(n.td,{children:[(0,i.jsx)(n.code,{children:"AWS_ACCESS_KEY_ID"})," / ",(0,i.jsx)(n.code,{children:"AWS_SECRET_ACCESS_KEY"})]}),(0,i.jsx)(n.td,{children:"-"}),(0,i.jsx)(n.td,{children:"AWS integrations."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsxs)(n.td,{children:[(0,i.jsx)(n.code,{children:"GOOGLE_OAUTH_CLIENT_ID"})," / ",(0,i.jsx)(n.code,{children:"GOOGLE_OAUTH_CLIENT_SECRET"})]}),(0,i.jsx)(n.td,{children:"-"}),(0,i.jsx)(n.td,{children:"Google OAuth authentication."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsxs)(n.td,{children:[(0,i.jsx)(n.code,{children:"MICROSOFT_GRAPH_OAUTH_CLIENT_ID"})," / ",(0,i.jsx)(n.code,{children:"MICROSOFT_GRAPH_OAUTH_CLIENT_SECRET"})]}),(0,i.jsx)(n.td,{children:"-"}),(0,i.jsx)(n.td,{children:"Microsoft OAuth."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"WEBHOOK_BASE_URL"})}),(0,i.jsx)(n.td,{children:"-"}),(0,i.jsx)(n.td,{children:"Base URL for webhook endpoints."})]})]})]}),"\n",(0,i.jsx)(n.h3,{id:"opensearch-settings",children:"OpenSearch settings"}),"\n",(0,i.jsx)(n.p,{children:"Configure OpenSearch database authentication."}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Variable"}),(0,i.jsx)(n.th,{children:"Default"}),(0,i.jsx)(n.th,{children:"Description"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"OPENSEARCH_HOST"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"localhost"})}),(0,i.jsx)(n.td,{children:"OpenSearch host."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"OPENSEARCH_PASSWORD"})}),(0,i.jsx)(n.td,{children:"-"}),(0,i.jsx)(n.td,{children:"Password for OpenSearch admin user. Required."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"OPENSEARCH_PORT"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"9200"})}),(0,i.jsx)(n.td,{children:"OpenSearch port."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"OPENSEARCH_USERNAME"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"admin"})}),(0,i.jsx)(n.td,{children:"OpenSearch username."})]})]})]}),"\n",(0,i.jsx)(n.h3,{id:"system-settings",children:"System settings"}),"\n",(0,i.jsx)(n.p,{children:"Configure general system components, session management, and logging."}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Variable"}),(0,i.jsx)(n.th,{children:"Default"}),(0,i.jsx)(n.th,{children:"Description"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LANGFLOW_KEY_RETRIES"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"15"})}),(0,i.jsx)(n.td,{children:"Number of retries for Langflow key generation."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LANGFLOW_KEY_RETRY_DELAY"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"2.0"})}),(0,i.jsx)(n.td,{children:"Delay between retries in seconds."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LANGFLOW_VERSION"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"latest"})}),(0,i.jsx)(n.td,{children:"Langflow Docker image version."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LOG_FORMAT"})}),(0,i.jsx)(n.td,{children:"-"}),(0,i.jsx)(n.td,{children:'Log format (set to "json" for JSON output).'})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LOG_LEVEL"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"INFO"})}),(0,i.jsx)(n.td,{children:"Logging level (DEBUG, INFO, WARNING, ERROR)."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"MAX_WORKERS"})}),(0,i.jsx)(n.td,{children:"-"}),(0,i.jsx)(n.td,{children:"Maximum number of workers for document processing."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"OPENRAG_VERSION"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"latest"})}),(0,i.jsx)(n.td,{children:"OpenRAG Docker image version."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"SERVICE_NAME"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"openrag"})}),(0,i.jsx)(n.td,{children:"Service name for logging."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"SESSION_SECRET"})}),(0,i.jsx)(n.td,{children:"auto-generated"}),(0,i.jsx)(n.td,{children:"Session management."})]})]})]}),"\n",(0,i.jsx)(n.h2,{id:"langflow-runtime-overrides",children:"Langflow runtime overrides"}),"\n",(0,i.jsx)(n.p,{children:"Langflow runtime overrides allow you to modify component settings at runtime without changing the base configuration."}),"\n",(0,i.jsxs)(n.p,{children:["Runtime overrides are implemented through ",(0,i.jsx)(n.strong,{children:"tweaks"})," - parameter modifications that are passed to specific Langflow components during flow execution."]}),"\n",(0,i.jsxs)(n.p,{children:["For more information on tweaks, see ",(0,i.jsx)(n.a,{href:"https://docs.langflow.org/concepts-publish#input-schema",children:"Input schema (tweaks)"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"default-values-and-fallbacks",children:"Default values and fallbacks"}),"\n",(0,i.jsx)(n.p,{children:"When no environment variables or configuration file values are provided, OpenRAG uses default values.\nThese values can be found in the code base at the following locations."}),"\n",(0,i.jsx)(n.h3,{id:"openrag-configuration-defaults",children:"OpenRAG configuration defaults"}),"\n",(0,i.jsxs)(n.p,{children:["These values are defined in ",(0,i.jsxs)(n.a,{href:"https://github.com/langflow-ai/openrag/blob/main/src/config/config_manager.py",children:[(0,i.jsx)(n.code,{children:"config_manager.py"})," in the OpenRAG repository"]}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"system-configuration-defaults",children:"System configuration defaults"}),"\n",(0,i.jsxs)(n.p,{children:["These fallback values are defined in ",(0,i.jsxs)(n.a,{href:"https://github.com/langflow-ai/openrag/blob/main/src/config/settings.py",children:[(0,i.jsx)(n.code,{children:"settings.py"})," in the OpenRAG repository"]}),"."]})]})}function a(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}}}]); \ No newline at end of file diff --git a/assets/js/c8078f0a.a2c8f112.js b/assets/js/c8078f0a.a2c8f112.js new file mode 100644 index 00000000..1f172966 --- /dev/null +++ b/assets/js/c8078f0a.a2c8f112.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkopenrag_docs=self.webpackChunkopenrag_docs||[]).push([[26],{9179:(e,n,r)=>{r.d(n,{A:()=>d});r(6540);var s=r(4827),i=r(4848);function d({name:e,...n}){const r=s[e];return r?(0,i.jsx)(r,{...n}):null}},9196:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>c,contentTitle:()=>t,default:()=>a,frontMatter:()=>l,metadata:()=>s,toc:()=>o});const s=JSON.parse('{"id":"reference/configuration","title":"Environment variables","description":"OpenRAG recognizes supported environment variables from the following sources:","source":"@site/docs/reference/configuration.mdx","sourceDirName":"reference","slug":"/reference/configuration","permalink":"/reference/configuration","draft":false,"unlisted":false,"editUrl":"https://github.com/openrag/openrag/tree/main/docs/docs/reference/configuration.mdx","tags":[],"version":"current","frontMatter":{"title":"Environment variables","slug":"/reference/configuration"},"sidebar":"tutorialSidebar","previous":{"title":"Docling in OpenRAG","permalink":"/ingestion"},"next":{"title":"Troubleshooting","permalink":"/support/troubleshoot"}}');var i=r(4848),d=r(8453);r(9179),r(1470),r(9365);const l={title:"Environment variables",slug:"/reference/configuration"},t=void 0,c={},o=[{value:"Configure environment variables",id:"configure-environment-variables",level:2},{value:"Set environment variables",id:"set-environment-variables",level:3},{value:"Supported environment variables",id:"supported-environment-variables",level:2},{value:"AI provider settings",id:"ai-provider-settings",level:3},{value:"Document processing",id:"document-processing",level:3},{value:"Langflow settings",id:"langflow-settings",level:3},{value:"OAuth provider settings",id:"oauth-provider-settings",level:3},{value:"OpenSearch settings",id:"opensearch-settings",level:3},{value:"System settings",id:"system-settings",level:3},{value:"Langflow runtime overrides",id:"langflow-runtime-overrides",level:2},{value:"Default values and fallbacks",id:"default-values-and-fallbacks",level:2},{value:"OpenRAG configuration defaults",id:"openrag-configuration-defaults",level:3},{value:"System configuration defaults",id:"system-configuration-defaults",level:3}];function h(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,d.R)(),...e.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(n.p,{children:["OpenRAG recognizes ",(0,i.jsx)(n.a,{href:"#supported-environment-variables",children:"supported environment variables"})," from the following sources:"]}),"\n",(0,i.jsxs)(n.ul,{children:["\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"#supported-environment-variables",children:"Environment variables"})," - Values set in the ",(0,i.jsx)(n.code,{children:".env"})," file."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"#langflow-runtime-overrides",children:"Langflow runtime overrides"})," - Langflow components may tweak environment variables at runtime."]}),"\n",(0,i.jsxs)(n.li,{children:[(0,i.jsx)(n.a,{href:"#default-values-and-fallbacks",children:"Default or fallback values"})," - These values are default or fallback values if OpenRAG doesn't find a value."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"configure-environment-variables",children:"Configure environment variables"}),"\n",(0,i.jsxs)(n.p,{children:["Environment variables are set in a ",(0,i.jsx)(n.code,{children:".env"})," file in the root of your OpenRAG project directory."]}),"\n",(0,i.jsxs)(n.p,{children:["For an example ",(0,i.jsx)(n.code,{children:".env"})," file, see ",(0,i.jsxs)(n.a,{href:"https://github.com/langflow-ai/openrag/blob/main/.env.example",children:[(0,i.jsx)(n.code,{children:".env.example"})," in the OpenRAG repository"]}),"."]}),"\n",(0,i.jsxs)(n.p,{children:["The Docker Compose files are populated with values from your ",(0,i.jsx)(n.code,{children:".env"}),", so you don't need to edit the Docker Compose files manually."]}),"\n",(0,i.jsx)(n.p,{children:"Environment variables always take precedence over other variables."}),"\n",(0,i.jsx)(n.h3,{id:"set-environment-variables",children:"Set environment variables"}),"\n",(0,i.jsx)(n.p,{children:"To set environment variables, do the following."}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Stop OpenRAG."}),"\n",(0,i.jsxs)(n.li,{children:["Set the values in the ",(0,i.jsx)(n.code,{children:".env"})," file:","\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{className:"language-bash",children:"LOG_LEVEL=DEBUG\nLOG_FORMAT=json\nSERVICE_NAME=openrag-dev\n"})}),"\n"]}),"\n",(0,i.jsx)(n.li,{children:"Start OpenRAG."}),"\n"]}),"\n",(0,i.jsxs)(n.p,{children:["Updating provider API keys or provider endpoints in the ",(0,i.jsx)(n.code,{children:".env"})," file will not take effect after ",(0,i.jsx)(n.a,{href:"/install#application-onboarding",children:"Application onboarding"}),". To change these values, you must:"]}),"\n",(0,i.jsxs)(n.ol,{children:["\n",(0,i.jsx)(n.li,{children:"Stop OpenRAG."}),"\n",(0,i.jsxs)(n.li,{children:["Remove the containers:","\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"docker-compose down\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["Update the values in your ",(0,i.jsx)(n.code,{children:".env"})," file."]}),"\n",(0,i.jsxs)(n.li,{children:["Start OpenRAG containers.","\n",(0,i.jsx)(n.pre,{children:(0,i.jsx)(n.code,{children:"docker-compose up -d\n"})}),"\n"]}),"\n",(0,i.jsxs)(n.li,{children:["Complete ",(0,i.jsx)(n.a,{href:"/install#application-onboarding",children:"Application onboarding"})," again."]}),"\n"]}),"\n",(0,i.jsx)(n.h2,{id:"supported-environment-variables",children:"Supported environment variables"}),"\n",(0,i.jsx)(n.p,{children:"All OpenRAG configuration can be controlled through environment variables."}),"\n",(0,i.jsx)(n.h3,{id:"ai-provider-settings",children:"AI provider settings"}),"\n",(0,i.jsxs)(n.p,{children:["Configure which AI models and providers OpenRAG uses for language processing and embeddings.\nFor more information, see ",(0,i.jsx)(n.a,{href:"/install#application-onboarding",children:"Application onboarding"}),"."]}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Variable"}),(0,i.jsx)(n.th,{children:"Default"}),(0,i.jsx)(n.th,{children:"Description"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"EMBEDDING_MODEL"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"text-embedding-3-small"})}),(0,i.jsx)(n.td,{children:"Embedding model for vector search."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LLM_MODEL"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"gpt-4o-mini"})}),(0,i.jsx)(n.td,{children:"Language model for the chat agent."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"MODEL_PROVIDER"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"openai"})}),(0,i.jsx)(n.td,{children:"Model provider, such as OpenAI or IBM watsonx.ai."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"OPENAI_API_KEY"})}),(0,i.jsx)(n.td,{children:"-"}),(0,i.jsx)(n.td,{children:"Your OpenAI API key. Required."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"PROVIDER_API_KEY"})}),(0,i.jsx)(n.td,{children:"-"}),(0,i.jsx)(n.td,{children:"API key for the model provider."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"PROVIDER_ENDPOINT"})}),(0,i.jsx)(n.td,{children:"-"}),(0,i.jsx)(n.td,{children:"Custom provider endpoint. Only used for IBM or Ollama providers."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"PROVIDER_PROJECT_ID"})}),(0,i.jsx)(n.td,{children:"-"}),(0,i.jsx)(n.td,{children:"Project ID for providers. Only required for the IBM watsonx.ai provider."})]})]})]}),"\n",(0,i.jsx)(n.h3,{id:"document-processing",children:"Document processing"}),"\n",(0,i.jsxs)(n.p,{children:["Control how OpenRAG processes and ingests documents into your knowledge base.\nFor more information, see ",(0,i.jsx)(n.a,{href:"/ingestion",children:"Ingestion"}),"."]}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Variable"}),(0,i.jsx)(n.th,{children:"Default"}),(0,i.jsx)(n.th,{children:"Description"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"CHUNK_OVERLAP"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"200"})}),(0,i.jsx)(n.td,{children:"Overlap between chunks."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"CHUNK_SIZE"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"1000"})}),(0,i.jsx)(n.td,{children:"Text chunk size for document processing."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"DISABLE_INGEST_WITH_LANGFLOW"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"false"})}),(0,i.jsx)(n.td,{children:"Disable Langflow ingestion pipeline."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"DOCLING_OCR_ENGINE"})}),(0,i.jsx)(n.td,{children:"-"}),(0,i.jsx)(n.td,{children:"OCR engine for document processing."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"OCR_ENABLED"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"false"})}),(0,i.jsx)(n.td,{children:"Enable OCR for image processing."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"OPENRAG_DOCUMENTS_PATHS"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"./documents"})}),(0,i.jsx)(n.td,{children:"Document paths for ingestion."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"PICTURE_DESCRIPTIONS_ENABLED"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"false"})}),(0,i.jsx)(n.td,{children:"Enable picture descriptions."})]})]})]}),"\n",(0,i.jsx)(n.h3,{id:"langflow-settings",children:"Langflow settings"}),"\n",(0,i.jsx)(n.p,{children:"Configure Langflow authentication."}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Variable"}),(0,i.jsx)(n.th,{children:"Default"}),(0,i.jsx)(n.th,{children:"Description"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LANGFLOW_AUTO_LOGIN"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"False"})}),(0,i.jsx)(n.td,{children:"Enable auto-login for Langflow."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LANGFLOW_CHAT_FLOW_ID"})}),(0,i.jsx)(n.td,{children:"pre-filled"}),(0,i.jsxs)(n.td,{children:["This value is pre-filled. The default value is found in ",(0,i.jsx)(n.a,{href:"https://github.com/langflow-ai/openrag/blob/main/.env.example",children:".env.example"}),"."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LANGFLOW_ENABLE_SUPERUSER_CLI"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"False"})}),(0,i.jsx)(n.td,{children:"Enable superuser CLI."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LANGFLOW_INGEST_FLOW_ID"})}),(0,i.jsx)(n.td,{children:"pre-filled"}),(0,i.jsxs)(n.td,{children:["This value is pre-filled. The default value is found in ",(0,i.jsx)(n.a,{href:"https://github.com/langflow-ai/openrag/blob/main/.env.example",children:".env.example"}),"."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LANGFLOW_KEY"})}),(0,i.jsx)(n.td,{children:"auto-generated"}),(0,i.jsx)(n.td,{children:"Explicit Langflow API key."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LANGFLOW_NEW_USER_IS_ACTIVE"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"False"})}),(0,i.jsx)(n.td,{children:"New users are active by default."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LANGFLOW_PUBLIC_URL"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"http://localhost:7860"})}),(0,i.jsx)(n.td,{children:"Public URL for Langflow."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LANGFLOW_SECRET_KEY"})}),(0,i.jsx)(n.td,{children:"-"}),(0,i.jsx)(n.td,{children:"Secret key for Langflow internal operations."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LANGFLOW_SUPERUSER"})}),(0,i.jsx)(n.td,{children:"-"}),(0,i.jsx)(n.td,{children:"Langflow admin username. Required."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LANGFLOW_SUPERUSER_PASSWORD"})}),(0,i.jsx)(n.td,{children:"-"}),(0,i.jsx)(n.td,{children:"Langflow admin password. Required."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LANGFLOW_URL"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"http://localhost:7860"})}),(0,i.jsx)(n.td,{children:"Langflow URL."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"NUDGES_FLOW_ID"})}),(0,i.jsx)(n.td,{children:"pre-filled"}),(0,i.jsxs)(n.td,{children:["This value is pre-filled. The default value is found in ",(0,i.jsx)(n.a,{href:"https://github.com/langflow-ai/openrag/blob/main/.env.example",children:".env.example"}),"."]})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"SYSTEM_PROMPT"})}),(0,i.jsx)(n.td,{children:'"You are a helpful AI assistant with access to a knowledge base. Answer questions based on the provided context."'}),(0,i.jsx)(n.td,{children:"System prompt for the Langflow agent."})]})]})]}),"\n",(0,i.jsx)(n.h3,{id:"oauth-provider-settings",children:"OAuth provider settings"}),"\n",(0,i.jsx)(n.p,{children:"Configure OAuth providers and external service integrations."}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Variable"}),(0,i.jsx)(n.th,{children:"Default"}),(0,i.jsx)(n.th,{children:"Description"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsxs)(n.td,{children:[(0,i.jsx)(n.code,{children:"AWS_ACCESS_KEY_ID"})," / ",(0,i.jsx)(n.code,{children:"AWS_SECRET_ACCESS_KEY"})]}),(0,i.jsx)(n.td,{children:"-"}),(0,i.jsx)(n.td,{children:"AWS integrations."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsxs)(n.td,{children:[(0,i.jsx)(n.code,{children:"GOOGLE_OAUTH_CLIENT_ID"})," / ",(0,i.jsx)(n.code,{children:"GOOGLE_OAUTH_CLIENT_SECRET"})]}),(0,i.jsx)(n.td,{children:"-"}),(0,i.jsx)(n.td,{children:"Google OAuth authentication."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsxs)(n.td,{children:[(0,i.jsx)(n.code,{children:"MICROSOFT_GRAPH_OAUTH_CLIENT_ID"})," / ",(0,i.jsx)(n.code,{children:"MICROSOFT_GRAPH_OAUTH_CLIENT_SECRET"})]}),(0,i.jsx)(n.td,{children:"-"}),(0,i.jsx)(n.td,{children:"Microsoft OAuth."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"WEBHOOK_BASE_URL"})}),(0,i.jsx)(n.td,{children:"-"}),(0,i.jsx)(n.td,{children:"Base URL for webhook endpoints."})]})]})]}),"\n",(0,i.jsx)(n.h3,{id:"opensearch-settings",children:"OpenSearch settings"}),"\n",(0,i.jsx)(n.p,{children:"Configure OpenSearch database authentication."}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Variable"}),(0,i.jsx)(n.th,{children:"Default"}),(0,i.jsx)(n.th,{children:"Description"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"OPENSEARCH_HOST"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"localhost"})}),(0,i.jsx)(n.td,{children:"OpenSearch host."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"OPENSEARCH_PASSWORD"})}),(0,i.jsx)(n.td,{children:"-"}),(0,i.jsx)(n.td,{children:"Password for OpenSearch admin user. Required."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"OPENSEARCH_PORT"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"9200"})}),(0,i.jsx)(n.td,{children:"OpenSearch port."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"OPENSEARCH_USERNAME"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"admin"})}),(0,i.jsx)(n.td,{children:"OpenSearch username."})]})]})]}),"\n",(0,i.jsx)(n.h3,{id:"system-settings",children:"System settings"}),"\n",(0,i.jsx)(n.p,{children:"Configure general system components, session management, and logging."}),"\n",(0,i.jsxs)(n.table,{children:[(0,i.jsx)(n.thead,{children:(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.th,{children:"Variable"}),(0,i.jsx)(n.th,{children:"Default"}),(0,i.jsx)(n.th,{children:"Description"})]})}),(0,i.jsxs)(n.tbody,{children:[(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LANGFLOW_KEY_RETRIES"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"15"})}),(0,i.jsx)(n.td,{children:"Number of retries for Langflow key generation."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LANGFLOW_KEY_RETRY_DELAY"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"2.0"})}),(0,i.jsx)(n.td,{children:"Delay between retries in seconds."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LANGFLOW_VERSION"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"latest"})}),(0,i.jsx)(n.td,{children:"Langflow Docker image version."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LOG_FORMAT"})}),(0,i.jsx)(n.td,{children:"-"}),(0,i.jsx)(n.td,{children:'Log format (set to "json" for JSON output).'})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"LOG_LEVEL"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"INFO"})}),(0,i.jsx)(n.td,{children:"Logging level (DEBUG, INFO, WARNING, ERROR)."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"MAX_WORKERS"})}),(0,i.jsx)(n.td,{children:"-"}),(0,i.jsx)(n.td,{children:"Maximum number of workers for document processing."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"OPENRAG_VERSION"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"latest"})}),(0,i.jsx)(n.td,{children:"OpenRAG Docker image version."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"SERVICE_NAME"})}),(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"openrag"})}),(0,i.jsx)(n.td,{children:"Service name for logging."})]}),(0,i.jsxs)(n.tr,{children:[(0,i.jsx)(n.td,{children:(0,i.jsx)(n.code,{children:"SESSION_SECRET"})}),(0,i.jsx)(n.td,{children:"auto-generated"}),(0,i.jsx)(n.td,{children:"Session management."})]})]})]}),"\n",(0,i.jsx)(n.h2,{id:"langflow-runtime-overrides",children:"Langflow runtime overrides"}),"\n",(0,i.jsx)(n.p,{children:"Langflow runtime overrides allow you to modify component settings at runtime without changing the base configuration."}),"\n",(0,i.jsxs)(n.p,{children:["Runtime overrides are implemented through ",(0,i.jsx)(n.strong,{children:"tweaks"})," - parameter modifications that are passed to specific Langflow components during flow execution."]}),"\n",(0,i.jsxs)(n.p,{children:["For more information on tweaks, see ",(0,i.jsx)(n.a,{href:"https://docs.langflow.org/concepts-publish#input-schema",children:"Input schema (tweaks)"}),"."]}),"\n",(0,i.jsx)(n.h2,{id:"default-values-and-fallbacks",children:"Default values and fallbacks"}),"\n",(0,i.jsx)(n.p,{children:"When no environment variables or configuration file values are provided, OpenRAG uses default values.\nThese values can be found in the code base at the following locations."}),"\n",(0,i.jsx)(n.h3,{id:"openrag-configuration-defaults",children:"OpenRAG configuration defaults"}),"\n",(0,i.jsxs)(n.p,{children:["These values are defined in ",(0,i.jsxs)(n.a,{href:"https://github.com/langflow-ai/openrag/blob/main/src/config/config_manager.py",children:[(0,i.jsx)(n.code,{children:"config_manager.py"})," in the OpenRAG repository"]}),"."]}),"\n",(0,i.jsx)(n.h3,{id:"system-configuration-defaults",children:"System configuration defaults"}),"\n",(0,i.jsxs)(n.p,{children:["These fallback values are defined in ",(0,i.jsxs)(n.a,{href:"https://github.com/langflow-ai/openrag/blob/main/src/config/settings.py",children:[(0,i.jsx)(n.code,{children:"settings.py"})," in the OpenRAG repository"]}),"."]})]})}function a(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,i.jsx)(n,{...e,children:(0,i.jsx)(h,{...e})}):h(e)}}}]); \ No newline at end of file diff --git a/assets/js/ca2c3c0c.57e04881.js b/assets/js/ca2c3c0c.57e04881.js new file mode 100644 index 00000000..3e0dc0fa --- /dev/null +++ b/assets/js/ca2c3c0c.57e04881.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkopenrag_docs=self.webpackChunkopenrag_docs||[]).push([[919],{3782:(e,n,s)=>{s.d(n,{Ay:()=>l,RM:()=>r});var o=s(4848),t=s(8453),i=s(9179);const r=[];function c(e){const n={a:"a",p:"p",strong:"strong",...(0,t.R)(),...e.components};return(0,o.jsxs)(n.p,{children:["All flows included with OpenRAG are designed to be modular, performant, and provider-agnostic.\nTo modify a flow, click ",(0,o.jsx)(i.A,{name:"Settings2","aria-hidden":"true"})," ",(0,o.jsx)(n.strong,{children:"Settings"}),", and click ",(0,o.jsx)(n.strong,{children:"Edit in Langflow"}),".\nOpenRAG's visual editor is based on the ",(0,o.jsx)(n.a,{href:"https://docs.langflow.org/concepts-overview",children:"Langflow visual editor"}),", so you can edit your flows to match your specific use case."]})}function l(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},7125:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>a,contentTitle:()=>l,default:()=>p,frontMatter:()=>c,metadata:()=>o,toc:()=>d});const o=JSON.parse('{"id":"core-components/ingestion","title":"Docling in OpenRAG","description":"OpenRAG uses Docling for its document ingestion pipeline.","source":"@site/docs/core-components/ingestion.mdx","sourceDirName":"core-components","slug":"/ingestion","permalink":"/ingestion","draft":false,"unlisted":false,"editUrl":"https://github.com/openrag/openrag/tree/main/docs/docs/core-components/ingestion.mdx","tags":[],"version":"current","frontMatter":{"title":"Docling in OpenRAG","slug":"/ingestion"},"sidebar":"tutorialSidebar","previous":{"title":"OpenSearch in OpenRAG","permalink":"/knowledge"},"next":{"title":"Environment variables","permalink":"/reference/configuration"}}');var t=s(4848),i=s(8453),r=(s(9179),s(1470),s(9365),s(3782));const c={title:"Docling in OpenRAG",slug:"/ingestion"},l=void 0,a={},d=[{value:"Docling ingestion settings",id:"docling-ingestion-settings",level:2},{value:"Use OpenRAG default ingestion instead of Docling serve",id:"use-openrag-default-ingestion-instead-of-docling-serve",level:2},{value:"Knowledge ingestion flows",id:"knowledge-ingestion-flows",level:2},...r.RM,{value:"OpenSearch URL Ingestion flow",id:"url-flow",level:3}];function h(e){const n={a:"a",br:"br",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:["OpenRAG uses ",(0,t.jsx)(n.a,{href:"https://docling-project.github.io/docling/",children:"Docling"})," for its document ingestion pipeline.\nMore specifically, OpenRAG uses ",(0,t.jsx)(n.a,{href:"https://github.com/docling-project/docling-serve",children:"Docling Serve"}),", which starts a ",(0,t.jsx)(n.code,{children:"docling serve"})," process on your local machine and runs Docling ingestion through an API service."]}),"\n",(0,t.jsxs)(n.p,{children:["Docling ingests documents from your local machine or OAuth connectors, splits them into chunks, and stores them as separate, structured documents in the OpenSearch ",(0,t.jsx)(n.code,{children:"documents"})," index."]}),"\n",(0,t.jsx)(n.p,{children:"OpenRAG chose Docling for its support for a wide variety of file formats, high performance, and advanced understanding of tables and images."}),"\n",(0,t.jsx)(n.h2,{id:"docling-ingestion-settings",children:"Docling ingestion settings"}),"\n",(0,t.jsx)(n.p,{children:"These settings configure the Docling ingestion parameters."}),"\n",(0,t.jsxs)(n.p,{children:["OpenRAG will warn you if ",(0,t.jsx)(n.code,{children:"docling serve"})," is not running.\nTo start or stop ",(0,t.jsx)(n.code,{children:"docling serve"})," or any other native services, in the TUI main menu, click ",(0,t.jsx)(n.strong,{children:"Start Native Services"})," or ",(0,t.jsx)(n.strong,{children:"Stop Native Services"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Embedding model"})," determines which AI model is used to create vector embeddings. The default is ",(0,t.jsx)(n.code,{children:"text-embedding-3-small"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Chunk size"})," determines how large each text chunk is in number of characters.\nLarger chunks yield more context per chunk, but may include irrelevant information. Smaller chunks yield more precise semantic search, but may lack context.\nThe default value of ",(0,t.jsx)(n.code,{children:"1000"})," characters provides a good starting point that balances these considerations."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Chunk overlap"})," controls the number of characters that overlap over chunk boundaries.\nUse larger overlap values for documents where context is most important, and use smaller overlap values for simpler documents, or when optimization is most important.\nThe default value of 200 characters of overlap with a chunk size of 1000 (20% overlap) is suitable for general use cases. Decrease the overlap to 10% for a more efficient pipeline, or increase to 40% for more complex documents."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"OCR"})," enables or disabled OCR processing when extracting text from images and scanned documents.\nOCR is disabled by default. This setting is best suited for processing text-based documents as quickly as possible with Docling's ",(0,t.jsx)(n.a,{href:"https://docling-project.github.io/docling/reference/document_converter/",children:(0,t.jsx)(n.code,{children:"DocumentConverter"})}),". Images are ignored and not processed."]}),"\n",(0,t.jsx)(n.p,{children:"Enable OCR when you are processing documents containing images with text that requires extraction, or for scanned documents. Enabling OCR can slow ingestion performance."}),"\n",(0,t.jsxs)(n.p,{children:["If OpenRAG detects that the local machine is running on macOS, OpenRAG uses the ",(0,t.jsx)(n.a,{href:"https://www.piwheels.org/project/ocrmac/",children:"ocrmac"})," OCR engine. Other platforms use ",(0,t.jsx)(n.a,{href:"https://www.jaided.ai/easyocr/",children:"easyocr"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Picture descriptions"})," adds image descriptions generated by the ",(0,t.jsx)(n.a,{href:"https://huggingface.co/HuggingFaceTB/SmolVLM-Instruct",children:"SmolVLM-256M-Instruct"})," model to OCR processing. Enabling picture descriptions can slow ingestion performance."]}),"\n",(0,t.jsx)(n.h2,{id:"use-openrag-default-ingestion-instead-of-docling-serve",children:"Use OpenRAG default ingestion instead of Docling serve"}),"\n",(0,t.jsxs)(n.p,{children:["If you want to use OpenRAG's built-in pipeline instead of Docling serve, set ",(0,t.jsx)(n.code,{children:"DISABLE_INGEST_WITH_LANGFLOW=true"})," in ",(0,t.jsx)(n.a,{href:"/reference/configuration#document-processing",children:"Environment variables"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"The built-in pipeline still uses the Docling processor, but uses it directly without the Docling Serve API."}),"\n",(0,t.jsxs)(n.p,{children:["For more information, see ",(0,t.jsxs)(n.a,{href:"https://github.com/langflow-ai/openrag/blob/main/src/models/processors.py#L58",children:[(0,t.jsx)(n.code,{children:"processors.py"})," in the OpenRAG repository"]}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"knowledge-ingestion-flows",children:"Knowledge ingestion flows"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://docs.langflow.org/concepts-overview",children:"Flows"})," in Langflow are functional representations of application workflows, with multiple ",(0,t.jsx)(n.a,{href:"https://docs.langflow.org/concepts-components",children:"component"})," nodes connected as single steps in a workflow."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.strong,{children:"OpenSearch Ingestion"})," flow is the default knowledge ingestion flow in OpenRAG: when you ",(0,t.jsx)(n.strong,{children:"Add Knowledge"})," in OpenRAG, you run the OpenSearch Ingestion flow in the background. The flow ingests documents using ",(0,t.jsx)(n.strong,{children:"Docling Serve"})," to import and process documents."]}),"\n",(0,t.jsx)(n.p,{children:"This flow contains ten components connected together to process and store documents in your knowledge base."}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsxs)(n.a,{href:"https://docs.langflow.org/bundles-docling",children:[(0,t.jsx)(n.strong,{children:"Docling Serve"})," component"]})," processes input documents by connecting to your instance of Docling Serve."]}),"\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsxs)(n.a,{href:"https://docs.langflow.org/components-docling",children:[(0,t.jsx)(n.strong,{children:"Export DoclingDocument"})," component"]})," exports the processed DoclingDocument to markdown format with image export mode set to placeholder. This conversion makes the structured document data into a standardized format for further processing."]}),"\n",(0,t.jsxs)(n.li,{children:["Three ",(0,t.jsxs)(n.a,{href:"https://docs.langflow.org/components-processing#dataframe-operations",children:[(0,t.jsx)(n.strong,{children:"DataFrame Operations"})," components"]})," sequentially add metadata columns to the document data of ",(0,t.jsx)(n.code,{children:"filename"}),", ",(0,t.jsx)(n.code,{children:"file_size"}),", and ",(0,t.jsx)(n.code,{children:"mimetype"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsxs)(n.a,{href:"https://docs.langflow.org/components-processing#split-text",children:[(0,t.jsx)(n.strong,{children:"Split Text"})," component"]})," splits the processed text into chunks with a chunk size of 1000 characters and an overlap of 200 characters."]}),"\n",(0,t.jsxs)(n.li,{children:["Four ",(0,t.jsx)(n.strong,{children:"Secret Input"})," components provide secure access to configuration variables: ",(0,t.jsx)(n.code,{children:"CONNECTOR_TYPE"}),", ",(0,t.jsx)(n.code,{children:"OWNER"}),", ",(0,t.jsx)(n.code,{children:"OWNER_EMAIL"}),", and ",(0,t.jsx)(n.code,{children:"OWNER_NAME"}),". These are runtime variables populated from OAuth login."]}),"\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsx)(n.strong,{children:"Create Data"})," component combines the secret inputs into a structured data object that will be associated with the document embeddings."]}),"\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsxs)(n.a,{href:"https://docs.langflow.org/components-embedding-models",children:[(0,t.jsx)(n.strong,{children:"Embedding Model"})," component"]})," generates vector embeddings using OpenAI's ",(0,t.jsx)(n.code,{children:"text-embedding-3-small"})," model. The embedding model is selected at [Application onboarding] and cannot be changed."]}),"\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsxs)(n.a,{href:"https://docs.langflow.org/bundles-elastic#opensearch",children:[(0,t.jsx)(n.strong,{children:"OpenSearch"})," component"]})," stores the processed documents and their embeddings in the ",(0,t.jsx)(n.code,{children:"documents"})," index at ",(0,t.jsx)(n.code,{children:"https://opensearch:9200"}),". By default, the component is authenticated with a JWT token, but you can also select ",(0,t.jsx)(n.code,{children:"basic"})," auth mode, and enter your OpenSearch admin username and password."]}),"\n"]}),"\n",(0,t.jsx)(r.Ay,{}),"\n",(0,t.jsx)(n.h3,{id:"url-flow",children:"OpenSearch URL Ingestion flow"}),"\n",(0,t.jsxs)(n.p,{children:["An additional knowledge ingestion flow is included in OpenRAG, where it is used as an MCP tool by the ",(0,t.jsx)(n.a,{href:"/agents#flow",children:(0,t.jsx)(n.strong,{children:"Open Search Agent flow"})}),".\nThe agent calls this component to fetch web content, and the results are ingested into OpenSearch."]}),"\n",(0,t.jsxs)(n.p,{children:["For more on using MCP clients in Langflow, see ",(0,t.jsx)(n.a,{href:"https://docs.langflow.org/mcp-client",children:"MCP clients"}),".",(0,t.jsx)(n.br,{}),"\n","To connect additional MCP servers to the MCP client, see ",(0,t.jsx)(n.a,{href:"https://docs.langflow.org/mcp-tutorial",children:"Connect to MCP servers from your application"}),"."]})]})}function p(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},9179:(e,n,s)=>{s.d(n,{A:()=>i});s(6540);var o=s(4827),t=s(4848);function i({name:e,...n}){const s=o[e];return s?(0,t.jsx)(s,{...n}):null}}}]); \ No newline at end of file diff --git a/assets/js/ca2c3c0c.7eb785b4.js b/assets/js/ca2c3c0c.7eb785b4.js deleted file mode 100644 index cbed58f7..00000000 --- a/assets/js/ca2c3c0c.7eb785b4.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkopenrag_docs=self.webpackChunkopenrag_docs||[]).push([[919],{3782:(e,n,s)=>{s.d(n,{Ay:()=>l,RM:()=>r});var o=s(4848),t=s(8453),i=s(9179);const r=[];function c(e){const n={a:"a",p:"p",strong:"strong",...(0,t.R)(),...e.components};return(0,o.jsxs)(n.p,{children:["All flows included with OpenRAG are designed to be modular, performant, and provider-agnostic.\nTo modify a flow, click ",(0,o.jsx)(i.A,{name:"Settings2","aria-hidden":"true"})," ",(0,o.jsx)(n.strong,{children:"Settings"}),", and click ",(0,o.jsx)(n.strong,{children:"Edit in Langflow"}),".\nOpenRAG's visual editor is based on the ",(0,o.jsx)(n.a,{href:"https://docs.langflow.org/concepts-overview",children:"Langflow visual editor"}),", so you can edit your flows to match your specific use case."]})}function l(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,o.jsx)(n,{...e,children:(0,o.jsx)(c,{...e})}):c(e)}},7125:(e,n,s)=>{s.r(n),s.d(n,{assets:()=>a,contentTitle:()=>l,default:()=>g,frontMatter:()=>c,metadata:()=>o,toc:()=>d});const o=JSON.parse('{"id":"core-components/ingestion","title":"Docling Ingestion","description":"OpenRAG uses Docling for its document ingestion pipeline.","source":"@site/docs/core-components/ingestion.mdx","sourceDirName":"core-components","slug":"/ingestion","permalink":"/ingestion","draft":false,"unlisted":false,"editUrl":"https://github.com/openrag/openrag/tree/main/docs/docs/core-components/ingestion.mdx","tags":[],"version":"current","frontMatter":{"title":"Docling Ingestion","slug":"/ingestion"},"sidebar":"tutorialSidebar","previous":{"title":"OpenSearch Knowledge","permalink":"/knowledge"},"next":{"title":"Environment variables","permalink":"/reference/configuration"}}');var t=s(4848),i=s(8453),r=(s(9179),s(1470),s(9365),s(3782));const c={title:"Docling Ingestion",slug:"/ingestion"},l=void 0,a={},d=[{value:"Docling ingestion settings",id:"docling-ingestion-settings",level:2},{value:"Use OpenRAG default ingestion instead of Docling serve",id:"use-openrag-default-ingestion-instead-of-docling-serve",level:2},{value:"Knowledge ingestion flows",id:"knowledge-ingestion-flows",level:2},...r.RM,{value:"OpenSearch URL Ingestion flow",id:"url-flow",level:3}];function h(e){const n={a:"a",br:"br",code:"code",h2:"h2",h3:"h3",li:"li",p:"p",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:["OpenRAG uses ",(0,t.jsx)(n.a,{href:"https://docling-project.github.io/docling/",children:"Docling"})," for its document ingestion pipeline.\nMore specifically, OpenRAG uses ",(0,t.jsx)(n.a,{href:"https://github.com/docling-project/docling-serve",children:"Docling Serve"}),", which starts a ",(0,t.jsx)(n.code,{children:"docling serve"})," process on your local machine and runs Docling ingestion through an API service."]}),"\n",(0,t.jsxs)(n.p,{children:["Docling ingests documents from your local machine or OAuth connectors, splits them into chunks, and stores them as separate, structured documents in the OpenSearch ",(0,t.jsx)(n.code,{children:"documents"})," index."]}),"\n",(0,t.jsx)(n.p,{children:"OpenRAG chose Docling for its support for a wide variety of file formats, high performance, and advanced understanding of tables and images."}),"\n",(0,t.jsx)(n.h2,{id:"docling-ingestion-settings",children:"Docling ingestion settings"}),"\n",(0,t.jsx)(n.p,{children:"These settings configure the Docling ingestion parameters."}),"\n",(0,t.jsxs)(n.p,{children:["OpenRAG will warn you if ",(0,t.jsx)(n.code,{children:"docling serve"})," is not running.\nTo start or stop ",(0,t.jsx)(n.code,{children:"docling serve"})," or any other native services, in the TUI main menu, click ",(0,t.jsx)(n.strong,{children:"Start Native Services"})," or ",(0,t.jsx)(n.strong,{children:"Stop Native Services"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Embedding model"})," determines which AI model is used to create vector embeddings. The default is ",(0,t.jsx)(n.code,{children:"text-embedding-3-small"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Chunk size"})," determines how large each text chunk is in number of characters.\nLarger chunks yield more context per chunk, but may include irrelevant information. Smaller chunks yield more precise semantic search, but may lack context.\nThe default value of ",(0,t.jsx)(n.code,{children:"1000"})," characters provides a good starting point that balances these considerations."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Chunk overlap"})," controls the number of characters that overlap over chunk boundaries.\nUse larger overlap values for documents where context is most important, and use smaller overlap values for simpler documents, or when optimization is most important.\nThe default value of 200 characters of overlap with a chunk size of 1000 (20% overlap) is suitable for general use cases. Decrease the overlap to 10% for a more efficient pipeline, or increase to 40% for more complex documents."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"OCR"})," enables or disabled OCR processing when extracting text from images and scanned documents.\nOCR is disabled by default. This setting is best suited for processing text-based documents as quickly as possible with Docling's ",(0,t.jsx)(n.a,{href:"https://docling-project.github.io/docling/reference/document_converter/",children:(0,t.jsx)(n.code,{children:"DocumentConverter"})}),". Images are ignored and not processed."]}),"\n",(0,t.jsx)(n.p,{children:"Enable OCR when you are processing documents containing images with text that requires extraction, or for scanned documents. Enabling OCR can slow ingestion performance."}),"\n",(0,t.jsxs)(n.p,{children:["If OpenRAG detects that the local machine is running on macOS, OpenRAG uses the ",(0,t.jsx)(n.a,{href:"https://www.piwheels.org/project/ocrmac/",children:"ocrmac"})," OCR engine. Other platforms use ",(0,t.jsx)(n.a,{href:"https://www.jaided.ai/easyocr/",children:"easyocr"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Picture descriptions"})," adds image descriptions generated by the ",(0,t.jsx)(n.a,{href:"https://huggingface.co/HuggingFaceTB/SmolVLM-Instruct",children:"SmolVLM-256M-Instruct"})," model to OCR processing. Enabling picture descriptions can slow ingestion performance."]}),"\n",(0,t.jsx)(n.h2,{id:"use-openrag-default-ingestion-instead-of-docling-serve",children:"Use OpenRAG default ingestion instead of Docling serve"}),"\n",(0,t.jsxs)(n.p,{children:["If you want to use OpenRAG's built-in pipeline instead of Docling serve, set ",(0,t.jsx)(n.code,{children:"DISABLE_INGEST_WITH_LANGFLOW=true"})," in ",(0,t.jsx)(n.a,{href:"/reference/configuration#document-processing",children:"Environment variables"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"The built-in pipeline still uses the Docling processor, but uses it directly without the Docling Serve API."}),"\n",(0,t.jsxs)(n.p,{children:["For more information, see ",(0,t.jsxs)(n.a,{href:"https://github.com/langflow-ai/openrag/blob/main/src/models/processors.py#L58",children:[(0,t.jsx)(n.code,{children:"processors.py"})," in the OpenRAG repository"]}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"knowledge-ingestion-flows",children:"Knowledge ingestion flows"}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"https://docs.langflow.org/concepts-overview",children:"Flows"})," in Langflow are functional representations of application workflows, with multiple ",(0,t.jsx)(n.a,{href:"https://docs.langflow.org/concepts-components",children:"component"})," nodes connected as single steps in a workflow."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.strong,{children:"OpenSearch Ingestion"})," flow is the default knowledge ingestion flow in OpenRAG: when you ",(0,t.jsx)(n.strong,{children:"Add Knowledge"})," in OpenRAG, you run the OpenSearch Ingestion flow in the background. The flow ingests documents using ",(0,t.jsx)(n.strong,{children:"Docling Serve"})," to import and process documents."]}),"\n",(0,t.jsx)(n.p,{children:"This flow contains ten components connected together to process and store documents in your knowledge base."}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsxs)(n.a,{href:"https://docs.langflow.org/bundles-docling",children:[(0,t.jsx)(n.strong,{children:"Docling Serve"})," component"]})," processes input documents by connecting to your instance of Docling Serve."]}),"\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsxs)(n.a,{href:"https://docs.langflow.org/components-docling",children:[(0,t.jsx)(n.strong,{children:"Export DoclingDocument"})," component"]})," exports the processed DoclingDocument to markdown format with image export mode set to placeholder. This conversion makes the structured document data into a standardized format for further processing."]}),"\n",(0,t.jsxs)(n.li,{children:["Three ",(0,t.jsxs)(n.a,{href:"https://docs.langflow.org/components-processing#dataframe-operations",children:[(0,t.jsx)(n.strong,{children:"DataFrame Operations"})," components"]})," sequentially add metadata columns to the document data of ",(0,t.jsx)(n.code,{children:"filename"}),", ",(0,t.jsx)(n.code,{children:"file_size"}),", and ",(0,t.jsx)(n.code,{children:"mimetype"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsxs)(n.a,{href:"https://docs.langflow.org/components-processing#split-text",children:[(0,t.jsx)(n.strong,{children:"Split Text"})," component"]})," splits the processed text into chunks with a chunk size of 1000 characters and an overlap of 200 characters."]}),"\n",(0,t.jsxs)(n.li,{children:["Four ",(0,t.jsx)(n.strong,{children:"Secret Input"})," components provide secure access to configuration variables: ",(0,t.jsx)(n.code,{children:"CONNECTOR_TYPE"}),", ",(0,t.jsx)(n.code,{children:"OWNER"}),", ",(0,t.jsx)(n.code,{children:"OWNER_EMAIL"}),", and ",(0,t.jsx)(n.code,{children:"OWNER_NAME"}),". These are runtime variables populated from OAuth login."]}),"\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsx)(n.strong,{children:"Create Data"})," component combines the secret inputs into a structured data object that will be associated with the document embeddings."]}),"\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsxs)(n.a,{href:"https://docs.langflow.org/components-embedding-models",children:[(0,t.jsx)(n.strong,{children:"Embedding Model"})," component"]})," generates vector embeddings using OpenAI's ",(0,t.jsx)(n.code,{children:"text-embedding-3-small"})," model. The embedding model is selected at [Application onboarding] and cannot be changed."]}),"\n",(0,t.jsxs)(n.li,{children:["The ",(0,t.jsxs)(n.a,{href:"https://docs.langflow.org/bundles-elastic#opensearch",children:[(0,t.jsx)(n.strong,{children:"OpenSearch"})," component"]})," stores the processed documents and their embeddings in the ",(0,t.jsx)(n.code,{children:"documents"})," index at ",(0,t.jsx)(n.code,{children:"https://opensearch:9200"}),". By default, the component is authenticated with a JWT token, but you can also select ",(0,t.jsx)(n.code,{children:"basic"})," auth mode, and enter your OpenSearch admin username and password."]}),"\n"]}),"\n",(0,t.jsx)(r.Ay,{}),"\n",(0,t.jsx)(n.h3,{id:"url-flow",children:"OpenSearch URL Ingestion flow"}),"\n",(0,t.jsxs)(n.p,{children:["An additional knowledge ingestion flow is included in OpenRAG, where it is used as an MCP tool by the ",(0,t.jsx)(n.a,{href:"/agents#flow",children:(0,t.jsx)(n.strong,{children:"Open Search Agent flow"})}),".\nThe agent calls this component to fetch web content, and the results are ingested into OpenSearch."]}),"\n",(0,t.jsxs)(n.p,{children:["For more on using MCP clients in Langflow, see ",(0,t.jsx)(n.a,{href:"https://docs.langflow.org/mcp-client",children:"MCP clients"}),".",(0,t.jsx)(n.br,{}),"\n","To connect additional MCP servers to the MCP client, see ",(0,t.jsx)(n.a,{href:"https://docs.langflow.org/mcp-tutorial",children:"Connect to MCP servers from your application"}),"."]})]})}function g(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(h,{...e})}):h(e)}},9179:(e,n,s)=>{s.d(n,{A:()=>i});s(6540);var o=s(4827),t=s(4848);function i({name:e,...n}){const s=o[e];return s?(0,t.jsx)(s,{...n}):null}}}]); \ No newline at end of file diff --git a/assets/js/d0314b07.636e9726.js b/assets/js/d0314b07.636e9726.js deleted file mode 100644 index 89494da2..00000000 --- a/assets/js/d0314b07.636e9726.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkopenrag_docs=self.webpackChunkopenrag_docs||[]).push([[750],{887:(e,n,r)=>{r.d(n,{Ay:()=>c,RM:()=>o});var s=r(4848),t=r(8453),i=r(1470),l=r(9365);const o=[{value:"Application onboarding",id:"application-onboarding",level:2}];function a(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",strong:"strong",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"application-onboarding",children:"Application onboarding"}),"\n",(0,s.jsxs)(n.p,{children:["The first time you start OpenRAG, whether using the TUI or a ",(0,s.jsx)(n.code,{children:".env"})," file, you must complete application onboarding."]}),"\n",(0,s.jsxs)(n.p,{children:["Values from onboarding can be changed later in the OpenRAG ",(0,s.jsx)(n.strong,{children:"Settings"})," page."]}),"\n",(0,s.jsxs)(i.A,{groupId:"Provider",children:[(0,s.jsx)(l.A,{value:"OpenAI",label:"OpenAI",default:!0,children:(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Enable ",(0,s.jsx)(n.strong,{children:"Get API key from environment variable"})," to automatically enter your key from the TUI-generated ",(0,s.jsx)(n.code,{children:".env"})," file.\nAlternatively, paste an OpenAI API key into the field."]}),"\n",(0,s.jsxs)(n.li,{children:["Under ",(0,s.jsx)(n.strong,{children:"Advanced settings"}),", select your ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," and ",(0,s.jsx)(n.strong,{children:"Language Model"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["To load 2 sample PDFs, enable ",(0,s.jsx)(n.strong,{children:"Sample dataset"}),".\nThis is recommended, but not required."]}),"\n",(0,s.jsxs)(n.li,{children:["Click ",(0,s.jsx)(n.strong,{children:"Complete"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Continue with the ",(0,s.jsx)(n.a,{href:"/quickstart",children:"Quickstart"}),"."]}),"\n"]})}),(0,s.jsx)(l.A,{value:"IBM watsonx.ai",label:"IBM watsonx.ai",children:(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Complete the fields for ",(0,s.jsx)(n.strong,{children:"watsonx.ai API Endpoint"}),", ",(0,s.jsx)(n.strong,{children:"IBM API key"}),", and ",(0,s.jsx)(n.strong,{children:"IBM Project ID"}),".\nThese values are found in your IBM watsonx deployment."]}),"\n",(0,s.jsxs)(n.li,{children:["Under ",(0,s.jsx)(n.strong,{children:"Advanced settings"}),", select your ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," and ",(0,s.jsx)(n.strong,{children:"Language Model"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["To load 2 sample PDFs, enable ",(0,s.jsx)(n.strong,{children:"Sample dataset"}),".\nThis is recommended, but not required."]}),"\n",(0,s.jsxs)(n.li,{children:["Click ",(0,s.jsx)(n.strong,{children:"Complete"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Continue with the ",(0,s.jsx)(n.a,{href:"/quickstart",children:"Quickstart"}),"."]}),"\n"]})}),(0,s.jsxs)(l.A,{value:"Ollama",label:"Ollama",children:[(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsxs)(n.p,{children:["Ollama is not included with OpenRAG. To install Ollama, see the ",(0,s.jsx)(n.a,{href:"https://docs.ollama.com/",children:"Ollama documentation"}),"."]})}),(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Enter your Ollama server's base URL address.\nThe default Ollama server address is ",(0,s.jsx)(n.code,{children:"http://localhost:11434"}),".\nOpenRAG automatically transforms ",(0,s.jsx)(n.code,{children:"localhost"})," to access services outside of the container, and sends a test connection to your Ollama server to confirm connectivity."]}),"\n",(0,s.jsxs)(n.li,{children:["Select the ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," and ",(0,s.jsx)(n.strong,{children:"Language Model"})," your Ollama server is running.\nOpenRAG retrieves the available models from your Ollama server."]}),"\n",(0,s.jsxs)(n.li,{children:["To load 2 sample PDFs, enable ",(0,s.jsx)(n.strong,{children:"Sample dataset"}),".\nThis is recommended, but not required."]}),"\n",(0,s.jsxs)(n.li,{children:["Click ",(0,s.jsx)(n.strong,{children:"Complete"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Continue with the ",(0,s.jsx)(n.a,{href:"/quickstart",children:"Quickstart"}),"."]}),"\n"]})]})]})]})}function c(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(a,{...e})}):a(e)}},1470:(e,n,r)=>{r.d(n,{A:()=>y});var s=r(6540),t=r(4164),i=r(3104),l=r(6347),o=r(205),a=r(7485),c=r(1682),d=r(679);function h(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 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:n,children:r}=e;return(0,s.useMemo)(()=>{const e=n??function(e){return h(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,c.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 . Every value needs to be unique.`)}(e),e},[n,r])}function p({value:e,tabValues:n}){return n.some(n=>n.value===e)}function x({queryString:e=!1,groupId:n}){const r=(0,l.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 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,a.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 j(e){const{defaultValue:n,queryString:r=!1,groupId:t}=e,i=u(e),[l,a]=(0,s.useState)(()=>function({defaultValue:e,tabValues:n}){if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(e){if(!p({value:e,tabValues:n}))throw new Error(`Docusaurus error: The 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:i})),[c,h]=x({queryString:r,groupId:t}),[j,m]=function({groupId:e}){const n=function(e){return e?`docusaurus.tab.${e}`:null}(e),[r,t]=(0,d.Dv)(n);return[r,(0,s.useCallback)(e=>{n&&t.set(e)},[n,t])]}({groupId:t}),g=(()=>{const e=c??j;return p({value:e,tabValues:i})?e:null})();(0,o.A)(()=>{g&&a(g)},[g]);return{selectedValue:l,selectValue:(0,s.useCallback)(e=>{if(!p({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);a(e),h(e),m(e)},[h,m,i]),tabValues:i}}var m=r(2303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var f=r(4848);function v({className:e,block:n,selectedValue:r,selectValue:s,tabValues:l}){const o=[],{blockElementScrollPositionUntilNextRender:a}=(0,i.a_)(),c=e=>{const n=e.currentTarget,t=o.indexOf(n),i=l[t].value;i!==r&&(a(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,f.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,t.A)("tabs",{"tabs--block":n},e),children:l.map(({value:e,label:n,attributes:s})=>(0,f.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",g.tabItem,s?.className,{"tabs__item--active":r===e}),children:n??e},e))})}function b({lazy:e,children:n,selectedValue:r}){const i=(Array.isArray(n)?n:[n]).filter(Boolean);if(e){const e=i.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,f.jsx)("div",{className:"margin-top--md",children:i.map((e,n)=>(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==r}))})}function A(e){const n=j(e);return(0,f.jsxs)("div",{className:(0,t.A)("tabs-container",g.tabList),children:[(0,f.jsx)(v,{...n,...e}),(0,f.jsx)(b,{...n,...e})]})}function y(e){const n=(0,m.A)();return(0,f.jsx)(A,{...e,children:h(e.children)},String(n))}},4398:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>h,contentTitle:()=>d,default:()=>x,frontMatter:()=>c,metadata:()=>s,toc:()=>u});const s=JSON.parse('{"id":"get-started/install","title":"Install OpenRAG","description":"Install the OpenRAG Python wheel, and then run the OpenRAG Terminal User Interface(TUI) to start your OpenRAG deployment with a guided setup process.","source":"@site/docs/get-started/install.mdx","sourceDirName":"get-started","slug":"/install","permalink":"/install","draft":false,"unlisted":false,"editUrl":"https://github.com/openrag/openrag/tree/main/docs/docs/get-started/install.mdx","tags":[],"version":"current","frontMatter":{"title":"Install OpenRAG","slug":"/install"},"sidebar":"tutorialSidebar","previous":{"title":"About OpenRAG","permalink":"/"},"next":{"title":"Install with Docker","permalink":"/get-started/docker"}}');var t=r(4848),i=r(8453),l=r(1470),o=r(9365),a=r(887);const c={title:"Install OpenRAG",slug:"/install"},d=void 0,h={},u=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Install the OpenRAG Python wheel",id:"install-python-wheel",level:2},{value:"Set up OpenRAG with the TUI",id:"setup",level:2},...a.RM];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,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"#install-python-wheel",children:"Install the OpenRAG Python wheel"}),", and then run the ",(0,t.jsx)(n.a,{href:"#setup",children:"OpenRAG Terminal User Interface(TUI)"})," to start your OpenRAG deployment with a guided setup process."]}),"\n",(0,t.jsxs)(n.p,{children:["If you prefer running Docker commands and manually editing ",(0,t.jsx)(n.code,{children:".env"})," files, see ",(0,t.jsx)(n.a,{href:"/get-started/docker",children:"Deploy with Docker"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://www.python.org/downloads/release/python-3100/",children:"Python Version 3.10 to 3.13"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://docs.astral.sh/uv/getting-started/installation/",children:"uv"})}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://podman.io/docs/installation",children:"Podman"})," (recommended) or ",(0,t.jsx)(n.a,{href:"https://docs.docker.com/get-docker/",children:"Docker"})," installed"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://docs.docker.com/compose/install/",children:"Docker Compose"})," installed. If using Podman, use ",(0,t.jsx)(n.a,{href:"https://docs.podman.io/en/latest/markdown/podman-compose.1.html",children:"podman-compose"})," or alias Docker compose commands to Podman commands."]}),"\n",(0,t.jsxs)(n.li,{children:["Create an ",(0,t.jsx)(n.a,{href:"https://platform.openai.com/api-keys",children:"OpenAI API key"}),". This key is ",(0,t.jsx)(n.strong,{children:"required"})," to start OpenRAG, but you can choose a different model provider during ",(0,t.jsx)(n.a,{href:"#application-onboarding",children:"Application Onboarding"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["Optional: GPU support requires an NVIDIA GPU with ",(0,t.jsx)(n.a,{href:"https://docs.nvidia.com/cuda/",children:"CUDA"})," support and compatible NVIDIA drivers installed on the OpenRAG host machine. If you don't have GPU capabilities, OpenRAG provides an alternate CPU-only deployment."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"install-python-wheel",children:"Install the OpenRAG Python wheel"}),"\n",(0,t.jsx)(n.admonition,{type:"important",children:(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:".whl"})," file is currently available as an internal download during public preview, and will be published to PyPI in a future release."]})}),"\n",(0,t.jsx)(n.p,{children:"The OpenRAG wheel installs the Terminal User Interface (TUI) for configuring and running OpenRAG."}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Create a new project with a virtual environment using ",(0,t.jsx)(n.code,{children:"uv init"}),"."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"uv init YOUR_PROJECT_NAME\ncd YOUR_PROJECT_NAME\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"(venv)"})," prompt doesn't change, but ",(0,t.jsx)(n.code,{children:"uv"})," commands will automatically use the project's virtual environment.\nFor more information on virtual environments, see the ",(0,t.jsx)(n.a,{href:"https://docs.astral.sh/uv/pip/environments",children:"uv documentation"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Add the local OpenRAG wheel to your project's virtual environment."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"uv add PATH/TO/openrag-VERSION-py3-none-any.whl\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Replace ",(0,t.jsx)(n.code,{children:"PATH/TO/"})," and ",(0,t.jsx)(n.code,{children:"VERSION"})," with the path and version of your downloaded OpenRAG ",(0,t.jsx)(n.code,{children:".whl"})," file."]}),"\n",(0,t.jsxs)(n.p,{children:["For example, if your ",(0,t.jsx)(n.code,{children:".whl"})," file is in the ",(0,t.jsx)(n.code,{children:"~/Downloads"})," directory, the command is ",(0,t.jsx)(n.code,{children:"uv add ~/Downloads/openrag-0.1.8-py3-none-any.whl"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Ensure all dependencies are installed and updated in your virtual environment."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"uv sync\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)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Continue with ",(0,t.jsx)(n.a,{href:"#setup",children:"Setup OpenRAG with the TUI"}),"."]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"setup",children:"Set up OpenRAG with the TUI"}),"\n",(0,t.jsxs)(n.p,{children:["The TUI creates a ",(0,t.jsx)(n.code,{children:".env"})," file in your OpenRAG directory root and starts OpenRAG.\nIf the TUI detects a ",(0,t.jsx)(n.code,{children:".env"})," file in the OpenRAG root directory, it sources any variables from the ",(0,t.jsx)(n.code,{children:".env"})," file.\nIf the TUI detects OAuth credentials, it enforces the ",(0,t.jsx)(n.strong,{children:"Advanced Setup"})," path."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Basic Setup"})," generates all of the required values for OpenRAG except the OpenAI API key.\n",(0,t.jsx)(n.strong,{children:"Basic Setup"})," does not set up OAuth connections for ingestion from cloud providers.\nFor OAuth setup, use ",(0,t.jsx)(n.strong,{children:"Advanced Setup"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Basic Setup"})," and ",(0,t.jsx)(n.strong,{children:"Advanced Setup"})," enforce the same authentication settings for the Langflow server, but manage document access differently. For more information, see ",(0,t.jsx)(n.a,{href:"/knowledge#auth",children:"Authentication and document access"}),"."]}),"\n",(0,t.jsxs)(l.A,{groupId:"Setup method",children:[(0,t.jsx)(o.A,{value:"Basic setup",label:"Basic setup",default:!0,children:(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["To install OpenRAG with ",(0,t.jsx)(n.strong,{children:"Basic Setup"}),", click ",(0,t.jsx)(n.strong,{children:"Basic Setup"})," or press ",(0,t.jsx)("kbd",{children:"1"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["Click ",(0,t.jsx)(n.strong,{children:"Generate Passwords"})," to generate passwords for OpenSearch and Langflow."]}),"\n",(0,t.jsx)(n.li,{children:"Paste your OpenAI API key in the OpenAI API key field."}),"\n",(0,t.jsxs)(n.li,{children:["Click ",(0,t.jsx)(n.strong,{children:"Save Configuration"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["To start OpenRAG, click ",(0,t.jsx)(n.strong,{children:"Start Container Services"}),".\nStartup pulls container images and runs them, so it can take some time.\nWhen startup is complete, the TUI displays the following:","\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"Services started successfully\nCommand completed successfully\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["To open the OpenRAG application, click ",(0,t.jsx)(n.strong,{children:"Open App"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["Continue with ",(0,t.jsx)(n.a,{href:"#application-onboarding",children:"Application Onboarding"}),"."]}),"\n"]})}),(0,t.jsx)(o.A,{value:"Advanced setup",label:"Advanced setup",children:(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["To install OpenRAG with ",(0,t.jsx)(n.strong,{children:"Advanced Setup"}),", click ",(0,t.jsx)(n.strong,{children:"Advanced Setup"})," or press ",(0,t.jsx)("kbd",{children:"2"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Click ",(0,t.jsx)(n.strong,{children:"Generate Passwords"})," to generate passwords for OpenSearch and Langflow."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Paste your OpenAI API key in the OpenAI API key field."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Add your client and secret values for Google or Microsoft OAuth.\nThese values can be found with your OAuth provider.\nFor more information, see the ",(0,t.jsx)(n.a,{href:"https://developers.google.com/identity/protocols/oauth2",children:"Google OAuth client"})," or ",(0,t.jsx)(n.a,{href:"https://learn.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/graph-oauth",children:"Microsoft Graph OAuth client"})," documentation."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"The OpenRAG TUI presents redirect URIs for your OAuth app.\nThese are the URLs your OAuth provider will redirect back to after user sign-in.\nRegister these redirect values with your OAuth provider as they are presented in the TUI."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Click ",(0,t.jsx)(n.strong,{children:"Save Configuration"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["To start OpenRAG, click ",(0,t.jsx)(n.strong,{children:"Start Container Services"}),".\nStartup pulls container images and runs them, so it can take some time.\nWhen startup is complete, the TUI displays the following:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"Services started successfully\nCommand completed successfully\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["To open the OpenRAG application, click ",(0,t.jsx)(n.strong,{children:"Open App"}),", press ",(0,t.jsx)("kbd",{children:"6"}),", or navigate to ",(0,t.jsx)(n.code,{children:"http://localhost:3000"}),".\nYou are presented with your provider's OAuth sign-in screen.\nAfter sign-in, you are redirected to the redirect URI."]}),"\n",(0,t.jsx)(n.p,{children:"Two additional variables are available for Advanced Setup:"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"LANGFLOW_PUBLIC_URL"})," controls where the Langflow web interface can be accessed. This is where users interact with their flows in a browser."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"WEBHOOK_BASE_URL"})," controls where the endpoint for ",(0,t.jsx)(n.code,{children:"/connectors/CONNECTOR_TYPE/webhook"})," will be available.\nThis connection enables real-time document synchronization with external services.\nSupported webhook endpoints:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Google Drive: ",(0,t.jsx)(n.code,{children:"/connectors/google_drive/webhook"})]}),"\n",(0,t.jsxs)(n.li,{children:["OneDrive: ",(0,t.jsx)(n.code,{children:"/connectors/onedrive/webhook"})]}),"\n",(0,t.jsxs)(n.li,{children:["SharePoint: ",(0,t.jsx)(n.code,{children:"/connectors/sharepoint/webhook"})]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Continue with ",(0,t.jsx)(n.a,{href:"#application-onboarding",children:"Application Onboarding"}),"."]}),"\n"]}),"\n"]})})]}),"\n",(0,t.jsx)(a.Ay,{})]})}function x(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(p,{...e})}):p(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>l,x:()=>o});var s=r(6540);const t={},i=s.createContext(t);function l(e){const n=s.useContext(i);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:l(e.components),s.createElement(i.Provider,{value:n},e.children)}},9365:(e,n,r)=>{r.d(n,{A:()=>l});r(6540);var s=r(4164);const t={tabItem:"tabItem_Ymn6"};var i=r(4848);function l({children:e,hidden:n,className:r}){return(0,i.jsx)("div",{role:"tabpanel",className:(0,s.A)(t.tabItem,r),hidden:n,children:e})}}}]); \ No newline at end of file diff --git a/assets/js/d0314b07.765517a6.js b/assets/js/d0314b07.765517a6.js new file mode 100644 index 00000000..fbd7d6c4 --- /dev/null +++ b/assets/js/d0314b07.765517a6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkopenrag_docs=self.webpackChunkopenrag_docs||[]).push([[750],{887:(e,n,r)=>{r.d(n,{Ay:()=>c,RM:()=>a});var s=r(4848),t=r(8453),i=r(1470),l=r(9365);const a=[{value:"Application onboarding",id:"application-onboarding",level:2}];function o(e){const n={a:"a",admonition:"admonition",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",strong:"strong",...(0,t.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.h2,{id:"application-onboarding",children:"Application onboarding"}),"\n",(0,s.jsxs)(n.p,{children:["The first time you start OpenRAG, whether using the TUI or a ",(0,s.jsx)(n.code,{children:".env"})," file, you must complete application onboarding."]}),"\n",(0,s.jsxs)(n.p,{children:["Values from onboarding can be changed later in the OpenRAG ",(0,s.jsx)(n.strong,{children:"Settings"})," page."]}),"\n",(0,s.jsxs)(i.A,{groupId:"Provider",children:[(0,s.jsx)(l.A,{value:"OpenAI",label:"OpenAI",default:!0,children:(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Enable ",(0,s.jsx)(n.strong,{children:"Get API key from environment variable"})," to automatically enter your key from the TUI-generated ",(0,s.jsx)(n.code,{children:".env"})," file.\nAlternatively, paste an OpenAI API key into the field."]}),"\n",(0,s.jsxs)(n.li,{children:["Under ",(0,s.jsx)(n.strong,{children:"Advanced settings"}),", select your ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," and ",(0,s.jsx)(n.strong,{children:"Language Model"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["To load 2 sample PDFs, enable ",(0,s.jsx)(n.strong,{children:"Sample dataset"}),".\nThis is recommended, but not required."]}),"\n",(0,s.jsxs)(n.li,{children:["Click ",(0,s.jsx)(n.strong,{children:"Complete"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Continue with the ",(0,s.jsx)(n.a,{href:"/quickstart",children:"Quickstart"}),"."]}),"\n"]})}),(0,s.jsx)(l.A,{value:"IBM watsonx.ai",label:"IBM watsonx.ai",children:(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Complete the fields for ",(0,s.jsx)(n.strong,{children:"watsonx.ai API Endpoint"}),", ",(0,s.jsx)(n.strong,{children:"IBM API key"}),", and ",(0,s.jsx)(n.strong,{children:"IBM Project ID"}),".\nThese values are found in your IBM watsonx deployment."]}),"\n",(0,s.jsxs)(n.li,{children:["Under ",(0,s.jsx)(n.strong,{children:"Advanced settings"}),", select your ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," and ",(0,s.jsx)(n.strong,{children:"Language Model"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["To load 2 sample PDFs, enable ",(0,s.jsx)(n.strong,{children:"Sample dataset"}),".\nThis is recommended, but not required."]}),"\n",(0,s.jsxs)(n.li,{children:["Click ",(0,s.jsx)(n.strong,{children:"Complete"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Continue with the ",(0,s.jsx)(n.a,{href:"/quickstart",children:"Quickstart"}),"."]}),"\n"]})}),(0,s.jsxs)(l.A,{value:"Ollama",label:"Ollama",children:[(0,s.jsx)(n.admonition,{type:"tip",children:(0,s.jsxs)(n.p,{children:["Ollama is not included with OpenRAG. To install Ollama, see the ",(0,s.jsx)(n.a,{href:"https://docs.ollama.com/",children:"Ollama documentation"}),"."]})}),(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:["Enter your Ollama server's base URL address.\nThe default Ollama server address is ",(0,s.jsx)(n.code,{children:"http://localhost:11434"}),".\nOpenRAG automatically transforms ",(0,s.jsx)(n.code,{children:"localhost"})," to access services outside of the container, and sends a test connection to your Ollama server to confirm connectivity."]}),"\n",(0,s.jsxs)(n.li,{children:["Select the ",(0,s.jsx)(n.strong,{children:"Embedding Model"})," and ",(0,s.jsx)(n.strong,{children:"Language Model"})," your Ollama server is running.\nOpenRAG retrieves the available models from your Ollama server."]}),"\n",(0,s.jsxs)(n.li,{children:["To load 2 sample PDFs, enable ",(0,s.jsx)(n.strong,{children:"Sample dataset"}),".\nThis is recommended, but not required."]}),"\n",(0,s.jsxs)(n.li,{children:["Click ",(0,s.jsx)(n.strong,{children:"Complete"}),"."]}),"\n",(0,s.jsxs)(n.li,{children:["Continue with the ",(0,s.jsx)(n.a,{href:"/quickstart",children:"Quickstart"}),"."]}),"\n"]})]})]})]})}function c(e={}){const{wrapper:n}={...(0,t.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(o,{...e})}):o(e)}},1470:(e,n,r)=>{r.d(n,{A:()=>y});var s=r(6540),t=r(4164),i=r(3104),l=r(6347),a=r(205),o=r(7485),c=r(1682),d=r(679);function h(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 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:n,children:r}=e;return(0,s.useMemo)(()=>{const e=n??function(e){return h(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,c.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 . Every value needs to be unique.`)}(e),e},[n,r])}function p({value:e,tabValues:n}){return n.some(n=>n.value===e)}function x({queryString:e=!1,groupId:n}){const r=(0,l.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 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,o.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 j(e){const{defaultValue:n,queryString:r=!1,groupId:t}=e,i=u(e),[l,o]=(0,s.useState)(()=>function({defaultValue:e,tabValues:n}){if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(e){if(!p({value:e,tabValues:n}))throw new Error(`Docusaurus error: The 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:i})),[c,h]=x({queryString:r,groupId:t}),[j,m]=function({groupId:e}){const n=function(e){return e?`docusaurus.tab.${e}`:null}(e),[r,t]=(0,d.Dv)(n);return[r,(0,s.useCallback)(e=>{n&&t.set(e)},[n,t])]}({groupId:t}),g=(()=>{const e=c??j;return p({value:e,tabValues:i})?e:null})();(0,a.A)(()=>{g&&o(g)},[g]);return{selectedValue:l,selectValue:(0,s.useCallback)(e=>{if(!p({value:e,tabValues:i}))throw new Error(`Can't select invalid tab value=${e}`);o(e),h(e),m(e)},[h,m,i]),tabValues:i}}var m=r(2303);const g={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var f=r(4848);function v({className:e,block:n,selectedValue:r,selectValue:s,tabValues:l}){const a=[],{blockElementScrollPositionUntilNextRender:o}=(0,i.a_)(),c=e=>{const n=e.currentTarget,t=a.indexOf(n),i=l[t].value;i!==r&&(o(n),s(i))},d=e=>{let n=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const r=a.indexOf(e.currentTarget)+1;n=a[r]??a[0];break}case"ArrowLeft":{const r=a.indexOf(e.currentTarget)-1;n=a[r]??a[a.length-1];break}}n?.focus()};return(0,f.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,t.A)("tabs",{"tabs--block":n},e),children:l.map(({value:e,label:n,attributes:s})=>(0,f.jsx)("li",{role:"tab",tabIndex:r===e?0:-1,"aria-selected":r===e,ref:e=>{a.push(e)},onKeyDown:d,onClick:c,...s,className:(0,t.A)("tabs__item",g.tabItem,s?.className,{"tabs__item--active":r===e}),children:n??e},e))})}function b({lazy:e,children:n,selectedValue:r}){const i=(Array.isArray(n)?n:[n]).filter(Boolean);if(e){const e=i.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,f.jsx)("div",{className:"margin-top--md",children:i.map((e,n)=>(0,s.cloneElement)(e,{key:n,hidden:e.props.value!==r}))})}function A(e){const n=j(e);return(0,f.jsxs)("div",{className:(0,t.A)("tabs-container",g.tabList),children:[(0,f.jsx)(v,{...n,...e}),(0,f.jsx)(b,{...n,...e})]})}function y(e){const n=(0,m.A)();return(0,f.jsx)(A,{...e,children:h(e.children)},String(n))}},4398:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>h,contentTitle:()=>d,default:()=>x,frontMatter:()=>c,metadata:()=>s,toc:()=>u});const s=JSON.parse('{"id":"get-started/install","title":"Install OpenRAG with TUI","description":"Install the OpenRAG Python wheel, and then run the OpenRAG Terminal User Interface(TUI) to start your OpenRAG deployment with a guided setup process.","source":"@site/docs/get-started/install.mdx","sourceDirName":"get-started","slug":"/install","permalink":"/install","draft":false,"unlisted":false,"editUrl":"https://github.com/openrag/openrag/tree/main/docs/docs/get-started/install.mdx","tags":[],"version":"current","frontMatter":{"title":"Install OpenRAG with TUI","slug":"/install"},"sidebar":"tutorialSidebar","previous":{"title":"About OpenRAG","permalink":"/"},"next":{"title":"Install OpenRAG containers","permalink":"/get-started/docker"}}');var t=r(4848),i=r(8453),l=r(1470),a=r(9365),o=r(887);const c={title:"Install OpenRAG with TUI",slug:"/install"},d=void 0,h={},u=[{value:"Prerequisites",id:"prerequisites",level:2},{value:"Install the OpenRAG Python wheel",id:"install-python-wheel",level:2},{value:"Set up OpenRAG with the TUI",id:"setup",level:2},...o.RM];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,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.a,{href:"#install-python-wheel",children:"Install the OpenRAG Python wheel"}),", and then run the ",(0,t.jsx)(n.a,{href:"#setup",children:"OpenRAG Terminal User Interface(TUI)"})," to start your OpenRAG deployment with a guided setup process."]}),"\n",(0,t.jsxs)(n.p,{children:["If you prefer running Docker commands and manually editing ",(0,t.jsx)(n.code,{children:".env"})," files, see ",(0,t.jsx)(n.a,{href:"/get-started/docker",children:"Deploy with Docker"}),"."]}),"\n",(0,t.jsx)(n.h2,{id:"prerequisites",children:"Prerequisites"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://www.python.org/downloads/release/python-3100/",children:"Python Version 3.10 to 3.13"})}),"\n",(0,t.jsx)(n.li,{children:(0,t.jsx)(n.a,{href:"https://docs.astral.sh/uv/getting-started/installation/",children:"uv"})}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://podman.io/docs/installation",children:"Podman"})," (recommended) or ",(0,t.jsx)(n.a,{href:"https://docs.docker.com/get-docker/",children:"Docker"})," installed"]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.a,{href:"https://docs.docker.com/compose/install/",children:"Docker Compose"})," installed. If using Podman, use ",(0,t.jsx)(n.a,{href:"https://docs.podman.io/en/latest/markdown/podman-compose.1.html",children:"podman-compose"})," or alias Docker compose commands to Podman commands."]}),"\n",(0,t.jsxs)(n.li,{children:["Create an ",(0,t.jsx)(n.a,{href:"https://platform.openai.com/api-keys",children:"OpenAI API key"}),". This key is ",(0,t.jsx)(n.strong,{children:"required"})," to start OpenRAG, but you can choose a different model provider during ",(0,t.jsx)(n.a,{href:"#application-onboarding",children:"Application Onboarding"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["Optional: GPU support requires an NVIDIA GPU with ",(0,t.jsx)(n.a,{href:"https://docs.nvidia.com/cuda/",children:"CUDA"})," support and compatible NVIDIA drivers installed on the OpenRAG host machine. If you don't have GPU capabilities, OpenRAG provides an alternate CPU-only deployment."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"install-python-wheel",children:"Install the OpenRAG Python wheel"}),"\n",(0,t.jsx)(n.admonition,{type:"important",children:(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:".whl"})," file is currently available as an internal download during public preview, and will be published to PyPI in a future release."]})}),"\n",(0,t.jsx)(n.p,{children:"The OpenRAG wheel installs the Terminal User Interface (TUI) for configuring and running OpenRAG."}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Create a new project with a virtual environment using ",(0,t.jsx)(n.code,{children:"uv init"}),"."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"uv init YOUR_PROJECT_NAME\ncd YOUR_PROJECT_NAME\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"(venv)"})," prompt doesn't change, but ",(0,t.jsx)(n.code,{children:"uv"})," commands will automatically use the project's virtual environment.\nFor more information on virtual environments, see the ",(0,t.jsx)(n.a,{href:"https://docs.astral.sh/uv/pip/environments",children:"uv documentation"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Add the local OpenRAG wheel to your project's virtual environment."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"uv add PATH/TO/openrag-VERSION-py3-none-any.whl\n"})}),"\n",(0,t.jsxs)(n.p,{children:["Replace ",(0,t.jsx)(n.code,{children:"PATH/TO/"})," and ",(0,t.jsx)(n.code,{children:"VERSION"})," with the path and version of your downloaded OpenRAG ",(0,t.jsx)(n.code,{children:".whl"})," file."]}),"\n",(0,t.jsxs)(n.p,{children:["For example, if your ",(0,t.jsx)(n.code,{children:".whl"})," file is in the ",(0,t.jsx)(n.code,{children:"~/Downloads"})," directory, the command is ",(0,t.jsx)(n.code,{children:"uv add ~/Downloads/openrag-0.1.8-py3-none-any.whl"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Ensure all dependencies are installed and updated in your virtual environment."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"uv sync\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)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Continue with ",(0,t.jsx)(n.a,{href:"#setup",children:"Setup OpenRAG with the TUI"}),"."]}),"\n"]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"setup",children:"Set up OpenRAG with the TUI"}),"\n",(0,t.jsxs)(n.p,{children:["The TUI creates a ",(0,t.jsx)(n.code,{children:".env"})," file in your OpenRAG directory root and starts OpenRAG.\nIf the TUI detects a ",(0,t.jsx)(n.code,{children:".env"})," file in the OpenRAG root directory, it sources any variables from the ",(0,t.jsx)(n.code,{children:".env"})," file.\nIf the TUI detects OAuth credentials, it enforces the ",(0,t.jsx)(n.strong,{children:"Advanced Setup"})," path."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Basic Setup"})," generates all of the required values for OpenRAG except the OpenAI API key.\n",(0,t.jsx)(n.strong,{children:"Basic Setup"})," does not set up OAuth connections for ingestion from cloud providers.\nFor OAuth setup, use ",(0,t.jsx)(n.strong,{children:"Advanced Setup"}),"."]}),"\n",(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.strong,{children:"Basic Setup"})," and ",(0,t.jsx)(n.strong,{children:"Advanced Setup"})," enforce the same authentication settings for the Langflow server, but manage document access differently. For more information, see ",(0,t.jsx)(n.a,{href:"/knowledge#auth",children:"Authentication and document access"}),"."]}),"\n",(0,t.jsxs)(l.A,{groupId:"Setup method",children:[(0,t.jsx)(a.A,{value:"Basic setup",label:"Basic setup",default:!0,children:(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["To install OpenRAG with ",(0,t.jsx)(n.strong,{children:"Basic Setup"}),", click ",(0,t.jsx)(n.strong,{children:"Basic Setup"})," or press ",(0,t.jsx)("kbd",{children:"1"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["Click ",(0,t.jsx)(n.strong,{children:"Generate Passwords"})," to generate passwords for OpenSearch and Langflow."]}),"\n",(0,t.jsx)(n.li,{children:"Paste your OpenAI API key in the OpenAI API key field."}),"\n",(0,t.jsxs)(n.li,{children:["Click ",(0,t.jsx)(n.strong,{children:"Save Configuration"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["To start OpenRAG, click ",(0,t.jsx)(n.strong,{children:"Start Container Services"}),".\nStartup pulls container images and runs them, so it can take some time.\nWhen startup is complete, the TUI displays the following:","\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"Services started successfully\nCommand completed successfully\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["To open the OpenRAG application, click ",(0,t.jsx)(n.strong,{children:"Open App"}),"."]}),"\n",(0,t.jsxs)(n.li,{children:["Continue with ",(0,t.jsx)(n.a,{href:"#application-onboarding",children:"Application Onboarding"}),"."]}),"\n"]})}),(0,t.jsx)(a.A,{value:"Advanced setup",label:"Advanced setup",children:(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["To install OpenRAG with ",(0,t.jsx)(n.strong,{children:"Advanced Setup"}),", click ",(0,t.jsx)(n.strong,{children:"Advanced Setup"})," or press ",(0,t.jsx)("kbd",{children:"2"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Click ",(0,t.jsx)(n.strong,{children:"Generate Passwords"})," to generate passwords for OpenSearch and Langflow."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Paste your OpenAI API key in the OpenAI API key field."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Add your client and secret values for Google or Microsoft OAuth.\nThese values can be found with your OAuth provider.\nFor more information, see the ",(0,t.jsx)(n.a,{href:"https://developers.google.com/identity/protocols/oauth2",children:"Google OAuth client"})," or ",(0,t.jsx)(n.a,{href:"https://learn.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/graph-oauth",children:"Microsoft Graph OAuth client"})," documentation."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"The OpenRAG TUI presents redirect URIs for your OAuth app.\nThese are the URLs your OAuth provider will redirect back to after user sign-in.\nRegister these redirect values with your OAuth provider as they are presented in the TUI."}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Click ",(0,t.jsx)(n.strong,{children:"Save Configuration"}),"."]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["To start OpenRAG, click ",(0,t.jsx)(n.strong,{children:"Start Container Services"}),".\nStartup pulls container images and runs them, so it can take some time.\nWhen startup is complete, the TUI displays the following:"]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"Services started successfully\nCommand completed successfully\n"})}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["To open the OpenRAG application, click ",(0,t.jsx)(n.strong,{children:"Open App"}),", press ",(0,t.jsx)("kbd",{children:"6"}),", or navigate to ",(0,t.jsx)(n.code,{children:"http://localhost:3000"}),".\nYou are presented with your provider's OAuth sign-in screen.\nAfter sign-in, you are redirected to the redirect URI."]}),"\n",(0,t.jsx)(n.p,{children:"Two additional variables are available for Advanced Setup:"}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"LANGFLOW_PUBLIC_URL"})," controls where the Langflow web interface can be accessed. This is where users interact with their flows in a browser."]}),"\n",(0,t.jsxs)(n.p,{children:["The ",(0,t.jsx)(n.code,{children:"WEBHOOK_BASE_URL"})," controls where the endpoint for ",(0,t.jsx)(n.code,{children:"/connectors/CONNECTOR_TYPE/webhook"})," will be available.\nThis connection enables real-time document synchronization with external services.\nSupported webhook endpoints:"]}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:["Google Drive: ",(0,t.jsx)(n.code,{children:"/connectors/google_drive/webhook"})]}),"\n",(0,t.jsxs)(n.li,{children:["OneDrive: ",(0,t.jsx)(n.code,{children:"/connectors/onedrive/webhook"})]}),"\n",(0,t.jsxs)(n.li,{children:["SharePoint: ",(0,t.jsx)(n.code,{children:"/connectors/sharepoint/webhook"})]}),"\n"]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsxs)(n.p,{children:["Continue with ",(0,t.jsx)(n.a,{href:"#application-onboarding",children:"Application Onboarding"}),"."]}),"\n"]}),"\n"]})})]}),"\n",(0,t.jsx)(o.Ay,{})]})}function x(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(p,{...e})}):p(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>l,x:()=>a});var s=r(6540);const t={},i=s.createContext(t);function l(e){const n=s.useContext(i);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function a(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:l(e.components),s.createElement(i.Provider,{value:n},e.children)}},9365:(e,n,r)=>{r.d(n,{A:()=>l});r(6540);var s=r(4164);const t={tabItem:"tabItem_Ymn6"};var i=r(4848);function l({children:e,hidden:n,className:r}){return(0,i.jsx)("div",{role:"tabpanel",className:(0,s.A)(t.tabItem,r),hidden:n,children:e})}}}]); \ No newline at end of file diff --git a/assets/js/e633a5ea.88d72b56.js b/assets/js/e633a5ea.88d72b56.js new file mode 100644 index 00000000..4cc2d58a --- /dev/null +++ b/assets/js/e633a5ea.88d72b56.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkopenrag_docs=self.webpackChunkopenrag_docs||[]).push([[172],{8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>i});var s=t(6540);const r={},a=s.createContext(r);function o(e){const n=s.useContext(a);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),s.createElement(a.Provider,{value:n},e.children)}},9359:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>i,default:()=>p,frontMatter:()=>o,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"get-started/what-is-openrag","title":"What is OpenRAG?","description":"OpenRAG is an open-source package for building agentic RAG systems.","source":"@site/docs/get-started/what-is-openrag.mdx","sourceDirName":"get-started","slug":"/","permalink":"/","draft":false,"unlisted":false,"editUrl":"https://github.com/openrag/openrag/tree/main/docs/docs/get-started/what-is-openrag.mdx","tags":[],"version":"current","frontMatter":{"title":"What is OpenRAG?","slug":"/"},"sidebar":"tutorialSidebar","next":{"title":"Install OpenRAG with TUI","permalink":"/install"}}');var r=t(4848),a=t(8453);const o={title:"What is OpenRAG?",slug:"/"},i=void 0,l={},c=[];function d(e){const n={a:"a",li:"li",p:"p",ul:"ul",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.p,{children:"OpenRAG is an open-source package for building agentic RAG systems.\nIt supports integration with a wide range of orchestration tools, vector databases, and LLM providers."}),"\n",(0,r.jsx)(n.p,{children:"OpenRAG connects and amplifies three popular, proven open-source projects into one powerful platform:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"https://docs.langflow.org",children:"Langflow"})," - Langflow is a powerful tool to build and deploy AI agents and MCP servers. It supports all major LLMs, vector databases and a growing library of AI tools."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"https://docs.opensearch.org/latest/",children:"OpenSearch"})," - OpenSearch is a community-driven, Apache 2.0-licensed open source search and analytics suite that makes it easy to ingest, search, visualize, and analyze data."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"https://docling-project.github.io/docling/",children:"Docling"})," - Docling simplifies document processing, parsing diverse formats \u2014 including advanced PDF understanding \u2014 and providing seamless integrations with the gen AI ecosystem."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"OpenRAG builds on Langflow's familiar interface while adding OpenSearch for vector storage and Docling for simplified document parsing, with opinionated flows that serve as ready-to-use recipes for ingestion, retrieval, and generation from popular sources like OneDrive, Google Drive, and AWS."}),"\n",(0,r.jsx)(n.p,{children:"What's more, every part of the stack is swappable. Write your own custom components in Python, try different language models, and customize your flows to build an agentic RAG system."}),"\n",(0,r.jsxs)(n.p,{children:["Ready to get started? ",(0,r.jsx)(n.a,{href:"/install",children:"Install OpenRAG"})," and then run the ",(0,r.jsx)(n.a,{href:"/quickstart",children:"Quickstart"})," to create a powerful RAG pipeline."]})]})}function p(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}}}]); \ No newline at end of file diff --git a/assets/js/e633a5ea.cbe02eaa.js b/assets/js/e633a5ea.cbe02eaa.js deleted file mode 100644 index 24cb1171..00000000 --- a/assets/js/e633a5ea.cbe02eaa.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkopenrag_docs=self.webpackChunkopenrag_docs||[]).push([[172],{8453:(e,n,t)=>{t.d(n,{R:()=>o,x:()=>i});var s=t(6540);const r={},a=s.createContext(r);function o(e){const n=s.useContext(a);return s.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function i(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:o(e.components),s.createElement(a.Provider,{value:n},e.children)}},9359:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>l,contentTitle:()=>i,default:()=>p,frontMatter:()=>o,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"get-started/what-is-openrag","title":"What is OpenRAG?","description":"OpenRAG is an open-source package for building agentic RAG systems.","source":"@site/docs/get-started/what-is-openrag.mdx","sourceDirName":"get-started","slug":"/","permalink":"/","draft":false,"unlisted":false,"editUrl":"https://github.com/openrag/openrag/tree/main/docs/docs/get-started/what-is-openrag.mdx","tags":[],"version":"current","frontMatter":{"title":"What is OpenRAG?","slug":"/"},"sidebar":"tutorialSidebar","next":{"title":"Install OpenRAG","permalink":"/install"}}');var r=t(4848),a=t(8453);const o={title:"What is OpenRAG?",slug:"/"},i=void 0,l={},c=[];function d(e){const n={a:"a",li:"li",p:"p",ul:"ul",...(0,a.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.p,{children:"OpenRAG is an open-source package for building agentic RAG systems.\nIt supports integration with a wide range of orchestration tools, vector databases, and LLM providers."}),"\n",(0,r.jsx)(n.p,{children:"OpenRAG connects and amplifies three popular, proven open-source projects into one powerful platform:"}),"\n",(0,r.jsxs)(n.ul,{children:["\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"https://docs.langflow.org",children:"Langflow"})," - Langflow is a powerful tool to build and deploy AI agents and MCP servers. It supports all major LLMs, vector databases and a growing library of AI tools."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"https://docs.opensearch.org/latest/",children:"OpenSearch"})," - OpenSearch is a community-driven, Apache 2.0-licensed open source search and analytics suite that makes it easy to ingest, search, visualize, and analyze data."]}),"\n"]}),"\n",(0,r.jsxs)(n.li,{children:["\n",(0,r.jsxs)(n.p,{children:[(0,r.jsx)(n.a,{href:"https://docling-project.github.io/docling/",children:"Docling"})," - Docling simplifies document processing, parsing diverse formats \u2014 including advanced PDF understanding \u2014 and providing seamless integrations with the gen AI ecosystem."]}),"\n"]}),"\n"]}),"\n",(0,r.jsx)(n.p,{children:"OpenRAG builds on Langflow's familiar interface while adding OpenSearch for vector storage and Docling for simplified document parsing, with opinionated flows that serve as ready-to-use recipes for ingestion, retrieval, and generation from popular sources like OneDrive, Google Drive, and AWS."}),"\n",(0,r.jsx)(n.p,{children:"What's more, every part of the stack is swappable. Write your own custom components in Python, try different language models, and customize your flows to build an agentic RAG system."}),"\n",(0,r.jsxs)(n.p,{children:["Ready to get started? ",(0,r.jsx)(n.a,{href:"/install",children:"Install OpenRAG"})," and then run the ",(0,r.jsx)(n.a,{href:"/quickstart",children:"Quickstart"})," to create a powerful RAG pipeline."]})]})}function p(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,r.jsx)(n,{...e,children:(0,r.jsx)(d,{...e})}):d(e)}}}]); \ No newline at end of file diff --git a/assets/js/eb5b356a.516bb081.js b/assets/js/eb5b356a.516bb081.js deleted file mode 100644 index 9a31c5dc..00000000 --- a/assets/js/eb5b356a.516bb081.js +++ /dev/null @@ -1 +0,0 @@ -"use strict";(self.webpackChunkopenrag_docs=self.webpackChunkopenrag_docs||[]).push([[668],{1470:(e,n,r)=>{r.d(n,{A:()=>w});var o=r(6540),t=r(4164),a=r(3104),s=r(6347),l=r(205),i=r(7485),c=r(1682),u=r(679);function d(e){return o.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,o.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 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 p(e){const{values:n,children:r}=e;return(0,o.useMemo)(()=>{const e=n??function(e){return d(e).map(({props:{value:e,label:n,attributes:r,default:o}})=>({value:e,label:n,attributes:r,default:o}))}(r);return function(e){const n=(0,c.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 . Every value needs to be unique.`)}(e),e},[n,r])}function m({value:e,tabValues:n}){return n.some(n=>n.value===e)}function h({queryString:e=!1,groupId:n}){const r=(0,s.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 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,i.aZ)(t),(0,o.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=p(e),[s,i]=(0,o.useState)(()=>function({defaultValue:e,tabValues:n}){if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(e){if(!m({value:e,tabValues:n}))throw new Error(`Docusaurus error: The 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]=h({queryString:r,groupId:t}),[f,g]=function({groupId:e}){const n=function(e){return e?`docusaurus.tab.${e}`:null}(e),[r,t]=(0,u.Dv)(n);return[r,(0,o.useCallback)(e=>{n&&t.set(e)},[n,t])]}({groupId:t}),v=(()=>{const e=c??f;return m({value:e,tabValues:a})?e:null})();(0,l.A)(()=>{v&&i(v)},[v]);return{selectedValue:s,selectValue:(0,o.useCallback)(e=>{if(!m({value:e,tabValues:a}))throw new Error(`Can't select invalid tab value=${e}`);i(e),d(e),g(e)},[d,g,a]),tabValues:a}}var g=r(2303);const v={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var b=r(4848);function x({className:e,block:n,selectedValue:r,selectValue:o,tabValues:s}){const l=[],{blockElementScrollPositionUntilNextRender:i}=(0,a.a_)(),c=e=>{const n=e.currentTarget,t=l.indexOf(n),a=s[t].value;a!==r&&(i(n),o(a))},u=e=>{let n=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const r=l.indexOf(e.currentTarget)+1;n=l[r]??l[0];break}case"ArrowLeft":{const r=l.indexOf(e.currentTarget)-1;n=l[r]??l[l.length-1];break}}n?.focus()};return(0,b.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,t.A)("tabs",{"tabs--block":n},e),children:s.map(({value:e,label:n,attributes:o})=>(0,b.jsx)("li",{role:"tab",tabIndex:r===e?0:-1,"aria-selected":r===e,ref:e=>{l.push(e)},onKeyDown:u,onClick:c,...o,className:(0,t.A)("tabs__item",v.tabItem,o?.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,o.cloneElement)(e,{className:(0,t.A)("margin-top--md",e.props.className)}):null}return(0,b.jsx)("div",{className:"margin-top--md",children:a.map((e,n)=>(0,o.cloneElement)(e,{key:n,hidden:e.props.value!==r}))})}function j(e){const n=f(e);return(0,b.jsxs)("div",{className:(0,t.A)("tabs-container",v.tabList),children:[(0,b.jsx)(x,{...n,...e}),(0,b.jsx)(y,{...n,...e})]})}function w(e){const n=(0,g.A)();return(0,b.jsx)(j,{...e,children:d(e.children)},String(n))}},5014:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>u,contentTitle:()=>c,default:()=>m,frontMatter:()=>i,metadata:()=>o,toc:()=>d});const o=JSON.parse('{"id":"support/troubleshoot","title":"Troubleshoot","description":"This page provides troubleshooting advice for issues you might encounter when using OpenRAG or contributing to OpenRAG.","source":"@site/docs/support/troubleshoot.mdx","sourceDirName":"support","slug":"/support/troubleshoot","permalink":"/support/troubleshoot","draft":false,"unlisted":false,"editUrl":"https://github.com/openrag/openrag/tree/main/docs/docs/support/troubleshoot.mdx","tags":[],"version":"current","frontMatter":{"title":"Troubleshoot","slug":"/support/troubleshoot"},"sidebar":"tutorialSidebar","previous":{"title":"Environment variables","permalink":"/reference/configuration"}}');var t=r(4848),a=r(8453),s=r(1470),l=r(9365);const i={title:"Troubleshoot",slug:"/support/troubleshoot"},c=void 0,u={},d=[{value:"OpenSearch fails to start",id:"opensearch-fails-to-start",level:2},{value:"Langflow connection issues",id:"langflow-connection-issues",level:2},{value:"Memory errors",id:"memory-errors",level:2},{value:"Container out of memory errors",id:"container-out-of-memory-errors",level:3},{value:"Podman on macOS memory issues",id:"podman-on-macos-memory-issues",level:3},{value:"Port conflicts",id:"port-conflicts",level:2},{value:"Langflow container already exists",id:"langflow-container-already-exists",level:2}];function p(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:"This page provides troubleshooting advice for issues you might encounter when using OpenRAG or contributing to OpenRAG."}),"\n",(0,t.jsx)(n.h2,{id:"opensearch-fails-to-start",children:"OpenSearch fails to start"}),"\n",(0,t.jsxs)(n.p,{children:["Check that ",(0,t.jsx)(n.code,{children:"OPENSEARCH_PASSWORD"})," set in ",(0,t.jsx)(n.a,{href:"/reference/configuration",children:"Environment variables"})," meets requirements.\nThe password must contain at least 8 characters, and must contain at least one uppercase letter, one lowercase letter, one digit, and one special character that is strong."]}),"\n",(0,t.jsx)(n.h2,{id:"langflow-connection-issues",children:"Langflow connection issues"}),"\n",(0,t.jsxs)(n.p,{children:["Verify the ",(0,t.jsx)(n.code,{children:"LANGFLOW_SUPERUSER"})," credentials set in ",(0,t.jsx)(n.a,{href:"/reference/configuration",children:"Environment variables"})," are correct."]}),"\n",(0,t.jsx)(n.h2,{id:"memory-errors",children:"Memory errors"}),"\n",(0,t.jsx)(n.h3,{id:"container-out-of-memory-errors",children:"Container out of memory errors"}),"\n",(0,t.jsxs)(n.p,{children:["Increase Docker memory allocation or use ",(0,t.jsx)(n.a,{href:"https://github.com/langflow-ai/openrag/blob/main/docker-compose-cpu.yml",children:"docker-compose-cpu.yml"})," to deploy OpenRAG."]}),"\n",(0,t.jsx)(n.h3,{id:"podman-on-macos-memory-issues",children:"Podman on macOS memory issues"}),"\n",(0,t.jsx)(n.p,{children:"If you're using Podman on macOS, you may need to increase VM memory on your Podman machine.\nThis example increases the machine size to 8 GB of RAM, which should be sufficient to run OpenRAG."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"podman machine stop\npodman machine rm\npodman machine init --memory 8192 # 8 GB example\npodman machine start\n"})}),"\n",(0,t.jsx)(n.h2,{id:"port-conflicts",children:"Port conflicts"}),"\n",(0,t.jsx)(n.p,{children:"Ensure ports 3000, 7860, 8000, 9200, 5601 are available."}),"\n",(0,t.jsx)(n.h2,{id:"langflow-container-already-exists",children:"Langflow container already exists"}),"\n",(0,t.jsx)(n.p,{children:"If you are running other versions of Langflow containers on your machine, you may encounter an issue where Docker or Podman thinks Langflow is already up."}),"\n",(0,t.jsx)(n.p,{children:"Remove just the problem container, or clean up all containers and start fresh."}),"\n",(0,t.jsx)(n.p,{children:"To reset your local containers and pull new images, do the following:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Stop your containers and completely remove them."}),"\n",(0,t.jsxs)(s.A,{groupId:"Container software",children:[(0,t.jsx)(l.A,{value:"Podman",label:"Podman",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"# Stop all running containers\npodman stop --all\n\n# Remove all containers (including stopped ones)\npodman rm --all --force\n\n# Remove all images\npodman rmi --all --force\n\n# Remove all volumes\npodman volume prune --force\n\n# Remove all networks (except default)\npodman network prune --force\n\n# Clean up any leftover data\npodman system prune --all --force --volumes\n"})})}),(0,t.jsx)(l.A,{value:"Docker",label:"Docker",default:!0,children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"# Stop all running containers\ndocker stop $(docker ps -q)\n\n# Remove all containers (including stopped ones)\ndocker rm --force $(docker ps -aq)\n\n# Remove all images\ndocker rmi --force $(docker images -q)\n\n# Remove all volumes\ndocker volume prune --force\n\n# Remove all networks (except default)\ndocker network prune --force\n\n# Clean up any leftover data\ndocker system prune --all --force --volumes\n"})})})]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Restart OpenRAG and upgrade to get the latest images for your containers."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"uv sync\nuv run openrag\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:"Status"}),", and then click ",(0,t.jsx)(n.strong,{children:"Upgrade"}),".\nWhen the ",(0,t.jsx)(n.strong,{children:"Close"})," button is active, the upgrade is complete.\nClose the window and open the OpenRAG appplication."]}),"\n"]}),"\n"]})]})}function m(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(p,{...e})}):p(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>s,x:()=>l});var o=r(6540);const t={},a=o.createContext(t);function s(e){const n=o.useContext(a);return o.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:s(e.components),o.createElement(a.Provider,{value:n},e.children)}},9365:(e,n,r)=>{r.d(n,{A:()=>s});r(6540);var o=r(4164);const t={tabItem:"tabItem_Ymn6"};var a=r(4848);function s({children:e,hidden:n,className:r}){return(0,a.jsx)("div",{role:"tabpanel",className:(0,o.A)(t.tabItem,r),hidden:n,children:e})}}}]); \ No newline at end of file diff --git a/assets/js/eb5b356a.a4c27fc6.js b/assets/js/eb5b356a.a4c27fc6.js new file mode 100644 index 00000000..070ec56e --- /dev/null +++ b/assets/js/eb5b356a.a4c27fc6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkopenrag_docs=self.webpackChunkopenrag_docs||[]).push([[668],{1470:(e,n,r)=>{r.d(n,{A:()=>w});var o=r(6540),t=r(4164),a=r(3104),s=r(6347),l=r(205),i=r(7485),c=r(1682),u=r(679);function d(e){return o.Children.toArray(e).filter(e=>"\n"!==e).map(e=>{if(!e||(0,o.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 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 p(e){const{values:n,children:r}=e;return(0,o.useMemo)(()=>{const e=n??function(e){return d(e).map(({props:{value:e,label:n,attributes:r,default:o}})=>({value:e,label:n,attributes:r,default:o}))}(r);return function(e){const n=(0,c.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 . Every value needs to be unique.`)}(e),e},[n,r])}function m({value:e,tabValues:n}){return n.some(n=>n.value===e)}function h({queryString:e=!1,groupId:n}){const r=(0,s.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 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,i.aZ)(t),(0,o.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=p(e),[s,i]=(0,o.useState)(()=>function({defaultValue:e,tabValues:n}){if(0===n.length)throw new Error("Docusaurus error: the component requires at least one children component");if(e){if(!m({value:e,tabValues:n}))throw new Error(`Docusaurus error: The 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]=h({queryString:r,groupId:t}),[f,g]=function({groupId:e}){const n=function(e){return e?`docusaurus.tab.${e}`:null}(e),[r,t]=(0,u.Dv)(n);return[r,(0,o.useCallback)(e=>{n&&t.set(e)},[n,t])]}({groupId:t}),v=(()=>{const e=c??f;return m({value:e,tabValues:a})?e:null})();(0,l.A)(()=>{v&&i(v)},[v]);return{selectedValue:s,selectValue:(0,o.useCallback)(e=>{if(!m({value:e,tabValues:a}))throw new Error(`Can't select invalid tab value=${e}`);i(e),d(e),g(e)},[d,g,a]),tabValues:a}}var g=r(2303);const v={tabList:"tabList__CuJ",tabItem:"tabItem_LNqP"};var b=r(4848);function x({className:e,block:n,selectedValue:r,selectValue:o,tabValues:s}){const l=[],{blockElementScrollPositionUntilNextRender:i}=(0,a.a_)(),c=e=>{const n=e.currentTarget,t=l.indexOf(n),a=s[t].value;a!==r&&(i(n),o(a))},u=e=>{let n=null;switch(e.key){case"Enter":c(e);break;case"ArrowRight":{const r=l.indexOf(e.currentTarget)+1;n=l[r]??l[0];break}case"ArrowLeft":{const r=l.indexOf(e.currentTarget)-1;n=l[r]??l[l.length-1];break}}n?.focus()};return(0,b.jsx)("ul",{role:"tablist","aria-orientation":"horizontal",className:(0,t.A)("tabs",{"tabs--block":n},e),children:s.map(({value:e,label:n,attributes:o})=>(0,b.jsx)("li",{role:"tab",tabIndex:r===e?0:-1,"aria-selected":r===e,ref:e=>{l.push(e)},onKeyDown:u,onClick:c,...o,className:(0,t.A)("tabs__item",v.tabItem,o?.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,o.cloneElement)(e,{className:(0,t.A)("margin-top--md",e.props.className)}):null}return(0,b.jsx)("div",{className:"margin-top--md",children:a.map((e,n)=>(0,o.cloneElement)(e,{key:n,hidden:e.props.value!==r}))})}function j(e){const n=f(e);return(0,b.jsxs)("div",{className:(0,t.A)("tabs-container",v.tabList),children:[(0,b.jsx)(x,{...n,...e}),(0,b.jsx)(y,{...n,...e})]})}function w(e){const n=(0,g.A)();return(0,b.jsx)(j,{...e,children:d(e.children)},String(n))}},5014:(e,n,r)=>{r.r(n),r.d(n,{assets:()=>u,contentTitle:()=>c,default:()=>m,frontMatter:()=>i,metadata:()=>o,toc:()=>d});const o=JSON.parse('{"id":"support/troubleshoot","title":"Troubleshooting","description":"This page provides troubleshooting advice for issues you might encounter when using OpenRAG or contributing to OpenRAG.","source":"@site/docs/support/troubleshoot.mdx","sourceDirName":"support","slug":"/support/troubleshoot","permalink":"/support/troubleshoot","draft":false,"unlisted":false,"editUrl":"https://github.com/openrag/openrag/tree/main/docs/docs/support/troubleshoot.mdx","tags":[],"version":"current","frontMatter":{"title":"Troubleshooting","slug":"/support/troubleshoot"},"sidebar":"tutorialSidebar","previous":{"title":"Environment variables","permalink":"/reference/configuration"}}');var t=r(4848),a=r(8453),s=r(1470),l=r(9365);const i={title:"Troubleshooting",slug:"/support/troubleshoot"},c=void 0,u={},d=[{value:"OpenSearch fails to start",id:"opensearch-fails-to-start",level:2},{value:"Langflow connection issues",id:"langflow-connection-issues",level:2},{value:"Memory errors",id:"memory-errors",level:2},{value:"Container out of memory errors",id:"container-out-of-memory-errors",level:3},{value:"Podman on macOS memory issues",id:"podman-on-macos-memory-issues",level:3},{value:"Port conflicts",id:"port-conflicts",level:2},{value:"Langflow container already exists",id:"langflow-container-already-exists",level:2}];function p(e){const n={a:"a",code:"code",h2:"h2",h3:"h3",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,a.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:"This page provides troubleshooting advice for issues you might encounter when using OpenRAG or contributing to OpenRAG."}),"\n",(0,t.jsx)(n.h2,{id:"opensearch-fails-to-start",children:"OpenSearch fails to start"}),"\n",(0,t.jsxs)(n.p,{children:["Check that ",(0,t.jsx)(n.code,{children:"OPENSEARCH_PASSWORD"})," set in ",(0,t.jsx)(n.a,{href:"/reference/configuration",children:"Environment variables"})," meets requirements.\nThe password must contain at least 8 characters, and must contain at least one uppercase letter, one lowercase letter, one digit, and one special character that is strong."]}),"\n",(0,t.jsx)(n.h2,{id:"langflow-connection-issues",children:"Langflow connection issues"}),"\n",(0,t.jsxs)(n.p,{children:["Verify the ",(0,t.jsx)(n.code,{children:"LANGFLOW_SUPERUSER"})," credentials set in ",(0,t.jsx)(n.a,{href:"/reference/configuration",children:"Environment variables"})," are correct."]}),"\n",(0,t.jsx)(n.h2,{id:"memory-errors",children:"Memory errors"}),"\n",(0,t.jsx)(n.h3,{id:"container-out-of-memory-errors",children:"Container out of memory errors"}),"\n",(0,t.jsxs)(n.p,{children:["Increase Docker memory allocation or use ",(0,t.jsx)(n.a,{href:"https://github.com/langflow-ai/openrag/blob/main/docker-compose-cpu.yml",children:"docker-compose-cpu.yml"})," to deploy OpenRAG."]}),"\n",(0,t.jsx)(n.h3,{id:"podman-on-macos-memory-issues",children:"Podman on macOS memory issues"}),"\n",(0,t.jsx)(n.p,{children:"If you're using Podman on macOS, you may need to increase VM memory on your Podman machine.\nThis example increases the machine size to 8 GB of RAM, which should be sufficient to run OpenRAG."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"podman machine stop\npodman machine rm\npodman machine init --memory 8192 # 8 GB example\npodman machine start\n"})}),"\n",(0,t.jsx)(n.h2,{id:"port-conflicts",children:"Port conflicts"}),"\n",(0,t.jsx)(n.p,{children:"Ensure ports 3000, 7860, 8000, 9200, 5601 are available."}),"\n",(0,t.jsx)(n.h2,{id:"langflow-container-already-exists",children:"Langflow container already exists"}),"\n",(0,t.jsx)(n.p,{children:"If you are running other versions of Langflow containers on your machine, you may encounter an issue where Docker or Podman thinks Langflow is already up."}),"\n",(0,t.jsx)(n.p,{children:"Remove just the problem container, or clean up all containers and start fresh."}),"\n",(0,t.jsx)(n.p,{children:"To reset your local containers and pull new images, do the following:"}),"\n",(0,t.jsxs)(n.ol,{children:["\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Stop your containers and completely remove them."}),"\n",(0,t.jsxs)(s.A,{groupId:"Container software",children:[(0,t.jsx)(l.A,{value:"Podman",label:"Podman",children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"# Stop all running containers\npodman stop --all\n\n# Remove all containers (including stopped ones)\npodman rm --all --force\n\n# Remove all images\npodman rmi --all --force\n\n# Remove all volumes\npodman volume prune --force\n\n# Remove all networks (except default)\npodman network prune --force\n\n# Clean up any leftover data\npodman system prune --all --force --volumes\n"})})}),(0,t.jsx)(l.A,{value:"Docker",label:"Docker",default:!0,children:(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"# Stop all running containers\ndocker stop $(docker ps -q)\n\n# Remove all containers (including stopped ones)\ndocker rm --force $(docker ps -aq)\n\n# Remove all images\ndocker rmi --force $(docker images -q)\n\n# Remove all volumes\ndocker volume prune --force\n\n# Remove all networks (except default)\ndocker network prune --force\n\n# Clean up any leftover data\ndocker system prune --all --force --volumes\n"})})})]}),"\n"]}),"\n",(0,t.jsxs)(n.li,{children:["\n",(0,t.jsx)(n.p,{children:"Restart OpenRAG and upgrade to get the latest images for your containers."}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"uv sync\nuv run openrag\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:"Status"}),", and then click ",(0,t.jsx)(n.strong,{children:"Upgrade"}),".\nWhen the ",(0,t.jsx)(n.strong,{children:"Close"})," button is active, the upgrade is complete.\nClose the window and open the OpenRAG appplication."]}),"\n"]}),"\n"]})]})}function m(e={}){const{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(p,{...e})}):p(e)}},8453:(e,n,r)=>{r.d(n,{R:()=>s,x:()=>l});var o=r(6540);const t={},a=o.createContext(t);function s(e){const n=o.useContext(a);return o.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:s(e.components),o.createElement(a.Provider,{value:n},e.children)}},9365:(e,n,r)=>{r.d(n,{A:()=>s});r(6540);var o=r(4164);const t={tabItem:"tabItem_Ymn6"};var a=r(4848);function s({children:e,hidden:n,className:r}){return(0,a.jsx)("div",{role:"tabpanel",className:(0,o.A)(t.tabItem,r),hidden:n,children:e})}}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.73904581.js b/assets/js/runtime~main.73904581.js new file mode 100644 index 00000000..1a9a8e1b --- /dev/null +++ b/assets/js/runtime~main.73904581.js @@ -0,0 +1 @@ +(()=>{"use strict";var e,t,r,a,o,n={},c={};function f(e){var t=c[e];if(void 0!==t)return t.exports;var r=c[e]={id:e,loaded:!1,exports:{}};return n[e].call(r.exports,r,r.exports,f),r.loaded=!0,r.exports}f.m=n,f.c=c,e=[],f.O=(t,r,a,o)=>{if(!r){var n=1/0;for(u=0;u=o)&&Object.keys(f.O).every(e=>f.O[e](r[i]))?r.splice(i--,1):(c=!1,o0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[r,a,o]},f.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return f.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,f.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var o=Object.create(null);f.r(o);var n={};t=t||[null,r({}),r([]),r(r)];for(var c=2&a&&e;("object"==typeof c||"function"==typeof c)&&!~t.indexOf(c);c=r(c))Object.getOwnPropertyNames(c).forEach(t=>n[t]=()=>e[t]);return n.default=()=>e,f.d(o,n),o},f.d=(e,t)=>{for(var r in t)f.o(t,r)&&!f.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},f.f={},f.e=e=>Promise.all(Object.keys(f.f).reduce((t,r)=>(f.f[r](e,t),t),[])),f.u=e=>"assets/js/"+({26:"c8078f0a",48:"a94703ab",98:"a7bd4aaa",172:"e633a5ea",272:"749371cc",401:"17896441",532:"33362219",567:"22dd74f7",571:"0ba6a408",647:"5e95c892",668:"eb5b356a",717:"af920ffe",742:"aba21aa0",750:"d0314b07",919:"ca2c3c0c",961:"21afe7ac"}[e]||e)+"."+{26:"a2c8f112",48:"37079d87",98:"5b195d0f",172:"88d72b56",237:"4f1a14e7",272:"0134aeef",401:"3584c216",532:"39c0bb64",567:"dd618abe",571:"17c091b7",647:"a118483c",668:"a4c27fc6",717:"dd590fc3",742:"ff196c6d",750:"765517a6",758:"382c453d",919:"57e04881",961:"e40588c0"}[e]+".js",f.miniCssF=e=>{},f.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),f.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a={},o="openrag-docs:",f.l=(e,t,r,n)=>{if(a[e])a[e].push(t);else{var c,i;if(void 0!==r)for(var d=document.getElementsByTagName("script"),u=0;u{c.onerror=c.onload=null,clearTimeout(b);var o=a[e];if(delete a[e],c.parentNode&&c.parentNode.removeChild(c),o&&o.forEach(e=>e(r)),t)return t(r)},b=setTimeout(s.bind(null,void 0,{type:"timeout",target:c}),12e4);c.onerror=s.bind(null,c.onerror),c.onload=s.bind(null,c.onload),i&&document.head.appendChild(c)}},f.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},f.p="/",f.gca=function(e){return e={17896441:"401",33362219:"532",c8078f0a:"26",a94703ab:"48",a7bd4aaa:"98",e633a5ea:"172","749371cc":"272","22dd74f7":"567","0ba6a408":"571","5e95c892":"647",eb5b356a:"668",af920ffe:"717",aba21aa0:"742",d0314b07:"750",ca2c3c0c:"919","21afe7ac":"961"}[e]||e,f.p+f.u(e)},(()=>{var e={354:0,869:0};f.f.j=(t,r)=>{var a=f.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else if(/^(354|869)$/.test(t))e[t]=0;else{var o=new Promise((r,o)=>a=e[t]=[r,o]);r.push(a[2]=o);var n=f.p+f.u(t),c=new Error;f.l(n,r=>{if(f.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var o=r&&("load"===r.type?"missing":r.type),n=r&&r.target&&r.target.src;c.message="Loading chunk "+t+" failed.\n("+o+": "+n+")",c.name="ChunkLoadError",c.type=o,c.request=n,a[1](c)}},"chunk-"+t,t)}},f.O.j=t=>0===e[t];var t=(t,r)=>{var a,o,n=r[0],c=r[1],i=r[2],d=0;if(n.some(t=>0!==e[t])){for(a in c)f.o(c,a)&&(f.m[a]=c[a]);if(i)var u=i(f)}for(t&&t(r);d{"use strict";var e,t,r,a,o,n={},f={};function c(e){var t=f[e];if(void 0!==t)return t.exports;var r=f[e]={id:e,loaded:!1,exports:{}};return n[e].call(r.exports,r,r.exports,c),r.loaded=!0,r.exports}c.m=n,c.c=f,e=[],c.O=(t,r,a,o)=>{if(!r){var n=1/0;for(u=0;u=o)&&Object.keys(c.O).every(e=>c.O[e](r[i]))?r.splice(i--,1):(f=!1,o0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[r,a,o]},c.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return c.d(t,{a:t}),t},r=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,c.t=function(e,a){if(1&a&&(e=this(e)),8&a)return e;if("object"==typeof e&&e){if(4&a&&e.__esModule)return e;if(16&a&&"function"==typeof e.then)return e}var o=Object.create(null);c.r(o);var n={};t=t||[null,r({}),r([]),r(r)];for(var f=2&a&&e;("object"==typeof f||"function"==typeof f)&&!~t.indexOf(f);f=r(f))Object.getOwnPropertyNames(f).forEach(t=>n[t]=()=>e[t]);return n.default=()=>e,c.d(o,n),o},c.d=(e,t)=>{for(var r in t)c.o(t,r)&&!c.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},c.f={},c.e=e=>Promise.all(Object.keys(c.f).reduce((t,r)=>(c.f[r](e,t),t),[])),c.u=e=>"assets/js/"+({26:"c8078f0a",48:"a94703ab",98:"a7bd4aaa",172:"e633a5ea",272:"749371cc",401:"17896441",532:"33362219",567:"22dd74f7",571:"0ba6a408",647:"5e95c892",668:"eb5b356a",717:"af920ffe",742:"aba21aa0",750:"d0314b07",919:"ca2c3c0c",961:"21afe7ac"}[e]||e)+"."+{26:"95121b15",48:"37079d87",98:"5b195d0f",172:"cbe02eaa",237:"4f1a14e7",272:"c90a8e18",401:"3584c216",532:"d86f431d",567:"4cc55718",571:"eb57b569",647:"a118483c",668:"516bb081",717:"87292094",742:"ff196c6d",750:"636e9726",758:"382c453d",919:"7eb785b4",961:"e09a4f35"}[e]+".js",c.miniCssF=e=>{},c.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),a={},o="openrag-docs:",c.l=(e,t,r,n)=>{if(a[e])a[e].push(t);else{var f,i;if(void 0!==r)for(var d=document.getElementsByTagName("script"),u=0;u{f.onerror=f.onload=null,clearTimeout(b);var o=a[e];if(delete a[e],f.parentNode&&f.parentNode.removeChild(f),o&&o.forEach(e=>e(r)),t)return t(r)},b=setTimeout(s.bind(null,void 0,{type:"timeout",target:f}),12e4);f.onerror=s.bind(null,f.onerror),f.onload=s.bind(null,f.onload),i&&document.head.appendChild(f)}},c.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.p="/",c.gca=function(e){return e={17896441:"401",33362219:"532",c8078f0a:"26",a94703ab:"48",a7bd4aaa:"98",e633a5ea:"172","749371cc":"272","22dd74f7":"567","0ba6a408":"571","5e95c892":"647",eb5b356a:"668",af920ffe:"717",aba21aa0:"742",d0314b07:"750",ca2c3c0c:"919","21afe7ac":"961"}[e]||e,c.p+c.u(e)},(()=>{var e={354:0,869:0};c.f.j=(t,r)=>{var a=c.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else if(/^(354|869)$/.test(t))e[t]=0;else{var o=new Promise((r,o)=>a=e[t]=[r,o]);r.push(a[2]=o);var n=c.p+c.u(t),f=new Error;c.l(n,r=>{if(c.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var o=r&&("load"===r.type?"missing":r.type),n=r&&r.target&&r.target.src;f.message="Loading chunk "+t+" failed.\n("+o+": "+n+")",f.name="ChunkLoadError",f.type=o,f.request=n,a[1](f)}},"chunk-"+t,t)}},c.O.j=t=>0===e[t];var t=(t,r)=>{var a,o,n=r[0],f=r[1],i=r[2],d=0;if(n.some(t=>0!==e[t])){for(a in f)c.o(f,a)&&(c.m[a]=f[a]);if(i)var u=i(c)}for(t&&t(r);d -Install with Docker | OpenRAG - +Install OpenRAG containers | OpenRAG + -

    Install with Docker

    There are two different Docker Compose files. +

    Install OpenRAG containers

    There are two different Docker Compose files. They deploy the same applications and containers locally, but to different environments.

    • @@ -135,7 +135,7 @@ Documents stored in the ./documents directory will persist, since t

      Remove all containers and data (destructive)

      Completely remove your OpenRAG installation and delete all data. This deletes all of your data, including OpenSearch data, uploaded documents, and authentication.

      -
      docker compose down --volumes --remove-orphans --rmi local
      docker system prune -f
    diff --git a/get-started/tui/index.html b/get-started/tui/index.html index 4a7e6614..26fc77a2 100644 --- a/get-started/tui/index.html +++ b/get-started/tui/index.html @@ -4,14 +4,14 @@ Terminal User Interface (TUI) commands | OpenRAG - + -

    Terminal User Interface (TUI) commands

    The OpenRAG Terminal User Interface (TUI) allows you to set up, configure, and monitor your OpenRAG deployment directly from the terminal, on any operating system.

    +

    Terminal User Interface (TUI) commands

    The OpenRAG Terminal User Interface (TUI) allows you to set up, configure, and monitor your OpenRAG deployment directly from the terminal, on any operating system.

    OpenRAG TUI Interface

    Instead of starting OpenRAG using Docker commands and manually editing values in the .env file, the TUI walks you through the setup. It prompts for variables where required, creates a .env file for you, and then starts OpenRAG.

    Once OpenRAG is running, use the TUI to monitor your application, control your containers, and retrieve logs.

    @@ -61,7 +61,7 @@ It first stops and removes all containers, volumes, and local images.

    When the first command is complete, OpenRAG removes any additional Docker objects with prune.

    docker system prune -f

    Diagnostics

    -

    The Diagnostics menu provides health monitoring for your container runtimes and monitoring of your OpenSearch security.

    diff --git a/index.html b/index.html index c50b77dd..d8a942c9 100644 --- a/index.html +++ b/index.html @@ -4,14 +4,14 @@ What is OpenRAG? | OpenRAG - + -

    What is OpenRAG?

    OpenRAG is an open-source package for building agentic RAG systems. +

    What is OpenRAG?

    OpenRAG is an open-source package for building agentic RAG systems. It supports integration with a wide range of orchestration tools, vector databases, and LLM providers.

    OpenRAG connects and amplifies three popular, proven open-source projects into one powerful platform:

      @@ -27,7 +27,7 @@ It supports integration with a wide range of orchestration tools, vector databas

    OpenRAG builds on Langflow's familiar interface while adding OpenSearch for vector storage and Docling for simplified document parsing, with opinionated flows that serve as ready-to-use recipes for ingestion, retrieval, and generation from popular sources like OneDrive, Google Drive, and AWS.

    What's more, every part of the stack is swappable. Write your own custom components in Python, try different language models, and customize your flows to build an agentic RAG system.

    -

    Ready to get started? Install OpenRAG and then run the Quickstart to create a powerful RAG pipeline.

    diff --git a/ingestion/index.html b/ingestion/index.html index 885da908..67289f54 100644 --- a/ingestion/index.html +++ b/ingestion/index.html @@ -3,15 +3,15 @@ -Docling Ingestion | OpenRAG - +Docling in OpenRAG | OpenRAG + -

    Docling Ingestion

    OpenRAG uses Docling for its document ingestion pipeline. +

    Docling in OpenRAG

    OpenRAG uses Docling for its document ingestion pipeline. More specifically, OpenRAG uses Docling Serve, which starts a docling serve process on your local machine and runs Docling ingestion through an API service.

    Docling ingests documents from your local machine or OAuth connectors, splits them into chunks, and stores them as separate, structured documents in the OpenSearch documents index.

    OpenRAG chose Docling for its support for a wide variety of file formats, high performance, and advanced understanding of tables and images.

    @@ -56,7 +56,7 @@ OpenRAG's visual editor is based on the Open Search Agent flow. The agent calls this component to fetch web content, and the results are ingested into OpenSearch.

    For more on using MCP clients in Langflow, see MCP clients.
    -To connect additional MCP servers to the MCP client, see Connect to MCP servers from your application.

    diff --git a/install/index.html b/install/index.html index 424105a3..bdefc4e7 100644 --- a/install/index.html +++ b/install/index.html @@ -3,15 +3,15 @@ -Install OpenRAG | OpenRAG - +Install OpenRAG with TUI | OpenRAG + -

    Install OpenRAG

    Install the OpenRAG Python wheel, and then run the OpenRAG Terminal User Interface(TUI) to start your OpenRAG deployment with a guided setup process.

    +
    diff --git a/knowledge/index.html b/knowledge/index.html index 88a2522d..98c62310 100644 --- a/knowledge/index.html +++ b/knowledge/index.html @@ -3,15 +3,15 @@ -OpenSearch Knowledge | OpenRAG - +OpenSearch in OpenRAG | OpenRAG + -

    OpenSearch Knowledge

    OpenRAG uses OpenSearch for its vector-backed knowledge store. +

    OpenSearch in OpenRAG

    OpenRAG uses OpenSearch for its vector-backed knowledge store. This is a specialized database for storing and retrieving embeddings, which helps your Agent efficiently find relevant information. OpenSearch provides powerful hybrid search capabilities with enterprise-grade security and multi-tenancy support.

    Authentication and document access

    @@ -111,7 +111,7 @@ A new filter is created with default settings that match everything.

    You can use custom embedding models by specifying them in your configuration.

    If you use an unknown embedding model, OpenRAG will automatically fall back to 1536 dimensions and log a warning. The system will continue to work, but search quality may be affected if the actual model dimensions differ from 1536.

    The default embedding dimension is 1536 and the default model is text-embedding-3-small.

    -

    For models with known vector dimensions, see settings.py in the OpenRAG repository.

    diff --git a/quickstart/index.html b/quickstart/index.html index f2a4ac7f..91657935 100644 --- a/quickstart/index.html +++ b/quickstart/index.html @@ -4,14 +4,14 @@ Quickstart | OpenRAG - + -

    Quickstart

    Get started with OpenRAG by loading your knowledge, swapping out your language model, and then chatting with the OpenRAG API.

    +
    diff --git a/reference/configuration/index.html b/reference/configuration/index.html index 0d67ec74..6571f972 100644 --- a/reference/configuration/index.html +++ b/reference/configuration/index.html @@ -4,14 +4,14 @@ Environment variables | OpenRAG - + -

    Environment variables

    OpenRAG recognizes supported environment variables from the following sources:

    +
    diff --git a/support/troubleshoot/index.html b/support/troubleshoot/index.html index 5ba3dac8..506cfdc6 100644 --- a/support/troubleshoot/index.html +++ b/support/troubleshoot/index.html @@ -3,15 +3,15 @@ -Troubleshoot | OpenRAG - +Troubleshooting | OpenRAG + -

    Troubleshoot

    This page provides troubleshooting advice for issues you might encounter when using OpenRAG or contributing to OpenRAG.

    +

    Troubleshooting

    This page provides troubleshooting advice for issues you might encounter when using OpenRAG or contributing to OpenRAG.

    OpenSearch fails to start

    Check that OPENSEARCH_PASSWORD set in Environment variables meets requirements. The password must contain at least 8 characters, and must contain at least one uppercase letter, one lowercase letter, one digit, and one special character that is strong.