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
6 changes: 3 additions & 3 deletions aperag/db/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ def _query(session):
WITH relevant_chunks AS (
SELECT id as chunk_id
FROM lightrag_doc_chunks
WHERE full_doc_id = ANY(:doc_ids)
WHERE workspace = :workspace AND full_doc_id = ANY(:doc_ids)
)
SELECT id, content, file_path, EXTRACT(EPOCH FROM create_time)::BIGINT as created_at,
1 - (content_vector <=> '[:embedding]'::vector) as distance
Expand Down Expand Up @@ -772,7 +772,7 @@ def _query(session):
WITH relevant_chunks AS (
SELECT id as chunk_id
FROM lightrag_doc_chunks
WHERE full_doc_id = ANY(:doc_ids)
WHERE workspace = :workspace AND full_doc_id = ANY(:doc_ids)
)
SELECT entity_name, EXTRACT(EPOCH FROM create_time)::BIGINT as created_at,
1 - (content_vector <=> '[:embedding]'::vector) as distance
Expand Down Expand Up @@ -830,7 +830,7 @@ def _query(session):
WITH relevant_chunks AS (
SELECT id as chunk_id
FROM lightrag_doc_chunks
WHERE full_doc_id = ANY(:doc_ids)
WHERE workspace = :workspace AND full_doc_id = ANY(:doc_ids)
)
SELECT source_id as src_id, target_id as tgt_id,
EXTRACT(EPOCH FROM create_time)::BIGINT as created_at,
Expand Down
3 changes: 0 additions & 3 deletions aperag/graph/lightrag/lightrag.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,6 @@ class LightRAG:
# Extensions
# ---

max_parallel_insert: int = field(default=2)
"""Maximum number of parallel insert operations."""

addon_params: dict[str, Any] = field(
default_factory=lambda: {"language": get_env_value("SUMMARY_LANGUAGE", "English", str)}
)
Expand Down
2 changes: 0 additions & 2 deletions aperag/graph/lightrag_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ class LightRAGConfig:

CHUNK_TOKEN_SIZE = 3000
CHUNK_OVERLAP_TOKEN_SIZE = 100
MAX_PARALLEL_INSERT = 2
LLM_MODEL_MAX_ASYNC = 20
COSINE_BETTER_THAN_THRESHOLD = 0.2
MAX_BATCH_SIZE = 32
Expand Down Expand Up @@ -85,7 +84,6 @@ async def create_lightrag_instance(collection: Collection) -> LightRAG:
),
cosine_better_than_threshold=LightRAGConfig.COSINE_BETTER_THAN_THRESHOLD,
max_batch_size=LightRAGConfig.MAX_BATCH_SIZE,
max_parallel_insert=LightRAGConfig.MAX_PARALLEL_INSERT,
llm_model_max_async=LightRAGConfig.LLM_MODEL_MAX_ASYNC,
entity_extract_max_gleaning=LightRAGConfig.ENTITY_EXTRACT_MAX_GLEANING,
addon_params={"language": LightRAGConfig.DEFAULT_LANGUAGE},
Expand Down
Loading
Loading