2023-05-02 02:07:26 +00:00
|
|
|
"""Test the public API of the tools package."""
|
|
|
|
from langchain.tools import __all__ as public_api
|
|
|
|
|
|
|
|
_EXPECTED = [
|
|
|
|
"AIPluginTool",
|
|
|
|
"APIOperation",
|
2023-05-23 13:45:48 +00:00
|
|
|
"AzureCogsFormRecognizerTool",
|
|
|
|
"AzureCogsImageAnalysisTool",
|
|
|
|
"AzureCogsSpeech2TextTool",
|
|
|
|
"AzureCogsText2SpeechTool",
|
2023-05-02 02:07:26 +00:00
|
|
|
"BaseTool",
|
|
|
|
"BaseTool",
|
|
|
|
"BaseTool",
|
|
|
|
"BingSearchResults",
|
|
|
|
"BingSearchRun",
|
|
|
|
"ClickTool",
|
|
|
|
"CopyFileTool",
|
|
|
|
"CurrentWebPageTool",
|
|
|
|
"DeleteFileTool",
|
|
|
|
"DuckDuckGoSearchResults",
|
|
|
|
"DuckDuckGoSearchRun",
|
|
|
|
"ExtractHyperlinksTool",
|
|
|
|
"ExtractTextTool",
|
|
|
|
"FileSearchTool",
|
|
|
|
"GetElementsTool",
|
2023-05-08 16:13:05 +00:00
|
|
|
"GmailCreateDraft",
|
|
|
|
"GmailGetMessage",
|
|
|
|
"GmailGetThread",
|
|
|
|
"GmailSearch",
|
|
|
|
"GmailSendMessage",
|
2023-05-02 02:07:26 +00:00
|
|
|
"GooglePlacesTool",
|
|
|
|
"GoogleSearchResults",
|
|
|
|
"GoogleSearchRun",
|
2023-05-04 05:35:48 +00:00
|
|
|
"GoogleSerperResults",
|
|
|
|
"GoogleSerperRun",
|
2023-05-02 02:07:26 +00:00
|
|
|
"HumanInputRun",
|
|
|
|
"IFTTTWebhook",
|
2023-05-22 18:58:28 +00:00
|
|
|
"InfoPowerBITool",
|
2023-05-02 02:07:26 +00:00
|
|
|
"ListDirectoryTool",
|
2023-05-22 18:58:28 +00:00
|
|
|
"ListPowerBITool",
|
2023-05-14 04:45:05 +00:00
|
|
|
"MetaphorSearchResults",
|
2023-05-02 02:07:26 +00:00
|
|
|
"MoveFileTool",
|
|
|
|
"NavigateBackTool",
|
|
|
|
"NavigateTool",
|
|
|
|
"OpenAPISpec",
|
2023-05-15 01:50:45 +00:00
|
|
|
"OpenWeatherMapQueryRun",
|
2023-05-22 18:58:28 +00:00
|
|
|
"QueryPowerBITool",
|
2023-05-02 02:07:26 +00:00
|
|
|
"ReadFileTool",
|
|
|
|
"SceneXplainTool",
|
|
|
|
"ShellTool",
|
2023-05-12 17:35:01 +00:00
|
|
|
"SteamshipImageGenerationTool",
|
2023-05-02 02:07:26 +00:00
|
|
|
"StructuredTool",
|
|
|
|
"Tool",
|
|
|
|
"VectorStoreQATool",
|
|
|
|
"VectorStoreQAWithSourcesTool",
|
|
|
|
"WikipediaQueryRun",
|
|
|
|
"WolframAlphaQueryRun",
|
|
|
|
"WriteFileTool",
|
|
|
|
"ZapierNLAListActions",
|
|
|
|
"ZapierNLARunAction",
|
|
|
|
"tool",
|
2023-05-08 15:29:30 +00:00
|
|
|
"YouTubeSearchTool",
|
2023-06-01 08:11:51 +00:00
|
|
|
"BraveSearch",
|
2023-06-03 23:25:28 +00:00
|
|
|
"PubmedQueryRun",
|
2023-05-02 02:07:26 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
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)
|