docs: update apify integration (#29553)

**Description:** Fixed and updated Apify integration documentation to
use the new [langchain-apify](https://github.com/apify/langchain-apify)
package.
**Twitter handle:** @apify
This commit is contained in:
Jakub Kopecký
2025-02-13 05:02:55 +01:00
committed by GitHub
parent 16fb1f5371
commit c8cb7c25bf
7 changed files with 399 additions and 34 deletions

View File

@@ -1,11 +1,22 @@
from typing import Any, Callable, Dict, List
from langchain_core._api import deprecated
from langchain_core.documents import Document
from pydantic import BaseModel, model_validator
from langchain_community.document_loaders.base import BaseLoader
@deprecated(
since="0.3.18",
message=(
"This class is deprecated and will be removed in a future version. "
"You can swap to using the `ApifyDatasetLoader`"
" implementation in `langchain_apify` package. "
"See <https://github.com/apify/langchain-apify>"
),
alternative_import="langchain_apify.ApifyDatasetLoader",
)
class ApifyDatasetLoader(BaseLoader, BaseModel):
"""Load datasets from `Apify` web scraping, crawling, and data extraction platform.

View File

@@ -1,5 +1,6 @@
from typing import TYPE_CHECKING, Any, Callable, Dict, Optional
from langchain_core._api import deprecated
from langchain_core.documents import Document
from langchain_core.utils import get_from_dict_or_env
from pydantic import BaseModel, model_validator
@@ -8,6 +9,16 @@ if TYPE_CHECKING:
from langchain_community.document_loaders import ApifyDatasetLoader
@deprecated(
since="0.3.18",
message=(
"This class is deprecated and will be removed in a future version. "
"You can swap to using the `ApifyWrapper`"
" implementation in `langchain_apify` package. "
"See <https://github.com/apify/langchain-apify>"
),
alternative_import="langchain_apify.ApifyWrapper",
)
class ApifyWrapper(BaseModel):
"""Wrapper around Apify.
To use, you should have the ``apify-client`` python package installed,

View File

@@ -386,6 +386,10 @@ packages:
repo: Nimbleway/langchain-nimble
path: .
downloads: 0
- name: langchain-apify
path: .
repo: apify/langchain-apify
downloads: 204
- name: langfair
repo: cvs-health/langfair
path: .