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ddddddddddddddddddēddēddǓi ddǓddʓdd̓ddΓddГddddddԓdd֓ddؓddؓddddГddddddߓddi dddddddddddddddddddddddddddddddddd i ddddГddddddddddd	dd
dddddddddddddddddi dddddddddddd d!d"d#d$d%d&d'd(d)d*d+dd,d-d.d-d/dd0d1d2d1d3d4dd5d6d7d8d8ddd9d:dd;Zd<ed=efd>ZdS (?  a  **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
    N)TYPE_CHECKINGAny)BaseTool)StructuredTool)Tool)tool)	AINAppOps)AINOwnerOps)
AINRuleOps)AINTransfer)AINValueOps)ArxivQueryRun)AskNewsSearch)'AzureAiServicesDocumentIntelligenceTool AzureAiServicesImageAnalysisToolAzureAiServicesSpeechToTextTool)AzureAiServicesTextAnalyticsForHealthToolAzureAiServicesTextToSpeechTool)AzureCogsFormRecognizerToolAzureCogsImageAnalysisToolAzureCogsSpeech2TextToolAzureCogsText2SpeechTool AzureCogsTextAnalyticsHealthTool)BearlyInterpreterTool)BingSearchResultsBingSearchRun)BraveSearch)GetSchemaCassandraDatabaseTool!GetTableDataCassandraDatabaseToolQueryCassandraDatabaseTool)CogniswitchKnowledgeRequestCogniswitchKnowledgeSourceFileCogniswitchKnowledgeSourceURLCogniswitchKnowledgeStatus)ConneryAction)format_tool_to_openai_function)DataheraldTextToSQL)DuckDuckGoSearchResultsDuckDuckGoSearchRun)E2BDataAnalysisTool)EdenAiExplicitImageToolEdenAiObjectDetectionToolEdenAiParsingIDToolEdenAiParsingInvoiceToolEdenAiSpeechToTextToolEdenAiTextModerationToolEdenAiTextToSpeechTool
EdenaiTool)ElevenLabsText2SpeechTool)CopyFileToolDeleteFileToolFileSearchToolListDirectoryToolMoveFileToolReadFileToolWriteFileTool)BalanceSheets)CashFlowStatements)IncomeStatements)GmailCreateDraftGmailGetMessageGmailGetThreadGmailSearchGmailSendMessage)GoogleBooksQueryRun)GoogleCloudTextToSpeechTool)GooglePlacesTool)GoogleSearchResultsGoogleSearchRun)GoogleSerperResultsGoogleSerperRun)BaseGraphQLTool)HumanInputRun)IFTTTWebhook)StdInInquireTool)
JinaSearch)
JiraAction)JsonGetValueToolJsonListKeysTool)MerriamWebsterQueryRun)MetaphorSearchResults)MojeekSearch)
NasaAction)O365CreateDraftMessage)O365SearchEvents)O365SearchEmails)O365SendEvent)O365SendMessage)authenticate)APIOperation)OpenAPISpec)OpenWeatherMapQueryRun)	ClickToolCurrentWebPageToolExtractHyperlinksToolExtractTextToolGetElementsToolNavigateBackToolNavigateTool)AIPluginTool)PolygonAggregates)PolygonFinancials)PolygonLastQuote)PolygonTickerNews)InfoPowerBIToolListPowerBIToolQueryPowerBITool)PubmedQueryRun)RedditSearchRunRedditSearchSchema)BaseRequestsToolRequestsDeleteToolRequestsGetToolRequestsPatchToolRequestsPostToolRequestsPutTool)SceneXplainTool)SearchAPIResultsSearchAPIRun)SearxSearchResultsSearxSearchRun)	ShellTool)SlackGetChannel)SlackGetMessage)SlackScheduleMessage)SlackSendMessage)	SleepTool)BaseSparkSQLToolInfoSparkSQLToolListSparkSQLToolQueryCheckerToolQuerySparkSQLTool)BaseSQLDatabaseToolInfoSQLDatabaseToolListSQLDatabaseToolQuerySQLCheckerToolQuerySQLDataBaseTool)StackExchangeTool)SteamWebAPIQueryRun)SteamshipImageGenerationTool)TavilyAnswerTavilySearchResults)VectorStoreQAToolVectorStoreQAWithSourcesTool)WikipediaQueryRun)WolframAlphaQueryRun)YahooFinanceNewsTool)YouSearchTool)YouTubeSearchTool)ZapierNLAListActionsZapierNLARunAction)DetectorZenGuardInputZenGuardTool)r   r   r   r   r	   r
   r   r   r   rf   r\   r   r   r   r   r   r   r   r   r   r   r   r   r;   rJ   rq   r   r   r   r   r   r   r<   r_   r!   r"   r#   r$   r%   r4   r`   r5   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   ra   rb   r6   rc   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rK   rL   r=   rk   r   r   rO   rN   rP   rQ   r7   rl   r   r   rR   rS   rT   r8   rU   rd   re   rV   rX   rW   rY   rZ   r]   r^   rg   rh   ri   rj   rn   r   rm   r   r   r   r9   ro   rp   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   r   r   r   r   rM   r   r   r   r   r   r   r   r   r:   r   r   r   r   r   r   r   r   r[   r&   PythonAstREPLToolPythonREPLToolr	   z'langchain_community.tools.ainetwork.appr
   z)langchain_community.tools.ainetwork.ownerr   z(langchain_community.tools.ainetwork.ruler   z,langchain_community.tools.ainetwork.transferr   z)langchain_community.tools.ainetwork.valuerf   z langchain_community.tools.pluginr\   z2langchain_community.tools.openapi.utils.api_modelsr   z$langchain_community.tools.arxiv.toolr   z&langchain_community.tools.asknews.toolr   z+langchain_community.tools.azure_ai_servicesr   r   r   r   r   z2langchain_community.tools.azure_cognitive_servicesr   r   r   r   r;   z;langchain_community.tools.financial_datasets.balance_sheetsrJ   z&langchain_community.tools.graphql.toolrq   z'langchain_community.tools.requests.toolr   z+langchain_community.tools.sql_database.toolr   z(langchain_community.tools.spark_sql.toolr   zlangchain_core.toolsr   z%langchain_community.tools.bearly.toolr   z*langchain_community.tools.bing_search.toolr   r   z+langchain_community.tools.brave_search.toolr<   zAlangchain_community.tools.financial_datasets.cash_flow_statementsr_   z$langchain_community.tools.playwrightr!   z*langchain_community.tools.cogniswitch.toolr"   r#   r$   r%   z!langchain_community.tools.conneryr4   z)langchain_community.tools.file_managementr`   r'   z)langchain_community.tools.dataherald.toolr5   r   z'langchain_community.tools.zenguard.toolr(   z)langchain_community.tools.ddg_search.toolr)   r*   z0langchain_community.tools.e2b_data_analysis.toolr+   z langchain_community.tools.edenair,   r-   r.   r/   r0   r1   r2   r3   z1langchain_community.tools.eleven_labs.text2speechra   rb   r6   rc   r>   zlangchain_community.tools.gmailr?   r@   rA   rB   rC   z&langchain_community.tools.google_booksrD   z3langchain_community.tools.google_cloud.texttospeechrE   z,langchain_community.tools.google_places.toolrF   z,langchain_community.tools.google_search.toolrG   rH   z,langchain_community.tools.google_serper.toolrI   rK   z$langchain_community.tools.human.toolrL   zlangchain_community.tools.iftttr=   z>langchain_community.tools.financial_datasets.income_statementsrk   z&langchain_community.tools.powerbi.toolr   r   rO   z#langchain_community.tools.jira.toolrN   z*langchain_community.tools.jina_search.toolrP   z#langchain_community.tools.json.toolrQ   r7   rl   r   r   rR   z.langchain_community.tools.merriam_webster.toolrS   z)langchain_community.tools.metaphor_searchrT   z,langchain_community.tools.mojeek_search.toolr8   rU   z#langchain_community.tools.nasa.toolrd   re   rV   z8langchain_community.tools.office365.create_draft_messagerX   z3langchain_community.tools.office365.messages_searchrW   z1langchain_community.tools.office365.events_searchrY   z.langchain_community.tools.office365.send_eventrZ   z0langchain_community.tools.office365.send_messager]   z5langchain_community.tools.openapi.utils.openapi_utilsr^   z-langchain_community.tools.openweathermap.toolrg   z,langchain_community.tools.polygon.aggregatesrh   z,langchain_community.tools.polygon.financialsri   z,langchain_community.tools.polygon.last_quoterj   z-langchain_community.tools.polygon.ticker_newsrn   z%langchain_community.tools.pubmed.toolr   rm   r   r   r   r9   ro   z,langchain_community.tools.reddit_search.toolrp   rr   rs   rt   ru   rv   rw   z*langchain_community.tools.scenexplain.toolrx   z(langchain_community.tools.searchapi.toolry   rz   z+langchain_community.tools.searx_search.toolr{   r|   z$langchain_community.tools.shell.toolr}   z+langchain_community.tools.slack.get_channelr~   z+langchain_community.tools.slack.get_messager   z0langchain_community.tools.slack.schedule_messager   z,langchain_community.tools.slack.send_messager   z$langchain_community.tools.sleep.toolr   z,langchain_community.tools.stackexchange.toolrM   z*langchain_community.tools.interaction.toolr   z$langchain_community.tools.steam.toolr   z4langchain_community.tools.steamship_image_generationr   r   z'langchain_community.tools.tavily_searchr   r   r   z*langchain_community.tools.vectorstore.toolr   z(langchain_community.tools.wikipedia.toolz,langchain_community.tools.wolfram_alpha.toolz,langchain_community.tools.yahoo_finance_newsz"langchain_community.tools.you.toolz(langchain_community.tools.youtube.searchz%langchain_community.tools.zapier.toolz)langchain_community.tools.office365.utilsz+langchain_community.tools.convert_to_openai)r   r   r:   r   r   r   r   r   r   r   r[   r&   r   namereturnc                     | t           v r/t          j        t           |                    }t          ||           S t	          dt
           d|            )Nzmodule z has no attribute )_module_lookup	importlibimport_modulegetattrAttributeError__name__)r   modules     ^/var/www/html/ai-engine/env/lib/python3.11/site-packages/langchain_community/tools/__init__.py__getattr__r     sQ    ~()=>>vt$$$
E8EEtEE
F
FF    )__doc__r   typingr   r   langchain_core.toolsr   r   r   langchain_core.tools.convertr   'langchain_community.tools.ainetwork.appr	   )langchain_community.tools.ainetwork.ownerr
   (langchain_community.tools.ainetwork.ruler   ,langchain_community.tools.ainetwork.transferr   )langchain_community.tools.ainetwork.valuer   $langchain_community.tools.arxiv.toolr   &langchain_community.tools.asknews.toolr   +langchain_community.tools.azure_ai_servicesr   r   r   r   r   2langchain_community.tools.azure_cognitive_servicesr   r   r   r   r   %langchain_community.tools.bearly.toolr   *langchain_community.tools.bing_search.toolr   r   +langchain_community.tools.brave_search.toolr   1langchain_community.tools.cassandra_database.toolr   r   r    *langchain_community.tools.cogniswitch.toolr!   r"   r#   r$   !langchain_community.tools.conneryr%   +langchain_community.tools.convert_to_openair&   $langchain_community.tools.dataheraldr'   )langchain_community.tools.ddg_search.toolr(   r)   0langchain_community.tools.e2b_data_analysis.toolr*    langchain_community.tools.edenair+   r,   r-   r.   r/   r0   r1   r2   1langchain_community.tools.eleven_labs.text2speechr3   )langchain_community.tools.file_managementr4   r5   r6   r7   r8   r9   r:   ;langchain_community.tools.financial_datasets.balance_sheetsr;   Alangchain_community.tools.financial_datasets.cash_flow_statementsr<   >langchain_community.tools.financial_datasets.income_statementsr=   langchain_community.tools.gmailr>   r?   r@   rA   rB   &langchain_community.tools.google_booksrC   3langchain_community.tools.google_cloud.texttospeechrD   ,langchain_community.tools.google_places.toolrE   ,langchain_community.tools.google_search.toolrF   rG   ,langchain_community.tools.google_serper.toolrH   rI   &langchain_community.tools.graphql.toolrJ   $langchain_community.tools.human.toolrK   langchain_community.tools.iftttrL   *langchain_community.tools.interaction.toolrM   *langchain_community.tools.jina_search.toolrN   #langchain_community.tools.jira.toolrO   #langchain_community.tools.json.toolrP   rQ   .langchain_community.tools.merriam_webster.toolrR   )langchain_community.tools.metaphor_searchrS   ,langchain_community.tools.mojeek_search.toolrT   #langchain_community.tools.nasa.toolrU   8langchain_community.tools.office365.create_draft_messagerV   1langchain_community.tools.office365.events_searchrW   3langchain_community.tools.office365.messages_searchrX   .langchain_community.tools.office365.send_eventrY   0langchain_community.tools.office365.send_messagerZ   )langchain_community.tools.office365.utilsr[   2langchain_community.tools.openapi.utils.api_modelsr\   5langchain_community.tools.openapi.utils.openapi_utilsr]   -langchain_community.tools.openweathermap.toolr^   $langchain_community.tools.playwrightr_   r`   ra   rb   rc   rd   re    langchain_community.tools.pluginrf   ,langchain_community.tools.polygon.aggregatesrg   ,langchain_community.tools.polygon.financialsrh   ,langchain_community.tools.polygon.last_quoteri   -langchain_community.tools.polygon.ticker_newsrj   &langchain_community.tools.powerbi.toolrk   rl   rm   %langchain_community.tools.pubmed.toolrn   ,langchain_community.tools.reddit_search.toolro   rp   'langchain_community.tools.requests.toolrq   rr   rs   rt   ru   rv   *langchain_community.tools.scenexplain.toolrw   (langchain_community.tools.searchapi.toolrx   ry   +langchain_community.tools.searx_search.toolrz   r{   $langchain_community.tools.shell.toolr|   +langchain_community.tools.slack.get_channelr}   +langchain_community.tools.slack.get_messager~   0langchain_community.tools.slack.schedule_messager   ,langchain_community.tools.slack.send_messager   $langchain_community.tools.sleep.toolr   (langchain_community.tools.spark_sql.toolr   r   r   r   r   +langchain_community.tools.sql_database.toolr   r   r   r   r   ,langchain_community.tools.stackexchange.toolr   $langchain_community.tools.steam.toolr   4langchain_community.tools.steamship_image_generationr   'langchain_community.tools.tavily_searchr   r   *langchain_community.tools.vectorstore.toolr   r   (langchain_community.tools.wikipedia.toolr   ,langchain_community.tools.wolfram_alpha.toolr   ,langchain_community.tools.yahoo_finance_newsr   "langchain_community.tools.you.toolr   (langchain_community.tools.youtube.searchr   %langchain_community.tools.zapier.toolr   r   'langchain_community.tools.zenguard.toolr   r   r   __all___DEPRECATED_TOOLSr   strr    r   r   <module>r     s"   &     % % % % % % % % C                :99999                                                                                       
                      IHHHHH            	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	                                                                                                    FEEEEE                                                                                                                                
                                                                                                                                                                            V V Vr )*:; V:V>V <V A	V
 >V 6V HV ;V =V ./\V '(UV &'TV &'TV 01^V "#WV  !"V!V"  T#V V$  T%V& '(\'V( R)V* ?+V, A-V. H/V0 B1V2 &3V4 D5V6 E7V8 A9V: @;V< ]=V> 7?V@ "#OAVB %&RCVD $%QEV V VF !"NGVH 8IVJ ?KVL @MVN FOVP AQVR 9SVT JUVV FWVX MYVZ A[V\  !C]V^ =_V`  BaVb @cVd  BeVf @gV V Vh 4iVj  !TkVl CmVn =oVp AqVr =sVt 9uVv 8wVx 7yVz 4{V| 9}V~ CV@ "#XAVB FCVD IEVF EGVH IIV V VJ EKVL ;MVN 5OVP XQVR ?SVT HUVV BWVX 7YVZ >[V\ =]V^ =_V` DaVb ?cVd HeVf BgVh NiVj HkV V Vl BmVn ?oVp 7qVr >sVt :uVv XwVx MyVz K{V| E}V~ IV@ JAVB MCVD GEVF GGVH FIVJ HKVL =MV V VN BOVP @QVR HSVT IUVV CWVX ?YVZ E[V\ H]V^ C_V` @aVb BcVd AeVf @gVh CiVj BkVl >mVn GoV V Vp CqVr 7sVt DuVv DwVx NyVz F{V| 7}V~ GV@ DAVB ACVD #$ZEVF ,GVH =IVJ DKVL "MVN EOVP #$PQV VR DJ@J9CCA>=?&S"kV V VrGc Gc G G G G G Gr   