mirror of
https://github.com/hwchase17/langchain
synced 2024-11-06 03:20:49 +00:00
d7f807b71f
# Add AzureCognitiveServicesToolkit to call Azure Cognitive Services API: achieve some multimodal capabilities This PR adds a toolkit named AzureCognitiveServicesToolkit which bundles the following tools: - AzureCogsImageAnalysisTool: calls Azure Cognitive Services image analysis API to extract caption, objects, tags, and text from images. - AzureCogsFormRecognizerTool: calls Azure Cognitive Services form recognizer API to extract text, tables, and key-value pairs from documents. - AzureCogsSpeech2TextTool: calls Azure Cognitive Services speech to text API to transcribe speech to text. - AzureCogsText2SpeechTool: calls Azure Cognitive Services text to speech API to synthesize text to speech. This toolkit can be used to process image, document, and audio inputs. --------- Co-authored-by: Dev 2049 <dev.dev2049@gmail.com>
70 lines
1.6 KiB
Python
70 lines
1.6 KiB
Python
"""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",
|
|
"YouTubeSearchTool",
|
|
]
|
|
|
|
|
|
def test_public_api() -> None:
|
|
"""Test for regressions or changes in the public API."""
|
|
# Check that the public API is as expected
|
|
assert sorted(public_api) == sorted(_EXPECTED)
|