From f466b6aa4adb36a9fe5c1828603e4f2ca3ca294b Mon Sep 17 00:00:00 2001 From: Abhishek Mishra <43916901+abhishek9909@users.noreply.github.com> Date: Tue, 2 Jan 2024 03:08:56 +0530 Subject: [PATCH] Documentation: Update playwright documentation for langchain version >= 0.0.351 (#15260) - A documentation change in the example listed under: https://python.langchain.com/docs/integrations/toolkits/playwright - `create_async_playwright_browser` does not exist under the module: `langchain.tools.playwright.utils` post >= 0.0.351 version - No dependencies to be changed --------- Co-authored-by: Harrison Chase --- .../integrations/toolkits/playwright.ipynb | 25 +++++++++++++++---- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/docs/docs/integrations/toolkits/playwright.ipynb b/docs/docs/integrations/toolkits/playwright.ipynb index 241fe8dca6..f68be061c3 100644 --- a/docs/docs/integrations/toolkits/playwright.ipynb +++ b/docs/docs/integrations/toolkits/playwright.ipynb @@ -37,15 +37,30 @@ }, { "cell_type": "code", - "execution_count": 2, + "execution_count": 7, "metadata": { "tags": [] }, "outputs": [], "source": [ - "from langchain.agents.agent_toolkits import PlayWrightBrowserToolkit\n", - "from langchain.tools.playwright.utils import (\n", - " create_async_playwright_browser, # A synchronous browser is available, though it isn't compatible with jupyter.\n", + "from langchain_community.agent_toolkits import PlayWrightBrowserToolkit" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Async function to create context and launch browser:" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [], + "source": [ + "from langchain_community.tools.playwright.utils import (\n", + " create_async_playwright_browser, # A synchronous browser is available, though it isn't compatible with jupyter.\\n\",\t },\n", ")" ] }, @@ -328,7 +343,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.12" + "version": "3.10.1" } }, "nbformat": 4,