mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-14 20:54:30 +08:00
Add dataset navigation search for agentic RAG (#18218)
### Summary Add dataset navigation search for agentic RAG. dataset_navigation_search() calls dataset_api_service.search_dataset_layers with mode as "nav_doc"
This commit is contained in:
@@ -32,7 +32,6 @@ from unittest.mock import MagicMock
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
pytestmark = pytest.mark.p2
|
||||
|
||||
|
||||
@@ -97,6 +96,7 @@ def _load_list_datasets_module(monkeypatch, *, kbs, parsing_status_by_kb):
|
||||
FileSource=SimpleNamespace(KNOWLEDGEBASE="knowledgebase"),
|
||||
PipelineTaskType=SimpleNamespace(),
|
||||
StatusEnum=SimpleNamespace(),
|
||||
RetCode=SimpleNamespace(),
|
||||
ModelTypeBinary=_StubModelTypeBinary,
|
||||
)
|
||||
_stub(
|
||||
@@ -175,6 +175,8 @@ def _load_list_datasets_module(monkeypatch, *, kbs, parsing_status_by_kb):
|
||||
thread_pool_exec=MagicMock(),
|
||||
thread_pool_exec_long_time=MagicMock(),
|
||||
)
|
||||
_stub(monkeypatch, "rag.advanced_rag", __path__=[])
|
||||
_stub(monkeypatch, "rag.advanced_rag.knowlege_compile", __path__=[])
|
||||
_stub(
|
||||
monkeypatch,
|
||||
"rag.advanced_rag.knowlege_compile.wiki",
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
import importlib.util
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from enum import IntEnum
|
||||
from pathlib import Path
|
||||
from types import ModuleType, SimpleNamespace
|
||||
from unittest.mock import MagicMock
|
||||
|
||||
@@ -155,8 +155,16 @@ def _load_delete_datasets_module(monkeypatch, *, f2d_rows, file_filter_delete):
|
||||
),
|
||||
StatusEnum=SimpleNamespace(),
|
||||
LLMType=SimpleNamespace(),
|
||||
RetCode=SimpleNamespace(),
|
||||
ModelTypeBinary=_StubModelTypeBinary,
|
||||
)
|
||||
_stub(monkeypatch, "rag.advanced_rag", __path__=[])
|
||||
_stub(monkeypatch, "rag.advanced_rag.knowlege_compile", __path__=[])
|
||||
_stub(
|
||||
monkeypatch,
|
||||
"rag.advanced_rag.knowlege_compile.wiki",
|
||||
WIKI_PAGE_COMPILE_KWD="wiki",
|
||||
)
|
||||
_stub(
|
||||
monkeypatch,
|
||||
"rag.nlp.search",
|
||||
|
||||
Reference in New Issue
Block a user