Some checks failed
构建并部署 AI Agent 服务 / deploy (push) Has been cancelled
主要变更: 1. 创建 subgraph_tools.py - 将三个子图包装为 LangChain 工具 2. 更新 graph_tools.py - 删除旧工具,添加子图工具 3. 更新系统提示词 - 介绍三个子系统 + RAG 能力 4. 简化 backend.py - 删除独立子图 API 端点 5. 修复 service.py 字段名不匹配问题 - content -> token 6. 前端界面优化 - 移动子图测试到侧边栏、删除测试审核按钮 7. 添加 pyjwt 依赖到 requirements.txt 8. 更新 docker-compose.yml - 添加前端代码挂载
73 lines
1.3 KiB
Python
73 lines
1.3 KiB
Python
"""
|
|
公共工具模块
|
|
提供可复用的基础组件
|
|
|
|
导出:
|
|
- formatter.py: 格式化输出工具
|
|
- intent.py: 意图理解工具
|
|
- human_review.py: 人工审核工具
|
|
- state_base.py: 状态基类工具
|
|
"""
|
|
|
|
from .formatter import (
|
|
MarkdownFormatter,
|
|
TemplateManager,
|
|
OutputRenderer,
|
|
PresetTemplates
|
|
)
|
|
|
|
from .intent import (
|
|
# React 模式 API
|
|
ReasoningAction,
|
|
RetrievalConfig,
|
|
ReasoningResult,
|
|
ReactIntentReasoner,
|
|
react_reason,
|
|
react_reason_async,
|
|
get_route_by_reasoning
|
|
)
|
|
|
|
from .human_review import (
|
|
ReviewStatus,
|
|
HumanReview,
|
|
HumanReviewStore,
|
|
InMemoryReviewStore,
|
|
HumanReviewNode,
|
|
ReviewManager
|
|
)
|
|
|
|
from .state_base import (
|
|
BaseState,
|
|
Phase,
|
|
TokenUsage,
|
|
StateUtils
|
|
)
|
|
|
|
__all__ = [
|
|
# formatter
|
|
"MarkdownFormatter",
|
|
"TemplateManager",
|
|
"OutputRenderer",
|
|
"PresetTemplates",
|
|
# intent - React 模式
|
|
"ReasoningAction",
|
|
"RetrievalConfig",
|
|
"ReasoningResult",
|
|
"ReactIntentReasoner",
|
|
"react_reason",
|
|
"react_reason_async",
|
|
"get_route_by_reasoning",
|
|
# human_review
|
|
"ReviewStatus",
|
|
"HumanReview",
|
|
"HumanReviewStore",
|
|
"InMemoryReviewStore",
|
|
"HumanReviewNode",
|
|
"ReviewManager",
|
|
# state_base
|
|
"BaseState",
|
|
"Phase",
|
|
"TokenUsage",
|
|
"StateUtils"
|
|
]
|