mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 06:29:24 +08:00
Replaces three bespoke multi-agent pipelines with orchestrators on top
of a shared agentic-engine primitive set (core/agentic/: labeled_step,
loop, tool_dispatch, usage, client). Each capability now lives in one
pipeline.py file with one pipeline.yaml prompt.
- Deep Research: Rephrase (ask_user loop) -> Decompose (OUTLINE) ->
Research blocks (THINK/TOOL/APPEND/FINISH per topic, dynamic queue
preserved) -> Reporting (OUTLINE/INTRO/SECTION/CONCLUSION).
CitationManager and the dynamic topic queue are kept.
- Deep Solve: Pre-retrieve (KB-only, QUERIES/rag/SUMMARY) -> Plan ->
per-step THINK/TOOL/FINISH/REPLAN loop with back-edge to Plan ->
Synthesize. Step FINISH text flows into the next step's context.
- Question: coordinator + pipeline replace generator / idea_agent /
models, with new history.py and mimic_source.py helpers.
Removed: research/agents/, research/research_pipeline.py,
research/prompts/{en,zh}/*.yaml (legacy multi-agent prompts);
solve/agents/, solve/memory/, solve/utils/, main_solver.py,
session_manager.py, tool_runtime.py and old prompts;
question/agents/{generator,idea_agent}.py, example.py, models.py,
old prompts; api/routers/solve.py (capability owns its own routing).
Adds shared agents/_shared/tool_composition.py for cross-pipeline
tool wiring. Updates deep_research/deep_solve/deep_question
capabilities to dispatch through the new pipelines.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
34 lines
1.1 KiB
Python
34 lines
1.1 KiB
Python
"""Question generation package.
|
|
|
|
The main entry point is :class:`~deeptutor.agents.question.pipeline.QuestionPipeline`.
|
|
Lightweight names (``FollowupAgent``, ``QuizTemplate``, ``QuizPair``, etc.)
|
|
are resolved lazily so callers that only need one symbol don't eagerly
|
|
import the full pipeline + its LLM dependencies.
|
|
"""
|
|
|
|
from importlib import import_module
|
|
from typing import Any
|
|
|
|
__all__ = [
|
|
"AgentCoordinator",
|
|
"FollowupAgent",
|
|
"QuestionPipeline",
|
|
"QuizTemplate",
|
|
"QuizPair",
|
|
"QuizPlan",
|
|
"QuizHistoryEntry",
|
|
]
|
|
|
|
|
|
def __getattr__(name: str) -> Any:
|
|
if name == "AgentCoordinator":
|
|
module = import_module("deeptutor.agents.question.coordinator")
|
|
return getattr(module, name)
|
|
if name == "FollowupAgent":
|
|
module = import_module("deeptutor.agents.question.agents.followup_agent")
|
|
return getattr(module, name)
|
|
if name in {"QuestionPipeline", "QuizTemplate", "QuizPair", "QuizPlan", "QuizHistoryEntry"}:
|
|
module = import_module("deeptutor.agents.question.pipeline")
|
|
return getattr(module, name)
|
|
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
|