Merge branch 'main' into docs-flatten-nav

This commit is contained in:
Mendon Kissling 2025-10-24 09:25:46 -04:00 committed by GitHub
commit ce63175b0d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 114 additions and 111 deletions

View file

@ -49,10 +49,10 @@ To launch OpenRAG with the TUI, do the following:
For the full TUI guide, see [TUI](https://docs.openr.ag/get-started/tui).
## Docker Deployment
## Docker installation
If you prefer to use Docker to run OpenRAG, the repository includes two Docker Compose `.yml` files.
They deploy the same applications and containers, but to different environments.
They deploy the same applications and containers locally, but to different environments.
- [`docker-compose.yml`](https://github.com/langflow-ai/openrag/blob/main/docker-compose.yml) is an OpenRAG deployment for environments with GPU support. GPU support requires an NVIDIA GPU with CUDA support and compatible NVIDIA drivers installed on the OpenRAG host machine.
@ -60,7 +60,7 @@ They deploy the same applications and containers, but to different environments.
Both Docker deployments depend on `docling serve` to be running on port `5001` on the host machine. This enables [Mac MLX](https://opensource.apple.com/projects/mlx/) support for document processing. Installing OpenRAG with the TUI starts `docling serve` automatically, but for a Docker deployment you must manually start the `docling serve` process.
To deploy OpenRAG with Docker:
To install OpenRAG with Docker:
1. Clone the OpenRAG repository.
```bash
@ -121,7 +121,7 @@ To deploy OpenRAG with Docker:
uv run python scripts/docling_ctl.py stop
```
For more information, see [Deploy with Docker](https://docs.openr.ag/get-started/docker).
For more information, see [Install with Docker](https://docs.openr.ag/get-started/docker).
## Troubleshooting

View file

@ -5,16 +5,12 @@ import TabItem from '@theme/TabItem';
The first time you start OpenRAG, whether using the TUI or a `.env` file, you must complete application onboarding.
Most values from onboarding can be changed later in the OpenRAG **Settings** page, but there are important restrictions.
The **language model provider** and **embeddings model provider** can only be selected at onboarding, and you must use the same provider for your language model and embedding model.
To change your provider selection later, you must completely reinstall OpenRAG.
The **language model** can be changed later in **Settings**, but the **embeddings model** cannot be changed later.
Values from onboarding can be changed later in the OpenRAG **Settings** page.
<Tabs groupId="Provider">
<TabItem value="OpenAI" label="OpenAI" default>
1. Enable **Get API key from environment variable** to automatically enter your key from the TUI-generated `.env` file.
Alternatively, paste an OpenAI API key into the field.
2. Under **Advanced settings**, select your **Embedding Model** and **Language Model**.
3. To load 2 sample PDFs, enable **Sample dataset**.
This is recommended, but not required.

View file

@ -39,7 +39,7 @@ The files are loaded into your OpenSearch database, and appear in the Knowledge
### Ingest files through OAuth connectors {#oauth-ingestion}
OpenRAG supports Google Drive, OneDrive, and AWS S3 as OAuth connectors for seamless document synchronization.
OpenRAG supports Google Drive, OneDrive, and Sharepoint as OAuth connectors for seamless document synchronization.
OAuth integration allows individual users to connect their personal cloud storage accounts to OpenRAG. Each user must separately authorize OpenRAG to access their own cloud storage files. When a user connects a cloud service, they are redirected to authenticate with that service provider and grant OpenRAG permission to sync documents from their personal cloud storage.

View file

@ -6,7 +6,7 @@ slug: /get-started/docker
import PartialOnboarding from '@site/docs/_partial-onboarding.mdx';
There are two different Docker Compose files.
They deploy the same applications and containers, but to different environments.
They deploy the same applications and containers locally, but to different environments.
- [`docker-compose.yml`](https://github.com/langflow-ai/openrag/blob/main/docker-compose.yml) is an OpenRAG deployment with GPU support for accelerated AI processing.
@ -23,7 +23,7 @@ Both Docker deployments depend on `docling serve` to be running on port `5001` o
- Create an [OpenAI API key](https://platform.openai.com/api-keys). This key is **required** to start OpenRAG, but you can choose a different model provider during [Application Onboarding](#application-onboarding).
- Optional: GPU support requires an NVIDIA GPU with CUDA support and compatible NVIDIA drivers installed on the OpenRAG host machine. If you don't have GPU capabilities, OpenRAG provides an alternate CPU-only deployment.
## Deploy OpenRAG with Docker Compose
## Install OpenRAG with Docker Compose
To install OpenRAG with Docker Compose, do the following:
@ -82,7 +82,7 @@ The following values are **required** to be set:
PID: 27746
```
7. Deploy OpenRAG with Docker Compose based on your deployment type.
7. Deploy OpenRAG locally with Docker Compose based on your deployment type.
For GPU-enabled systems, run the following commands:
```bash

View file

@ -93,8 +93,9 @@ For OAuth setup, use **Advanced Setup**.
1. To install OpenRAG with **Advanced Setup**, click **Advanced Setup** or press <kbd>2</kbd>.
2. Click **Generate Passwords** to generate passwords for OpenSearch and Langflow.
3. Paste your OpenAI API key in the OpenAI API key field.
4. Add your client and secret values for Google, Azure, or AWS OAuth.
These values can be found in your OAuth provider.
4. Add your client and secret values for Google or Microsoft OAuth.
These values can be found with your OAuth provider.
For more information, see the [Google OAuth client](https://developers.google.com/identity/protocols/oauth2) or [Microsoft Graph OAuth client](https://learn.microsoft.com/en-us/onedrive/developer/rest-api/getting-started/graph-oauth) documentation.
5. The OpenRAG TUI presents redirect URIs for your OAuth app.
These are the URLs your OAuth provider will redirect back to after user sign-in.
Register these redirect values with your OAuth provider as they are presented in the TUI.
@ -107,8 +108,8 @@ For OAuth setup, use **Advanced Setup**.
Command completed successfully
```
8. To open the OpenRAG application, click **Open App**, press <kbd>6</kbd>, or navigate to `http://localhost:3000`.
You will be presented with your provider's OAuth sign-in screen, and be redirected to the redirect URI after sign-in.
Continue with Application Onboarding.
You are presented with your provider's OAuth sign-in screen.
After sign-in, you are redirected to the redirect URI.
Two additional variables are available for Advanced Setup:
@ -116,7 +117,10 @@ For OAuth setup, use **Advanced Setup**.
The `WEBHOOK_BASE_URL` controls where the endpoint for `/connectors/CONNECTOR_TYPE/webhook` will be available.
This connection enables real-time document synchronization with external services.
For example, for Google Drive file synchronization the webhook URL is `/connectors/google_drive/webhook`.
Supported webhook endpoints:
- Google Drive: `/connectors/google_drive/webhook`
- OneDrive: `/connectors/onedrive/webhook`
- SharePoint: `/connectors/sharepoint/webhook`
9. Continue with [Application Onboarding](#application-onboarding).
</TabItem>

View file

@ -44,8 +44,6 @@ If you aren't getting the results you need, you can further tune the knowledge i
To modify the knowledge ingestion or Agent behavior, click <Icon name="Settings2" aria-hidden="true"/> **Settings**.
In this example, you'll try a different LLM to demonstrate how the Agent's response changes.
You can only change the **Language model**, and not the **Model provider** that you started with in OpenRAG.
If you're using Ollama, you can use any installed model.
1. To edit the Agent's behavior, click **Edit in Langflow**.
You can more quickly access the **Language Model** and **Agent Instructions** fields in this page, but for illustration purposes, navigate to the Langflow visual builder.

View file

@ -4,10 +4,11 @@ import { useQueryClient } from "@tanstack/react-query";
import {
ChevronDown,
Cloud,
File,
Folder,
FolderOpen,
Loader2,
PlugZap,
Upload,
} from "lucide-react";
import { useRouter } from "next/navigation";
import { useEffect, useRef, useState } from "react";
@ -22,18 +23,28 @@ import {
DialogHeader,
DialogTitle,
} from "@/components/ui/dialog";
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
import { Input } from "@/components/ui/input";
import { Label } from "@/components/ui/label";
import { useTask } from "@/contexts/task-context";
import { cn } from "@/lib/utils";
import type { File as SearchFile } from "@/src/app/api/queries/useGetSearchQuery";
import GoogleDriveIcon from "@/app/settings/icons/google-drive-icon";
import OneDriveIcon from "@/app/settings/icons/one-drive-icon";
import SharePointIcon from "@/app/settings/icons/share-point-icon";
import AwsIcon from "@/app/settings/icons/aws-icon";
import { cn } from "@/lib/utils";
export function KnowledgeDropdown() {
const { addTask } = useTask();
const { refetch: refetchTasks } = useGetTasksQuery();
const queryClient = useQueryClient();
const router = useRouter();
const [isOpen, setIsOpen] = useState(false);
const [isMenuOpen, setIsMenuOpen] = useState(false);
const [showFolderDialog, setShowFolderDialog] = useState(false);
const [showS3Dialog, setShowS3Dialog] = useState(false);
const [showDuplicateDialog, setShowDuplicateDialog] = useState(false);
@ -55,7 +66,6 @@ export function KnowledgeDropdown() {
};
}>({});
const fileInputRef = useRef<HTMLInputElement>(null);
const dropdownRef = useRef<HTMLDivElement>(null);
// Check AWS availability and cloud connectors on mount
useEffect(() => {
@ -141,24 +151,6 @@ export function KnowledgeDropdown() {
checkAvailability();
}, []);
// Handle click outside to close dropdown
useEffect(() => {
const handleClickOutside = (event: MouseEvent) => {
if (
dropdownRef.current &&
!dropdownRef.current.contains(event.target as Node)
) {
setIsOpen(false);
}
};
if (isOpen) {
document.addEventListener("mousedown", handleClickOutside);
return () =>
document.removeEventListener("mousedown", handleClickOutside);
}
}, [isOpen]);
const handleFileUpload = () => {
fileInputRef.current?.click();
};
@ -168,8 +160,7 @@ export function KnowledgeDropdown() {
if (files && files.length > 0) {
const file = files[0];
// Close dropdown immediately after file selection
setIsOpen(false);
// File selection will close dropdown automatically
try {
// Check if filename already exists (using ORIGINAL filename)
@ -427,13 +418,19 @@ export function KnowledgeDropdown() {
}
};
// Icon mapping for cloud connectors
const connectorIconMap = {
google_drive: GoogleDriveIcon,
onedrive: OneDriveIcon,
sharepoint: SharePointIcon,
};
const cloudConnectorItems = Object.entries(cloudConnectors)
.filter(([, info]) => info.available)
.map(([type, info]) => ({
label: info.name,
icon: PlugZap,
icon: connectorIconMap[type as keyof typeof connectorIconMap] || PlugZap,
onClick: async () => {
setIsOpen(false);
if (info.connected && info.hasToken) {
setIsNavigatingToCloud(true);
try {
@ -448,36 +445,29 @@ export function KnowledgeDropdown() {
}
},
disabled: !info.connected || !info.hasToken,
tooltip: !info.connected
? `Connect ${info.name} in Settings first`
: !info.hasToken
? `Reconnect ${info.name} - access token required`
: undefined,
}));
const menuItems = [
{
label: "Add File",
icon: Upload,
label: "File",
icon: ({ className }: { className?: string }) => (
<File className={cn(className, "text-muted-foreground")} />
),
onClick: handleFileUpload,
},
{
label: "Process Folder",
icon: FolderOpen,
onClick: () => {
setIsOpen(false);
setShowFolderDialog(true);
},
label: "Folder",
icon: ({ className }: { className?: string }) => (
<Folder className={cn(className, "text-muted-foreground")} />
),
onClick: () => setShowFolderDialog(true),
},
...(awsEnabled
? [
{
label: "Process S3 Bucket",
icon: Cloud,
onClick: () => {
setIsOpen(false);
setShowS3Dialog(true);
},
label: "Amazon S3",
icon: AwsIcon,
onClick: () => setShowS3Dialog(true),
},
]
: []),
@ -490,13 +480,9 @@ export function KnowledgeDropdown() {
return (
<>
<div ref={dropdownRef} className="relative">
<Button
type="button"
onClick={() => !isLoading && setIsOpen(!isOpen)}
disabled={isLoading}
>
<>
<DropdownMenu onOpenChange={setIsMenuOpen}>
<DropdownMenuTrigger asChild>
<Button disabled={isLoading}>
{isLoading && <Loader2 className="h-4 w-4 animate-spin" />}
<span>
{isLoading
@ -514,46 +500,34 @@ export function KnowledgeDropdown() {
{!isLoading && (
<ChevronDown
className={cn(
"h-4 w-4 transition-transform",
isOpen && "rotate-180"
"h-4 w-4 transition-transform duration-200",
isMenuOpen && "rotate-180"
)}
/>
)}
</>
</Button>
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end" className="w-56">
{menuItems.map((item, index) => (
<DropdownMenuItem
key={`${item.label}-${index}`}
onClick={item.onClick}
disabled={"disabled" in item ? item.disabled : false}
>
<item.icon className="mr-2 h-4 w-4" />
{item.label}
</DropdownMenuItem>
))}
</DropdownMenuContent>
</DropdownMenu>
{isOpen && !isLoading && (
<div className="absolute top-full left-0 right-0 mt-1 bg-popover border border-border rounded-md shadow-md z-50">
<div className="py-1">
{menuItems.map((item, index) => (
<button
key={`${item.label}-${index}`}
type="button"
onClick={item.onClick}
disabled={"disabled" in item ? item.disabled : false}
title={"tooltip" in item ? item.tooltip : undefined}
className={cn(
"w-full px-3 py-2 text-left text-sm hover:bg-accent hover:text-accent-foreground",
"disabled" in item &&
item.disabled &&
"opacity-50 cursor-not-allowed hover:bg-transparent hover:text-current"
)}
>
{item.label}
</button>
))}
</div>
</div>
)}
<input
ref={fileInputRef}
type="file"
onChange={handleFileChange}
className="hidden"
accept=".pdf,.doc,.docx,.txt,.md,.rtf,.odt"
/>
</div>
<input
ref={fileInputRef}
type="file"
onChange={handleFileChange}
className="hidden"
accept=".pdf,.doc,.docx,.txt,.md,.rtf,.odt"
/>
{/* Process Folder Dialog */}
<Dialog open={showFolderDialog} onOpenChange={setShowFolderDialog}>
@ -575,7 +549,7 @@ export function KnowledgeDropdown() {
type="text"
placeholder="/path/to/documents"
value={folderPath}
onChange={e => setFolderPath(e.target.value)}
onChange={(e) => setFolderPath(e.target.value)}
/>
</div>
<div className="flex justify-end gap-2">
@ -617,7 +591,7 @@ export function KnowledgeDropdown() {
type="text"
placeholder="s3://bucket/path"
value={bucketUrl}
onChange={e => setBucketUrl(e.target.value)}
onChange={(e) => setBucketUrl(e.target.value)}
/>
</div>
<div className="flex justify-end gap-2">

View file

@ -0,0 +1,31 @@
const AwsIcon = ({ className }: { className?: string }) => {
return (
<svg
width="16"
height="16"
viewBox="0 0 16 16"
fill="none"
xmlns="http://www.w3.org/2000/svg"
className={className}
>
<path
d="M4.50896 6.82059C4.50896 7.01818 4.53024 7.1784 4.56749 7.29588C4.61006 7.41337 4.66328 7.54154 4.73778 7.68039C4.76438 7.72311 4.77503 7.76584 4.77503 7.80322C4.77503 7.85662 4.7431 7.91003 4.67392 7.96343L4.33867 8.18772C4.29078 8.21977 4.24288 8.23579 4.20031 8.23579C4.1471 8.23579 4.09388 8.20909 4.04067 8.16102C3.96617 8.08092 3.90231 7.99547 3.8491 7.91003C3.79588 7.81924 3.74267 7.71777 3.68413 7.59494C3.26906 8.08626 2.74756 8.33191 2.11963 8.33191C1.67263 8.33191 1.3161 8.20375 1.05535 7.94741C0.794596 7.69107 0.66156 7.34929 0.66156 6.92206C0.66156 6.46813 0.821203 6.09964 1.14581 5.82194C1.47042 5.54424 1.90145 5.40539 2.44956 5.40539C2.63049 5.40539 2.81674 5.42141 3.01363 5.44811C3.21053 5.47482 3.41274 5.51754 3.6256 5.5656V5.17576C3.6256 4.76989 3.54045 4.48685 3.37549 4.3213C3.2052 4.15575 2.91785 4.07564 2.5081 4.07564C2.32185 4.07564 2.13028 4.097 1.93338 4.14506C1.73649 4.19313 1.54492 4.25187 1.35867 4.32664C1.27352 4.36402 1.20967 4.38538 1.17242 4.39606C1.13517 4.40674 1.10856 4.41208 1.08727 4.41208C1.01277 4.41208 0.975524 4.35868 0.975524 4.24653V3.98485C0.975524 3.89941 0.986167 3.83532 1.01277 3.79794C1.03938 3.76056 1.08727 3.72318 1.16177 3.68579C1.34802 3.58967 1.57152 3.50956 1.83227 3.44548C2.09302 3.37605 2.36974 3.34401 2.66242 3.34401C3.29567 3.34401 3.75863 3.4882 4.05663 3.77658C4.34931 4.06496 4.49831 4.50287 4.49831 5.09031V6.82059H4.50896ZM2.34845 7.63233C2.52406 7.63233 2.70499 7.60028 2.89656 7.5362C3.08813 7.47212 3.25842 7.35463 3.4021 7.19442C3.48724 7.09295 3.5511 6.9808 3.58303 6.85263C3.61495 6.72446 3.63624 6.56959 3.63624 6.38802V6.16372C3.48192 6.12634 3.31695 6.0943 3.14667 6.07294C2.97638 6.05158 2.81142 6.0409 2.64645 6.0409C2.28992 6.0409 2.02917 6.11032 1.85356 6.25451C1.67795 6.3987 1.59281 6.60163 1.59281 6.86865C1.59281 7.11965 1.65667 7.30656 1.7897 7.43473C1.91742 7.56824 2.10367 7.63233 2.34845 7.63233ZM6.62156 8.20909C6.52578 8.20909 6.46192 8.19307 6.41935 8.15568C6.37678 8.12364 6.33953 8.04888 6.3076 7.94741L5.05706 3.8193C5.02513 3.71249 5.00917 3.64307 5.00917 3.60569C5.00917 3.52024 5.05174 3.47218 5.13688 3.47218H5.65838C5.75949 3.47218 5.82867 3.4882 5.86592 3.52558C5.90849 3.55762 5.94042 3.63239 5.97235 3.73386L6.86635 7.26918L7.69649 3.73386C7.7231 3.62705 7.75503 3.55762 7.7976 3.52558C7.84017 3.49354 7.91467 3.47218 8.01046 3.47218H8.43617C8.53728 3.47218 8.60646 3.4882 8.64903 3.52558C8.6916 3.55762 8.72885 3.63239 8.75014 3.73386L9.59092 7.3119L10.5115 3.73386C10.5435 3.62705 10.5807 3.55762 10.618 3.52558C10.6605 3.49354 10.7297 3.47218 10.8255 3.47218H11.3204C11.4055 3.47218 11.4534 3.5149 11.4534 3.60569C11.4534 3.63239 11.4481 3.65909 11.4428 3.69113C11.4375 3.72318 11.4268 3.7659 11.4055 3.82464L10.1231 7.95275C10.0911 8.05956 10.0539 8.12898 10.0113 8.16102C9.96874 8.19307 9.89956 8.21443 9.8091 8.21443H9.35146C9.25035 8.21443 9.18117 8.19841 9.1386 8.16102C9.09603 8.12364 9.05878 8.05422 9.03749 7.94741L8.21267 4.50287L7.39317 7.94207C7.36656 8.04888 7.33463 8.1183 7.29206 8.15568C7.24949 8.19307 7.17499 8.20909 7.07921 8.20909H6.62156ZM13.4596 8.35328C13.1829 8.35328 12.9062 8.32123 12.6401 8.25715C12.374 8.19307 12.1665 8.12364 12.0281 8.04353C11.943 7.99547 11.8845 7.94207 11.8632 7.894C11.8419 7.84594 11.8312 7.79254 11.8312 7.74447V7.47212C11.8312 7.35997 11.8738 7.30656 11.9536 7.30656C11.9856 7.30656 12.0175 7.3119 12.0494 7.32259C12.0814 7.33327 12.1292 7.35463 12.1825 7.37599C12.3634 7.45609 12.5603 7.52018 12.7678 7.5629C12.9807 7.60562 13.1882 7.62699 13.4011 7.62699C13.7363 7.62699 13.9971 7.56824 14.178 7.45075C14.3589 7.33327 14.4547 7.16237 14.4547 6.94342C14.4547 6.79389 14.4068 6.67106 14.311 6.56959C14.2152 6.46813 14.0343 6.37734 13.7736 6.29189L13.002 6.05158C12.6135 5.92875 12.3261 5.74718 12.1505 5.50686C11.9749 5.27188 11.8845 5.0102 11.8845 4.73251C11.8845 4.50821 11.9324 4.31062 12.0281 4.13972C12.1239 3.96883 12.2516 3.8193 12.4113 3.70181C12.5709 3.57899 12.7519 3.4882 12.9647 3.42411C13.1776 3.36003 13.4011 3.33333 13.6352 3.33333C13.7523 3.33333 13.8747 3.33867 13.9917 3.35469C14.1141 3.37071 14.2259 3.39207 14.3376 3.41343C14.4441 3.44014 14.5452 3.46684 14.641 3.49888C14.7367 3.53092 14.8112 3.56296 14.8645 3.59501C14.939 3.63773 14.9922 3.68045 15.0241 3.72852C15.056 3.77124 15.072 3.82998 15.072 3.90475V4.15575C15.072 4.26789 15.0294 4.32664 14.9496 4.32664C14.907 4.32664 14.8379 4.30528 14.7474 4.26255C14.4441 4.1237 14.1035 4.05428 13.7257 4.05428C13.4224 4.05428 13.1829 4.10234 13.0179 4.20381C12.853 4.30528 12.7678 4.46015 12.7678 4.6791C12.7678 4.82863 12.821 4.9568 12.9275 5.05827C13.0339 5.15973 13.2308 5.2612 13.5128 5.35199L14.2685 5.5923C14.6516 5.71513 14.9283 5.88603 15.0933 6.10498C15.2582 6.32394 15.3381 6.57493 15.3381 6.85263C15.3381 7.08227 15.2902 7.29054 15.1997 7.47212C15.1039 7.65369 14.9762 7.8139 14.8112 7.94207C14.6463 8.07558 14.4494 8.1717 14.2206 8.24113C13.9811 8.31589 13.731 8.35328 13.4596 8.35328Z"
fill="currentColor"
/>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M14.4654 10.9487C12.7146 12.2464 10.171 12.9353 7.98385 12.9353C4.91871 12.9353 2.15688 11.7978 0.0708824 9.90731C-0.094082 9.75778 0.0549181 9.55484 0.251811 9.67233C2.5081 10.9861 5.29121 11.7818 8.1701 11.7818C10.1124 11.7818 12.2463 11.3759 14.2099 10.5428C14.5026 10.4093 14.7527 10.7351 14.4654 10.9487Z"
fill="#FF9900"
/>
<path
fill-rule="evenodd"
clip-rule="evenodd"
d="M15.1944 10.1156C14.9709 9.82721 13.715 9.97674 13.1457 10.0462C12.9754 10.0675 12.9488 9.91799 13.1031 9.80584C14.1035 9.10092 15.7478 9.30385 15.9394 9.53883C16.131 9.77914 15.8862 11.4293 14.9496 12.2197C14.8059 12.3425 14.6676 12.2784 14.7314 12.1182C14.9443 11.5895 15.4179 10.3986 15.1944 10.1156Z"
fill="#FF9900"
/>
</svg>
);
};
export default AwsIcon;