community[patch]: deprecating remaining google_community integrations (#20471)

Deprecating remaining google community integrations
This commit is contained in:
Leonid Kuligin
2024-04-15 15:57:12 +02:00
committed by GitHub
parent b66a4f48fa
commit 676c68d318
8 changed files with 57 additions and 3 deletions

View File

@@ -2,12 +2,18 @@
from typing import Optional
from langchain_core._api.deprecation import deprecated
from langchain_core.callbacks import CallbackManagerForToolRun
from langchain_core.tools import BaseTool
from langchain_community.utilities.google_search import GoogleSearchAPIWrapper
@deprecated(
since="0.0.33",
removal="0.2.0",
alternative_import="langchain_google_community.GoogleSearchRun",
)
class GoogleSearchRun(BaseTool):
"""Tool that queries the Google search API."""
@@ -28,6 +34,11 @@ class GoogleSearchRun(BaseTool):
return self.api_wrapper.run(query)
@deprecated(
since="0.0.33",
removal="0.2.0",
alternative_import="langchain_google_community.GoogleSearchResults",
)
class GoogleSearchResults(BaseTool):
"""Tool that queries the Google Search API and gets back json."""