__init__.py 703 B

12345678910111213141516171819
  1. """核心框架模块
  2. 说明:本仓库的核心模块包含可选依赖(如 pydantic)。为便于在最小环境下
  3. 复用部分能力(例如仅使用 LLM 客户端),这里对可选依赖做惰性/容错导入。
  4. """
  5. from .exceptions import HelloAgentsException
  6. from .llm import HelloAgentsLLM
  7. try:
  8. from .agent import Agent
  9. from .config import Config
  10. from .message import Message
  11. except Exception: # optional deps may be missing in minimal environments
  12. Agent = None # type: ignore[assignment]
  13. Config = None # type: ignore[assignment]
  14. Message = None # type: ignore[assignment]
  15. __all__ = ["HelloAgentsLLM", "HelloAgentsException", "Agent", "Config", "Message"]