Skip to content

Commit 3ecd3df

Browse files
committed
Merge branch 'main' into feature/minio-rmq-integration
2 parents 753abfb + 50bf8e4 commit 3ecd3df

File tree

8 files changed

+1705
-247
lines changed

8 files changed

+1705
-247
lines changed

DocsManager/app/core/config.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,6 @@ def normalize_rabbitmq_host(cls, v: str) -> str:
5555
logger.warning("RABBITMQ_HOST is empty, using 'localhost' as default")
5656
return "localhost"
5757

58-
# Replace Docker service name with localhost
59-
if v.strip() == "rabbitmq":
60-
logger.warning(
61-
"RABBITMQ_HOST='rabbitmq' detected. Changing to 'localhost' because app runs outside Docker"
62-
)
63-
return "localhost"
64-
6558
return v
6659

6760
@model_validator(mode='after')

RAGManager/.env.example

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
# PostgreSQL Configuration
2-
POSTGRES_USER=postgres
3-
POSTGRES_PASSWORD=postgres
4-
POSTGRES_DB=vectordb
5-
POSTGRES_HOST=localhost
6-
POSTGRES_PORT=5432
1+
DATABASE_URL=postgresql://postgres:postgres@postgres:5432/vectordb
72

83
# RabbitMQ Configuration
94
RABBITMQ_USER=guest
@@ -12,13 +7,24 @@ RABBITMQ_HOST=localhost
127
RABBITMQ_PORT=5672
138
RABBITMQ_MANAGEMENT_PORT=15672
149

10+
MINIO_ENDPOINT=http://minio:9000
11+
MINIO_ACCESS_KEY=minioadmin
12+
MINIO_SECRET_KEY=minioadmin
13+
MINIO_BUCKET=goland-bucket
14+
MINIO_FOLDER=rag-docs
15+
MINIO_USE_SSL=false
16+
1517
# OpenAI Configuration
1618
OPENAI_API_KEY=your-openai-api-key-here
1719

1820
# Chunking Configuration (if needed)
1921
CHUNK_SIZE=1000
2022
CHUNK_OVERLAP=200
2123

24+
25+
EMBEDDING_MODEL="text-embedding-3-small"
26+
EMBEDDING_DIMENSION=1536
27+
2228
# =============================================================================
2329
# IMPORTANT NOTES
2430
# =============================================================================

RAGManager/app/services/chunking_service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from langchain.text_splitter import RecursiveCharacterTextSplitter
1+
from langchain_text_splitters import RecursiveCharacterTextSplitter
22

33

44
def split_documents(documents):

RAGManager/app/services/pipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from langchain_core.documents import Document
44

55
from app.core.config import settings
6-
from app.services.chunking_service import document_to_chunks
6+
from app.services.chunking_service import split_documents as document_to_chunks
77
from app.services.embedding_service import chunks_to_embeddings
88
from app.services.pdf_processor import pdf_to_document
99

RAGManager/pyproject.toml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "goland-ia"
33
version = "0.1.0"
44
description = "Add your description here"
55
readme = "README.md"
6-
requires-python = ">=3.14"
6+
requires-python = ">=3.12,<3.13"
77
dependencies = [
88
"fastapi>=0.124.2",
99
"ipython>=9.8.0",
@@ -17,7 +17,12 @@ dependencies = [
1717
"pydantic-settings>=2.0.0",
1818
"typing-extensions>=4.15.0",
1919
"uvicorn>=0.38.0",
20-
"guardrails-ai>=0.6.2",
20+
"guardrails-ai>=0.5.10",
21+
"langchain>=1.2.0",
22+
"langchain-community>=0.4.1",
23+
"langchain-text-splitters>=1.1.0",
24+
"pdfplumber>=0.11.8",
25+
"minio>=7.2.20",
2126
"presidio-analyzer>=2.2.360",
2227
"presidio-anonymizer>=2.2.360",
2328
]
@@ -82,4 +87,4 @@ indent-style = "space"
8287
skip-magic-trailing-comma = false
8388

8489
# Automatically detect line ending
85-
line-ending = "auto"
90+
line-ending = "auto"

RAGManager/uv.lock

Lines changed: 1634 additions & 142 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

compose.yml

Lines changed: 0 additions & 85 deletions
This file was deleted.

docker-compose.yml

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,53 @@
1-
version: '3.8'
2-
31
services:
2+
docs-manager:
3+
build:
4+
context: ./DocsManager
5+
dockerfile: Dockerfile
6+
container_name: docs-manager
7+
ports:
8+
- "8000:8000"
9+
env_file:
10+
- .env
11+
- ./DocsManager/.env
12+
depends_on:
13+
postgres:
14+
condition: service_healthy
15+
rabbitmq:
16+
condition: service_healthy
17+
minio:
18+
condition: service_healthy
19+
restart: unless-stopped
20+
environment:
21+
- PYTHONUNBUFFERED=1
22+
- SERVICE_NAME=docs-manager
23+
- SERVICE_ROLE=document-handler
24+
networks:
25+
- app-network
26+
27+
rag-manager:
28+
build:
29+
context: ./RAGManager
30+
dockerfile: Dockerfile
31+
container_name: rag-manager
32+
ports:
33+
- "8001:8000"
34+
env_file:
35+
- .env
36+
- ./RAGManager/.env
37+
depends_on:
38+
postgres:
39+
condition: service_healthy
40+
rabbitmq:
41+
condition: service_healthy
42+
minio:
43+
condition: service_healthy
44+
restart: unless-stopped
45+
environment:
46+
- PYTHONUNBUFFERED=1
47+
- SERVICE_NAME=rag-manager
48+
- SERVICE_ROLE=document-processor
49+
networks:
50+
- app-network
451
# PostgreSQL con pgvector
552
postgres:
653
build:

0 commit comments

Comments
 (0)