docs: update langchain docs#2683
Conversation
| @@ -38,7 +39,7 @@ Find your [Apify API token](https://console.apify.com/settings/integrations) and | |||
|
|
|||
| ```python | |||
| os.environ["OPENAI_API_KEY"] = "Your OpenAI API key" | |||
| os.environ["APIFY_API_TOKEN"] = "Your Apify API token" | |||
| os.environ["APIFY_TOKEN"] = "Your Apify API token" | |||
| ``` | |||
There was a problem hiding this comment.
Is this a verified change? The langchain readme (https://github.com/apify/langchain-apify) still uses APIFY_API_TOKEN.
|
|
||
| ## Tool reference | ||
|
|
||
| Every dedicated tool below is importable from `langchain_apify`. For full parameter tables, see the [LangChain Apify provider page](https://docs.langchain.com/oss/python/integrations/providers/apify). |
There was a problem hiding this comment.
The list of parameters is currently not on the langchain docs page. Will it be published sometime later?
| @@ -2,6 +2,7 @@ | |||
| title: 🦜🔗 LangChain integration | |||
| sidebar_label: LangChain | |||
| description: Learn how to integrate Apify with LangChain to feed vector databases and large language models with web data crawled from the web using Actors. | |||
| sidebar_position: 5 | |||
| slug: /integrations/langchain | |||
| --- | |||
|
|
|||
There was a problem hiding this comment.
General question: is it worth it to include a link to the langchain-apify repo anywhere?
|
|
||
| To let a model decide when to call the tools, bind a tool list to an agent. The example below uses LangGraph's prebuilt ReAct agent, so install it alongside the previous dependencies: | ||
|
|
||
| `pip install langgraph` |
There was a problem hiding this comment.
Make this a code block as well
There was a problem hiding this comment.
| This allows you to either crawl and scrape top pages from Google Search results or directly scrape text content from a URL and return it as markdown. |
|
|
||
| A model selects tools based on their names and descriptions. The more tools you register, the larger the decision space, which can lead to wrong tool selection, slower responses, and higher token usage. Register only the tools your agent needs. | ||
|
|
||
| Each list holds tool **classes**, so instantiate them before passing them to an agent. There are three ways to compose your tool list: |
There was a problem hiding this comment.
Bold for UI elements only
| Each list holds tool **classes**, so instantiate them before passing them to an agent. There are three ways to compose your tool list: | |
| Each list holds tool *classes*, so instantiate them before passing them to an agent. There are three ways to compose your tool list: |
|
|
||
| Web search, crawling, and platform-specific search. | ||
|
|
||
| - `ApifyGoogleSearchTool` - structured Google search results. Wraps [apify/google-search-scraper](https://apify.com/apify/google-search-scraper). |
There was a problem hiding this comment.
| - `ApifyGoogleSearchTool` - structured Google search results. Wraps [apify/google-search-scraper](https://apify.com/apify/google-search-scraper). | |
| - `ApifyGoogleSearchTool` - structured Google Search results. Wraps [apify/google-search-scraper](https://apify.com/apify/google-search-scraper). |
| tool = ApifyActorsTool("apify/rag-web-browser") | ||
| result = tool.invoke({"run_input": {"query": "latest AI news", "maxResults": 3}}) | ||
| ``` | ||
|
|
||
| <ThirdPartyDisclaimer /> |
There was a problem hiding this comment.
This was now moved way down on the page. Move is somewhere to the beginning of the page.
Expands the LangChain integration page with the dedicated Actor tools shipped in
langchain-apify(the threeAPIFY_*_TOOLSsets, direct tool invocation, agent binding, RAG retrieval, and a full tool reference). Also bumps the examples toAPIFY_TOKENandgpt-5-mini.Warning
Do not merge yet. These tools depend on the new
langchain-apifyrelease — hold until that package is published, then verify the imports and tool names against the shipped version.