2026-04-25 13:24:50 +08:00
|
|
|
|
"""
|
|
|
|
|
|
公共工具模块
|
|
|
|
|
|
提供可复用的基础组件
|
|
|
|
|
|
|
|
|
|
|
|
导出:
|
2026-04-25 20:46:30 +08:00
|
|
|
|
- formatter.py: 格式化输出工具
|
|
|
|
|
|
- intent.py: 意图理解工具
|
|
|
|
|
|
- human_review.py: 人工审核工具
|
|
|
|
|
|
- state_base.py: 状态基类工具
|
2026-04-25 13:24:50 +08:00
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
|
|
from .formatter import (
|
|
|
|
|
|
MarkdownFormatter,
|
|
|
|
|
|
TemplateManager,
|
|
|
|
|
|
OutputRenderer,
|
|
|
|
|
|
PresetTemplates
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
from .intent import (
|
2026-04-27 15:23:50 +08:00
|
|
|
|
# React 模式 API
|
2026-04-26 11:14:04 +08:00
|
|
|
|
ReasoningAction,
|
|
|
|
|
|
RetrievalConfig,
|
|
|
|
|
|
ReasoningResult,
|
2026-04-27 15:23:50 +08:00
|
|
|
|
ReactIntentReasoner,
|
2026-04-26 11:14:04 +08:00
|
|
|
|
react_reason,
|
2026-04-27 15:23:50 +08:00
|
|
|
|
react_reason_async,
|
2026-04-26 11:14:04 +08:00
|
|
|
|
get_route_by_reasoning
|
2026-04-25 13:24:50 +08:00
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
from .human_review import (
|
|
|
|
|
|
ReviewStatus,
|
|
|
|
|
|
HumanReview,
|
|
|
|
|
|
HumanReviewStore,
|
|
|
|
|
|
InMemoryReviewStore,
|
|
|
|
|
|
HumanReviewNode,
|
|
|
|
|
|
ReviewManager
|
|
|
|
|
|
)
|
|
|
|
|
|
|
2026-04-25 20:02:20 +08:00
|
|
|
|
from .state_base import (
|
|
|
|
|
|
BaseState,
|
|
|
|
|
|
Phase,
|
|
|
|
|
|
TokenUsage,
|
|
|
|
|
|
StateUtils
|
|
|
|
|
|
)
|
|
|
|
|
|
|
2026-04-25 13:24:50 +08:00
|
|
|
|
__all__ = [
|
|
|
|
|
|
# formatter
|
|
|
|
|
|
"MarkdownFormatter",
|
|
|
|
|
|
"TemplateManager",
|
|
|
|
|
|
"OutputRenderer",
|
|
|
|
|
|
"PresetTemplates",
|
2026-04-27 15:23:50 +08:00
|
|
|
|
# intent - React 模式
|
2026-04-26 11:14:04 +08:00
|
|
|
|
"ReasoningAction",
|
|
|
|
|
|
"RetrievalConfig",
|
|
|
|
|
|
"ReasoningResult",
|
2026-04-27 15:23:50 +08:00
|
|
|
|
"ReactIntentReasoner",
|
2026-04-26 11:14:04 +08:00
|
|
|
|
"react_reason",
|
2026-04-27 15:23:50 +08:00
|
|
|
|
"react_reason_async",
|
2026-04-26 11:14:04 +08:00
|
|
|
|
"get_route_by_reasoning",
|
2026-04-25 13:24:50 +08:00
|
|
|
|
# human_review
|
|
|
|
|
|
"ReviewStatus",
|
|
|
|
|
|
"HumanReview",
|
|
|
|
|
|
"HumanReviewStore",
|
|
|
|
|
|
"InMemoryReviewStore",
|
|
|
|
|
|
"HumanReviewNode",
|
2026-04-25 20:02:20 +08:00
|
|
|
|
"ReviewManager",
|
|
|
|
|
|
# state_base
|
|
|
|
|
|
"BaseState",
|
|
|
|
|
|
"Phase",
|
|
|
|
|
|
"TokenUsage",
|
|
|
|
|
|
"StateUtils"
|
2026-04-25 13:24:50 +08:00
|
|
|
|
]
|