You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/Components/components-processing.md
+34-34Lines changed: 34 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -263,40 +263,6 @@ curl -X POST "http://localhost:7860/api/v1/webhook/YOUR_FLOW_ID" \
263
263
264
264
</details>
265
265
266
-
## Smart function
267
-
268
-
This component uses an LLM to generate a Lambda function for filtering or transforming structured data.
269
-
270
-
To use the **Smart function** component, you must connect it to a [Language Model](/components-models#language-model) component, which the component uses to generate a function based on the natural language instructions in the **Instructions** field.
271
-
272
-
This example gets JSON data from the `https://jsonplaceholder.typicode.com/users` API endpoint.
273
-
The **Instructions** field in the **Smart function** component specifies the task `extract emails`.
274
-
The connected LLM creates a filter based on the instructions, and successfully extracts a list of email addresses from the JSON data.
275
-
276
-

277
-
278
-
<details>
279
-
<summary>Parameters</summary>
280
-
281
-
**Inputs**
282
-
283
-
| Name | Display Name | Info |
284
-
|------|--------------|------|
285
-
| data | Data | The structured data to filter or transform using a Lambda function. |
286
-
| llm | Language Model | The connection port for a [Model](/components-models) component. |
287
-
| filter_instruction | Instructions | The natural language instructions for how to filter or transform the data using a Lambda function, such as `Filter the data to only include items where the 'status' is 'active'`. |
288
-
| sample_size | Sample Size | For large datasets, the number of characters to sample from the dataset head and tail. |
289
-
| max_size | Max Size | The number of characters for the data to be considered "large", which triggers sampling by the `sample_size` value. |
290
-
291
-
**Outputs**
292
-
293
-
| Name | Display Name | Info |
294
-
|------|--------------|------|
295
-
| filtered_data | Filtered Data | The filtered or transformed [Data object](/concepts-objects#data-object). |
296
-
| dataframe | DataFrame | The filtered data as a [DataFrame](/concepts-objects#dataframe-object). |
297
-
298
-
</details>
299
-
300
266
## LLM router
301
267
302
268
This component routes requests to the most appropriate LLM based on OpenRouter model specifications.
@@ -505,6 +471,40 @@ For `Message` inputs, the component can create:
505
471
506
472
</details>
507
473
474
+
## Smart function
475
+
476
+
This component uses an LLM to generate a Lambda function for filtering or transforming structured data.
477
+
478
+
To use the **Smart function** component, you must connect it to a [Language Model](/components-models#language-model) component, which the component uses to generate a function based on the natural language instructions in the **Instructions** field.
479
+
480
+
This example gets JSON data from the `https://jsonplaceholder.typicode.com/users` API endpoint.
481
+
The **Instructions** field in the **Smart function** component specifies the task `extract emails`.
482
+
The connected LLM creates a filter based on the instructions, and successfully extracts a list of email addresses from the JSON data.
483
+
484
+

485
+
486
+
<details>
487
+
<summary>Parameters</summary>
488
+
489
+
**Inputs**
490
+
491
+
| Name | Display Name | Info |
492
+
|------|--------------|------|
493
+
| data | Data | The structured data to filter or transform using a Lambda function. |
494
+
| llm | Language Model | The connection port for a [Model](/components-models) component. |
495
+
| filter_instruction | Instructions | The natural language instructions for how to filter or transform the data using a Lambda function, such as `Filter the data to only include items where the 'status' is 'active'`. |
496
+
| sample_size | Sample Size | For large datasets, the number of characters to sample from the dataset head and tail. |
497
+
| max_size | Max Size | The number of characters for the data to be considered "large", which triggers sampling by the `sample_size` value. |
498
+
499
+
**Outputs**
500
+
501
+
| Name | Display Name | Info |
502
+
|------|--------------|------|
503
+
| filtered_data | Filtered Data | The filtered or transformed [Data object](/concepts-objects#data-object). |
504
+
| dataframe | DataFrame | The filtered data as a [DataFrame](/concepts-objects#dataframe-object). |
505
+
506
+
</details>
507
+
508
508
## Split text
509
509
510
510
This component splits text into chunks based on specified criteria. It's ideal for chunking data to be tokenized and embedded into vector databases.
0 commit comments