mirror of
https://github.com/hwchase17/langchain
synced 2024-11-18 09:25:54 +00:00
community[patch]: deprecating remaining google_community integrations (#20471)
Deprecating remaining google community integrations
This commit is contained in:
parent
b66a4f48fa
commit
676c68d318
@ -1,4 +1,5 @@
|
|||||||
"""Retriever wrapper for Google Cloud Document AI Warehouse."""
|
"""Retriever wrapper for Google Cloud Document AI Warehouse."""
|
||||||
|
|
||||||
from typing import TYPE_CHECKING, Any, Dict, List, Optional
|
from typing import TYPE_CHECKING, Any, Dict, List, Optional
|
||||||
|
|
||||||
from langchain_core._api.deprecation import deprecated
|
from langchain_core._api.deprecation import deprecated
|
||||||
@ -24,7 +25,7 @@ if TYPE_CHECKING:
|
|||||||
@deprecated(
|
@deprecated(
|
||||||
since="0.0.32",
|
since="0.0.32",
|
||||||
removal="0.2.0",
|
removal="0.2.0",
|
||||||
alternative_import="langchain_google_community.GoogleDriveLoader",
|
alternative_import="langchain_google_community.DocumentAIWarehouseRetriever",
|
||||||
)
|
)
|
||||||
class GoogleDocumentAIWarehouseRetriever(BaseRetriever):
|
class GoogleDocumentAIWarehouseRetriever(BaseRetriever):
|
||||||
"""A retriever based on Document AI Warehouse.
|
"""A retriever based on Document AI Warehouse.
|
||||||
|
@ -4,6 +4,7 @@ from __future__ import annotations
|
|||||||
|
|
||||||
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Sequence, Tuple
|
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Sequence, Tuple
|
||||||
|
|
||||||
|
from langchain_core._api.deprecation import deprecated
|
||||||
from langchain_core.callbacks import CallbackManagerForRetrieverRun
|
from langchain_core.callbacks import CallbackManagerForRetrieverRun
|
||||||
from langchain_core.documents import Document
|
from langchain_core.documents import Document
|
||||||
from langchain_core.pydantic_v1 import BaseModel, Extra, Field, root_validator
|
from langchain_core.pydantic_v1 import BaseModel, Extra, Field, root_validator
|
||||||
@ -195,6 +196,11 @@ class _BaseGoogleVertexAISearchRetriever(BaseModel):
|
|||||||
return documents
|
return documents
|
||||||
|
|
||||||
|
|
||||||
|
@deprecated(
|
||||||
|
since="0.0.33",
|
||||||
|
removal="0.2.0",
|
||||||
|
alternative_import="langchain_google_community.VertexAISearchRetriever",
|
||||||
|
)
|
||||||
class GoogleVertexAISearchRetriever(BaseRetriever, _BaseGoogleVertexAISearchRetriever):
|
class GoogleVertexAISearchRetriever(BaseRetriever, _BaseGoogleVertexAISearchRetriever):
|
||||||
"""`Google Vertex AI Search` retriever.
|
"""`Google Vertex AI Search` retriever.
|
||||||
|
|
||||||
@ -390,6 +396,11 @@ class GoogleVertexAISearchRetriever(BaseRetriever, _BaseGoogleVertexAISearchRetr
|
|||||||
return documents, response
|
return documents, response
|
||||||
|
|
||||||
|
|
||||||
|
@deprecated(
|
||||||
|
since="0.0.33",
|
||||||
|
removal="0.2.0",
|
||||||
|
alternative_import="langchain_google_community.VertexAIMultiTurnSearchRetriever",
|
||||||
|
)
|
||||||
class GoogleVertexAIMultiTurnSearchRetriever(
|
class GoogleVertexAIMultiTurnSearchRetriever(
|
||||||
BaseRetriever, _BaseGoogleVertexAISearchRetriever
|
BaseRetriever, _BaseGoogleVertexAISearchRetriever
|
||||||
):
|
):
|
||||||
|
@ -3,6 +3,7 @@ from __future__ import annotations
|
|||||||
import tempfile
|
import tempfile
|
||||||
from typing import TYPE_CHECKING, Any, Optional
|
from typing import TYPE_CHECKING, Any, Optional
|
||||||
|
|
||||||
|
from langchain_core._api.deprecation import deprecated
|
||||||
from langchain_core.callbacks import CallbackManagerForToolRun
|
from langchain_core.callbacks import CallbackManagerForToolRun
|
||||||
from langchain_core.tools import BaseTool
|
from langchain_core.tools import BaseTool
|
||||||
|
|
||||||
@ -36,6 +37,11 @@ def _encoding_file_extension_map(encoding: texttospeech.AudioEncoding) -> Option
|
|||||||
return ENCODING_FILE_EXTENSION_MAP.get(encoding)
|
return ENCODING_FILE_EXTENSION_MAP.get(encoding)
|
||||||
|
|
||||||
|
|
||||||
|
@deprecated(
|
||||||
|
since="0.0.33",
|
||||||
|
removal="0.2.0",
|
||||||
|
alternative_import="langchain_google_community.TextToSpeechTool",
|
||||||
|
)
|
||||||
class GoogleCloudTextToSpeechTool(BaseTool):
|
class GoogleCloudTextToSpeechTool(BaseTool):
|
||||||
"""Tool that queries the Google Cloud Text to Speech API.
|
"""Tool that queries the Google Cloud Text to Speech API.
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
from typing import Optional, Type
|
from typing import Optional, Type
|
||||||
|
|
||||||
|
from langchain_core._api.deprecation import deprecated
|
||||||
from langchain_core.callbacks import CallbackManagerForToolRun
|
from langchain_core.callbacks import CallbackManagerForToolRun
|
||||||
from langchain_core.pydantic_v1 import BaseModel, Field
|
from langchain_core.pydantic_v1 import BaseModel, Field
|
||||||
from langchain_core.tools import BaseTool
|
from langchain_core.tools import BaseTool
|
||||||
@ -15,6 +16,11 @@ class GooglePlacesSchema(BaseModel):
|
|||||||
query: str = Field(..., description="Query for google maps")
|
query: str = Field(..., description="Query for google maps")
|
||||||
|
|
||||||
|
|
||||||
|
@deprecated(
|
||||||
|
since="0.0.33",
|
||||||
|
removal="0.2.0",
|
||||||
|
alternative_import="langchain_google_community.GooglePlacesTool",
|
||||||
|
)
|
||||||
class GooglePlacesTool(BaseTool):
|
class GooglePlacesTool(BaseTool):
|
||||||
"""Tool that queries the Google places API."""
|
"""Tool that queries the Google places API."""
|
||||||
|
|
||||||
|
@ -2,12 +2,18 @@
|
|||||||
|
|
||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
|
from langchain_core._api.deprecation import deprecated
|
||||||
from langchain_core.callbacks import CallbackManagerForToolRun
|
from langchain_core.callbacks import CallbackManagerForToolRun
|
||||||
from langchain_core.tools import BaseTool
|
from langchain_core.tools import BaseTool
|
||||||
|
|
||||||
from langchain_community.utilities.google_search import GoogleSearchAPIWrapper
|
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):
|
class GoogleSearchRun(BaseTool):
|
||||||
"""Tool that queries the Google search API."""
|
"""Tool that queries the Google search API."""
|
||||||
|
|
||||||
@ -28,6 +34,11 @@ class GoogleSearchRun(BaseTool):
|
|||||||
return self.api_wrapper.run(query)
|
return self.api_wrapper.run(query)
|
||||||
|
|
||||||
|
|
||||||
|
@deprecated(
|
||||||
|
since="0.0.33",
|
||||||
|
removal="0.2.0",
|
||||||
|
alternative_import="langchain_google_community.GoogleSearchResults",
|
||||||
|
)
|
||||||
class GoogleSearchResults(BaseTool):
|
class GoogleSearchResults(BaseTool):
|
||||||
"""Tool that queries the Google Search API and gets back json."""
|
"""Tool that queries the Google Search API and gets back json."""
|
||||||
|
|
||||||
|
@ -1,13 +1,18 @@
|
|||||||
"""Chain that calls Google Places API.
|
"""Chain that calls Google Places API."""
|
||||||
"""
|
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from typing import Any, Dict, Optional
|
from typing import Any, Dict, Optional
|
||||||
|
|
||||||
|
from langchain_core._api.deprecation import deprecated
|
||||||
from langchain_core.pydantic_v1 import BaseModel, Extra, root_validator
|
from langchain_core.pydantic_v1 import BaseModel, Extra, root_validator
|
||||||
from langchain_core.utils import get_from_dict_or_env
|
from langchain_core.utils import get_from_dict_or_env
|
||||||
|
|
||||||
|
|
||||||
|
@deprecated(
|
||||||
|
since="0.0.33",
|
||||||
|
removal="0.2.0",
|
||||||
|
alternative_import="langchain_google_community.GooglePlacesAPIWrapper",
|
||||||
|
)
|
||||||
class GooglePlacesAPIWrapper(BaseModel):
|
class GooglePlacesAPIWrapper(BaseModel):
|
||||||
"""Wrapper around Google Places API.
|
"""Wrapper around Google Places API.
|
||||||
|
|
||||||
|
@ -1,10 +1,17 @@
|
|||||||
"""Util that calls Google Search."""
|
"""Util that calls Google Search."""
|
||||||
|
|
||||||
from typing import Any, Dict, List, Optional
|
from typing import Any, Dict, List, Optional
|
||||||
|
|
||||||
|
from langchain_core._api.deprecation import deprecated
|
||||||
from langchain_core.pydantic_v1 import BaseModel, Extra, root_validator
|
from langchain_core.pydantic_v1 import BaseModel, Extra, root_validator
|
||||||
from langchain_core.utils import get_from_dict_or_env
|
from langchain_core.utils import get_from_dict_or_env
|
||||||
|
|
||||||
|
|
||||||
|
@deprecated(
|
||||||
|
since="0.0.33",
|
||||||
|
removal="0.2.0",
|
||||||
|
alternative_import="langchain_google_community.GoogleSearchAPIWrapper",
|
||||||
|
)
|
||||||
class GoogleSearchAPIWrapper(BaseModel):
|
class GoogleSearchAPIWrapper(BaseModel):
|
||||||
"""Wrapper for Google Search API.
|
"""Wrapper for Google Search API.
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
"""Vector Store in Google Cloud BigQuery."""
|
"""Vector Store in Google Cloud BigQuery."""
|
||||||
|
|
||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import asyncio
|
import asyncio
|
||||||
@ -12,6 +13,7 @@ from threading import Lock, Thread
|
|||||||
from typing import Any, Callable, Dict, List, Optional, Tuple, Type
|
from typing import Any, Callable, Dict, List, Optional, Tuple, Type
|
||||||
|
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
from langchain_core._api.deprecation import deprecated
|
||||||
from langchain_core.documents import Document
|
from langchain_core.documents import Document
|
||||||
from langchain_core.embeddings import Embeddings
|
from langchain_core.embeddings import Embeddings
|
||||||
from langchain_core.vectorstores import VectorStore
|
from langchain_core.vectorstores import VectorStore
|
||||||
@ -34,6 +36,11 @@ _INDEX_CHECK_PERIOD_SECONDS = 60 # Do not check for index more often that this.
|
|||||||
_vector_table_lock = Lock() # process-wide BigQueryVectorSearch table lock
|
_vector_table_lock = Lock() # process-wide BigQueryVectorSearch table lock
|
||||||
|
|
||||||
|
|
||||||
|
@deprecated(
|
||||||
|
since="0.0.33",
|
||||||
|
removal="0.2.0",
|
||||||
|
alternative_import="langchain_google_community.BigQueryVectorSearch",
|
||||||
|
)
|
||||||
class BigQueryVectorSearch(VectorStore):
|
class BigQueryVectorSearch(VectorStore):
|
||||||
"""Google Cloud BigQuery vector store.
|
"""Google Cloud BigQuery vector store.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user