backstory/src/utils/tools/__init__.py

15 lines
487 B
Python

import importlib
from . basetools import tools, llm_tools, enabled_tools, tool_functions
from .. setup_logging import setup_logging
from .. import defines
logger = setup_logging(level=defines.logging_level)
# Dynamically import all names from basetools listed in tools_all
module = importlib.import_module('.basetools', package=__package__)
for name in tool_functions:
globals()[name] = getattr(module, name)
__all__ = [ 'tools', 'llm_tools', 'enabled_tools', 'tool_functions' ]