Skip to content

Commit

Permalink
deprecating integrations moved to langchain_google_community
Browse files Browse the repository at this point in the history
  • Loading branch information
lkuligin committed Apr 1, 2024
1 parent 003c98e commit 3a45aeb
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libs/community/langchain_community/chat_loaders/gmail.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from langchain_core.chat_sessions import ChatSession
from langchain_core.messages import HumanMessage
from langchain_core._api.deprecation import deprecated

from langchain_community.chat_loaders.base import BaseChatLoader

Expand Down Expand Up @@ -63,6 +64,11 @@ def _get_message_data(service: Any, message: Any) -> ChatSession:
return ChatSession(messages=[starter_content, message_content])


@deprecated(
since="0.1.15",
removal="0.2.0",
alternative_import="langchain_google_community.GMailLoader",
)
class GMailLoader(BaseChatLoader):
"""Load data from `GMail`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from typing import TYPE_CHECKING, List, Optional

from langchain_core.documents import Document
from langchain_core._api.deprecation import deprecated

from langchain_community.document_loaders.base import BaseLoader
from langchain_community.utilities.vertexai import get_client_info
Expand All @@ -11,6 +12,11 @@
from google.auth.credentials import Credentials


@deprecated(
since="0.1.15",
removal="0.2.0",
alternative_import="langchain_google_community.BigQueryLoader",
)
class BigQueryLoader(BaseLoader):
"""Load from the Google Cloud Platform `BigQuery`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from typing import Callable, List, Optional

from langchain_core.documents import Document
from langchain_core._api.deprecation import deprecated

from langchain_community.document_loaders.base import BaseLoader
from langchain_community.document_loaders.gcs_file import GCSFileLoader
Expand All @@ -10,6 +11,11 @@
logger = logging.getLogger(__name__)

Check failure on line 11 in libs/community/langchain_community/document_loaders/gcs_directory.py

View workflow job for this annotation

GitHub Actions / cd libs/community / make lint #3.8

Ruff (I001)

langchain_community/document_loaders/gcs_directory.py:1:1: I001 Import block is un-sorted or un-formatted

Check failure on line 11 in libs/community/langchain_community/document_loaders/gcs_directory.py

View workflow job for this annotation

GitHub Actions / cd libs/community / make lint #3.11

Ruff (I001)

langchain_community/document_loaders/gcs_directory.py:1:1: I001 Import block is un-sorted or un-formatted


@deprecated(
since="0.1.15",
removal="0.2.0",
alternative_import="langchain_google_community.GCSDirectoryLoader",
)
class GCSDirectoryLoader(BaseLoader):
"""Load from GCS directory."""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,19 @@
from typing import Callable, List, Optional

from langchain_core.documents import Document
from langchain_core._api.deprecation import deprecated


from langchain_community.document_loaders.base import BaseLoader
from langchain_community.document_loaders.unstructured import UnstructuredFileLoader
from langchain_community.utilities.vertexai import get_client_info


@deprecated(

Check failure on line 14 in libs/community/langchain_community/document_loaders/gcs_file.py

View workflow job for this annotation

GitHub Actions / cd libs/community / make lint #3.8

Ruff (I001)

langchain_community/document_loaders/gcs_file.py:1:1: I001 Import block is un-sorted or un-formatted

Check failure on line 14 in libs/community/langchain_community/document_loaders/gcs_file.py

View workflow job for this annotation

GitHub Actions / cd libs/community / make lint #3.11

Ruff (I001)

langchain_community/document_loaders/gcs_file.py:1:1: I001 Import block is un-sorted or un-formatted
since="0.1.15",
removal="0.2.0",
alternative_import="langchain_google_community.GCSFileLoader",
)
class GCSFileLoader(BaseLoader):
"""Load from GCS file."""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,19 @@

from langchain_community.document_loaders.base import BaseLoader
from langchain_community.utilities.vertexai import get_client_info
from langchain_core._api.deprecation import deprecated

if TYPE_CHECKING:

Check failure on line 11 in libs/community/langchain_community/document_loaders/google_speech_to_text.py

View workflow job for this annotation

GitHub Actions / cd libs/community / make lint #3.8

Ruff (I001)

langchain_community/document_loaders/google_speech_to_text.py:1:1: I001 Import block is un-sorted or un-formatted

Check failure on line 11 in libs/community/langchain_community/document_loaders/google_speech_to_text.py

View workflow job for this annotation

GitHub Actions / cd libs/community / make lint #3.11

Ruff (I001)

langchain_community/document_loaders/google_speech_to_text.py:1:1: I001 Import block is un-sorted or un-formatted
from google.cloud.speech_v2 import RecognitionConfig
from google.protobuf.field_mask_pb2 import FieldMask



@deprecated(
since="0.1.15",
removal="0.2.0",
alternative_import="langchain_google_community.SpeechToTextLoader",
)
class GoogleSpeechToTextLoader(BaseLoader):
"""
Loader for Google Cloud Speech-to-Text audio transcripts.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,18 @@

from langchain_core.documents import Document
from langchain_core.pydantic_v1 import BaseModel, root_validator, validator
from langchain_core._api.deprecation import deprecated

from langchain_community.document_loaders.base import BaseLoader

SCOPES = ["https://www.googleapis.com/auth/drive.readonly"]

Check failure on line 20 in libs/community/langchain_community/document_loaders/googledrive.py

View workflow job for this annotation

GitHub Actions / cd libs/community / make lint #3.8

Ruff (I001)

langchain_community/document_loaders/googledrive.py:10:1: I001 Import block is un-sorted or un-formatted

Check failure on line 20 in libs/community/langchain_community/document_loaders/googledrive.py

View workflow job for this annotation

GitHub Actions / cd libs/community / make lint #3.11

Ruff (I001)

langchain_community/document_loaders/googledrive.py:10:1: I001 Import block is un-sorted or un-formatted


@deprecated(
since="0.1.15",
removal="0.2.0",
alternative_import="langchain_google_community.GoogleDriveLoader",
)
class GoogleDriveLoader(BaseLoader, BaseModel):
"""Load Google Docs from `Google Drive`."""

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

from langchain_core.documents import Document
from langchain_core.utils.iter import batch_iterate
from langchain_core._api.deprecation import deprecated

from langchain_community.document_loaders.base import BaseBlobParser
from langchain_community.document_loaders.blob_loaders import Blob
Expand All @@ -33,6 +34,11 @@ class DocAIParsingResults:
parsed_path: str


@deprecated(
since="0.1.15",
removal="0.2.0",
alternative_import="langchain_google_community.DocAIParser",
)
class DocAIParser(BaseBlobParser):
"""`Google Cloud Document AI` parser.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
from typing import Any, Optional, Sequence

from langchain_core.documents import BaseDocumentTransformer, Document
from langchain_core._api.deprecation import deprecated

from langchain_community.utilities.vertexai import get_client_info


@deprecated(

Check failure on line 9 in libs/community/langchain_community/document_transformers/google_translate.py

View workflow job for this annotation

GitHub Actions / cd libs/community / make lint #3.8

Ruff (I001)

langchain_community/document_transformers/google_translate.py:1:1: I001 Import block is un-sorted or un-formatted

Check failure on line 9 in libs/community/langchain_community/document_transformers/google_translate.py

View workflow job for this annotation

GitHub Actions / cd libs/community / make lint #3.11

Ruff (I001)

langchain_community/document_transformers/google_translate.py:1:1: I001 Import block is un-sorted or un-formatted
since="0.1.15",
removal="0.2.0",
alternative_import="langchain_google_community.DocAIParser",
)
class GoogleTranslateTransformer(BaseDocumentTransformer):
"""Translate text documents using Google Cloud Translation."""

Expand Down

0 comments on commit 3a45aeb

Please sign in to comment.