Skip to content

Commit 4ea2a5d

Browse files
mendonkdev-thiago-oliver
authored andcommitted
docs: use details tabs in component pages (langflow-ai#7809)
* * Added collapsible sections for Inputs and Outputs to improve readability and organization. * Removed deprecated components and clarified legacy status for certain tools. * icosa-url * details-tab-styling * models * helpers * data * embedding-models * inputs-and-outputs * loaders * logic * memories-and-prompts * processing * vector-stores * legacy-agents * agents * hcd * revert-vector-stores * vector-stores * bundles-agents * update-legacy-wording * complete-sentences-and-punctionaion * vector-stores * google-components-are-legacy * commas * plural-s * remove-future-tense * code-review * code-review * fix-hcd-db * periods
1 parent feba357 commit 4ea2a5d

13 files changed

+2146
-1412
lines changed

docs/docs/Components/components-agents.md

Lines changed: 255 additions & 166 deletions
Large diffs are not rendered by default.

docs/docs/Components/components-data.md

Lines changed: 145 additions & 138 deletions
Large diffs are not rendered by default.

docs/docs/Components/components-embedding-models.md

Lines changed: 231 additions & 141 deletions
Large diffs are not rendered by default.

docs/docs/Components/components-helpers.md

Lines changed: 126 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -52,53 +52,68 @@ record_number: {batch_index}, name: {text_input}, summary: {model_response}
5252
8. To view your created DataFrame, in the **Parser** component, click <Icon name="TextSearch" aria-label="Inspect icon" />.
5353
9. Optionally, connect a **Chat Output** component, and open the **Playground** to see the output.
5454

55-
### Inputs
55+
<details>
56+
<summary>Parameters</summary>
5657

57-
| Name | Display Name | Type | Info |
58-
|------|--------------|------|------|
59-
| model | Language Model | HandleInput | Connect the 'Language Model' output from your LLM component here. Required. |
60-
| system_message | System Message | MultilineInput | Multi-line system instruction for all rows in the DataFrame. |
61-
| df | DataFrame | DataFrameInput | The DataFrame whose column is treated as text messages, as specified by 'column_name'. Required. |
62-
| column_name | Column Name | MessageTextInput | The name of the DataFrame column to treat as text messages. Default='text'. Required. |
63-
| enable_metadata | Enable Metadata | BoolInput | If True, add metadata to the output DataFrame. |
58+
**Inputs**
6459

65-
### Outputs
60+
| Name | Type | Description |
61+
|------|------|-------------|
62+
| model | HandleInput | Connect the 'Language Model' output from your LLM component here. Required. |
63+
| system_message | MultilineInput | A multi-line system instruction for all rows in the DataFrame. |
64+
| df | DataFrameInput | The DataFrame whose column is treated as text messages, as specified by 'column_name'. Required. |
65+
| column_name | MessageTextInput | The name of the DataFrame column to treat as text messages. Default='text'. Required. |
66+
| enable_metadata | BoolInput | If True, add metadata to the output DataFrame. |
6667

67-
| Name | Display Name | Method | Info |
68-
|------|--------------|--------|------|
69-
| batch_results | Batch Results | run_batch | A DataFrame with columns: 'text_input', 'model_response', 'batch_index', and optional 'metadata' containing processing information. |
68+
**Outputs**
69+
70+
| Name | Type | Description |
71+
|------|------|-------------|
72+
| batch_results | DataFrame | A DataFrame with columns: 'text_input', 'model_response', 'batch_index', and optional 'metadata' containing processing information. |
73+
74+
</details>
7075

7176
## Current date
7277

7378
The Current Date component returns the current date and time in a selected timezone. This component provides a flexible way to obtain timezone-specific date and time information within a Langflow pipeline.
7479

75-
### Inputs
80+
<details>
81+
<summary>Parameters</summary>
82+
83+
**Inputs**
84+
85+
| Name | Type | Description |
86+
|------|------|-------------|
87+
| timezone | String | The timezone for the current date and time. |
7688

77-
| Name | Display Name | Info |
78-
|------|--------------|------|
79-
|timezone|Timezone|Select the timezone for the current date and time.
89+
**Outputs**
8090

81-
### Outputs
91+
| Name | Type | Description |
92+
|------|------|-------------|
93+
| current_date | String | The resulting current date and time in the selected timezone. |
8294

83-
| Name | Display Name | Info |
84-
|------|--------------|------|
85-
|current_date|Current Date|The resulting current date and time in the selected timezone.
95+
</details>
8696

8797
## ID Generator
8898

8999
This component generates a unique ID.
90100

91-
### Inputs
101+
<details>
102+
<summary>Parameters</summary>
92103

93-
| Name | Display Name | Info |
94-
|------|--------------|------|
95-
| unique_id| Value | The generated unique ID. |
104+
**Inputs**
96105

97-
### Outputs
106+
| Name | Type | Description |
107+
|------|------|-------------|
108+
| unique_id | String | The generated unique ID. |
98109

99-
| Name | Display Name | Info |
100-
|------|--------------|------|
101-
| id | ID | The generated unique ID. |
110+
**Outputs**
111+
112+
| Name | Type | Description |
113+
|------|------|-------------|
114+
| id | String | The generated unique ID. |
115+
116+
</details>
102117

103118
## Message history
104119

@@ -114,25 +129,30 @@ In this example, the **Message Store** component stores the complete chat histor
114129

115130
For more information on configuring memory in Langflow, see [Memory](/memory).
116131

117-
### Inputs
132+
<details>
133+
<summary>Parameters</summary>
134+
135+
**Inputs**
136+
137+
| Name | Type | Description |
138+
|------|------|-------------|
139+
| memory | Memory | Retrieve messages from an external memory. If empty, the Langflow tables are used. |
140+
| sender | String | Filter by sender type. |
141+
| sender_name | String | Filter by sender name. |
142+
| n_messages | Integer | The number of messages to retrieve. |
143+
| session_id | String | The session ID of the chat. If empty, the current session ID parameter is used. |
144+
| order | String | The order of the messages. |
145+
| template | String | The template to use for formatting the data. It can contain the keys `{text}`, `{sender}` or any other key in the message data. |
118146

119-
| Name | Display Name | Info |
120-
|------|--------------|------|
121-
| memory | External Memory | Retrieve messages from an external memory. If empty, it will use the Langflow tables. |
122-
| sender | Sender Type | Filter by sender type. |
123-
| sender_name | Sender Name | Filter by sender name. |
124-
| n_messages | Number of Messages | Number of messages to retrieve. |
125-
| session_id | Session ID | The session ID of the chat. If empty, the current session ID parameter will be used. |
126-
| order | Order | Order of the messages. |
127-
| template | Template | The template to use for formatting the data. It can contain the keys `{text}`, `{sender}` or any other key in the message data. |
147+
**Outputs**
128148

129-
### Outputs
149+
| Name | Type | Description |
150+
|------|------|-------------|
151+
| messages | Data | The retrieved messages as Data objects. |
152+
| messages_text | String | The retrieved messages formatted as text. |
153+
| lc_memory | Memory | A constructed Langchain [ConversationBufferMemory](https://api.python.langchain.com/en/latest/memory/langchain.memory.buffer.ConversationBufferMemory.html) object. |
130154

131-
| Name | Display Name | Info |
132-
|------|--------------|------|
133-
| messages | Messages (Data) | Retrieved messages as Data objects. |
134-
| messages_text | Messages (Text) | Retrieved messages formatted as text. |
135-
| lc_memory | Memory | A constructed Langchain [ConversationBufferMemory](https://api.python.langchain.com/en/latest/memory/langchain.memory.buffer.ConversationBufferMemory.html) object |
155+
</details>
136156

137157
## Message store
138158

@@ -144,21 +164,26 @@ In this example, the **Message Store** component stores the complete chat histor
144164

145165
For more information on configuring memory in Langflow, see [Memory](/memory).
146166

147-
### Inputs
167+
<details>
168+
<summary>Parameters</summary>
148169

149-
| Name | Display Name | Info |
150-
|------|--------------|------|
151-
| message | Message | The chat message to be stored. (Required) |
152-
| memory | External Memory | The external memory to store the message. If empty, it will use the Langflow tables. |
153-
| sender | Sender | The sender of the message. Can be Machine or User. If empty, the current sender parameter will be used. |
154-
| sender_name | Sender Name | The name of the sender. Can be AI or User. If empty, the current sender parameter will be used. |
155-
| session_id | Session ID | The session ID of the chat. If empty, the current session ID parameter will be used. |
170+
**Inputs**
156171

157-
### Outputs
172+
| Name | Type | Description |
173+
|------|------|-------------|
174+
| message | String | The chat message to be stored. (Required) |
175+
| memory | Memory | The external memory to store the message. If empty, the Langflow tables are used. |
176+
| sender | String | The sender of the message. Can be Machine or User. If empty, the current sender parameter is used. |
177+
| sender_name | String | The name of the sender. Can be AI or User. If empty, the current sender parameter is used. |
178+
| session_id | String | The session ID of the chat. If empty, the current session ID parameter is used. |
158179

159-
| Name | Display Name | Info |
160-
|------|--------------|------|
161-
| stored_messages | Stored Messages | The list of stored messages after the current message has been added. |
180+
**Outputs**
181+
182+
| Name | Type | Description |
183+
|------|------|-------------|
184+
| stored_messages | List[Data] | The list of stored messages after the current message has been added. |
185+
186+
</details>
162187

163188
## Structured output
164189

@@ -182,23 +207,27 @@ The **Parse DataFrame** component parses the structured output into a template f
182207

183208
For example, the template `EBITDA: {EBITDA} , Net Income: {NET_INCOME} , GROSS_PROFIT: {GROSS_PROFIT}` presents the extracted values in the **Playground** as `EBITDA: 900 million , Net Income: 500 million , GROSS_PROFIT: 1.2 billion`.
184209

185-
### Inputs
210+
<details>
211+
<summary>Parameters</summary>
212+
213+
**Inputs**
214+
215+
| Name | Type | Description |
216+
|------|------|-------------|
217+
| llm | LanguageModel | The language model to use to generate the structured output. |
218+
| input_value | String | The input message to the language model. |
219+
| system_prompt | String | The instructions to the language model for formatting the output. |
220+
| schema_name | String | The name for the output data schema. |
221+
| output_schema | Table | The structure and data types for the model's output. |
222+
| multiple | Boolean | [Deprecated] Always set to `True`. |
186223

187-
| Name | Display Name | Info |
188-
|------|--------------|------|
189-
| llm | Language Model | The language model to use to generate the structured output. |
190-
| input_value | Input Message | The input message to the language model. |
191-
| system_prompt | Format Instructions | Instructions to the language model for formatting the output. |
192-
| schema_name | Schema Name | The name for the output data schema. |
193-
| output_schema | Output Schema | Defines the structure and data types for the model's output.|
194-
| multiple | Generate Multiple | [Deprecated] Always set to `True`. |
224+
**Outputs**
195225

196-
### Outputs
226+
| Name | Type | Description |
227+
|------|------|-------------|
228+
| structured_output | Data | The structured output is a Data object based on the defined schema. |
197229

198-
| Name | Display Name | Info |
199-
|------|--------------|------|
200-
| structured_output | Structured Output | The structured output is a Data object based on the defined schema. |
201-
| structured_output_dataframe | DataFrame | The structured output converted to a [DataFrame](/concepts-objects#dataframe-object) format. |
230+
</details>
202231

203232
## Legacy components
204233

@@ -208,19 +237,24 @@ Legacy components are available for use but are no longer supported.
208237

209238
This component dynamically creates a record with a specified number of fields.
210239

211-
#### Inputs
240+
<details>
241+
<summary>Parameters</summary>
212242

213-
| Name | Display Name | Info |
214-
|------|--------------|------|
215-
| n_fields | Number of Fields | Number of fields to be added to the record. |
216-
| text_key | Text Key | Key used as text. |
243+
**Inputs**
217244

218-
#### Outputs
245+
| Name | Type | Description |
246+
|------|------|-------------|
247+
| n_fields | Integer | The number of fields to be added to the record. |
248+
| text_key | String | The key used as text. |
219249

220-
| Name | Display Name | Info |
221-
|------|--------------|------|
250+
**Outputs**
251+
252+
| Name | Type | Description |
253+
|------|------|-------------|
222254
| list | List | The dynamically created list with the specified number of fields. |
223255

256+
</details>
257+
224258
### Output Parser
225259

226260
This component transforms the output of a language model into a specified format. It supports CSV format parsing, which converts LLM responses into comma-separated lists using Langchain's `CommaSeparatedListOutputParser`.
@@ -246,15 +280,20 @@ Please list three fruits.
246280

247281
4. The output parser converts this into a Python list: `["apple", "banana", "orange"]`.
248282

249-
#### Inputs
283+
<details>
284+
<summary>Parameters</summary>
285+
286+
**Inputs**
287+
288+
| Name | Type | Description |
289+
|------|------|-------------|
290+
| parser_type | String | The parser type. Currently supports "CSV". |
250291

251-
| Name | Display Name | Info |
252-
|------|--------------|------|
253-
| parser_type | Parser | Select the parser type. Currently supports "CSV". |
292+
**Outputs**
254293

255-
#### Outputs
294+
| Name | Type | Description |
295+
|------|------|-------------|
296+
| format_instructions | String | Pass to a prompt template to include formatting instructions for LLM responses. |
297+
| output_parser | Parser | The constructed output parser that can be used to parse LLM responses. |
256298

257-
| Name | Display Name | Info |
258-
|------|--------------|------|
259-
| format_instructions | Format Instructions | Pass to a prompt template to include formatting instructions for LLM responses. |
260-
| output_parser | Output Parser | The constructed output parser that can be used to parse LLM responses. |
299+
</details>

0 commit comments

Comments
 (0)