Compare commits

..

1 commit

Author SHA1 Message Date
Edwin Jose
6290e42f3c Merge branch 'main' into feat-add-dual-ingestion 2025-09-04 13:27:29 -04:00
499 changed files with 17494 additions and 118481 deletions

View file

@ -1,49 +1,2 @@
# Environment files
.env
.env.local
.env.development
.env.production
# Auth files
.drive.json
*.json
# Dependencies
node_modules/
*/node_modules/
**/node_modules/
# Python cache
__pycache__/
*/__pycache__/
**/__pycache__/
*.pyc
*.pyo
*.pyd
.Python
# Build outputs
build/
dist/
.next/
out/
# Development files
.git/
.gitignore
README.md
*.md
.vscode/
.idea/
# Logs
*.log
logs/
# OS files
.DS_Store
Thumbs.db
# Temporary files
tmp/
temp/

View file

@ -1,88 +1,32 @@
# Ingestion Configuration
# Set to true to disable Langflow ingestion and use traditional OpenRAG processor
# If unset or false, Langflow pipeline will be used (default: upload -> ingest -> delete)
DISABLE_INGEST_WITH_LANGFLOW=false
# Langflow HTTP timeout configuration (in seconds)
# For large documents (300+ pages), ingestion can take 30+ minutes
# Increase these values if you experience timeouts with very large PDFs
# Default: 2400 seconds (40 minutes) total timeout, 30 seconds connection timeout
# LANGFLOW_TIMEOUT=2400
# LANGFLOW_CONNECT_TIMEOUT=30
# make one like so https://docs.langflow.org/api-keys-and-authentication#langflow-secret-key
LANGFLOW_SECRET_KEY=
# flow ids for chat and ingestion flows
LANGFLOW_CHAT_FLOW_ID=1098eea1-6649-4e1d-aed1-b77249fb8dd0
LANGFLOW_INGEST_FLOW_ID=5488df7c-b93f-4f87-a446-b67028bc0813
LANGFLOW_URL_INGEST_FLOW_ID=72c3d17c-2dac-4a73-b48a-6518473d7830
# Ingest flow using docling
# LANGFLOW_INGEST_FLOW_ID=1402618b-e6d1-4ff2-9a11-d6ce71186915
NUDGES_FLOW_ID=ebc01d31-1976-46ce-a385-b0240327226c
# Set a strong admin password for OpenSearch; a bcrypt hash is generated at
# container startup from this value. Do not commit real secrets.
# must match the hashed password in secureconfig, must change for secure deployment!!!
# NOTE: if you set this by hand, it must be a complex password:
# 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.
OPENSEARCH_PASSWORD=
# make here https://console.cloud.google.com/apis/credentials
# Path to persist OpenSearch data (indices, documents, cluster state)
# Default: ./opensearch-data
OPENSEARCH_DATA_PATH=./opensearch-data
# make here https://console.cloud.google.com/apis/credentials
GOOGLE_OAUTH_CLIENT_ID=
GOOGLE_OAUTH_CLIENT_SECRET=
# Azure app registration credentials for SharePoint/OneDrive
MICROSOFT_GRAPH_OAUTH_CLIENT_ID=
MICROSOFT_GRAPH_OAUTH_CLIENT_SECRET=
# AWS Access Key ID and Secret Access Key with access to your S3 instance
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
# OPTIONAL: dns routable from google (etc.) to handle continous ingest (something like ngrok works). This enables continous ingestion
WEBHOOK_BASE_URL=
# Model Provider API Keys
OPENAI_API_KEY=
ANTHROPIC_API_KEY=
OLLAMA_ENDPOINT=
WATSONX_API_KEY=
WATSONX_ENDPOINT=
WATSONX_PROJECT_ID=
# LLM Provider configuration. Providers can be "anthropic", "watsonx", "ibm" or "ollama".
LLM_PROVIDER=
LLM_MODEL=
# Embedding provider configuration. Providers can be "watsonx", "ibm" or "ollama".
EMBEDDING_PROVIDER=
EMBEDDING_MODEL=
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
# OPTIONAL url for openrag link to langflow in the UI
LANGFLOW_PUBLIC_URL=
# OPTIONAL: Override the full docling-serve URL (e.g., for remote instances)
# If not set, auto-detects host and uses port 5001
# DOCLING_SERVE_URL=http://my-docling-server:5001
# OPTIONAL: Override host for docling service (for special networking setups)
# HOST_DOCKER_INTERNAL=host.containers.internal
# Langflow auth
LANGFLOW_AUTO_LOGIN=False
LANGFLOW_SUPERUSER=
LANGFLOW_SUPERUSER_PASSWORD=
LANGFLOW_NEW_USER_IS_ACTIVE=False
LANGFLOW_ENABLE_SUPERUSER_CLI=False
# Langfuse tracing (optional)
# Get keys from https://cloud.langfuse.com or your self-hosted instance
LANGFUSE_SECRET_KEY=
LANGFUSE_PUBLIC_KEY=
# Leave empty for Langfuse Cloud, or set for self-hosted (e.g., http://localhost:3002)
LANGFUSE_HOST=

View file

@ -1,155 +0,0 @@
name: Bug Report
description: Report a bug or unexpected behavior in OpenRAG
title: "[Bug]: "
labels: ["bug"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to report a bug! Please fill out the form below to help us understand and fix the issue.
- type: input
id: openrag-version
attributes:
label: OpenRAG Version
description: What version of OpenRAG are you using? Run `openrag --version` or check your package version.
placeholder: "e.g., 0.1.0"
validations:
required: true
- type: dropdown
id: deployment-method
attributes:
label: Deployment Method
description: How are you running OpenRAG?
options:
- uvx (uvx openrag)
- uv add (installed in project)
- Docker
- Podman
- Local development (make dev)
- Other
validations:
required: true
- type: input
id: os
attributes:
label: Operating System
description: What operating system are you using?
placeholder: "e.g., macOS 14.0, Ubuntu 22.04, Windows 11"
validations:
required: true
- type: input
id: python-version
attributes:
label: Python Version
description: What Python version are you using? Run `python --version` to check.
placeholder: "e.g., 3.13.0"
validations:
required: false
- type: dropdown
id: affected-area
attributes:
label: Affected Area
description: Which area(s) of OpenRAG does this bug affect? Select all that apply.
multiple: true
options:
- Ingestion (document processing, upload, Docling)
- Retrieval (search, OpenSearch, hybrid search)
- Chat (chat interface, conversations, AI responses)
- Knowledge Filters (partitions, document filtering)
- Settings (configuration, model providers)
- TUI (Terminal User Interface)
- Connectors (Google Drive, OneDrive, SharePoint)
- Frontend (Next.js UI, components)
- Backend/API (Python/Starlette)
- Infrastructure (Docker, OpenSearch, Langflow)
- SDK (Python or TypeScript SDK)
- Onboarding (setup wizard, initial configuration)
- Authentication (OIDC, API keys)
- Other
validations:
required: true
- type: textarea
id: bug-description
attributes:
label: Bug Description
description: A clear and concise description of what the bug is.
placeholder: Describe the bug...
validations:
required: true
- type: textarea
id: steps-to-reproduce
attributes:
label: Steps to Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1. Go to '...'
2. Click on '...'
3. Scroll down to '...'
4. See error
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected Behavior
description: A clear and concise description of what you expected to happen.
placeholder: What should have happened?
validations:
required: true
- type: textarea
id: actual-behavior
attributes:
label: Actual Behavior
description: A clear and concise description of what actually happened.
placeholder: What actually happened?
validations:
required: true
- type: textarea
id: logs
attributes:
label: Relevant Logs
description: |
Please copy and paste any relevant log output.
You can get logs using `make logs` for Docker deployments or check the terminal output.
This will be automatically formatted into code, so no need for backticks.
render: shell
validations:
required: false
- type: textarea
id: screenshots
attributes:
label: Screenshots
description: If applicable, add screenshots to help explain your problem.
validations:
required: false
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Add any other context about the problem here (e.g., browser version, specific document types, model provider being used).
validations:
required: false
- type: checkboxes
id: checklist
attributes:
label: Checklist
description: Please confirm the following before submitting.
options:
- label: I have searched existing issues to ensure this bug hasn't been reported before.
required: true
- label: I have provided all the requested information.
required: true

View file

@ -1,15 +0,0 @@
blank_issues_enabled: false
contact_links:
- name: OpenRAG Documentation
url: https://docs.openr.ag/
about: Learn more about OpenRAG's features, installation, and configuration.
- name: Troubleshooting Guide
url: https://docs.openr.ag/support/troubleshoot
about: Check the troubleshooting guide for common issues and solutions.
- name: GitHub Discussions
url: https://github.com/langflow-ai/openrag/discussions
about: Ask questions and discuss ideas with the community.
- name: Contributing Guide
url: https://github.com/langflow-ai/openrag/blob/main/CONTRIBUTING.md
about: Learn how to contribute to OpenRAG development.

View file

@ -1,106 +0,0 @@
name: Documentation Issue
description: Report an issue with documentation or request new documentation
title: "[Docs]: "
labels: ["documentation"]
body:
- type: markdown
attributes:
value: |
Thanks for helping improve OpenRAG's documentation! Please provide details about the issue or your request.
- type: dropdown
id: issue-type
attributes:
label: Issue Type
description: What type of documentation issue is this?
options:
- Incorrect information
- Missing documentation
- Outdated content
- Unclear or confusing
- Typo or grammatical error
- Broken links
- Request for new documentation
- Other
validations:
required: true
- type: dropdown
id: doc-area
attributes:
label: Documentation Area
description: Which area of documentation does this relate to?
multiple: true
options:
- Getting Started / Quickstart
- Installation (uvx, Docker, Podman)
- Configuration / Settings
- Ingestion & Document Processing
- Search & Retrieval
- Chat Interface
- Knowledge Filters
- Connectors (Google Drive, OneDrive, SharePoint)
- TUI (Terminal User Interface)
- API Reference
- SDK Documentation (Python/TypeScript)
- Troubleshooting
- Contributing Guide
- Other
validations:
required: true
- type: input
id: doc-url
attributes:
label: Documentation URL
description: If applicable, provide a link to the specific documentation page.
placeholder: "https://docs.openr.ag/..."
validations:
required: false
- type: textarea
id: current-content
attributes:
label: Current Content
description: If reporting an issue, what does the documentation currently say?
placeholder: Quote or describe the current documentation content.
validations:
required: false
- type: textarea
id: issue-description
attributes:
label: Issue Description
description: Describe the problem or what documentation you'd like to see added.
placeholder: |
For issues: Explain what's wrong or confusing about the current documentation.
For requests: Describe what topic you'd like documented and why it would be helpful.
validations:
required: true
- type: textarea
id: suggested-content
attributes:
label: Suggested Content
description: If you have suggestions for how to fix or improve the documentation, please share them.
placeholder: Provide suggested text, corrections, or an outline for new documentation.
validations:
required: false
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Add any other context, screenshots, or examples here.
validations:
required: false
- type: checkboxes
id: contribution
attributes:
label: Contribution
description: Would you be interested in contributing to fix this documentation issue?
options:
- label: I would be willing to submit a pull request to fix this issue.
required: false

View file

@ -1,113 +0,0 @@
name: Feature Request
description: Suggest a new feature or enhancement for OpenRAG
title: "[Feature]: "
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
Thanks for suggesting a feature! Please provide as much detail as possible to help us understand your request.
- type: dropdown
id: feature-area
attributes:
label: Feature Area
description: Which area(s) of OpenRAG does this feature relate to?
multiple: true
options:
- Ingestion (document processing, upload, Docling)
- Retrieval (search, OpenSearch, hybrid search)
- Chat (chat interface, conversations, AI responses)
- Knowledge Filters (partitions, document filtering)
- Settings (configuration, model providers)
- TUI (Terminal User Interface)
- Connectors (Google Drive, OneDrive, SharePoint)
- Frontend (Next.js UI, components)
- Backend/API (Python/Starlette)
- Infrastructure (Docker, OpenSearch, Langflow)
- SDK (Python or TypeScript SDK)
- Onboarding (setup wizard, initial configuration)
- Authentication (OIDC, API keys)
- New Area
validations:
required: true
- type: textarea
id: problem-description
attributes:
label: Problem Description
description: Is your feature request related to a problem? Please describe.
placeholder: A clear and concise description of what the problem is. E.g., "I'm always frustrated when..."
validations:
required: true
- type: textarea
id: proposed-solution
attributes:
label: Proposed Solution
description: Describe the solution you'd like to see implemented.
placeholder: A clear and concise description of what you want to happen.
validations:
required: true
- type: textarea
id: use-case
attributes:
label: Use Case
description: Describe your use case and how this feature would benefit you or others.
placeholder: |
As a [type of user], I want [goal] so that [benefit].
Example: As a developer, I want to filter documents by custom metadata so that I can organize my knowledge base more effectively.
validations:
required: true
- type: textarea
id: alternatives
attributes:
label: Alternatives Considered
description: Describe any alternative solutions or features you've considered.
placeholder: What other approaches have you thought about? Why wouldn't they work as well?
validations:
required: false
- type: dropdown
id: priority
attributes:
label: Priority
description: How important is this feature to your workflow?
options:
- Nice to have
- Would improve my workflow
- Critical for my use case
validations:
required: true
- type: textarea
id: additional-context
attributes:
label: Additional Context
description: Add any other context, mockups, screenshots, or examples about the feature request here.
validations:
required: false
- type: checkboxes
id: contribution
attributes:
label: Contribution
description: Would you be interested in contributing to this feature?
options:
- label: I would be willing to help implement this feature.
required: false
- label: I can help test this feature once implemented.
required: false
- type: checkboxes
id: checklist
attributes:
label: Checklist
description: Please confirm the following before submitting.
options:
- label: I have searched existing issues and discussions to ensure this feature hasn't been requested before.
required: true

View file

@ -1,11 +0,0 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
commit-message:
prefix: "build(deps):"
include: scope

View file

@ -1,21 +1,58 @@
name: Release + Docker Images (multi-arch)
name: Build Multi-Architecture Docker Images
on:
push:
branches:
- main
paths:
- 'pyproject.toml'
workflow_dispatch:
jobs:
check-version:
runs-on: ubuntu-latest
outputs:
skip_release: ${{ steps.version.outputs.skip_release }}
version: ${{ steps.version.outputs.version }}
docker_version: ${{ steps.version.outputs.docker_version }}
is_prerelease: ${{ steps.version.outputs.is_prerelease }}
build:
strategy:
fail-fast: false
matrix:
include:
# backend
- image: backend
file: ./Dockerfile.backend
tag: phact/openrag-backend
platform: linux/amd64
arch: amd64
runs-on: ubuntu-latest
- image: backend
file: ./Dockerfile.backend
tag: phact/openrag-backend
platform: linux/arm64
arch: arm64
runs-on: self-hosted
# frontend
- image: frontend
file: ./Dockerfile.frontend
tag: phact/openrag-frontend
platform: linux/amd64
arch: amd64
runs-on: ubuntu-latest
- image: frontend
file: ./Dockerfile.frontend
tag: phact/openrag-frontend
platform: linux/arm64
arch: arm64
runs-on: self-hosted
# opensearch
- image: opensearch
file: ./Dockerfile
tag: phact/openrag-opensearch
platform: linux/amd64
arch: amd64
runs-on: ubuntu-latest
- image: opensearch
file: ./Dockerfile
tag: phact/openrag-opensearch
platform: linux/arm64
arch: arm64
runs-on: self-hosted
runs-on: ${{ matrix.runs-on }}
steps:
- name: Checkout
uses: actions/checkout@v4
@ -27,98 +64,6 @@ jobs:
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Version: $VERSION"
# Normalize version per PEP 440 for Docker tags
# e.g., "0.1.53-rc2" -> "0.1.53rc2" to match Python's importlib.metadata
DOCKER_VERSION=$(echo "$VERSION" | sed -E 's/-?(rc|alpha|beta|dev|post)/\1/g')
echo "docker_version=$DOCKER_VERSION" >> $GITHUB_OUTPUT
echo "Docker Version: $DOCKER_VERSION"
# Check if tag already exists
if git rev-parse "v$VERSION" >/dev/null 2>&1; then
echo "Tag v$VERSION already exists, skipping release"
echo "skip_release=true" >> $GITHUB_OUTPUT
exit 0
fi
echo "skip_release=false" >> $GITHUB_OUTPUT
# Check if version is numeric (e.g., 0.1.16) vs prerelease (e.g., 0.1.16-rc1)
if [[ "$VERSION" =~ ^[0-9.-]+$ ]]; then
echo "is_prerelease=false" >> $GITHUB_OUTPUT
echo "Release type: Production"
else
echo "is_prerelease=true" >> $GITHUB_OUTPUT
echo "Release type: Prerelease"
fi
build:
needs: check-version
if: needs.check-version.outputs.skip_release != 'true'
strategy:
fail-fast: false
matrix:
include:
# backend
- image: backend
file: ./Dockerfile.backend
tag: langflowai/openrag-backend
platform: linux/amd64
arch: amd64
runs-on: ubuntu-latest-16-cores
- image: backend
file: ./Dockerfile.backend
tag: langflowai/openrag-backend
platform: linux/arm64
arch: arm64
runs-on: [self-hosted, Linux, ARM64, langflow-ai-arm64-40gb-ephemeral]
# frontend
- image: frontend
file: ./Dockerfile.frontend
tag: langflowai/openrag-frontend
platform: linux/amd64
arch: amd64
runs-on: ubuntu-latest-16-cores
- image: frontend
file: ./Dockerfile.frontend
tag: langflowai/openrag-frontend
platform: linux/arm64
arch: arm64
runs-on: [self-hosted, Linux, ARM64, langflow-ai-arm64-40gb-ephemeral]
# langflow
- image: langflow
file: ./Dockerfile.langflow
tag: langflowai/openrag-langflow
platform: linux/amd64
arch: amd64
runs-on: ubuntu-latest-16-cores
- image: langflow
file: ./Dockerfile.langflow
tag: langflowai/openrag-langflow
platform: linux/arm64
arch: arm64
runs-on: [self-hosted, Linux, ARM64, langflow-ai-arm64-40gb-ephemeral]
# opensearch
- image: opensearch
file: ./Dockerfile
tag: langflowai/openrag-opensearch
platform: linux/amd64
arch: amd64
runs-on: ubuntu-latest-16-cores
- image: opensearch
file: ./Dockerfile
tag: langflowai/openrag-opensearch
platform: linux/arm64
arch: arm64
runs-on: [self-hosted, Linux, ARM64, langflow-ai-arm64-40gb-ephemeral]
runs-on: ${{ matrix.runs-on }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
@ -136,18 +81,24 @@ jobs:
file: ${{ matrix.file }}
platforms: ${{ matrix.platform }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ matrix.tag }}:${{ needs.check-version.outputs.docker_version }}-${{ matrix.arch }}
tags: ${{ matrix.tag }}:${{ steps.version.outputs.version }}-${{ matrix.arch }}
cache-from: type=gha,scope=${{ matrix.image }}-${{ matrix.arch }}
cache-to: type=gha,mode=max,scope=${{ matrix.image }}-${{ matrix.arch }}
manifest:
needs: [build, check-version]
needs: build
runs-on: ubuntu-latest
if: github.event_name != 'pull_request' && needs.check-version.outputs.skip_release != 'true'
if: github.event_name != 'pull_request'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Extract version from pyproject.toml
id: version
run: |
VERSION=$(grep '^version = ' pyproject.toml | cut -d '"' -f 2)
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
@ -156,98 +107,25 @@ jobs:
- name: Create and push multi-arch manifests
run: |
VERSION=${{ needs.check-version.outputs.docker_version }}
VERSION=${{ steps.version.outputs.version }}
# Create versioned tags
docker buildx imagetools create -t langflowai/openrag-backend:$VERSION \
langflowai/openrag-backend:$VERSION-amd64 \
langflowai/openrag-backend:$VERSION-arm64
docker buildx imagetools create -t phact/openrag-backend:$VERSION \
phact/openrag-backend:$VERSION-amd64 \
phact/openrag-backend:$VERSION-arm64
docker buildx imagetools create -t phact/openrag-backend:latest \
phact/openrag-backend:$VERSION-amd64 \
phact/openrag-backend:$VERSION-arm64
docker buildx imagetools create -t langflowai/openrag-frontend:$VERSION \
langflowai/openrag-frontend:$VERSION-amd64 \
langflowai/openrag-frontend:$VERSION-arm64
docker buildx imagetools create -t phact/openrag-frontend:$VERSION \
phact/openrag-frontend:$VERSION-amd64 \
phact/openrag-frontend:$VERSION-arm64
docker buildx imagetools create -t phact/openrag-frontend:latest \
phact/openrag-frontend:$VERSION-amd64 \
phact/openrag-frontend:$VERSION-arm64
docker buildx imagetools create -t langflowai/openrag-langflow:$VERSION \
langflowai/openrag-langflow:$VERSION-amd64 \
langflowai/openrag-langflow:$VERSION-arm64
docker buildx imagetools create -t langflowai/openrag-opensearch:$VERSION \
langflowai/openrag-opensearch:$VERSION-amd64 \
langflowai/openrag-opensearch:$VERSION-arm64
# Only update latest tags if version is numeric
if [[ "$VERSION" =~ ^[0-9.-]+$ ]]; then
echo "Updating latest tags for production release: $VERSION"
docker buildx imagetools create -t langflowai/openrag-backend:latest \
langflowai/openrag-backend:$VERSION-amd64 \
langflowai/openrag-backend:$VERSION-arm64
docker buildx imagetools create -t langflowai/openrag-frontend:latest \
langflowai/openrag-frontend:$VERSION-amd64 \
langflowai/openrag-frontend:$VERSION-arm64
docker buildx imagetools create -t langflowai/openrag-langflow:latest \
langflowai/openrag-langflow:$VERSION-amd64 \
langflowai/openrag-langflow:$VERSION-arm64
docker buildx imagetools create -t langflowai/openrag-opensearch:latest \
langflowai/openrag-opensearch:$VERSION-amd64 \
langflowai/openrag-opensearch:$VERSION-arm64
else
echo "Skipping latest tags - version: $VERSION (not numeric)"
fi
build-python-packages:
needs: [manifest, check-version]
runs-on: ubuntu-latest
if: needs.check-version.outputs.skip_release != 'true'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.13'
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Build wheel and source distribution
run: |
uv build
- name: List built artifacts
run: |
ls -la dist/
echo "Built artifacts:"
for file in dist/*; do
echo " - $(basename $file) ($(stat -c%s $file | numfmt --to=iec-i)B)"
done
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: python-packages
path: dist/
retention-days: 30
- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ needs.check-version.outputs.version }}
name: Release ${{ needs.check-version.outputs.version }}
draft: false
prerelease: ${{ needs.check-version.outputs.is_prerelease }}
generate_release_notes: true
files: |
dist/*.whl
dist/*.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to PyPI
run: |
uv publish
env:
UV_PUBLISH_TOKEN: ${{ secrets.UV_PUBLISH_TOKEN }}
docker buildx imagetools create -t phact/openrag-opensearch:$VERSION \
phact/openrag-opensearch:$VERSION-amd64 \
phact/openrag-opensearch:$VERSION-arm64
docker buildx imagetools create -t phact/openrag-opensearch:latest \
phact/openrag-opensearch:$VERSION-amd64 \
phact/openrag-opensearch:$VERSION-arm64

View file

@ -1,66 +0,0 @@
name: "CodeQL"
on:
push:
branches: [ 'main' ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ 'main' ]
schedule:
- cron: '17 2 * * 1'
jobs:
analyze:
name: Analyze
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'python', 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
steps:
- name: Checkout repository
uses: actions/checkout@v6
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
# Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"

View file

@ -1,60 +0,0 @@
name: Dependency Audit
on:
schedule:
# Run Monday, Thursday at 9am UTC
- cron: '0 9 * * 1,4'
workflow_dispatch: # Allow manual trigger
jobs:
npm-audit:
name: NPM Audit
runs-on: ubuntu-latest
strategy:
matrix:
directory: ['frontend', 'docs', 'sdks/typescript']
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Run npm audit
working-directory: ${{ matrix.directory }}
run: |
echo "::group::NPM Audit for ${{ matrix.directory }}"
npm audit --audit-level=moderate || echo "::warning::NPM audit found vulnerabilities in ${{ matrix.directory }}"
echo "::endgroup::"
- name: Check for outdated packages
working-directory: ${{ matrix.directory }}
run: |
echo "::group::Outdated packages in ${{ matrix.directory }}"
npm outdated || true
echo "::endgroup::"
python-audit:
name: Python Audit
runs-on: ubuntu-latest
strategy:
matrix:
directory: ['.', 'sdks/python']
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Install pip-audit
run: pip install pip-audit
- name: Run pip-audit
working-directory: ${{ matrix.directory }}
run: |
echo "::group::Python Audit for ${{ matrix.directory }}"
pip-audit --desc || echo "::warning::pip-audit found vulnerabilities in ${{ matrix.directory }}"
echo "::endgroup::"

View file

@ -1,266 +0,0 @@
name: Pull Request Docs Draft
on:
pull_request:
branches:
- '**'
paths:
- 'docs/**'
- '.github/workflows/deploy-docs-draft.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
jobs:
build-and-deploy:
runs-on: ubuntu-latest
if: "! github.event.pull_request.head.repo.fork"
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.20.0
cache: npm
cache-dependency-path: ./docs/package-lock.json
- name: Validate Branch Names
run: |
# Check if branch names contain invalid characters. Only alphanumeric, _, -, ., and / are allowed.
validate_branch_name() {
local branch_name="$1"
if [[ ! "$branch_name" =~ ^[a-zA-Z0-9/_\.-]+$ ]]; then
echo "Error: Branch name contains invalid characters. Only alphanumeric, _, -, ., and / are allowed."
exit 1
fi
}
validate_branch_name "${{ github.event.pull_request.head.ref }}"
- name: Extract Branch Names
id: extract_branch
run: |
# Extract and transform branch names
extract_branch() {
local input_branch="$1"
# Check if input_branch starts with "refs/heads/"
if [[ "$input_branch" == refs/heads/* ]]; then
# Remove "refs/heads/" prefix safely using parameter expansion
branch_name="${input_branch#refs/heads/}"
echo "$branch_name"
else
echo "$input_branch"
fi
}
# Transform branch names in form of `refs/heads/main` to `main`
draft_branch=$(extract_branch "${{ github.event.pull_request.head.ref }}")
# Replace / with - in the draft branch name to use as a directory name
draft_directory=$(echo "$draft_branch" | tr / -)
# Safe echo to $GITHUB_OUTPUT
{
echo "draft_branch=$draft_branch"
echo "draft_directory=$draft_directory"
} >> "$GITHUB_OUTPUT"
- name: Set Draft URL
id: draft_url
if: success()
run: |
echo "url=${{ vars.DOCS_DRAFT_BASE_URL }}/langflow-drafts/${{ steps.extract_branch.outputs.draft_directory }}/index.html" >> $GITHUB_OUTPUT
- name: Install dependencies
run: cd docs && npm install
- name: Build website
if: success()
run: |
set -o pipefail
cd docs
npm run build |& tee $GITHUB_WORKSPACE/build.log
env:
BASE_URL: /langflow-drafts/${{ steps.extract_branch.outputs.draft_directory }}
FORCE_COLOR: 0 # Disable color output
# SEGMENT_PUBLIC_WRITE_KEY: ${{ vars.DOCS_DRAFT_SEGMENT_PUBLIC_WRITE_KEY }}
- name: Check Build Result
id: buildLogFail
if: failure()
run: |
MULTILINE_LOG=$(cat $GITHUB_WORKSPACE/build.log)
echo "BUILD_FAILURE<<EOF" >> $GITHUB_ENV
echo $MULTILINE_LOG >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Hide Previous Build Comments
if: ${{ github.event.pull_request.number && (success() || failure()) }}
run: |
set -e
# Get all comments on the PR that match our build comments
comments=$(gh api repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments \
--jq '.[] | select(.body | test("Build failure! :x:|Build successful! :white_check_mark:")) | .node_id')
# Minimize each matching comment using GraphQL API
if [[ -n "$comments" ]]; then
echo "Found previous build comments to hide"
while IFS= read -r comment_id; do
if [[ -n "$comment_id" ]]; then
echo "Minimizing comment: $comment_id"
gh api graphql \
--field id="$comment_id" \
--field classifier="OUTDATED" \
--raw-field query='
mutation($id: ID!, $classifier: ReportedContentClassifiers!) {
minimizeComment(input: { subjectId: $id, classifier: $classifier }) {
minimizedComment {
isMinimized
}
}
}' || echo "Failed to minimize comment $comment_id, continuing..."
echo
fi
done <<< "$comments"
else
echo "No previous build comments found to hide"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Assemble Build Success Comment
if: success()
run: |
build_success_comment="Build successful! :white_check_mark:"
build_success_comment+="\nDeploying docs draft."
echo "BUILD_SUCCESS_COMMENT<<EOF" >> $GITHUB_ENV
echo -e "$build_success_comment" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Create Build Success Comment
if: success()
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ github.event.pull_request.number }}
body: "${{ env.BUILD_SUCCESS_COMMENT }}"
reactions: rocket
- name: Create Build Failure Comment
if: failure()
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
Build failure! :x:
> ${{ env.BUILD_FAILURE }}
reactions: confused
- name: Find Comment
id: fc
if: success()
uses: peter-evans/find-comment@v3
with:
issue-number: ${{ github.event.pull_request.number }}
body-includes: Build successful!
direction: last
- name: Configure AWS CLI
if: success()
run: |
aws configure set aws_access_key_id ${{ secrets.DOCS_AWS_ACCESS_KEY_ID }}
aws configure set aws_secret_access_key ${{ secrets.DOCS_AWS_SECRET_ACCESS_KEY }}
aws configure set region us-west-2
- name: Check for New Assets
run: |
set -o pipefail
echo "Checking for new assets." |& tee -a $GITHUB_WORKSPACE/deploy.log
echo "aws s3 sync docs/build/assets/ s3://${{ vars.DOCS_DRAFT_S3_BUCKET_NAME }}/langflow-drafts/${{ steps.extract_branch.outputs.draft_directory }}/assets/ --size-only --dryrun --no-progress" | tee -a $GITHUB_WORKSPACE/deploy.log
aws s3 sync docs/build/assets/ "s3://${{ vars.DOCS_DRAFT_S3_BUCKET_NAME }}/langflow-drafts/${{ steps.extract_branch.outputs.draft_directory }}/assets/" --size-only --dryrun --no-progress | tee $GITHUB_WORKSPACE/assets.log
- name: Determine Standard or Full Publish
id: check_full_publish
run: |
# Determine if a full publish is required because of new assets.
if grep -qE '(upload:|delete:)' "$GITHUB_WORKSPACE/assets.log"; then
echo "New assets. Perform full publish: true" | tee -a "$GITHUB_WORKSPACE/deploy.log"
echo "perform_full_publish=true" >> "$GITHUB_OUTPUT"
else
echo "No new assets. Perform full publish: false" | tee -a "$GITHUB_WORKSPACE/deploy.log"
echo "perform_full_publish=false" >> "$GITHUB_OUTPUT"
fi
- name: Deploy to S3
if: success()
run: |
set -o pipefail
cd docs
mkdir langflow-drafts
mv build langflow-drafts/${{ steps.extract_branch.outputs.draft_directory }}
cd langflow-drafts
# Records the repository that originally triggered the build so we can post back
# comments upon clean up of a stale draft if it still has an open pull request.
echo "${{ github.event.repository.full_name }}" > ${{ steps.extract_branch.outputs.draft_directory }}/.github_source_repository
s3_params=(
# Hide upload progress for a cleaner sync log
--no-progress
--delete
--exclude "*"
--include "${{ steps.extract_branch.outputs.draft_directory }}/*"
)
if [[ "${{ steps.check_full_publish.outputs.perform_full_publish }}" == "false" ]]; then
s3_params+=(--size-only)
fi
echo "Deploying draft to S3." |& tee -a $GITHUB_WORKSPACE/deploy.log
echo "aws s3 sync . s3://${{ vars.DOCS_DRAFT_S3_BUCKET_NAME }}/langflow-drafts ${s3_params[@]}" |& tee -a $GITHUB_WORKSPACE/deploy.log
aws s3 sync . "s3://${{ vars.DOCS_DRAFT_S3_BUCKET_NAME }}/langflow-drafts" "${s3_params[@]}" |& tee -a $GITHUB_WORKSPACE/deploy.log
# Update .github_source_repository file metadata to mark last modified time of the draft.
# This will allow us to later determine if a draft is stale and needs to be cleaned up.
echo "Marking last modified time of the draft." |& tee -a $GITHUB_WORKSPACE/deploy.log
echo "aws s3 cp --metadata '{\"touched\": \"now\"}' \
s3://${{ vars.DOCS_DRAFT_S3_BUCKET_NAME }}/langflow-drafts/${{ steps.extract_branch.outputs.draft_directory }}/.github_source_repository \
s3://${{ vars.DOCS_DRAFT_S3_BUCKET_NAME }}/langflow-drafts/${{ steps.extract_branch.outputs.draft_directory }}/.github_source_repository" \
|& tee -a $GITHUB_WORKSPACE/deploy.log
aws s3 cp --metadata '{ "touched": "now" }' \
s3://${{ vars.DOCS_DRAFT_S3_BUCKET_NAME }}/langflow-drafts/${{ steps.extract_branch.outputs.draft_directory }}/.github_source_repository \
s3://${{ vars.DOCS_DRAFT_S3_BUCKET_NAME }}/langflow-drafts/${{ steps.extract_branch.outputs.draft_directory }}/.github_source_repository \
|& tee -a $GITHUB_WORKSPACE/deploy.log
- name: Invalidate CloudFront Cache
if: success()
run: |
invalidation_batch="{ \"Paths\": { \"Quantity\": 1, \"Items\": [\"/langflow-drafts/${{ steps.extract_branch.outputs.draft_directory }}/*\"] }, \"CallerReference\": \"langflow-docs-draft-files-$(date +%s)\" }"
echo $invalidation_batch | jq . |& tee -a "$GITHUB_WORKSPACE/deploy.log"
echo "Creating invalidation." |& tee -a "$GITHUB_WORKSPACE/deploy.log"
invalidation_id=$(aws cloudfront create-invalidation --distribution-id "${{ vars.DOCS_DRAFT_CLOUD_FRONT_DISTRIBUTION_ID }}" --invalidation-batch "$invalidation_batch" --query 'Invalidation.Id' --output text |& tee -a "$GITHUB_WORKSPACE/deploy.log")
echo "Awaiting invalidation." |& tee -a "$GITHUB_WORKSPACE/deploy.log"
aws cloudfront wait invalidation-completed --distribution-id "${{ vars.DOCS_DRAFT_CLOUD_FRONT_DISTRIBUTION_ID }}" --id "$invalidation_id" |& tee -a "$GITHUB_WORKSPACE/deploy.log"
echo "Invalidation complete." |& tee -a "$GITHUB_WORKSPACE/deploy.log"
- name: Update Comment
if: ${{ steps.fc.outputs.comment-id != '' }}
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
body: |
Deploy successful! [View draft](${{ steps.draft_url.outputs.url }})
reactions: hooray
- name: Upload Deploy Log
uses: actions/upload-artifact@v4
if: always()
with:
name: deploy.log
path: ${{ github.workspace }}/deploy.log

View file

@ -1,42 +0,0 @@
name: Deploy to GitHub Pages
on:
push:
branches:
- main
paths:
- 'docs/**'
workflow_dispatch:
jobs:
deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.20.0
cache: npm
cache-dependency-path: ./docs/package-lock.json
- name: Install dependencies
run: cd docs && npm install
- name: Build website
run: cd docs && npm run build
# env:
# SEGMENT_PUBLIC_WRITE_KEY: ${{ vars.DOCS_PROD_SEGMENT_PUBLIC_WRITE_KEY }}
# Popular action to deploy to GitHub Pages:
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
# Build output to publish to the `gh-pages` branch:
publish_dir: ./docs/build
# The following lines assign commit authorship to the official
# GH-Actions bot for deploys to `gh-pages` branch:
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
# The GH actions bot is used by default if you didn't specify the two fields.
# You can swap them out with your own user credentials.

View file

@ -1,59 +0,0 @@
name: Publish Python SDK
on:
push:
branches:
- main
paths:
- 'sdks/python/pyproject.toml'
workflow_dispatch:
jobs:
publish:
name: Publish to PyPI
runs-on: ubuntu-latest
defaults:
run:
working-directory: sdks/python
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Extract version from pyproject.toml
id: version
run: |
VERSION=$(grep -Po '(?<=^version = ")[^"]*' pyproject.toml)
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Check if version already published
id: check
run: |
HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" https://pypi.org/pypi/openrag-sdk/${{ steps.version.outputs.version }}/json)
if [ "$HTTP_STATUS" = "200" ]; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi
- name: Build package
if: steps.check.outputs.exists == 'false'
run: uv build
- name: Publish to PyPI
if: steps.check.outputs.exists == 'false'
run: uv publish
env:
UV_PUBLISH_TOKEN: ${{ secrets.UV_PUBLISH_TOKEN }}
- name: Skip publish (version exists)
if: steps.check.outputs.exists == 'true'
run: echo "Version ${{ steps.version.outputs.version }} already exists on PyPI, skipping publish"

View file

@ -1,64 +0,0 @@
name: Publish TypeScript SDK
on:
push:
branches:
- main
paths:
- 'sdks/typescript/package.json'
workflow_dispatch:
jobs:
publish:
name: Publish to npm
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
defaults:
run:
working-directory: sdks/typescript
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
- name: Update npm to latest
run: npm install -g npm@latest
- name: Extract version from package.json
id: version
run: |
VERSION=$(node -p "require('./package.json').version")
echo "version=$VERSION" >> $GITHUB_OUTPUT
- name: Check if version already published
id: check
run: |
if npm view openrag-sdk@${{ steps.version.outputs.version }} version 2>/dev/null; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi
- name: Install dependencies
if: steps.check.outputs.exists == 'false'
run: npm ci
- name: Build
if: steps.check.outputs.exists == 'false'
run: npm run build
- name: Publish to npm
if: steps.check.outputs.exists == 'false'
run: npm publish --access public --provenance
- name: Skip publish (version exists)
if: steps.check.outputs.exists == 'true'
run: echo "Version ${{ steps.version.outputs.version }} already exists on npm, skipping publish"

View file

@ -1,102 +0,0 @@
name: Integration Tests
on:
pull_request:
paths:
- 'src/**.py'
- 'tests/**.py'
- 'pyproject.toml'
- 'uv.lock'
- 'sdks/**'
- '.github/workflows/test-integration.yml'
workflow_dispatch:
inputs:
use_local_images:
description: 'Build images locally instead of pulling from DockerHub'
required: false
type: boolean
default: true
jobs:
tests:
runs-on: [self-hosted, linux, ARM64, langflow-ai-arm64-40gb]
env:
# Prefer repository/environment variable first, then secret, then a sane fallback
OPENSEARCH_PASSWORD: ${{ vars.OPENSEARCH_PASSWORD || secrets.OPENSEARCH_PASSWORD || 'OpenRag#2025!' }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
LANGFLOW_AUTO_LOGIN: "True"
LANGFLOW_NEW_USER_IS_ACTIVE: "True"
LANGFLOW_ENABLE_SUPERUSER_CLI: "True"
LANGFLOW_CHAT_FLOW_ID: ${{ vars.LANGFLOW_CHAT_FLOW_ID || '1098eea1-6649-4e1d-aed1-b77249fb8dd0' }}
LANGFLOW_INGEST_FLOW_ID: ${{ vars.LANGFLOW_INGEST_FLOW_ID || '5488df7c-b93f-4f87-a446-b67028bc0813' }}
NUDGES_FLOW_ID: ${{ vars.NUDGES_FLOW_ID || 'ebc01d31-1976-46ce-a385-b0240327226c' }}
steps:
- run: df -h
- name: Cleanup Docker cache
run: |
docker system prune -af || true
docker builder prune -af || true
docker-compose -f docker-compose.yml down -v --remove-orphans || true
- name: Cleanup root-owned files (OpenSearch data, config)
run: |
for i in 1 2 3; do
docker run --rm -v $(pwd):/work alpine sh -c "rm -rf /work/opensearch-data /work/config" && break
echo "Attempt $i failed, retrying in 5s..."
sleep 5
done || true
- run: df -h
- name: Checkout
uses: actions/checkout@v4
- name: Verify workspace
run: |
echo "Current directory: $(pwd)"
echo "Workspace: ${GITHUB_WORKSPACE}"
ls -la
- name: Set up UV
uses: astral-sh/setup-uv@v3
with:
version: latest
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Python version
run: uv python install 3.13
- name: Install dependencies
run: uv sync
- name: Run integration tests
env:
OPENSEARCH_HOST: localhost
OPENSEARCH_PORT: 9200
OPENSEARCH_USERNAME: admin
OPENSEARCH_PASSWORD: ${{ env.OPENSEARCH_PASSWORD }}
LOG_LEVEL: DEBUG
# Force no-auth mode so tests bypass OAuth
GOOGLE_OAUTH_CLIENT_ID: ""
GOOGLE_OAUTH_CLIENT_SECRET: ""
# Disable startup ingest noise unless a test enables it
DISABLE_STARTUP_INGEST: "true"
run: |
# For PRs, always build locally since we're testing new code
# For workflow_dispatch, use the input (defaults to true)
USE_LOCAL="${{ inputs.use_local_images }}"
if [ "${{ github.event_name }}" == "pull_request" ] || [ "$USE_LOCAL" != "false" ]; then
echo "Running tests with locally built images..."
make test-ci-local
else
echo "Running tests with DockerHub images..."
make test-ci
fi
echo "Keys directory after tests:"
ls -la keys/ || echo "No keys directory"

View file

@ -1,52 +0,0 @@
name: Update uv.lock on version bump
on:
push:
branches:
- main
paths:
- 'pyproject.toml'
workflow_dispatch:
jobs:
update-lock:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.13'
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Update uv.lock
run: uv sync
- name: Check for changes
id: changes
run: |
if git diff --quiet uv.lock; then
echo "changed=false" >> $GITHUB_OUTPUT
echo "No changes to uv.lock"
else
echo "changed=true" >> $GITHUB_OUTPUT
echo "uv.lock has been updated"
fi
- name: Commit and push uv.lock
if: steps.changes.outputs.changed == 'true'
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add uv.lock
git commit -m "chore: update uv.lock after version bump [skip ci]"
git push

17
.gitignore vendored
View file

@ -17,20 +17,3 @@ wheels/
1001*.pdf
*.json
!**/package.json
!**/package-lock.json
!**/tsconfig.json
!flows/*.json
!src/tui/_assets/flows/*.json
!src/tui/_assets/flows/components/*.json
!frontend/*.json
.DS_Store
config/
.docling.pid
# OpenSearch data directory
opensearch-data/
node_modules

View file

@ -1,7 +0,0 @@
repos:
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
args: ["--baseline", ".secrets.baseline", "--exclude-lines", "code_hash"]

View file

@ -1,180 +0,0 @@
{
"version": "1.5.0",
"plugins_used": [
{
"name": "ArtifactoryDetector"
},
{
"name": "AWSKeyDetector"
},
{
"name": "AzureStorageKeyDetector"
},
{
"name": "Base64HighEntropyString",
"limit": 4.5
},
{
"name": "BasicAuthDetector"
},
{
"name": "CloudantDetector"
},
{
"name": "DiscordBotTokenDetector"
},
{
"name": "GitHubTokenDetector"
},
{
"name": "GitLabTokenDetector"
},
{
"name": "HexHighEntropyString",
"limit": 3.0
},
{
"name": "IbmCloudIamDetector"
},
{
"name": "IbmCosHmacDetector"
},
{
"name": "IPPublicDetector"
},
{
"name": "JwtTokenDetector"
},
{
"name": "KeywordDetector",
"keyword_exclude": ""
},
{
"name": "MailchimpDetector"
},
{
"name": "NpmDetector"
},
{
"name": "OpenAIDetector"
},
{
"name": "PrivateKeyDetector"
},
{
"name": "PypiTokenDetector"
},
{
"name": "SendGridDetector"
},
{
"name": "SlackDetector"
},
{
"name": "SoftlayerDetector"
},
{
"name": "SquareOAuthDetector"
},
{
"name": "StripeDetector"
},
{
"name": "TelegramBotTokenDetector"
},
{
"name": "TwilioKeyDetector"
}
],
"filters_used": [
{
"path": "detect_secrets.filters.allowlist.is_line_allowlisted"
},
{
"path": "detect_secrets.filters.common.is_baseline_file",
"filename": ".secrets.baseline"
},
{
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
"min_level": 2
},
{
"path": "detect_secrets.filters.heuristic.is_indirect_reference"
},
{
"path": "detect_secrets.filters.heuristic.is_likely_id_string"
},
{
"path": "detect_secrets.filters.heuristic.is_lock_file"
},
{
"path": "detect_secrets.filters.heuristic.is_not_alphanumeric_string"
},
{
"path": "detect_secrets.filters.heuristic.is_potential_uuid"
},
{
"path": "detect_secrets.filters.heuristic.is_prefixed_with_dollar_sign"
},
{
"path": "detect_secrets.filters.heuristic.is_sequential_string"
},
{
"path": "detect_secrets.filters.heuristic.is_swagger_file"
},
{
"path": "detect_secrets.filters.heuristic.is_templated_secret"
},
{
"path": "detect_secrets.filters.regex.should_exclude_file",
"pattern": [
"flows/.*\\.json$"
]
},
{
"path": "detect_secrets.filters.regex.should_exclude_line",
"pattern": [
"code_hash"
]
}
],
"results": {
"docs/docs/_partial-integrate-chat.mdx": [
{
"type": "Secret Keyword",
"filename": "docs/docs/_partial-integrate-chat.mdx",
"hashed_secret": "e42fd8b9ad15d8fa5f4718cad7cf19b522807996",
"is_verified": false,
"line_number": 30
}
],
"src/main.py": [
{
"type": "Base64 High Entropy String",
"filename": "src/main.py",
"hashed_secret": "131a83e9ef8660d7dd0771da7ce5954d9ea801ee",
"is_verified": false,
"line_number": 404
}
],
"src/models/processors.py": [
{
"type": "Base64 High Entropy String",
"filename": "src/models/processors.py",
"hashed_secret": "131a83e9ef8660d7dd0771da7ce5954d9ea801ee",
"is_verified": false,
"line_number": 763
}
],
"src/services/langflow_file_service.py": [
{
"type": "Base64 High Entropy String",
"filename": "src/services/langflow_file_service.py",
"hashed_secret": "131a83e9ef8660d7dd0771da7ce5954d9ea801ee",
"is_verified": false,
"line_number": 97
}
]
},
"generated_at": "2025-12-09T20:33:13Z"
}

View file

@ -1,317 +0,0 @@
# Contributing to OpenRAG
Thank you for your interest in contributing to OpenRAG! This guide will help you set up your development environment and understand the development workflow.
## 🛠️ Development Setup
### Prerequisites
- Docker or Podman with Compose installed
- Make (for development commands)
- Python 3.13+ with uv package manager
- Node.js 18+ and npm
### Set up OpenRAG for development
1. Set up your development environment.
```bash
# Clone and setup environment
git clone https://github.com/langflow-ai/openrag.git
cd openrag
make setup # Creates .env and installs dependencies
```
2. Configure the `.env` file with your API keys and credentials.
```bash
# Required
OPENAI_API_KEY=your_openai_api_key
OPENSEARCH_PASSWORD=your_secure_password
LANGFLOW_SUPERUSER=admin
LANGFLOW_SUPERUSER_PASSWORD=your_secure_password
LANGFLOW_CHAT_FLOW_ID=your_chat_flow_id
LANGFLOW_INGEST_FLOW_ID=your_ingest_flow_id
NUDGES_FLOW_ID=your_nudges_flow_id
```
For extended configuration, including ingestion and optional variables, see [docs/reference/configuration.mdx](docs/docs/reference/configuration.mdx).
3. Start OpenRAG.
```bash
# Full stack with GPU support
make dev
# Or CPU only
make dev-cpu
```
Access the services:
- **Frontend**: http://localhost:3000
- **Backend API**: http://localhost:8000
- **Langflow**: http://localhost:7860
- **OpenSearch**: http://localhost:9200
- **OpenSearch Dashboards**: http://localhost:5601
## 🔧 Development Commands
All development tasks are managed through the Makefile. Run `make help` to see all available commands.
### Environment Management
```bash
# Setup development environment
make setup # Initial setup: creates .env, installs dependencies
# Start development environments
make dev # Full stack with GPU support
make dev-cpu # Full stack with CPU only
make infra # Infrastructure only (for local development)
# Container management
make stop # Stop all containers
make restart # Restart all containers
make clean # Stop and remove containers/volumes
make status # Show container status
make health # Check service health
```
### Local Development Workflow
For faster development iteration, run infrastructure in Docker and backend/frontend locally:
```bash
# Terminal 1: Start infrastructure
make infra
# Terminal 2: Run backend locally
make backend
# Terminal 3: Run frontend locally
make frontend
```
This setup provides:
- Faster code reloading
- Direct access to logs and debugging
- Easier testing and iteration
### Dependency Management
```bash
make install # Install all dependencies
make install-be # Install backend dependencies (uv)
make install-fe # Install frontend dependencies (npm)
```
### Building and Testing
```bash
# Build Docker images
make build # Build all images
make build-be # Build backend image only
make build-fe # Build frontend image only
# Testing and quality
make test # Run backend tests
make lint # Run linting checks
```
### Debugging
```bash
# View logs
make logs # All container logs
make logs-be # Backend logs only
make logs-fe # Frontend logs only
make logs-lf # Langflow logs only
make logs-os # OpenSearch logs only
# Shell access
make shell-be # Shell into backend container
make shell-lf # Shell into langflow container
make shell-os # Shell into opensearch container
```
### Database Operations
```bash
# Reset OpenSearch indices
make db-reset # Delete and recreate indices
```
### Flow Management
```bash
# Upload flow to Langflow
make flow-upload FLOW_FILE=path/to/flow.json
```
## 🏗️ Architecture Overview
### Backend (Python/Starlette)
- **API Layer**: RESTful endpoints in `src/api/`
- **Services**: Business logic in `src/services/`
- **Models**: Data models and processors in `src/models/`
- **Connectors**: External service integrations in `src/connectors/`
- **Configuration**: Settings management in `src/config/`
### Frontend (Next.js/React)
- **Pages**: Next.js app router in `frontend/src/app/`
- **Components**: Reusable UI components in `frontend/src/components/`
- **Contexts**: State management in `frontend/src/contexts/`
- **Hooks**: Custom React hooks in `frontend/hooks/`
### Infrastructure
- **OpenSearch**: Vector database and search engine
- **Langflow**: Visual flow builder for LLM workflows
- **Docker**: Containerization and orchestration
## 🧪 Testing
### Backend Tests
```bash
make test # Run all backend tests
uv run pytest # Direct pytest execution
uv run pytest -v # Verbose test output
```
### Frontend Tests
```bash
cd frontend && npm test # Run frontend tests
cd frontend && npm run lint # Frontend linting
```
## 📝 Code Style
### Backend
- Follow PEP 8 style guidelines
- Use type hints where appropriate
- Document functions and classes with docstrings
- Use structured logging with `structlog`
### Frontend
- Follow React/Next.js best practices
- Use TypeScript for type safety
- Follow the established component structure
- Use Tailwind CSS for styling
## 🔍 Debugging Tips
### Backend Debugging
```bash
# Enable debug logging
export LOG_LEVEL=DEBUG
# Run backend locally for debugging
make infra && make backend
# Check OpenSearch indices
curl -X GET "http://localhost:9200/_cat/indices?v" \
-u admin:$(grep OPENSEARCH_PASSWORD .env | cut -d= -f2)
```
### Frontend Debugging
```bash
# Run with detailed logs
cd frontend && npm run dev
# Build and analyze bundle
cd frontend && npm run build
```
### Container Debugging
```bash
# Check container status
make status
# View real-time logs
make logs
# Shell into containers
make shell-be # Backend container
make shell-lf # Langflow container
```
## 🚀 Deployment Testing
### Local Testing
```bash
# Test full stack deployment
make clean && make dev
# Test CPU-only deployment
make clean && make dev-cpu
```
### Performance Testing
```bash
# Monitor resource usage
docker stats
# Check service health
make health
```
## 📚 Development Resources
### Key Files
- `src/main.py` - Backend application entry point
- `src/config/settings.py` - Configuration management
- `frontend/src/app/layout.tsx` - Frontend root layout
- `docker-compose.yml` - Container orchestration
- `Makefile` - Development commands
### Documentation
- API documentation: Available at `http://localhost:8000/docs` when backend is running
- Component Storybook: (if implemented) at `http://localhost:6006`
- OpenSearch: `http://localhost:5601` (Dashboards)
- Langflow: `http://localhost:7860`
## 🐛 Common Issues
### Port Conflicts
Ensure these ports are available:
- 3000 (Frontend)
- 7860 (Langflow)
- 8000 (Backend)
- 9200 (OpenSearch)
- 5601 (OpenSearch Dashboards)
### Memory Issues
- Use `make dev-cpu` for CPU-only mode
- Increase Docker memory allocation
- Podman on macOS: increase the VM memory if needed
```bash
podman machine stop
podman machine rm
podman machine init --memory 8192 # 8 GB example
podman machine start
```
### Environment Issues
```bash
# Reset environment
make clean
cp .env.example .env # Reconfigure as needed
make setup
```
## 📋 Pull Request Guidelines
1. **Fork and Branch**: Create a feature branch from `main`
2. **Test**: Ensure all tests pass with `make test` and `make lint`
3. **Documentation**: Update relevant documentation
4. **Commit Messages**: Use clear, descriptive commit messages
5. **PR Description**: Explain changes and include testing instructions
## 🤝 Getting Help
- Check existing issues and discussions
- Use `make status` and `make health` for debugging
- Review logs with `make logs`
- Join our community discussions
Thank you for contributing to OpenRAG! 🚀

View file

@ -1,79 +1,18 @@
########################################
# Stage 1: Upstream OpenSearch with plugins
########################################
FROM opensearchproject/opensearch:3.2.0 AS upstream_opensearch
# Remove plugins
RUN opensearch-plugin remove opensearch-neural-search || true && \
opensearch-plugin remove opensearch-knn || true && \
# removing this one due to Netty CVE-2025-58056, can bring it back in the future
opensearch-plugin remove opensearch-security-analytics || true
# Prepare jvector plugin artifacts
RUN mkdir -p /tmp/opensearch-jvector-plugin && \
curl -L -s https://github.com/opensearch-project/opensearch-jvector/releases/download/3.2.0.0/artifacts.tar.gz \
| tar zxvf - -C /tmp/opensearch-jvector-plugin
# Prepare neural-search plugin
RUN mkdir -p /tmp/opensearch-neural-search && \
curl -L -s https://storage.googleapis.com/opensearch-jvector/opensearch-neural-search-3.2.0.0-20251029200300.zip \
> /tmp/opensearch-neural-search/plugin.zip
# Install additional plugins
RUN opensearch-plugin install --batch file:///tmp/opensearch-jvector-plugin/repository/org/opensearch/plugin/opensearch-jvector-plugin/3.2.0.0/opensearch-jvector-plugin-3.2.0.0.zip && \
opensearch-plugin install --batch file:///tmp/opensearch-neural-search/plugin.zip && \
opensearch-plugin install --batch repository-gcs && \
opensearch-plugin install --batch repository-azure && \
# opensearch-plugin install --batch repository-s3 && \
opensearch-plugin install --batch https://github.com/opensearch-project/opensearch-prometheus-exporter/releases/download/3.2.0.0/prometheus-exporter-3.2.0.0.zip
# Apply Netty patch
COPY patch-netty.sh /tmp/
RUN whoami && bash /tmp/patch-netty.sh
# Set permissions for OpenShift compatibility before copying
RUN chmod -R g=u /usr/share/opensearch
########################################
# Stage 2: UBI9 runtime image
########################################
FROM registry.access.redhat.com/ubi9/ubi:latest
FROM opensearchproject/opensearch:3.0.0
USER root
# Update packages and install required tools
# TODO bring back iostat somehow? sysstat isn't in ubi
# TODO bring back 'perf' package, but what did we need it for?
RUN dnf update -y && \
dnf install -y --allowerasing \
less procps-ng findutils sudo curl tar gzip shadow-utils which && \
dnf clean all
RUN echo y | dnf install less procps-ng findutils sysstat perf sudo
# Create opensearch user and group
ARG UID=1000
ARG GID=1000
ARG OPENSEARCH_HOME=/usr/share/opensearch
# Grant the opensearchuser sudo privileges
# 'wheel' is the sudo group in Amazon Linux
RUN usermod -aG wheel opensearch
WORKDIR $OPENSEARCH_HOME
# Change the sudoers file to allow passwordless sudo
RUN echo "opensearch ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
RUN groupadd -g $GID opensearch && \
adduser -u $UID -g $GID -d $OPENSEARCH_HOME opensearch
# Grant the opensearch user sudo privileges (passwordless sudo)
RUN usermod -aG wheel opensearch && \
echo "opensearch ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
# Copy OpenSearch from the upstream stage
COPY --from=upstream_opensearch --chown=$UID:0 $OPENSEARCH_HOME $OPENSEARCH_HOME
ARG OPENSEARCH_VERSION=3.2.0
########################################
# Async-profiler (multi-arch like your original)
########################################
# Handle different architectures for async-profiler
ARG TARGETARCH
RUN if [ "$TARGETARCH" = "amd64" ]; then \
export ASYNC_PROFILER_URL=https://github.com/async-profiler/async-profiler/releases/download/v4.0/async-profiler-4.0-linux-x64.tar.gz; \
elif [ "$TARGETARCH" = "arm64" ]; then \
@ -85,30 +24,39 @@ RUN if [ "$TARGETARCH" = "amd64" ]; then \
curl -s -L $ASYNC_PROFILER_URL | tar zxvf - --strip-components=1 -C /opt/async-profiler && \
chown -R opensearch:opensearch /opt/async-profiler
# Create profiling script (as in your original Dockerfile)
RUN echo "#!/bin/bash" > /usr/share/opensearch/profile.sh && \
echo "export PATH=\$PATH:/opt/async-profiler/bin" >> /usr/share/opensearch/profile.sh && \
echo "echo 1 | sudo tee /proc/sys/kernel/perf_event_paranoid >/dev/null" >> /usr/share/opensearch/profile.sh && \
echo "echo 0 | sudo tee /proc/sys/kernel/kptr_restrict >/dev/null" >> /usr/share/opensearch/profile.sh && \
echo "asprof \$@" >> /usr/share/opensearch/profile.sh && \
chmod 777 /usr/share/opensearch/profile.sh
########################################
# Security config (OIDC/DLS) and setup script
########################################
RUN echo "#!/bin/bash" > /usr/share/opensearch/profile.sh
RUN echo "export PATH=\$PATH:/opt/async-profiler/bin" >> /usr/share/opensearch/profile.sh
RUN echo "echo 1 | sudo tee /proc/sys/kernel/perf_event_paranoid >/dev/null" >> /usr/share/opensearch/profile.sh
RUN echo "echo 0 | sudo tee /proc/sys/kernel/kptr_restrict >/dev/null" >> /usr/share/opensearch/profile.sh
RUN echo "asprof \$@" >> /usr/share/opensearch/profile.sh
# Copy OIDC and DLS security configuration (as root, like before)
RUN chmod 777 /usr/share/opensearch/profile.sh
# Copy OIDC and DLS security configuration (as root)
COPY securityconfig/ /usr/share/opensearch/securityconfig/
RUN chown -R opensearch:opensearch /usr/share/opensearch/securityconfig/
USER opensearch
RUN opensearch-plugin remove opensearch-neural-search
RUN opensearch-plugin remove opensearch-knn
# FIXME installing the prom exporter plugin ahead of time isn't compatible with the operator, for now
# RUN opensearch-plugin install https://github.com/Virtimo/prometheus-exporter-plugin-for-opensearch/releases/download/v2.18.0/prometheus-exporter-2.18.0.0.zip
RUN echo y | opensearch-plugin install https://repo1.maven.org/maven2/org/opensearch/plugin/opensearch-jvector-plugin/3.0.0.3/opensearch-jvector-plugin-3.0.0.3.zip
RUN echo y | opensearch-plugin install repository-gcs
RUN echo y | opensearch-plugin install repository-azure
RUN echo y | opensearch-plugin install repository-s3
# Create a script to apply security configuration after OpenSearch starts
RUN echo '#!/bin/bash' > /usr/share/opensearch/setup-security.sh && \
echo 'echo "Waiting for OpenSearch to start..."' >> /usr/share/opensearch/setup-security.sh && \
echo 'PASSWORD=${OPENSEARCH_INITIAL_ADMIN_PASSWORD:-${OPENSEARCH_PASSWORD}}' >> /usr/share/opensearch/setup-security.sh && \
echo 'if [ -z "$PASSWORD" ]; then echo "[ERROR] OPENSEARCH_INITIAL_ADMIN_PASSWORD or OPENSEARCH_PASSWORD must be set"; exit 1; fi' >> /usr/share/opensearch/setup-security.sh && \
echo 'until curl -s -k -u admin:$PASSWORD https://localhost:9200; do sleep 1; done' >> /usr/share/opensearch/setup-security.sh && \
echo 'echo "Generating admin hash from configured password..."' >> /usr/share/opensearch/setup-security.sh && \
echo 'HASH=$(/usr/share/opensearch/plugins/opensearch-security/tools/hash.sh -p "$PASSWORD")' >> /usr/share/opensearch/setup-security.sh && \
echo 'until curl -s -k -u admin:${OPENSEARCH_INITIAL_ADMIN_PASSWORD} https://localhost:9200; do sleep 1; done' >> /usr/share/opensearch/setup-security.sh && \
echo 'echo "Generating admin hash from OPENSEARCH_INITIAL_ADMIN_PASSWORD..."' >> /usr/share/opensearch/setup-security.sh && \
echo 'if [ -z "${OPENSEARCH_INITIAL_ADMIN_PASSWORD}" ]; then echo "[ERROR] OPENSEARCH_INITIAL_ADMIN_PASSWORD not set"; exit 1; fi' >> /usr/share/opensearch/setup-security.sh && \
echo 'HASH=$(/usr/share/opensearch/plugins/opensearch-security/tools/hash.sh -p "${OPENSEARCH_INITIAL_ADMIN_PASSWORD}")' >> /usr/share/opensearch/setup-security.sh && \
echo 'if [ -z "$HASH" ]; then echo "[ERROR] Failed to generate admin hash"; exit 1; fi' >> /usr/share/opensearch/setup-security.sh && \
echo 'sed -i "s|^ hash: \".*\"| hash: \"$HASH\"|" /usr/share/opensearch/securityconfig/internal_users.yml' >> /usr/share/opensearch/setup-security.sh && \
echo 'echo "Updated internal_users.yml with runtime-generated admin hash"' >> /usr/share/opensearch/setup-security.sh && \
@ -121,18 +69,3 @@ RUN echo '#!/bin/bash' > /usr/share/opensearch/setup-security.sh && \
echo ' -key /usr/share/opensearch/config/kirk-key.pem' >> /usr/share/opensearch/setup-security.sh && \
echo 'echo "Security configuration applied successfully"' >> /usr/share/opensearch/setup-security.sh && \
chmod +x /usr/share/opensearch/setup-security.sh
########################################
# Final runtime settings
########################################
USER opensearch
WORKDIR $OPENSEARCH_HOME
ENV JAVA_HOME=$OPENSEARCH_HOME/jdk
ENV PATH=$PATH:$JAVA_HOME/bin:$OPENSEARCH_HOME/bin
# Expose ports
EXPOSE 9200 9300 9600 9650
ENTRYPOINT ["./opensearch-docker-entrypoint.sh"]
CMD ["opensearch"]

View file

@ -21,7 +21,7 @@ COPY pyproject.toml uv.lock ./
RUN uv sync
# Copy sample document and warmup script for docling
COPY openrag-documents/warmup_ocr.pdf ./
COPY documents/warmup_ocr.pdf ./
COPY warm_up_docling.py ./
RUN uv run docling-tools models download
RUN uv run python - <<'PY'
@ -35,14 +35,13 @@ easyocr.Reader(['fr','de','es','en'],
print("EasyOCR cache ready at", cache)
PY
# RUN uv run python warm_up_docling.py && rm warm_up_docling.py warmup_ocr.pdf
RUN uv run python warm_up_docling.py && rm warm_up_docling.py warmup_ocr.pdf
#ENV EASYOCR_MODULE_PATH=~/.cache/docling/models/EasyOcr/
# Copy Python source and flows
# Copy Python source
COPY src/ ./src/
COPY flows/ ./flows/
# Expose backend port
EXPOSE 8000

View file

@ -1,4 +1,4 @@
FROM node:20.20.0-slim
FROM node:18-slim
# Set working directory
WORKDIR /app
@ -11,7 +11,7 @@ RUN npm install
COPY frontend/ ./
# Build frontend
RUN npm run build
RUN npm run build
# Expose frontend port
EXPOSE 3000

View file

@ -1,5 +0,0 @@
FROM langflowai/langflow-nightly:1.7.0.dev21
EXPOSE 7860
CMD ["langflow", "run", "--host", "0.0.0.0", "--port", "7860"]

201
LICENSE
View file

@ -1,201 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2025 IBM
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View file

@ -1 +0,0 @@
recursive-include src/tui/_assets *

319
Makefile
View file

@ -1,19 +1,7 @@
# OpenRAG Development Makefile
# Provides easy commands for development workflow
# Load variables from .env if present so `make` commands pick them up
# Strip quotes from values to avoid issues with tools that don't handle them like python-dotenv does
ifneq (,$(wildcard .env))
include .env
export $(shell sed -n 's/^\([A-Za-z_][A-Za-z0-9_]*\)=.*/\1/p' .env)
# Strip single quotes from all exported variables
$(foreach var,$(shell sed -n 's/^\([A-Za-z_][A-Za-z0-9_]*\)=.*/\1/p' .env),$(eval $(var):=$(shell echo $($(var)) | sed "s/^'//;s/'$$//")))
endif
.PHONY: help dev dev-cpu dev-local infra stop clean build logs shell-backend shell-frontend install \
test test-integration test-ci test-ci-local test-sdk \
backend frontend install-be install-fe build-be build-fe logs-be logs-fe logs-lf logs-os \
shell-be shell-lf shell-os restart status health db-reset flow-upload quick setup
.PHONY: help dev dev-cpu dev-local infra stop clean build logs shell-backend shell-frontend install test backend frontend install-be install-fe build-be build-fe logs-be logs-fe logs-lf logs-os shell-be shell-lf shell-os restart status health db-reset flow-upload quick setup
# Default target
help:
@ -44,31 +32,24 @@ help:
@echo " shell-lf - Shell into langflow container"
@echo ""
@echo "Testing:"
@echo " test - Run all backend tests"
@echo " test-integration - Run integration tests (requires infra)"
@echo " test-ci - Start infra, run integration + SDK tests, tear down (uses DockerHub images)"
@echo " test-ci-local - Same as test-ci but builds all images locally"
@echo " test-sdk - Run SDK integration tests (requires running OpenRAG at localhost:3000)"
@echo " test - Run backend tests"
@echo " lint - Run linting checks"
@echo ""
# Development environments
# Use centralized env file from TUI if it exists, otherwise fall back to local .env
OPENRAG_ENV_FILE := $(shell if [ -f ~/.openrag/tui/.env ]; then echo "--env-file ~/.openrag/tui/.env"; fi)
dev:
@echo "🚀 Starting OpenRAG with GPU support..."
docker compose $(OPENRAG_ENV_FILE) -f docker-compose.yml -f docker-compose.gpu.yml up -d
docker-compose up -d
@echo "✅ Services started!"
@echo " Backend: http://localhost:8000"
@echo " Frontend: http://localhost:3000"
@echo " Frontend: http://localhost:3000"
@echo " Langflow: http://localhost:7860"
@echo " OpenSearch: http://localhost:9200"
@echo " Dashboards: http://localhost:5601"
dev-cpu:
@echo "🚀 Starting OpenRAG with CPU only..."
docker compose $(OPENRAG_ENV_FILE) up -d
docker-compose -f docker-compose-cpu.yml up -d
@echo "✅ Services started!"
@echo " Backend: http://localhost:8000"
@echo " Frontend: http://localhost:3000"
@ -78,7 +59,7 @@ dev-cpu:
dev-local:
@echo "🔧 Starting infrastructure only (for local development)..."
docker compose $(OPENRAG_ENV_FILE) up -d opensearch dashboards langflow
docker-compose up -d opensearch dashboards langflow
@echo "✅ Infrastructure started!"
@echo " Langflow: http://localhost:7860"
@echo " OpenSearch: http://localhost:9200"
@ -88,15 +69,7 @@ dev-local:
infra:
@echo "🔧 Starting infrastructure services only..."
docker compose $(OPENRAG_ENV_FILE) up -d opensearch dashboards langflow
@echo "✅ Infrastructure services started!"
@echo " Langflow: http://localhost:7860"
@echo " OpenSearch: http://localhost:9200"
@echo " Dashboards: http://localhost:5601"
infra-cpu:
@echo "🔧 Starting infrastructure services only..."
docker compose $(OPENRAG_ENV_FILE) up -d opensearch dashboards langflow
docker-compose up -d opensearch dashboards langflow
@echo "✅ Infrastructure services started!"
@echo " Langflow: http://localhost:7860"
@echo " OpenSearch: http://localhost:9200"
@ -105,20 +78,22 @@ infra-cpu:
# Container management
stop:
@echo "🛑 Stopping all containers..."
docker compose $(OPENRAG_ENV_FILE) down
docker-compose down
docker-compose -f docker-compose-cpu.yml down 2>/dev/null || true
restart: stop dev
clean: stop
@echo "🧹 Cleaning up containers and volumes..."
docker compose $(OPENRAG_ENV_FILE) down -v --remove-orphans
docker-compose down -v --remove-orphans
docker-compose -f docker-compose-cpu.yml down -v --remove-orphans 2>/dev/null || true
docker system prune -f
# Local development
backend:
@echo "🐍 Starting backend locally..."
@if [ ! -f .env ]; then echo "⚠️ .env file not found. Copy .env.example to .env first"; exit 1; fi
uv run python src/main.py
cd src && uv run python main.py
frontend:
@echo "⚛️ Starting frontend locally..."
@ -131,7 +106,7 @@ install: install-be install-fe
install-be:
@echo "📦 Installing backend dependencies..."
uv sync --extra torch-cu128
uv sync
install-fe:
@echo "📦 Installing frontend dependencies..."
@ -139,275 +114,55 @@ install-fe:
# Building
build:
@echo "Building all Docker images locally..."
docker build -t langflowai/openrag-opensearch:latest -f Dockerfile .
docker build -t langflowai/openrag-backend:latest -f Dockerfile.backend .
docker build -t langflowai/openrag-frontend:latest -f Dockerfile.frontend .
docker build -t langflowai/openrag-langflow:latest -f Dockerfile.langflow .
@echo "🔨 Building Docker images..."
docker-compose build
build-be:
@echo "Building backend image..."
docker build -t langflowai/openrag-backend:latest -f Dockerfile.backend .
@echo "🔨 Building backend image..."
docker build -t openrag-backend -f Dockerfile.backend .
build-fe:
@echo "Building frontend image..."
docker build -t langflowai/openrag-frontend:latest -f Dockerfile.frontend .
@echo "🔨 Building frontend image..."
docker build -t openrag-frontend -f Dockerfile.frontend .
# Logging and debugging
logs:
@echo "📋 Showing all container logs..."
docker compose $(OPENRAG_ENV_FILE) logs -f
docker-compose logs -f
logs-be:
@echo "📋 Showing backend logs..."
docker compose $(OPENRAG_ENV_FILE) logs -f openrag-backend
docker-compose logs -f openrag-backend
logs-fe:
@echo "📋 Showing frontend logs..."
docker compose $(OPENRAG_ENV_FILE) logs -f openrag-frontend
docker-compose logs -f openrag-frontend
logs-lf:
@echo "📋 Showing langflow logs..."
docker compose $(OPENRAG_ENV_FILE) logs -f langflow
docker-compose logs -f langflow
logs-os:
@echo "📋 Showing opensearch logs..."
docker compose $(OPENRAG_ENV_FILE) logs -f opensearch
docker-compose logs -f opensearch
# Shell access
shell-be:
@echo "🐚 Opening shell in backend container..."
docker compose $(OPENRAG_ENV_FILE) exec openrag-backend /bin/bash
docker-compose exec openrag-backend /bin/bash
shell-lf:
@echo "🐚 Opening shell in langflow container..."
docker compose $(OPENRAG_ENV_FILE) exec langflow /bin/bash
docker-compose exec langflow /bin/bash
shell-os:
@echo "🐚 Opening shell in opensearch container..."
docker compose $(OPENRAG_ENV_FILE) exec opensearch /bin/bash
docker-compose exec opensearch /bin/bash
# Testing and quality
test:
@echo "🧪 Running all backend tests..."
uv run pytest tests/ -v
test-integration:
@echo "🧪 Running integration tests (requires infrastructure)..."
@echo "💡 Make sure to run 'make infra' first!"
uv run pytest tests/integration/ -v
# CI-friendly integration test target: brings up infra, waits, runs tests, tears down
test-ci:
@set -e; \
echo "Installing test dependencies..."; \
uv sync --group dev; \
if [ ! -f keys/private_key.pem ]; then \
echo "Generating RSA keys for JWT signing..."; \
uv run python -c "from src.main import generate_jwt_keys; generate_jwt_keys()"; \
else \
echo "RSA keys already exist, ensuring correct permissions..."; \
chmod 600 keys/private_key.pem 2>/dev/null || true; \
chmod 644 keys/public_key.pem 2>/dev/null || true; \
fi; \
echo "Cleaning up old containers and volumes..."; \
docker compose down -v 2>/dev/null || true; \
echo "Pulling latest images..."; \
docker compose pull; \
echo "Building OpenSearch image override..."; \
docker build --no-cache -t langflowai/openrag-opensearch:latest -f Dockerfile .; \
echo "Starting infra (OpenSearch + Dashboards + Langflow + Backend + Frontend) with CPU containers"; \
docker compose up -d opensearch dashboards langflow openrag-backend openrag-frontend; \
echo "Starting docling-serve..."; \
DOCLING_ENDPOINT=$$(uv run python scripts/docling_ctl.py start --port 5001 | grep "Endpoint:" | awk '{print $$2}'); \
echo "Docling-serve started at $$DOCLING_ENDPOINT"; \
echo "Waiting for backend OIDC endpoint..."; \
for i in $$(seq 1 60); do \
docker exec openrag-backend curl -s http://localhost:8000/.well-known/openid-configuration >/dev/null 2>&1 && break || sleep 2; \
done; \
echo "Waiting for OpenSearch security config to be fully applied..."; \
for i in $$(seq 1 60); do \
if docker logs os 2>&1 | grep -q "Security configuration applied successfully"; then \
echo "✓ Security configuration applied"; \
break; \
fi; \
sleep 2; \
done; \
echo "Verifying OIDC authenticator is active in OpenSearch..."; \
AUTHC_CONFIG=$$(curl -k -s -u admin:$${OPENSEARCH_PASSWORD} https://localhost:9200/_opendistro/_security/api/securityconfig 2>/dev/null); \
if echo "$$AUTHC_CONFIG" | grep -q "openid_auth_domain"; then \
echo "✓ OIDC authenticator configured"; \
echo "$$AUTHC_CONFIG" | grep -A 5 "openid_auth_domain"; \
else \
echo "✗ OIDC authenticator NOT found in security config!"; \
echo "Security config:"; \
echo "$$AUTHC_CONFIG" | head -50; \
exit 1; \
fi; \
echo "Waiting for Langflow..."; \
for i in $$(seq 1 60); do \
curl -s http://localhost:7860/ >/dev/null 2>&1 && break || sleep 2; \
done; \
echo "Waiting for docling-serve at $$DOCLING_ENDPOINT..."; \
for i in $$(seq 1 60); do \
curl -s $${DOCLING_ENDPOINT}/health >/dev/null 2>&1 && break || sleep 2; \
done; \
echo "Running integration tests"; \
LOG_LEVEL=$${LOG_LEVEL:-DEBUG} \
GOOGLE_OAUTH_CLIENT_ID="" \
GOOGLE_OAUTH_CLIENT_SECRET="" \
OPENSEARCH_HOST=localhost OPENSEARCH_PORT=9200 \
OPENSEARCH_USERNAME=admin OPENSEARCH_PASSWORD=$${OPENSEARCH_PASSWORD} \
DISABLE_STARTUP_INGEST=$${DISABLE_STARTUP_INGEST:-true} \
uv run pytest tests/integration -vv -s -o log_cli=true --log-cli-level=DEBUG; \
TEST_RESULT=$$?; \
echo ""; \
echo "Waiting for frontend at http://localhost:3000..."; \
for i in $$(seq 1 60); do \
curl -s http://localhost:3000/ >/dev/null 2>&1 && break || sleep 2; \
done; \
echo "Running Python SDK integration tests"; \
cd sdks/python && \
uv sync --extra dev && \
OPENRAG_URL=http://localhost:3000 uv run pytest tests/test_integration.py -vv -s || TEST_RESULT=1; \
cd ../..; \
echo "Running TypeScript SDK integration tests"; \
cd sdks/typescript && \
npm install && npm run build && \
OPENRAG_URL=http://localhost:3000 npm test || TEST_RESULT=1; \
cd ../..; \
echo ""; \
echo "=== Post-test JWT diagnostics ==="; \
echo "Generating test JWT token..."; \
TEST_TOKEN=$$(uv run python -c "from src.session_manager import SessionManager, AnonymousUser; sm = SessionManager('test'); print(sm.create_jwt_token(AnonymousUser()))" 2>/dev/null || echo ""); \
if [ -n "$$TEST_TOKEN" ]; then \
echo "Testing JWT against OpenSearch..."; \
HTTP_CODE=$$(curl -k -s -w "%{http_code}" -o /tmp/os_diag.txt -H "Authorization: Bearer $$TEST_TOKEN" -H "Content-Type: application/json" https://localhost:9200/documents/_search -d '{"query":{"match_all":{}}}' 2>&1); \
echo "HTTP $$HTTP_CODE: $$(cat /tmp/os_diag.txt | head -c 150)"; \
fi; \
echo "================================="; \
echo ""; \
echo "Tearing down infra"; \
uv run python scripts/docling_ctl.py stop || true; \
docker compose down -v 2>/dev/null || true; \
exit $$TEST_RESULT
# CI-friendly integration test target with local builds: builds all images, brings up infra, waits, runs tests, tears down
test-ci-local:
@set -e; \
echo "Installing test dependencies..."; \
uv sync --group dev; \
if [ ! -f keys/private_key.pem ]; then \
echo "Generating RSA keys for JWT signing..."; \
uv run python -c "from src.main import generate_jwt_keys; generate_jwt_keys()"; \
else \
echo "RSA keys already exist, ensuring correct permissions..."; \
chmod 600 keys/private_key.pem 2>/dev/null || true; \
chmod 644 keys/public_key.pem 2>/dev/null || true; \
fi; \
echo "Cleaning up old containers and volumes..."; \
docker compose down -v 2>/dev/null || true; \
echo "Building all images locally..."; \
docker build -t langflowai/openrag-opensearch:latest -f Dockerfile .; \
docker build -t langflowai/openrag-backend:latest -f Dockerfile.backend .; \
docker build -t langflowai/openrag-frontend:latest -f Dockerfile.frontend .; \
docker build -t langflowai/openrag-langflow:latest -f Dockerfile.langflow .; \
echo "Starting infra (OpenSearch + Dashboards + Langflow + Backend + Frontend) with CPU containers"; \
docker compose up -d opensearch dashboards langflow openrag-backend openrag-frontend; \
echo "Starting docling-serve..."; \
DOCLING_ENDPOINT=$$(uv run python scripts/docling_ctl.py start --port 5001 | grep "Endpoint:" | awk '{print $$2}'); \
echo "Docling-serve started at $$DOCLING_ENDPOINT"; \
echo "Waiting for backend OIDC endpoint..."; \
for i in $$(seq 1 60); do \
docker exec openrag-backend curl -s http://localhost:8000/.well-known/openid-configuration >/dev/null 2>&1 && break || sleep 2; \
done; \
echo "Waiting for OpenSearch security config to be fully applied..."; \
for i in $$(seq 1 60); do \
if docker logs os 2>&1 | grep -q "Security configuration applied successfully"; then \
echo "✓ Security configuration applied"; \
break; \
fi; \
sleep 2; \
done; \
echo "Verifying OIDC authenticator is active in OpenSearch..."; \
AUTHC_CONFIG=$$(curl -k -s -u admin:$${OPENSEARCH_PASSWORD} https://localhost:9200/_opendistro/_security/api/securityconfig 2>/dev/null); \
if echo "$$AUTHC_CONFIG" | grep -q "openid_auth_domain"; then \
echo "✓ OIDC authenticator configured"; \
echo "$$AUTHC_CONFIG" | grep -A 5 "openid_auth_domain"; \
else \
echo "✗ OIDC authenticator NOT found in security config!"; \
echo "Security config:"; \
echo "$$AUTHC_CONFIG" | head -50; \
exit 1; \
fi; \
echo "Waiting for Langflow..."; \
for i in $$(seq 1 60); do \
curl -s http://localhost:7860/ >/dev/null 2>&1 && break || sleep 2; \
done; \
echo "Waiting for docling-serve at $$DOCLING_ENDPOINT..."; \
for i in $$(seq 1 60); do \
curl -s $${DOCLING_ENDPOINT}/health >/dev/null 2>&1 && break || sleep 2; \
done; \
echo "Running integration tests"; \
LOG_LEVEL=$${LOG_LEVEL:-DEBUG} \
GOOGLE_OAUTH_CLIENT_ID="" \
GOOGLE_OAUTH_CLIENT_SECRET="" \
OPENSEARCH_HOST=localhost OPENSEARCH_PORT=9200 \
OPENSEARCH_USERNAME=admin OPENSEARCH_PASSWORD=$${OPENSEARCH_PASSWORD} \
DISABLE_STARTUP_INGEST=$${DISABLE_STARTUP_INGEST:-true} \
uv run pytest tests/integration -vv -s -o log_cli=true --log-cli-level=DEBUG; \
TEST_RESULT=$$?; \
echo ""; \
echo "Waiting for frontend at http://localhost:3000..."; \
for i in $$(seq 1 60); do \
curl -s http://localhost:3000/ >/dev/null 2>&1 && break || sleep 2; \
done; \
echo "Running Python SDK integration tests"; \
cd sdks/python && \
uv sync --extra dev && \
OPENRAG_URL=http://localhost:3000 uv run pytest tests/test_integration.py -vv -s || TEST_RESULT=1; \
cd ../..; \
echo "Running TypeScript SDK integration tests"; \
cd sdks/typescript && \
npm install && npm run build && \
OPENRAG_URL=http://localhost:3000 npm test || TEST_RESULT=1; \
cd ../..; \
echo ""; \
echo "=== Post-test JWT diagnostics ==="; \
echo "Generating test JWT token..."; \
TEST_TOKEN=$$(uv run python -c "from src.session_manager import SessionManager, AnonymousUser; sm = SessionManager('test'); print(sm.create_jwt_token(AnonymousUser()))" 2>/dev/null || echo ""); \
if [ -n "$$TEST_TOKEN" ]; then \
echo "Testing JWT against OpenSearch..."; \
HTTP_CODE=$$(curl -k -s -w "%{http_code}" -o /tmp/os_diag.txt -H "Authorization: Bearer $$TEST_TOKEN" -H "Content-Type: application/json" https://localhost:9200/documents/_search -d '{"query":{"match_all":{}}}' 2>&1); \
echo "HTTP $$HTTP_CODE: $$(cat /tmp/os_diag.txt | head -c 150)"; \
fi; \
echo "================================="; \
echo ""; \
if [ $$TEST_RESULT -ne 0 ]; then \
echo "=== Tests failed, dumping container logs ==="; \
echo ""; \
echo "=== Langflow logs (last 500 lines) ==="; \
docker logs langflow 2>&1 | tail -500 || echo "Could not get Langflow logs"; \
echo ""; \
echo "=== Backend logs (last 200 lines) ==="; \
docker logs openrag-backend 2>&1 | tail -200 || echo "Could not get backend logs"; \
echo ""; \
fi; \
echo "Tearing down infra"; \
uv run python scripts/docling_ctl.py stop || true; \
docker compose down -v 2>/dev/null || true; \
exit $$TEST_RESULT
# SDK integration tests (requires running OpenRAG instance)
test-sdk:
@echo "Running SDK integration tests..."
@echo "Make sure OpenRAG is running at localhost:3000 (make up)"
@echo ""
@echo "Running Python SDK tests..."
cd sdks/python && uv sync --extra dev && OPENRAG_URL=http://localhost:3000 uv run pytest tests/test_integration.py -vv -s
@echo ""
@echo "Running TypeScript SDK tests..."
cd sdks/typescript && npm install && npm run build && OPENRAG_URL=http://localhost:3000 npm test
@echo "🧪 Running backend tests..."
uv run pytest
lint:
@echo "🔍 Running linting checks..."
@ -417,26 +172,22 @@ lint:
# Service status
status:
@echo "📊 Container status:"
@docker compose $(OPENRAG_ENV_FILE) ps 2>/dev/null || echo "No containers running"
@docker-compose ps 2>/dev/null || echo "No containers running"
health:
@echo "🏥 Health check:"
@echo "Backend: $$(curl -s http://localhost:8000/health 2>/dev/null || echo 'Not responding')"
@echo "Langflow: $$(curl -s http://localhost:7860/health 2>/dev/null || echo 'Not responding')"
@echo "OpenSearch: $$(curl -s -k -u admin:$${OPENSEARCH_PASSWORD} https://localhost:9200 2>/dev/null | jq -r .tagline 2>/dev/null || echo 'Not responding')"
@echo "OpenSearch: $$(curl -s -k -u admin:$(shell grep OPENSEARCH_PASSWORD .env | cut -d= -f2) https://localhost:9200 2>/dev/null | jq -r .tagline 2>/dev/null || echo 'Not responding')"
# Database operations
db-reset:
@echo "🗄️ Resetting OpenSearch indices..."
curl -X DELETE "http://localhost:9200/documents" -u admin:$${OPENSEARCH_PASSWORD} || true
curl -X DELETE "http://localhost:9200/knowledge_filters" -u admin:$${OPENSEARCH_PASSWORD} || true
curl -X DELETE "http://localhost:9200/documents" -u admin:$$(grep OPENSEARCH_PASSWORD .env | cut -d= -f2) || true
curl -X DELETE "http://localhost:9200/knowledge_filters" -u admin:$$(grep OPENSEARCH_PASSWORD .env | cut -d= -f2) || true
@echo "Indices reset. Restart backend to recreate."
clear-os-data:
@echo "🧹 Clearing OpenSearch data directory..."
@uv run python scripts/clear_opensearch_data.py
# Flow management
# Flow management
flow-upload:
@echo "📁 Uploading flow to Langflow..."
@if [ -z "$(FLOW_FILE)" ]; then echo "Usage: make flow-upload FLOW_FILE=path/to/flow.json"; exit 1; fi
@ -456,4 +207,4 @@ setup:
@echo "⚙️ Setting up development environment..."
@if [ ! -f .env ]; then cp .env.example .env && echo "📝 Created .env from template"; fi
@$(MAKE) install
@echo "✅ Setup complete! Run 'make dev' to start."
@echo "✅ Setup complete! Run 'make dev' to start."

View file

@ -1,34 +1,37 @@
<div align="center">
## OpenRAG
# OpenRAG
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/phact/openrag)
<div align="center">
<a href="https://github.com/langflow-ai/langflow"><img src="https://img.shields.io/badge/Langflow-1C1C1E?style=flat&logo=langflow" alt="Langflow"></a>
&nbsp;&nbsp;
<a href="https://github.com/opensearch-project/OpenSearch"><img src="https://img.shields.io/badge/OpenSearch-005EB8?style=flat&logo=opensearch&logoColor=white" alt="OpenSearch"></a>
&nbsp;&nbsp;
<a href="https://github.com/docling-project/docling"><img src="https://img.shields.io/badge/Docling-000000?style=flat" alt="Langflow"></a>
&nbsp;&nbsp;
</div>
### getting started
OpenRAG is a comprehensive Retrieval-Augmented Generation platform that enables intelligent document search and AI-powered conversations. Users can upload, process, and query documents through a chat interface backed by large language models and semantic search capabilities. The system utilizes Langflow for document ingestion, retrieval workflows, and intelligent nudges, providing a seamless RAG experience. Built with [Starlette](https://github.com/Kludex/starlette) and [Next.js](https://github.com/vercel/next.js). Powered by [OpenSearch](https://github.com/opensearch-project/OpenSearch), [Langflow](https://github.com/langflow-ai/langflow), and [Docling](https://github.com/docling-project/docling).
Set up your secrets:
<a href="https://deepwiki.com/langflow-ai/openrag"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"></a>
cp .env.example .env
## Install OpenRAG
Populate the values in .env
To get started with OpenRAG, see the installation guides in the OpenRAG documentation:
Requirements:
* [Quickstart](https://docs.openr.ag/quickstart)
* [Install the OpenRAG Python package](https://docs.openr.ag/install-options)
* [Deploy self-managed services with Docker or Podman](https://docs.openr.ag/docker)
Docker or podman with compose installed.
## Development
Run OpenRAG:
For developers who want to [contribute to OpenRAG](https://docs.openr.ag/support/contribute) or set up a development environment, see [CONTRIBUTING.md](CONTRIBUTING.md).
docker compose build
## Troubleshooting
docker compose up
For assistance with OpenRAG, see [Troubleshoot OpenRAG](https://docs.openr.ag/support/troubleshoot) and visit the [Discussions page](https://github.com/langflow-ai/openrag/discussions).
CPU only:
To report a bug or submit a feature request, visit the [Issues page](https://github.com/langflow-ai/openrag/issues).
docker compose -f docker-compose-cpu.yml up
If you need to reset state:
docker compose up --build --force-recreate --remove-orphans
For podman on mac you may have to increase your VM memory (`podman stats` should not show limit at only 2gb):
podman machine stop
podman machine rm
podman machine init --memory 8192 # example: 8 GB
podman machine start

View file

@ -1,64 +0,0 @@
# OpenRAG security policy and responsible disclosure
## Security policy
This security policy applies to all public projects under the langflow-ai organization on GitHub. We prioritize security and continuously work to safeguard our systems. However, vulnerabilities can still exist. If you identify a security issue, please report it to us so we can address it promptly.
### Security and bug fix versions
- Fixes are released either as part of the next minor version (e.g., 1.3.0 → 1.4.0) or as an on-demand patch version (e.g., 1.3.0 → 1.3.1)
- Security fixes are given priority and might be enough to cause a new version to be released
## Report a vulnerability
We encourage responsible disclosure of security vulnerabilities. If you find or suspect a security issue, please discreetly report it to us so we can address it promptly:
### Submit a report
Go to the [OpenRAG Security page](https://github.com/langflow-ai/openrag/security), and then click **Report a vulnerability** to start a private conversation between you and the repository's maintainers.
Provide as many specific details as possible to help us reproduce and fix the issue quickly, including the following:
- Steps to reproduce the issue
- Potential impact or concerns
- Any suggested fixes
Your report is kept confidential, and these details aren't shared without your consent.
### Response timeline
We will acknowledge your report within 5 business days.
We will provide an estimated resolution timeline.
We will keep you updated on our progress.
### Disclosure guidelines
- Don't publicly disclose vulnerabilities until we have assessed, resolved, and notified affected users.
- If you plan to present your research (e.g., at a conference or in a blog), share a draft with us at least 30 days in advance for review.
- Disclosures must not include the following:
- Data from any OpenRAG customer projects
- OpenRAG user/customer information
- Details about OpenRAG employees, contractors, or partners
We appreciate your efforts in helping us maintain a secure platform, and we look forward to working together to resolve any issues responsibly.
## Known vulnerabilities
The following known vulnerabilities are for the OpenRAG codebase.
This list doesn't include vulnerabilities within OpenRAG dependencies like OpenSearch and Langflow.
For Langflow vulnerabilities, see the [Langflow SECURITY.md](https://github.com/langflow-ai/langflow/blob/main/SECURITY.md).
There are no known vulnerabilities exclusive to the OpenRAG application at this time.
## Security configuration guidelines
### Start the Langflow server with authentication enabled
It is recommended that you set a Langflow password (`LANGFLOW_SUPERUSER_PASSWORD`) so the Langflow server starts with authentication enabled and the `langflow superuser` command disabled.
You can set this password when you install OpenRAG, or you can [edit the OpenRAG `.env` file and redeploy the OpenRAG containers](https://docs.openr.ag/reference/configuration#set-environment-variables).
For more information, see [OpenRAG's Langflow settings reference](https://docs.openr.ag/reference/configuration#langflow-settings).

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 35 KiB

106
docker-compose-cpu.yml Normal file
View file

@ -0,0 +1,106 @@
services:
opensearch:
build:
context: .
dockerfile: Dockerfile
container_name: os
depends_on:
- openrag-backend
environment:
- discovery.type=single-node
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_PASSWORD}
# Run security setup in background after OpenSearch starts
command: >
bash -c "
# Start OpenSearch in background
/usr/share/opensearch/opensearch-docker-entrypoint.sh opensearch &
# Wait a bit for OpenSearch to start, then apply security config
sleep 10 && /usr/share/opensearch/setup-security.sh &
# Wait for background processes
wait
"
ports:
- "9200:9200"
- "9600:9600"
dashboards:
image: opensearchproject/opensearch-dashboards:3.0.0
container_name: osdash
depends_on:
- opensearch
environment:
OPENSEARCH_HOSTS: '["https://opensearch:9200"]'
OPENSEARCH_USERNAME: "admin"
OPENSEARCH_PASSWORD: ${OPENSEARCH_PASSWORD}
ports:
- "5601:5601"
openrag-backend:
image: phact/openrag-backend:latest
#build:
#context: .
#dockerfile: Dockerfile.backend
container_name: openrag-backend
depends_on:
- langflow
environment:
- OPENSEARCH_HOST=opensearch
- LANGFLOW_URL=http://langflow:7860
- LANGFLOW_PUBLIC_URL=${LANGFLOW_PUBLIC_URL}
- LANGFLOW_SECRET_KEY=${LANGFLOW_SECRET_KEY}
- LANGFLOW_SUPERUSER=${LANGFLOW_SUPERUSER}
- LANGFLOW_SUPERUSER_PASSWORD=${LANGFLOW_SUPERUSER_PASSWORD}
- LANGFLOW_CHAT_FLOW_ID=${LANGFLOW_CHAT_FLOW_ID}
- OPENSEARCH_PORT=9200
- OPENSEARCH_USERNAME=admin
- OPENSEARCH_PASSWORD=${OPENSEARCH_PASSWORD}
- OPENAI_API_KEY=${OPENAI_API_KEY}
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
- NVIDIA_VISIBLE_DEVICES=all
- GOOGLE_OAUTH_CLIENT_ID=${GOOGLE_OAUTH_CLIENT_ID}
- GOOGLE_OAUTH_CLIENT_SECRET=${GOOGLE_OAUTH_CLIENT_SECRET}
- MICROSOFT_GRAPH_OAUTH_CLIENT_ID=${MICROSOFT_GRAPH_OAUTH_CLIENT_ID}
- MICROSOFT_GRAPH_OAUTH_CLIENT_SECRET=${MICROSOFT_GRAPH_OAUTH_CLIENT_SECRET}
- WEBHOOK_BASE_URL=${WEBHOOK_BASE_URL}
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
volumes:
- ./documents:/app/documents:Z
- ./keys:/app/keys:Z
openrag-frontend:
image: phact/openrag-frontend:latest
#build:
#context: .
#dockerfile: Dockerfile.frontend
container_name: openrag-frontend
depends_on:
- openrag-backend
environment:
- OPENRAG_BACKEND_HOST=openrag-backend
ports:
- "3000:3000"
langflow:
volumes:
- ./flows:/app/flows:Z
image: phact/langflow:responses
container_name: langflow
ports:
- "7860:7860"
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY}
- LANGFLOW_LOAD_FLOWS_PATH=/app/flows
- LANGFLOW_SECRET_KEY=${LANGFLOW_SECRET_KEY}
- JWT="dummy"
- OPENRAG-QUERY-FILTER="{}"
- OPENSEARCH_PASSWORD=${OPENSEARCH_PASSWORD}
- LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT=JWT,OPENRAG-QUERY-FILTER,OPENSEARCH_PASSWORD
- LANGFLOW_LOG_LEVEL=DEBUG
- LANGFLOW_AUTO_LOGIN=${LANGFLOW_AUTO_LOGIN}
- LANGFLOW_SUPERUSER=${LANGFLOW_SUPERUSER}
- LANGFLOW_SUPERUSER_PASSWORD=${LANGFLOW_SUPERUSER_PASSWORD}
- LANGFLOW_NEW_USER_IS_ACTIVE=${LANGFLOW_NEW_USER_IS_ACTIVE}
- LANGFLOW_ENABLE_SUPERUSER_CLI=${LANGFLOW_ENABLE_SUPERUSER_CLI}

View file

@ -1,12 +0,0 @@
services:
openrag-backend:
environment:
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
- NVIDIA_VISIBLE_DEVICES=all
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]

View file

@ -1,9 +1,9 @@
services:
opensearch:
image: langflowai/openrag-opensearch:${OPENRAG_VERSION:-latest}
image: phact/openrag-opensearch:latest
#build:
#context: .
#dockerfile: Dockerfile
#context: .
#dockerfile: Dockerfile
container_name: os
depends_on:
- openrag-backend
@ -13,9 +13,6 @@ services:
# Run security setup in background after OpenSearch starts
command: >
bash -c "
# Ensure data directory has correct permissions
sudo chown -R opensearch:opensearch /usr/share/opensearch/data || true
# Start OpenSearch in background
/usr/share/opensearch/opensearch-docker-entrypoint.sh opensearch &
@ -28,8 +25,6 @@ services:
ports:
- "9200:9200"
- "9600:9600"
volumes:
- ${OPENSEARCH_DATA_PATH:-./opensearch-data}:/usr/share/opensearch/data:U,z
dashboards:
image: opensearchproject/opensearch-dashboards:3.0.0
@ -44,10 +39,10 @@ services:
- "5601:5601"
openrag-backend:
image: langflowai/openrag-backend:${OPENRAG_VERSION:-latest}
build:
context: .
dockerfile: Dockerfile.backend
image: phact/openrag-backend:latest
#build:
#context: .
#dockerfile: Dockerfile.backend
container_name: openrag-backend
depends_on:
- langflow
@ -55,23 +50,15 @@ services:
- OPENSEARCH_HOST=opensearch
- LANGFLOW_URL=http://langflow:7860
- LANGFLOW_PUBLIC_URL=${LANGFLOW_PUBLIC_URL}
- LANGFLOW_AUTO_LOGIN=${LANGFLOW_AUTO_LOGIN}
- LANGFLOW_SUPERUSER=${LANGFLOW_SUPERUSER}
- LANGFLOW_SUPERUSER_PASSWORD=${LANGFLOW_SUPERUSER_PASSWORD}
- LANGFLOW_CHAT_FLOW_ID=${LANGFLOW_CHAT_FLOW_ID}
- LANGFLOW_INGEST_FLOW_ID=${LANGFLOW_INGEST_FLOW_ID}
- LANGFLOW_URL_INGEST_FLOW_ID=${LANGFLOW_URL_INGEST_FLOW_ID}
- DISABLE_INGEST_WITH_LANGFLOW=${DISABLE_INGEST_WITH_LANGFLOW:-false}
- NUDGES_FLOW_ID=${NUDGES_FLOW_ID}
- OPENSEARCH_PORT=9200
- OPENSEARCH_USERNAME=admin
- OPENSEARCH_PASSWORD=${OPENSEARCH_PASSWORD}
- OPENAI_API_KEY=${OPENAI_API_KEY}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
- WATSONX_API_KEY=${WATSONX_API_KEY}
- WATSONX_ENDPOINT=${WATSONX_ENDPOINT}
- WATSONX_PROJECT_ID=${WATSONX_PROJECT_ID}
- OLLAMA_ENDPOINT=${OLLAMA_ENDPOINT}
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
- NVIDIA_VISIBLE_DEVICES=all
- GOOGLE_OAUTH_CLIENT_ID=${GOOGLE_OAUTH_CLIENT_ID}
- GOOGLE_OAUTH_CLIENT_SECRET=${GOOGLE_OAUTH_CLIENT_SECRET}
- MICROSOFT_GRAPH_OAUTH_CLIENT_ID=${MICROSOFT_GRAPH_OAUTH_CLIENT_ID}
@ -80,65 +67,41 @@ services:
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
volumes:
- ${OPENRAG_DOCUMENTS_PATH:-./openrag-documents}:/app/openrag-documents:Z
- ${OPENRAG_KEYS_PATH:-./keys}:/app/keys:U,z
- ${OPENRAG_FLOWS_PATH:-./flows}:/app/flows:U,z
- ${OPENRAG_CONFIG_PATH:-./config}:/app/config:Z
- ${OPENRAG_DATA_PATH:-./data}:/app/data:Z
- ./documents:/app/documents:Z
- ./keys:/app/keys:Z
gpus: all
openrag-frontend:
image: langflowai/openrag-frontend:${OPENRAG_VERSION:-latest}
build:
context: .
dockerfile: Dockerfile.frontend
image: phact/openrag-frontend:latest
#build:
#context: .
#dockerfile: Dockerfile.frontend
container_name: openrag-frontend
depends_on:
- openrag-backend
environment:
- OPENRAG_BACKEND_HOST=openrag-backend
ports:
- "3003:3003"
- "3000:3000"
langflow:
volumes:
- ${OPENRAG_FLOWS_PATH:-./flows}:/app/flows:U,z
image: langflowai/openrag-langflow:${OPENRAG_VERSION:-latest}
build:
context: .
dockerfile: Dockerfile.langflow
- ./flows:/app/flows:Z
image: phact/langflow:responses
container_name: langflow
ports:
- "7860:7860"
environment:
- LANGFUSE_SECRET_KEY=${LANGFUSE_SECRET_KEY:-}
- LANGFUSE_PUBLIC_KEY=${LANGFUSE_PUBLIC_KEY:-}
- LANGFUSE_HOST=${LANGFUSE_HOST:-}
- OPENAI_API_KEY=${OPENAI_API_KEY:-None}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY:-None}
- WATSONX_API_KEY=${WATSONX_API_KEY:-None}
- WATSONX_ENDPOINT=${WATSONX_ENDPOINT:-None}
- WATSONX_PROJECT_ID=${WATSONX_PROJECT_ID:-None}
- OLLAMA_BASE_URL=${OLLAMA_ENDPOINT:-None}
- OPENAI_API_KEY=${OPENAI_API_KEY}
- LANGFLOW_LOAD_FLOWS_PATH=/app/flows
- LANGFLOW_SECRET_KEY=${LANGFLOW_SECRET_KEY}
- JWT=None
- OWNER=None
- OWNER_NAME=None
- OWNER_EMAIL=None
- CONNECTOR_TYPE=system
- CONNECTOR_TYPE_URL=url
- JWT="dummy"
- OPENRAG-QUERY-FILTER="{}"
- OPENSEARCH_PASSWORD=${OPENSEARCH_PASSWORD}
- FILENAME=None
- MIMETYPE=None
- FILESIZE=0
- SELECTED_EMBEDDING_MODEL=${SELECTED_EMBEDDING_MODEL:-}
- LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT=JWT,OPENRAG-QUERY-FILTER,OPENSEARCH_PASSWORD,OWNER,OWNER_NAME,OWNER_EMAIL,CONNECTOR_TYPE,FILENAME,MIMETYPE,FILESIZE,SELECTED_EMBEDDING_MODEL,OPENAI_API_KEY,ANTHROPIC_API_KEY,WATSONX_API_KEY,WATSONX_ENDPOINT,WATSONX_PROJECT_ID,OLLAMA_BASE_URL
- LANGFLOW_VARIABLES_TO_GET_FROM_ENVIRONMENT=JWT,OPENRAG-QUERY-FILTER,OPENSEARCH_PASSWORD
- LANGFLOW_LOG_LEVEL=DEBUG
- LANGFLOW_AUTO_LOGIN=${LANGFLOW_AUTO_LOGIN}
- LANGFLOW_SUPERUSER=${LANGFLOW_SUPERUSER}
- LANGFLOW_SUPERUSER_PASSWORD=${LANGFLOW_SUPERUSER_PASSWORD}
- LANGFLOW_NEW_USER_IS_ACTIVE=${LANGFLOW_NEW_USER_IS_ACTIVE}
- LANGFLOW_ENABLE_SUPERUSER_CLI=${LANGFLOW_ENABLE_SUPERUSER_CLI}
# - DEFAULT_FOLDER_NAME=OpenRAG
- HIDE_GETTING_STARTED_PROGRESS=true

26
docs/.gitignore vendored
View file

@ -1,26 +0,0 @@
# Dependencies
/node_modules
# Production
/build
# Generated files
.docusaurus
.cache-loader
# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
# Override parent .gitignore to allow package management files
!package.json
!package-lock.json
!yarn.lock
!scraper.config.json

View file

@ -1,77 +0,0 @@
# Website
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
## Installation
```bash
npm install
```
## Local Development
```bash
npm start
```
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
## Build
```bash
npm run build
```
This command generates static content into the `build` directory and can be served using any static contents hosting service.
## Deployment
Using SSH:
```bash
USE_SSH=true npm run deploy
```
Not using SSH:
```bash
GIT_USER=<Your GitHub username> npm run deploy
```
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
## Update the OpenRAG documentation PDF
The documentation PDF at `openrag/openrag-documents/openrag-documentation.pdf` is used by the OpenRAG application, so keep it up to date.
To update the PDF, do the following:
1. Remove elements from the `docs/*.mdx` files.
Content in tabs, details, and summary elements is hidden from PDF builds and it must be included.
To remove these items, give the following prompt or something similar to your IDE.
```
Flatten documentation for PDF: remove tabs and details elements
In all MDX files in docs/docs/, flatten interactive elements:
Remove all <Tabs> and <TabItem> components:
Convert each tab's content to a regular section with an appropriate heading (### for subsections, ## for main sections)
Show all tab content sequentially
Remove the import statements for Tabs and TabItem where they're no longer used
Remove all <details> and <summary> elements:
Convert details content to regular text with an appropriate heading (### for subsections)
Show all content directly (no collapsible sections)
Keep all content visible — nothing should be hidden or collapsed
Maintain proper formatting and structure
Apply this to all documentation files that contain tabs or details elements so the content is fully flat and visible for PDF generation.
```
2. Check your `.mdx` files to confirm these elements are removed.
Don't commit the changes.
3. From `openrag/docs`, run this command to build the site with the changes, and create a PDF at `openrag/openrag-documents`.
```
npm run build:pdf
```
4. Check the PDF's content, then commit and create a pull request.

View file

@ -1,110 +0,0 @@
# Docusaurus versioning setup
Docs versioning is currently **DISABLED** but configured and ready to enable.
The configuration is found in `docusaurus.config.js` with commented-out sections.
To enable versioning, do the following:
1. Open `docusaurus.config.js`
2. Find the versioning configuration section (around line 57)
3. Uncomment the versioning configuration:
```javascript
docs: {
// ... other config
lastVersion: 'current', // Use 'current' to make ./docs the latest version
versions: {
current: {
label: 'Next (unreleased)',
path: 'next',
},
},
onlyIncludeVersions: ['current'], // Limit versions for faster builds
},
```
## Create docs versions
See the [Docusaurus docs](https://docusaurus.io/docs/versioning) for more info.
1. Use the Docusaurus CLI command to create a version.
```bash
# Create version 1.0.0 from current docs
npm run docusaurus docs:version 1.0.0
```
This command will:
- Copy the full `docs/` folder contents into `versioned_docs/version-1.0.0/`
- Create a versioned sidebar file at `versioned_sidebars/version-1.0.0-sidebars.json`
- Append the new version to `versions.json`
2. After creating a version, update the Docusaurus configuration to include multiple versions.
`lastVersion:'1.0.0'` makes the '1.0.0' release the `latest` version.
`current` is the work-in-progress docset, accessible at `/docs/next`.
To remove a version, remove it from `onlyIncludeVersions`.
```javascript
docs: {
// ... other config
lastVersion: '1.0.0', // Make 1.0.0 the latest version
versions: {
current: {
label: 'Next (unreleased)',
path: 'next',
},
'1.0.0': {
label: '1.0.0',
path: '1.0.0',
},
},
onlyIncludeVersions: ['current', '1.0.0'], // Include both versions
},
```
3. Test the deployment locally.
```bash
npm run build
npm run serve
```
4. To add subsequent versions, repeat the process, first running the CLI command then updating `docusaurus.config.js`.
```bash
# Create version 2.0.0 from current docs
npm run docusaurus docs:version 2.0.0
```
After creating a new version, update `docusaurus.config.js`.
```javascript
docs: {
lastVersion: '2.0.0', // Make 2.0.0 the latest version
versions: {
current: {
label: 'Next (unreleased)',
path: 'next',
},
'2.0.0': {
label: '2.0.0',
path: '2.0.0',
},
'1.0.0': {
label: '1.0.0',
path: '1.0.0',
},
},
onlyIncludeVersions: ['current', '2.0.0', '1.0.0'], // Include all versions
},
```
## Disable versioning
1. Remove the `versions` configuration from `docusaurus.config.js`.
2. Delete the `docs/versioned_docs/` and `docs/versioned_sidebars/` directories.
3. Delete `docs/versions.json`.
## References
- [Official Docusaurus Versioning Documentation](https://docusaurus.io/docs/versioning)
- [Docusaurus Versioning Best Practices](https://docusaurus.io/docs/versioning#recommended-practices)

View file

@ -1 +0,0 @@
In no-auth mode, all documents are attributed to **Anonymous User** because there is no distinct document ownership or unique JWTs. For more control over document ownership and visibility, use OAuth mode. For more information, see [OpenSearch authentication and document access](/knowledge#auth).

View file

@ -1,9 +0,0 @@
```bash title="Docker"
docker compose down --volumes --remove-orphans --rmi local
docker system prune -f
```
```bash title="Podman"
podman compose down --volumes --remove-orphans --rmi local
podman system prune -f
```

View file

@ -1,7 +0,0 @@
```bash title="Docker"
docker compose up -d
```
```bash title="Podman"
podman compose up -d
```

View file

@ -1,49 +0,0 @@
1. Remove all containers, including stopped containers:
```bash title="Docker"
docker rm --force $(docker ps -aq)
```
```bash title="Podman"
podman rm --all --force
```
2. Remove all images:
```bash title="Docker"
docker rmi --force $(docker images -q)
```
```bash title="Podman"
podman rmi --all --force
```
3. Remove all volumes:
```bash title="Docker"
docker volume prune --force
```
```bash title="Podman"
podman volume prune --force
```
4. Remove all networks except the default network:
```bash title="Docker"
docker network prune --force
```
```bash title="Podman"
podman network prune --force
```
5. Clean up any leftover data:
```bash title="Docker"
docker system prune --all --force --volumes
```
```bash title="Podman"
podman system prune --all --force --volumes
```

View file

@ -1,7 +0,0 @@
```bash title="Docker"
docker stop $(docker ps -q)
```
```bash title="Podman"
podman stop --all
```

View file

@ -1 +0,0 @@
1. If you modified the built-in flows or created custom flows in your [OpenRAG Langflow instance](/agents), [export your flows](https://docs.langflow.org/concepts-flows-import) before starting this process. Although OpenRAG can preserve changes to the built-in flows, it doesn't preserve user-created flows. As a general best practice, exporting your flows is recommended to create backups of your customizations. Afterwards, you can reimport your flows or reference the exported flow JSON as needed.

View file

@ -1,22 +0,0 @@
:::warning
This is a destructive operation that does the following:
* Destroys all OpenRAG containers, volumes, and local images.
* Prunes any additional container objects.
* Deletes the contents of the `~/.openrag` directory _except_ for OpenRAG's `.env` file and the `/documents` subdirectory.
<p/>Destroyed containers and deleted data are lost and cannot be recovered after running this operation.
:::
<!--
Author's note: Don't remove the <p/> tag!
For some reason, this specific usage consistently enforces the line break and indentation whether the partial is nested or not.
Without the <p/> tag, when this partial is used inside a list (ex. nested under a step in a numbered list), there is no implicit line break after the last bullet.
When this partial is used outside of a list (as a top-level paragraph), there is an implicit line break after the last bullet.
Neither <br/> nor wrapping the entire line in <p> </p> worked consistently for both use cases.
Either the line break was missing or the indentation was incorrect.
This behavior was observed in Docusaurus 3.9.2 on 05 Dec 2025. In a future release, if this is not longer an issue, you can remove the tag and this note. :)
-->

View file

@ -1,5 +0,0 @@
GPU acceleration isn't required for most use cases.
OpenRAG's CPU-only deployment doesn't prevent you from using GPU acceleration in external services, such as Ollama servers.
GPU acceleration is required only for specific use cases, typically involving customization of the ingestion flows or ingestion logic.
For example, writing alternate ingest logic in OpenRAG that uses GPUs directly in the container, or customizing the ingestion flows to use Langflow's Docling component with GPU acceleration instead of OpenRAG's Docling Serve service.

View file

@ -1,24 +0,0 @@
<details>
<summary>About the OpenSearch Ingestion flow</summary>
When you upload documents locally or with OAuth connectors, the **OpenSearch Ingestion** flow runs in the background.
By default, this flow uses Docling Serve to import and process documents.
Like all [OpenRAG flows](/agents), you can [inspect the flow in Langflow](/agents#inspect-and-modify-flows), and you can customize it if you want to change the knowledge ingestion settings.
The **OpenSearch Ingestion** flow is comprised of several components that work together to process and store documents in your knowledge base:
* [**Docling Serve** component](https://docs.langflow.org/bundles-docling#docling-serve): Ingests files and processes them by connecting to OpenRAG's local Docling Serve service. The output is `DoclingDocument` data that contains the extracted text and metadata from the documents.
* [**Export DoclingDocument** component](https://docs.langflow.org/bundles-docling#export-doclingdocument): Exports processed `DoclingDocument` data to Markdown format with image placeholders. This conversion standardizes the document data in preparation for further processing.
* [**DataFrame Operations** component](https://docs.langflow.org/dataframe-operations): Three of these components run sequentially to add metadata to the document data: `filename`, `file_size`, and `mimetype`.
* [**Split Text** component](https://docs.langflow.org/split-text): Splits the processed text into chunks, based on the configured [chunk size and overlap settings](/knowledge#knowledge-ingestion-settings).
* **Secret Input** component: If needed, four of these components securely fetch the [OAuth authentication](/knowledge#auth) configuration variables: `CONNECTOR_TYPE`, `OWNER`, `OWNER_EMAIL`, and `OWNER_NAME`.
* **Create Data** component: Combines the authentication credentials from the **Secret Input** components into a structured data object that is associated with the document embeddings.
* [**Embedding Model** component](https://docs.langflow.org/components-embedding-models): Generates vector embeddings using your selected [embedding model](/knowledge#set-the-embedding-model-and-dimensions).
* [**OpenSearch** component](https://docs.langflow.org/bundles-elastic#opensearch): Stores the processed documents and their embeddings in a `documents` index of your OpenRAG [OpenSearch knowledge base](/knowledge).
The default address for the OpenSearch instance is `https://opensearch:9200`. To change this address, edit the `OPENSEARCH_PORT` [environment variable](/reference/configuration#opensearch-settings).
The default authentication method is JSON Web Token (JWT) authentication. If you [edit the flow](/agents#inspect-and-modify-flows), you can select `basic` auth mode, which uses the `OPENSEARCH_USERNAME` and `OPENSEARCH_PASSWORD` [environment variables](/reference/configuration#opensearch-settings) for authentication instead of JWT.
</details>

View file

@ -1,5 +0,0 @@
## Next steps
* Try some of OpenRAG's core features in the [quickstart](/quickstart#chat-with-documents).
* Learn how to [manage OpenRAG services](/manage-services).
* [Upload documents](/ingestion), and then use the [**Chat**](/chat) to explore your data.

View file

@ -1,114 +0,0 @@
import Icon from "@site/src/components/icon/icon";
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
1. Open the **OpenRAG OpenSearch Agent** flow in the Langflow visual editor: Click <Icon name="Settings2" aria-hidden="true"/> **Settings**, click **Edit in Langflow**, and then click **Proceed**.
2. Optional: If you don't want to use the Langflow API key that is generated automatically when you install OpenRAG, you can create a [Langflow API key](https://docs.langflow.org/api-keys-and-authentication).
This key doesn't grant access to OpenRAG; it is only for authenticating with the Langflow API.
1. In the Langflow visual editor, click your user icon in the header, and then select **Settings**.
2. Click **Langflow API Keys**, and then click <Icon name="Plus" aria-hidden="true"/> **Add New**.
3. Name your key, and then click **Create API Key**.
4. Copy the API key and store it securely.
5. Exit the Langflow **Settings** page to return to the visual editor.
3. Click **Share**, and then select **API access** to get pregenerated code snippets that call the Langflow API and run the flow.
These code snippets construct API requests with your Langflow server URL (`LANGFLOW_SERVER_ADDRESS`), the flow to run (`FLOW_ID`), required headers (`LANGFLOW_API_KEY`, `Content-Type`), and a payload containing the required inputs to run the flow, including a default chat input message.
In production, you would modify the inputs to suit your application logic. For example, you could replace the default chat input message with dynamic user input.
<Tabs>
<TabItem value="python" label="Python">
```python
import requests
import os
import uuid
api_key = 'LANGFLOW_API_KEY'
url = "http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID" # The complete API endpoint URL for this flow
# Request payload configuration
payload = {
"output_type": "chat",
"input_type": "chat",
"input_value": "hello world!"
}
payload["session_id"] = str(uuid.uuid4())
headers = {"x-api-key": api_key}
try:
# Send API request
response = requests.request("POST", url, json=payload, headers=headers)
response.raise_for_status() # Raise exception for bad status codes
# Print response
print(response.text)
except requests.exceptions.RequestException as e:
print(f"Error making API request: {e}")
except ValueError as e:
print(f"Error parsing response: {e}")
```
</TabItem>
<TabItem value="typescript" label="TypeScript">
```typescript
const crypto = require('crypto');
const apiKey = 'LANGFLOW_API_KEY';
const payload = {
"output_type": "chat",
"input_type": "chat",
"input_value": "hello world!"
};
payload.session_id = crypto.randomUUID();
const options = {
method: 'POST',
headers: {
'Content-Type': 'application/json',
"x-api-key": apiKey
},
body: JSON.stringify(payload)
};
fetch('http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID', options)
.then(response => response.json())
.then(response => console.warn(response))
.catch(err => console.error(err));
```
</TabItem>
<TabItem value="curl" label="curl">
```bash
curl --request POST \
--url 'http://LANGFLOW_SERVER_ADDRESS/api/v1/run/FLOW_ID?stream=false' \
--header 'Content-Type: application/json' \
--header "x-api-key: LANGFLOW_API_KEY" \
--data '{
"output_type": "chat",
"input_type": "chat",
"input_value": "hello world!"
}'
```
</TabItem>
</Tabs>
4. Copy your preferred snippet, and then run it:
* **Python**: Paste the snippet into a `.py` file, save it, and then run it with `python filename.py`.
* **TypeScript**: Paste the snippet into a `.ts` file, save it, and then run it with `ts-node filename.ts`.
* **curl**: Paste and run snippet directly in your terminal.
If the request is successful, the response includes many details about the flow run, including the session ID, inputs, outputs, components, durations, and more.
In production, you won't pass the raw response to the user in its entirety.
Instead, you extract and reformat relevant fields for different use cases, as demonstrated in the [Langflow quickstart](https://docs.langflow.org/get-started-quickstart#extract-data-from-the-response).
For example, you could pass the chat output text to a front-end user-facing application, and store specific fields in logs and backend data stores for monitoring, chat history, or analytics.
You could also pass the output from one flow as input to another flow.

View file

@ -1,13 +0,0 @@
OpenRAG isn't guaranteed to be compatible with all models that are available through Ollama.
For example, some models might produce unexpected results, such as JSON-formatted output instead of natural language responses, and some models aren't appropriate for the types of tasks that OpenRAG performs, such as those that generate media.
The OpenRAG team recommends the following models when using Ollama as your model provider:
* **Language models**: `gpt-oss:20b` or `mistral-nemo:12b`.
If you choose `gpt-oss:20b`, consider using Ollama Cloud or running Ollama on a remote machine because this model requires at least 16GB of RAM.
* **Embedding models**: [`nomic-embed-text:latest`](https://ollama.com/library/nomic-embed-text), `mxbai-embed-large:latest`, or `embeddinggemma:latest`.
You can experiment with other models, but if you encounter issues that you are unable to resolve through other RAG best practices (like context filters and prompt engineering), try switching to one of the recommended models.
You can submit an [OpenRAG GitHub issue](https://github.com/langflow-ai/openrag/issues) to request support for specific models.

View file

@ -1,136 +0,0 @@
import Icon from "@site/src/components/icon/icon";
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import PartialOllamaModels from '@site/docs/_partial-ollama-models.mdx';
## Complete the application onboarding process {#application-onboarding}
The first time you start the OpenRAG application, you must complete the application onboarding process to select language and embedding models that are essential for OpenRAG features like the [**Chat**](/chat).
Some of these variables, such as the embedding models, can be changed seamlessly after onboarding.
Others are immutable and require you to destroy and recreate the OpenRAG containers.
For more information, see the [OpenRAG environment variables reference](/reference/configuration).
You can use different providers for your language model and embedding model, such as Anthropic for the language model and OpenAI for the embedding model.
Additionally, you can set multiple embedding models.
You only need to complete onboarding for your preferred providers.
<Tabs groupId="Provider">
<TabItem value="Anthropic" label="Anthropic" default>
:::info
Anthropic doesn't provide embedding models. If you select Anthropic for your language model, you must select a different provider for the embedding model.
:::
1. Enter your Anthropic API key, or enable **Use environment API key** to pull the key from your [OpenRAG `.env` file](/reference/configuration).
2. Under **Advanced settings**, select the language model that you want to use.
3. Click **Complete**.
4. Select a provider for embeddings, provide the required information, and then select the embedding model you want to use.
For information about another provider's credentials and settings, see the instructions for that provider.
5. Click **Complete**.
After you configure the embedding model, OpenRAG uses your credentials and models to ingest some [initial documents](/knowledge#default-documents). This tests the connection, and it allows you to ask OpenRAG about itself in the [**Chat**](/chat).
If there is a problem with the model configuration, an error occurs and you are redirected back to the application onboarding screen.
Verify that the credential is valid and has access to the selected model, and then click **Complete** to retry ingestion.
6. Continue through the overview slides for a brief introduction to OpenRAG, or click <Icon name="ArrowRight" aria-hidden="true"/> **Skip overview**.
The overview demonstrates some basic functionality that is covered in the [quickstart](/quickstart#chat-with-documents) and in other parts of the OpenRAG documentation.
</TabItem>
<TabItem value="IBM watsonx.ai" label="IBM watsonx.ai">
1. For **watsonx.ai API Endpoint**, select the base URL for your watsonx.ai model deployment.
2. Enter your watsonx.ai deployment's project ID and API key.
You can enable **Use environment API key** to pull the key from your [OpenRAG `.env` file](/reference/configuration).
3. Under **Advanced settings**, select the language model that you want to use.
4. Click **Complete**.
5. Select a provider for embeddings, provide the required information, and then select the embedding model you want to use.
For information about another provider's credentials and settings, see the instructions for that provider.
6. Click **Complete**.
After you configure the embedding model, OpenRAG uses your credentials and models to ingest some [initial documents](/knowledge#default-documents). This tests the connection, and it allows you to ask OpenRAG about itself in the [**Chat**](/chat).
If there is a problem with the model configuration, an error occurs and you are redirected back to the application onboarding screen.
Verify that the credentials are valid and have access to the selected model, and then click **Complete** to retry ingestion.
7. Continue through the overview slides for a brief introduction to OpenRAG, or click <Icon name="ArrowRight" aria-hidden="true"/> **Skip overview**.
The overview demonstrates some basic functionality that is covered in the [quickstart](/quickstart#chat-with-documents) and in other parts of the OpenRAG documentation.
</TabItem>
<TabItem value="Ollama" label="Ollama">
Using Ollama as your language and embedding model provider offers greater flexibility and configuration options for hosting models.
However, it requires additional setup because Ollama isn't included with OpenRAG.
You must deploy Ollama separately if you want to use Ollama as a model provider.
:::info
<PartialOllamaModels />
:::
1. [Install Ollama locally or on a remote server](https://docs.ollama.com/), or [run models in Ollama Cloud](https://docs.ollama.com/cloud).
If you are running a remote server, it must be accessible from your OpenRAG deployment.
2. In the OpenRAG onboarding dialog, enter your Ollama server's base URL:
* **Local Ollama server**: Enter your Ollama server's base URL and port. The default Ollama server address is `http://localhost:11434`.
* **Ollama Cloud**: Because Ollama Cloud models run at the same address as a local Ollama server and automatically offload to Ollama's cloud service, you can use the same base URL and port as you would for a local Ollama server. The default address is `http://localhost:11434`.
* **Remote server**: Enter your remote Ollama server's base URL and port, such as `http://your-remote-server:11434`.
3. Select the language model that your Ollama server is running.
If your server isn't running any language models, you must either deploy a language model on your Ollama server, or use another provider for the language model.
Language model and embedding model selections are independent.
You can use the same or different servers for each model.
To use different providers for each model, you must configure both providers, and select the relevant model for each provider.
4. Click **Complete**.
5. Select a provider for embeddings, provide the required information, and then select the embedding model you want to use.
For information about another provider's credentials and settings, see the instructions for that provider.
6. Click **Complete**.
After you configure the embedding model, OpenRAG uses your credentials and models to ingest some [initial documents](/knowledge#default-documents). This tests the connection, and it allows you to ask OpenRAG about itself in the [**Chat**](/chat).
If there is a problem with the model configuration, an error occurs and you are redirected back to the application onboarding screen.
Verify that the server address is valid, and that the selected model is running on the server.
Then, click **Complete** to retry ingestion.
7. Continue through the overview slides for a brief introduction to OpenRAG, or click <Icon name="ArrowRight" aria-hidden="true"/> **Skip overview**.
The overview demonstrates some basic functionality that is covered in the [quickstart](/quickstart#chat-with-documents) and in other parts of the OpenRAG documentation.
</TabItem>
<TabItem value="OpenAI" label="OpenAI (default)">
1. Enter your OpenAI API key, or enable **Use environment API key** to pull the key from your [OpenRAG `.env` file](/reference/configuration).
2. Under **Advanced settings**, select the language model that you want to use.
3. Click **Complete**.
4. Select a provider for embeddings, provide the required information, and then select the embedding model you want to use.
For information about another provider's credentials and settings, see the instructions for that provider.
5. Click **Complete**.
After you configure the embedding model, OpenRAG uses your credentials and models to ingest some [initial documents](/knowledge#default-documents). This tests the connection, and it allows you to ask OpenRAG about itself in the [**Chat**](/chat).
If there is a problem with the model configuration, an error occurs and you are redirected back to the application onboarding screen.
Verify that the credential is valid and has access to the selected model, and then click **Complete** to retry ingestion.
6. Continue through the overview slides for a brief introduction to OpenRAG, or click <Icon name="ArrowRight" aria-hidden="true"/> **Skip overview**.
The overview demonstrates some basic functionality that is covered in the [quickstart](/quickstart#chat-with-documents) and in other parts of the OpenRAG documentation.
</TabItem>
</Tabs>

View file

@ -1,11 +0,0 @@
* **No-auth mode**: If you select **Basic Setup** in the [TUI](/tui), or your [OpenRAG `.env` file](/reference/configuration) doesn't include OAuth credentials, then the OpenRAG OpenSearch instance runs in no-auth mode.
This mode uses one anonymous JWT token for OpenSearch authentication.
There is no differentiation between users; all users that access your OpenRAG instance can access all documents uploaded to your knowledge base.
* **OAuth mode**: If you select **Advanced Setup** in the [TUI](/tui), or your [OpenRAG `.env` file](/reference/configuration) includes OAuth credentials, then the OpenRAG OpenSearch instance runs in OAuth mode.
This mode uses a unique JWT token for each OpenRAG user, and each document is tagged with user ownership.
Documents are filtered by user owner; users see only the documents that they uploaded or have access to through their cloud storage accounts.
To enable OAuth mode after initial setup, see [Ingest files with OAuth connectors](/ingestion#oauth-ingestion).

View file

@ -1,20 +0,0 @@
import PartialOllamaModels from '@site/docs/_partial-ollama-models.mdx';
* Gather the credentials and connection details for your preferred model providers.
You must have access to at least one language model and one embedding model.
If a provider offers both types, you can use the same provider for both models.
If a provider offers only one type, you must select two providers.
* **OpenAI**: Create an [OpenAI API key](https://platform.openai.com/api-keys).
* **Anthropic**: Create an [Anthropic API key](https://www.anthropic.com/docs/api/reference).
Anthropic provides language models only; you must select an additional provider for embeddings.
* **IBM watsonx.ai**: Get your watsonx.ai API endpoint, IBM project ID, and IBM API key from your watsonx deployment.
* **Ollama**: Deploy an [Ollama instance and models](https://docs.ollama.com/) locally, in the cloud, or on a remote server. Then, get your Ollama server's base URL and the names of the models that you want to use.
:::info
<PartialOllamaModels />
:::
* Optional: Install GPU support with an NVIDIA GPU, [CUDA](https://docs.nvidia.com/cuda/) support, and compatible NVIDIA drivers on the OpenRAG host machine.
If you don't have GPU capabilities, OpenRAG provides an alternate CPU-only deployment that is suitable for most use cases.
The default CPU-only deployment doesn't prevent you from using GPU acceleration in external services, such as Ollama servers.

View file

@ -1,10 +0,0 @@
* Install [uv](https://docs.astral.sh/uv/getting-started/installation/).
* Install [Podman](https://podman.io/docs/installation) (recommended) or [Docker](https://docs.docker.com/get-docker/).
The OpenRAG team recommends, at minimum, 8 GB of RAM for container VMs.
However, if you plan to upload large files regularly, more RAM is recommended.
For more information, see [Troubleshoot OpenRAG](/support/troubleshoot).
* Install [`podman-compose`](https://docs.podman.io/en/latest/markdown/podman-compose.1.html) or [Docker Compose](https://docs.docker.com/compose/install/).
To use Docker Compose with Podman, you must alias Docker Compose commands to Podman commands.

View file

@ -1 +0,0 @@
* Install [Python](https://www.python.org/downloads/release/python-3100/) version 3.13 or later.

View file

@ -1,2 +0,0 @@
* For Microsoft Windows, you must use the Windows Subsystem for Linux (WSL).
See [Install OpenRAG on Windows](/install-windows) before proceeding.

View file

@ -1,126 +0,0 @@
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import PartialOpenSearchAuthMode from '@site/docs/_partial-opensearch-auth-mode.mdx';
You can use either **Basic Setup** or **Advanced Setup** to configure OpenRAG.
This choice determines how OpenRAG authenticates with your deployment's [OpenSearch instance](/knowledge), and it controls user access to documents stored in your OpenSearch knowledge base:
<PartialOpenSearchAuthMode />
:::info
You must use **Advanced Setup** if you want to [use OAuth connectors to upload documents from cloud storage](/ingestion#oauth-ingestion).
:::
If OpenRAG detects OAuth credentials during setup, it recommends **Advanced Setup** in the TUI.
<Tabs groupId="Setup method">
<TabItem value="Basic setup" label="Basic setup" default>
1. In the TUI, select **Basic Setup**.
2. Enter administrator passwords for the OpenRAG OpenSearch and Langflow services.
The OpenSearch password is required, and a secure password is automatically generated if you don't provide one manually.
The Langflow password is recommended but optional.
If the Langflow password is empty, the Langflow server starts without authentication enabled. For more information, see [Langflow settings](/reference/configuration#langflow-settings).
You can click **Generate Password** to create a Langflow password and username automatically.
3. Optional: Under **API Keys**, enter your model provider credentials, or leave these fields empty if you want to configure model provider credentials during the application onboarding process.
There is no material difference between providing these values now or during the [application onboarding process](#application-onboarding).
If you provide a credential now, it can be populated automatically during the application onboarding process if you enable the **Use environment API key** option.
OpenRAG's core functionality requires access to language and embedding models.
By default, OpenRAG uses OpenAI models.
If you aren't sure which models or providers to use, you must provide an OpenAI API key to use OpenRAG's default model configuration.
4. Optional: Under **Others**, edit the [knowledge base](/knowledge) paths if you don't want to use the default paths:
* **Documents Paths**: One or more paths to directories are where OpenRAG looks for documents to ingest.
* **OpenSearch Data Path**: Specify the path where you want OpenRAG to create your OpenSearch index.
5. Click **Save Configuration**.
Your passwords and API keys, if provided, are stored in the [OpenRAG `.env` file](/reference/configuration) at `~/.openrag/tui`.
If you modified any credentials that were pulled from an existing `.env` file, those values are updated in the `.env` file.
6. Click **Start OpenRAG** to start the OpenRAG services.
This process can take some time while OpenRAG pulls and runs the container images.
If all services start successfully, the TUI prints a confirmation message:
```text
Services started successfully
Command completed successfully
```
7. Click **Close**, and then click **Launch OpenRAG** or navigate to `localhost:3000` in your browser.
8. Continue with the [application onboarding process](#application-onboarding).
</TabItem>
<TabItem value="Advanced setup" label="Advanced setup">
1. In the TUI, select **Advanced Setup**.
2. Enter administrator passwords for the OpenRAG OpenSearch and Langflow services.
The OpenSearch password is required, and a secure password is automatically generated if you don't provide one manually.
The Langflow password is recommended but optional.
If the Langflow password is empty, the Langflow server starts without authentication enabled. For more information, see [Langflow settings](/reference/configuration#langflow-settings).
You can click **Generate Password** to create a Langflow password and username automatically.
3. Optional: Under **API Keys**, enter your model provider credentials, or leave the **OpenAI**, **Anthropic**, **Ollama**, and **IBM watsonx.ai** fields empty if you want to configure model provider credentials during the application onboarding process.
There is no material difference between providing these values now or during the [application onboarding process](#application-onboarding).
If you provide a credential now, it can be populated automatically during the application onboarding process if you enable the **Use environment API key** option.
OpenRAG's core functionality requires access to language and embedding models.
By default, OpenRAG uses OpenAI models.
If you aren't sure which models or providers to use, you must provide an OpenAI API key to use OpenRAG's default model configuration.
4. Recommended: To upload documents from external storage, such as Google Drive, add the required OAuth credentials for the connectors that you want to use under **API Keys**. These settings can be populated automatically if OpenRAG detects these credentials in an [OpenRAG `.env` file](/reference/configuration) at `~/.openrag/tui`.
* **Google**: Provide your Google OAuth Client ID and Google OAuth Client Secret. You can generate these in the [Google Cloud Console](https://console.cloud.google.com/apis/credentials). For more information, see the [Google OAuth client documentation](https://developers.google.com/identity/protocols/oauth2).
* **Microsoft**: For the Microsoft OAuth Client ID and Microsoft OAuth Client Secret, provide [Azure application registration credentials for SharePoint and OneDrive](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/app-registration?view=odsp-graph-online). For more information, see the [Microsoft Graph OAuth client documentation](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/graph-oauth).
* **Amazon**: Provide your AWS Access Key ID and AWS Secret Access Key with access to your S3 instance. For more information, see the AWS documentation on [Configuring access to AWS applications](https://docs.aws.amazon.com/singlesignon/latest/userguide/manage-your-applications.html).
You can [manage OAuth credentials](/ingestion#oauth-ingestion) later, but it is recommended to configure them during initial set up.
5. Register the redirect URIs shown in the TUI in your OAuth provider.
These are the URLs your OAuth provider will use to redirect users back to OpenRAG after they sign in.
6. Optional: Under **Others**, you can edit the following settings if needed:
* **Documents Paths**: Use the default path or provide one or more paths to directories are where OpenRAG looks for documents to ingest in to your [knowledge base](/knowledge).
* **OpenSearch Data Path**: Specify the path where you want OpenRAG to create your OpenSearch index.
* **Langflow Public URL (`LANGFLOW_PUBLIC_URL`)** : Sets the base address to access the Langflow web interface. This is where users interact with flows in a browser.
* **Webhook Base URL (`WEBHOOK_BASE_URL`)**: If applicable, set the base address for your OAuth connector endpoints. If set, the OAuth connector webhook URLs are constructed as `WEBHOOK_BASE_URL/connectors/${provider}/webhook`.
7. Click **Save Configuration**.
Your passwords, API key, and OAuth credentials, if provided, are stored in the [OpenRAG `.env` file](/reference/configuration) at `~/.openrag/tui`.
If you modified any credentials that were pulled from an existing `.env` file, those values are updated in the `.env` file.
8. Click **Start OpenRAG** to start the OpenRAG services.
This process can take some time while OpenRAG pulls and runs the container images.
If all services start successfully, the TUI prints a confirmation message:
```text
Services started successfully
Command completed successfully
```
9. Click **Close**, and then click **Launch OpenRAG** or navigate to `localhost:3000` in your browser.
10. If you enabled OAuth connectors, you must sign in to your OAuth provider before being redirected to your OpenRAG instance.
11. Continue with the [application onboarding process](#application-onboarding).
</TabItem>
</Tabs>

View file

@ -1,5 +0,0 @@
import Icon from "@site/src/components/icon/icon";
When using the OpenRAG **Chat**, click <Icon name="Plus" aria-hidden="true"/> **Add** in the chat input field to upload a file to the current chat session.
Files added this way are processed and made available to the agent for the current conversation only.
These files aren't stored in the knowledge base permanently.

View file

@ -1,91 +0,0 @@
---
title: Use Langflow in OpenRAG
slug: /agents
---
import Icon from "@site/src/components/icon/icon";
OpenRAG includes a built-in [Langflow](https://docs.langflow.org/) instance for creating and managing functional application workflows called _flows_.
In a flow, the individual workflow steps are represented by [_components_](https://docs.langflow.org/concepts-components) that are connected together to form a complete process.
OpenRAG includes several built-in flows:
* The [**OpenRAG OpenSearch Agent** flow](/chat#flow) powers the **Chat** feature in OpenRAG.
* The [**OpenSearch Ingestion** and **OpenSearch URL Ingestion** flows](/ingestion) process documents and web content for storage in your OpenSearch knowledge base.
* The [**OpenRAG OpenSearch Nudges** flow](/chat#nudges) provides optional contextual suggestions in the OpenRAG **Chat**.
You can customize these flows and create your own flows using OpenRAG's embedded Langflow visual editor.
## Inspect and modify flows {#inspect-and-modify-flows}
All OpenRAG flows are designed to be modular, performant, and provider-agnostic.
To view and modify a flow in OpenRAG, click <Icon name="Settings2" aria-hidden="true"/> **Settings**.
From here, you can manage OAuth connectors, model providers, and common parameters for the **Agent** and **Knowledge Ingestion** flows.
To further explore and edit flows, click **Edit in Langflow** to launch the embedded [Langflow visual editor](https://docs.langflow.org/concepts-overview) where you can fully [customize the flow](https://docs.langflow.org/concepts-flows) to suit your use case.
:::tip
After you click **Edit in Langflow**, you can access and edit all of OpenRAG's built-in flows from the Langflow editor's [**Projects** page](https://docs.langflow.org/concepts-flows#projects).
If you edit any flows other than the **Agent** or **Knowledge Ingestion** flows, it is recommended that you [export the flows](https://docs.langflow.org/concepts-flows-import) before editing so you can revert them to their original state if needed.
:::
For example, the following steps explain how to edit the built-in **Agent** flow, which is the **OpenRAG OpenSearch Agent** flow used for the OpenRAG <Icon name="MessageSquare" aria-hidden="true"/> **Chat**:
1. In OpenRAG, click <Icon name="Settings2" aria-hidden="true"/> **Settings**, and then find the **Agent** section.
2. If you only need to edit the language model or agent instructions, edit those fields directly on the **Settings** page.
Language model changes are saved automatically.
To apply new instructions, click **Save Agent Instructions**.
3. To edit all flow settings and components with full customization capabilities, click **Edit in Langflow** to launch the Langflow visual editor in a new browser tab.
If prompted to acknowledge that you are entering Langflow, click **Proceed**.
If Langflow requests login information, enter the `LANGFLOW_SUPERUSER` and `LANGFLOW_SUPERUSER_PASSWORD` from your [OpenRAG `.env` file](/reference/configuration).
![OpenRAG OpenSearch Agent flow](/img/opensearch-agent-flow.png)
4. Modify the flow as desired, and then press <kbd>Command</kbd>+<kbd>S</kbd> (<kbd>Ctrl</kbd>+<kbd>S</kbd>) to save your changes.
You can close the Langflow browser tab, or leave it open if you want to continue experimenting with the flow editor.
5. After you modify any **Agent** flow settings, go to the OpenRAG <Icon name="MessageSquare" aria-hidden="true"/> **Chat**, and then click <Icon name="Plus" aria-hidden="true"/> **Start new conversation** in the **Conversations** list.
This ensures that the chat doesn't persist any context from the previous conversation with the original flow settings.
### Revert a built-in flow to its original configuration {#revert-a-built-in-flow-to-its-original-configuration}
After you edit the **Agent** or **Knowledge Ingestion** built-in flows, you can click **Restore flow** on the **Settings** page to revert either flow to its original state when you first installed OpenRAG.
This is a destructive action that discards all customizations to the flow.
This option isn't available for other built-in flows such as the **Nudges** flow.
To restore these flows to their original state, you must reimport the flow from a backup (if you exported one before editing), or [reset](/manage-services#reset-containers) or [reinstall](/reinstall) OpenRAG.
## Build custom flows and use other Langflow functionality
In addition to OpenRAG's built-in flows, all Langflow features are available through OpenRAG, including the ability to [create your own flows](https://docs.langflow.org/concepts-flows) and popular extensibility features such as the following:
* [Create custom components](https://docs.langflow.org/components-custom-components).
* Integrate with many third-party services through [bundles](https://docs.langflow.org/components-bundle-components).
* Use [MCP clients](https://docs.langflow.org/mcp-client) and [MCP servers](https://docs.langflow.org/mcp-server), and serve flows as MCP tools for your agentic flows.
Explore the [Langflow documentation](https://docs.langflow.org/) to learn more about the Langflow platform, features, and visual editor.
## Modify a flow at runtime {#modify-a-flow-at-runtime}
You can use _tweaks_ to modify flow settings at runtime without permanently changing the flow's configuration.
Tweaks are one-time parameter modifications that are passed to specific Langflow components during flow execution.
For more information on tweaks, see the Langflow documentation on [Input schema (tweaks)](https://docs.langflow.org/concepts-publish#input-schema).
## Set the Langflow version
By default, OpenRAG is pinned to the latest Langflow Docker image for stability.
If necessary, you can set a specific Langflow version with the `LANGFLOW_VERSION` [environment variable](/reference/configuration). However, there are risks to changing this setting:
* The [Langflow documentation](https://docs.langflow.org/) describes the functionality present in the latest release of the Langflow OSS Python package. If your `LANGFLOW_VERSION` is different, the Langflow documentation might not align with the features and default settings in your OpenRAG installation.
* Components might break, including components in OpenRAG's built-in flows.
* Default settings and behaviors might change causing unexpected results when OpenRAG expects a newer default.

View file

@ -1,116 +0,0 @@
---
title: Chat in OpenRAG
slug: /chat
---
import Icon from "@site/src/components/icon/icon";
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import PartialIntegrateChat from '@site/docs/_partial-integrate-chat.mdx';
import PartialTempKnowledge from '@site/docs/_partial-temp-knowledge.mdx';
After you [upload documents to your knowledge base](/ingestion), you can use the OpenRAG <Icon name="MessageSquare" aria-hidden="true"/> **Chat** feature to interact with your knowledge through natural language queries.
The OpenRAG <Icon name="MessageSquare" aria-hidden="true"/> **Chat** uses an LLM-powered agent to understand your queries, retrieve relevant information from your knowledge base, and generate context-aware responses.
The agent can also fetch information from URLs and new documents that you provide during the chat session.
To limit the knowledge available to the agent, use [filters](/knowledge-filters).
The agent can call specialized Model Context Protocol (MCP) tools to extend its capabilities.
To add or change the available tools, you must edit the [**OpenRAG OpenSearch Agent** flow](#flow).
:::tip
Try chatting, uploading documents, and modifying chat settings in the [quickstart](/quickstart).
:::
## OpenRAG OpenSearch Agent flow {#flow}
When you use the OpenRAG <Icon name="MessageSquare" aria-hidden="true"/> **Chat**, the **OpenRAG OpenSearch Agent** flow runs in the background to retrieve relevant information from your knowledge base and generate a response.
If you [inspect the flow in Langflow](/agents#inspect-and-modify-flows), you'll see that it is comprised of eight components that work together to ingest chat messages, retrieve relevant information from your knowledge base, and then generate responses.
When you inspect this flow, you can edit the components to customize the agent's behavior.
![OpenRAG Open Search Agent Flow](/img/opensearch-agent-flow.png)
* [**Chat Input** component](https://docs.langflow.org/chat-input-and-output#chat-input): This component starts the flow when it receives a chat message. It is connected to the **Agent** component's **Input** port.
When you use the OpenRAG <Icon name="MessageSquare" aria-hidden="true"/> **Chat**, your chat messages are passed to the **Chat Input** component, which then sends them to the **Agent** component for processing.
* [**Agent** component](https://docs.langflow.org/components-agents): This component orchestrates the entire flow by processing chat messages, searching the knowledge base, and organizing the retrieved information into a cohesive response.
The agent's general behavior is defined by the prompt in the **Agent Instructions** field and the model connected to the **Language Model** port.
One or more specialized tools can be attached to the **Tools** port to extend the agent's capabilities. In this case, there are two tools: **MCP Tools** and **OpenSearch**.
The **Agent** component is the star of this flow because it powers decision making, tool calling, and an LLM-driven conversational experience.
<details>
<summary>How do agents work?</summary>
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.
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.
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.
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.
</details>
* [**Language Model** component](https://docs.langflow.org/components-models): Connected to the **Agent** component's **Language Model** port, this component provides the base language model driver for the agent. The agent cannot function without a model because the model is used for general knowledge, reasoning, and generating responses.
Different models can change the style and content of the agent's responses, and some models might be better suited for certain tasks than others. If the agent doesn't seem to be handling requests well, try changing the model to see how the responses change. For example, fast models might be good for simple queries, but they might not have the depth of reasoning for complex, multi-faceted queries.
* [**MCP Tools** component](https://docs.langflow.org/mcp-client): Connected to the **Agent** component's **Tools** port, this component can be used to [access any MCP server](https://docs.langflow.org/mcp-server) and the MCP tools provided by that server. In this case, your OpenRAG Langflow instance's [**Starter Project**](https://docs.langflow.org/concepts-flows#projects) is the MCP server, and the [**OpenSearch URL Ingestion** flow](/ingestion#url-flow) is the MCP tool.
This flow fetches content from URLs, and then stores the content in your OpenRAG OpenSearch knowledge base. By serving this flow as an MCP tool, the agent can selectively call this tool if a URL is detected in the chat input.
* [**OpenSearch** component](https://docs.langflow.org/bundles-elastic#opensearch): Connected to the **Agent** component's **Tools** port, this component lets the agent search your [OpenRAG OpenSearch knowledge base](/knowledge). The agent might not use this database for every request; the agent uses this connection only if it decides that documents in your knowledge base are relevant to your query.
* [**Embedding Model** component](https://docs.langflow.org/components-embedding-models): Connected to the **OpenSearch** component's **Embedding** port, this component generates embeddings from chat input that are used in [similarity search](https://www.ibm.com/think/topics/vector-search) to find content in your knowledge base that is relevant to the chat input. The agent uses this information to generate context-aware responses that are specialized for your data.
It is critical that the embedding model used here matches the embedding model used when you [upload documents to your knowledge base](/ingestion). Mismatched models and dimensions can degrade the quality of similarity search results causing the agent to retrieve irrelevant documents from your knowledge base.
* [**Text Input** component](https://docs.langflow.org/text-input-and-output#text-input): Connected to the **OpenSearch** component's **Search Filters** port, this component is populated with a Langflow global variable named `OPENRAG-QUERY-FILTER`. If a global or chat-level [knowledge filter](/knowledge-filters) is set, then the variable contains the filter expression, which limits the documents that the agent can access in the knowledge base.
If no knowledge filter is set, then the `OPENRAG-QUERY-FILTER` variable is empty, and the agent can access all documents in the knowledge base.
* [**Chat Output** component](https://docs.langflow.org/chat-input-and-output#chat-output): Connected to the **Agent** component's **Output** port, this component returns the agent's generated response as a chat message.
## Nudges {#nudges}
When you use the OpenRAG <Icon name="MessageSquare" aria-hidden="true"/> **Chat**, the **OpenRAG OpenSearch Nudges** flow runs in the background to pull additional context from your knowledge base and chat history.
Nudges appear as prompts in the chat, and they are based on the contents of your OpenRAG OpenSearch knowledge base.
Click a nudge to accept it and start a chat based on the nudge.
Like OpenRAG's other built-in flows, you can [inspect the flow in Langflow](/agents#inspect-and-modify-flows), and you can customize it if you want to change the nudge behavior.
However, this flow is specifically designed to work with the OpenRAG chat and knowledge base.
Major changes to this flow might break the nudge functionality or produce irrelevant nudges.
The **Nudges** flow consists of **Embedding model**, **Language model**, **OpenSearch**, **Input/Output*, and other components that browse your knowledge base, identify key themes and possible insights, and then produce prompts based on the findings.
For example, if your knowledge base contains documents about cybersecurity, possible nudges might include `Explain zero trust architecture principles` or `How to identify a social engineering attack`.
## Upload documents to the chat
<PartialTempKnowledge />
## Inspect tool calls and knowledge
During the chat, you'll see information about the agent's process. For more detail, you can inspect individual tool calls. This is helpful for troubleshooting because it shows you how the agent used particular tools. For example, click <Icon name="Gear" aria-hidden="true"/> **Function Call: search_documents (tool_call)** to view the log of tool calls made by the agent to the **OpenSearch** component.
If documents in your knowledge base seem to be missing or interpreted incorrectly, see [Troubleshoot ingestion](/ingestion#troubleshoot-ingestion).
If tool calls and knowledge appear normal, but the agent's responses seem off-topic or incorrect, consider changing the agent's language model or prompt, as explained in [Inspect and modify flows](/agents#inspect-and-modify-flows).
## Integrate OpenRAG chat into an application
You can integrate OpenRAG flows into your applications using the [Langflow API](https://docs.langflow.org/api-reference-api-examples).
To simplify this integration, you can get pre-configured code snippets directly from the embedded Langflow visual editor.
The following example demonstrates how to generate and use code snippets for the **OpenRAG OpenSearch Agent** flow:
<PartialIntegrateChat />
## Troubleshoot chat {#troubleshoot-chat}
The following issues can occur when using the OpenRAG **Chat** feature:
* Documents seem to be missing or interpreted incorrectly: See [Troubleshoot ingestion](/ingestion#troubleshoot-ingestion).
* Service is suddenly unavailable when it was working previously: If there is no other obvious cause, such as the service or container VM being stopped or disconnected, there might be a problem with the flow configuration. Use the [**Restore flow** option](/agents#revert-a-built-in-flow-to-its-original-configuration) to revert the **OpenRAG OpenSearch Agent** flow to its original configuration.
If you made customizations to the flow, make sure to [export your flow](https://docs.langflow.org/concepts-flows-import) before restoring the flow.

View file

@ -1,292 +0,0 @@
---
title: Ingest knowledge
slug: /ingestion
---
import Icon from "@site/src/components/icon/icon";
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import PartialTempKnowledge from '@site/docs/_partial-temp-knowledge.mdx';
import PartialIngestionFlow from '@site/docs/_partial-ingestion-flow.mdx';
import PartialDockerComposeUp from '@site/docs/_partial-docker-compose-up.mdx';
import PartialDockerStopAll from '@site/docs/_partial-docker-stop-all.mdx';
Upload documents to your [OpenRAG OpenSearch instance](/knowledge) to populate your knowledge base with unique content, such as your own company documents, research papers, or websites.
Documents are processed through OpenRAG's knowledge ingestion flows with Docling.
OpenRAG can ingest knowledge from direct file uploads, URLs, and OAuth authenticated connectors.
Knowledge ingestion is powered by OpenRAG's built-in knowledge ingestion flows that use Docling to process documents before storing the documents in your OpenSearch database.
During ingestion, documents are broken into smaller chunks of content that are then embedded using your selected [embedding model](/knowledge#set-the-embedding-model-and-dimensions).
Then, the chunks, embeddings, and associated metadata (which connects chunks of the same document) are stored in your OpenSearch database.
To modify chunking behavior and other ingestion settings, see [Knowledge ingestion settings](/knowledge#knowledge-ingestion-settings) and [Inspect and modify flows](/agents#inspect-and-modify-flows).
## Ingest local files and folders
You can upload files and folders from your local machine to your knowledge base:
1. Click <Icon name="Library" aria-hidden="true"/> **Knowledge** to view your OpenSearch knowledge base.
2. Click **Add Knowledge** to add your own documents to your OpenRAG knowledge base.
3. To upload one file, click <Icon name="File" aria-hidden="true"/> **File**. To upload all documents in a folder, click <Icon name="Folder" aria-hidden="true"/> **Folder**.
The default path is `~/.openrag/documents`.
To change this path, see [Set the local documents path](/knowledge#set-the-local-documents-path).
The selected files are processed in the background through the **OpenSearch Ingestion** flow.
<PartialIngestionFlow />
You can [monitor ingestion](#monitor-ingestion) to see the progress of the uploads and check for failed uploads.
## Ingest local files temporarily
<PartialTempKnowledge />
## Ingest files with OAuth connectors {#oauth-ingestion}
OpenRAG can use OAuth authenticated connectors to ingest documents from the following external services:
* AWS S3
* Google Drive
* Microsoft OneDrive
* Microsoft Sharepoint
These connectors enable seamless ingestion of files from cloud storage to your OpenRAG knowledge base.
Individual users can connect their personal cloud storage accounts to OpenRAG. Each user must separately authorize OpenRAG to access their own cloud storage. When a user connects a cloud storage service, they are redirected to authenticate with that service provider and grant OpenRAG permission to sync documents from their personal cloud storage.
### Enable OAuth connectors
Before users can connect their own cloud storage accounts, you must configure the provider's OAuth credentials in OpenRAG. Typically, this requires that you register OpenRAG as an OAuth application in your cloud provider, and then obtain the app's OAuth credentials, such as a client ID and secret key.
To enable multiple connectors, you must register an app and generate credentials for each provider.
<Tabs>
<TabItem value="TUI" label="TUI-managed services" default>
If you use the [Terminal User Interface (TUI)](/tui) to manage your OpenRAG services, enter OAuth credentials on the **Advanced Setup** page.
You can do this during [installation](/install#setup), or you can add the credentials afterwards:
1. If OpenRAG is running, click **Stop All Services** in the TUI.
2. Open the **Advanced Setup** page, and then add the OAuth credentials for the cloud storage providers that you want to use under **API Keys**:
* **Google**: Provide your Google OAuth Client ID and Google OAuth Client Secret. You can generate these in the [Google Cloud Console](https://console.cloud.google.com/apis/credentials). For more information, see the [Google OAuth client documentation](https://developers.google.com/identity/protocols/oauth2).
* **Microsoft**: For the Microsoft OAuth Client ID and Microsoft OAuth Client Secret, provide [Azure application registration credentials for SharePoint and OneDrive](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/app-registration?view=odsp-graph-online). For more information, see the [Microsoft Graph OAuth client documentation](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/graph-oauth).
* **Amazon**: Provide your AWS Access Key ID and AWS Secret Access Key with access to your S3 instance. For more information, see the AWS documentation on [Configuring access to AWS applications](https://docs.aws.amazon.com/singlesignon/latest/userguide/manage-your-applications.html).
3. Register the redirect URIs shown in the TUI in your OAuth provider.
These are the URLs your OAuth provider will use to redirect users back to OpenRAG after they sign in.
4. Click **Save Configuration** to add the OAuth credentials to your [OpenRAG `.env` file](/reference/configuration).
5. Click **Start Services** to restart the OpenRAG containers with OAuth enabled.
6. Launch the OpenRAG app.
You should be prompted to sign in to your OAuth provider before being redirected to your OpenRAG instance.
</TabItem>
<TabItem value="env" label="Self-managed services">
If you [installed OpenRAG with self-managed services](/docker), set OAuth credentials in your [OpenRAG `.env` file](/reference/configuration).
You can do this during [initial set up](/docker#setup), or you can add the credentials afterwards:
1. Stop all OpenRAG containers:
<PartialDockerStopAll />
2. Edit your OpenRAG `.env` file to add the OAuth credentials for the cloud storage providers that you want to use:
* **Google**: Provide your Google OAuth Client ID and Google OAuth Client Secret. You can generate these in the [Google Cloud Console](https://console.cloud.google.com/apis/credentials). For more information, see the [Google OAuth client documentation](https://developers.google.com/identity/protocols/oauth2).
```env
GOOGLE_OAUTH_CLIENT_ID=
GOOGLE_OAUTH_CLIENT_SECRET=
```
* **Microsoft**: For the Microsoft OAuth Client ID and Microsoft OAuth Client Secret, provide [Azure application registration credentials for SharePoint and OneDrive](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/app-registration?view=odsp-graph-online). For more information, see the [Microsoft Graph OAuth client documentation](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/graph-oauth).
```env
MICROSOFT_GRAPH_OAUTH_CLIENT_ID=
MICROSOFT_GRAPH_OAUTH_CLIENT_SECRET=
```
* **Amazon**: Provide your AWS Access Key ID and AWS Secret Access Key with access to your S3 instance. For more information, see the AWS documentation on [Configuring access to AWS applications](https://docs.aws.amazon.com/singlesignon/latest/userguide/manage-your-applications.html).
```env
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
```
3. Save the `.env` file.
4. Restart your OpenRAG containers:
<PartialDockerComposeUp />
5. Access the OpenRAG frontend at `http://localhost:3000`.
You should be prompted to sign in to your OAuth provider before being redirected to your OpenRAG instance.
</TabItem>
</Tabs>
### Authenticate and ingest files from cloud storage
After you start OpenRAG with OAuth connectors enabled, each user is prompted to authenticate with the OAuth provider upon accessing your OpenRAG instance.
Individual authentication is required to access a user's cloud storage from your OpenRAG instance.
For example, if a user navigates to the default OpenRAG URL at `http://localhost:3000`, they are redirected to the OAuth provider's sign-in page.
After authenticating and granting the required permissions for OpenRAG, the user is redirected back to OpenRAG.
To ingest knowledge with an OAuth connector, do the following:
1. Click <Icon name="Library" aria-hidden="true"/> **Knowledge** to view your OpenSearch knowledge base.
2. Click **Add Knowledge**, and then select a storage provider.
3. On the **Add Cloud Knowledge** page, click **Add Files**, and then select the files and folders to ingest from the connected storage.
4. Click **Ingest Files**.
The selected files are processed in the background through the **OpenSearch Ingestion** flow.
<PartialIngestionFlow />
You can [monitor ingestion](#monitor-ingestion) to see the progress of the uploads and check for failed uploads.
## Ingest knowledge from URLs {#url-flow}
When using the OpenRAG chat, you can enter URLs into the chat to be ingested in real-time during your conversation.
:::info
The chat cannot ingest URLs that end in static document file extensions like `.pdf`.
To upload these types of files, see [Ingest local files and folders](#ingest-local-files-and-folders) and [Ingest files with OAuth connectors](#oauth-ingestion).
:::
OpenRAG runs the **OpenSearch URL Ingestion** flow to ingest web content from URLs.
This flow isn't directly accessible from the OpenRAG user interface.
Instead, this flow is called by the [**OpenRAG OpenSearch Agent** flow](/chat#flow) as a Model Context Protocol (MCP) tool.
The agent can call this component to fetch web content from a given URL, and then ingest that content into your OpenSearch knowledge base.
Like all OpenRAG flows, you can [inspect the flow in Langflow](/agents#inspect-and-modify-flows), and you can customize it.
For more information about MCP in Langflow, see the Langflow documentation on [MCP clients](https://docs.langflow.org/mcp-client) and [MCP servers](https://docs.langflow.org/mcp-tutorial).
## Monitor ingestion {#monitor-ingestion}
Depending on the amount of data to ingest, document ingestion can take a few seconds, minutes, or longer.
For this reason, document ingestion tasks run in the background.
In the OpenRAG user interface, a badge is shown on <Icon name="Bell" aria-hidden="true"/> **Tasks** when OpenRAG tasks are active.
Click <Icon name="Bell" aria-hidden="true"/> **Tasks** to inspect and cancel tasks.
Tasks are separated into multiple sections:
* The **Active Tasks** section includes all tasks that are **Pending**, **Running**, or **Processing**:
* **Pending**: The task is queued and waiting to start.
* **Running**: The task is actively processing files.
* **Processing**: The task is performing ingestion operations.
To stop an active task, click <Icon name="X" aria-hidden="true"/> **Cancel**. Canceling a task stops processing immediately and marks the ingestion as failed.
* The **Recent Tasks** section lists recently finished tasks.
:::warning
**Completed** doesn't mean success.
A completed task can report successful ingestions, failed ingestions, or both, depending on the number of files processed.
:::
Check the **Success** and **Failed** counts for each completed task to determine the overall success rate.
**Failed** means something went wrong during ingestion, or the task was manually canceled.
For more information, see [Troubleshoot ingestion](#troubleshoot-ingestion).
For each task, depending on its state, you can find the task ID, start time, duration, number of files processed successfully, number of files that failed, and the number of files enqueued for processing.
### Ingestion performance expectations
The following performance test was conducted with Docling Serve.
On a local VM with 7 vCPUs and 8 GiB RAM, OpenRAG ingested approximately 5.03 GB across 1,083 files in about 42 minutes.
This equates to approximately 2.4 documents per second.
You can generally expect equal or better performance on developer laptops, and significantly faster performance on servers.
Throughput scales with CPU cores, memory, storage speed, and configuration choices, such as the embedding model, chunk size, overlap, and concurrency.
This test returned 12 error, approximately 1.1 percent of the total files ingested.
All errors were file-specific, and they didn't stop the pipeline.
<details>
<summary>Ingestion performance test details</summary>
* Ingestion dataset:
* Total files: 1,083 items mounted
* Total size on disk: 5,026,474,862 bytes (approximately 5.03 GB)
* Hardware specifications:
* Machine: Apple M4 Pro
* Podman VM:
* Name: podman-machine-default
* Type: applehv
* vCPUs: 7
* Memory: 8 GiB
* Disk size: 100 GiB
* Test results:
```text
2025-09-24T22:40:45.542190Z /app/src/main.py:231 Ingesting default documents when ready disable_langflow_ingest=False
2025-09-24T22:40:45.546385Z /app/src/main.py:270 Using Langflow ingestion pipeline for default documents file_count=1082
...
2025-09-24T23:19:44.866365Z /app/src/main.py:351 Langflow ingestion completed success_count=1070 error_count=12 total_files=1082
```
* Elapsed time: Approximately 42 minutes 15 seconds (2,535 seconds)
* Throughput: Approximately 2.4 documents per second
</details>
## Troubleshoot ingestion {#troubleshoot-ingestion}
The following issues can occur during document ingestion.
### Failed or slow ingestion
If an ingestion task fails, do the following:
* Make sure you uploaded only supported file types.
* Split very large files into smaller files.
* Remove unusual or complex embedded content, such as videos or animations. Although Docling can replace some non-text content with placeholders during ingestion, some embedded content might cause errors.
* Make sure your Podman/Docker VM has sufficient memory for the ingestion tasks.
The minimum recommendation is 8 GB of RAM.
If you regularly upload large files, more RAM is recommended.
For more information, see [Memory issue with Podman on macOS](/support/troubleshoot#memory-issue-with-podman-on-macos) and [Container out of memory errors](/support/troubleshoot#container-out-of-memory-errors).
* If OCR ingestion fails due to OCR missing, see [OCR ingestion fails (easyocr not installed)](/support/troubleshoot#ocr-ingestion-fails-easyocr-not-installed).
### Problems when referencing documents in chat
If the OpenRAG **Chat** doesn't seem to use your documents correctly, [browse your knowledge base](/knowledge#browse-knowledge) to confirm that the documents are uploaded in full, and the chunks are correct.
If the documents are present and well-formed, check your [knowledge filters](/knowledge-filters).
If you applied a filter to the chat, make sure the expected documents aren't excluded by the filter settings.
You can test this by applying the filter when you [browse the knowledge base](/knowledge#browse-knowledge).
If the filter excludes any documents, the agent cannot access those documents.
Be aware that some settings create dynamic filters that don't always produce the same results, such as a **Search query** combined with a low **Response limit**.
If the document chunks have missing, incorrect, or unexpected text, you must [delete the documents](/knowledge#delete-knowledge) from your knowledge base, modify the [ingestion parameters](/knowledge#knowledge-ingestion-settings) or the documents themselves, and then reingest the documents.
For example:
* Break combined documents into separate files for better metadata context.
* Make sure scanned documents are legible enough for extraction, and enable the **OCR** option. Poorly scanned documents might require additional preparation or rescanning before ingestion.
* Adjust the **Chunk size** and **Chunk overlap** settings to better suit your documents. Larger chunks provide more context but can include irrelevant information, while smaller chunks yield more precise semantic search but can lack context.
## See also
* [Configure knowledge](/knowledge)
* [Filter knowledge](/knowledge-filters)
* [Chat with knowledge](/chat)
* [Inspect and modify flows](/agents#inspect-and-modify-flows)

View file

@ -1,87 +0,0 @@
---
title: Filter knowledge
slug: /knowledge-filters
---
import Icon from "@site/src/components/icon/icon";
import PartialAnonymousUserOwner from '@site/docs/_partial-anonymous-user-owner.mdx';
OpenRAG's knowledge filters help you organize and manage your [knowledge base](/knowledge) by creating pre-defined views of your documents.
Each knowledge filter captures a specific subset of documents based on given a search query and filters.
Knowledge filters can be used with different OpenRAG functionality.
For example, knowledge filters can help agents access large knowledge bases efficiently by narrowing the scope of documents that you want the agent to use.
## Built-in filters
When you install OpenRAG, it automatically creates an **OpenRAG docs** filter that includes OpenRAG's default documents.
These documents provide information about OpenRAG itself and help you learn how to use OpenRAG.
When you use the OpenRAG <Icon name="MessageSquare" aria-hidden="true"/> **Chat**, [apply the **OpenRAG docs** filter](#apply-a-filter) if you want to ask questions about OpenRAG's features and functionality.
This limits the agent's context to the default OpenRAG documentation rather than all documents in your knowledge base.
After uploading your own documents, it is recommended that you create your own filters to organize your documents effectively and separate them from the default OpenRAG documents.
## Create a filter
To create a knowledge filter, do the following:
1. Click <Icon name="Library" aria-hidden="true"/> **Knowledge**, and then click <Icon name="Plus" aria-hidden="true"/> **Knowledge Filters**.
2. Enter a **Name**.
3. Optional: Click the filter icon next to the filter name to select a different icon and color for the filter.
This is purely cosmetic, but it can help you visually distinguish different sets of filters, such as different projects or sources.
4. Optional: Enter a **Description**.
5. Customize the filter settings.
By default, filters match all documents in your knowledge base.
Use the filter settings to narrow the scope of documents that the filter captures:
* **Search Query**: Enter a natural language text string for semantic search.
When you apply a filter that has a **Search Query**, only documents matching the search query are included.
It is recommended that you also use the **Score Threshold** setting to avoid returning irrelevant documents.
* **Data Sources**: Select specific files and folders to include in the filter.
This is useful if you want to create a filter for a specific project or topic and you know the specific documents you want to include.
Similarly, if you upload a folder of documents or enable an OAuth connector, you might want to create a filter that only includes the documents from that source.
* **Document Types**: Filter by file type.
* **Owners**: Filter by the user that uploaded the documents.
<PartialAnonymousUserOwner />
* **Connectors**: Filter by [upload source](/ingestion), such as the local file system or an OAuth connector.
* **Response Limit**: Set the maximum number of results to return from the knowledge base. The default is `10`, which means the filter returns only the top 10 most relevant documents.
* **Score Threshold**: Set the minimum relevance score for similarity search. The default score is `0`. A threshold is recommended to avoid returned irrelevant documents.
6. Click **Create Filter**.
## Edit a filter
To modify a filter, click <Icon name="Library" aria-hidden="true"/> **Knowledge**, and then click the filter you want to edit in the **Knowledge Filters** list.
On the filter settings pane, edit the filter as desired, and then click **Update Filter**.
## Apply a filter {#apply-a-filter}
In the OpenRAG <Icon name="MessageSquare" aria-hidden="true"/> **Chat**, click <Icon name="Funnel" aria-hidden="true"/> **Filter**, and then select the filter to apply.
Chat filters apply to one chat session only.
You can also use filters when [browsing your knowledge base](/knowledge#browse-knowledge).
This is a helpful way to test filters and manage knowledge bases that have many documents.
## Delete a filter
1. Click <Icon name="Library" aria-hidden="true"/> **Knowledge**.
2. In the **Knowledge Filters** list, click the filter that you want to delete.
3. In the filter settings pane, click **Delete Filter**.

View file

@ -1,216 +0,0 @@
---
title: Configure knowledge
slug: /knowledge
---
import Icon from "@site/src/components/icon/icon";
import PartialOpenSearchAuthMode from '@site/docs/_partial-opensearch-auth-mode.mdx';
import PartialAnonymousUserOwner from '@site/docs/_partial-anonymous-user-owner.mdx';
OpenRAG includes a built-in [OpenSearch](https://docs.opensearch.org/latest/) instance that serves as the underlying datastore for your _knowledge_ (documents).
This specialized database is used to store and retrieve your documents and the associated vector data (embeddings).
The documents in your OpenSearch knowledge base provide specialized context in addition to the general knowledge available to the language model that you select when you [install OpenRAG](/install-options) or [edit a flow](/agents).
You can [upload documents](/ingestion) from a variety of sources to populate your knowledge base with unique content, such as your own company documents, research papers, or websites.
Documents are processed through OpenRAG's knowledge ingestion flows with Docling.
Then, the [OpenRAG **Chat**](/chat) can run [similarity searches](https://www.ibm.com/think/topics/vector-search) against your OpenSearch database to retrieve relevant information and generate context-aware responses.
You can configure how documents are ingested and how the **Chat** interacts with your knowledge base.
## Browse knowledge {#browse-knowledge}
The **Knowledge** page lists the documents OpenRAG has ingested into your OpenSearch database, specifically in an [OpenSearch index](https://docs.opensearch.org/latest/getting-started/intro/#index) named `documents`.
To explore the raw contents of your knowledge base, click <Icon name="Library" aria-hidden="true"/> **Knowledge** to get a list of all ingested documents.
### Inspect knowledge
For each document, the **Knowledge** page provides the following information:
* **Source**: Name of the ingested content, such as the file name.
* **Size**
* **Type**
* **Owner**: User that uploaded the document.
<PartialAnonymousUserOwner />
* **Chunks**: Number of chunks created by splitting the document during ingestion.
Click a document to view the individual chunks and technical details related to chunking.
If the chunks seem incorrect or incomplete, see [Troubleshoot ingestion](/ingestion#troubleshoot-ingestion).
* **Avg score**: Average similarity score across all chunks of the document.
If you [search the knowledge base](#search-knowledge), the **Avg score** column shows the similarity score for your search query or filter.
* **Embedding model** and **Dimensions**: The embedding model and dimensions used to embed the chunks.
* **Status**: Status of document ingestion.
If ingestion is complete and successful, then the status is **Active**.
For more information, see [Monitor ingestion](/ingestion#monitor-ingestion).
### Search knowledge {#search-knowledge}
You can use the search field on the **Knowledge** page to find documents using semantic search and knowledge filters:
To search all documents, enter a search string in the search field, and then press <kbd>Enter</kbd>.
To apply a [knowledge filter](/knowledge-filters), select the filter from the **Knowledge Filters** list.
The filter settings pane opens, and the filter appears in the search field.
To remove the filter, close the filter settings pane or clear the filter from the search field.
You can use the filter alone or in combination with a search string.
If a knowledge filter has a **Search Query**, that query is applied in addition to any text string you enter in the search field.
Only one filter can be applied at a time.
### Default documents {#default-documents}
By default, OpenRAG includes some initial documents about OpenRAG.
These documents are ingested automatically during the [application onboarding process](/install#application-onboarding).
You can use these documents to ask OpenRAG about itself, or to test the [**Chat**](/chat) feature before uploading your own documents.
If you [delete these documents](#delete-knowledge), then you won't be able to ask OpenRAG about itself and it's own functionality.
It is recommended that you keep these documents, and use [filters](/knowledge-filters) to separate them from your other knowledge.
An **OpenRAG Docs** filter is created automatically for these documents.
## OpenSearch authentication and document access {#auth}
When you [install OpenRAG](/install-options), you provide the initial configuration values for your OpenRAG services, including authentication credentials for OpenSearch and OAuth connectors.
This configuration determines how OpenRAG authenticates with your deployment's OpenSearch instance, and it controls user access to documents in your knowledge base:
<PartialOpenSearchAuthMode />
## OpenSearch indexes
An [OpenSearch index](https://docs.opensearch.org/latest/getting-started/intro/#index) is a collection of documents in an OpenSearch database.
By default, all documents you upload to your OpenRAG knowledge base are stored in an index named `documents`.
It is possible to change the index name by [editing the ingestion flow](/agents#inspect-and-modify-flows).
However, this can impact dependent processes, such as the [filters](/knowledge-filters) and [**Chat**](/chat), that reference the `documents` index by default.
Make sure you edit other flows as needed to ensure all processes use the same index name.
If you encounter errors or unexpected behavior after changing the index name, you can [revert the flows to their original configuration](/agents#revert-a-built-in-flow-to-its-original-configuration), or [delete knowledge](/knowledge#delete-knowledge) to clear the existing documents from your knowledge base.
## Knowledge ingestion settings {#knowledge-ingestion-settings}
:::warning
Knowledge ingestion settings apply to documents you upload after making the changes.
Documents uploaded before changing these settings aren't reprocessed.
:::
After changing knowledge ingestion settings, you must determine if you need to reupload any documents to be consistent with the new settings.
It isn't always necessary to reupload documents after changing knowledge ingestion settings.
For example, it is typical to upload some documents with OCR enabled and others without OCR enabled.
If needed, you can use [filters](/knowledge-filters) to separate documents that you uploaded with different settings, such as different embedding models.
### Set the embedding model and dimensions {#set-the-embedding-model-and-dimensions}
When you [install OpenRAG](/install-options), you select at least one embedding model during the [application onboarding process](/install#application-onboarding).
OpenRAG automatically detects and configures the appropriate vector dimensions for your selected embedding model, ensuring optimal search performance and compatibility.
In the OpenRAG repository, you can find the complete list of supported models in [`models_service.py`](https://github.com/langflow-ai/openrag/blob/main/src/services/models_service.py) and the corresponding vector dimensions in [`settings.py`](https://github.com/langflow-ai/openrag/blob/main/src/config/settings.py).
During the application onboarding process, you can select from the supported models.
The default embedding dimension is `1536`, and the default model is the OpenAI `text-embedding-3-small`.
If you want to use an unsupported model, you must manually set the model in your [OpenRAG `.env` file](/reference/configuration).
If you use an unsupported embedding model that doesn't have defined dimensions in `settings.py`, then OpenRAG falls back to the default dimensions (1536) and logs a warning. OpenRAG's OpenSearch instance and flows continue to work, but [similarity search](https://www.ibm.com/think/topics/vector-search) quality can be affected if the actual model dimensions aren't 1536.
To change the embedding model after onboarding, modify the embedding model configuration on the OpenRAG **Settings** page or in your [OpenRAG `.env` file](/reference/configuration).
This ensures that all relevant [OpenRAG flows](/agents) are updated to use the new embedding model configuration.
If you edit these settings in the `.env` file, you must [stop and restart the OpenRAG containers](/manage-services#stop-and-start-containers) to apply the changes.
### Set Docling parameters
OpenRAG uses [Docling](https://docling-project.github.io/docling/) for document ingestion because it supports many file formats, processes tables and images well, and performs efficiently.
When you [upload documents](/ingestion), Docling processes the files, splits them into chunks, and stores them as separate, structured documents in your OpenSearch knowledge base.
#### Select a Docling implementation {#select-a-docling-implementation}
You can use either Docling Serve or OpenRAG's built-in Docling ingestion pipeline to process documents.
* **Docling Serve ingestion**: By default, OpenRAG uses [Docling Serve](https://github.com/docling-project/docling-serve).
It starts a local `docling serve` process, and then runs Docling ingestion through the Docling Serve API.
To use a remote `docling serve` instance or your own local instance, set `DOCLING_SERVE_URL=http://**HOST_IP**:5001` in your [OpenRAG `.env` file](/reference/configuration#document-processing-settings).
The service must run on port 5001.
* **Built-in Docling ingestion**: If you want to use OpenRAG's built-in Docling ingestion pipeline instead of the separate Docling Serve service, set `DISABLE_INGEST_WITH_LANGFLOW=true` in your [OpenRAG `.env` file](/reference/configuration#document-processing-settings).
The built-in pipeline uses the Docling processor directly instead of through the Docling Serve API.
For the underlying functionality, see [`processors.py`](https://github.com/langflow-ai/openrag/blob/main/src/models/processors.py#L58) in the OpenRAG repository.
#### Configure Docling ingestion settings
To modify the Docling document processing and embedding parameters, click <Icon name="Settings2" aria-hidden="true"/> **Settings** in OpenRAG, and then find the **Knowledge Ingest** section.
:::tip
The TUI warns you if `docling serve` isn't running.
For information about starting and stopping OpenRAG native services, like Docling, see [Manage OpenRAG services](/manage-services).
:::
You can edit the following parameters:
* **Embedding model**: Select the model to use to generate vector embeddings for your documents.
This is initially set during installation.
The recommended way to change this setting is in the OpenRAG <Icon name="Settings2" aria-hidden="true"/> **Settings** or your [OpenRAG `.env` file](/reference/configuration).
This ensures that all relevant [OpenRAG flows](/agents) are updated to use the new embedding model configuration.
If you uploaded documents prior to changing the embedding model, you can [create filters](/knowledge-filters) to separate documents embedded with different models, or you can reupload all documents to regenerate embeddings with the new model.
If you want to use multiple embeddings models, similarity search (in the **Chat**) can take longer as it searches each model's embeddings separately.
* **Chunk size**: Set the number of characters for each text chunk when breaking down a file.
Larger chunks yield more context per chunk, but can include irrelevant information. Smaller chunks yield more precise semantic search, but can lack context.
The default value is 1000 characters, which is usually a good balance between context and precision.
* **Chunk overlap**: Set the number of characters to overlap over chunk boundaries.
Use larger overlap values for documents where context is most important. Use smaller overlap values for simpler documents or when optimization is most important.
The default value is 200 characters, which represents an overlap of 20 percent if the **Chunk size** is 1000. This is suitable for general use. For faster processing, decrease the overlap to approximately 10 percent. For more complex documents where you need to preserve context across chunks, increase it to approximately 40 percent.
* **Table structure**: Enables Docling's [`DocumentConverter`](https://docling-project.github.io/docling/reference/document_converter/) tool for parsing tables. Instead of treating tables as plain text, tables are output as structured table data with preserved relationships and metadata. This option is enabled by default.
* **OCR**: Enables Optical Character Recognition (OCR) processing when extracting text from images and ingesting scanned documents. This setting is best suited for processing text-based documents faster with Docling's [`DocumentConverter`](https://docling-project.github.io/docling/reference/document_converter/). Images are ignored and not processed.
This option is disabled by default. Enabling OCR can slow ingestion performance.
If OpenRAG detects that the local machine is running on macOS, OpenRAG uses the [ocrmac](https://www.piwheels.org/project/ocrmac/) OCR engine. Other platforms use [easyocr](https://www.jaided.ai/easyocr/).
* **Picture descriptions**: Only applicable if **OCR** is enabled. Adds image descriptions generated by the [`SmolVLM-256M-Instruct`](https://huggingface.co/HuggingFaceTB/SmolVLM-Instruct) model. Enabling picture descriptions can slow ingestion performance.
### Set the local documents path {#set-the-local-documents-path}
The default path for local uploads is `~/.openrag/documents`. This is mounted to the `/app/openrag-documents/` directory inside the OpenRAG container. Files added to the host or container directory are visible in both locations.
To change this location, modify the **Documents Paths** variable in either the [**Basic/Advanced Setup** menu](/install#setup) or in your [OpenRAG `.env` file](/reference/configuration).
## Delete knowledge {#delete-knowledge}
:::warning
This is a destructive operation that cannot be undone.
:::
To delete documents from your knowledge base, click <Icon name="Library" aria-hidden="true"/> **Knowledge**, use the checkboxes to select one or more documents, and then click **Delete**.
If you select the checkbox at the top of the list, all documents are selected and your entire knowledge base will be deleted.
To delete an individual document, you can also click <Icon name="Ellipsis" aria-hidden="true"/> **More** next to that document, and then select **Delete**.
To completely clear your entire knowledge base and OpenSearch index, [reset your OpenRAG containers](/manage-services#reset-containers) or [reinstall OpenRAG](/reinstall).
## See also
* [Ingest knowledge](/ingestion)
* [Filter knowledge](/knowledge-filters)
* [Chat with knowledge](/chat)
* [Inspect and modify flows](/agents#inspect-and-modify-flows)

View file

@ -1,176 +0,0 @@
---
title: Deploy OpenRAG with self-managed services
slug: /docker
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import PartialOnboarding from '@site/docs/_partial-onboarding.mdx';
import PartialPrereqCommon from '@site/docs/_partial-prereq-common.mdx';
import PartialPrereqNoScript from '@site/docs/_partial-prereq-no-script.mdx';
import PartialPrereqWindows from '@site/docs/_partial-prereq-windows.mdx';
import PartialPrereqPython from '@site/docs/_partial-prereq-python.mdx';
import PartialInstallNextSteps from '@site/docs/_partial-install-next-steps.mdx';
import PartialOllamaModels from '@site/docs/_partial-ollama-models.mdx';
import PartialGpuModeTip from '@site/docs/_partial-gpu-mode-tip.mdx';
To manage your own OpenRAG services, deploy OpenRAG with Docker or Podman.
Use this installation method if you don't want to [use the Terminal User Interface (TUI)](/tui), or you need to run OpenRAG in an environment where using the TUI is unfeasible.
## Prerequisites
<PartialPrereqWindows />
<PartialPrereqPython />
<PartialPrereqNoScript />
<PartialPrereqCommon />
## Prepare your deployment {#setup}
1. Clone the OpenRAG repository:
```bash
git clone https://github.com/langflow-ai/openrag.git
```
2. Change to the root of the cloned repository:
```bash
cd openrag
```
3. Install dependencies:
```bash
uv sync
```
4. Create a `.env` file at the root of the cloned repository.
You can create an empty file or copy the repository's [`.env.example`](https://github.com/langflow-ai/openrag/blob/main/.env.example) file.
The example file contains some of the [OpenRAG environment variables](/reference/configuration) to get you started with configuring your deployment.
```bash
cp .env.example .env
```
5. Edit the `.env` file to configure your deployment using [OpenRAG environment variables](/reference/configuration).
The OpenRAG Docker Compose files pull values from your `.env` file to configure the OpenRAG containers.
The following variables are required or recommended:
* **`OPENSEARCH_PASSWORD` (Required)**: Sets the OpenSearch administrator password. It must adhere to the [OpenSearch password complexity requirements](https://docs.opensearch.org/latest/security/configuration/demo-configuration/#setting-up-a-custom-admin-password).
* **`LANGFLOW_SUPERUSER`**: The username for the Langflow administrator user. If `LANGFLOW_SUPERUSER` isn't set, then the default value is `admin`.
* **`LANGFLOW_SUPERUSER_PASSWORD` (Strongly recommended)**: Sets the Langflow administrator password, and determines the Langflow server's default authentication mode. If `LANGFLOW_SUPERUSER_PASSWORD` isn't set, then the Langflow server starts without authentication enabled. For more information, see [Langflow settings](/reference/configuration#langflow-settings).
* **`LANGFLOW_SECRET_KEY` (Strongly recommended)**: A secret encryption key for internal Langflow operations. It is recommended to [generate your own Langflow secret key](https://docs.langflow.org/api-keys-and-authentication#langflow-secret-key). If `LANGFLOW_SECRET_KEY` isn't set, then Langflow generates a secret key automatically.
* **Model provider credentials**: Provide credentials for your preferred model providers. If none of these are set in the `.env` file, you must configure at least one provider during the [application onboarding process](#application-onboarding).
* `OPENAI_API_KEY`
* `ANTHROPIC_API_KEY`
* `OLLAMA_ENDPOINT`
* `WATSONX_API_KEY`
* `WATSONX_ENDPOINT`
* `WATSONX_PROJECT_ID`
* **OAuth provider credentials**: To upload documents from external storage, such as Google Drive, set the required OAuth credentials for the connectors that you want to use. You can [manage OAuth credentials](/ingestion#oauth-ingestion) later, but it is recommended to configure them during initial set up so you don't have to rebuild the containers.
* **Google**: Provide your Google OAuth Client ID and Google OAuth Client Secret. You can generate these in the [Google Cloud Console](https://console.cloud.google.com/apis/credentials). For more information, see the [Google OAuth client documentation](https://developers.google.com/identity/protocols/oauth2).
* **Microsoft**: For the Microsoft OAuth Client ID and Microsoft OAuth Client Secret, provide [Azure application registration credentials for SharePoint and OneDrive](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/app-registration?view=odsp-graph-online). For more information, see the [Microsoft Graph OAuth client documentation](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/graph-oauth).
* **Amazon**: Provide your AWS Access Key ID and AWS Secret Access Key with access to your S3 instance. For more information, see the AWS documentation on [Configuring access to AWS applications](https://docs.aws.amazon.com/singlesignon/latest/userguide/manage-your-applications.html).
For more information and variables, see [OpenRAG environment variables](/reference/configuration).
## Start services
1. To use the default Docling Serve implementation, start `docling serve` on port 5001 on the host machine using the included script:
```bash
uv run python scripts/docling_ctl.py start --port 5001
```
Docling cannot run inside a Docker container due to system-level dependencies, so you must manage it as a separate service on the host machine.
For more information, see [Stop, start, and inspect native services](/manage-services#start-native-services).
Port 5001 is required to deploy OpenRAG successfully; don't use a different port.
Additionally, this enables the [MLX framework](https://opensource.apple.com/projects/mlx/) for accelerated performance on Apple Silicon Mac machines.
:::tip
If you don't want to use the default Docling Serve implementation, see [Select a Docling implementation](/knowledge#select-a-docling-implementation).
:::
2. Confirm `docling serve` is running.
The following command checks the status of the default Docling Serve implementation:
```bash
uv run python scripts/docling_ctl.py status
```
If `docling serve` is running, the output includes the status, address, and process ID (PID):
```bash
Status: running
Endpoint: http://127.0.0.1:5001
Docs: http://127.0.0.1:5001/docs
PID: 27746
```
3. Deploy the OpenRAG containers locally using the appropriate Docker Compose configuration for your environment:
* **CPU-only deployment** (default, recommended): If your host machine doesn't have NVIDIA GPU support, use the base `docker-compose.yml` file:
```bash title="Docker"
docker compose up -d
```
```bash title="Podman"
podman compose up -d
```
* **GPU-accelerated deployment**: If your host machine has an NVIDIA GPU with CUDA support and compatible NVIDIA drivers, use the base `docker-compose.yml` file with the `docker-compose.gpu.yml` override:
```bash title="Docker"
docker compose -f docker-compose.yml -f docker-compose.gpu.yml up -d
```
```bash title="Podman"
podman compose -f docker-compose.yml -f docker-compose.gpu.yml up -d
```
:::tip
<PartialGpuModeTip />
:::
4. Wait for the OpenRAG containers to start, and then confirm that all containers are running:
```bash title="Docker"
docker compose ps
```
```bash title="Podman"
podman compose ps
```
The OpenRAG Docker Compose files deploy the following containers:
| Container Name | Default address | Purpose |
|---|---|---|
| OpenRAG Backend | http://localhost:8000 | FastAPI server and core functionality. |
| OpenRAG Frontend | http://localhost:3000 | React web interface for user interaction. |
| Langflow | http://localhost:7860 | [AI workflow engine](/agents). |
| OpenSearch | http://localhost:9200 | Datastore for [knowledge](/knowledge). |
| OpenSearch Dashboards | http://localhost:5601 | OpenSearch database administration interface. |
When the containers are running, you can access your OpenRAG services at their addresses.
5. Access the OpenRAG frontend at `http://localhost:3000`, and then continue with the [application onboarding process](#application-onboarding).
<PartialOnboarding />
<PartialInstallNextSteps />

View file

@ -1,34 +0,0 @@
---
title: Select an installation method
slug: /install-options
---
The [OpenRAG architecture](/#openrag-architecture) is lightweight and container-based with a central OpenRAG backend that orchestrates the various services and external connectors.
Depending on your use case, OpenRAG can assist with service management, or you can manage the services yourself.
Select the installation method that best fits your needs:
* **Use the [Terminal User Interface (TUI)](/tui) to manage services**: For guided configuration and simplified service management, install OpenRAG with TUI-managed services. Use one of the following options:
* [**Automatic installer script**](/install): Run one script to install the required dependencies and OpenRAG.
* [**`uv`**](/install-uv): Install OpenRAG as a dependency of a new or existing Python project.
* [**`uvx`**](/install-uvx): Install OpenRAG without creating a project or modifying your project's dependencies.
* [**Install OpenRAG on Microsoft Windows**](/install-windows): On Windows machines, you must install OpenRAG within the Windows Subsystem for Linux (WSL).
:::warning
OpenRAG doesn't support nested virtualization; don't run OpenRAG on a WSL distribution that is inside a Windows VM.
:::
* [**Manage your own services**](/docker): You can use Docker or Podman to deploy self-managed OpenRAG services.
The first time you start OpenRAG, you must complete the application onboarding process.
This is required for all installation methods because it prepares the minimum required configuration for OpenRAG to run.
For TUI-managed services, you must also complete initial setup before you start the OpenRAG services.
For more information, see the instructions for your preferred installation method.
Your OpenRAG configuration is stored in a `.env` file.
When using TUI-managed services, this file is created automatically at `~/.openrag/tui`, or you can provide a pre-populated `.env` file in this directory before starting the TUI.
The TUI prompts you for the required values during setup and onboarding, and any values detected in a preexisting `.env` file are populated automatically.
When using self-managed services, you must provide a pre-populated `.env` file, as you would for any Docker or Podman deployment.
For more information, see the instructions for your preferred installation method and the [OpenRAG environment variables reference](/reference/configuration).

View file

@ -1,124 +0,0 @@
---
title: Install OpenRAG in a Python project with uv
slug: /install-uv
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import PartialOnboarding from '@site/docs/_partial-onboarding.mdx';
import PartialSetup from '@site/docs/_partial-setup.mdx';
import PartialPrereqCommon from '@site/docs/_partial-prereq-common.mdx';
import PartialPrereqNoScript from '@site/docs/_partial-prereq-no-script.mdx';
import PartialPrereqWindows from '@site/docs/_partial-prereq-windows.mdx';
import PartialPrereqPython from '@site/docs/_partial-prereq-python.mdx';
import PartialInstallNextSteps from '@site/docs/_partial-install-next-steps.mdx';
import PartialOpenSearchAuthMode from '@site/docs/_partial-opensearch-auth-mode.mdx';
import PartialOllamaModels from '@site/docs/_partial-ollama-models.mdx';
Use [`uv`](https://docs.astral.sh/uv/getting-started/installation/) to install OpenRAG as a managed or unmanaged dependency in a new or existing Python project.
When you install OpenRAG with `uv`, you will use the [Terminal User Interface (TUI)](/tui) to configure and manage your OpenRAG deployment.
For other installation methods, see [Select an installation method](/install-options).
## Prerequisites
<PartialPrereqWindows />
<PartialPrereqPython />
<PartialPrereqNoScript />
<PartialPrereqCommon />
## Install and start OpenRAG with uv
There are two ways to install OpenRAG with `uv`:
* [**`uv add`** (Recommended)](#uv-add): Install OpenRAG as a managed dependency in a new or existing `uv` Python project.
This is recommended because it adds OpenRAG to your `pyproject.toml` and lockfile for better management of dependencies and the virtual environment.
* [**`uv pip install`**](#uv-pip-install): Use the [`uv pip` interface](https://docs.astral.sh/uv/pip/) to install OpenRAG into an existing Python project that uses `pip`, `pip-tools`, and `virtualenv` commands.
If you encounter errors during installation, see [Troubleshoot OpenRAG](/support/troubleshoot).
### Use uv add {#uv-add}
1. Create a new `uv`-managed Python project:
```bash
uv init PROJECT_NAME
```
2. Change into your new project directory:
```bash
cd PROJECT_NAME
```
Because `uv` manages the virtual environment for you, you won't see a `(venv)` prompt.
`uv` commands automatically use the project's virtual environment.
3. Add OpenRAG to your project:
* Add the latest version:
```bash
uv add openrag
```
* Add a specific version:
```bash
uv add openrag==0.1.30
```
* Add a local wheel:
```bash
uv add path/to/openrag-VERSION-py3-none-any.whl
```
For more options, see [Managing dependencies with `uv`](https://docs.astral.sh/uv/concepts/projects/dependencies/).
4. Optional: If you want to use a pre-populated [OpenRAG `.env` file](/reference/configuration), create one at `~/.openrag/tui` before starting OpenRAG.
5. Start the OpenRAG TUI:
```bash
uv run openrag
```
### Use uv pip install {#uv-pip-install}
1. Activate your virtual environment.
2. Install the OpenRAG Python package:
```bash
uv pip install openrag
```
3. Optional: If you want to use a pre-populated [OpenRAG `.env` file](/reference/configuration), create one at `~/.openrag/tui` before starting OpenRAG.
4. Start the OpenRAG TUI:
```bash
uv run openrag
```
## Set up OpenRAG with the TUI {#setup}
When you install OpenRAG with `uv`, you manage the OpenRAG services with the TUI.
The TUI guides you through the initial configuration process before you start the OpenRAG services.
Your configuration values are stored in an [OpenRAG `.env` file](/reference/configuration) that is created automatically at `~/.openrag/tui`.
If OpenRAG detects an existing `.env` file in this directory, then the TUI can populate those values automatically during setup and onboarding.
Container definitions are stored in the `docker-compose` files in the same directory as the OpenRAG `.env` file.
<PartialSetup />
<PartialOnboarding />
<PartialInstallNextSteps />

View file

@ -1,83 +0,0 @@
---
title: Invoke OpenRAG with uvx
slug: /install-uvx
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import PartialOnboarding from '@site/docs/_partial-onboarding.mdx';
import PartialSetup from '@site/docs/_partial-setup.mdx';
import PartialPrereqCommon from '@site/docs/_partial-prereq-common.mdx';
import PartialPrereqNoScript from '@site/docs/_partial-prereq-no-script.mdx';
import PartialPrereqWindows from '@site/docs/_partial-prereq-windows.mdx';
import PartialPrereqPython from '@site/docs/_partial-prereq-python.mdx';
import PartialInstallNextSteps from '@site/docs/_partial-install-next-steps.mdx';
import PartialOpenSearchAuthMode from '@site/docs/_partial-opensearch-auth-mode.mdx';
import PartialOllamaModels from '@site/docs/_partial-ollama-models.mdx';
Use [`uvx`](https://docs.astral.sh/uv/guides/tools/#running-tools) to invoke OpenRAG outside of a Python project or without modifying your project's dependencies.
:::tip
The [automatic installer script](/install) also uses `uvx` to install OpenRAG.
:::
When you install OpenRAG with `uvx`, you will use the [Terminal User Interface (TUI)](/tui) to configure and manage your OpenRAG deployment.
This installation method is best for testing OpenRAG by running it outside of a Python project.
For other installation methods, see [Select an installation method](/install-options).
## Prerequisites
<PartialPrereqWindows />
<PartialPrereqPython />
<PartialPrereqNoScript />
<PartialPrereqCommon />
## Install and run OpenRAG with uvx
1. Create a directory to store your OpenRAG configuration files and data, and then change to that directory:
```bash
mkdir openrag-workspace
cd openrag-workspace
```
2. Optional: If you want to use a pre-populated [OpenRAG `.env` file](/reference/configuration), create one at `~/.openrag/tui` before invoking OpenRAG.
3. Invoke OpenRAG:
```bash
uvx openrag
```
You can invoke a specific version using any of the [`uvx` version specifiers](https://docs.astral.sh/uv/guides/tools/#requesting-specific-versions), such as `--from`:
```bash
uvx --from openrag==0.1.30 openrag
```
Invoking OpenRAG with `uvx openrag` creates a cached, ephemeral environment for the TUI in your local `uv` cache.
By invoking OpenRAG in a specific directory, your OpenRAG configuration files and data are stored separately from the `uv` cache.
Clearing the `uv` cache doesn't remove your entire OpenRAG installation.
After clearing the cache, you can re-invoke OpenRAG (`uvx openrag`) to restart the TUI with your preserved configuration and data.
If you encounter errors during installation, see [Troubleshoot OpenRAG](/support/troubleshoot).
## Set up OpenRAG with the TUI {#setup}
When you install OpenRAG with `uvx`, you manage the OpenRAG services with the TUI.
The TUI guides you through the initial configuration process before you start the OpenRAG services.
Your configuration values are stored in an [OpenRAG `.env` file](/reference/configuration) that is created automatically at `~/.openrag/tui`.
If OpenRAG detects an existing `.env` file in this directory, then the TUI can populate those values automatically during setup and onboarding.
Container definitions are stored in the `docker-compose` files in the same directory as the OpenRAG `.env` file.
<PartialSetup />
<PartialOnboarding />
<PartialInstallNextSteps />

View file

@ -1,42 +0,0 @@
---
title: Install OpenRAG on Microsoft Windows
slug: /install-windows
---
If you're using Windows, you must install OpenRAG within the Windows Subsystem for Linux (WSL).
:::warning
Nested virtualization isn't supported.
OpenRAG isn't compatible with nested virtualization, which can cause networking issues.
Don't install OpenRAG on a WSL distribution that is installed inside a Windows VM.
Instead, install OpenRAG on your base OS or a non-nested Linux VM.
:::
## Install OpenRAG in the WSL
1. [Install WSL](https://learn.microsoft.com/en-us/windows/wsl/install) with an Ubuntu distribution using WSL 2:
```powershell
wsl --install -d Ubuntu
```
For new installations, the `wsl --install` command uses WSL 2 and Ubuntu by default.
For existing WSL installations, you can [change the distribution](https://learn.microsoft.com/en-us/windows/wsl/install#change-the-default-linux-distribution-installed) and [check the WSL version](https://learn.microsoft.com/en-us/windows/wsl/install#upgrade-version-from-wsl-1-to-wsl-2).
2. [Start your WSL Ubuntu distribution](https://learn.microsoft.com/en-us/windows/wsl/install#ways-to-run-multiple-linux-distributions-with-wsl) if it doesn't start automatically.
3. [Set up a username and password for your WSL distribution](https://learn.microsoft.com/en-us/windows/wsl/setup/environment#set-up-your-linux-username-and-password).
4. [Install Docker Desktop for Windows with WSL 2](https://learn.microsoft.com/en-us/windows/wsl/tutorials/wsl-containers). When you reach the Docker Desktop **WSL integration** settings, make sure your Ubuntu distribution is enabled, and then click **Apply & Restart** to enable Docker support in WSL.
The Docker Desktop WSL integration makes Docker available within your WSL distribution.
You don't need to install Docker or Podman separately in your WSL distribution before you install OpenRAG.
5. Install and run OpenRAG from within your WSL Ubuntu distribution.
You can install OpenRAG in your WSL distribution using any of the [OpenRAG installation methods](/install-options).
## Troubleshoot OpenRAG in WSL
If you encounter issues with port forwarding or the Windows Firewall, you might need to adjust the [Hyper-V firewall settings](https://learn.microsoft.com/en-us/windows/security/operating-system-security/network-security/windows-firewall/hyper-v-firewall) to allow communication between your WSL distribution and the Windows host. For more troubleshooting advice for networking issues, see [Troubleshooting WSL common issues](https://learn.microsoft.com/en-us/windows/wsl/troubleshooting#common-issues).

View file

@ -1,82 +0,0 @@
---
title: Install OpenRAG with the automatic installer script
slug: /install
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import PartialOnboarding from '@site/docs/_partial-onboarding.mdx';
import PartialSetup from '@site/docs/_partial-setup.mdx';
import PartialPrereqCommon from '@site/docs/_partial-prereq-common.mdx';
import PartialPrereqWindows from '@site/docs/_partial-prereq-windows.mdx';
import PartialPrereqPython from '@site/docs/_partial-prereq-python.mdx';
import PartialInstallNextSteps from '@site/docs/_partial-install-next-steps.mdx';
import PartialOpenSearchAuthMode from '@site/docs/_partial-opensearch-auth-mode.mdx';
import PartialOllamaModels from '@site/docs/_partial-ollama-models.mdx';
:::tip
To quickly install and test OpenRAG's core features, try the [quickstart](/quickstart).
:::
The installer script installs `uv`, Docker or Podman, Docker Compose, and OpenRAG.
Then, it installs and runs OpenRAG with `uvx`.
When you install OpenRAG with the installer script, you will use the [Terminal User Interface (TUI)](/tui) to configure and manage your OpenRAG deployment.
This installation method is best for testing OpenRAG by running it outside of a Python project.
For other installation methods, see [Select an installation method](/install-options).
## Prerequisites
<PartialPrereqWindows />
<PartialPrereqPython />
<PartialPrereqCommon />
## Run the installer script {#install}
1. Create a directory to store your OpenRAG configuration files and data, and then change to that directory:
```bash
mkdir openrag-workspace
cd openrag-workspace
```
2. Get and run the installer script:
```bash
curl -fsSL https://docs.openr.ag/files/run_openrag_with_prereqs.sh | bash
```
The installer script installs OpenRAG with [`uvx`](https://docs.astral.sh/uv/guides/tools/#running-tools) in the directory where you run the script.
3. Wait while the installer script prepares your environment and installs OpenRAG.
You might be prompted to install certain dependencies if they aren't already present in your environment.
The entire process can take a few minutes.
Once the environment is ready, the OpenRAG TUI starts.
![OpenRAG TUI Interface](@site/static/img/openrag_tui_dec_2025.png)
Because the installer script uses `uvx`, it creates a cached, ephemeral environment in your local `uv` cache, and your OpenRAG configuration files and data are stored separately from the `uv` cache.
Clearing the cache doesn't delete your entire OpenRAG installation, only the temporary TUI environment.
After clearing the cache, run `uvx openrag` to [access the TUI](/tui) and continue with your preserved configuration and data.
If you encounter errors during installation, see [Troubleshoot OpenRAG](/support/troubleshoot).
## Set up OpenRAG with the TUI {#setup}
When you install OpenRAG with the installer script, you manage the OpenRAG services with the TUI.
The TUI guides you through the initial configuration process before you start the OpenRAG services.
Your configuration values are stored in an [OpenRAG `.env` file](/reference/configuration) that is created automatically at `~/.openrag/tui`.
If OpenRAG detects an existing `.env` file in this directory, then the TUI can populate those values automatically during setup and onboarding.
Container definitions are stored in the `docker-compose` files in the same directory as the OpenRAG `.env` file.
<PartialSetup />
<PartialOnboarding />
<PartialInstallNextSteps />

View file

@ -1,178 +0,0 @@
---
title: Manage OpenRAG containers and services
slug: /manage-services
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import PartialDockerComposeUp from '@site/docs/_partial-docker-compose-up.mdx';
import PartialDockerComposeDownAndPrune from '@site/docs/_partial-docker-compose-down-and-prune.mdx';
import PartialFactorResetWarning from '@site/docs/_partial-factory-reset-warning.mdx';
import PartialExportFlows from '@site/docs/_partial-export-flows.mdx';
Service management is an essential part of maintaining your OpenRAG deployment.
Most OpenRAG services run in containers.
However, some services, like Docling, run directly on the local machine.
If you [installed OpenRAG](/install-options) with the automated installer script, `uv`, or `uvx`, you can use the [Terminal User Interface (TUI)](/tui) to manage your OpenRAG configuration and services.
For [self-managed deployments](/docker), run Docker or Podman commands to manage your OpenRAG services.
## Monitor services and view logs
<Tabs>
<TabItem value="TUI" label="TUI-managed services" default>
In the TUI, click **Status** to access diagnostics and controls for all OpenRAG services, including container health, ports, and image versions.
To view streaming logs, click the name of a service, and then press <kbd>l</kbd>.
For the Docling native service, see [Stop, start, and inspect native services](#start-native-services).
</TabItem>
<TabItem value="env" label="Self-managed services">
For self-managed container services, you can get container logs with [`docker compose logs`](https://docs.docker.com/reference/cli/docker/compose/logs/) or [`podman logs`](https://docs.podman.io/en/latest/markdown/podman-logs.1.html).
For the Docling native service, see [Stop, start, and inspect native services](#start-native-services).
</TabItem>
</Tabs>
## Stop and start containers
<Tabs>
<TabItem value="TUI" label="TUI-managed services" default>
On the TUI's **Status** page, you can stop, start, and restart OpenRAG's container-based services.
When you click **Restart** or **Start Services**, the following processes are triggered:
1. OpenRAG automatically detects your container runtime, and then checks if your machine has compatible GPU support by checking for `CUDA`, `NVIDIA_SMI`, and Docker/Podman runtime support. This check determines which Docker Compose file OpenRAG uses because there are separate Docker Compose files for GPU and CPU deployments.
2. OpenRAG pulls the OpenRAG container images with `docker compose pull` if any images are missing.
3. OpenRAG deploys the containers with `docker compose up -d`.
</TabItem>
<TabItem value="env" label="Self-managed services">
Use [`docker compose down`](https://docs.docker.com/reference/cli/docker/compose/down/) and [`docker compose up -d`](https://docs.docker.com/reference/cli/docker/compose/up/).
To stop or start individual containers, use targeted commands like `docker stop CONTAINER_ID` and `docker start CONTAINER_ID`.
</TabItem>
</Tabs>
## Stop, start, and inspect native services (Docling) {#start-native-services}
A _native service_ in OpenRAG is a service that runs locally on your machine, not within a container. For example, the `docling serve` process is an OpenRAG native service because this document processing service runs on your local machine, separate from the OpenRAG containers.
<Tabs>
<TabItem value="TUI" label="TUI-managed services" default>
On the TUI's **Status** page, you can stop, start, restart, and inspect OpenRAG's native services.
The **Native Services** section lists the status, port, and process ID (PID) for each native service.
To manage a native service, click the service's name, and then click **Stop**, **Start** or **Restart**.
To view the logs for a native service, click the service's name, and then press <kbd>l</kbd>.
</TabItem>
<TabItem value="env" label="Self-managed services">
Because the Docling service doesn't run in a container, you must start and stop it manually on the host machine:
* Stop `docling serve`:
```bash
uv run python scripts/docling_ctl.py stop
```
* Start `docling serve`:
```bash
uv run python scripts/docling_ctl.py start --port 5001
```
* Check that `docling serve` is running:
```bash
uv run python scripts/docling_ctl.py status
```
If `docling serve` is running, the output includes the status, address, and process ID (PID):
```text
Status: running
Endpoint: http://127.0.0.1:5001
Docs: http://127.0.0.1:5001/docs
PID: 27746
```
</TabItem>
</Tabs>
## Upgrade services
See [Upgrade OpenRAG](/upgrade).
## Reset containers (destructive) {#reset-containers}
<PartialFactorResetWarning />
Use these steps to reset your OpenRAG deployment by recreating the containers and deleting all data in the `~/.openrag` directory _except_ for the `.env` file and the `/documents` subdirectory.
This restores your OpenRAG deployment to a near-initial state while preserving your configuration (in `.env`) and uploaded documents (in `/documents`).
Your documents are reingested into a fresh OpenSearch index after the reset.
To reset your OpenRAG deployment _and_ delete all OpenRAG data, see [Reinstall OpenRAG](/reinstall).
<Tabs>
<TabItem value="TUI" label="TUI-managed services" default>
<PartialExportFlows />
2. To destroy and recreate your OpenRAG containers, click **Status** in the TUI, and then click **Factory Reset**.
3. Repeat the [setup process](/install#setup) to restart the services and launch the OpenRAG app. Your OpenRAG passwords, OAuth credentials (if previously set), and onboarding configuration are restored from the `.env` file.
4. If you exported customized flows, [import your flows](https://docs.langflow.org/concepts-flows-import) into Langflow after completing the onboarding process.
</TabItem>
<TabItem value="env" label="Self-managed services">
<PartialExportFlows />
2. Recreate the containers:
```bash title="Docker"
docker compose up --build --force-recreate --remove-orphans
```
```bash title="Podman"
podman compose up --build --force-recreate --remove-orphans
```
3. Launch the OpenRAG app, and then repeat the [application onboarding process](/docker#application-onboarding).
4. If you exported customized flows, [import your flows](https://docs.langflow.org/concepts-flows-import) into Langflow after completing the onboarding process.
</TabItem>
</Tabs>
## Prune images
Use image pruning to free up disk space by removing unused OpenRAG container images.
For TUI-managed services, use the TUI's **Prune Images** option to clean up your OpenRAG container images.
You can choose to prune unused images only or all images.
If you prune all images, the OpenRAG services are stopped, all images are pruned, and then the required images are pulled the next time you start the OpenRAG services.
For self-managed services, use [`docker image prune`](https://docs.docker.com/engine/reference/commandline/image_prune/) or [`podman image prune`](https://docs.podman.io/en/latest/markdown/podman-image-prune.1.html) to remove unused images.
## See also
* [Uninstall OpenRAG](/uninstall)

View file

@ -1,160 +0,0 @@
---
title: Quickstart
slug: /quickstart
---
import Icon from "@site/src/components/icon/icon";
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import PartialIntegrateChat from '@site/docs/_partial-integrate-chat.mdx';
import PartialPrereqWindows from '@site/docs/_partial-prereq-windows.mdx';
import PartialPrereqPython from '@site/docs/_partial-prereq-python.mdx';
Use this quickstart to install OpenRAG, and then try some of OpenRAG's core features.
## Prerequisites
<PartialPrereqPython />
* Get an [OpenAI API key](https://platform.openai.com/api-keys).
This quickstart uses OpenAI for simplicity.
For other providers, see the other [installation methods](/install-options).
<PartialPrereqWindows />
## Install OpenRAG
For this quickstart, install OpenRAG with the automatic installer script and basic setup.
The script installs OpenRAG dependencies, including Docker or Podman, and then it installs and runs OpenRAG with [`uvx`](https://docs.astral.sh/uv/guides/tools/#running-tools).
1. Create a directory for your OpenRAG installation, and then change to that directory:
```bash
mkdir openrag-workspace
cd openrag-workspace
```
2. [Download the OpenRAG install script](https://docs.openr.ag/files/run_openrag_with_prereqs.sh), move it to your OpenRAG directory, and then run it:
```bash
bash run_openrag_with_prereqs.sh
```
Wait while the installer script prepares your environment and installs OpenRAG.
You might be prompted to install certain dependencies if they aren't already present in your environment.
The entire process can take a few minutes.
Once the environment is ready, the OpenRAG [Terminal User Interface (TUI)](/tui) starts.
![OpenRAG TUI Interface](@site/static/img/openrag_tui_dec_2025.png)
3. In the TUI, click **Basic Setup**.
4. For **Langflow Admin Password**, click **Generate Password** to create a Langflow administrator password and username.
5. Use the default values for all other fields.
6. Click **Save Configuration**.
Your OpenRAG configuration and passwords are stored in an [OpenRAG `.env` file](/reference/configuration) file that is created automatically at `~/.openrag/tui`.
OpenRAG container definitions are stored in the `docker-compose` files in the same directory.
7. Click **Start OpenRAG** to start the OpenRAG services.
This process can take some time while OpenRAG pulls and runs the container images.
If all services start successfully, the TUI prints a confirmation message:
```text
Services started successfully
Command completed successfully
```
8. Click **Close**, and then click **Launch OpenRAG** to access the OpenRAG application and start the application onboarding process.
9. For this quickstart, select the **OpenAI** model provider, enter your OpenAI API key, and then click **Complete**. Use the default settings for all other model options.
10. Click through the overview slides for a brief introduction to OpenRAG, or click <Icon name="ArrowRight" aria-hidden="true"/> **Skip overview**.
You can complete this quickstart without going through the overview.
The overview demonstrates some basic functionality that is covered in the next section and in other parts of the OpenRAG documentation.
## Load and chat with documents {#chat-with-documents}
Use the [OpenRAG **Chat**](/chat) to explore the documents in your OpenRAG database using natural language queries.
Some documents are included by default to get you started, and you can load your own documents.
1. In OpenRAG, click <Icon name="MessageSquare" aria-hidden="true"/> **Chat**.
2. For this quickstart, ask the agent what documents are available.
For example: `What documents are available to you?`
The agent responds with a summary of OpenRAG's default documents.
3. To verify the agent's response, click <Icon name="Library" aria-hidden="true"/> **Knowledge** to view the documents stored in the OpenRAG OpenSearch database.
You can click a document to view the chunks of the document as they are stored in the database.
4. Click **Add Knowledge** to add your own documents to your OpenRAG knowledge base.
For this quickstart, use either the <Icon name="File" aria-hidden="true"/> **File** or <Icon name="Folder" aria-hidden="true"/> **Folder** upload options to load documents from your local machine.
**Folder** uploads an entire directory.
The default directory is `~/.openrag/documents`.
For information about the cloud storage provider options, see [Ingest files with OAuth connectors](/ingestion#oauth-ingestion).
5. Return to the **Chat** window, and then ask a question related to the documents that you just uploaded.
If the agent's response doesn't seem to reference your documents correctly, try the following:
* Click <Icon name="Gear" aria-hidden="true"/> **Function Call: search_documents (tool_call)** to view the log of tool calls made by the agent. This is helpful for troubleshooting because it shows you how the agent used particular tools.
* Click <Icon name="Library" aria-hidden="true"/> **Knowledge** to confirm that the documents are present in the OpenRAG OpenSearch database, and then click each document to see how the document was chunked.
If a document was chunked improperly, you might need to tweak the ingestion or modify and reupload the document.
* Click <Icon name="Settings2" aria-hidden="true"/> **Settings** to modify the knowledge ingestion settings.
For more information, see [Configure knowledge](/knowledge) and [Ingest knowledge](/ingestion).
## Change the language model and chat settings {#change-components}
1. To change the knowledge ingestion settings, agent behavior, or language model, click <Icon name="Settings2" aria-hidden="true"/> **Settings**.
The **Settings** page provides quick access to commonly used parameters like the **Language model** and **Agent Instructions**.
2. For greater insight into the underlying [Langflow flow](/agents) that drives the OpenRAG chat, click **Edit in Langflow** and then click **Proceed** to launch the Langflow visual editor in a new browser window.
If Langflow requests login information, enter the `LANGFLOW_SUPERUSER` and `LANGFLOW_SUPERUSER_PASSWORD` from the `.env` file at `~/.openrag/tui`.
The **OpenRAG OpenSearch Agent** flow opens in a new browser window.
![OpenRAG OpenSearch Agent flow](/img/opensearch-agent-flow.png)
3. For this quickstart, try changing the model.
Click the **Language Model** component, and then change the **Model Name** to a different OpenAI model.
After you edit a built-in flow, you can click **Restore flow** on the **Settings** page to revert the flow to its original state when you first installed OpenRAG.
4. Press <kbd>Command</kbd>+<kbd>S</kbd> (<kbd>Ctrl</kbd>+<kbd>S</kbd>) to save your changes.
You can close the Langflow browser window, or leave it open if you want to continue experimenting with the flow editor.
5. Switch to your OpenRAG browser window, and then click <Icon name="Plus" aria-hidden="true"/> in the **Conversations** tab to start a new conversation.
This ensures that the chat doesn't persist any context from the previous conversation with the original model.
6. Ask the same question you asked in [Load and chat with documents](#chat-with-documents) to see how the response differs from the original model.
## Integrate OpenRAG into an application
Langflow in OpenRAG includes pre-built flows that you can integrate into your applications using the [Langflow API](https://docs.langflow.org/api-reference-api-examples).
You can use these flows as-is or modify them to better suit your needs, as demonstrated in [Change the language model and chat settings](#change-components).
You can send and receive requests with the Langflow API using Python, TypeScript, or curl.
<PartialIntegrateChat />
## Next steps
* **Reinstall OpenRAG with your preferred settings**: This quickstart used `uvx` and a minimal setup to demonstrate OpenRAG's core functionality.
It is recommended that you [reinstall OpenRAG](/reinstall) with your preferred configuration and [installation method](/install-options).
* **Learn more about OpenRAG**: Explore OpenRAG and the OpenRAG documentation to learn more about its features and functionality.
* **Learn more about Langflow**: For a deep dive on the Langflow API and visual editor, see the [Langflow documentation](https://docs.langflow.org/).

View file

@ -1,87 +0,0 @@
---
title: Reinstall OpenRAG
slug: /reinstall
---
import PartialDockerComposeUp from '@site/docs/_partial-docker-compose-up.mdx';
import PartialDockerComposeDownAndPrune from '@site/docs/_partial-docker-compose-down-and-prune.mdx';
import PartialDockerStopAll from '@site/docs/_partial-docker-stop-all.mdx';
import PartialDockerRemoveAndCleanupSteps from '@site/docs/_partial-docker-remove-and-cleanup-steps.mdx';
import PartialFactorResetWarning from '@site/docs/_partial-factory-reset-warning.mdx';
import PartialExportFlows from '@site/docs/_partial-export-flows.mdx';
You can reset your OpenRAG deployment to its initial state by recreating the containers and deleting accessory data, such as the `.env` file and ingested documents.
:::warning
These are destructive operations that reset your OpenRAG deployment to an initial state.
Destroyed containers and deleted data are lost and cannot be recovered after running these operations.
:::
## Reinstall TUI-managed containers
<PartialExportFlows />
2. In the TUI, click **Status**, and then click **Factory Reset** to [reset your OpenRAG containers](/manage-services#reset-containers).
<PartialFactorResetWarning />
3. Press <kbd>Esc</kbd> to close the **Status** page, and then press <kbd>q</kbd> to exit the TUI.
4. Optional: Delete or edit [OpenRAG's `.env` file](/reference/configuration), which is stored at `~/.openrag/tui`.
This file contains your OpenRAG configuration, including OpenRAG passwords, API keys, OAuth settings, and other environment variables. If you delete this file, the TUI automatically generates a new one after you repeat the setup and onboarding process. If you preserve this file, the TUI can read values from the existing `.env` file during setup and onboarding.
5. Optional: Remove any files from the `~/.openrag/documents` subdirectory that you don't want to reingest after redeploying the containers.
It is recommended that you preserve OpenRAG's [default documents](https://github.com/langflow-ai/openrag/tree/main/openrag-documents).
6. Restart the TUI with `uv run openrag` or `uvx openrag`.
7. Repeat the [setup process](/install#setup) to configure OpenRAG and restart all services.
Then, launch the OpenRAG app and repeat the [application onboarding process](/install#application-onboarding).
## Reinstall self-managed containers with `docker compose` or `podman compose`
Use these steps to reinstall OpenRAG containers with streamlined `docker compose` or `podman compose` commands:
<PartialExportFlows />
2. Destroy the containers, volumes, and local images, and then remove (prune) any additional container objects.
<PartialFactorResetWarning />
<PartialDockerComposeDownAndPrune />
3. Optional: Edit OpenRAG's `.env` file if needed.
4. Optional: Remove any files from the `~/.openrag/documents` subdirectory that you don't want to reingest after redeploying the containers.
It is recommended that you preserve OpenRAG's [default documents](https://github.com/langflow-ai/openrag/tree/main/openrag-documents).
5. Redeploy OpenRAG:
<PartialDockerComposeUp />
6. Launch the OpenRAG app, and then repeat the [application onboarding process](/docker#application-onboarding).
## Reinstall self-managed containers with discrete `docker` or `podman` commands
Use these commands to remove and clean up OpenRAG containers with discrete `docker` or `podman` commands.
If you want to reinstall one container, specify the container name in the commands instead of running the commands on all containers.
<PartialExportFlows />
2. Stop all running containers:
<PartialDockerStopAll />
3. Remove and clean up containers:
<PartialDockerRemoveAndCleanupSteps />
4. Optional: Edit OpenRAG's `.env` file if needed.
5. Optional: If you removed all containers or specifically the OpenSearch container, then you can remove any files from the `~/.openrag/documents` subdirectory that you don't want to reingest after redeploying the containers.
It is recommended that you preserve OpenRAG's [default documents](https://github.com/langflow-ai/openrag/tree/main/openrag-documents).
6. If you removed all OpenRAG containers, [redeploy OpenRAG](/docker).
If you removed only one container, redeploy that container with the appropriate `docker run` or `podman run` command.

View file

@ -1,52 +0,0 @@
---
title: Use the TUI
slug: /tui
---
import PartialGpuModeTip from '@site/docs/_partial-gpu-mode-tip.mdx';
The OpenRAG Terminal User Interface (TUI) provides a simplified and guided experience for configuring, managing, and monitoring your OpenRAG deployment directly from the terminal.
![OpenRAG TUI Interface](@site/static/img/openrag_tui_dec_2025.png)
If you install OpenRAG with the [automatic installer script](/install), [`uv`](/install-uv), or [`uvx`](/install-uvx), you use the TUI to manage your OpenRAG deployment.
The TUI guides you through the initial setup, automatically manages your OpenRAG `.env` and `docker-compose` files, and provides convenient access to [service management](/manage-services) controls.
In contrast, when you [deploy OpenRAG with self-managed services](/docker), you must manually configure OpenRAG by preparing a `.env` file, and then use Docker or Podman commands to deploy and manage your OpenRAG services.
## Access the TUI {#access-the-tui}
If you installed OpenRAG with `uv`, access the TUI with `uv run openrag`.
If you installed OpenRAG with the automatic installer script or `uvx`, access the TUI with `uvx openrag`.
## Navigate the TUI
You can navigate the TUI with your mouse or keyboard.
Keyboard shortcuts for additional menus are printed at the bottom of the TUI screen.
## Manage services with the TUI
Use the TUI's **Status** page to access controls and information for your OpenRAG services.
For more information, see [Manage OpenRAG services](/manage-services).
## Toggle GPU/CPU mode
You can toggle between GPU and CPU mode from within the TUI if your system has compatible GPU hardware and drivers installed.
In the TUI, click **Status**, and then click **Switch to GPU Mode** or **Switch to CPU Mode**.
This change requires restarting all OpenRAG services because each mode has its own `docker-compose` file.
:::tip
<PartialGpuModeTip />
:::
## Exit the OpenRAG TUI
To exit the OpenRAG TUI, press <kbd>q</kbd> on the TUI main page.
Exiting the TUI doesn't stop your OpenRAG services.
Your OpenRAG services continue to run until they are stopped from within the TUI or by another process that inadvertently stops them.
To restart the TUI, see [Access the TUI](#access-the-tui).

View file

@ -1,58 +0,0 @@
---
title: Remove OpenRAG
slug: /uninstall
---
import PartialDockerComposeDownAndPrune from '@site/docs/_partial-docker-compose-down-and-prune.mdx';
import PartialDockerStopAll from '@site/docs/_partial-docker-stop-all.mdx';
import PartialDockerRemoveAndCleanupSteps from '@site/docs/_partial-docker-remove-and-cleanup-steps.mdx';
:::tip
If you want to reset your OpenRAG containers without removing OpenRAG entirely, see [Reset OpenRAG containers](/manage-services) and [Reinstall OpenRAG](/reinstall).
:::
## Uninstall TUI-managed deployments
If you used the [automated installer script](/install) or [`uvx`](/install-uvx) to install OpenRAG, clear your `uv` cache (`uv cache clean`) to remove the TUI environment, and then delete the `~/.openrag` directory.
If you used [`uv`](/install-uv) to install OpenRAG, run `uv remove openrag` in your Python project, and then delete the `~/.openrag` directory.
## Uninstall self-managed deployments
For self-managed services, destroy the containers, prune any additional container objects, delete any remaining OpenRAG files, and then shut down the Docling service.
### Uninstall with `docker compose` or `podman compose`
Use these steps to uninstall a self-managed OpenRAG deployment with streamlined `docker compose` or `podman compose` commands:
1. Destroy the containers, volumes, and local images, and then remove (prune) any additional container objects:
<PartialDockerComposeDownAndPrune />
2. Remove OpenRAG's `.env` file and the `~/.openrag/documents` directory, which aren't deleted by the previous commands.
3. Stop `docling-serve`:
```bash
uv run python scripts/docling_ctl.py stop
```
### Uninstall with discrete `docker` or `podman` commands
Use these commands to uninstall a self-managed OpenRAG deployment with discrete `docker` or `podman` commands:
1. Stop all running containers:
<PartialDockerStopAll />
2. Remove and clean up containers:
<PartialDockerRemoveAndCleanupSteps />
3. Remove OpenRAG's `.env` file and the `~/.openrag/documents` directory, which aren't deleted by the previous commands.
4. Stop `docling-serve`:
```bash
uv run python scripts/docling_ctl.py stop
```

View file

@ -1,156 +0,0 @@
---
title: Upgrade OpenRAG
slug: /upgrade
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import PartialExportFlows from '@site/docs/_partial-export-flows.mdx';
Use these steps to upgrade your OpenRAG deployment to the latest version or a specific version.
## Export customized flows before upgrading
If you modified the built-in flows or created custom flows in your OpenRAG Langflow instance, [export your flows](https://docs.langflow.org/concepts-flows-import) before upgrading.
This ensure that you won't lose your flows after upgrading, and you can reference the exported flows if there are any breaking changes in the new version.
## Upgrade TUI-managed deployments
To upgrade OpenRAG, you need to upgrade the OpenRAG Python package, and then upgrade the OpenRAG containers.
Upgrading the Python package also upgrades Docling by bumping the dependency in `pyproject.toml`.
This is a two-part process because upgrading the OpenRAG Python package updates the Terminal User Interface (TUI) and Python code, but the container versions are controlled by environment variables in your [OpenRAG `.env` file](/reference/configuration).
<PartialExportFlows />
2. To check for updates, click **Status** in the TUI, and then click **Upgrade**.
3. If there is an update available, press <kbd>Esc</kbd> to close the **Status** page, then then click **Stop All Services**.
4. Press <kbd>q</kbd> to exit the TUI.
5. Upgrade the OpenRAG Python package to the latest version from [PyPI](https://pypi.org/project/openrag/).
The commands to upgrade the package depend on how you installed OpenRAG.
<Tabs>
<TabItem value="installer" label="Script or uvx" default>
Use these steps to upgrade the Python package if you installed OpenRAG using the [installer script](/install) or [`uvx`](/install-uvx):
1. Navigate to your OpenRAG workspace directory:
```bash
cd openrag-workspace
```
2. Upgrade the OpenRAG package:
```bash
uvx --from openrag openrag
```
You can invoke a specific version using any of the [`uvx` version specifiers](https://docs.astral.sh/uv/guides/tools/#requesting-specific-versions), such as `--from`:
```bash
uvx --from openrag==0.1.30 openrag
```
</TabItem>
<TabItem value="uv-add" label="uv add">
Use these steps to upgrade the Python package if you installed OpenRAG with [`uv add`](/install-uv):
1. Navigate to your project directory:
```bash
cd YOUR_PROJECT_NAME
```
2. Update OpenRAG to the latest version:
```bash
uv add --upgrade openrag
```
To upgrade to a specific version:
```bash
uv add --upgrade openrag==0.1.33
```
3. Start the OpenRAG TUI:
```bash
uv run openrag
```
</TabItem>
<TabItem value="uv-pip" label="uv pip install">
Use these steps to upgrade the Python package if you installed OpenRAG with [`uv pip install`](/install-uv):
1. Activate your virtual environment.
2. Upgrade OpenRAG:
```bash
uv pip install --upgrade openrag
```
To upgrade to a specific version:
```bash
uv pip install --upgrade openrag==0.1.33
```
3. Start the OpenRAG TUI:
```bash
uv run openrag
```
</TabItem>
</Tabs>
6. In the OpenRAG TUI, click **Start Services**, and then wait while the services start.
When you start services after upgrading the Python package, OpenRAG runs `docker compose pull` to get the appropriate container images matching the version specified in your OpenRAG `.env` file. Then, it recreates the containers with the new images using `docker compose up -d --force-recreate`.
:::tip Pin container versions
In the OpenRAG `.env` file, the `OPENRAG_VERSION` [environment variable](/reference/configuration#system-settings) is set to `latest` by default, which pulls the `latest` available container images.
To pin a specific container image version, you can set `OPENRAG_VERSION` to the desired container image version, such as `OPENRAG_VERSION=0.1.33`.
However, when you upgrade the Python package, OpenRAG automatically attempts to keep the `OPENRAG_VERSION` synchronized with the Python package version.
You might need to edit the `.env` file after upgrading the Python package to enforce a different container version.
The TUI warns you if it detects a version mismatch.
:::
If you get an error that `langflow container already exists` error during upgrade, see [Langflow container already exists during upgrade](/support/troubleshoot#langflow-container-already-exists-during-upgrade).
7. After the containers start, click **Close**, and then click **Launch OpenRAG**.
## Upgrade self-managed deployments
<PartialExportFlows />
2. Fetch and apply the latest container images while preserving your OpenRAG data:
```bash title="Docker"
docker compose pull
docker compose up -d --force-recreate
```
```bash title="Podman"
podman compose pull
podman compose up -d --force-recreate
```
By default, OpenRAG's `docker-compose` files pull the latest container images.
3. After the containers start, access the OpenRAG application at `http://localhost:3000`.
## See also
* [Manage OpenRAG services](/manage-services)
* [Troubleshoot OpenRAG](/support/troubleshoot)

View file

@ -1,68 +0,0 @@
---
title: What is OpenRAG?
slug: /
hide_table_of_contents: true
---
OpenRAG is an open-source package for building agentic RAG systems that integrates with a wide range of orchestration tools, databases, and LLM providers.
OpenRAG connects and amplifies three popular, proven open-source projects into one powerful platform:
* [Langflow](https://docs.langflow.org): Langflow is a versatile tool for building and deploying AI agents and MCP servers. It supports all major LLMs, popular vector databases, and a growing library of AI tools.
OpenRAG uses several built-in flows, and it provides full access to all Langflow features through the embedded Langflow visual editor.
By customizing the built-in flows or creating your own flows, every part of the OpenRAG stack interchangeable. You can modify any aspect of the flows from basic settings, like changing the language model, to replacing entire components. You can also write your own custom Langflow components, integrate MCP servers, call APIs, and leverage any other functionality provided by Langflow.
* [OpenSearch](https://docs.opensearch.org/latest/): 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.
It provides powerful hybrid search capabilities with enterprise-grade security and multi-tenancy support.
OpenRAG uses OpenSearch as the underlying database for storing and retrieving your documents and associated vector data (embeddings). You can ingest documents from a variety of sources, including your local filesystem and OAuth authenticated connectors to popular cloud storage services.
* [Docling](https://docling-project.github.io/docling/): Docling simplifies document processing, supports many file formats and advanced PDF parsing, and provides seamless integrations with the generative AI ecosystem.
OpenRAG uses Docling to parse and chunk documents that are stored in your OpenSearch knowledge base.
:::tip
Ready to get started? Try the [quickstart](/quickstart) to install OpenRAG and start exploring in minutes.
:::
## OpenRAG architecture
OpenRAG deploys and orchestrates a lightweight, container-based architecture that combines **Langflow**, **OpenSearch**, and **Docling** into a cohesive RAG platform.
```mermaid
---
config:
theme: 'base'
themeVariables:
lineColor: '#2e8555'
---
flowchart TD
subgraph Containers
backend[OpenRAG backend] --> langflow[Langflow]
langflow <--> opensearch[OpenSearch]
backend <--> frontend[OpenRAG frontend]
end
subgraph local [Local services]
docling[Docling Serve]
end
subgraph ext [External connectors]
drive1[Google Drive]
drive2[OneDrive]
drive3[SharePoint]
drive4[Others]
end
local --> backend
ext --> backend
```
* **OpenRAG backend**: The central orchestration service that coordinates all other components.
* **Langflow**: This container runs a Langflow instance. It provides the embedded Langflow visual editor for editing and creating flow, and it connects to the **OpenSearch** container for document storage and retrieval.
* **Docling Serve**: This is a local document processing service managed by the **OpenRAG backend**.
* **External connectors**: Integrate third-party cloud storage services with OAuth authenticated connectors to the **OpenRAG backend**, allowing you to load documents from external storage to your OpenSearch knowledge base.
* **OpenRAG frontend**: Provides the user interface for interacting with the OpenRAG platform.

View file

@ -1,12 +0,0 @@
---
title: OpenRAG APIs and SDKs
slug: /reference/api-sdk-overview
---
You can use OpenRAG's APIs and SDKs to integrate and extend OpenRAG's capabilities:
* [Python SDK](https://github.com/langflow-ai/openrag/tree/main/sdks/python)
* [TypeScript/JavaScript SDK](https://github.com/langflow-ai/openrag/tree/main/sdks/typescript)
<!-- TBD: MCP: See https://github.com/langflow-ai/openrag/pull/729 -->
<!-- TBD: API Reference: See https://github.com/langflow-ai/openrag/issues/734 -->

View file

@ -1,140 +0,0 @@
---
title: Environment variables
slug: /reference/configuration
---
import PartialDockerComposeUp from '@site/docs/_partial-docker-compose-up.mdx';
OpenRAG's `.env` file is the primary configuration file for OpenRAG.
Environment variables in `.env` always take precedence over other sources.
For deployments managed with the Terminal User Interface (TUI), this file is located at `~/.openrag/tui`, and it can be created automatically during [installation](/install-options).
For [self-managed deployments](/docker), this file can be located at the root of your OpenRAG project directory or referenced from another location.
For an example, see [`.env.example` in the OpenRAG repository](https://github.com/langflow-ai/openrag/blob/main/.env.example).
:::tip
OpenRAG's Docker Compose files are populated automatically using values from the `.env` file, so you don't need to edit the Docker Compose files manually.
:::
If a variable isn't set, OpenRAG uses default or fallback values where available.
Not all variables have default values, and errors can occur if required variables aren't set.
Default values can be found in the reference tables on this page and in [`config_manager.py`](https://github.com/langflow-ai/openrag/blob/main/src/config/config_manager.py), [`settings.py`](https://github.com/langflow-ai/openrag/blob/main/src/config/settings.py), and [`logging_config.py`](https://github.com/langflow-ai/openrag/blob/main/src/utils/logging_config.py).
You can [temporarily set Langflow variables at runtime](/agents#modify-a-flow-at-runtime).
However, these temporary overrides don't overlap with most OpenRAG environment variables.
The only exceptions are flow-level Langflow settings, such as the language model used in a flow.
## Edit the `.env` file {#set-environment-variables}
During [installation](/install-options), an initial `.env` file is created automatically or manually.
You can edit this file to change OpenRAG configuration settings after installation.
Each OpenRAG environment variable is either mutable or immutable.
This determines the actions you must take to apply changes after editing the `.env` file:
* **Mutable environment variables**: You can apply changes to mutable environment variables by [stopping and restarting the OpenRAG services](/manage-services) after editing the `.env` file.
* **Immutable environment variables**: You must [redeploy OpenRAG](/reinstall) with your modified `.env` file if you change immutable environment variables.
## Model provider settings {#model-provider-settings}
Configure which models and providers OpenRAG uses to generate text and embeddings.
You only need to provide credentials for the providers you are using in OpenRAG.
These variables are initially set during the [application onboarding process](/install#application-onboarding).
Some of these variables are immutable and can only be changed by redeploying OpenRAG, as explained in [Set environment variables](#set-environment-variables).
| Variable | Default | Description |
|----------|---------|-------------|
| `EMBEDDING_MODEL` | `text-embedding-3-small` | Embedding model for generating vector embeddings for documents in the knowledge base and similarity search queries. Can be changed after the application onboarding process. Accepts one or more models. |
| `LLM_MODEL` | `gpt-4o-mini` | Language model for language processing and text generation in the **Chat** feature. |
| `MODEL_PROVIDER` | `openai` | Model provider, as one of `openai`, `watsonx`, `ollama`, or `anthropic`. |
| `ANTHROPIC_API_KEY` | Not set | API key for the Anthropic language model provider. |
| `OPENAI_API_KEY` | Not set | API key for the OpenAI model provider, which is also the default model provider. |
| `OLLAMA_ENDPOINT` | Not set | Custom provider endpoint for the Ollama model provider. |
| `WATSONX_API_KEY` | Not set | API key for the IBM watsonx.ai model provider. |
| `WATSONX_ENDPOINT` | Not set | Custom provider endpoint for the IBM watsonx.ai model provider. |
| `WATSONX_PROJECT_ID` | Not set | Project ID for the IBM watsonx.ai model provider. |
## Document processing settings {#document-processing-settings}
Control how OpenRAG [processes and ingests documents](/ingestion) into your knowledge base.
Most of these settings can be configured on the OpenRAG **Settings** page or in the `.env` file.
| Variable | Default | Description |
|----------|---------|-------------|
| `CHUNK_OVERLAP` | `200` | Overlap between chunks. |
| `CHUNK_SIZE` | `1000` | Text chunk size for document processing. |
| `DISABLE_INGEST_WITH_LANGFLOW` | `false` | Disable Langflow ingestion pipeline. |
| `DOCLING_OCR_ENGINE` | Set by OS | OCR engine for document processing. For macOS, `ocrmac`. For any other OS, `easyocr`. |
| `DOCLING_SERVE_URL` | `http://**HOST_IP**:5001` | URL for the [Docling Serve instance](/knowledge#select-a-docling-implementation). By default, OpenRAG starts a local `docling serve` process and auto-detects the host. To use your own local or remote Docling Serve instance, set this variable to the full path to the target instance. The service must run on port 5001. |
| `OCR_ENABLED` | `false` | Enable OCR for image processing. |
| `OPENRAG_DOCUMENTS_PATH` | `~/.openrag/documents` | The [local documents path](/knowledge#set-the-local-documents-path) for ingestion. |
| `PICTURE_DESCRIPTIONS_ENABLED` | `false` | Enable picture descriptions. |
## Langflow settings {#langflow-settings}
Configure the OpenRAG Langflow server's authentication, contact point, and built-in flow definitions.
:::info
The `LANGFLOW_SUPERUSER_PASSWORD` is set in your `.env` file, and this value determines the default values for several other Langflow authentication variables.
If the `LANGFLOW_SUPERUSER_PASSWORD` variable isn't set, then the Langflow server starts _without_ authentication enabled.
For better security, it is recommended to set `LANGFLOW_SUPERUSER_PASSWORD` so the [Langflow server starts with authentication enabled](https://docs.langflow.org/api-keys-and-authentication#start-a-langflow-server-with-authentication-enabled).
:::
| Variable | Default | Description |
|----------|---------|-------------|
| `LANGFLOW_AUTO_LOGIN` | Determined by `LANGFLOW_SUPERUSER_PASSWORD` | Whether to enable [auto-login mode](https://docs.langflow.org/api-keys-and-authentication#langflow-auto-login) for the Langflow visual editor and CLI. If `LANGFLOW_SUPERUSER_PASSWORD` isn't set, then `LANGFLOW_AUTO_LOGIN` is `True` and auto-login mode is enabled. If `LANGFLOW_SUPERUSER_PASSWORD` is set, then `LANGFLOW_AUTO_LOGIN` is `False` and auto-login mode is disabled. Langflow API calls always require authentication with a Langflow API key regardless of the auto-login setting. |
| `LANGFLOW_ENABLE_SUPERUSER_CLI` | Determined by `LANGFLOW_SUPERUSER_PASSWORD` | Whether to enable the [Langflow CLI `langflow superuser` command](https://docs.langflow.org/api-keys-and-authentication#langflow-enable-superuser-cli). If `LANGFLOW_SUPERUSER_PASSWORD` isn't set, then `LANGFLOW_ENABLE_SUPERUSER_CLI` is `True` and superuser accounts can be created with the Langflow CLI. If `LANGFLOW_SUPERUSER_PASSWORD` is set, then `LANGFLOW_ENABLE_SUPERUSER_CLI` is `False` and the `langflow superuser` command is disabled. |
| `LANGFLOW_NEW_USER_IS_ACTIVE` | Determined by `LANGFLOW_SUPERUSER_PASSWORD` | Whether new [Langflow user accounts are active by default](https://docs.langflow.org/api-keys-and-authentication#langflow-new-user-is-active). If `LANGFLOW_SUPERUSER_PASSWORD` isn't set, then `LANGFLOW_NEW_USER_IS_ACTIVE` is `True` and new user accounts are active by default. If `LANGFLOW_SUPERUSER_PASSWORD` is set, then `LANGFLOW_NEW_USER_IS_ACTIVE` is `False` and new user accounts are inactive by default. |
| `LANGFLOW_PUBLIC_URL` | `http://localhost:7860` | Public URL for the Langflow instance. Forms the base URL for Langflow API calls and other interfaces with your OpenRAG Langflow instance. |
| `LANGFLOW_KEY` | Automatically generated | A Langflow API key to run flows with Langflow API calls. Because Langflow API keys are server-specific, allow OpenRAG to generate this key initially. You can create additional Langflow API keys after deploying OpenRAG. |
| `LANGFLOW_SECRET_KEY` | Automatically generated | Secret encryption key for Langflow internal operations. It is recommended to [generate your own Langflow secret key](https://docs.langflow.org/api-keys-and-authentication#langflow-secret-key) for this variable. If this variable isn't set, then Langflow generates a secret key automatically. |
| `LANGFLOW_SUPERUSER` | `admin` | Username for the Langflow administrator user. |
| `LANGFLOW_SUPERUSER_PASSWORD` | Not set | Langflow administrator password. If this variable isn't set, then the Langflow server starts _without_ authentication enabled. It is recommended to set `LANGFLOW_SUPERUSER_PASSWORD` so the [Langflow server starts with authentication enabled](https://docs.langflow.org/api-keys-and-authentication#start-a-langflow-server-with-authentication-enabled). |
| `LANGFLOW_URL` | `http://localhost:7860` | URL for the Langflow instance. |
| `LANGFLOW_CHAT_FLOW_ID`, `LANGFLOW_INGEST_FLOW_ID`, `NUDGES_FLOW_ID` | Built-in flow IDs | These variables are set automatically to the IDs of the chat, ingestion, and nudges [flows](/agents). The default values are found in [`.env.example`](https://github.com/langflow-ai/openrag/blob/main/.env.example). Only change these values if you want to replace a built-in flow with your own custom flow. The flow JSON must be present in your version of the OpenRAG codebase. For example, if you [deploy self-managed services](/docker), you can add the flow JSON to your local clone of the OpenRAG repository before deploying OpenRAG. |
| `SYSTEM_PROMPT` | `You are a helpful AI assistant with access to a knowledge base. Answer questions based on the provided context.` | System prompt instructions for the agent driving the **Agent** flow (OpenRAG **Chat**). |
## OAuth provider settings
Configure [OAuth providers](/ingestion#oauth-ingestion) and external service integrations.
| Variable | Default | Description |
|----------|---------|-------------|
| `AWS_ACCESS_KEY_ID`<br/>`AWS_SECRET_ACCESS_KEY` | Not set | Enable access to AWS S3 with an [AWS OAuth app](https://docs.aws.amazon.com/singlesignon/latest/userguide/manage-your-applications.html) integration. |
| `GOOGLE_OAUTH_CLIENT_ID`<br/>`GOOGLE_OAUTH_CLIENT_SECRET` | Not set | Enable the [Google OAuth client](https://developers.google.com/identity/protocols/oauth2) integration. You can generate these values in the [Google Cloud Console](https://console.cloud.google.com/apis/credentials). |
| `MICROSOFT_GRAPH_OAUTH_CLIENT_ID`<br/>`MICROSOFT_GRAPH_OAUTH_CLIENT_SECRET` | Not set | Enable the [Microsoft Graph OAuth client](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/graph-oauth) integration by providing [Azure application registration credentials for SharePoint and OneDrive](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/app-registration?view=odsp-graph-online). |
| `WEBHOOK_BASE_URL` | Not set | Base URL for OAuth connector webhook endpoints. If this variable isn't set, a default base URL is used. |
## OpenSearch settings
Configure OpenSearch database authentication.
| Variable | Default | Description |
|----------|---------|-------------|
| `OPENSEARCH_HOST` | `localhost` | OpenSearch instance host. |
| `OPENSEARCH_PORT` | `9200` | OpenSearch instance port. |
| `OPENSEARCH_USERNAME` | `admin` | OpenSearch administrator username. |
| `OPENSEARCH_PASSWORD` | Must be set at start up | Required. OpenSearch administrator password. Must adhere to the [OpenSearch password complexity requirements](https://docs.opensearch.org/latest/security/configuration/demo-configuration/#setting-up-a-custom-admin-password). You must set this directly in the `.env` or in the TUI's [**Basic/Advanced Setup**](/install#setup). |
## System settings
Configure general system components, session management, and logging.
| Variable | Default | Description |
|----------|---------|-------------|
| `LANGFLOW_KEY_RETRIES` | `15` | Number of retries for Langflow key generation. |
| `LANGFLOW_KEY_RETRY_DELAY` | `2.0` | Delay between retries in seconds. |
| `LANGFLOW_VERSION` | `OPENRAG_VERSION` | Langflow Docker image version. By default, OpenRAG uses the `OPENRAG_VERSION` for the Langflow Docker image version. |
| `LOG_FORMAT` | Not set | Set to `json` to enabled JSON-formatted log output. If this variable isn't set, then the default logging format is used. |
| `LOG_LEVEL` | `INFO` | Logging level. Can be one of `DEBUG`, `INFO`, `WARNING`, or `ERROR`. `DEBUG` provides the most detailed logs but can impact performance. |
| `MAX_WORKERS` | `1` | Maximum number of workers for document processing. |
| `OPENRAG_VERSION` | `latest` | The version of the OpenRAG Docker images to run. For more information, see [Upgrade OpenRAG](/upgrade) |
| `SERVICE_NAME` | `openrag` | Service name for logging. |
| `SESSION_SECRET` | Automatically generated | Session management. |

View file

@ -1,155 +0,0 @@
---
title: Contribute to OpenRAG
slug: /support/contribute
---
There are several ways you can interact with the OpenRAG community and contribute to the OpenRAG codebase.
## Star OpenRAG on GitHub
If you like OpenRAG, you can star the [OpenRAG GitHub repository](https://github.com/langflow-ai/openrag).
Stars help other users find OpenRAG more easily, and quickly understand that other users have found it useful.
Because OpenRAG is open-source, the more visible the repository is, the more likely the codebase is to attract contributors.
## Watch the GitHub repository
You can watch the [OpenRAG GitHub repository](https://github.com/langflow-ai/openrag) to get notified about new releases and other repository activity.
To get release notifications only, select **Releases only**.
If you select **Watching**, you will receive notifications about new releases as well as issues, discussions, and pull requests. For information about customizing repository notifications, see the [GitHub documentation on repository subscriptions](https://docs.github.com/en/subscriptions-and-notifications/how-tos/managing-subscriptions-for-activity-on-github/viewing-your-subscriptions).
## Request enhancements and get help through GitHub
You can report bugs, submit feature requests, and get help with OpenRAG through the GitHub repository.
The repository is the best place to report bugs and request enhancements to ensure that they are tracked by OpenRAG maintainers.
### GitHub issues
The [Issues page in the OpenRAG repository](https://github.com/langflow-ai/openrag/issues) is actively updated with bugs and feature requests.
:::tip
The best way to promote a request or bug is to comment on an existing issue that matches your request.
Before you report a bug or submit a feature request, search for existing similar issues.
If you find one, add a comment with any relevant details instead of opening a new issue.
Highly active issues are more likely to receive attention from contributors.
:::
Feature planning for OpenRAG is tracked through the [Projects page in the OpenRAG repository](https://github.com/langflow-ai/openrag/projects).
### GitHub discussions
If you need help with your code or OpenRAG in general, you can visit the [OpenRAG GitHub Discussions page](https://github.com/langflow-ai/openrag/discussions).
The OpenRAG team doesn't provide individual support over email, and the team believes that public discussions help more users by virtue of their discoverability.
## Community guidelines and tips
Because the OpenRAG repository is public, the OpenRAG team asks that you follow these guidelines when submitting questions and issues:
* **Provide as many details as possible**: Simply stating that a feature doesn't work isn't helpful. The OpenRAG team needs details in order to recreate and find the issue.
* **Explain what exactly went wrong**: Include error messages and descriptions of _how_ your code failed, not just the fact that it failed.
* **Retrace your steps**: Explain what happened before the error, what you expected to happen instead of the error, and any recent changes you made, such as upgrading OpenRAG or a dependency.
* **Describe your environment**: Include your operating system, OpenRAG version, Python version, and any other environment-related details that could have contributed to the issue.
* **Include snippets of the code that failed**: Be sure to omit any sensitive values, and only provide parts that are relevant to the failure rather than the entire script. Providing code snippets makes it much easier to reproduce errors, troubleshoot, and provide specific advice.
* If your submission includes long sections of code, logs, or tracebacks, wrap them in [details tags](https://developer.mozilla.org/en/docs/Web/HTML/Element/details) (`<details> PASTE CODE HERE </details>`) to collapse the content and make it easier to read your submission.
* **Omit sensitive information**: Other than the information available on your public GitHub profile, don't include sensitive or personally identifying data, such as security keys, full names, personal identification numbers, addresses, and phone numbers.
* **Be kind**: Although bugs can be frustrating with any software, remember that your messages are read by real people who want to help. While you don't have to be saccharine, there's no need to be rude to get support.
* Your issues and discussions are attached to your GitHub account, and they can be read by anyone on the internet, including current and potential employers and colleagues.
* The OpenRAG repository is a public GitHub repository and, therefore, subject to the [GitHub Code of Conduct](https://docs.github.com/en/site-policy/github-terms/github-community-code-of-conduct).
## Contribute to the codebase
If you want to contribute code to OpenRAG, you can do so by submitting a pull request (PR) to the OpenRAG GitHub repository.
See [CONTRIBUTING.md](https://github.com/langflow-ai/openrag/blob/main/CONTRIBUTING.md) to set up your development environment and learn about the contribution process.
### Tips for successful submissions
* Explain the motivation for your submission in the PR description.
Clarify how the change benefits the OpenRAG codebase and its users.
* Keep PRs small and focused on a single change or set of related changes.
* If applicable, include tests that verify your changes.
* Add documentation for new features, or edit existing documentation (if needed) when modifying existing code.
For more information, see [Contribute documentation](#contribute-documentation).
### Use of AI tools in contributions
If you use AI tools to generate significant portions of the code in your PR, the OpenRAG team asks that you do the following:
* Consider disclosing significant use of AI tools in your pull request description, particularly if you are unable to expertly review your own code contributions. For example: `I used an AI tool to generate the code for <function>, but I am not an expert in <language>. There might be some inefficiencies or antipatterns present.`
* Avoid using AI tools to generate large volumes of code if you don't have personal knowledge of that language and the functionality being implemented. Instead, consider submitting a feature request to the [Issues page in the OpenRAG repository](https://github.com/langflow-ai/openrag/issues).
* Be critical when reviewing code or documentation generated by AI tools to ensure it is accurate, efficient, and avoids antipatterns and vulnerabilities.
* Don't flood the repository with AI-generated pull requests.
Low quality and spam contributions can be closed without review at the discretion of the maintainers.
Repeated low-quality contributions can lead to a ban on contributions.
## Contribute documentation {#contribute-documentation}
The OpenRAG documentation is built using [Docusaurus](https://docusaurus.io/) and written in [Markdown](https://docusaurus.io/docs/markdown-features).
For style guidance, see the [Google Developer Documentation Style Guide](https://developers.google.com/style).
1. Install [Node.js](https://nodejs.org/en/download/package-manager).
2. Fork the [OpenRAG GitHub repository](https://github.com/langflow-ai/openrag).
3. Add the new remote to your local repository on your local machine:
```bash
git remote add FORK_NAME https://github.com/GIT_USERNAME/openrag.git
```
Replace the following:
* `FORK_NAME`: A name for your fork of the repository
* `GIT_USERNAME`: Your Git username
4. Change to the `/docs` directory in your local repository:
```bash
cd openrag/docs
```
If you're running a development container for code contributions, run the documentation build from outside the container on your host terminal.
The documentation build might not work properly when run from inside the development container workspace.
5. Install dependencies and start a local Docusaurus static site with hot reload:
```bash
npm install
npm start
```
The documentation is served at `http://localhost:3000`.
6. To edit and create content, work with the `.mdx` files in the `openrag/docs/docs` directory.
Create new files in `.mdx` format.
Navigation is defined in `openrag/docs/sidebars.js`.
Most pages use a `slug` for shorthand cross-referencing, rather than supplying the full or relative directory path.
For example, if a page has a `slug` of `/cool-page`, you can link to it with `[Cool page](/cool-page)` from any other `/docs` page.
7. Recommended: After making some changes, run `npm run build` to build the site locally with more robust logging.
This can help you find broken links before creating a PR.
8. Create a pull request against the `main` branch of the OpenRAG repository with a clear title and description of your changes:
* Provide a clear title in the format of `Docs: <summary of change>`. For example, `Docs: fix broken link on contributing page`. Pull request titles appear in OpenRAG's release notes, so they should explain what the PR does as explicitly as possible.
* Explain why and how you made the changes in the pull request description.
* If the pull request closes an issue, include `Closes #NUMBER` in the description, such as `Closes #1234`.
* If you used AI tools to write significant portions of the documentation, consider disclosing this in the PR description.
9. Add the `documentation` label to your pull request.
10. Keep an eye on your pull request in case an OpenRAG maintainer requests changes or asks questions.
OpenRAG technical writers can directly edit documentation PRs to enforce style guidelines and fix errors.

View file

@ -1,162 +0,0 @@
---
title: Troubleshoot OpenRAG
slug: /support/troubleshoot
---
import PartialOllamaModels from '@site/docs/_partial-ollama-models.mdx';
This page provides troubleshooting advice for issues you might encounter when using OpenRAG or contributing to OpenRAG.
## Installation and start up issues
The following issues relate to OpenRAG installation and start up.
### OpenSearch fails to start
Check that the value of the `OPENSEARCH_PASSWORD` [environment variable](/reference/configuration) meets the [OpenSearch password complexity requirements](https://docs.opensearch.org/latest/security/configuration/demo-configuration/#setting-up-a-custom-admin-password).
If you need to change the password, you must [reset the OpenRAG services](/manage-services).
### OpenRAG fails to start from the TUI with operation not supported
This error occurs when starting OpenRAG with the TUI in [WSL (Windows Subsystem for Linux)](https://learn.microsoft.com/en-us/windows/wsl/install).
The error occurs because OpenRAG is running within a WSL environment, so `webbrowser.open()` can't launch a browser automatically.
To access the OpenRAG application, open a web browser and enter `http://localhost:3000` in the address bar.
### OpenRAG installation fails with unable to get local issuer certificate
If you are installing OpenRAG on macOS, and the installation fails with `unable to get local issuer certificate`, run the following command, and then retry the installation:
```bash
open "/Applications/Python VERSION/Install Certificates.command"
```
Replace `VERSION` with your installed Python version, such as `3.13`.
### Application onboarding gets stuck on Google Chrome
If the OpenRAG onboarding process gets stuck when using Google Chrome, try clearing your browser's cache.
## Langflow connection issues
Verify that the value of the `LANGFLOW_SUPERUSER` environment variable is correct.
For more information about this variable and how this variable controls Langflow access, see [Langflow settings](/reference/configuration#langflow-settings).
## Container out of memory errors {#container-out-of-memory-errors}
Increase your container VM's allocated memory, or use a CPU-only deployment to reduce memory usage.
For TUI-managed deployments, you can enable **CPU mode** on the TUI's **Status** page.
For self-managed deployments, CPU-only deployments use the `docker-compose.yml` file that doesn't have GPU overrides.
## Memory issue with Podman on macOS {#memory-issue-with-podman-on-macos}
If you're using Podman on macOS, you might need to increase VM memory on your Podman machine.
This example increases the machine size to 8 GB of RAM, which is the minimum recommended RAM for OpenRAG:
```bash
podman machine stop
podman machine rm
podman machine init --memory 8192 # 8 GB example
podman machine start
```
## Port conflicts
With the default [environment variable](/reference/configuration) values, OpenRAG requires the following ports to be available on the host machine:
* 3000: Langflow application
* 5001: Docling local ingestion service
* 5601: OpenSearch Dashboards
* 7860: Docling UI
* 8000: Docling API
* 9200: OpenSearch service
## OCR ingestion fails (easyocr not installed) {#ocr-ingestion-fails-easyocr-not-installed}
Docling ingestion can fail with an OCR-related error that mentions `easyocr` is missing.
This is likely due to a stale `uv` cache when you [install OpenRAG with `uvx`](/install-uvx).
When you invoke OpenRAG with `uvx openrag`, `uvx` creates a cached, ephemeral environment that doesn't modify your project.
The location and path of this cache depends on your operating system.
For example, on macOS, this is typically a user cache directory, such as `~/.cache/uv`.
This cache can become stale, producing errors like missing dependencies.
1. If the TUI is open, press <kbd>q</kbd> to exit the TUI.
2. Clear the `uv` cache:
```bash
uv cache clean
```
To clear the OpenRAG cache only, run:
```bash
uv cache clean openrag
```
3. Invoke OpenRAG to restart the TUI:
```bash
uvx openrag
```
4. Click **Launch OpenRAG**, and then retry document ingestion.
If you install OpenRAG with `uv`, dependencies are synced directly from your `pyproject.toml` file.
This should automatically install `easyocr` because `easyocr` is included as a dependency in OpenRAG's `pyproject.toml`.
If you don't need OCR, you can disable OCR-based processing in your [ingestion settings](/knowledge#knowledge-ingestion-settings) to avoid requiring `easyocr`.
## Upgrade fails due to Langflow container already exists {#langflow-container-already-exists-during-upgrade}
If you encounter a `langflow container already exists` error when upgrading OpenRAG, this typically means you upgraded OpenRAG with `uv`, but you didn't remove or upgrade containers from a previous installation.
To resolve this issue, do the following:
1. Remove only the Langflow container:
1. Stop the Langflow container:
```bash title="Docker"
docker stop langflow
```
```bash title="Podman"
podman stop langflow
```
2. Remove the Langflow container:
```bash title="Docker"
docker rm langflow --force
```
```bash title="Podman"
podman rm langflow --force
```
2. Retry the [upgrade](/upgrade).
3. If reinstalling the Langflow container doesn't resolve the issue, then you must [reset all containers](/manage-services) or [reinstall OpenRAG](/reinstall).
4. Retry the [upgrade](/upgrade).
If no updates are available after reinstalling OpenRAG, then you reinstalled at the latest version, and your deployment is up to date.
## Document ingestion or similarity search issues
See [Troubleshoot ingestion](/ingestion#troubleshoot-ingestion).
## Ollama model issues
<PartialOllamaModels />
## Chat issues
See [Troubleshoot chat](/chat#troubleshoot-chat).

View file

@ -1,278 +0,0 @@
// @ts-check
// `@type` JSDoc annotations allow editor autocompletion and type checking
// (when paired with `@ts-check`).
// There are various equivalent ways to declare your Docusaurus config.
// See: https://docusaurus.io/docs/api/docusaurus-config
import {themes as prismThemes} from 'prism-react-renderer';
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
const isProduction = process.env.NODE_ENV === 'production';
/** @type {import('@docusaurus/types').Config} */
const config = {
title: 'OpenRAG',
tagline: 'Open Source RAG Platform',
favicon: 'img/favicon.ico',
headTags: [
...(isProduction
? [
// Google Consent Mode - Set defaults before Google tags load
{
tagName: "script",
attributes: {},
innerHTML: `
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
// Set default consent to denied
gtag('consent', 'default', {
'ad_storage': 'denied',
'ad_user_data': 'denied',
'ad_personalization': 'denied',
'analytics_storage': 'denied'
});
`,
},
// TrustArc Consent Update Listener
{
tagName: "script",
attributes: {},
innerHTML: `
(function() {
function updateGoogleConsent() {
if (typeof window.truste !== 'undefined' && window.truste.cma) {
var consent = window.truste.cma.callApi('getConsent', window.location.href) || {};
// Map TrustArc categories to Google consent types
// Category 0 = Required, 1 = Functional, 2 = Advertising, 3 = Analytics
var hasAdvertising = consent[2] === 1;
var hasAnalytics = consent[3] === 1;
gtag('consent', 'update', {
'ad_storage': hasAdvertising ? 'granted' : 'denied',
'ad_user_data': hasAdvertising ? 'granted' : 'denied',
'ad_personalization': hasAdvertising ? 'granted' : 'denied',
'analytics_storage': hasAnalytics ? 'granted' : 'denied'
});
}
}
// Listen for consent changes
if (window.addEventListener) {
window.addEventListener('cm_data_subject_consent_changed', updateGoogleConsent);
window.addEventListener('cm_consent_preferences_set', updateGoogleConsent);
}
// Initial check after TrustArc loads
if (document.readyState === 'complete') {
updateGoogleConsent();
} else {
window.addEventListener('load', updateGoogleConsent);
}
})();
`,
},
// IBM Analytics Configuration (required for TrustArc)
{
tagName: "script",
attributes: {},
innerHTML: `
window._ibmAnalytics = {
"settings": {
"name": "DataStax",
"tealiumProfileName": "ibm-subsidiary",
},
"trustarc": {
"privacyPolicyLink": "https://ibm.com/privacy"
}
};
window.digitalData = {
"page": {
"pageInfo": {
"ibm": {
"siteId": "IBM_DataStax",
}
},
"category": {
"primaryCategory": "PC230"
}
}
};
`,
},
// IBM Common Stats Script - loads TrustArc
{
tagName: "script",
attributes: {
src: "//1.www.s81c.com/common/stats/ibm-common.js",
async: "true",
},
},
]
: []),
],
// Future flags, see https://docusaurus.io/docs/api/docusaurus-config#future
future: {
v4: true, // Improve compatibility with the upcoming Docusaurus v4
},
// Set the production url of your site here
url: 'https://docs.openr.ag',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: process.env.BASE_URL ? process.env.BASE_URL : '/',
// Control search engine indexing - set to true to prevent indexing
noIndex: false,
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'langflow-ai', // Usually your GitHub org/user name.
projectName: 'openrag', // Usually your repo name.
onBrokenLinks: 'throw',
markdown: {
mermaid: true,
hooks: {
onBrokenMarkdownLinks: 'warn',
},
},
// Even if you don't use internationalization, you can use this field to set
// useful metadata like html lang. For example, if your site is Chinese, you
// may want to replace "en" with "zh-Hans".
i18n: {
defaultLocale: 'en',
locales: ['en'],
},
presets: [
[
'classic',
/** @type {import('@docusaurus/preset-classic').Options} */
({
docs: {
sidebarPath: './sidebars.js',
// Please change this to your repo.
// Remove this to remove the "edit this page" links.
editUrl:
'https://github.com/openrag/openrag/tree/main/docs/',
routeBasePath: '/',
// Versioning configuration - see VERSIONING_SETUP.md
// To enable versioning, uncomment the following lines:
// lastVersion: 'current',
// versions: {
// current: {
// label: 'Next (unreleased)',
// path: 'next',
// },
// },
// onlyIncludeVersions: ['current'],
},
theme: {
customCss: './src/css/custom.css',
},
// Use preset-classic sitemap https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-sitemap
sitemap: {
lastmod: 'date',
changefreq: 'weekly',
priority: 0.5,
ignorePatterns: ['/tags/**'],
filename: 'sitemap.xml',
createSitemapItems: async (params) => {
const {defaultCreateSitemapItems, ...rest} = params;
const items = await defaultCreateSitemapItems(rest);
return items.filter((item) => !item.url.includes('/page/'));
},
},
}),
],
],
plugins: [require.resolve('docusaurus-plugin-image-zoom')],
themes: ['@docusaurus/theme-mermaid'],
themeConfig:
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
({
// Replace with your project's social card
// image: 'img/docusaurus-social-card.jpg',
navbar: {
// title: 'OpenRAG',
logo: {
alt: 'OpenRAG Logo',
src: "img/logo-openrag-light.svg",
srcDark: "img/logo-openrag-dark.svg",
href: '/',
},
items: [
{
position: "right",
href: "https://github.com/langflow-ai/openrag",
className: "header-github-link",
target: "_blank",
rel: null,
'aria-label': 'GitHub repository',
},
],
},
footer: {
links: [
{
title: null,
items: [
{
html: `<div class="footer-links">
<span>© ${new Date().getFullYear()} OpenRAG</span>
<span id="preferenceCenterContainer"> ·&nbsp; <a href="#" onclick="if(typeof window !== 'undefined' && window.truste && window.truste.eu && window.truste.eu.clickListener) { window.truste.eu.clickListener(); } return false;" style="cursor: pointer;">Manage Privacy Choices</a></span>
</div>`,
},
],
},
],
},
algolia: {
appId: "SMEA51Q5OL",
// public key, safe to commit
apiKey: "b2ec302e9880e8979ad6a68f0c36271e",
indexName: "openrag-algolia",
contextualSearch: true,
searchParameters: {},
searchPagePath: "search",
},
prism: {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
additionalLanguages: ['bash', 'docker', 'yaml'],
},
mermaid: {
theme: {light: 'neutral', dark: 'forest'},
options: {
maxTextSize: 50000,
fontSize: 18,
fontFamily: 'Arial, sans-serif',
useMaxWidth: false,
width: '100%',
height: 'auto',
},
},
zoom: {
selector: '.markdown img',
background: {
light: 'rgb(255, 255, 255)',
dark: 'rgb(50, 50, 50)',
},
config: {
margin: 24,
scrollOffset: 0,
},
},
}),
};
export default config;

19432
docs/package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,51 +0,0 @@
{
"name": "openrag-docs",
"version": "0.0.0",
"private": true,
"scripts": {
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "docusaurus build",
"build:pdf": "rm -f ../openrag-documents/openrag-documentation.pdf && npm run build && npm run serve & sleep 10 && npx docusaurus-to-pdf && pkill -f 'docusaurus serve'",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
"serve": "docusaurus serve",
"write-translations": "docusaurus write-translations",
"write-heading-ids": "docusaurus write-heading-ids",
"typecheck": "tsc"
},
"dependencies": {
"@docusaurus/core": "3.9.2",
"@docusaurus/preset-classic": "3.9.2",
"@docusaurus/theme-mermaid": "3.9.2",
"@mdx-js/react": "^3.0.0",
"clsx": "^2.0.0",
"docusaurus-plugin-image-zoom": "^3.0.1",
"lucide-react": "^0.555.0",
"prism-react-renderer": "^2.3.0",
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.9.2",
"@docusaurus/tsconfig": "3.9.2",
"@docusaurus/types": "3.9.2",
"typescript": "~5.9.3"
},
"browserslist": {
"production": [
">0.5%",
"not dead",
"not op_mini all"
],
"development": [
"last 3 chrome version",
"last 3 firefox version",
"last 5 safari version"
]
},
"engines": {
"node": ">=20.20.0"
}
}

View file

@ -1,7 +0,0 @@
{
"baseUrl": "http://localhost:3000",
"entryPoint": "http://localhost:3000",
"outputDir": "../openrag-documents/openrag-documentation.pdf",
"customStyles": "table { max-width: 3500px !important; } .navbar, .footer, .breadcrumbs { display: none !important; }",
"forceImages": true
}

View file

@ -1,93 +0,0 @@
// @ts-check
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
/**
* Creating a sidebar enables you to:
- create an ordered group of docs
- render a sidebar for each doc of that group
- provide next/previous navigation
The sidebars can be generated from the filesystem, or explicitly defined here.
Create as many sidebars as you want.
@type {import('@docusaurus/plugin-content-docs').SidebarsConfig}
*/
const sidebars = {
tutorialSidebar: [
{
type: "doc",
id: "get-started/what-is-openrag",
label: "About OpenRAG"
},
"get-started/quickstart",
{
type: "category",
label: "Installation",
items: [
"get-started/install-options",
{ type: "doc",
id: "get-started/install",
label: "Run the installer script",
},
{ type: "doc",
id: "get-started/install-uv",
label: "Install OpenRAG with uv",
},
"get-started/install-uvx",
{ type: "doc",
id: "get-started/install-windows",
label: "Install OpenRAG on Windows",
},
{ type: "doc",
id: "get-started/docker",
label: "Deploy self-managed services",
},
"get-started/upgrade",
"get-started/reinstall",
"get-started/uninstall",
],
},
"get-started/tui",
{
type: "doc",
id: "get-started/manage-services",
label: "Manage services",
},
{
type: "doc",
id: "core-components/agents",
label: "Flows",
},
{
type: "category",
label: "Knowledge",
items: [
"core-components/knowledge",
"core-components/ingestion",
"core-components/knowledge-filters",
],
},
{
type: "doc",
id: "core-components/chat",
label: "Chat",
},
"reference/configuration",
{
type: "doc",
id: "reference/api-sdk-overview",
label: "APIs and SDKs",
},
"support/contribute",
"support/troubleshoot",
{
type: "link",
label: "Changelog",
href: "https://github.com/langflow-ai/openrag/releases",
},
],
};
export default sidebars;

View file

@ -1,19 +0,0 @@
import React from "react";
import * as LucideIcons from "lucide-react";
/*
How to use this component:
import Icon from "@site/src/components/icon";
<Icon name="AlertCircle" size={24} color="red" />
*/
type IconProps = {
name: string;
};
export default function Icon({ name, ...props }: IconProps) {
const Icon = LucideIcons[name];
return Icon ? <Icon {...props} /> : null;
}

View file

@ -1,213 +0,0 @@
/**
* Any CSS included here will be global. The classic template
* bundles Infima by default. Infima is a CSS framework designed to
* work well for content-centric websites.
*/
/* You can override the default Infima variables here. */
:root {
--ifm-color-primary: #2e8555;
--ifm-color-primary-dark: #29784c;
--ifm-color-primary-darker: #277148;
--ifm-color-primary-darkest: #205d3b;
--ifm-color-primary-light: #33925d;
--ifm-color-primary-lighter: #359962;
--ifm-color-primary-lightest: #3cad6e;
--ifm-code-font-size: 95%;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1);
}
/* For readability concerns, you should choose a lighter palette in dark mode. */
[data-theme='dark'] {
--ifm-color-primary: #25c2a0;
--ifm-color-primary-dark: #21af90;
--ifm-color-primary-darker: #1fa588;
--ifm-color-primary-darkest: #1a8870;
--ifm-color-primary-light: #29d5b0;
--ifm-color-primary-lighter: #32d8b4;
--ifm-color-primary-lightest: #4fddbf;
--docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3);
}
/* Tabs Styling */
.tabs-container {
border: 1px solid var(--ifm-color-emphasis-300);
border-radius: var(--ifm-global-radius);
padding: 1rem;
margin-bottom: 1rem;
}
.tabs {
margin-bottom: 1rem;
}
.tabs__item {
border: none;
border-bottom: 1px solid var(--ifm-color-emphasis-200);
margin-right: 0rem;
padding-bottom: 0.5rem;
border-radius: 0;
}
.tabs__item:hover {
background-color: var(--ifm-hover-overlay);
}
.tabs__item--active {
border-bottom-color: var(--ifm-tabs-color-active);
}
/* GitHub Icon Button */
.header-github-link:hover {
opacity: 0.6;
}
.header-github-link:before {
content: "";
width: 24px;
height: 24px;
display: flex;
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='currentColor'%3E%3Cpath d='M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z'/%3E%3C/svg%3E") no-repeat;
}
[data-theme="dark"] .header-github-link:before {
content: "";
width: 24px;
height: 24px;
display: flex;
background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z'/%3E%3C/svg%3E") no-repeat;
}
/* Slim Footer */
.footer {
padding: 1rem 0 0;
background-color: var(--ifm-background-color);
border-top: 1px solid var(--ifm-color-emphasis-200);
}
[data-theme="light"] .footer {
border-top: 1px solid var(--ifm-color-emphasis-300);
}
.footer-content {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 var(--ifm-navbar-padding-horizontal);
max-width: var(--ifm-container-width);
margin: 0 auto;
font-size: 12px;
}
.footer__copyright {
color: var(--ifm-toc-link-color);
}
.footer-links {
display: flex;
gap: 0.5rem;
font-size: 13px;
}
.footer-links a {
color: var(--ifm-toc-link-color);
text-decoration: none;
}
.footer-links a:hover {
text-decoration: underline;
}
.footer .container {
padding: 0 1.25rem;
display: flex;
justify-content: left;
align-items: center;
flex-direction: row;
max-width: 100%;
}
.footer__title {
margin-bottom: 0;
}
/* Inline Icons */
.markdown svg,
.markdown img[src*="icon"],
.markdown .icon {
width: 16px !important;
height: 16px !important;
stroke-width: 2.5 !important;
display: inline-block;
vertical-align: middle;
}
/* Mermaid Diagram Styling - Force proper sizing */
.mermaid {
text-align: center;
margin: 2rem 0;
width: 100% !important;
min-height: 500px !important;
display: block !important;
overflow: visible !important;
}
.mermaid svg {
width: 100% !important;
max-width: none !important;
min-width: 800px !important;
min-height: 500px !important;
height: auto !important;
display: block !important;
margin: 0 auto !important;
transform: scale(1) !important;
}
/* Force Mermaid diagram sizing */
.markdown .mermaid {
width: 100% !important;
min-height: 500px !important;
display: block !important;
}
.markdown .mermaid svg {
width: 100% !important;
min-width: 800px !important;
min-height: 500px !important;
transform: scale(1) !important;
}
/* Target the specific Mermaid container */
div[class*="mermaid"] {
width: 100% !important;
min-height: 500px !important;
}
div[class*="mermaid"] svg {
width: 100% !important;
min-width: 800px !important;
min-height: 500px !important;
}
/* Force Mermaid to render at full size */
.mermaid,
.mermaid > *,
.mermaid svg,
.mermaid div,
.mermaid div svg {
width: 100% !important;
min-width: 800px !important;
min-height: 500px !important;
max-width: none !important;
display: block !important;
transform: none !important;
scale: 1 !important;
}
/* Override any potential scaling issues */
.mermaid svg {
transform: none !important;
scale: 1 !important;
viewBox: unset !important;
}

View file

1
docs/static/CNAME vendored
View file

@ -1 +0,0 @@
docs.openr.ag

View file

@ -1,451 +0,0 @@
#!/usr/bin/env bash
# --- support 'curl ... | bash' without breaking TUI --------------------------
# If this script is being read from a PIPE (curl | bash), slurp it to a temp file
# and re-exec from that file. After that, it's safe to reattach to /dev/tty.
if [ -p /dev/stdin ]; then
tmp="$(mktemp -t openrag.XXXXXX)"
# Read the entire piped script into the temp file
cat > "$tmp"
chmod +x "$tmp"
exec bash "$tmp" "$@"
fi
# Now we are running from a real file, not stdin. It is safe to reattach.
# (Only if not already attached to a TTY)
if [ ! -t 0 ] || [ ! -t 1 ] || [ ! -t 2 ]; then
if [ -e /dev/tty ]; then
exec </dev/tty >/dev/tty 2>&1
else
echo "This installer needs an interactive terminal. Try: bash <(curl -fsSL ...)" >&2
exit 1
fi
fi
set -euo pipefail
say() { printf "%s\n" "$*" >&2; }
hr() { say "----------------------------------------"; }
ask_yes_no() {
local prompt="${1:-Continue?} [Y/n] "
read -r -p "$prompt" ans || true
case "${ans:-Y}" in [Yy]|[Yy][Ee][Ss]|"") return 0 ;; *) return 1 ;; esac
}
# --- Platform detection ------------------------------------------------------
uname_s="$(uname -s 2>/dev/null || echo unknown)"
is_wsl=false
if [ -f /proc/version ]; then grep -qiE 'microsoft|wsl' /proc/version && is_wsl=true || true; fi
case "$uname_s" in
Darwin) PLATFORM="macOS" ;;
Linux) PLATFORM="$($is_wsl && echo WSL || echo Linux)" ;;
CYGWIN*|MINGW*|MSYS*) PLATFORM="Windows" ;;
*) PLATFORM="Unknown" ;;
esac
if [ "$PLATFORM" = "Windows" ]; then
say ">>> Native Windows shell detected. Please run this inside WSL (Ubuntu, etc.)."
exit 1
fi
# --- Minimal sudo (used only when necessary) --------------------------------
SUDO="sudo"; $SUDO -n true >/dev/null 2>&1 || SUDO="sudo" # may prompt later only if needed
# --- PATH probe for common bins (no sudo) -----------------------------------
ensure_path_has_common_bins() {
local add=()
[ -d /opt/homebrew/bin ] && add+=("/opt/homebrew/bin")
[ -d /usr/local/bin ] && add+=("/usr/local/bin")
[ -d "/Applications/Docker.app/Contents/Resources/bin" ] && add+=("/Applications/Docker.app/Contents/Resources/bin")
[ -d "$HOME/.docker/cli-plugins" ] && add+=("$HOME/.docker/cli-plugins")
for p in "${add[@]}"; do case ":$PATH:" in *":$p:"*) ;; *) PATH="$p:$PATH" ;; esac; done
export PATH
}
ensure_path_has_common_bins
# --- Helpers ----------------------------------------------------------------
has_cmd() { command -v "$1" >/dev/null 2>&1; }
docker_cli_path() { command -v docker 2>/dev/null || true; }
podman_cli_path() { command -v podman 2>/dev/null || true; }
docker_daemon_ready() { docker info >/dev/null 2>&1; } # no sudo; fails if socket perms/daemon issue
compose_v2_ready() { docker compose version >/dev/null 2>&1; }
compose_v1_ready() { command -v docker-compose >/dev/null 2>&1; }
podman_ready() { podman info >/dev/null 2>&1; } # macOS may need podman machine
docker_is_podman() {
# True if `docker` is Podman (podman-docker shim or alias)
if ! has_cmd docker; then return 1; fi
# 1) Text outputs
local out=""
out+="$(docker --version 2>&1 || true)\n"
out+="$(docker -v 2>&1 || true)\n"
out+="$(docker help 2>&1 | head -n 2 || true)\n"
if printf "%b" "$out" | grep -qiE '\bpodman\b'; then
return 0
fi
# 2) Symlink target / alternatives
local p t
p="$(command -v docker)"
if has_cmd readlink; then
t="$(readlink -f "$p" 2>/dev/null || readlink "$p" 2>/dev/null || echo "$p")"
printf "%s" "$t" | grep -qi 'podman' && return 0
fi
if [ -L /etc/alternatives/docker ]; then
t="$(readlink -f /etc/alternatives/docker 2>/dev/null || true)"
printf "%s" "$t" | grep -qi 'podman' && return 0
fi
# 3) Fallback: package id (rpm/dpkg), best effort (ignore errors)
if has_cmd rpm; then
rpm -qf "$p" 2>/dev/null | grep -qi 'podman' && return 0
fi
if has_cmd dpkg-query; then
dpkg-query -S "$p" 2>/dev/null | grep -qi 'podman' && return 0
fi
return 1
}
# --- Homebrew install (macOS only, idempotent) -----------------------------
install_homebrew_if_missing() {
[ "$PLATFORM" != "macOS" ] && return 0
if has_cmd brew; then
say ">>> Homebrew present: $(brew --version 2>/dev/null | head -1 || echo ok)"
return 0
fi
say ">>> Homebrew not found."
if ! ask_yes_no "Install Homebrew now?"; then return 1; fi
if ! has_cmd curl; then say ">>> curl is required. Please install curl and re-run."; exit 1; fi
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Add brew to PATH for this session (common locations)
if [ -x /opt/homebrew/bin/brew ]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
elif [ -x /usr/local/bin/brew ]; then
eval "$(/usr/local/bin/brew shellenv)"
fi
ensure_path_has_common_bins
}
# --- uv install (optional) --------------------------------------------------
install_uv() {
if has_cmd uv; then
say ">>> uv present: $(uv --version 2>/dev/null || echo ok)"
return
fi
if ! ask_yes_no "uv not found. Install uv now?"; then return; fi
if ! has_cmd curl; then say ">>> curl is required to install uv. Please install curl and re-run."; exit 1; fi
curl -LsSf https://astral.sh/uv/install.sh | sh
# Add uv to PATH for this session
[ -d "$HOME/.local/bin" ] && export PATH="$HOME/.local/bin:$PATH"
[ -d "$HOME/.cargo/bin" ] && export PATH="$HOME/.cargo/bin:$PATH"
}
# --- Docker: install if missing (never reinstall) ---------------------------
install_docker_if_missing() {
if has_cmd docker; then
say ">>> Docker CLI detected at: $(docker_cli_path)"
say ">>> Version: $(docker --version 2>/dev/null || echo 'unknown')"
return
fi
say ">>> Docker CLI not found."
if ! ask_yes_no "Install Docker now?"; then return; fi
case "$PLATFORM" in
macOS)
# Ensure Homebrew is available for Docker Desktop installation
if ! has_cmd brew; then
install_homebrew_if_missing || {
say ">>> Cannot install Docker Desktop without Homebrew."
say ">>> Please download manually from: https://www.docker.com/products/docker-desktop/"
exit 1
}
fi
if has_cmd brew; then
say ">>> Installing Docker Desktop via Homebrew..."
brew install --cask docker
say ">>> Starting Docker Desktop..."
open -gj -a Docker || true
fi
;;
Linux|WSL)
if ! has_cmd curl; then say ">>> Need curl to install Docker. Install curl and re-run."; exit 1; fi
curl -fsSL https://get.docker.com | $SUDO sh
# Do NOT assume docker group exists everywhere; creation is distro-dependent
if getent group docker >/dev/null 2>&1; then
$SUDO usermod -aG docker "$USER" || true
fi
;;
*)
say ">>> Unsupported platform for automated Docker install."
;;
esac
}
# --- Docker daemon start/wait (sudo only if starting service) ---------------
start_docker_daemon_if_needed() {
if docker_daemon_ready; then
say ">>> Docker daemon is ready."
return 0
fi
say ">>> Docker CLI found but daemon not reachable."
case "$PLATFORM" in
macOS)
say ">>> Attempting to start Docker Desktop..."
open -gj -a Docker || true
;;
Linux|WSL)
say ">>> Attempting to start docker service (may prompt for sudo)..."
$SUDO systemctl start docker >/dev/null 2>&1 || $SUDO service docker start >/dev/null 2>&1 || true
;;
esac
for i in {1..60}; do
docker_daemon_ready && { say ">>> Docker daemon is ready."; return 0; }
sleep 2
done
say ">>> Still not reachable. If Linux: check 'systemctl status docker' and group membership."
say ">>> If macOS: open Docker.app and wait for 'Docker Desktop is running'."
return 1
}
# --- Docker group activation (safe: only if group exists) -------------------
activate_docker_group_now() {
[ "$PLATFORM" = "Linux" ] || [ "$PLATFORM" = "WSL" ] || return 0
has_cmd docker || return 0
# only act if the docker group actually exists
if ! getent group docker >/dev/null 2>&1; then
return 0
fi
# If user already in group, nothing to do
if id -nG "$USER" 2>/dev/null | grep -qw docker; then return 0; fi
# Re-enter with sg if available
if has_cmd sg; then
if [ -z "${REENTERED_WITH_DOCKER_GROUP:-}" ]; then
say ">>> Re-entering shell with 'docker' group active for this run..."
export REENTERED_WITH_DOCKER_GROUP=1
exec sg docker -c "REENTERED_WITH_DOCKER_GROUP=1 bash \"$0\""
fi
else
say ">>> You were likely added to 'docker' group. Open a new shell or run: newgrp docker"
fi
}
# --- Compose detection/offer (no reinstall) ---------------------------------
check_or_offer_compose() {
if compose_v2_ready; then
say ">>> Docker Compose v2 available (docker compose)."
return 0
fi
if compose_v1_ready; then
say ">>> docker-compose (v1) available: $(docker-compose --version 2>/dev/null || echo ok)"
return 0
fi
say ">>> Docker Compose not found."
if ! ask_yes_no "Install Docker Compose plugin (v2)?"; then
say ">>> Skipping Compose install."
return 1
fi
case "$PLATFORM" in
macOS)
say ">>> On macOS, Docker Desktop bundles Compose v2. Starting Desktop…"
open -gj -a Docker || true
;;
Linux|WSL)
if has_cmd apt-get; then $SUDO apt-get update -y && $SUDO apt-get install -y docker-compose-plugin || true
elif has_cmd dnf; then $SUDO dnf install -y docker-compose-plugin || true
elif has_cmd yum; then $SUDO yum install -y docker-compose-plugin || true
elif has_cmd zypper; then $SUDO zypper install -y docker-compose docker-compose-plugin || true
elif has_cmd pacman; then $SUDO pacman -Sy --noconfirm docker-compose || true
else
say ">>> Please install Compose via your distro's instructions."
fi
;;
esac
if compose_v2_ready || compose_v1_ready; then
say ">>> Compose is now available."
else
say ">>> Could not verify Compose installation automatically."
fi
}
# --- Podman: install if missing (never reinstall) ---------------------------
install_podman_if_missing() {
if has_cmd podman; then
say ">>> Podman CLI detected at: $(podman_cli_path)"
say ">>> Version: $(podman --version 2>/dev/null || echo 'unknown')"
return
fi
say ">>> Podman CLI not found."
if ! ask_yes_no "Install Podman now?"; then return; fi
case "$PLATFORM" in
macOS)
# Ensure Homebrew is available for Podman installation
if ! has_cmd brew; then
install_homebrew_if_missing || {
say ">>> Cannot install Podman without Homebrew."
say ">>> Please install manually from: https://podman.io/getting-started/installation"
exit 1
}
fi
if has_cmd brew; then
brew install podman
fi
;;
Linux|WSL)
if has_cmd apt-get; then $SUDO apt-get update -y && $SUDO apt-get install -y podman
elif has_cmd dnf; then $SUDO dnf install -y podman
elif has_cmd yum; then $SUDO yum install -y podman
elif has_cmd zypper; then $SUDO zypper install -y podman
elif has_cmd pacman; then $SUDO pacman -Sy --noconfirm podman
else
say ">>> Please install 'podman' via your distro."
fi
;;
esac
}
ensure_podman_ready() {
if [ "$PLATFORM" = "macOS" ]; then
local machine_name="podman-machine-default"
local min_memory_mb=8192 # 8 GB minimum
# Check if any machine exists
if ! podman machine list 2>/dev/null | grep -qE '(running|stopped)'; then
say ">>> Podman machine does not exist. Initializing with 8GB memory…"
podman machine init --memory "$min_memory_mb" || {
say ">>> Failed to initialize Podman machine."
return 1
}
else
# Machine exists - check if it has enough memory
say ">>> Checking Podman machine configuration…"
local current_memory
current_memory=$(podman machine inspect "$machine_name" --format "{{.Resources.Memory}}" 2>/dev/null || echo "0")
if [ "$current_memory" -gt 0 ] && [ "$current_memory" -lt "$min_memory_mb" ]; then
say ">>> Podman machine has ${current_memory}MB memory, but ${min_memory_mb}MB is recommended."
if ask_yes_no "Recreate Podman machine with ${min_memory_mb}MB memory?"; then
say ">>> Stopping and removing existing Podman machine…"
podman machine stop 2>/dev/null || true
podman machine rm -f "$machine_name" || {
say ">>> Failed to remove existing machine."
return 1
}
say ">>> Initializing new Podman machine with ${min_memory_mb}MB memory…"
podman machine init --memory "$min_memory_mb" || {
say ">>> Failed to initialize Podman machine."
return 1
}
else
say ">>> Continuing with existing machine (may have insufficient resources)."
fi
fi
fi
# Now check if it's running
if ! podman machine list 2>/dev/null | grep -q running; then
say ">>> Starting Podman machine (macOS)…"
podman machine start || {
say ">>> Failed to start Podman machine."
return 1
}
for i in {1..30}; do podman_ready && break || sleep 2; done
fi
fi
if podman_ready; then
say ">>> Podman is ready."
return 0
else
say ">>> Podman CLI present but not ready (try 'podman machine start' on macOS)."
return 1
fi
}
# --- Runtime auto-detect (prefer no prompt) ---------------------------------
hr
say "Platform: $PLATFORM"
hr
# uv (optional)
if has_cmd uv; then say ">>> uv present: $(uv --version 2>/dev/null || echo ok)"; else install_uv; fi
RUNTIME=""
if docker_is_podman; then
say ">>> Detected podman-docker shim: using Podman runtime."
RUNTIME="Podman"
elif has_cmd docker; then
say ">>> Docker CLI detected."
RUNTIME="Docker"
elif has_cmd podman; then
say ">>> Podman CLI detected."
RUNTIME="Podman"
fi
if [ -z "$RUNTIME" ]; then
say "Choose container runtime:"
PS3="Select [1-2]: "
select rt in "Docker" "Podman"; do
case "$REPLY" in 1|2) RUNTIME="$rt"; break ;; *) say "Invalid choice";; esac
done
fi
say "Selected runtime: $RUNTIME"
hr
# --- Execute runtime path ----------------------------------------------------
if [ "$RUNTIME" = "Docker" ]; then
install_docker_if_missing # no reinstall if present
activate_docker_group_now # safe: only if group exists and user not in it
start_docker_daemon_if_needed # sudo only to start service on Linux/WSL
check_or_offer_compose # offer to install Compose only if missing
else
install_podman_if_missing # no reinstall if present
ensure_podman_ready
# Optional: podman-compose for compose-like UX
if ! command -v podman-compose >/dev/null 2>&1; then
if ask_yes_no "Install podman-compose (optional)?"; then
if [ "$PLATFORM" = "macOS" ]; then
# Ensure Homebrew is available for podman-compose on macOS
if ! has_cmd brew; then
install_homebrew_if_missing || say ">>> Install podman-compose manually or via pip3"
fi
if has_cmd brew; then
brew install podman-compose
fi
elif has_cmd apt-get; then $SUDO apt-get update -y && $SUDO apt-get install -y podman-compose || pip3 install --user podman-compose || true
elif has_cmd dnf; then $SUDO dnf install -y podman-compose || true
elif has_cmd yum; then $SUDO yum install -y podman-compose || true
elif has_cmd zypper; then $SUDO zypper install -y podman-compose || true
elif has_cmd pacman; then $SUDO pacman -Sy --noconfirm podman-compose || true
else say ">>> Please install podman-compose via your distro."; fi
fi
fi
fi
hr
say "Environment ready — launching: uvx openrag"
hr
if ! has_cmd uv; then
say ">>> 'uv' not on PATH. Add the installers bin dir to PATH, then run: uvx openrag"
exit 1
fi
exec uvx openrag

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

View file

@ -1,16 +0,0 @@
<svg width="1335" height="185" viewBox="0 0 1335 185" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M172.336 97.5947H201.395C207.095 97.5948 211.713 102.212 211.713 107.912V125.055C211.713 130.755 207.095 135.372 201.395 135.372H176.05C173.312 135.372 170.687 136.462 168.752 138.397L125.259 181.883C123.324 183.819 120.699 184.908 117.961 184.908H97.0534C91.4612 184.908 86.8796 180.449 86.736 174.856L86.2848 157.354C86.1343 151.554 90.7947 146.765 96.6022 146.765H114.598C117.337 146.765 119.961 145.675 121.897 143.739L165.023 100.613C166.959 98.6775 169.583 97.5879 172.322 97.5879L172.336 97.5947Z" fill="white"/>
<path d="M201.395 22.083C207.095 22.083 211.713 26.7004 211.713 32.4004V49.543C211.713 55.2429 207.095 59.8604 201.395 59.8604H176.05C173.312 59.8604 170.687 60.95 168.752 62.8857L125.259 106.378C123.324 108.314 120.699 109.403 117.961 109.403H92.5582C89.8983 109.403 87.339 110.429 85.4176 112.271L36.5914 159.061C34.6699 160.903 32.1098 161.929 29.4498 161.929H11.6549C5.95497 161.929 1.33753 157.304 1.33753 151.611V133.995C1.33777 128.295 5.95512 123.679 11.6549 123.679H29.3209C32.0598 123.679 34.6839 122.588 36.6198 120.652L82.9869 74.2861C84.9228 72.3503 87.5469 71.2598 90.2858 71.2598H114.598C117.337 71.2598 119.961 70.1702 121.897 68.2344L165.023 25.1084C166.959 23.1726 169.583 22.083 172.322 22.083H201.395Z" fill="white"/>
<path d="M115.114 0C120.814 0 125.431 4.61743 125.431 10.3174V27.46C125.431 33.1599 120.814 37.7773 115.114 37.7773H89.7692C87.0304 37.7773 84.4062 38.867 82.4703 40.8027L38.9782 84.2949C37.0423 86.2306 34.418 87.3203 31.6793 87.3203H10.7731C5.1807 87.3203 0.599138 82.8609 0.455697 77.2686L0.0035481 59.7676C-0.147015 53.9673 4.5135 49.1847 10.3209 49.1846H28.317C31.0558 49.1846 33.68 48.0949 35.6159 46.1592L78.7418 3.0332C80.6776 1.09742 83.3019 0.00689882 86.0407 0.00683594L86.0553 0H115.114Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M445.716 55.0117C452.121 55.0117 457.897 56.6483 463.043 59.9229C468.225 63.1614 472.327 67.9658 475.35 74.335C478.408 80.6683 479.937 88.4412 479.938 97.6533C479.938 106.757 478.445 114.494 475.458 120.863C472.471 127.233 468.405 132.091 463.259 135.438C458.113 138.784 452.284 140.457 445.771 140.457C441.021 140.457 437.08 139.665 433.949 138.082C430.819 136.499 428.3 134.591 426.393 132.36C424.521 130.093 423.064 127.953 422.021 125.938H421.211V170.091H401.671V56.0908H420.887V69.8008H422.021C423.028 67.7858 424.449 65.6448 426.284 63.3779C428.119 61.0749 430.603 59.1135 433.733 57.4941C436.864 55.8389 440.858 55.0118 445.716 55.0117ZM440.318 71.043C436.144 71.043 432.599 72.1399 429.685 74.335C426.77 76.53 424.557 79.6072 423.046 83.5654C421.571 87.5238 420.833 92.1842 420.833 97.5459C420.833 102.907 421.588 107.604 423.1 111.634C424.647 115.664 426.861 118.812 429.739 121.079C432.654 123.31 436.18 124.426 440.318 124.426C444.637 124.426 448.253 123.275 451.168 120.972C454.083 118.633 456.278 115.448 457.753 111.418C459.264 107.352 460.02 102.728 460.021 97.5459C460.021 92.4001 459.283 87.8293 457.808 83.835C456.332 79.8407 454.136 76.7104 451.222 74.4434C448.307 72.1764 444.672 71.043 440.318 71.043Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M526.27 55.0117C531.379 55.0117 536.201 55.8389 540.735 57.4941C545.305 59.1134 549.336 61.6324 552.826 65.0508C556.353 68.4692 559.124 72.8237 561.139 78.1133C563.154 83.367 564.162 89.6286 564.162 96.8975V102.89H506.411C506.469 107.504 507.347 111.48 509.051 114.818C510.814 118.237 513.28 120.864 516.446 122.699C519.613 124.498 523.319 125.397 527.565 125.397C530.408 125.397 532.981 125.002 535.284 124.21C537.587 123.382 539.584 122.177 541.275 120.594C542.967 119.01 544.244 117.049 545.107 114.71L563.353 116.762C562.201 121.584 560.005 125.793 556.767 129.392C553.564 132.954 549.462 135.725 544.46 137.704C539.458 139.647 533.736 140.619 527.295 140.619C518.983 140.619 511.804 138.892 505.759 135.438C499.749 131.947 495.125 127.017 491.887 120.647C488.648 114.242 487.028 106.704 487.028 98.0312C487.028 89.5029 488.648 82.0184 491.887 75.5771C495.161 69.0999 499.731 64.0614 505.597 60.4629C511.462 56.8286 518.353 55.0118 526.27 55.0117ZM526.54 70.2334C522.546 70.2334 519.036 71.2043 516.014 73.1475C512.991 75.0546 510.635 77.5737 508.943 80.7041C507.466 83.4653 506.636 86.4706 506.448 89.7188H545.432C545.396 85.9765 544.586 82.6481 543.003 79.7334C541.42 76.7826 539.206 74.4608 536.363 72.7695C533.557 71.0784 530.282 70.2335 526.54 70.2334Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M338.89 26.9434C348.569 26.9434 357.224 29.1924 364.853 33.6904C372.517 38.1885 378.562 44.6836 382.988 53.1758C387.45 61.6322 389.682 71.8166 389.682 83.7275C389.682 95.6384 387.45 105.84 382.988 114.332C378.562 122.788 372.517 129.267 364.853 133.765C357.224 138.263 348.569 140.512 338.89 140.512C329.21 140.512 320.537 138.263 312.872 133.765C305.243 129.231 299.198 122.735 294.736 114.278C290.31 105.786 288.097 95.6024 288.097 83.7275C288.097 71.8166 290.31 61.6322 294.736 53.1758C299.198 44.6836 305.244 38.1885 312.872 33.6904C320.537 29.1923 329.21 26.9434 338.89 26.9434ZM338.89 44.918C332.88 44.918 327.572 46.4107 322.966 49.3975C318.36 52.3482 314.743 56.7211 312.116 62.5146C309.525 68.2721 308.23 75.3433 308.23 83.7275C308.23 92.1118 309.525 99.2007 312.116 104.994C314.743 110.752 318.36 115.124 322.966 118.11C327.572 121.061 332.88 122.537 338.89 122.537C344.899 122.537 350.207 121.061 354.812 118.11C359.418 115.124 363.018 110.752 365.608 104.994C368.235 99.2007 369.549 92.1118 369.549 83.7275C369.549 75.3433 368.235 68.2721 365.608 62.5146C363.017 56.7211 359.419 52.3482 354.812 49.3975C350.207 46.4109 344.899 44.918 338.89 44.918Z" fill="white"/>
<path d="M901.341 26.9434C907.458 26.9434 913.162 27.8424 918.452 29.6416C923.742 31.4049 928.438 33.9246 932.54 37.1992C936.678 40.4738 940.079 44.3604 942.742 48.8584C945.405 53.3564 947.15 58.3224 947.978 63.7559H927.574C926.675 60.8411 925.433 58.2317 923.85 55.9287C922.302 53.5899 920.431 51.5927 918.236 49.9375C916.077 48.2822 913.594 47.0405 910.787 46.2129C907.98 45.3493 904.922 44.918 901.611 44.918C895.674 44.918 890.384 46.4109 885.742 49.3975C881.1 52.3842 877.447 56.7748 874.784 62.5684C872.157 68.3259 870.844 75.3428 870.844 83.6191C870.844 91.9675 872.157 99.0385 874.784 104.832C877.411 110.626 881.064 115.034 885.742 118.057C890.42 121.043 895.854 122.537 902.043 122.537C907.657 122.537 912.515 121.457 916.617 119.298C920.755 117.139 923.94 114.08 926.171 110.122C928.304 106.303 929.414 101.859 929.508 96.79H904.04V81.1367H948.896V94.415C948.895 103.879 946.88 112.066 942.85 118.975C938.819 125.884 933.278 131.21 926.225 134.952C919.172 138.659 911.075 140.512 901.935 140.512C891.751 140.512 882.809 138.226 875.108 133.656C867.444 129.05 861.452 122.519 857.134 114.062C852.852 105.57 850.711 95.4941 850.711 83.835C850.711 74.9108 851.97 66.9398 854.489 59.9229C857.044 52.906 860.607 46.9505 865.177 42.0566C869.747 37.1269 875.108 33.384 881.262 30.8291C887.415 28.2383 894.108 26.9434 901.341 26.9434Z" fill="white"/>
<path d="M618.981 55.0117C624.703 55.0117 629.687 56.2347 633.934 58.6816C638.216 61.1286 641.526 64.6734 643.865 69.3154C646.24 73.9574 647.41 79.5889 647.374 86.21V139H627.834V89.2334C627.834 83.6917 626.394 79.3553 623.516 76.2246C620.673 73.0939 616.732 71.5283 611.694 71.5283C608.276 71.5284 605.235 72.2846 602.572 73.7959C599.946 75.2713 597.877 77.4121 596.365 80.2188C594.89 83.0256 594.152 86.4266 594.152 90.4209V139H574.612V56.0908H593.288V70.1787H594.26C596.167 65.5368 599.208 61.8481 603.382 59.1133C607.592 56.3785 612.792 55.0118 618.981 55.0117Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M703.476 28.4541C711.968 28.4541 719.093 29.9301 724.851 32.8809C730.644 35.8316 735.016 39.9702 737.967 45.2959C740.953 50.5856 742.447 56.7567 742.447 63.8096C742.447 70.8985 740.936 77.0518 737.913 82.2695C734.926 87.4513 730.518 91.4638 724.688 94.3066C724.005 94.6355 723.304 94.944 722.584 95.2344L746.495 139H724.148L702.424 98.5166H682.047V139H662.021V28.4541H703.476ZM682.047 81.8916H700.507C705.473 81.8916 709.539 81.2082 712.706 79.8408C715.873 78.4374 718.211 76.404 719.723 73.7412C721.27 71.0424 722.044 67.7318 722.044 63.8096C722.044 59.8873 721.27 56.5403 719.723 53.7695C718.175 50.9629 715.818 48.8397 712.651 47.4004C709.485 45.9251 705.4 45.1875 700.398 45.1875H682.047V81.8916Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M850.232 139H828.857L819.698 111.741H778.139L768.996 139H747.621L786.539 28.4541H811.261L850.232 139ZM783.533 95.6562H814.294L799.332 51.125H798.468L783.533 95.6562Z" fill="white"/>
<path d="M1037.86 139.705H1008.9V54.1694H1038.44C1046.93 54.1694 1054.22 55.8818 1060.31 59.3066C1066.43 62.7035 1071.13 67.5901 1074.41 73.9663C1077.7 80.3425 1079.34 87.9717 1079.34 96.8538C1079.34 105.764 1077.68 113.421 1074.37 119.825C1071.09 126.229 1066.34 131.143 1060.14 134.568C1053.96 137.993 1046.54 139.705 1037.86 139.705ZM1024.38 126.299H1037.11C1043.06 126.299 1048.02 125.213 1052 123.041C1055.98 120.841 1058.97 117.57 1060.98 113.226C1062.98 108.854 1063.98 103.397 1063.98 96.8538C1063.98 90.3105 1062.98 84.881 1060.98 80.5653C1058.97 76.2216 1056.01 72.9779 1052.09 70.8339C1048.19 68.6621 1043.35 67.5762 1037.56 67.5762H1024.38V126.299Z" fill="#E0E0E0"/>
<path d="M1170.41 96.9374C1170.41 106.154 1168.69 114.047 1165.24 120.618C1161.82 127.162 1157.14 132.174 1151.22 135.654C1145.32 139.134 1138.63 140.875 1131.15 140.875C1123.66 140.875 1116.96 139.134 1111.03 135.654C1105.13 132.146 1100.46 127.12 1097.01 120.577C1093.59 114.006 1091.88 106.126 1091.88 96.9374C1091.88 87.7211 1093.59 79.8413 1097.01 73.2981C1100.46 66.7269 1105.13 61.7012 1111.03 58.2207C1116.96 54.7402 1123.66 53 1131.15 53C1138.63 53 1145.32 54.7402 1151.22 58.2207C1157.14 61.7012 1161.82 66.7269 1165.24 73.2981C1168.69 79.8413 1170.41 87.7211 1170.41 96.9374ZM1154.85 96.9374C1154.85 90.4498 1153.83 84.9785 1151.8 80.5235C1149.8 76.0407 1147.02 72.6577 1143.46 70.3745C1139.9 68.0634 1135.79 66.9079 1131.15 66.9079C1126.5 66.9079 1122.4 68.0634 1118.83 70.3745C1115.27 72.6577 1112.48 76.0407 1110.45 80.5235C1108.44 84.9785 1107.44 90.4498 1107.44 96.9374C1107.44 103.425 1108.44 108.91 1110.45 113.393C1112.48 117.848 1115.27 121.231 1118.83 123.542C1122.4 125.825 1126.5 126.967 1131.15 126.967C1135.79 126.967 1139.9 125.825 1143.46 123.542C1147.02 121.231 1149.8 117.848 1151.8 113.393C1153.83 108.91 1154.85 103.425 1154.85 96.9374Z" fill="#E0E0E0"/>
<path d="M1258.2 83.0294H1242.6C1242.15 80.4678 1241.33 78.1985 1240.14 76.2216C1238.94 74.2169 1237.45 72.5184 1235.67 71.1262C1233.89 69.7341 1231.86 68.6899 1229.58 67.9938C1227.32 67.2699 1224.89 66.9079 1222.27 66.9079C1217.63 66.9079 1213.51 68.0774 1209.92 70.4162C1206.33 72.7273 1203.52 76.1242 1201.49 80.607C1199.46 85.062 1198.45 90.5055 1198.45 96.9374C1198.45 103.481 1199.46 108.994 1201.49 113.477C1203.55 117.931 1206.36 121.301 1209.92 123.584C1213.51 125.839 1217.61 126.967 1222.23 126.967C1224.79 126.967 1227.19 126.633 1229.41 125.964C1231.66 125.268 1233.68 124.252 1235.46 122.916C1237.27 121.579 1238.79 119.936 1240.01 117.987C1241.26 116.038 1242.12 113.811 1242.6 111.305L1258.2 111.388C1257.62 115.453 1256.35 119.268 1254.41 122.832C1252.49 126.396 1249.97 129.542 1246.85 132.271C1243.74 134.972 1240.09 137.088 1235.92 138.619C1231.75 140.123 1227.12 140.875 1222.02 140.875C1214.51 140.875 1207.81 139.134 1201.91 135.654C1196.01 132.174 1191.37 127.148 1187.97 120.577C1184.58 114.006 1182.88 106.126 1182.88 96.9374C1182.88 87.7211 1184.59 79.8413 1188.01 73.2981C1191.44 66.7269 1196.1 61.7012 1201.99 58.2207C1207.89 54.7402 1214.57 53 1222.02 53C1226.78 53 1231.21 53.6682 1235.29 55.0047C1239.38 56.3412 1243.03 58.3042 1246.23 60.8937C1249.43 63.4553 1252.06 66.6016 1254.12 70.3327C1256.2 74.0359 1257.57 78.2682 1258.2 83.0294Z" fill="#E0E0E0"/>
<path d="M1318.83 77.6834C1318.44 74.0359 1316.8 71.1959 1313.91 69.1633C1311.04 67.1307 1307.31 66.1144 1302.72 66.1144C1299.49 66.1144 1296.73 66.6016 1294.42 67.5762C1292.11 68.5507 1290.34 69.8733 1289.12 71.5439C1287.89 73.2145 1287.27 75.1218 1287.24 77.2658C1287.24 79.0478 1287.64 80.5931 1288.45 81.9018C1289.28 83.2104 1290.41 84.3242 1291.83 85.243C1293.25 86.134 1294.82 86.8858 1296.55 87.4983C1298.27 88.1109 1300.01 88.626 1301.76 89.0437L1309.77 91.0484C1313 91.8002 1316.1 92.8165 1319.08 94.0973C1322.08 95.3781 1324.77 96.993 1327.13 98.9421C1329.53 100.891 1331.42 103.244 1332.81 106C1334.2 108.757 1334.9 111.987 1334.9 115.69C1334.9 120.702 1333.62 125.115 1331.06 128.93C1328.5 132.716 1324.8 135.682 1319.96 137.826C1315.14 139.942 1309.31 141 1302.47 141C1295.82 141 1290.05 139.97 1285.15 137.909C1280.28 135.849 1276.47 132.842 1273.72 128.888C1270.99 124.934 1269.52 120.117 1269.29 114.437H1284.53C1284.75 117.416 1285.67 119.894 1287.28 121.871C1288.89 123.848 1290.99 125.324 1293.58 126.299C1296.2 127.273 1299.12 127.76 1302.35 127.76C1305.71 127.76 1308.66 127.259 1311.19 126.257C1313.75 125.227 1315.76 123.807 1317.2 121.997C1318.65 120.159 1319.39 118.015 1319.41 115.565C1319.39 113.337 1318.73 111.5 1317.45 110.052C1316.17 108.576 1314.38 107.351 1312.07 106.376C1309.79 105.374 1307.12 104.483 1304.06 103.703L1294.33 101.197C1287.29 99.3876 1281.73 96.645 1277.64 92.9696C1273.58 89.2664 1271.55 84.352 1271.55 78.2264C1271.55 73.1867 1272.91 68.7735 1275.64 64.9867C1278.39 61.2 1282.13 58.2625 1286.86 56.1742C1291.59 54.0581 1296.95 53 1302.93 53C1308.99 53 1314.31 54.0581 1318.87 56.1742C1323.46 58.2625 1327.06 61.1721 1329.68 64.9032C1332.29 68.6064 1333.64 72.8665 1333.73 77.6834H1318.83Z" fill="#E0E0E0"/>
</svg>

Before

Width:  |  Height:  |  Size: 13 KiB

View file

@ -1,16 +0,0 @@
<svg width="1335" height="185" viewBox="0 0 1335 185" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M172.336 97.5947H201.395C207.095 97.5948 211.713 102.212 211.713 107.912V125.055C211.713 130.755 207.095 135.372 201.395 135.372H176.05C173.312 135.372 170.687 136.462 168.752 138.397L125.259 181.883C123.324 183.819 120.699 184.908 117.961 184.908H97.0534C91.4612 184.908 86.8796 180.449 86.736 174.856L86.2848 157.354C86.1343 151.554 90.7947 146.765 96.6022 146.765H114.598C117.337 146.765 119.961 145.675 121.897 143.739L165.023 100.613C166.959 98.6775 169.583 97.5879 172.322 97.5879L172.336 97.5947Z" fill="black"/>
<path d="M201.395 22.083C207.095 22.083 211.713 26.7004 211.713 32.4004V49.543C211.713 55.2429 207.095 59.8604 201.395 59.8604H176.05C173.312 59.8604 170.687 60.95 168.752 62.8857L125.259 106.378C123.324 108.314 120.699 109.403 117.961 109.403H92.5582C89.8983 109.403 87.339 110.429 85.4176 112.271L36.5914 159.061C34.6699 160.903 32.1098 161.929 29.4498 161.929H11.6549C5.95497 161.929 1.33753 157.304 1.33753 151.611V133.995C1.33777 128.295 5.95512 123.679 11.6549 123.679H29.3209C32.0598 123.679 34.6839 122.588 36.6198 120.652L82.9869 74.2861C84.9228 72.3503 87.5469 71.2598 90.2858 71.2598H114.598C117.337 71.2598 119.961 70.1702 121.897 68.2344L165.023 25.1084C166.959 23.1726 169.583 22.083 172.322 22.083H201.395Z" fill="black"/>
<path d="M115.114 0C120.814 0 125.431 4.61743 125.431 10.3174V27.46C125.431 33.1599 120.814 37.7773 115.114 37.7773H89.7692C87.0304 37.7773 84.4062 38.867 82.4703 40.8027L38.9782 84.2949C37.0423 86.2306 34.418 87.3203 31.6793 87.3203H10.7731C5.1807 87.3203 0.599138 82.8609 0.455697 77.2686L0.0035481 59.7676C-0.147015 53.9673 4.5135 49.1847 10.3209 49.1846H28.317C31.0558 49.1846 33.68 48.0949 35.6159 46.1592L78.7418 3.0332C80.6776 1.09742 83.3019 0.00689882 86.0407 0.00683594L86.0553 0H115.114Z" fill="black"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M445.716 55.0117C452.121 55.0117 457.897 56.6483 463.043 59.9229C468.225 63.1614 472.327 67.9658 475.35 74.335C478.408 80.6683 479.937 88.4412 479.938 97.6533C479.938 106.757 478.445 114.494 475.458 120.863C472.471 127.233 468.405 132.091 463.259 135.438C458.113 138.784 452.284 140.457 445.771 140.457C441.021 140.457 437.08 139.665 433.949 138.082C430.819 136.499 428.3 134.591 426.393 132.36C424.521 130.093 423.064 127.953 422.021 125.938H421.211V170.091H401.671V56.0908H420.887V69.8008H422.021C423.028 67.7858 424.449 65.6448 426.284 63.3779C428.119 61.0749 430.603 59.1135 433.733 57.4941C436.864 55.8389 440.858 55.0118 445.716 55.0117ZM440.318 71.043C436.144 71.043 432.599 72.1399 429.685 74.335C426.77 76.53 424.557 79.6072 423.046 83.5654C421.571 87.5238 420.833 92.1842 420.833 97.5459C420.833 102.907 421.588 107.604 423.1 111.634C424.647 115.664 426.861 118.812 429.739 121.079C432.654 123.31 436.18 124.426 440.318 124.426C444.637 124.426 448.253 123.275 451.168 120.972C454.083 118.633 456.278 115.448 457.753 111.418C459.264 107.352 460.02 102.728 460.021 97.5459C460.021 92.4001 459.283 87.8293 457.808 83.835C456.332 79.8407 454.136 76.7104 451.222 74.4434C448.307 72.1764 444.672 71.043 440.318 71.043Z" fill="black"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M526.27 55.0117C531.379 55.0117 536.201 55.8389 540.735 57.4941C545.305 59.1134 549.336 61.6324 552.826 65.0508C556.353 68.4692 559.124 72.8237 561.139 78.1133C563.154 83.367 564.162 89.6286 564.162 96.8975V102.89H506.411C506.469 107.504 507.347 111.48 509.051 114.818C510.814 118.237 513.28 120.864 516.446 122.699C519.613 124.498 523.319 125.397 527.565 125.397C530.408 125.397 532.981 125.002 535.284 124.21C537.587 123.382 539.584 122.177 541.275 120.594C542.967 119.01 544.244 117.049 545.107 114.71L563.353 116.762C562.201 121.584 560.005 125.793 556.767 129.392C553.564 132.954 549.462 135.725 544.46 137.704C539.458 139.647 533.736 140.619 527.295 140.619C518.983 140.619 511.804 138.892 505.759 135.438C499.749 131.947 495.125 127.017 491.887 120.647C488.648 114.242 487.028 106.704 487.028 98.0312C487.028 89.5029 488.648 82.0184 491.887 75.5771C495.161 69.0999 499.731 64.0614 505.597 60.4629C511.462 56.8286 518.353 55.0118 526.27 55.0117ZM526.54 70.2334C522.546 70.2334 519.036 71.2043 516.014 73.1475C512.991 75.0546 510.635 77.5737 508.943 80.7041C507.466 83.4653 506.636 86.4706 506.448 89.7188H545.432C545.396 85.9765 544.586 82.6481 543.003 79.7334C541.42 76.7826 539.206 74.4608 536.363 72.7695C533.557 71.0784 530.282 70.2335 526.54 70.2334Z" fill="black"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M338.89 26.9434C348.569 26.9434 357.224 29.1924 364.853 33.6904C372.517 38.1885 378.562 44.6836 382.988 53.1758C387.45 61.6322 389.682 71.8166 389.682 83.7275C389.682 95.6384 387.45 105.84 382.988 114.332C378.562 122.788 372.517 129.267 364.853 133.765C357.224 138.263 348.569 140.512 338.89 140.512C329.21 140.512 320.537 138.263 312.872 133.765C305.243 129.231 299.198 122.735 294.736 114.278C290.31 105.786 288.097 95.6024 288.097 83.7275C288.097 71.8166 290.31 61.6322 294.736 53.1758C299.198 44.6836 305.244 38.1885 312.872 33.6904C320.537 29.1923 329.21 26.9434 338.89 26.9434ZM338.89 44.918C332.88 44.918 327.572 46.4107 322.966 49.3975C318.36 52.3482 314.743 56.7211 312.116 62.5146C309.525 68.2721 308.23 75.3433 308.23 83.7275C308.23 92.1118 309.525 99.2007 312.116 104.994C314.743 110.752 318.36 115.124 322.966 118.11C327.572 121.061 332.88 122.537 338.89 122.537C344.899 122.537 350.207 121.061 354.812 118.11C359.418 115.124 363.018 110.752 365.608 104.994C368.235 99.2007 369.549 92.1118 369.549 83.7275C369.549 75.3433 368.235 68.2721 365.608 62.5146C363.017 56.7211 359.419 52.3482 354.812 49.3975C350.207 46.4109 344.899 44.918 338.89 44.918Z" fill="black"/>
<path d="M901.341 26.9434C907.458 26.9434 913.162 27.8424 918.452 29.6416C923.742 31.4049 928.438 33.9246 932.54 37.1992C936.678 40.4738 940.079 44.3604 942.742 48.8584C945.405 53.3564 947.15 58.3224 947.978 63.7559H927.574C926.675 60.8411 925.433 58.2317 923.85 55.9287C922.302 53.5899 920.431 51.5927 918.236 49.9375C916.077 48.2822 913.594 47.0405 910.787 46.2129C907.98 45.3493 904.922 44.918 901.611 44.918C895.674 44.918 890.384 46.4109 885.742 49.3975C881.1 52.3842 877.447 56.7748 874.784 62.5684C872.157 68.3259 870.844 75.3428 870.844 83.6191C870.844 91.9675 872.157 99.0385 874.784 104.832C877.411 110.626 881.064 115.034 885.742 118.057C890.42 121.043 895.854 122.537 902.043 122.537C907.657 122.537 912.515 121.457 916.617 119.298C920.755 117.139 923.94 114.08 926.171 110.122C928.304 106.303 929.414 101.859 929.508 96.79H904.04V81.1367H948.896V94.415C948.895 103.879 946.88 112.066 942.85 118.975C938.819 125.884 933.278 131.21 926.225 134.952C919.172 138.659 911.075 140.512 901.935 140.512C891.751 140.512 882.809 138.226 875.108 133.656C867.444 129.05 861.452 122.519 857.134 114.062C852.852 105.57 850.711 95.4941 850.711 83.835C850.711 74.9108 851.97 66.9398 854.489 59.9229C857.044 52.906 860.607 46.9505 865.177 42.0566C869.747 37.1269 875.108 33.384 881.262 30.8291C887.415 28.2383 894.108 26.9434 901.341 26.9434Z" fill="black"/>
<path d="M618.981 55.0117C624.703 55.0117 629.687 56.2347 633.934 58.6816C638.216 61.1286 641.526 64.6734 643.865 69.3154C646.24 73.9574 647.41 79.5889 647.374 86.21V139H627.834V89.2334C627.834 83.6917 626.394 79.3553 623.516 76.2246C620.673 73.0939 616.732 71.5283 611.694 71.5283C608.276 71.5284 605.235 72.2846 602.572 73.7959C599.946 75.2713 597.877 77.4121 596.365 80.2188C594.89 83.0256 594.152 86.4266 594.152 90.4209V139H574.612V56.0908H593.288V70.1787H594.26C596.167 65.5368 599.208 61.8481 603.382 59.1133C607.592 56.3785 612.792 55.0118 618.981 55.0117Z" fill="black"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M703.476 28.4541C711.968 28.4541 719.093 29.9301 724.851 32.8809C730.644 35.8316 735.016 39.9702 737.967 45.2959C740.953 50.5856 742.447 56.7567 742.447 63.8096C742.447 70.8985 740.936 77.0518 737.913 82.2695C734.926 87.4513 730.518 91.4638 724.688 94.3066C724.005 94.6355 723.304 94.944 722.584 95.2344L746.495 139H724.148L702.424 98.5166H682.047V139H662.021V28.4541H703.476ZM682.047 81.8916H700.507C705.473 81.8916 709.539 81.2082 712.706 79.8408C715.873 78.4374 718.211 76.404 719.723 73.7412C721.27 71.0424 722.044 67.7318 722.044 63.8096C722.044 59.8873 721.27 56.5403 719.723 53.7695C718.175 50.9629 715.818 48.8397 712.651 47.4004C709.485 45.9251 705.4 45.1875 700.398 45.1875H682.047V81.8916Z" fill="black"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M850.232 139H828.857L819.698 111.741H778.139L768.996 139H747.621L786.539 28.4541H811.261L850.232 139ZM783.533 95.6562H814.294L799.332 51.125H798.468L783.533 95.6562Z" fill="black"/>
<path d="M1037.86 139.705H1008.9V54.1694H1038.44C1046.93 54.1694 1054.22 55.8818 1060.31 59.3066C1066.43 62.7035 1071.13 67.5901 1074.41 73.9663C1077.7 80.3425 1079.34 87.9717 1079.34 96.8538C1079.34 105.764 1077.68 113.421 1074.37 119.825C1071.09 126.229 1066.34 131.143 1060.14 134.568C1053.96 137.993 1046.54 139.705 1037.86 139.705ZM1024.38 126.299H1037.11C1043.06 126.299 1048.02 125.213 1052 123.041C1055.98 120.841 1058.97 117.57 1060.98 113.226C1062.98 108.854 1063.98 103.397 1063.98 96.8538C1063.98 90.3105 1062.98 84.881 1060.98 80.5653C1058.97 76.2216 1056.01 72.9779 1052.09 70.8339C1048.19 68.6621 1043.35 67.5762 1037.56 67.5762H1024.38V126.299Z" fill="#9F9FA9"/>
<path d="M1170.41 96.9374C1170.41 106.154 1168.69 114.047 1165.24 120.618C1161.82 127.162 1157.14 132.174 1151.22 135.654C1145.32 139.134 1138.63 140.875 1131.15 140.875C1123.66 140.875 1116.96 139.134 1111.03 135.654C1105.13 132.146 1100.46 127.12 1097.01 120.577C1093.59 114.006 1091.88 106.126 1091.88 96.9374C1091.88 87.7211 1093.59 79.8413 1097.01 73.2981C1100.46 66.7269 1105.13 61.7012 1111.03 58.2207C1116.96 54.7402 1123.66 53 1131.15 53C1138.63 53 1145.32 54.7402 1151.22 58.2207C1157.14 61.7012 1161.82 66.7269 1165.24 73.2981C1168.69 79.8413 1170.41 87.7211 1170.41 96.9374ZM1154.85 96.9374C1154.85 90.4498 1153.83 84.9785 1151.8 80.5235C1149.8 76.0407 1147.02 72.6577 1143.46 70.3745C1139.9 68.0634 1135.79 66.9079 1131.15 66.9079C1126.5 66.9079 1122.4 68.0634 1118.83 70.3745C1115.27 72.6577 1112.48 76.0407 1110.45 80.5235C1108.44 84.9785 1107.44 90.4498 1107.44 96.9374C1107.44 103.425 1108.44 108.91 1110.45 113.393C1112.48 117.848 1115.27 121.231 1118.83 123.542C1122.4 125.825 1126.5 126.967 1131.15 126.967C1135.79 126.967 1139.9 125.825 1143.46 123.542C1147.02 121.231 1149.8 117.848 1151.8 113.393C1153.83 108.91 1154.85 103.425 1154.85 96.9374Z" fill="#9F9FA9"/>
<path d="M1258.2 83.0294H1242.6C1242.15 80.4678 1241.33 78.1985 1240.14 76.2216C1238.94 74.2169 1237.45 72.5184 1235.67 71.1262C1233.89 69.7341 1231.86 68.6899 1229.58 67.9938C1227.32 67.2699 1224.89 66.9079 1222.27 66.9079C1217.63 66.9079 1213.51 68.0774 1209.92 70.4162C1206.33 72.7273 1203.52 76.1242 1201.49 80.607C1199.46 85.062 1198.45 90.5055 1198.45 96.9374C1198.45 103.481 1199.46 108.994 1201.49 113.477C1203.55 117.931 1206.36 121.301 1209.92 123.584C1213.51 125.839 1217.61 126.967 1222.23 126.967C1224.79 126.967 1227.19 126.633 1229.41 125.964C1231.66 125.268 1233.68 124.252 1235.46 122.916C1237.27 121.579 1238.79 119.936 1240.01 117.987C1241.26 116.038 1242.12 113.811 1242.6 111.305L1258.2 111.388C1257.62 115.453 1256.35 119.268 1254.41 122.832C1252.49 126.396 1249.97 129.542 1246.85 132.271C1243.74 134.972 1240.09 137.088 1235.92 138.619C1231.75 140.123 1227.12 140.875 1222.02 140.875C1214.51 140.875 1207.81 139.134 1201.91 135.654C1196.01 132.174 1191.37 127.148 1187.97 120.577C1184.58 114.006 1182.88 106.126 1182.88 96.9374C1182.88 87.7211 1184.59 79.8413 1188.01 73.2981C1191.44 66.7269 1196.1 61.7012 1201.99 58.2207C1207.89 54.7402 1214.57 53 1222.02 53C1226.78 53 1231.21 53.6682 1235.29 55.0047C1239.38 56.3412 1243.03 58.3042 1246.23 60.8937C1249.43 63.4553 1252.06 66.6016 1254.12 70.3327C1256.2 74.0359 1257.57 78.2682 1258.2 83.0294Z" fill="#9F9FA9"/>
<path d="M1318.83 77.6834C1318.44 74.0359 1316.8 71.1959 1313.91 69.1633C1311.04 67.1307 1307.31 66.1144 1302.72 66.1144C1299.49 66.1144 1296.73 66.6016 1294.42 67.5762C1292.11 68.5507 1290.34 69.8733 1289.12 71.5439C1287.89 73.2145 1287.27 75.1218 1287.24 77.2658C1287.24 79.0478 1287.64 80.5931 1288.45 81.9018C1289.28 83.2104 1290.41 84.3242 1291.83 85.243C1293.25 86.134 1294.82 86.8858 1296.55 87.4983C1298.27 88.1109 1300.01 88.626 1301.76 89.0437L1309.77 91.0484C1313 91.8002 1316.1 92.8165 1319.08 94.0973C1322.08 95.3781 1324.77 96.993 1327.13 98.9421C1329.53 100.891 1331.42 103.244 1332.81 106C1334.2 108.757 1334.9 111.987 1334.9 115.69C1334.9 120.702 1333.62 125.115 1331.06 128.93C1328.5 132.716 1324.8 135.682 1319.96 137.826C1315.14 139.942 1309.31 141 1302.47 141C1295.82 141 1290.05 139.97 1285.15 137.909C1280.28 135.849 1276.47 132.842 1273.72 128.888C1270.99 124.934 1269.52 120.117 1269.29 114.437H1284.53C1284.75 117.416 1285.67 119.894 1287.28 121.871C1288.89 123.848 1290.99 125.324 1293.58 126.299C1296.2 127.273 1299.12 127.76 1302.35 127.76C1305.71 127.76 1308.66 127.259 1311.19 126.257C1313.75 125.227 1315.76 123.807 1317.2 121.997C1318.65 120.159 1319.39 118.015 1319.41 115.565C1319.39 113.337 1318.73 111.5 1317.45 110.052C1316.17 108.576 1314.38 107.351 1312.07 106.376C1309.79 105.374 1307.12 104.483 1304.06 103.703L1294.33 101.197C1287.29 99.3876 1281.73 96.645 1277.64 92.9696C1273.58 89.2664 1271.55 84.352 1271.55 78.2264C1271.55 73.1867 1272.91 68.7735 1275.64 64.9867C1278.39 61.2 1282.13 58.2625 1286.86 56.1742C1291.59 54.0581 1296.95 53 1302.93 53C1308.99 53 1314.31 54.0581 1318.87 56.1742C1323.46 58.2625 1327.06 61.1721 1329.68 64.9032C1332.29 68.6064 1333.64 72.8665 1333.73 77.6834H1318.83Z" fill="#9F9FA9"/>
</svg>

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 MiB

View file

@ -1,8 +0,0 @@
# Robots.txt for OpenRAG Documentation
# Allow all crawlers
User-agent: *
Allow: /
# Sitemap location
Sitemap: https://docs.openr.ag/sitemap.xml

BIN
documents/2506.08231v1.pdf Normal file

Binary file not shown.

View file

@ -1,125 +0,0 @@
{
"data": {
"node": {
"template": {
"_type": "Component",
"base_url": {
"tool_mode": false,
"trace_as_input": true,
"trace_as_metadata": true,
"load_from_db": false,
"list": false,
"list_add_label": "Add More",
"required": true,
"placeholder": "",
"show": true,
"name": "base_url",
"value": "",
"display_name": "Ollama Base URL",
"advanced": false,
"input_types": ["Message"],
"dynamic": false,
"info": "",
"title_case": false,
"type": "str",
"_input_type": "MessageTextInput"
},
"code": {
"type": "code",
"required": true,
"placeholder": "",
"list": false,
"show": true,
"multiline": true,
"value": "from typing import Any\nfrom urllib.parse import urljoin\n\nimport httpx\nfrom langchain_ollama import OllamaEmbeddings\n\nfrom lfx.base.models.model import LCModelComponent\nfrom lfx.base.models.ollama_constants import OLLAMA_EMBEDDING_MODELS\nfrom lfx.field_typing import Embeddings\nfrom lfx.io import DropdownInput, MessageTextInput, Output\nfrom lfx.utils.util import transform_localhost_url\n\nHTTP_STATUS_OK = 200\n\n\nclass OllamaEmbeddingsComponent(LCModelComponent):\n display_name: str = \"Ollama Embeddings\"\n description: str = \"Generate embeddings using Ollama models.\"\n documentation = \"https://python.langchain.com/docs/integrations/text_embedding/ollama\"\n icon = \"Ollama\"\n name = \"OllamaEmbeddings\"\n\n inputs = [\n DropdownInput(\n name=\"model_name\",\n display_name=\"Ollama Model\",\n value=\"\",\n options=[],\n real_time_refresh=True,\n refresh_button=True,\n combobox=True,\n required=True,\n ),\n MessageTextInput(\n name=\"base_url\",\n display_name=\"Ollama Base URL\",\n value=\"\",\n required=True,\n ),\n ]\n\n outputs = [\n Output(display_name=\"Embeddings\", name=\"embeddings\", method=\"build_embeddings\"),\n ]\n\n def build_embeddings(self) -> Embeddings:\n transformed_base_url = transform_localhost_url(self.base_url)\n try:\n output = OllamaEmbeddings(model=self.model_name, base_url=transformed_base_url)\n except Exception as e:\n msg = (\n \"Unable to connect to the Ollama API. \",\n \"Please verify the base URL, ensure the relevant Ollama model is pulled, and try again.\",\n )\n raise ValueError(msg) from e\n return output\n\n async def update_build_config(self, build_config: dict, _field_value: Any, field_name: str | None = None):\n if field_name in {\"base_url\", \"model_name\"} and not await self.is_valid_ollama_url(self.base_url):\n msg = \"Ollama is not running on the provided base URL. Please start Ollama and try again.\"\n raise ValueError(msg)\n if field_name in {\"model_name\", \"base_url\", \"tool_model_enabled\"}:\n if await self.is_valid_ollama_url(self.base_url):\n build_config[\"model_name\"][\"options\"] = await self.get_model(self.base_url)\n else:\n build_config[\"model_name\"][\"options\"] = []\n\n return build_config\n\n async def get_model(self, base_url_value: str) -> list[str]:\n \"\"\"Get the model names from Ollama.\"\"\"\n model_ids = []\n try:\n base_url_value = transform_localhost_url(base_url_value)\n url = urljoin(base_url_value, \"/api/tags\")\n async with httpx.AsyncClient() as client:\n response = await client.get(url)\n response.raise_for_status()\n data = response.json()\n\n model_ids = [model[\"name\"] for model in data.get(\"models\", [])]\n # this to ensure that not embedding models are included.\n # not even the base models since models can have 1b 2b etc\n # handles cases when embeddings models have tags like :latest - etc.\n model_ids = [\n model\n for model in model_ids\n if any(model.startswith(f\"{embedding_model}\") for embedding_model in OLLAMA_EMBEDDING_MODELS)\n ]\n\n except (ImportError, ValueError, httpx.RequestError) as e:\n msg = \"Could not get model names from Ollama.\"\n raise ValueError(msg) from e\n\n return model_ids\n\n async def is_valid_ollama_url(self, url: str) -> bool:\n try:\n async with httpx.AsyncClient() as client:\n url = transform_localhost_url(url)\n return (await client.get(f\"{url}/api/tags\")).status_code == HTTP_STATUS_OK\n except httpx.RequestError:\n return False\n",
"fileTypes": [],
"file_path": "",
"password": false,
"name": "code",
"advanced": true,
"dynamic": true,
"info": "",
"load_from_db": false,
"title_case": false
},
"model_name": {
"tool_mode": false,
"trace_as_metadata": true,
"options": ["nomic-embed-text:latest", "all-minilm:latest"],
"options_metadata": [],
"combobox": true,
"dialog_inputs": {},
"toggle": false,
"required": true,
"placeholder": "",
"show": true,
"name": "model_name",
"value": "",
"display_name": "Ollama Model",
"advanced": false,
"dynamic": false,
"info": "",
"real_time_refresh": true,
"refresh_button": true,
"title_case": false,
"external_options": {},
"type": "str",
"_input_type": "DropdownInput"
}
},
"description": "Generate embeddings using Ollama models.",
"icon": "Ollama",
"base_classes": ["Embeddings"],
"display_name": "Ollama Embeddings",
"documentation": "https://python.langchain.com/docs/integrations/text_embedding/ollama",
"minimized": false,
"custom_fields": {},
"output_types": [],
"pinned": false,
"conditional_paths": [],
"frozen": false,
"outputs": [
{
"types": ["Embeddings"],
"selected": "Embeddings",
"name": "embeddings",
"display_name": "Embeddings",
"method": "build_embeddings",
"value": "__UNDEFINED__",
"cache": true,
"required_inputs": null,
"allows_loop": false,
"group_outputs": false,
"options": null,
"tool_mode": true
}
],
"field_order": ["model_name", "base_url"],
"beta": false,
"legacy": false,
"edited": false,
"metadata": {
"keywords": ["model", "llm", "language model", "large language model"],
"module": "lfx.components.ollama.ollama_embeddings.OllamaEmbeddingsComponent",
"code_hash": "9ef83e250bee",
"dependencies": {
"total_dependencies": 3,
"dependencies": [
{ "name": "httpx", "version": "0.28.1" },
{ "name": "langchain_ollama", "version": "0.2.1" },
{ "name": "lfx", "version": "0.1.12.dev32" }
]
}
},
"tool_mode": false,
"last_updated": "2025-10-29T19:54:23.774Z",
"official": false
},
"showNode": true,
"type": "OllamaEmbeddings",
"id": "OllamaEmbeddings-3JO8z"
},
"id": "OllamaEmbeddings-3JO8z",
"position": { "x": 0, "y": 0 },
"type": "genericNode"
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load diff

Some files were not shown because too many files have changed in this diff Show more