Skip to content

Commit 2543007

Browse files
authored
docs(langchain): complete PDF embedding example for OpenAI, also some minor doc fixes (#32426)
For OpenAI PDF attaching, note the needed metadata. Also some minor doc updates.
1 parent ba83f58 commit 2543007

File tree

13 files changed

+26
-26
lines changed

13 files changed

+26
-26
lines changed

docs/docs/how_to/chat_streaming.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"\n",
2525
":::tip\n",
2626
"\n",
27-
"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",
27+
"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",
2828
"\n",
2929
":::\n",
3030
"\n",

docs/docs/how_to/extraction_long_text.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@
323323
"source": [
324324
"## RAG based approach\n",
325325
"\n",
326-
"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",
326+
"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",
327327
"\n",
328328
":::caution\n",
329329
"It can be difficult to identify which chunks are relevant.\n",

docs/docs/how_to/filter_messages.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
"source": [
105105
"## Chaining\n",
106106
"\n",
107-
"`filter_messages` can be used in an imperatively (like above) or declaratively, making it easy to compose with other components in a chain:"
107+
"`filter_messages` can be used imperatively (like above) or declaratively, making it easy to compose with other components in a chain:"
108108
]
109109
},
110110
{

docs/docs/how_to/indexing.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@
199199
"outputs": [],
200200
"source": [
201201
"def _clear():\n",
202-
" \"\"\"Hacky helper method to clear content. See the `full` mode section to to understand why it works.\"\"\"\n",
202+
" \"\"\"Hacky helper method to clear content. See the `full` mode section to understand why it works.\"\"\"\n",
203203
" index([], record_manager, vectorstore, cleanup=\"full\", source_id_key=\"source\")"
204204
]
205205
},

docs/docs/how_to/merge_message_runs.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
"source": [
8989
"## Chaining\n",
9090
"\n",
91-
"`merge_message_runs` can be used in an imperatively (like above) or declaratively, making it easy to compose with other components in a chain:"
91+
"`merge_message_runs` can be used imperatively (like above) or declaratively, making it easy to compose with other components in a chain:"
9292
]
9393
},
9494
{

docs/docs/integrations/document_loaders/amazon_textract.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@
310310
"from langchain_openai import OpenAI\n",
311311
"\n",
312312
"chain = load_qa_chain(llm=OpenAI(), chain_type=\"map_reduce\")\n",
313-
"query = [\"Who are the autors?\"]\n",
313+
"query = [\"Who are the authors?\"]\n",
314314
"\n",
315315
"chain.run(input_documents=documents, question=query)"
316316
]

docs/docs/integrations/document_loaders/open_city_data.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"source": [
1616
"[Socrata](https://dev.socrata.com/foundry/data.sfgov.org/vw6y-z8j6) provides an API for city open data. \n",
1717
"\n",
18-
"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",
18+
"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",
1919
"\n",
2020
"That provides you with the `dataset identifier`.\n",
2121
"\n",

docs/docs/integrations/document_loaders/powerscale.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
"metadata": {},
118118
"source": [
119119
"The fields:\n",
120-
" - `es_host_url` is the endpoint to to MetadataIQ Elasticsearch database\n",
120+
" - `es_host_url` is the endpoint to MetadataIQ Elasticsearch database\n",
121121
" - `es_index_index` is the name of the index where PowerScale writes it file system metadata\n",
122122
" - `es_api_key` is the **encoded** version of your elasticsearch API key\n",
123123
" - `folder_path` is the path on PowerScale to be queried for changes"

docs/docs/integrations/document_loaders/reddit.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"\n",
1212
"This loader fetches the text from the Posts of Subreddits or Reddit users, using the `praw` Python package.\n",
1313
"\n",
14-
"Make a [Reddit Application](https://www.reddit.com/prefs/apps/) and initialize the loader with with your Reddit API credentials."
14+
"Make a [Reddit Application](https://www.reddit.com/prefs/apps/) and initialize the loader with your Reddit API credentials."
1515
]
1616
},
1717
{

docs/docs/integrations/document_loaders/vsdx.ipynb

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,10 @@
151151
"Red arrow magic !\n",
152152
"Something white\n",
153153
"Something Red\n",
154-
"This a a completly useless diagramm, cool !!\n",
154+
"This a completely useless diagram, cool !!\n",
155155
"\n",
156156
"But this is for example !\n",
157-
"This diagramm is a base of many pages in this file. But it is editable in file \\\"BG WITH CONTENT\\\"\n",
157+
"This diagram is a base of many pages in this file. But it is editable in file \\\"BG WITH CONTENT\\\"\n",
158158
"This is a page with something...\n",
159159
"\n",
160160
"WAW I have learned something !\n",
@@ -183,10 +183,10 @@
183183
"This is a title\n",
184184
"Something white\n",
185185
"Something Red\n",
186-
"This a a completly useless diagramm, cool !!\n",
186+
"This a completely useless diagram, cool !!\n",
187187
"\n",
188188
"But this is for example !\n",
189-
"This diagramm is a base of many pages in this file. But it is editable in file \\\"BG WITH CONTENT\\\"\n",
189+
"This diagram is a base of many pages in this file. But it is editable in file \\\"BG WITH CONTENT\\\"\n",
190190
"Another RED arrow wow\n",
191191
"Arrow with point but red\n",
192192
"Green line\n",
@@ -219,10 +219,10 @@
219219
"Red arrow magic !\n",
220220
"Something white\n",
221221
"Something Red\n",
222-
"This a a completly useless diagramm, cool !!\n",
222+
"This a completely useless diagram, cool !!\n",
223223
"\n",
224224
"But this is for example !\n",
225-
"This diagramm is a base of many pages in this file. But it is editable in file \\\"BG WITH CONTENT\\\"\n",
225+
"This diagram is a base of many pages in this file. But it is editable in file \\\"BG WITH CONTENT\\\"\n",
226226
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor\n",
227227
"\\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",
228228
"\n",
@@ -252,10 +252,10 @@
252252
"This is a title\n",
253253
"Something white\n",
254254
"Something Red\n",
255-
"This a a completly useless diagramm, cool !!\n",
255+
"This a completely useless diagram, cool !!\n",
256256
"\n",
257257
"But this is for example !\n",
258-
"This diagramm is a base of many pages in this file. But it is editable in file \\\"BG WITH CONTENT\\\"\n",
258+
"This diagram is a base of many pages in this file. But it is editable in file \\\"BG WITH CONTENT\\\"\n",
259259
"\n",
260260
"------ Page 7 ------\n",
261261
"Title page : Useful ↔ Useless page\n",
@@ -276,10 +276,10 @@
276276
"This is a title\n",
277277
"Something white\n",
278278
"Something Red\n",
279-
"This a a completly useless diagramm, cool !!\n",
279+
"This a completely useless diagram, cool !!\n",
280280
"\n",
281281
"But this is for example !\n",
282-
"This diagramm is a base of many pages in this file. But it is editable in file \\\"BG WITH CONTENT\\\"\n",
282+
"This diagram is a base of many pages in this file. But it is editable in file \\\"BG WITH CONTENT\\\"\n",
283283
"Title of this document : BLABLABLA\n",
284284
"\n",
285285
"------ Page 8 ------\n",
@@ -359,10 +359,10 @@
359359
"Red arrow magic !\n",
360360
"Something white\n",
361361
"Something Red\n",
362-
"This a a completly useless diagramm, cool !!\n",
362+
"This a completely useless diagram, cool !!\n",
363363
"\n",
364364
"But this is for example !\n",
365-
"This diagramm is a base of many pages in this file. But it is editable in file \\\"BG WITH CONTENT\\\"\n",
365+
"This diagram is a base of many pages in this file. But it is editable in file \\\"BG WITH CONTENT\\\"\n",
366366
"Useful\\u2194 Useless page\\u00a0\n",
367367
"\n",
368368
"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 @@
444444
"Red arrow magic !\n",
445445
"Something white\n",
446446
"Something Red\n",
447-
"This a a completly useless diagramm, cool !!\n",
447+
"This a completely useless diagram, cool !!\n",
448448
"\n",
449449
"But this is for example !\n",
450-
"This diagramm is a base of many pages in this file. But it is editable in file \\\"BG WITH CONTENT\\\"\n",
450+
"This diagram is a base of many pages in this file. But it is editable in file \\\"BG WITH CONTENT\\\"\n",
451451
"Only connectors on this page. This is the CoNNeCtor page\n"
452452
]
453453
}

0 commit comments

Comments
 (0)