Skip to content

Commit 9bfd0b7

Browse files
authored
docs: move smart filter to be alphabetical (#8682)
alphabetize-name
1 parent b199367 commit 9bfd0b7

1 file changed

Lines changed: 34 additions & 34 deletions

File tree

docs/docs/Components/components-processing.md

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -263,40 +263,6 @@ curl -X POST "http://localhost:7860/api/v1/webhook/YOUR_FLOW_ID" \
263263

264264
</details>
265265

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-
![](/img/component-lambda-filter.png)
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-
300266
## LLM router
301267

302268
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:
505471

506472
</details>
507473

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+
![](/img/component-lambda-filter.png)
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+
508508
## Split text
509509

510510
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

Comments
 (0)