Skip to content

The agent engineering platform.

docs(langchain): complete PDF embedding example for OpenAI, also some minor doc fixes (#32426)

Nelson Sproul25430074367b
diff --git a/docs/docs/how_to/chat_streaming.ipynb b/docs/docs/how_to/chat_streaming.ipynb
index 4f4cea0ca2..98de9af979 100644
--- a/docs/docs/how_to/chat_streaming.ipynb
+++ b/docs/docs/how_to/chat_streaming.ipynb
@@ -24,7 +24,7 @@
"\n",
":::tip\n",
"\n",
- "The **default** implementation does **not** provide support for token-by-token streaming, but it ensures that the the model can be swapped in for any other model as it supports the same standard interface.\n",
+ "The **default** implementation does **not** provide support for token-by-token streaming, but it ensures that the model can be swapped in for any other model as it supports the same standard interface.\n",
"\n",
":::\n",
"\n",
diff --git a/docs/docs/how_to/extraction_long_text.ipynb b/docs/docs/how_to/extraction_long_text.ipynb
index c7ee5678bc..5c084cb486 100644
--- a/docs/docs/how_to/extraction_long_text.ipynb
+++ b/docs/docs/how_to/extraction_long_text.ipynb
@@ -323,7 +323,7 @@
"source": [
"## RAG based approach\n",
"\n",
- "Another simple idea is to chunk up the text, but instead of extracting information from every chunk, just focus on the the most relevant chunks.\n",
+ "Another simple idea is to chunk up the text, but instead of extracting information from every chunk, just focus on the most relevant chunks.\n",
"\n",
":::caution\n",
"It can be difficult to identify which chunks are relevant.\n",
diff --git a/docs/docs/how_to/filter_messages.ipynb b/docs/docs/how_to/filter_messages.ipynb
index 91834b13a4..6bdddffa80 100644
--- a/docs/docs/how_to/filter_messages.ipynb
+++ b/docs/docs/how_to/filter_messages.ipynb
@@ -104,7 +104,7 @@
"source": [
"## Chaining\n",
"\n",
- "`filter_messages` can be used in an imperatively (like above) or declaratively, making it easy to compose with other components in a chain:"
+ "`filter_messages` can be used imperatively (like above) or declaratively, making it easy to compose with other components in a chain:"
]
},
{
diff --git a/docs/docs/how_to/indexing.ipynb b/docs/docs/how_to/indexing.ipynb
index 891af935f6..2db68cf2ee 100644
--- a/docs/docs/how_to/indexing.ipynb
+++ b/docs/docs/how_to/indexing.ipynb
@@ -199,7 +199,7 @@
"outputs": [],
"source": [
"def _clear():\n",
- " \"\"\"Hacky helper method to clear content. See the `full` mode section to to understand why it works.\"\"\"\n",
+ " \"\"\"Hacky helper method to clear content. See the `full` mode section to understand why it works.\"\"\"\n",
" index([], record_manager, vectorstore, cleanup=\"full\", source_id_key=\"source\")"
]
},
diff --git a/docs/docs/how_to/merge_message_runs.ipynb b/docs/docs/how_to/merge_message_runs.ipynb
index 10a4c363d5..69acaf218b 100644
--- a/docs/docs/how_to/merge_message_runs.ipynb
+++ b/docs/docs/how_to/merge_message_runs.ipynb
@@ -88,7 +88,7 @@
"source": [
"## Chaining\n",
"\n",
- "`merge_message_runs` can be used in an imperatively (like above) or declaratively, making it easy to compose with other components in a chain:"
+ "`merge_message_runs` can be used imperatively (like above) or declaratively, making it easy to compose with other components in a chain:"
]
},
{
diff --git a/docs/docs/integrations/document_loaders/amazon_textract.ipynb b/docs/docs/integrations/document_loaders/amazon_textract.ipynb
index 318a22e29a..b1ab33ba38 100644
--- a/docs/docs/integrations/document_loaders/amazon_textract.ipynb
+++ b/docs/docs/integrations/document_loaders/amazon_textract.ipynb
@@ -310,7 +310,7 @@
"from langchain_openai import OpenAI\n",
"\n",
"chain = load_qa_chain(llm=OpenAI(), chain_type=\"map_reduce\")\n",
- "query = [\"Who are the autors?\"]\n",
+ "query = [\"Who are the authors?\"]\n",
"\n",
"chain.run(input_documents=documents, question=query)"
]
diff --git a/docs/docs/integrations/document_loaders/open_city_data.ipynb b/docs/docs/integrations/document_loaders/open_city_data.ipynb
index d54227da8e..8f5f5779e2 100644
--- a/docs/docs/integrations/document_loaders/open_city_data.ipynb
+++ b/docs/docs/integrations/document_loaders/open_city_data.ipynb
@@ -15,7 +15,7 @@
"source": [
"[Socrata](https://dev.socrata.com/foundry/data.sfgov.org/vw6y-z8j6) provides an API for city open data. \n",
"\n",
- "For a dataset such as [SF crime](https://data.sfgov.org/Public-Safety/Police-Department-Incident-Reports-Historical-2003/tmnf-yvry), to to the `API` tab on top right. \n",
+ "For a dataset such as [SF crime](https://data.sfgov.org/Public-Safety/Police-Department-Incident-Reports-Historical-2003/tmnf-yvry), see the `API` tab on top right. \n",
"\n",
"That provides you with the `dataset identifier`.\n",
"\n",
diff --git a/docs/docs/integrations/document_loaders/powerscale.ipynb b/docs/docs/integrations/document_loaders/powerscale.ipynb
index 9573cc9e10..6b6a408ab4 100644
--- a/docs/docs/integrations/document_loaders/powerscale.ipynb
+++ b/docs/docs/integrations/document_loaders/powerscale.ipynb
@@ -117,7 +117,7 @@
"metadata": {},
"source": [
"The fields:\n",
- " - `es_host_url` is the endpoint to to MetadataIQ Elasticsearch database\n",
+ " - `es_host_url` is the endpoint to MetadataIQ Elasticsearch database\n",
" - `es_index_index` is the name of the index where PowerScale writes it file system metadata\n",
" - `es_api_key` is the **encoded** version of your elasticsearch API key\n",
" - `folder_path` is the path on PowerScale to be queried for changes"
diff --git a/docs/docs/integrations/document_loaders/reddit.ipynb b/docs/docs/integrations/document_loaders/reddit.ipynb
index d664ca6522..3798a89a6d 100644
--- a/docs/docs/integrations/document_loaders/reddit.ipynb
+++ b/docs/docs/integrations/document_loaders/reddit.ipynb
@@ -11,7 +11,7 @@
"\n",
"This loader fetches the text from the Posts of Subreddits or Reddit users, using the `praw` Python package.\n",
"\n",
- "Make a [Reddit Application](https://www.reddit.com/prefs/apps/) and initialize the loader with with your Reddit API credentials."
+ "Make a [Reddit Application](https://www.reddit.com/prefs/apps/) and initialize the loader with your Reddit API credentials."
]
},
{
diff --git a/docs/docs/integrations/document_loaders/vsdx.ipynb b/docs/docs/integrations/document_loaders/vsdx.ipynb
index 1a16296187..eba6bd18f5 100644
--- a/docs/docs/integrations/document_loaders/vsdx.ipynb
+++ b/docs/docs/integrations/document_loaders/vsdx.ipynb
@@ -151,10 +151,10 @@
"Red arrow magic !\n",
"Something white\n",
"Something Red\n",
- "This a a completly useless diagramm, cool !!\n",
+ "This a completely useless diagram, cool !!\n",
"\n",
"But this is for example !\n",
- "This diagramm is a base of many pages in this file. But it is editable in file \\\"BG WITH CONTENT\\\"\n",
+ "This diagram is a base of many pages in this file. But it is editable in file \\\"BG WITH CONTENT\\\"\n",
"This is a page with something...\n",
"\n",
"WAW I have learned something !\n",
@@ -183,10 +183,10 @@
"This is a title\n",
"Something white\n",
"Something Red\n",
- "This a a completly useless diagramm, cool !!\n",
+ "This a completely useless diagram, cool !!\n",
"\n",
"But this is for example !\n",
- "This diagramm is a base of many pages in this file. But it is editable in file \\\"BG WITH CONTENT\\\"\n",
+ "This diagram is a base of many pages in this file. But it is editable in file \\\"BG WITH CONTENT\\\"\n",
"Another RED arrow wow\n",
"Arrow with point but red\n",
"Green line\n",
@@ -219,10 +219,10 @@
"Red arrow magic !\n",
"Something white\n",
"Something Red\n",
- "This a a completly useless diagramm, cool !!\n",
+ "This a completely useless diagram, cool !!\n",
"\n",
"But this is for example !\n",
- "This diagramm is a base of many pages in this file. But it is editable in file \\\"BG WITH CONTENT\\\"\n",
+ "This diagram is a base of many pages in this file. But it is editable in file \\\"BG WITH CONTENT\\\"\n",
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor\n",
"\\u00a0\\u00a0\\u00a0\\u00a0\\u00a0\\u00a0\\u00a0\\u00a0\\u00a0\\u00a0\\u00a0\\u00a0\\u00a0\\u00a0\\u00a0\\u00a0\\u00a0\\u00a0\\u00a0\\u00a0-\\u00a0incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in\n",
"\n",
@@ -252,10 +252,10 @@
"This is a title\n",
"Something white\n",
"Something Red\n",
- "This a a completly useless diagramm, cool !!\n",
+ "This a completely useless diagram, cool !!\n",
"\n",
"But this is for example !\n",
- "This diagramm is a base of many pages in this file. But it is editable in file \\\"BG WITH CONTENT\\\"\n",
+ "This diagram is a base of many pages in this file. But it is editable in file \\\"BG WITH CONTENT\\\"\n",
"\n",
"------ Page 7 ------\n",
"Title page : Useful ↔ Useless page\n",
@@ -276,10 +276,10 @@
"This is a title\n",
"Something white\n",
"Something Red\n",
- "This a a completly useless diagramm, cool !!\n",
+ "This a completely useless diagram, cool !!\n",
"\n",
"But this is for example !\n",
- "This diagramm is a base of many pages in this file. But it is editable in file \\\"BG WITH CONTENT\\\"\n",
+ "This diagram is a base of many pages in this file. But it is editable in file \\\"BG WITH CONTENT\\\"\n",
"Title of this document : BLABLABLA\n",
"\n",
"------ Page 8 ------\n",
@@ -359,10 +359,10 @@
"Red arrow magic !\n",
"Something white\n",
"Something Red\n",
- "This a a completly useless diagramm, cool !!\n",
+ "This a completely useless diagram, cool !!\n",
"\n",
"But this is for example !\n",
- "This diagramm is a base of many pages in this file. But it is editable in file \\\"BG WITH CONTENT\\\"\n",
+ "This diagram is a base of many pages in this file. But it is editable in file \\\"BG WITH CONTENT\\\"\n",
"Useful\\u2194 Useless page\\u00a0\n",
"\n",
"Tests of some exotics characters :\\u00a0\\u00e3\\u00e4\\u00e5\\u0101\\u0103 \\u00fc\\u2554\\u00a0\\u00a0\\u00bc \\u00c7 \\u25d8\\u25cb\\u2642\\u266b\\u2640\\u00ee\\u2665\n",
@@ -444,10 +444,10 @@
"Red arrow magic !\n",
"Something white\n",
"Something Red\n",
- "This a a completly useless diagramm, cool !!\n",
+ "This a completely useless diagram, cool !!\n",
"\n",
"But this is for example !\n",
- "This diagramm is a base of many pages in this file. But it is editable in file \\\"BG WITH CONTENT\\\"\n",
+ "This diagram is a base of many pages in this file. But it is editable in file \\\"BG WITH CONTENT\\\"\n",
"Only connectors on this page. This is the CoNNeCtor page\n"
]
}
diff --git a/docs/docs/integrations/vectorstores/google_firestore.ipynb b/docs/docs/integrations/vectorstores/google_firestore.ipynb
index 8d16936f94..2df9a92862 100644
--- a/docs/docs/integrations/vectorstores/google_firestore.ipynb
+++ b/docs/docs/integrations/vectorstores/google_firestore.ipynb
@@ -19,7 +19,7 @@
"\n",
"> [Firestore](https://cloud.google.com/firestore) is a serverless document-oriented database that scales to meet any demand. Extend your database application to build AI-powered experiences leveraging Firestore's Langchain integrations.\n",
"\n",
- "This notebook goes over how to use [Firestore](https://cloud.google.com/firestore) to to store vectors and query them using the `FirestoreVectorStore` class.\n",
+ "This notebook goes over how to use [Firestore](https://cloud.google.com/firestore) to store vectors and query them using the `FirestoreVectorStore` class.\n",
"\n",
"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/googleapis/langchain-google-firestore-python/blob/main/docs/vectorstores.ipynb)"
]
diff --git a/docs/docs/integrations/vectorstores/pgvector.ipynb b/docs/docs/integrations/vectorstores/pgvector.ipynb
index 249421e8dd..bf6397f529 100644
--- a/docs/docs/integrations/vectorstores/pgvector.ipynb
+++ b/docs/docs/integrations/vectorstores/pgvector.ipynb
@@ -43,7 +43,7 @@
"id": "0dd87fcc",
"metadata": {},
"source": [
- "You can run the following command to spin up a a postgres container with the `pgvector` extension:"
+ "You can run the following command to spin up a postgres container with the `pgvector` extension:"
]
},
{
diff --git a/docs/docs/troubleshooting/errors/INVALID_TOOL_RESULTS.ipynb b/docs/docs/troubleshooting/errors/INVALID_TOOL_RESULTS.ipynb
index f3e62badc4..05363f0848 100644
--- a/docs/docs/troubleshooting/errors/INVALID_TOOL_RESULTS.ipynb
+++ b/docs/docs/troubleshooting/errors/INVALID_TOOL_RESULTS.ipynb
@@ -193,7 +193,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
- "You should additionally not pass `ToolMessages` back to to a model if they are not preceded by an `AIMessage` with tool calls. For example, this will fail:"
+ "You should additionally not pass `ToolMessages` back to a model if they are not preceded by an `AIMessage` with tool calls. For example, this will fail:"
]
},
{