Skip to content

Commit bbc629e

Browse files
authored
Langflow demo: how to work with multiple files (#323)
1 parent 5508eb3 commit bbc629e

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

examplecode/tools/langflow.mdx

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,20 @@ Also:
3232
3. Click **Blank Flow**.
3333
</Step>
3434
<Step title="Add the Unstructured component">
35-
In this step, you add a component that instructs Unstructured Serverless API services to process a local file or a local directory of files that you specify.
35+
In this step, you add a component that instructs Unstructured Serverless API services to process a local file that you specify.
3636

3737
1. On the sidebar, expand **Experimental (Beta)**, and then expand **Loaders**.
3838
2. Drag the **Unstructured** component onto the designer area.
39-
3. In the **Unstructured** component, click the box or icon next to **File**, and then select a file or a directory of files for Unstructured to process. This component works only with the file extensions `.pdf`, `.docx`, and `.txt`.
39+
3. In the **Unstructured** component, click the box or icon next to **File**, and then select a local file for Unstructured to process.
4040

41-
You can select any files that you want. This demonstration uses [the text of the United States Constitution in PDF format](https://constitutioncenter.org/media/files/constitution.pdf),
41+
This component works only with the file extensions `.pdf`, `.docx`, and `.txt`. Although you can use any local file with one of these extensions,
42+
this demonstration uses [the text of the United States Constitution in PDF format](https://constitutioncenter.org/media/files/constitution.pdf),
4243
saved to your local development machine.
4344

45+
<Tip>
46+
To work with multiple local files, or to work with remote files, see the suggested options in [Next steps](#next-steps).
47+
</Tip>
48+
4449
4. For **Unstructured.io Serverless API Key**, enter your Unstructured API key value.
4550

4651
![Unstructured component](/img/langflow/unstructured-component.png)
@@ -92,7 +97,7 @@ Also:
9297

9398
<Note>
9499
Each time you click the play icon in the **Astra DB Ingest** component, Unstructured reprocesses the specified local
95-
file or a local directory. If neither the specified file names or directories nor the specified collection name change, this could result in multiple duplicate records
100+
file. If this file does not change, this could result in multiple duplicate records
96101
being inserted into the specified Astra DB collection. You should only click the play icon in the **Astra DB Ingest** component when you want to insert new processed data into
97102
the specified Astra DB collection.
98103
</Note>
@@ -202,24 +207,24 @@ Also:
202207
## Next steps
203208

204209
Now that you have your pipeline set up, here are just a few ways that you could modify it to support different requirements,
205-
such as processing non-local files or using a different vector store.
210+
such as processing multiple files or using a different vector store.
206211

207-
### Process non-local files
212+
### Process multiple files
208213

209-
In this demonstration, you pass to Unstructured a file or a directory of files that are stored locally. To pass
214+
In this demonstration, you pass to Unstructured a single local file. To pass multiple local or
210215
non-local files to Unstructured instead, you can use the
211216
[Unstructured Platform](/platform/overview) or
212217
[Unstructured Ingest](/ingestion/overview) outside of Langflow.
213218

214219
To do this, you can:
215220

216-
- [Use the Unstructured Platform to create a workflow](/platform/quickstart) that relies on any available non-local
221+
- [Use the Unstructured Platform to create a workflow](/platform/quickstart) that relies on any available
217222
[source connector](/platform/sources/overview) to connect to
218-
[Astra DB](/platform/destinations/astradb). Run this workflow outside of Langflow anytime you have new documents in that non-local source location that
223+
[Astra DB](/platform/destinations/astradb). Run this workflow outside of Langflow anytime you have new documents in that source location that
219224
you want Unstructured to process and then insert the new processed data into Astra DB. Then, back in the Langflow project,
220225
use the **Playground** to ask additional questions, which will now include the new data when generating answers.
221226

222-
- [Use Unstructured Ingest to create a pipeline](/api-reference/ingest/overview) that relies on any available non-local
227+
- [Use Unstructured Ingest to create a pipeline](/api-reference/ingest/overview) that relies on any available
223228
[source connector](/api-reference/ingest/source-connectors/overview) to connect to
224229
[Astra DB](/api-reference/ingest/destination-connector/astradb). Run this pipeline outside of Langflow anytime you have new documents in that non-local source location that
225230
you want Unstructured to process and then insert the new processed data into Astra DB. Then, back in the Langflow project,

0 commit comments

Comments
 (0)