From 1e3470e67b74d5cf5a908dde5cb06039458b963d Mon Sep 17 00:00:00 2001 From: Rob Bos Date: Sat, 21 Sep 2024 18:52:57 +0200 Subject: [PATCH 1/2] Update lc_openai_getting_started.ipynb --- cookbooks/python/langchain/lc_openai_getting_started.ipynb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cookbooks/python/langchain/lc_openai_getting_started.ipynb b/cookbooks/python/langchain/lc_openai_getting_started.ipynb index 9b88840..0b5f922 100644 --- a/cookbooks/python/langchain/lc_openai_getting_started.ipynb +++ b/cookbooks/python/langchain/lc_openai_getting_started.ipynb @@ -22,7 +22,8 @@ "source": [ "%pip install langchain-openai\n", "%pip install langchain-community\n", - "%pip install faiss-cpu" + "%pip install faiss-cpu"\n", + "%pip install beautifulsoup4" ] }, { @@ -187,6 +188,8 @@ "source": [ "from langchain_community.document_loaders import WebBaseLoader\n", "\n", + "# Set the USER_AGENT environment variable which is required for the WebBaseLoader to load the page\n", + "os.environ['USER_AGENT'] = \"YourUserAgentString\"\n", "loader = WebBaseLoader(\"https://en.wikipedia.org/wiki/Eurovision_Song_Contest_2024\")\n", "\n", "docs = loader.load()\n", From 0ee9217befba9fedb98228c21e23562eb74f3c1a Mon Sep 17 00:00:00 2001 From: Rob Bos Date: Sat, 21 Sep 2024 18:53:57 +0200 Subject: [PATCH 2/2] Fix character type --- cookbooks/python/langchain/lc_openai_getting_started.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbooks/python/langchain/lc_openai_getting_started.ipynb b/cookbooks/python/langchain/lc_openai_getting_started.ipynb index 0b5f922..463d085 100644 --- a/cookbooks/python/langchain/lc_openai_getting_started.ipynb +++ b/cookbooks/python/langchain/lc_openai_getting_started.ipynb @@ -22,7 +22,7 @@ "source": [ "%pip install langchain-openai\n", "%pip install langchain-community\n", - "%pip install faiss-cpu"\n", + "%pip install faiss-cpu\n", "%pip install beautifulsoup4" ] },