__init__.py 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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
  18. from .rag_adapter import RAGAdapter, SearchResult
  19. from .style_sampler import StyleSampler, StyleSample, SceneType
  20. __all__ = [
  21. # Config
  22. "DataModulesConfig",
  23. "get_config",
  24. "set_project_root",
  25. # API Client
  26. "ModalAPIClient",
  27. "get_client",
  28. # Entity Linker
  29. "EntityLinker",
  30. "DisambiguationResult",
  31. # State Manager
  32. "StateManager",
  33. "EntityState",
  34. "Relationship",
  35. "StateChange",
  36. # Index Manager
  37. "IndexManager",
  38. "ChapterMeta",
  39. "SceneMeta",
  40. # RAG Adapter
  41. "RAGAdapter",
  42. "SearchResult",
  43. # Style Sampler
  44. "StyleSampler",
  45. "StyleSample",
  46. "SceneType",
  47. ]