mirror of
https://github.com/hwchase17/langchain
synced 2024-10-29 17:07:25 +00:00
9b9b231e10
Haven't gotten to all of them, but this: - Updates some of the tools notebooks to actually instantiate a tool (many just show a 'utility' rather than a tool. More changes to come in separate PR) - Move the `Tool` and decorator definitions to `langchain/tools/base.py` (but still export from `langchain.agents`) - Add scene explain to the load_tools() function - Add unit tests for public apis for the langchain.tools and langchain.agents modules
52 lines
1.2 KiB
Python
52 lines
1.2 KiB
Python
"""Test the public API of the tools package."""
|
|
from langchain.tools import __all__ as public_api
|
|
|
|
_EXPECTED = [
|
|
"AIPluginTool",
|
|
"APIOperation",
|
|
"BaseTool",
|
|
"BaseTool",
|
|
"BaseTool",
|
|
"BingSearchResults",
|
|
"BingSearchRun",
|
|
"ClickTool",
|
|
"CopyFileTool",
|
|
"CurrentWebPageTool",
|
|
"DeleteFileTool",
|
|
"DuckDuckGoSearchResults",
|
|
"DuckDuckGoSearchRun",
|
|
"ExtractHyperlinksTool",
|
|
"ExtractTextTool",
|
|
"FileSearchTool",
|
|
"GetElementsTool",
|
|
"GooglePlacesTool",
|
|
"GoogleSearchResults",
|
|
"GoogleSearchRun",
|
|
"HumanInputRun",
|
|
"IFTTTWebhook",
|
|
"ListDirectoryTool",
|
|
"MoveFileTool",
|
|
"NavigateBackTool",
|
|
"NavigateTool",
|
|
"OpenAPISpec",
|
|
"ReadFileTool",
|
|
"SceneXplainTool",
|
|
"ShellTool",
|
|
"StructuredTool",
|
|
"Tool",
|
|
"VectorStoreQATool",
|
|
"VectorStoreQAWithSourcesTool",
|
|
"WikipediaQueryRun",
|
|
"WolframAlphaQueryRun",
|
|
"WriteFileTool",
|
|
"ZapierNLAListActions",
|
|
"ZapierNLARunAction",
|
|
"tool",
|
|
]
|
|
|
|
|
|
def test_public_api() -> None:
|
|
"""Test for regressions or changes in the public API."""
|
|
# Check that the public API is as expected
|
|
assert public_api == sorted(_EXPECTED)
|