mirror of
https://github.com/hwchase17/langchain
synced 2024-11-11 19:11:02 +00:00
c93d9e66e4
Thank you for contributing to LangChain! - [x] **PR title**: "community: update docs and add tool to init.py" - [x] **PR message**: - **Description:** Fixed some errors and comments in the docs and added our ZenGuardTool and additional classes to init.py for easy access when importing - **Question:** when will you update the langchain-community package in pypi to make our tool available? - [x] **Lint and test**: Run `make format`, `make lint` and `make test` from the root of the package(s) you've modified. See contribution guidelines for more: https://python.langchain.com/docs/contributing/ Thank you for review! --------- Co-authored-by: Baur <baur.krykpayev@gmail.com>
155 lines
3.8 KiB
Python
155 lines
3.8 KiB
Python
"""Test the public API of the tools package."""
|
|
|
|
from langchain_community.tools import __all__ as public_api
|
|
|
|
_EXPECTED = [
|
|
"AINAppOps",
|
|
"AINOwnerOps",
|
|
"AINRuleOps",
|
|
"AINTransfer",
|
|
"AINValueOps",
|
|
"AIPluginTool",
|
|
"APIOperation",
|
|
"ArxivQueryRun",
|
|
"AskNewsSearch",
|
|
"AzureAiServicesDocumentIntelligenceTool",
|
|
"AzureAiServicesImageAnalysisTool",
|
|
"AzureAiServicesSpeechToTextTool",
|
|
"AzureAiServicesTextToSpeechTool",
|
|
"AzureAiServicesTextAnalyticsForHealthTool",
|
|
"AzureCogsFormRecognizerTool",
|
|
"AzureCogsImageAnalysisTool",
|
|
"AzureCogsSpeech2TextTool",
|
|
"AzureCogsText2SpeechTool",
|
|
"AzureCogsTextAnalyticsHealthTool",
|
|
"BaseGraphQLTool",
|
|
"BaseRequestsTool",
|
|
"BaseSQLDatabaseTool",
|
|
"BaseSparkSQLTool",
|
|
"BaseTool",
|
|
"BearlyInterpreterTool",
|
|
"BingSearchResults",
|
|
"BingSearchRun",
|
|
"BraveSearch",
|
|
"ClickTool",
|
|
"CogniswitchKnowledgeSourceFile",
|
|
"CogniswitchKnowledgeStatus",
|
|
"CogniswitchKnowledgeSourceURL",
|
|
"CogniswitchKnowledgeRequest",
|
|
"ConneryAction",
|
|
"CopyFileTool",
|
|
"CurrentWebPageTool",
|
|
"DataheraldTextToSQL",
|
|
"DeleteFileTool",
|
|
"DuckDuckGoSearchResults",
|
|
"DuckDuckGoSearchRun",
|
|
"E2BDataAnalysisTool",
|
|
"EdenAiExplicitImageTool",
|
|
"EdenAiObjectDetectionTool",
|
|
"EdenAiParsingIDTool",
|
|
"EdenAiParsingInvoiceTool",
|
|
"EdenAiSpeechToTextTool",
|
|
"EdenAiTextModerationTool",
|
|
"EdenAiTextToSpeechTool",
|
|
"EdenaiTool",
|
|
"ElevenLabsText2SpeechTool",
|
|
"ExtractHyperlinksTool",
|
|
"ExtractTextTool",
|
|
"FileSearchTool",
|
|
"GetElementsTool",
|
|
"GmailCreateDraft",
|
|
"GmailGetMessage",
|
|
"GmailGetThread",
|
|
"GmailSearch",
|
|
"GmailSendMessage",
|
|
"GoogleCloudTextToSpeechTool",
|
|
"GooglePlacesTool",
|
|
"GoogleSearchResults",
|
|
"GoogleSearchRun",
|
|
"GoogleSerperResults",
|
|
"GoogleSerperRun",
|
|
"HumanInputRun",
|
|
"IFTTTWebhook",
|
|
"InfoPowerBITool",
|
|
"InfoSQLDatabaseTool",
|
|
"InfoSparkSQLTool",
|
|
"JiraAction",
|
|
"JsonGetValueTool",
|
|
"JsonListKeysTool",
|
|
"ListDirectoryTool",
|
|
"ListPowerBITool",
|
|
"ListSQLDatabaseTool",
|
|
"ListSparkSQLTool",
|
|
"MerriamWebsterQueryRun",
|
|
"MetaphorSearchResults",
|
|
"MoveFileTool",
|
|
"NasaAction",
|
|
"NavigateBackTool",
|
|
"NavigateTool",
|
|
"O365CreateDraftMessage",
|
|
"O365SearchEmails",
|
|
"O365SearchEvents",
|
|
"O365SendEvent",
|
|
"O365SendMessage",
|
|
"OpenAPISpec",
|
|
"OpenWeatherMapQueryRun",
|
|
"PubmedQueryRun",
|
|
"PolygonAggregates",
|
|
"PolygonFinancials",
|
|
"PolygonLastQuote",
|
|
"PolygonTickerNews",
|
|
"RedditSearchRun",
|
|
"RedditSearchSchema",
|
|
"QueryCheckerTool",
|
|
"QueryPowerBITool",
|
|
"QuerySQLCheckerTool",
|
|
"QuerySQLDataBaseTool",
|
|
"QuerySparkSQLTool",
|
|
"ReadFileTool",
|
|
"RequestsDeleteTool",
|
|
"RequestsGetTool",
|
|
"RequestsPatchTool",
|
|
"RequestsPostTool",
|
|
"RequestsPutTool",
|
|
"SceneXplainTool",
|
|
"SearchAPIResults",
|
|
"SearchAPIRun",
|
|
"SearxSearchResults",
|
|
"SearxSearchRun",
|
|
"ShellTool",
|
|
"SlackGetChannel",
|
|
"SlackGetMessage",
|
|
"SlackScheduleMessage",
|
|
"SlackSendMessage",
|
|
"SleepTool",
|
|
"StdInInquireTool",
|
|
"StackExchangeTool",
|
|
"SteamshipImageGenerationTool",
|
|
"StructuredTool",
|
|
"SteamWebAPIQueryRun",
|
|
"Tool",
|
|
"VectorStoreQATool",
|
|
"VectorStoreQAWithSourcesTool",
|
|
"WikipediaQueryRun",
|
|
"WolframAlphaQueryRun",
|
|
"WriteFileTool",
|
|
"YahooFinanceNewsTool",
|
|
"YouSearchTool",
|
|
"YouTubeSearchTool",
|
|
"ZapierNLAListActions",
|
|
"ZapierNLARunAction",
|
|
"Detector",
|
|
"ZenGuardInput",
|
|
"ZenGuardTool",
|
|
"authenticate",
|
|
"format_tool_to_openai_function",
|
|
"tool",
|
|
"MojeekSearch",
|
|
]
|
|
|
|
|
|
def test_public_api() -> None:
|
|
"""Test for regressions or changes in the public API."""
|
|
# Check that the public API is as expected
|
|
assert set(public_api) == set(_EXPECTED)
|