__init__.py 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. """
  4. Data Modules - 数据链模块包
  5. 用于 webnovel-writer 的数据处理:
  6. - 实体消歧 (entity_linker)
  7. - 状态管理 (state_manager)
  8. - 索引管理 (index_manager)
  9. - RAG 检索 (rag_adapter)
  10. - 风格样本 (style_sampler)
  11. - API 客户端 (api_client) - 只有 Embed + Rerank
  12. """
  13. from .config import DataModulesConfig, get_config, set_project_root
  14. from .api_client import ModalAPIClient, get_client
  15. from .entity_linker import EntityLinker, DisambiguationResult
  16. from .state_manager import StateManager, EntityState, Relationship, StateChange
  17. from .index_manager import IndexManager, ChapterMeta, SceneMeta, ReviewMetrics
  18. from .rag_adapter import RAGAdapter, SearchResult
  19. from .context_manager import ContextManager
  20. from .context_ranker import ContextRanker
  21. from .snapshot_manager import SnapshotManager
  22. from .query_router import QueryRouter
  23. from .style_sampler import StyleSampler, StyleSample, SceneType
  24. __all__ = [
  25. # Config
  26. "DataModulesConfig",
  27. "get_config",
  28. "set_project_root",
  29. # API Client
  30. "ModalAPIClient",
  31. "get_client",
  32. # Entity Linker
  33. "EntityLinker",
  34. "DisambiguationResult",
  35. # State Manager
  36. "StateManager",
  37. "EntityState",
  38. "Relationship",
  39. "StateChange",
  40. # Index Manager
  41. "IndexManager",
  42. "ChapterMeta",
  43. "SceneMeta",
  44. "ReviewMetrics",
  45. # RAG Adapter
  46. "RAGAdapter",
  47. "SearchResult",
  48. "ContextManager",
  49. "ContextRanker",
  50. "SnapshotManager",
  51. "QueryRouter",
  52. # Style Sampler
  53. "StyleSampler",
  54. "StyleSample",
  55. "SceneType",
  56. ]