1 line
No EOL
12 KiB
JavaScript
1 line
No EOL
12 KiB
JavaScript
"use strict";(self.webpackChunkopenrag_docs=self.webpackChunkopenrag_docs||[]).push([[126],{7306:(e,n,i)=>{i.r(n),i.d(n,{assets:()=>c,contentTitle:()=>l,default:()=>a,frontMatter:()=>t,metadata:()=>r,toc:()=>o});const r=JSON.parse('{"id":"configure/configuration","title":"Configuration","description":"OpenRAG supports multiple configuration methods with the following priority:","source":"@site/docs/configure/configuration.md","sourceDirName":"configure","slug":"/configure/configuration","permalink":"/openrag/configure/configuration","draft":false,"unlisted":false,"editUrl":"https://github.com/openrag/openrag/tree/main/docs/docs/configure/configuration.md","tags":[],"version":"current","frontMatter":{"title":"Configuration","slug":"/configure/configuration"},"sidebar":"tutorialSidebar","previous":{"title":"Docling Ingestion","permalink":"/openrag/ingestion"},"next":{"title":"Troubleshoot","permalink":"/openrag/support/troubleshoot"}}');var s=i(4848),d=i(8453);const t={title:"Configuration",slug:"/configure/configuration"},l="Configuration",c={},o=[{value:"Configuration File",id:"configuration-file",level:2},{value:"Environment Variables",id:"environment-variables",level:2},{value:"Required Variables",id:"required-variables",level:2},{value:"Ingestion Configuration",id:"ingestion-configuration",level:2},{value:"Optional Variables",id:"optional-variables",level:2},{value:"OpenRAG Configuration Variables",id:"openrag-configuration-variables",level:2},{value:"Provider Settings",id:"provider-settings",level:3},{value:"Knowledge Settings",id:"knowledge-settings",level:3},{value:"Agent Settings",id:"agent-settings",level:3}];function h(e){const n={code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",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,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.header,{children:(0,s.jsx)(n.h1,{id:"configuration",children:"Configuration"})}),"\n",(0,s.jsx)(n.p,{children:"OpenRAG supports multiple configuration methods with the following priority:"}),"\n",(0,s.jsxs)(n.ol,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Environment Variables"})," (highest priority)"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Configuration File"})," (",(0,s.jsx)(n.code,{children:"config.yaml"}),")"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Langflow Flow Settings"})," (runtime override)"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Default Values"})," (fallback)"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"configuration-file",children:"Configuration File"}),"\n",(0,s.jsxs)(n.p,{children:["Create a ",(0,s.jsx)(n.code,{children:"config.yaml"})," file in the project root to configure OpenRAG:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-yaml",children:'# OpenRAG Configuration File\nprovider:\n model_provider: "openai" # openai, anthropic, azure, etc.\n api_key: "your-api-key" # or use OPENAI_API_KEY env var\n\nknowledge:\n embedding_model: "text-embedding-3-small"\n chunk_size: 1000\n chunk_overlap: 200\n ocr: true\n picture_descriptions: false\n\nagent:\n llm_model: "gpt-4o-mini"\n system_prompt: "You are a helpful AI assistant..."\n'})}),"\n",(0,s.jsx)(n.h2,{id:"environment-variables",children:"Environment Variables"}),"\n",(0,s.jsxs)(n.p,{children:["Environment variables will override configuration file settings. You can still use ",(0,s.jsx)(n.code,{children:".env"})," files:"]}),"\n",(0,s.jsx)(n.pre,{children:(0,s.jsx)(n.code,{className:"language-bash",children:"cp .env.example .env\n"})}),"\n",(0,s.jsx)(n.h2,{id:"required-variables",children:"Required Variables"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Variable"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"OPENAI_API_KEY"})}),(0,s.jsx)(n.td,{children:"Your OpenAI API key"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"OPENSEARCH_PASSWORD"})}),(0,s.jsx)(n.td,{children:"Password for OpenSearch admin user"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"LANGFLOW_SUPERUSER"})}),(0,s.jsx)(n.td,{children:"Langflow admin username"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"LANGFLOW_SUPERUSER_PASSWORD"})}),(0,s.jsx)(n.td,{children:"Langflow admin password"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"LANGFLOW_CHAT_FLOW_ID"})}),(0,s.jsx)(n.td,{children:"ID of your Langflow chat flow"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"LANGFLOW_INGEST_FLOW_ID"})}),(0,s.jsx)(n.td,{children:"ID of your Langflow ingestion flow"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"NUDGES_FLOW_ID"})}),(0,s.jsx)(n.td,{children:"ID of your Langflow nudges/suggestions flow"})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"ingestion-configuration",children:"Ingestion Configuration"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Variable"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsx)(n.tbody,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"DISABLE_INGEST_WITH_LANGFLOW"})}),(0,s.jsxs)(n.td,{children:["Disable Langflow ingestion pipeline (default: ",(0,s.jsx)(n.code,{children:"false"}),")"]})]})})]}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"false"})," or unset: Uses Langflow pipeline (upload \u2192 ingest \u2192 delete)"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.code,{children:"true"}),": Uses traditional OpenRAG processor for document ingestion"]}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"optional-variables",children:"Optional Variables"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Variable"}),(0,s.jsx)(n.th,{children:"Description"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"LANGFLOW_PUBLIC_URL"})}),(0,s.jsxs)(n.td,{children:["Public URL for Langflow (default: ",(0,s.jsx)(n.code,{children:"http://localhost:7860"}),")"]})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsxs)(n.td,{children:[(0,s.jsx)(n.code,{children:"GOOGLE_OAUTH_CLIENT_ID"})," / ",(0,s.jsx)(n.code,{children:"GOOGLE_OAUTH_CLIENT_SECRET"})]}),(0,s.jsx)(n.td,{children:"Google OAuth authentication"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsxs)(n.td,{children:[(0,s.jsx)(n.code,{children:"MICROSOFT_GRAPH_OAUTH_CLIENT_ID"})," / ",(0,s.jsx)(n.code,{children:"MICROSOFT_GRAPH_OAUTH_CLIENT_SECRET"})]}),(0,s.jsx)(n.td,{children:"Microsoft OAuth"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"WEBHOOK_BASE_URL"})}),(0,s.jsx)(n.td,{children:"Base URL for webhook endpoints"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsxs)(n.td,{children:[(0,s.jsx)(n.code,{children:"AWS_ACCESS_KEY_ID"})," / ",(0,s.jsx)(n.code,{children:"AWS_SECRET_ACCESS_KEY"})]}),(0,s.jsx)(n.td,{children:"AWS integrations"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"SESSION_SECRET"})}),(0,s.jsx)(n.td,{children:"Session management (default: auto-generated, change in production)"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"LANGFLOW_KEY"})}),(0,s.jsx)(n.td,{children:"Explicit Langflow API key (auto-generated if not provided)"})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"LANGFLOW_SECRET_KEY"})}),(0,s.jsx)(n.td,{children:"Secret key for Langflow internal operations"})]})]})]}),"\n",(0,s.jsx)(n.h2,{id:"openrag-configuration-variables",children:"OpenRAG Configuration Variables"}),"\n",(0,s.jsxs)(n.p,{children:["These environment variables override settings in ",(0,s.jsx)(n.code,{children:"config.yaml"}),":"]}),"\n",(0,s.jsx)(n.h3,{id:"provider-settings",children:"Provider Settings"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Variable"}),(0,s.jsx)(n.th,{children:"Description"}),(0,s.jsx)(n.th,{children:"Default"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"MODEL_PROVIDER"})}),(0,s.jsx)(n.td,{children:"Model provider (openai, anthropic, etc.)"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"openai"})})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"PROVIDER_API_KEY"})}),(0,s.jsx)(n.td,{children:"API key for the model provider"}),(0,s.jsx)(n.td,{})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"OPENAI_API_KEY"})}),(0,s.jsx)(n.td,{children:"OpenAI API key (backward compatibility)"}),(0,s.jsx)(n.td,{})]})]})]}),"\n",(0,s.jsx)(n.h3,{id:"knowledge-settings",children:"Knowledge Settings"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Variable"}),(0,s.jsx)(n.th,{children:"Description"}),(0,s.jsx)(n.th,{children:"Default"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"EMBEDDING_MODEL"})}),(0,s.jsx)(n.td,{children:"Embedding model for vector search"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"text-embedding-3-small"})})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"CHUNK_SIZE"})}),(0,s.jsx)(n.td,{children:"Text chunk size for document processing"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"1000"})})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"CHUNK_OVERLAP"})}),(0,s.jsx)(n.td,{children:"Overlap between chunks"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"200"})})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"OCR_ENABLED"})}),(0,s.jsx)(n.td,{children:"Enable OCR for image processing"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"true"})})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"PICTURE_DESCRIPTIONS_ENABLED"})}),(0,s.jsx)(n.td,{children:"Enable picture descriptions"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"false"})})]})]})]}),"\n",(0,s.jsx)(n.h3,{id:"agent-settings",children:"Agent Settings"}),"\n",(0,s.jsxs)(n.table,{children:[(0,s.jsx)(n.thead,{children:(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.th,{children:"Variable"}),(0,s.jsx)(n.th,{children:"Description"}),(0,s.jsx)(n.th,{children:"Default"})]})}),(0,s.jsxs)(n.tbody,{children:[(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"LLM_MODEL"})}),(0,s.jsx)(n.td,{children:"Language model for the chat agent"}),(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"gpt-4o-mini"})})]}),(0,s.jsxs)(n.tr,{children:[(0,s.jsx)(n.td,{children:(0,s.jsx)(n.code,{children:"SYSTEM_PROMPT"})}),(0,s.jsx)(n.td,{children:"System prompt for the agent"}),(0,s.jsx)(n.td,{children:"Default assistant prompt"})]})]})]}),"\n",(0,s.jsxs)(n.p,{children:["See ",(0,s.jsx)(n.code,{children:".env.example"})," for a complete list with descriptions, and ",(0,s.jsx)(n.code,{children:"docker-compose*.yml"})," for runtime usage."]})]})}function a(e={}){const{wrapper:n}={...(0,d.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(h,{...e})}):h(e)}},8453:(e,n,i)=>{i.d(n,{R:()=>t,x:()=>l});var r=i(6540);const s={},d=r.createContext(s);function t(e){const n=r.useContext(d);return r.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(s):e.components||s:t(e.components),r.createElement(d.Provider,{value:n},e.children)}}}]); |