Files
ailine/backend/app/agent_subgraphs/dictionary/__init__.py
root a14744f18b
Some checks failed
构建并部署 AI Agent 服务 / deploy (push) Failing after 6m5s
feat: 完善词典子图,添加API调用和前端格式化工具
- 完善词典子图:添加生词本功能
- 创建API调用工具:dictionary_api
- 添加前端格式化展示工具:result_formatter.py
- 创建通讯录和资讯子图的基本结构
- 更新主图状态结构,添加MainGraphState
- 添加subgraph_builder.py用于子图集成
2026-04-25 18:29:23 +08:00

51 lines
912 B
Python

"""
词典子图 - 完善版
Dictionary Subgraph Module - Complete
"""
from .state import (
DictionaryState,
DictionaryAction,
WordEntry,
ExtractedTerm
)
from .graph import build_dictionary_subgraph
from .nodes import (
parse_intent,
query_word,
translate_text,
extract_terms,
get_daily_word,
lookup_word_book,
add_to_word_book,
format_result,
should_continue
)
from .api_client import dictionary_api, DictionaryAPIClient
__all__ = [
# State
"DictionaryState",
"DictionaryAction",
"WordEntry",
"ExtractedTerm",
# Graph
"build_dictionary_subgraph",
# Nodes
"parse_intent",
"query_word",
"translate_text",
"extract_terms",
"get_daily_word",
"lookup_word_book",
"add_to_word_book",
"format_result",
"should_continue",
# API
"dictionary_api",
"DictionaryAPIClient"
]