__init__.py 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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 (
  18. IndexManager,
  19. ChapterMeta,
  20. SceneMeta,
  21. ReviewMetrics,
  22. RelationshipEventMeta,
  23. )
  24. from .rag_adapter import RAGAdapter, SearchResult
  25. from .context_manager import ContextManager
  26. from .context_ranker import ContextRanker
  27. from .snapshot_manager import SnapshotManager
  28. from .query_router import QueryRouter
  29. from .style_sampler import StyleSampler, StyleSample, SceneType
  30. __all__ = [
  31. # Config
  32. "DataModulesConfig",
  33. "get_config",
  34. "set_project_root",
  35. # API Client
  36. "ModalAPIClient",
  37. "get_client",
  38. # Entity Linker
  39. "EntityLinker",
  40. "DisambiguationResult",
  41. # State Manager
  42. "StateManager",
  43. "EntityState",
  44. "Relationship",
  45. "StateChange",
  46. # Index Manager
  47. "IndexManager",
  48. "ChapterMeta",
  49. "SceneMeta",
  50. "ReviewMetrics",
  51. "RelationshipEventMeta",
  52. # RAG Adapter
  53. "RAGAdapter",
  54. "SearchResult",
  55. "ContextManager",
  56. "ContextRanker",
  57. "SnapshotManager",
  58. "QueryRouter",
  59. # Style Sampler
  60. "StyleSampler",
  61. "StyleSample",
  62. "SceneType",
  63. ]