51 lines
912 B
Python
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"
|
||
|
|
]
|