fix: openrag documents ingestion (#545)
* Changed references to /app/documents to reference /app/openrag-documents * bump version
This commit is contained in:
parent
268d5b3d00
commit
3624b4f82b
7 changed files with 332 additions and 332 deletions
|
|
@ -81,7 +81,7 @@ services:
|
||||||
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
|
- AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
|
||||||
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
|
- AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
|
||||||
volumes:
|
volumes:
|
||||||
- ./openrag-documents:/app/documents:Z
|
- ./openrag-documents:/app/openrag-documents:Z
|
||||||
- ./keys:/app/keys:Z
|
- ./keys:/app/keys:Z
|
||||||
- ./flows:/app/flows:U,z
|
- ./flows:/app/flows:U,z
|
||||||
- ./config:/app/config:Z
|
- ./config:/app/config:Z
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ To configure the knowledge ingestion pipeline parameters, see [Docling Ingestion
|
||||||
|
|
||||||
The **Knowledge Ingest** flow uses Langflow's [**File** component](https://docs.langflow.org/components-data#file) to split and embed files loaded from your local machine into the OpenSearch database.
|
The **Knowledge Ingest** flow uses Langflow's [**File** component](https://docs.langflow.org/components-data#file) to split and embed files loaded from your local machine into the OpenSearch database.
|
||||||
|
|
||||||
The default path to your local folder is mounted from the `./openrag-documents` folder in your OpenRAG project directory to the `/app/documents/` directory inside the Docker container. Files added to the host or the container will be visible in both locations. To configure this location, modify the **Documents Paths** variable in either the TUI's [Advanced Setup](/install#setup) menu or in the `.env` used by Docker Compose.
|
The default path to your local folder is mounted from the `./openrag-documents` folder in your OpenRAG project directory to the `/app/openrag-documents/` directory inside the Docker container. Files added to the host or the container will be visible in both locations. To configure this location, modify the **Documents Paths** variable in either the TUI's [Advanced Setup](/install#setup) menu or in the `.env` used by Docker Compose.
|
||||||
|
|
||||||
To load and process a single file from the mapped location, click **Add Knowledge**, and then click <Icon name="File" aria-hidden="true"/> **File**.
|
To load and process a single file from the mapped location, click **Add Knowledge**, and then click <Icon name="File" aria-hidden="true"/> **File**.
|
||||||
The file is loaded into your OpenSearch database, and appears in the Knowledge page.
|
The file is loaded into your OpenSearch database, and appears in the Knowledge page.
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { useState, useEffect } from "react";
|
import { Cloud, FolderOpen, Loader2, Upload } from "lucide-react";
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
import { ProtectedRoute } from "@/components/protected-route";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import {
|
import {
|
||||||
Card,
|
Card,
|
||||||
|
|
@ -11,8 +13,6 @@ import {
|
||||||
} from "@/components/ui/card";
|
} from "@/components/ui/card";
|
||||||
import { Input } from "@/components/ui/input";
|
import { Input } from "@/components/ui/input";
|
||||||
import { Label } from "@/components/ui/label";
|
import { Label } from "@/components/ui/label";
|
||||||
import { Upload, FolderOpen, Loader2, Cloud } from "lucide-react";
|
|
||||||
import { ProtectedRoute } from "@/components/protected-route";
|
|
||||||
import { useTask } from "@/contexts/task-context";
|
import { useTask } from "@/contexts/task-context";
|
||||||
|
|
||||||
function AdminPage() {
|
function AdminPage() {
|
||||||
|
|
@ -20,7 +20,7 @@ function AdminPage() {
|
||||||
const [fileUploadLoading, setFileUploadLoading] = useState(false);
|
const [fileUploadLoading, setFileUploadLoading] = useState(false);
|
||||||
const [pathUploadLoading, setPathUploadLoading] = useState(false);
|
const [pathUploadLoading, setPathUploadLoading] = useState(false);
|
||||||
const [selectedFile, setSelectedFile] = useState<File | null>(null);
|
const [selectedFile, setSelectedFile] = useState<File | null>(null);
|
||||||
const [folderPath, setFolderPath] = useState("/app/documents/");
|
const [folderPath, setFolderPath] = useState("/app/openrag-documents/");
|
||||||
const [bucketUploadLoading, setBucketUploadLoading] = useState(false);
|
const [bucketUploadLoading, setBucketUploadLoading] = useState(false);
|
||||||
const [bucketUrl, setBucketUrl] = useState("s3://");
|
const [bucketUrl, setBucketUrl] = useState("s3://");
|
||||||
const [uploadStatus, setUploadStatus] = useState<string>("");
|
const [uploadStatus, setUploadStatus] = useState<string>("");
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "openrag"
|
name = "openrag"
|
||||||
version = "0.1.45"
|
version = "0.1.46"
|
||||||
description = "Add your description here"
|
description = "Add your description here"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.13"
|
requires-python = ">=3.13"
|
||||||
|
|
|
||||||
|
|
@ -304,7 +304,7 @@ async def init_index_when_ready():
|
||||||
|
|
||||||
def _get_documents_dir():
|
def _get_documents_dir():
|
||||||
"""Get the documents directory path, handling both Docker and local environments."""
|
"""Get the documents directory path, handling both Docker and local environments."""
|
||||||
# In Docker, the volume is mounted at /app/documents
|
# In Docker, the volume is mounted at /app/openrag-documents
|
||||||
# Locally, we use openrag-documents
|
# Locally, we use openrag-documents
|
||||||
container_env = detect_container_environment()
|
container_env = detect_container_environment()
|
||||||
if container_env:
|
if container_env:
|
||||||
|
|
|
||||||
|
|
@ -521,15 +521,15 @@ class EnvManager:
|
||||||
)
|
)
|
||||||
|
|
||||||
if not is_valid:
|
if not is_valid:
|
||||||
return ["./openrag-documents:/app/documents:Z"] # fallback
|
return ["./openrag-documents:/app/openrag-documents:Z"] # fallback
|
||||||
|
|
||||||
volume_mounts = []
|
volume_mounts = []
|
||||||
for i, path in enumerate(validated_paths):
|
for i, path in enumerate(validated_paths):
|
||||||
if i == 0:
|
if i == 0:
|
||||||
# First path maps to the default /app/documents
|
# First path maps to the default /app/openrag-documents
|
||||||
volume_mounts.append(f"{path}:/app/documents:Z")
|
volume_mounts.append(f"{path}:/app/openrag-documents:Z")
|
||||||
else:
|
else:
|
||||||
# Additional paths map to numbered directories
|
# Additional paths map to numbered directories
|
||||||
volume_mounts.append(f"{path}:/app/documents{i + 1}:Z")
|
volume_mounts.append(f"{path}:/app/openrag-documents{i + 1}:Z")
|
||||||
|
|
||||||
return volume_mounts
|
return volume_mounts
|
||||||
|
|
|
||||||
2
uv.lock
generated
2
uv.lock
generated
|
|
@ -2353,7 +2353,7 @@ wheels = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "openrag"
|
name = "openrag"
|
||||||
version = "0.1.44"
|
version = "0.1.46"
|
||||||
source = { editable = "." }
|
source = { editable = "." }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "agentd" },
|
{ name = "agentd" },
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue