langchain/tests/unit_tests/tools/test_public_api.py

71 lines
1.7 KiB
Python
Raw Normal View History

"""Test the public API of the tools package."""
from langchain.tools import __all__ as public_api
_EXPECTED = [
"AIPluginTool",
"APIOperation",
"AzureCogsFormRecognizerTool",
"AzureCogsImageAnalysisTool",
"AzureCogsSpeech2TextTool",
"AzureCogsText2SpeechTool",
"BaseTool",
"BaseTool",
"BaseTool",
"BingSearchResults",
"BingSearchRun",
"ClickTool",
"CopyFileTool",
"CurrentWebPageTool",
"DeleteFileTool",
"DuckDuckGoSearchResults",
"DuckDuckGoSearchRun",
"ExtractHyperlinksTool",
"ExtractTextTool",
"FileSearchTool",
"GetElementsTool",
"GmailCreateDraft",
"GmailGetMessage",
"GmailGetThread",
"GmailSearch",
"GmailSendMessage",
"GooglePlacesTool",
"GoogleSearchResults",
"GoogleSearchRun",
"GoogleSerperResults",
"GoogleSerperRun",
"HumanInputRun",
"IFTTTWebhook",
"InfoPowerBITool",
"ListDirectoryTool",
"ListPowerBITool",
"MetaphorSearchResults",
"MoveFileTool",
"NavigateBackTool",
"NavigateTool",
"OpenAPISpec",
"OpenWeatherMapQueryRun",
"QueryPowerBITool",
"ReadFileTool",
"SceneXplainTool",
"ShellTool",
"SteamshipImageGenerationTool",
"StructuredTool",
"Tool",
"VectorStoreQATool",
"VectorStoreQAWithSourcesTool",
"WikipediaQueryRun",
"WolframAlphaQueryRun",
"WriteFileTool",
"ZapierNLAListActions",
"ZapierNLARunAction",
"tool",
2023-05-08 15:29:30 +00:00
"YouTubeSearchTool",
"BraveSearch",
]
def test_public_api() -> None:
"""Test for regressions or changes in the public API."""
# Check that the public API is as expected
2023-05-08 15:29:30 +00:00
assert sorted(public_api) == sorted(_EXPECTED)