Flowise

Форк
0
510 строк · 20.8 Кб
1
{
2
    "description": "An agent that uses OpenAI's Function Calling functionality to pick the tool and args to call",
3
    "categories": "Buffer Memory,Custom Tool, SerpAPI,OpenAI Tool Agent,Calculator Tool,ChatOpenAI,Langchain",
4
    "framework": "Langchain",
5
    "nodes": [
6
        {
7
            "width": 300,
8
            "height": 142,
9
            "id": "calculator_0",
10
            "position": {
11
                "x": 288.06681362611545,
12
                "y": 289.1385194199715
13
            },
14
            "type": "customNode",
15
            "data": {
16
                "id": "calculator_0",
17
                "label": "Calculator",
18
                "version": 1,
19
                "name": "calculator",
20
                "type": "Calculator",
21
                "baseClasses": ["Calculator", "Tool", "StructuredTool", "BaseLangChain", "Serializable"],
22
                "category": "Tools",
23
                "description": "Perform calculations on response",
24
                "inputParams": [],
25
                "inputAnchors": [],
26
                "inputs": {},
27
                "outputAnchors": [
28
                    {
29
                        "id": "calculator_0-output-calculator-Calculator|Tool|StructuredTool|BaseLangChain|Serializable",
30
                        "name": "calculator",
31
                        "label": "Calculator",
32
                        "type": "Calculator | Tool | StructuredTool | BaseLangChain | Serializable"
33
                    }
34
                ],
35
                "outputs": {},
36
                "selected": false
37
            },
38
            "selected": false,
39
            "positionAbsolute": {
40
                "x": 288.06681362611545,
41
                "y": 289.1385194199715
42
            },
43
            "dragging": false
44
        },
45
        {
46
            "width": 300,
47
            "height": 376,
48
            "id": "bufferMemory_0",
49
            "position": {
50
                "x": 285.7750469157585,
51
                "y": 465.1140427303788
52
            },
53
            "type": "customNode",
54
            "data": {
55
                "id": "bufferMemory_0",
56
                "label": "Buffer Memory",
57
                "version": 2,
58
                "name": "bufferMemory",
59
                "type": "BufferMemory",
60
                "baseClasses": ["BufferMemory", "BaseChatMemory", "BaseMemory"],
61
                "category": "Memory",
62
                "description": "Retrieve chat messages stored in database",
63
                "inputParams": [
64
                    {
65
                        "label": "Session Id",
66
                        "name": "sessionId",
67
                        "type": "string",
68
                        "description": "If not specified, a random id will be used. Learn <a target=\"_blank\" href=\"https://docs.flowiseai.com/memory#ui-and-embedded-chat\">more</a>",
69
                        "default": "",
70
                        "additionalParams": true,
71
                        "optional": true,
72
                        "id": "bufferMemory_0-input-sessionId-string"
73
                    },
74
                    {
75
                        "label": "Memory Key",
76
                        "name": "memoryKey",
77
                        "type": "string",
78
                        "default": "chat_history",
79
                        "additionalParams": true,
80
                        "id": "bufferMemory_0-input-memoryKey-string"
81
                    }
82
                ],
83
                "inputAnchors": [],
84
                "inputs": {
85
                    "sessionId": "",
86
                    "memoryKey": "chat_history"
87
                },
88
                "outputAnchors": [
89
                    {
90
                        "id": "bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory",
91
                        "name": "bufferMemory",
92
                        "label": "BufferMemory",
93
                        "type": "BufferMemory | BaseChatMemory | BaseMemory"
94
                    }
95
                ],
96
                "outputs": {},
97
                "selected": false
98
            },
99
            "selected": false,
100
            "positionAbsolute": {
101
                "x": 285.7750469157585,
102
                "y": 465.1140427303788
103
            },
104
            "dragging": false
105
        },
106
        {
107
            "width": 300,
108
            "height": 276,
109
            "id": "customTool_0",
110
            "position": {
111
                "x": 883.9529939431576,
112
                "y": -32.32503903826486
113
            },
114
            "type": "customNode",
115
            "data": {
116
                "id": "customTool_0",
117
                "label": "Custom Tool",
118
                "version": 1,
119
                "name": "customTool",
120
                "type": "CustomTool",
121
                "baseClasses": ["CustomTool", "Tool", "StructuredTool"],
122
                "category": "Tools",
123
                "description": "Use custom tool you've created in Flowise within chatflow",
124
                "inputParams": [
125
                    {
126
                        "label": "Select Tool",
127
                        "name": "selectedTool",
128
                        "type": "asyncOptions",
129
                        "loadMethod": "listTools",
130
                        "id": "customTool_0-input-selectedTool-asyncOptions"
131
                    }
132
                ],
133
                "inputAnchors": [],
134
                "inputs": {
135
                    "selectedTool": ""
136
                },
137
                "outputAnchors": [
138
                    {
139
                        "id": "customTool_0-output-customTool-CustomTool|Tool|StructuredTool",
140
                        "name": "customTool",
141
                        "label": "CustomTool",
142
                        "type": "CustomTool | Tool | StructuredTool"
143
                    }
144
                ],
145
                "outputs": {},
146
                "selected": false
147
            },
148
            "selected": false,
149
            "positionAbsolute": {
150
                "x": 883.9529939431576,
151
                "y": -32.32503903826486
152
            },
153
            "dragging": false
154
        },
155
        {
156
            "width": 300,
157
            "height": 276,
158
            "id": "serper_0",
159
            "position": {
160
                "x": 504.3508341937219,
161
                "y": -10.324432507151982
162
            },
163
            "type": "customNode",
164
            "data": {
165
                "id": "serper_0",
166
                "label": "Serper",
167
                "version": 1,
168
                "name": "serper",
169
                "type": "Serper",
170
                "baseClasses": ["Serper", "Tool", "StructuredTool"],
171
                "category": "Tools",
172
                "description": "Wrapper around Serper.dev - Google Search API",
173
                "inputParams": [
174
                    {
175
                        "label": "Connect Credential",
176
                        "name": "credential",
177
                        "type": "credential",
178
                        "credentialNames": ["serperApi"],
179
                        "id": "serper_0-input-credential-credential"
180
                    }
181
                ],
182
                "inputAnchors": [],
183
                "inputs": {},
184
                "outputAnchors": [
185
                    {
186
                        "id": "serper_0-output-serper-Serper|Tool|StructuredTool",
187
                        "name": "serper",
188
                        "label": "Serper",
189
                        "type": "Serper | Tool | StructuredTool"
190
                    }
191
                ],
192
                "outputs": {},
193
                "selected": false
194
            },
195
            "selected": false,
196
            "positionAbsolute": {
197
                "x": 504.3508341937219,
198
                "y": -10.324432507151982
199
            },
200
            "dragging": false
201
        },
202
        {
203
            "width": 300,
204
            "height": 670,
205
            "id": "chatOpenAI_0",
206
            "position": {
207
                "x": 817.8210275868742,
208
                "y": 627.7677030233751
209
            },
210
            "type": "customNode",
211
            "data": {
212
                "id": "chatOpenAI_0",
213
                "label": "ChatOpenAI",
214
                "version": 6.0,
215
                "name": "chatOpenAI",
216
                "type": "ChatOpenAI",
217
                "baseClasses": ["ChatOpenAI", "BaseChatModel", "BaseLanguageModel"],
218
                "category": "Chat Models",
219
                "description": "Wrapper around OpenAI large language models that use the Chat endpoint",
220
                "inputParams": [
221
                    {
222
                        "label": "Connect Credential",
223
                        "name": "credential",
224
                        "type": "credential",
225
                        "credentialNames": ["openAIApi"],
226
                        "id": "chatOpenAI_0-input-credential-credential"
227
                    },
228
                    {
229
                        "label": "Model Name",
230
                        "name": "modelName",
231
                        "type": "asyncOptions",
232
                        "loadMethod": "listModels",
233
                        "default": "gpt-3.5-turbo",
234
                        "id": "chatOpenAI_0-input-modelName-options"
235
                    },
236
                    {
237
                        "label": "Temperature",
238
                        "name": "temperature",
239
                        "type": "number",
240
                        "default": 0.9,
241
                        "optional": true,
242
                        "id": "chatOpenAI_0-input-temperature-number"
243
                    },
244
                    {
245
                        "label": "Max Tokens",
246
                        "name": "maxTokens",
247
                        "type": "number",
248
                        "optional": true,
249
                        "additionalParams": true,
250
                        "id": "chatOpenAI_0-input-maxTokens-number"
251
                    },
252
                    {
253
                        "label": "Top Probability",
254
                        "name": "topP",
255
                        "type": "number",
256
                        "optional": true,
257
                        "additionalParams": true,
258
                        "id": "chatOpenAI_0-input-topP-number"
259
                    },
260
                    {
261
                        "label": "Frequency Penalty",
262
                        "name": "frequencyPenalty",
263
                        "type": "number",
264
                        "optional": true,
265
                        "additionalParams": true,
266
                        "id": "chatOpenAI_0-input-frequencyPenalty-number"
267
                    },
268
                    {
269
                        "label": "Presence Penalty",
270
                        "name": "presencePenalty",
271
                        "type": "number",
272
                        "optional": true,
273
                        "additionalParams": true,
274
                        "id": "chatOpenAI_0-input-presencePenalty-number"
275
                    },
276
                    {
277
                        "label": "Timeout",
278
                        "name": "timeout",
279
                        "type": "number",
280
                        "optional": true,
281
                        "additionalParams": true,
282
                        "id": "chatOpenAI_0-input-timeout-number"
283
                    },
284
                    {
285
                        "label": "BasePath",
286
                        "name": "basepath",
287
                        "type": "string",
288
                        "optional": true,
289
                        "additionalParams": true,
290
                        "id": "chatOpenAI_0-input-basepath-string"
291
                    },
292
                    {
293
                        "label": "BaseOptions",
294
                        "name": "baseOptions",
295
                        "type": "json",
296
                        "optional": true,
297
                        "additionalParams": true,
298
                        "id": "chatOpenAI_0-input-baseOptions-json"
299
                    },
300
                    {
301
                        "label": "Allow Image Uploads",
302
                        "name": "allowImageUploads",
303
                        "type": "boolean",
304
                        "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",
305
                        "default": false,
306
                        "optional": true,
307
                        "id": "chatOpenAI_0-input-allowImageUploads-boolean"
308
                    },
309
                    {
310
                        "label": "Image Resolution",
311
                        "description": "This parameter controls the resolution in which the model views the image.",
312
                        "name": "imageResolution",
313
                        "type": "options",
314
                        "options": [
315
                            {
316
                                "label": "Low",
317
                                "name": "low"
318
                            },
319
                            {
320
                                "label": "High",
321
                                "name": "high"
322
                            },
323
                            {
324
                                "label": "Auto",
325
                                "name": "auto"
326
                            }
327
                        ],
328
                        "default": "low",
329
                        "optional": false,
330
                        "additionalParams": true,
331
                        "id": "chatOpenAI_0-input-imageResolution-options"
332
                    }
333
                ],
334
                "inputAnchors": [
335
                    {
336
                        "label": "Cache",
337
                        "name": "cache",
338
                        "type": "BaseCache",
339
                        "optional": true,
340
                        "id": "chatOpenAI_0-input-cache-BaseCache"
341
                    }
342
                ],
343
                "inputs": {
344
                    "modelName": "gpt-3.5-turbo",
345
                    "temperature": 0.9,
346
                    "maxTokens": "",
347
                    "topP": "",
348
                    "frequencyPenalty": "",
349
                    "presencePenalty": "",
350
                    "timeout": "",
351
                    "basepath": "",
352
                    "baseOptions": "",
353
                    "allowImageUploads": true,
354
                    "imageResolution": "low"
355
                },
356
                "outputAnchors": [
357
                    {
358
                        "id": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel",
359
                        "name": "chatOpenAI",
360
                        "label": "ChatOpenAI",
361
                        "type": "ChatOpenAI | BaseChatModel | BaseLanguageModel"
362
                    }
363
                ],
364
                "outputs": {},
365
                "selected": false
366
            },
367
            "selected": false,
368
            "positionAbsolute": {
369
                "x": 817.8210275868742,
370
                "y": 627.7677030233751
371
            },
372
            "dragging": false
373
        },
374
        {
375
            "id": "openAIToolAgent_0",
376
            "position": {
377
                "x": 1248.5254972140808,
378
                "y": 343.77259824664554
379
            },
380
            "type": "customNode",
381
            "data": {
382
                "id": "openAIToolAgent_0",
383
                "label": "OpenAI Tool Agent",
384
                "version": 1,
385
                "name": "openAIToolAgent",
386
                "type": "AgentExecutor",
387
                "baseClasses": ["AgentExecutor", "BaseChain", "Runnable"],
388
                "category": "Agents",
389
                "description": "Agent that uses OpenAI Function Calling to pick the tools and args to call",
390
                "inputParams": [
391
                    {
392
                        "label": "System Message",
393
                        "name": "systemMessage",
394
                        "type": "string",
395
                        "rows": 4,
396
                        "optional": true,
397
                        "additionalParams": true,
398
                        "id": "openAIToolAgent_0-input-systemMessage-string"
399
                    },
400
                    {
401
                        "label": "Max Iterations",
402
                        "name": "maxIterations",
403
                        "type": "number",
404
                        "optional": true,
405
                        "additionalParams": true,
406
                        "id": "openAIToolAgent_0-input-maxIterations-number"
407
                    }
408
                ],
409
                "inputAnchors": [
410
                    {
411
                        "label": "Tools",
412
                        "name": "tools",
413
                        "type": "Tool",
414
                        "list": true,
415
                        "id": "openAIToolAgent_0-input-tools-Tool"
416
                    },
417
                    {
418
                        "label": "Memory",
419
                        "name": "memory",
420
                        "type": "BaseChatMemory",
421
                        "id": "openAIToolAgent_0-input-memory-BaseChatMemory"
422
                    },
423
                    {
424
                        "label": "OpenAI/Azure Chat Model",
425
                        "name": "model",
426
                        "type": "BaseChatModel",
427
                        "id": "openAIToolAgent_0-input-model-BaseChatModel"
428
                    },
429
                    {
430
                        "label": "Input Moderation",
431
                        "description": "Detect text that could generate harmful output and prevent it from being sent to the language model",
432
                        "name": "inputModeration",
433
                        "type": "Moderation",
434
                        "optional": true,
435
                        "list": true,
436
                        "id": "openAIToolAgent_0-input-inputModeration-Moderation"
437
                    }
438
                ],
439
                "inputs": {
440
                    "tools": ["{{customTool_0.data.instance}}", "{{serper_0.data.instance}}", "{{calculator_0.data.instance}}"],
441
                    "memory": "{{bufferMemory_0.data.instance}}",
442
                    "model": "{{chatOpenAI_0.data.instance}}",
443
                    "systemMessage": "",
444
                    "inputModeration": ""
445
                },
446
                "outputAnchors": [
447
                    {
448
                        "id": "openAIToolAgent_0-output-openAIToolAgent-AgentExecutor|BaseChain|Runnable",
449
                        "name": "openAIToolAgent",
450
                        "label": "AgentExecutor",
451
                        "description": "Agent that uses OpenAI Function Calling to pick the tools and args to call",
452
                        "type": "AgentExecutor | BaseChain | Runnable"
453
                    }
454
                ],
455
                "outputs": {},
456
                "selected": false
457
            },
458
            "width": 300,
459
            "height": 433,
460
            "selected": false,
461
            "positionAbsolute": {
462
                "x": 1248.5254972140808,
463
                "y": 343.77259824664554
464
            },
465
            "dragging": false
466
        }
467
    ],
468
    "edges": [
469
        {
470
            "source": "customTool_0",
471
            "sourceHandle": "customTool_0-output-customTool-CustomTool|Tool|StructuredTool",
472
            "target": "openAIToolAgent_0",
473
            "targetHandle": "openAIToolAgent_0-input-tools-Tool",
474
            "type": "buttonedge",
475
            "id": "customTool_0-customTool_0-output-customTool-CustomTool|Tool|StructuredTool-openAIToolAgent_0-openAIToolAgent_0-input-tools-Tool"
476
        },
477
        {
478
            "source": "serper_0",
479
            "sourceHandle": "serper_0-output-serper-Serper|Tool|StructuredTool",
480
            "target": "openAIToolAgent_0",
481
            "targetHandle": "openAIToolAgent_0-input-tools-Tool",
482
            "type": "buttonedge",
483
            "id": "serper_0-serper_0-output-serper-Serper|Tool|StructuredTool-openAIToolAgent_0-openAIToolAgent_0-input-tools-Tool"
484
        },
485
        {
486
            "source": "calculator_0",
487
            "sourceHandle": "calculator_0-output-calculator-Calculator|Tool|StructuredTool|BaseLangChain|Serializable",
488
            "target": "openAIToolAgent_0",
489
            "targetHandle": "openAIToolAgent_0-input-tools-Tool",
490
            "type": "buttonedge",
491
            "id": "calculator_0-calculator_0-output-calculator-Calculator|Tool|StructuredTool|BaseLangChain|Serializable-openAIToolAgent_0-openAIToolAgent_0-input-tools-Tool"
492
        },
493
        {
494
            "source": "bufferMemory_0",
495
            "sourceHandle": "bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory",
496
            "target": "openAIToolAgent_0",
497
            "targetHandle": "openAIToolAgent_0-input-memory-BaseChatMemory",
498
            "type": "buttonedge",
499
            "id": "bufferMemory_0-bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory-openAIToolAgent_0-openAIToolAgent_0-input-memory-BaseChatMemory"
500
        },
501
        {
502
            "source": "chatOpenAI_0",
503
            "sourceHandle": "chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel",
504
            "target": "openAIToolAgent_0",
505
            "targetHandle": "openAIToolAgent_0-input-model-BaseChatModel",
506
            "type": "buttonedge",
507
            "id": "chatOpenAI_0-chatOpenAI_0-output-chatOpenAI-ChatOpenAI|BaseChatModel|BaseLanguageModel-openAIToolAgent_0-openAIToolAgent_0-input-model-BaseChatModel"
508
        }
509
    ]
510
}
511

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

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

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

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