Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,5 @@ Thumbs.db

# Milvus
**/volumes/

**/rag_storage/
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,11 @@ public RouteLocator customRouteLocator(RouteLocatorBuilder builder) {

// 数据归集服务路由
.route("data-collection", r -> r.path("/api/data-collection/**")
.uri("http://datamate-backend-python:18000"))
.uri("http://datamate-backend-python:18000"))

// 知识图谱RAG服务路由
.route("graph-rag", r -> r.path("/api/rag/**")
.uri("http://datamate-backend-python:18000"))

.route("deer-flow-frontend", r -> r.path("/chat/**")
.uri("http://deer-flow-frontend:3000"))
Expand Down
3 changes: 3 additions & 0 deletions deployment/docker/datamate/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ services:
- dataset_volume:/dataset
- flow_volume:/flow
- log_volume:/var/log/datamate
- graph_data_volume:/data/rag_storage
networks: [ datamate ]
depends_on:
- datamate-database
Expand Down Expand Up @@ -335,6 +336,8 @@ volumes:
name: datamate-operator-packages-volume
mineru_log_volume:
name: datamate-mineru_log_volume
graph_data_volume:
name: datamate-graph-data-volume

# Deer Flow
deer-flow-log-volume:
Expand Down
1 change: 1 addition & 0 deletions runtime/datamate-python/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ PORT=18000
DEBUG=true
LOG_LEVEL=DEBUG
LOG_FILE_DIR=./logs
RAG_STORAGE_DIR=./rag_storage

# DataBase
MYSQL_HOST=localhost
Expand Down
1 change: 1 addition & 0 deletions runtime/datamate-python/app/core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class Config:
log_level: str = "INFO"
debug: bool = True
log_file_dir: str = "/var/log/datamate/backend-python"
rag_storage_dir: str = "/data/rag_storage"

# Database
pgsql_host: str = "datamate-database"
Expand Down
4 changes: 3 additions & 1 deletion runtime/datamate-python/app/module/rag/service/graph_rag.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import os
from pathlib import Path
from typing import Awaitable, Callable, Optional
from app.core.config import settings

import numpy as np
from lightrag import LightRAG
Expand All @@ -9,7 +11,7 @@
from lightrag.utils import setup_logger, EmbeddingFunc, get_env_value

setup_logger("lightrag", level="INFO")
DEFAULT_WORKING_DIR = os.path.join(os.getcwd(), "rag_storage")
DEFAULT_WORKING_DIR = Path(settings.rag_storage_dir)


async def build_llm_model_func(model_name: str, base_url: str, api_key: str) -> Callable[..., Awaitable[str]]:
Expand Down
Loading