Flowise

Форк
0
/
List Output Parser.json 
431 строка · 17.7 Кб
1
{
2
    "description": "Return response as a list (array) instead of a string/text",
3
    "badge": "NEW",
4
    "categories": "CSV Output Parser,ChatOpenAI,LLM Chain,Langchain",
5
    "framework": "Langchain",
6
    "nodes": [
7
        {
8
            "width": 300,
9
            "height": 456,
10
            "id": "llmChain_0",
11
            "position": {
12
                "x": 1490.4252662385359,
13
                "y": 229.91198307750102
14
            },
15
            "type": "customNode",
16
            "data": {
17
                "id": "llmChain_0",
18
                "label": "LLM Chain",
19
                "version": 3,
20
                "name": "llmChain",
21
                "type": "LLMChain",
22
                "baseClasses": ["LLMChain", "BaseChain", "Runnable"],
23
                "category": "Chains",
24
                "description": "Chain to run queries against LLMs",
25
                "inputParams": [
26
                    {
27
                        "label": "Chain Name",
28
                        "name": "chainName",
29
                        "type": "string",
30
                        "placeholder": "Name Your Chain",
31
                        "optional": true,
32
                        "id": "llmChain_0-input-chainName-string"
33
                    }
34
                ],
35
                "inputAnchors": [
36
                    {
37
                        "label": "Language Model",
38
                        "name": "model",
39
                        "type": "BaseLanguageModel",
40
                        "id": "llmChain_0-input-model-BaseLanguageModel"
41
                    },
42
                    {
43
                        "label": "Prompt",
44
                        "name": "prompt",
45
                        "type": "BasePromptTemplate",
46
                        "id": "llmChain_0-input-prompt-BasePromptTemplate"
47
                    },
48
                    {
49
                        "label": "Output Parser",
50
                        "name": "outputParser",
51
                        "type": "BaseLLMOutputParser",
52
                        "optional": true,
53
                        "id": "llmChain_0-input-outputParser-BaseLLMOutputParser"
54
                    },
55
                    {
56
                        "label": "Input Moderation",
57
                        "description": "Detect text that could generate harmful output and prevent it from being sent to the language model",
58
                        "name": "inputModeration",
59
                        "type": "Moderation",
60
                        "optional": true,
61
                        "list": true,
62
                        "id": "llmChain_0-input-inputModeration-Moderation"
63
                    }
64
                ],
65
                "inputs": {
66
                    "model": "{{chatOpenAI_0.data.instance}}",
67
                    "prompt": "{{promptTemplate_0.data.instance}}",
68
                    "outputParser": "{{csvOutputParser_0.data.instance}}",
69
                    "chainName": "",
70
                    "inputModeration": ""
71
                },
72
                "outputAnchors": [
73
                    {
74
                        "name": "output",
75
                        "label": "Output",
76
                        "type": "options",
77
                        "options": [
78
                            {
79
                                "id": "llmChain_0-output-llmChain-LLMChain|BaseChain|Runnable",
80
                                "name": "llmChain",
81
                                "label": "LLM Chain",
82
                                "type": "LLMChain | BaseChain | Runnable"
83
                            },
84
                            {
85
                                "id": "llmChain_0-output-outputPrediction-string|json",
86
                                "name": "outputPrediction",
87
                                "label": "Output Prediction",
88
                                "type": "string | json"
89
                            }
90
                        ],
91
                        "default": "llmChain"
92
                    }
93
                ],
94
                "outputs": {
95
                    "output": "llmChain"
96
                },
97
                "selected": false
98
            },
99
            "selected": false,
100
            "positionAbsolute": {
101
                "x": 1490.4252662385359,
102
                "y": 229.91198307750102
103
            },
104
            "dragging": false
105
        },
106
        {
107
            "width": 300,
108
            "height": 276,
109
            "id": "csvOutputParser_0",
110
            "position": {
111
                "x": 476.70884184429417,
112
                "y": 346.38506209058426
113
            },
114
            "type": "customNode",
115
            "data": {
116
                "id": "csvOutputParser_0",
117
                "label": "CSV Output Parser",
118
                "version": 1,
119
                "name": "csvOutputParser",
120
                "type": "CSVListOutputParser",
121
                "baseClasses": ["CSVListOutputParser", "BaseLLMOutputParser", "Runnable"],
122
                "category": "Output Parsers",
123
                "description": "Parse the output of an LLM call as a comma-separated list of values",
124
                "inputParams": [
125
                    {
126
                        "label": "Autofix",
127
                        "name": "autofixParser",
128
                        "type": "boolean",
129
                        "optional": true,
130
                        "description": "In the event that the first call fails, will make another call to the model to fix any errors.",
131
                        "id": "csvOutputParser_0-input-autofixParser-boolean"
132
                    }
133
                ],
134
                "inputAnchors": [],
135
                "inputs": {
136
                    "autofixParser": true
137
                },
138
                "outputAnchors": [
139
                    {
140
                        "id": "csvOutputParser_0-output-csvOutputParser-CSVListOutputParser|BaseLLMOutputParser|Runnable",
141
                        "name": "csvOutputParser",
142
                        "label": "CSVListOutputParser",
143
                        "type": "CSVListOutputParser | BaseLLMOutputParser | Runnable"
144
                    }
145
                ],
146
                "outputs": {},
147
                "selected": false
148
            },
149
            "selected": false,
150
            "positionAbsolute": {
151
                "x": 476.70884184429417,
152
                "y": 346.38506209058426
153
            },
154
            "dragging": false
155
        },
156
        {
157
            "width": 300,
158
            "height": 475,
159
            "id": "promptTemplate_0",
160
            "position": {
161
                "x": 804.3731431892371,
162
                "y": 10.888147964487587
163
            },
164
            "type": "customNode",
165
            "data": {
166
                "id": "promptTemplate_0",
167
                "label": "Prompt Template",
168
                "version": 1,
169
                "name": "promptTemplate",
170
                "type": "PromptTemplate",
171
                "baseClasses": ["PromptTemplate", "BaseStringPromptTemplate", "BasePromptTemplate", "Runnable"],
172
                "category": "Prompts",
173
                "description": "Schema to represent a basic prompt for an LLM",
174
                "inputParams": [
175
                    {
176
                        "label": "Template",
177
                        "name": "template",
178
                        "type": "string",
179
                        "rows": 4,
180
                        "placeholder": "What is a good name for a company that makes {product}?",
181
                        "id": "promptTemplate_0-input-template-string"
182
                    },
183
                    {
184
                        "label": "Format Prompt Values",
185
                        "name": "promptValues",
186
                        "type": "json",
187
                        "optional": true,
188
                        "acceptVariable": true,
189
                        "list": true,
190
                        "id": "promptTemplate_0-input-promptValues-json"
191
                    }
192
                ],
193
                "inputAnchors": [],
194
                "inputs": {
195
                    "template": "Answer user's question as best you can: {question}",
196
                    "promptValues": ""
197
                },
198
                "outputAnchors": [
199
                    {
200
                        "id": "promptTemplate_0-output-promptTemplate-PromptTemplate|BaseStringPromptTemplate|BasePromptTemplate|Runnable",
201
                        "name": "promptTemplate",
202
                        "label": "PromptTemplate",
203
                        "type": "PromptTemplate | BaseStringPromptTemplate | BasePromptTemplate | Runnable"
204
                    }
205
                ],
206
                "outputs": {},
207
                "selected": false
208
            },
209
            "selected": false,
210
            "positionAbsolute": {
211
                "x": 804.3731431892371,
212
                "y": 10.888147964487587
213
            },
214
            "dragging": false
215
        },
216
        {
217
            "width": 300,
218
            "height": 574,
219
            "id": "chatOpenAI_0",
220
            "position": {
221
                "x": 1137.2591863882824,
222
                "y": -204.50870351724768
223
            },
224
            "type": "customNode",
225
            "data": {
226
                "id": "chatOpenAI_0",
227
                "label": "ChatOpenAI",
228
                "version": 6.0,
229
                "name": "chatOpenAI",
230
                "type": "ChatOpenAI",
231
                "baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel", "Runnable"],
232
                "category": "Chat Models",
233
                "description": "Wrapper around OpenAI large language models that use the Chat endpoint",
234
                "inputParams": [
235
                    {
236
                        "label": "Connect Credential",
237
                        "name": "credential",
238
                        "type": "credential",
239
                        "credentialNames": ["openAIApi"],
240
                        "id": "chatOpenAI_0-input-credential-credential"
241
                    },
242
                    {
243
                        "label": "Model Name",
244
                        "name": "modelName",
245
                        "type": "asyncOptions",
246
                        "loadMethod": "listModels",
247
                        "default": "gpt-3.5-turbo",
248
                        "id": "chatOpenAI_0-input-modelName-options"
249
                    },
250
                    {
251
                        "label": "Temperature",
252
                        "name": "temperature",
253
                        "type": "number",
254
                        "step": 0.1,
255
                        "default": 0.9,
256
                        "optional": true,
257
                        "id": "chatOpenAI_0-input-temperature-number"
258
                    },
259
                    {
260
                        "label": "Max Tokens",
261
                        "name": "maxTokens",
262
                        "type": "number",
263
                        "step": 1,
264
                        "optional": true,
265
                        "additionalParams": true,
266
                        "id": "chatOpenAI_0-input-maxTokens-number"
267
                    },
268
                    {
269
                        "label": "Top Probability",
270
                        "name": "topP",
271
                        "type": "number",
272
                        "step": 0.1,
273
                        "optional": true,
274
                        "additionalParams": true,
275
                        "id": "chatOpenAI_0-input-topP-number"
276
                    },
277
                    {
278
                        "label": "Frequency Penalty",
279
                        "name": "frequencyPenalty",
280
                        "type": "number",
281
                        "step": 0.1,
282
                        "optional": true,
283
                        "additionalParams": true,
284
                        "id": "chatOpenAI_0-input-frequencyPenalty-number"
285
                    },
286
                    {
287
                        "label": "Presence Penalty",
288
                        "name": "presencePenalty",
289
                        "type": "number",
290
                        "step": 0.1,
291
                        "optional": true,
292
                        "additionalParams": true,
293
                        "id": "chatOpenAI_0-input-presencePenalty-number"
294
                    },
295
                    {
296
                        "label": "Timeout",
297
                        "name": "timeout",
298
                        "type": "number",
299
                        "step": 1,
300
                        "optional": true,
301
                        "additionalParams": true,
302
                        "id": "chatOpenAI_0-input-timeout-number"
303
                    },
304
                    {
305
                        "label": "BasePath",
306
                        "name": "basepath",
307
                        "type": "string",
308
                        "optional": true,
309
                        "additionalParams": true,
310
                        "id": "chatOpenAI_0-input-basepath-string"
311
                    },
312
                    {
313
                        "label": "BaseOptions",
314
                        "name": "baseOptions",
315
                        "type": "json",
316
                        "optional": true,
317
                        "additionalParams": true,
318
                        "id": "chatOpenAI_0-input-baseOptions-json"
319
                    },
320
                    {
321
                        "label": "Allow Image Uploads",
322
                        "name": "allowImageUploads",
323
                        "type": "boolean",
324
                        "description": "Automatically uses gpt-4-vision-preview when image is being uploaded from chat. Only works with LLMChain, Conversation Chain, ReAct Agent, and Conversational Agent",
325
                        "default": false,
326
                        "optional": true,
327
                        "id": "chatOpenAI_0-input-allowImageUploads-boolean"
328
                    },
329
                    {
330
                        "label": "Image Resolution",
331
                        "description": "This parameter controls the resolution in which the model views the image.",
332
                        "name": "imageResolution",
333
                        "type": "options",
334
                        "options": [
335
                            {
336
                                "label": "Low",
337
                                "name": "low"
338
                            },
339
                            {
340
                                "label": "High",
341
                                "name": "high"
342
                            },
343
                            {
344
                                "label": "Auto",
345
                                "name": "auto"
346
                            }
347
                        ],
348
                        "default": "low",
349
                        "optional": false,
350
                        "additionalParams": true,
351
                        "id": "chatOpenAI_0-input-imageResolution-options"
352
                    }
353
                ],
354
                "inputAnchors": [
355
                    {
356
                        "label": "Cache",
357
                        "name": "cache",
358
                        "type": "BaseCache",
359
                        "optional": true,
360
                        "id": "chatOpenAI_0-input-cache-BaseCache"
361
                    }
362
                ],
363
                "inputs": {
364
                    "cache": "",
365
                    "modelName": "gpt-3.5-turbo-16k",
366
                    "temperature": "0",
367
                    "maxTokens": "",
368
                    "topP": "",
369
                    "frequencyPenalty": "",
370
                    "presencePenalty": "",
371
                    "timeout": "",
372
                    "basepath": "",
373
                    "baseOptions": "",
374
                    "allowImageUploads": true,
375
                    "imageResolution": "low"
376
                },
377
                "outputAnchors": [
378
                    {
379
                        "id": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|Runnable",
380
                        "name": "chatOpenAI",
381
                        "label": "ChatOpenAI",
382
                        "type": "ChatOpenAI | BaseChatModel | BaseLanguageModel | Runnable"
383
                    }
384
                ],
385
                "outputs": {},
386
                "selected": false
387
            },
388
            "selected": false,
389
            "positionAbsolute": {
390
                "x": 1137.2591863882824,
391
                "y": -204.50870351724768
392
            },
393
            "dragging": false
394
        }
395
    ],
396
    "edges": [
397
        {
398
            "source": "csvOutputParser_0",
399
            "sourceHandle": "csvOutputParser_0-output-csvOutputParser-CSVListOutputParser|BaseLLMOutputParser|Runnable",
400
            "target": "llmChain_0",
401
            "targetHandle": "llmChain_0-input-outputParser-BaseLLMOutputParser",
402
            "type": "buttonedge",
403
            "id": "csvOutputParser_0-csvOutputParser_0-output-csvOutputParser-CSVListOutputParser|BaseLLMOutputParser|Runnable-llmChain_0-llmChain_0-input-outputParser-BaseLLMOutputParser",
404
            "data": {
405
                "label": ""
406
            }
407
        },
408
        {
409
            "source": "chatOpenAI_0",
410
            "sourceHandle": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|Runnable",
411
            "target": "llmChain_0",
412
            "targetHandle": "llmChain_0-input-model-BaseLanguageModel",
413
            "type": "buttonedge",
414
            "id": "chatOpenAI_0-chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel|Runnable-llmChain_0-llmChain_0-input-model-BaseLanguageModel",
415
            "data": {
416
                "label": ""
417
            }
418
        },
419
        {
420
            "source": "promptTemplate_0",
421
            "sourceHandle": "promptTemplate_0-output-promptTemplate-PromptTemplate|BaseStringPromptTemplate|BasePromptTemplate|Runnable",
422
            "target": "llmChain_0",
423
            "targetHandle": "llmChain_0-input-prompt-BasePromptTemplate",
424
            "type": "buttonedge",
425
            "id": "promptTemplate_0-promptTemplate_0-output-promptTemplate-PromptTemplate|BaseStringPromptTemplate|BasePromptTemplate|Runnable-llmChain_0-llmChain_0-input-prompt-BasePromptTemplate",
426
            "data": {
427
                "label": ""
428
            }
429
        }
430
    ]
431
}
432

Использование cookies

Мы используем файлы cookie в соответствии с Политикой конфиденциальности и Политикой использования cookies.

Нажимая кнопку «Принимаю», Вы даете АО «СберТех» согласие на обработку Ваших персональных данных в целях совершенствования нашего веб-сайта и Сервиса GitVerse, а также повышения удобства их использования.

Запретить использование cookies Вы можете самостоятельно в настройках Вашего браузера.