2023-12-11 21:53:30 +00:00
|
|
|
"""**Tools** are classes that an Agent uses to interact with the world.
|
|
|
|
|
|
|
|
Each tool has a **description**. Agent uses the description to choose the right
|
|
|
|
tool for the job.
|
|
|
|
|
|
|
|
**Class hierarchy:**
|
|
|
|
|
|
|
|
.. code-block::
|
|
|
|
|
|
|
|
ToolMetaclass --> BaseTool --> <name>Tool # Examples: AIPluginTool, BaseGraphQLTool
|
|
|
|
<name> # Examples: BraveSearch, HumanInputRun
|
|
|
|
|
|
|
|
**Main helpers:**
|
|
|
|
|
|
|
|
.. code-block::
|
|
|
|
|
|
|
|
CallbackManagerForToolRun, AsyncCallbackManagerForToolRun
|
|
|
|
"""
|
2024-03-28 03:19:02 +00:00
|
|
|
|
2024-03-12 22:18:54 +00:00
|
|
|
import importlib
|
2024-04-10 17:01:19 +00:00
|
|
|
from typing import TYPE_CHECKING, Any
|
|
|
|
|
|
|
|
if TYPE_CHECKING:
|
|
|
|
from langchain_core.tools import (
|
2024-04-30 17:13:48 +00:00
|
|
|
BaseTool,
|
|
|
|
StructuredTool,
|
|
|
|
Tool,
|
|
|
|
tool,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
from langchain_community.tools.ainetwork.app import (
|
2024-04-30 17:13:48 +00:00
|
|
|
AINAppOps,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.ainetwork.owner import (
|
2024-04-30 17:13:48 +00:00
|
|
|
AINOwnerOps,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.ainetwork.rule import (
|
2024-04-30 17:13:48 +00:00
|
|
|
AINRuleOps,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.ainetwork.transfer import (
|
2024-04-30 17:13:48 +00:00
|
|
|
AINTransfer,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.ainetwork.value import (
|
2024-04-30 17:13:48 +00:00
|
|
|
AINValueOps,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.arxiv.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
ArxivQueryRun,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
2024-05-21 01:23:06 +00:00
|
|
|
from langchain_community.tools.asknews.tool import (
|
|
|
|
AskNewsSearch,
|
|
|
|
)
|
2024-04-10 17:01:19 +00:00
|
|
|
from langchain_community.tools.azure_ai_services import (
|
2024-04-30 17:13:48 +00:00
|
|
|
AzureAiServicesDocumentIntelligenceTool,
|
|
|
|
AzureAiServicesImageAnalysisTool,
|
|
|
|
AzureAiServicesSpeechToTextTool,
|
|
|
|
AzureAiServicesTextAnalyticsForHealthTool,
|
|
|
|
AzureAiServicesTextToSpeechTool,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.azure_cognitive_services import (
|
2024-04-30 17:13:48 +00:00
|
|
|
AzureCogsFormRecognizerTool,
|
|
|
|
AzureCogsImageAnalysisTool,
|
|
|
|
AzureCogsSpeech2TextTool,
|
|
|
|
AzureCogsText2SpeechTool,
|
|
|
|
AzureCogsTextAnalyticsHealthTool,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.bearly.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
BearlyInterpreterTool,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.bing_search.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
BingSearchResults,
|
|
|
|
BingSearchRun,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.brave_search.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
BraveSearch,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
2024-04-29 15:51:43 +00:00
|
|
|
from langchain_community.tools.cassandra_database.tool import (
|
|
|
|
GetSchemaCassandraDatabaseTool, # noqa: F401
|
|
|
|
GetTableDataCassandraDatabaseTool, # noqa: F401
|
|
|
|
QueryCassandraDatabaseTool, # noqa: F401
|
|
|
|
)
|
2024-04-10 17:01:19 +00:00
|
|
|
from langchain_community.tools.cogniswitch.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
CogniswitchKnowledgeRequest,
|
|
|
|
CogniswitchKnowledgeSourceFile,
|
|
|
|
CogniswitchKnowledgeSourceURL,
|
|
|
|
CogniswitchKnowledgeStatus,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.connery import (
|
2024-04-30 17:13:48 +00:00
|
|
|
ConneryAction,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.convert_to_openai import (
|
2024-04-30 17:13:48 +00:00
|
|
|
format_tool_to_openai_function,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
2024-05-22 17:19:00 +00:00
|
|
|
from langchain_community.tools.dataherald import DataheraldTextToSQL
|
2024-04-10 17:01:19 +00:00
|
|
|
from langchain_community.tools.ddg_search.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
DuckDuckGoSearchResults,
|
|
|
|
DuckDuckGoSearchRun,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.e2b_data_analysis.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
E2BDataAnalysisTool,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.edenai import (
|
2024-04-30 17:13:48 +00:00
|
|
|
EdenAiExplicitImageTool,
|
|
|
|
EdenAiObjectDetectionTool,
|
|
|
|
EdenAiParsingIDTool,
|
|
|
|
EdenAiParsingInvoiceTool,
|
|
|
|
EdenAiSpeechToTextTool,
|
|
|
|
EdenAiTextModerationTool,
|
|
|
|
EdenAiTextToSpeechTool,
|
|
|
|
EdenaiTool,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.eleven_labs.text2speech import (
|
2024-04-30 17:13:48 +00:00
|
|
|
ElevenLabsText2SpeechTool,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.file_management import (
|
2024-04-30 17:13:48 +00:00
|
|
|
CopyFileTool,
|
|
|
|
DeleteFileTool,
|
|
|
|
FileSearchTool,
|
|
|
|
ListDirectoryTool,
|
|
|
|
MoveFileTool,
|
|
|
|
ReadFileTool,
|
|
|
|
WriteFileTool,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.gmail import (
|
2024-04-30 17:13:48 +00:00
|
|
|
GmailCreateDraft,
|
|
|
|
GmailGetMessage,
|
|
|
|
GmailGetThread,
|
|
|
|
GmailSearch,
|
|
|
|
GmailSendMessage,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.google_cloud.texttospeech import (
|
2024-04-30 17:13:48 +00:00
|
|
|
GoogleCloudTextToSpeechTool,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.google_places.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
GooglePlacesTool,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.google_search.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
GoogleSearchResults,
|
|
|
|
GoogleSearchRun,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.google_serper.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
GoogleSerperResults,
|
|
|
|
GoogleSerperRun,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.graphql.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
BaseGraphQLTool,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.human.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
HumanInputRun,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.ifttt import (
|
2024-04-30 17:13:48 +00:00
|
|
|
IFTTTWebhook,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.interaction.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
StdInInquireTool,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.jira.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
JiraAction,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.json.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
JsonGetValueTool,
|
|
|
|
JsonListKeysTool,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.merriam_webster.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
MerriamWebsterQueryRun,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.metaphor_search import (
|
2024-04-30 17:13:48 +00:00
|
|
|
MetaphorSearchResults,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
2024-04-29 15:49:53 +00:00
|
|
|
from langchain_community.tools.mojeek_search.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
MojeekSearch,
|
2024-04-29 15:49:53 +00:00
|
|
|
)
|
2024-04-10 17:01:19 +00:00
|
|
|
from langchain_community.tools.nasa.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
NasaAction,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.office365.create_draft_message import (
|
2024-04-30 17:13:48 +00:00
|
|
|
O365CreateDraftMessage,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.office365.events_search import (
|
2024-04-30 17:13:48 +00:00
|
|
|
O365SearchEvents,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.office365.messages_search import (
|
2024-04-30 17:13:48 +00:00
|
|
|
O365SearchEmails,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.office365.send_event import (
|
2024-04-30 17:13:48 +00:00
|
|
|
O365SendEvent,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.office365.send_message import (
|
2024-04-30 17:13:48 +00:00
|
|
|
O365SendMessage,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.office365.utils import (
|
2024-04-30 17:13:48 +00:00
|
|
|
authenticate,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.openapi.utils.api_models import (
|
2024-04-30 17:13:48 +00:00
|
|
|
APIOperation,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.openapi.utils.openapi_utils import (
|
2024-04-30 17:13:48 +00:00
|
|
|
OpenAPISpec,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.openweathermap.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
OpenWeatherMapQueryRun,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.playwright import (
|
2024-04-30 17:13:48 +00:00
|
|
|
ClickTool,
|
|
|
|
CurrentWebPageTool,
|
|
|
|
ExtractHyperlinksTool,
|
|
|
|
ExtractTextTool,
|
|
|
|
GetElementsTool,
|
|
|
|
NavigateBackTool,
|
|
|
|
NavigateTool,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.plugin import (
|
2024-04-30 17:13:48 +00:00
|
|
|
AIPluginTool,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.polygon.aggregates import (
|
2024-04-30 17:13:48 +00:00
|
|
|
PolygonAggregates,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.polygon.financials import (
|
2024-04-30 17:13:48 +00:00
|
|
|
PolygonFinancials,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.polygon.last_quote import (
|
2024-04-30 17:13:48 +00:00
|
|
|
PolygonLastQuote,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.polygon.ticker_news import (
|
2024-04-30 17:13:48 +00:00
|
|
|
PolygonTickerNews,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.powerbi.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
InfoPowerBITool,
|
|
|
|
ListPowerBITool,
|
|
|
|
QueryPowerBITool,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.pubmed.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
PubmedQueryRun,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.reddit_search.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
RedditSearchRun,
|
|
|
|
RedditSearchSchema,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.requests.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
BaseRequestsTool,
|
|
|
|
RequestsDeleteTool,
|
|
|
|
RequestsGetTool,
|
|
|
|
RequestsPatchTool,
|
|
|
|
RequestsPostTool,
|
|
|
|
RequestsPutTool,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.scenexplain.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
SceneXplainTool,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.searchapi.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
SearchAPIResults,
|
|
|
|
SearchAPIRun,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.searx_search.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
SearxSearchResults,
|
|
|
|
SearxSearchRun,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.shell.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
ShellTool,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.slack.get_channel import (
|
2024-04-30 17:13:48 +00:00
|
|
|
SlackGetChannel,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.slack.get_message import (
|
2024-04-30 17:13:48 +00:00
|
|
|
SlackGetMessage,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.slack.schedule_message import (
|
2024-04-30 17:13:48 +00:00
|
|
|
SlackScheduleMessage,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.slack.send_message import (
|
2024-04-30 17:13:48 +00:00
|
|
|
SlackSendMessage,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.sleep.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
SleepTool,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.spark_sql.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
BaseSparkSQLTool,
|
|
|
|
InfoSparkSQLTool,
|
|
|
|
ListSparkSQLTool,
|
|
|
|
QueryCheckerTool,
|
|
|
|
QuerySparkSQLTool,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.sql_database.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
BaseSQLDatabaseTool,
|
|
|
|
InfoSQLDatabaseTool,
|
|
|
|
ListSQLDatabaseTool,
|
|
|
|
QuerySQLCheckerTool,
|
|
|
|
QuerySQLDataBaseTool,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.stackexchange.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
StackExchangeTool,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.steam.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
SteamWebAPIQueryRun,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.steamship_image_generation import (
|
2024-04-30 17:13:48 +00:00
|
|
|
SteamshipImageGenerationTool,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.vectorstore.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
VectorStoreQATool,
|
|
|
|
VectorStoreQAWithSourcesTool,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.wikipedia.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
WikipediaQueryRun,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.wolfram_alpha.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
WolframAlphaQueryRun,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.yahoo_finance_news import (
|
2024-04-30 17:13:48 +00:00
|
|
|
YahooFinanceNewsTool,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.you.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
YouSearchTool,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.youtube.search import (
|
2024-04-30 17:13:48 +00:00
|
|
|
YouTubeSearchTool,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
from langchain_community.tools.zapier.tool import (
|
2024-04-30 17:13:48 +00:00
|
|
|
ZapierNLAListActions,
|
|
|
|
ZapierNLARunAction,
|
2024-04-10 17:01:19 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
__all__ = [
|
|
|
|
"AINAppOps",
|
|
|
|
"AINOwnerOps",
|
|
|
|
"AINRuleOps",
|
|
|
|
"AINTransfer",
|
|
|
|
"AINValueOps",
|
|
|
|
"AIPluginTool",
|
|
|
|
"APIOperation",
|
|
|
|
"ArxivQueryRun",
|
2024-05-21 01:23:06 +00:00
|
|
|
"AskNewsSearch",
|
2024-04-10 17:01:19 +00:00
|
|
|
"AzureAiServicesDocumentIntelligenceTool",
|
|
|
|
"AzureAiServicesImageAnalysisTool",
|
|
|
|
"AzureAiServicesSpeechToTextTool",
|
|
|
|
"AzureAiServicesTextAnalyticsForHealthTool",
|
|
|
|
"AzureAiServicesTextToSpeechTool",
|
|
|
|
"AzureCogsFormRecognizerTool",
|
|
|
|
"AzureCogsImageAnalysisTool",
|
|
|
|
"AzureCogsSpeech2TextTool",
|
|
|
|
"AzureCogsText2SpeechTool",
|
|
|
|
"AzureCogsTextAnalyticsHealthTool",
|
|
|
|
"BaseGraphQLTool",
|
|
|
|
"BaseRequestsTool",
|
|
|
|
"BaseSQLDatabaseTool",
|
|
|
|
"BaseSparkSQLTool",
|
|
|
|
"BaseTool",
|
|
|
|
"BearlyInterpreterTool",
|
|
|
|
"BingSearchResults",
|
|
|
|
"BingSearchRun",
|
|
|
|
"BraveSearch",
|
|
|
|
"ClickTool",
|
|
|
|
"CogniswitchKnowledgeRequest",
|
|
|
|
"CogniswitchKnowledgeSourceFile",
|
|
|
|
"CogniswitchKnowledgeSourceURL",
|
|
|
|
"CogniswitchKnowledgeStatus",
|
|
|
|
"ConneryAction",
|
|
|
|
"CopyFileTool",
|
|
|
|
"CurrentWebPageTool",
|
|
|
|
"DeleteFileTool",
|
2024-05-22 17:19:00 +00:00
|
|
|
"DataheraldTextToSQL",
|
2024-04-10 17:01:19 +00:00
|
|
|
"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",
|
2024-04-29 15:49:53 +00:00
|
|
|
"MojeekSearch",
|
2024-04-10 17:01:19 +00:00
|
|
|
"MoveFileTool",
|
|
|
|
"NasaAction",
|
|
|
|
"NavigateBackTool",
|
|
|
|
"NavigateTool",
|
|
|
|
"O365CreateDraftMessage",
|
|
|
|
"O365SearchEmails",
|
|
|
|
"O365SearchEvents",
|
|
|
|
"O365SendEvent",
|
|
|
|
"O365SendMessage",
|
|
|
|
"OpenAPISpec",
|
|
|
|
"OpenWeatherMapQueryRun",
|
|
|
|
"PolygonAggregates",
|
|
|
|
"PolygonFinancials",
|
|
|
|
"PolygonLastQuote",
|
|
|
|
"PolygonTickerNews",
|
|
|
|
"PubmedQueryRun",
|
|
|
|
"QueryCheckerTool",
|
|
|
|
"QueryPowerBITool",
|
|
|
|
"QuerySQLCheckerTool",
|
|
|
|
"QuerySQLDataBaseTool",
|
|
|
|
"QuerySparkSQLTool",
|
|
|
|
"ReadFileTool",
|
|
|
|
"RedditSearchRun",
|
|
|
|
"RedditSearchSchema",
|
|
|
|
"RequestsDeleteTool",
|
|
|
|
"RequestsGetTool",
|
|
|
|
"RequestsPatchTool",
|
|
|
|
"RequestsPostTool",
|
|
|
|
"RequestsPutTool",
|
|
|
|
"SceneXplainTool",
|
|
|
|
"SearchAPIResults",
|
|
|
|
"SearchAPIRun",
|
|
|
|
"SearxSearchResults",
|
|
|
|
"SearxSearchRun",
|
|
|
|
"ShellTool",
|
|
|
|
"SlackGetChannel",
|
|
|
|
"SlackGetMessage",
|
|
|
|
"SlackScheduleMessage",
|
|
|
|
"SlackSendMessage",
|
|
|
|
"SleepTool",
|
|
|
|
"StackExchangeTool",
|
|
|
|
"StdInInquireTool",
|
|
|
|
"SteamWebAPIQueryRun",
|
|
|
|
"SteamshipImageGenerationTool",
|
|
|
|
"StructuredTool",
|
|
|
|
"Tool",
|
|
|
|
"VectorStoreQATool",
|
|
|
|
"VectorStoreQAWithSourcesTool",
|
|
|
|
"WikipediaQueryRun",
|
|
|
|
"WolframAlphaQueryRun",
|
|
|
|
"WriteFileTool",
|
|
|
|
"YahooFinanceNewsTool",
|
|
|
|
"YouSearchTool",
|
|
|
|
"YouTubeSearchTool",
|
|
|
|
"ZapierNLAListActions",
|
|
|
|
"ZapierNLARunAction",
|
|
|
|
"authenticate",
|
|
|
|
"format_tool_to_openai_function",
|
|
|
|
"tool",
|
|
|
|
]
|
2023-12-11 21:53:30 +00:00
|
|
|
|
|
|
|
# Used for internal purposes
|
|
|
|
_DEPRECATED_TOOLS = {"PythonAstREPLTool", "PythonREPLTool"}
|
|
|
|
|
2024-03-12 22:18:54 +00:00
|
|
|
_module_lookup = {
|
|
|
|
"AINAppOps": "langchain_community.tools.ainetwork.app",
|
|
|
|
"AINOwnerOps": "langchain_community.tools.ainetwork.owner",
|
|
|
|
"AINRuleOps": "langchain_community.tools.ainetwork.rule",
|
|
|
|
"AINTransfer": "langchain_community.tools.ainetwork.transfer",
|
|
|
|
"AINValueOps": "langchain_community.tools.ainetwork.value",
|
|
|
|
"AIPluginTool": "langchain_community.tools.plugin",
|
|
|
|
"APIOperation": "langchain_community.tools.openapi.utils.api_models",
|
|
|
|
"ArxivQueryRun": "langchain_community.tools.arxiv.tool",
|
2024-05-21 01:23:06 +00:00
|
|
|
"AskNewsSearch": "langchain_community.tools.asknews.tool",
|
2024-03-28 03:19:02 +00:00
|
|
|
"AzureAiServicesDocumentIntelligenceTool": "langchain_community.tools.azure_ai_services", # noqa: E501
|
|
|
|
"AzureAiServicesImageAnalysisTool": "langchain_community.tools.azure_ai_services",
|
|
|
|
"AzureAiServicesSpeechToTextTool": "langchain_community.tools.azure_ai_services",
|
|
|
|
"AzureAiServicesTextToSpeechTool": "langchain_community.tools.azure_ai_services",
|
|
|
|
"AzureAiServicesTextAnalyticsForHealthTool": "langchain_community.tools.azure_ai_services", # noqa: E501
|
2024-03-12 22:18:54 +00:00
|
|
|
"AzureCogsFormRecognizerTool": "langchain_community.tools.azure_cognitive_services",
|
|
|
|
"AzureCogsImageAnalysisTool": "langchain_community.tools.azure_cognitive_services",
|
|
|
|
"AzureCogsSpeech2TextTool": "langchain_community.tools.azure_cognitive_services",
|
|
|
|
"AzureCogsText2SpeechTool": "langchain_community.tools.azure_cognitive_services",
|
|
|
|
"AzureCogsTextAnalyticsHealthTool": "langchain_community.tools.azure_cognitive_services", # noqa: E501
|
|
|
|
"BaseGraphQLTool": "langchain_community.tools.graphql.tool",
|
|
|
|
"BaseRequestsTool": "langchain_community.tools.requests.tool",
|
|
|
|
"BaseSQLDatabaseTool": "langchain_community.tools.sql_database.tool",
|
|
|
|
"BaseSparkSQLTool": "langchain_community.tools.spark_sql.tool",
|
|
|
|
"BaseTool": "langchain_core.tools",
|
|
|
|
"BearlyInterpreterTool": "langchain_community.tools.bearly.tool",
|
|
|
|
"BingSearchResults": "langchain_community.tools.bing_search.tool",
|
|
|
|
"BingSearchRun": "langchain_community.tools.bing_search.tool",
|
|
|
|
"BraveSearch": "langchain_community.tools.brave_search.tool",
|
|
|
|
"ClickTool": "langchain_community.tools.playwright",
|
|
|
|
"CogniswitchKnowledgeRequest": "langchain_community.tools.cogniswitch.tool",
|
|
|
|
"CogniswitchKnowledgeSourceFile": "langchain_community.tools.cogniswitch.tool",
|
|
|
|
"CogniswitchKnowledgeSourceURL": "langchain_community.tools.cogniswitch.tool",
|
|
|
|
"CogniswitchKnowledgeStatus": "langchain_community.tools.cogniswitch.tool",
|
|
|
|
"ConneryAction": "langchain_community.tools.connery",
|
|
|
|
"CopyFileTool": "langchain_community.tools.file_management",
|
|
|
|
"CurrentWebPageTool": "langchain_community.tools.playwright",
|
2024-04-13 23:27:16 +00:00
|
|
|
"DataheraldTextToSQL": "langchain_community.tools.dataherald.tool",
|
2024-03-12 22:18:54 +00:00
|
|
|
"DeleteFileTool": "langchain_community.tools.file_management",
|
|
|
|
"DuckDuckGoSearchResults": "langchain_community.tools.ddg_search.tool",
|
|
|
|
"DuckDuckGoSearchRun": "langchain_community.tools.ddg_search.tool",
|
|
|
|
"E2BDataAnalysisTool": "langchain_community.tools.e2b_data_analysis.tool",
|
|
|
|
"EdenAiExplicitImageTool": "langchain_community.tools.edenai",
|
|
|
|
"EdenAiObjectDetectionTool": "langchain_community.tools.edenai",
|
|
|
|
"EdenAiParsingIDTool": "langchain_community.tools.edenai",
|
|
|
|
"EdenAiParsingInvoiceTool": "langchain_community.tools.edenai",
|
|
|
|
"EdenAiSpeechToTextTool": "langchain_community.tools.edenai",
|
|
|
|
"EdenAiTextModerationTool": "langchain_community.tools.edenai",
|
|
|
|
"EdenAiTextToSpeechTool": "langchain_community.tools.edenai",
|
|
|
|
"EdenaiTool": "langchain_community.tools.edenai",
|
|
|
|
"ElevenLabsText2SpeechTool": "langchain_community.tools.eleven_labs.text2speech",
|
|
|
|
"ExtractHyperlinksTool": "langchain_community.tools.playwright",
|
|
|
|
"ExtractTextTool": "langchain_community.tools.playwright",
|
|
|
|
"FileSearchTool": "langchain_community.tools.file_management",
|
|
|
|
"GetElementsTool": "langchain_community.tools.playwright",
|
|
|
|
"GmailCreateDraft": "langchain_community.tools.gmail",
|
|
|
|
"GmailGetMessage": "langchain_community.tools.gmail",
|
|
|
|
"GmailGetThread": "langchain_community.tools.gmail",
|
|
|
|
"GmailSearch": "langchain_community.tools.gmail",
|
|
|
|
"GmailSendMessage": "langchain_community.tools.gmail",
|
|
|
|
"GoogleCloudTextToSpeechTool": "langchain_community.tools.google_cloud.texttospeech", # noqa: E501
|
|
|
|
"GooglePlacesTool": "langchain_community.tools.google_places.tool",
|
|
|
|
"GoogleSearchResults": "langchain_community.tools.google_search.tool",
|
|
|
|
"GoogleSearchRun": "langchain_community.tools.google_search.tool",
|
|
|
|
"GoogleSerperResults": "langchain_community.tools.google_serper.tool",
|
|
|
|
"GoogleSerperRun": "langchain_community.tools.google_serper.tool",
|
|
|
|
"HumanInputRun": "langchain_community.tools.human.tool",
|
|
|
|
"IFTTTWebhook": "langchain_community.tools.ifttt",
|
|
|
|
"InfoPowerBITool": "langchain_community.tools.powerbi.tool",
|
|
|
|
"InfoSQLDatabaseTool": "langchain_community.tools.sql_database.tool",
|
|
|
|
"InfoSparkSQLTool": "langchain_community.tools.spark_sql.tool",
|
|
|
|
"JiraAction": "langchain_community.tools.jira.tool",
|
|
|
|
"JsonGetValueTool": "langchain_community.tools.json.tool",
|
|
|
|
"JsonListKeysTool": "langchain_community.tools.json.tool",
|
|
|
|
"ListDirectoryTool": "langchain_community.tools.file_management",
|
|
|
|
"ListPowerBITool": "langchain_community.tools.powerbi.tool",
|
|
|
|
"ListSQLDatabaseTool": "langchain_community.tools.sql_database.tool",
|
|
|
|
"ListSparkSQLTool": "langchain_community.tools.spark_sql.tool",
|
|
|
|
"MerriamWebsterQueryRun": "langchain_community.tools.merriam_webster.tool",
|
|
|
|
"MetaphorSearchResults": "langchain_community.tools.metaphor_search",
|
2024-04-29 15:49:53 +00:00
|
|
|
"MojeekSearch": "langchain_community.tools.mojeek_search.tool",
|
2024-03-12 22:18:54 +00:00
|
|
|
"MoveFileTool": "langchain_community.tools.file_management",
|
|
|
|
"NasaAction": "langchain_community.tools.nasa.tool",
|
|
|
|
"NavigateBackTool": "langchain_community.tools.playwright",
|
|
|
|
"NavigateTool": "langchain_community.tools.playwright",
|
|
|
|
"O365CreateDraftMessage": "langchain_community.tools.office365.create_draft_message", # noqa: E501
|
|
|
|
"O365SearchEmails": "langchain_community.tools.office365.messages_search",
|
|
|
|
"O365SearchEvents": "langchain_community.tools.office365.events_search",
|
|
|
|
"O365SendEvent": "langchain_community.tools.office365.send_event",
|
|
|
|
"O365SendMessage": "langchain_community.tools.office365.send_message",
|
|
|
|
"OpenAPISpec": "langchain_community.tools.openapi.utils.openapi_utils",
|
|
|
|
"OpenWeatherMapQueryRun": "langchain_community.tools.openweathermap.tool",
|
|
|
|
"PolygonAggregates": "langchain_community.tools.polygon.aggregates",
|
|
|
|
"PolygonFinancials": "langchain_community.tools.polygon.financials",
|
|
|
|
"PolygonLastQuote": "langchain_community.tools.polygon.last_quote",
|
|
|
|
"PolygonTickerNews": "langchain_community.tools.polygon.ticker_news",
|
|
|
|
"PubmedQueryRun": "langchain_community.tools.pubmed.tool",
|
|
|
|
"QueryCheckerTool": "langchain_community.tools.spark_sql.tool",
|
|
|
|
"QueryPowerBITool": "langchain_community.tools.powerbi.tool",
|
|
|
|
"QuerySQLCheckerTool": "langchain_community.tools.sql_database.tool",
|
|
|
|
"QuerySQLDataBaseTool": "langchain_community.tools.sql_database.tool",
|
|
|
|
"QuerySparkSQLTool": "langchain_community.tools.spark_sql.tool",
|
|
|
|
"ReadFileTool": "langchain_community.tools.file_management",
|
|
|
|
"RedditSearchRun": "langchain_community.tools.reddit_search.tool",
|
|
|
|
"RedditSearchSchema": "langchain_community.tools.reddit_search.tool",
|
|
|
|
"RequestsDeleteTool": "langchain_community.tools.requests.tool",
|
|
|
|
"RequestsGetTool": "langchain_community.tools.requests.tool",
|
|
|
|
"RequestsPatchTool": "langchain_community.tools.requests.tool",
|
|
|
|
"RequestsPostTool": "langchain_community.tools.requests.tool",
|
|
|
|
"RequestsPutTool": "langchain_community.tools.requests.tool",
|
|
|
|
"SceneXplainTool": "langchain_community.tools.scenexplain.tool",
|
|
|
|
"SearchAPIResults": "langchain_community.tools.searchapi.tool",
|
|
|
|
"SearchAPIRun": "langchain_community.tools.searchapi.tool",
|
|
|
|
"SearxSearchResults": "langchain_community.tools.searx_search.tool",
|
|
|
|
"SearxSearchRun": "langchain_community.tools.searx_search.tool",
|
|
|
|
"ShellTool": "langchain_community.tools.shell.tool",
|
|
|
|
"SlackGetChannel": "langchain_community.tools.slack.get_channel",
|
|
|
|
"SlackGetMessage": "langchain_community.tools.slack.get_message",
|
|
|
|
"SlackScheduleMessage": "langchain_community.tools.slack.schedule_message",
|
|
|
|
"SlackSendMessage": "langchain_community.tools.slack.send_message",
|
|
|
|
"SleepTool": "langchain_community.tools.sleep.tool",
|
|
|
|
"StackExchangeTool": "langchain_community.tools.stackexchange.tool",
|
|
|
|
"StdInInquireTool": "langchain_community.tools.interaction.tool",
|
|
|
|
"SteamWebAPIQueryRun": "langchain_community.tools.steam.tool",
|
|
|
|
"SteamshipImageGenerationTool": "langchain_community.tools.steamship_image_generation", # noqa: E501
|
|
|
|
"StructuredTool": "langchain_core.tools",
|
|
|
|
"Tool": "langchain_core.tools",
|
|
|
|
"VectorStoreQATool": "langchain_community.tools.vectorstore.tool",
|
|
|
|
"VectorStoreQAWithSourcesTool": "langchain_community.tools.vectorstore.tool",
|
|
|
|
"WikipediaQueryRun": "langchain_community.tools.wikipedia.tool",
|
|
|
|
"WolframAlphaQueryRun": "langchain_community.tools.wolfram_alpha.tool",
|
|
|
|
"WriteFileTool": "langchain_community.tools.file_management",
|
|
|
|
"YahooFinanceNewsTool": "langchain_community.tools.yahoo_finance_news",
|
|
|
|
"YouSearchTool": "langchain_community.tools.you.tool",
|
|
|
|
"YouTubeSearchTool": "langchain_community.tools.youtube.search",
|
|
|
|
"ZapierNLAListActions": "langchain_community.tools.zapier.tool",
|
|
|
|
"ZapierNLARunAction": "langchain_community.tools.zapier.tool",
|
|
|
|
"authenticate": "langchain_community.tools.office365.utils",
|
|
|
|
"format_tool_to_openai_function": "langchain_community.tools.convert_to_openai",
|
|
|
|
"tool": "langchain_core.tools",
|
|
|
|
}
|
2023-12-11 21:53:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
def __getattr__(name: str) -> Any:
|
2024-03-12 22:18:54 +00:00
|
|
|
if name in _module_lookup:
|
|
|
|
module = importlib.import_module(_module_lookup[name])
|
|
|
|
return getattr(module, name)
|
|
|
|
raise AttributeError(f"module {__name__} has no attribute {name}")
|