community[patch]: Add unit test to verify that init is correctly defined (#22030)

Fix some __init__ files and add a unit test
This commit is contained in:
Eugene Yurtsev
2024-05-22 13:19:00 -04:00
committed by GitHub
parent ef53ccf54b
commit 58360a1e53
6 changed files with 102 additions and 16 deletions

View File

@@ -90,6 +90,7 @@ if TYPE_CHECKING:
from langchain_community.tools.convert_to_openai import (
format_tool_to_openai_function,
)
from langchain_community.tools.dataherald import DataheraldTextToSQL
from langchain_community.tools.ddg_search.tool import (
DuckDuckGoSearchResults,
DuckDuckGoSearchRun,
@@ -356,6 +357,7 @@ __all__ = [
"CopyFileTool",
"CurrentWebPageTool",
"DeleteFileTool",
"DataheraldTextToSQL",
"DuckDuckGoSearchResults",
"DuckDuckGoSearchRun",
"E2BDataAnalysisTool",
@@ -610,6 +612,3 @@ def __getattr__(name: str) -> Any:
module = importlib.import_module(_module_lookup[name])
return getattr(module, name)
raise AttributeError(f"module {__name__} has no attribute {name}")
__all__ = list(_module_lookup.keys())