Flowise

Форк
0
/
Simple Chat Engine.json 
258 строк · 10.4 Кб
1
{
2
    "description": "Simple chat engine to handle back and forth conversations using LlamaIndex",
3
    "categories": "BufferMemory,AzureChatOpenAI,LlamaIndex",
4
    "framework": "LlamaIndex",
5
    "badge": "NEW",
6
    "nodes": [
7
        {
8
            "width": 300,
9
            "height": 462,
10
            "id": "simpleChatEngine_0",
11
            "position": {
12
                "x": 1210.127368000538,
13
                "y": 324.98110560103896
14
            },
15
            "type": "customNode",
16
            "data": {
17
                "id": "simpleChatEngine_0",
18
                "label": "Simple Chat Engine",
19
                "version": 1,
20
                "name": "simpleChatEngine",
21
                "type": "SimpleChatEngine",
22
                "baseClasses": ["SimpleChatEngine"],
23
                "tags": ["LlamaIndex"],
24
                "category": "Engine",
25
                "description": "Simple engine to handle back and forth conversations",
26
                "inputParams": [
27
                    {
28
                        "label": "System Message",
29
                        "name": "systemMessagePrompt",
30
                        "type": "string",
31
                        "rows": 4,
32
                        "optional": true,
33
                        "placeholder": "You are a helpful assistant",
34
                        "id": "simpleChatEngine_0-input-systemMessagePrompt-string"
35
                    }
36
                ],
37
                "inputAnchors": [
38
                    {
39
                        "label": "Chat Model",
40
                        "name": "model",
41
                        "type": "BaseChatModel_LlamaIndex",
42
                        "id": "simpleChatEngine_0-input-model-BaseChatModel_LlamaIndex"
43
                    },
44
                    {
45
                        "label": "Memory",
46
                        "name": "memory",
47
                        "type": "BaseChatMemory",
48
                        "id": "simpleChatEngine_0-input-memory-BaseChatMemory"
49
                    }
50
                ],
51
                "inputs": {
52
                    "model": "{{azureChatOpenAI_LlamaIndex_0.data.instance}}",
53
                    "memory": "{{bufferMemory_0.data.instance}}",
54
                    "systemMessagePrompt": "You are a helpful assistant."
55
                },
56
                "outputAnchors": [
57
                    {
58
                        "id": "simpleChatEngine_0-output-simpleChatEngine-SimpleChatEngine",
59
                        "name": "simpleChatEngine",
60
                        "label": "SimpleChatEngine",
61
                        "type": "SimpleChatEngine"
62
                    }
63
                ],
64
                "outputs": {},
65
                "selected": false
66
            },
67
            "selected": false,
68
            "dragging": false,
69
            "positionAbsolute": {
70
                "x": 1210.127368000538,
71
                "y": 324.98110560103896
72
            }
73
        },
74
        {
75
            "width": 300,
76
            "height": 376,
77
            "id": "bufferMemory_0",
78
            "position": {
79
                "x": 393.9823478014782,
80
                "y": 415.7414943210391
81
            },
82
            "type": "customNode",
83
            "data": {
84
                "id": "bufferMemory_0",
85
                "label": "Buffer Memory",
86
                "version": 2,
87
                "name": "bufferMemory",
88
                "type": "BufferMemory",
89
                "baseClasses": ["BufferMemory", "BaseChatMemory", "BaseMemory"],
90
                "category": "Memory",
91
                "description": "Retrieve chat messages stored in database",
92
                "inputParams": [
93
                    {
94
                        "label": "Session Id",
95
                        "name": "sessionId",
96
                        "type": "string",
97
                        "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>",
98
                        "default": "",
99
                        "additionalParams": true,
100
                        "optional": true,
101
                        "id": "bufferMemory_0-input-sessionId-string"
102
                    },
103
                    {
104
                        "label": "Memory Key",
105
                        "name": "memoryKey",
106
                        "type": "string",
107
                        "default": "chat_history",
108
                        "additionalParams": true,
109
                        "id": "bufferMemory_0-input-memoryKey-string"
110
                    }
111
                ],
112
                "inputAnchors": [],
113
                "inputs": {
114
                    "sessionId": "",
115
                    "memoryKey": "chat_history"
116
                },
117
                "outputAnchors": [
118
                    {
119
                        "id": "bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory",
120
                        "name": "bufferMemory",
121
                        "label": "BufferMemory",
122
                        "type": "BufferMemory | BaseChatMemory | BaseMemory"
123
                    }
124
                ],
125
                "outputs": {},
126
                "selected": false
127
            },
128
            "selected": false,
129
            "positionAbsolute": {
130
                "x": 393.9823478014782,
131
                "y": 415.7414943210391
132
            },
133
            "dragging": false
134
        },
135
        {
136
            "width": 300,
137
            "height": 529,
138
            "id": "azureChatOpenAI_LlamaIndex_0",
139
            "position": {
140
                "x": 746.5530862509605,
141
                "y": -54.107978373323306
142
            },
143
            "type": "customNode",
144
            "data": {
145
                "id": "azureChatOpenAI_LlamaIndex_0",
146
                "label": "AzureChatOpenAI",
147
                "version": 2.0,
148
                "name": "azureChatOpenAI_LlamaIndex",
149
                "type": "AzureChatOpenAI",
150
                "baseClasses": ["AzureChatOpenAI", "BaseChatModel_LlamaIndex"],
151
                "tags": ["LlamaIndex"],
152
                "category": "Chat Models",
153
                "description": "Wrapper around Azure OpenAI Chat LLM specific for LlamaIndex",
154
                "inputParams": [
155
                    {
156
                        "label": "Connect Credential",
157
                        "name": "credential",
158
                        "type": "credential",
159
                        "credentialNames": ["azureOpenAIApi"],
160
                        "id": "azureChatOpenAI_LlamaIndex_0-input-credential-credential"
161
                    },
162
                    {
163
                        "label": "Model Name",
164
                        "name": "modelName",
165
                        "type": "asyncOptions",
166
                        "loadMethod": "listModels",
167
                        "default": "gpt-3.5-turbo-16k",
168
                        "id": "azureChatOpenAI_LlamaIndex_0-input-modelName-options"
169
                    },
170
                    {
171
                        "label": "Temperature",
172
                        "name": "temperature",
173
                        "type": "number",
174
                        "step": 0.1,
175
                        "default": 0.9,
176
                        "optional": true,
177
                        "id": "azureChatOpenAI_LlamaIndex_0-input-temperature-number"
178
                    },
179
                    {
180
                        "label": "Max Tokens",
181
                        "name": "maxTokens",
182
                        "type": "number",
183
                        "step": 1,
184
                        "optional": true,
185
                        "additionalParams": true,
186
                        "id": "azureChatOpenAI_LlamaIndex_0-input-maxTokens-number"
187
                    },
188
                    {
189
                        "label": "Top Probability",
190
                        "name": "topP",
191
                        "type": "number",
192
                        "step": 0.1,
193
                        "optional": true,
194
                        "additionalParams": true,
195
                        "id": "azureChatOpenAI_LlamaIndex_0-input-topP-number"
196
                    },
197
                    {
198
                        "label": "Timeout",
199
                        "name": "timeout",
200
                        "type": "number",
201
                        "step": 1,
202
                        "optional": true,
203
                        "additionalParams": true,
204
                        "id": "azureChatOpenAI_LlamaIndex_0-input-timeout-number"
205
                    }
206
                ],
207
                "inputAnchors": [],
208
                "inputs": {
209
                    "modelName": "gpt-3.5-turbo-16k",
210
                    "temperature": 0.9,
211
                    "maxTokens": "",
212
                    "topP": "",
213
                    "timeout": ""
214
                },
215
                "outputAnchors": [
216
                    {
217
                        "id": "azureChatOpenAI_LlamaIndex_0-output-azureChatOpenAI_LlamaIndex-AzureChatOpenAI|BaseChatModel_LlamaIndex",
218
                        "name": "azureChatOpenAI_LlamaIndex",
219
                        "label": "AzureChatOpenAI",
220
                        "type": "AzureChatOpenAI | BaseChatModel_LlamaIndex"
221
                    }
222
                ],
223
                "outputs": {},
224
                "selected": false
225
            },
226
            "selected": false,
227
            "positionAbsolute": {
228
                "x": 746.5530862509605,
229
                "y": -54.107978373323306
230
            },
231
            "dragging": false
232
        }
233
    ],
234
    "edges": [
235
        {
236
            "source": "bufferMemory_0",
237
            "sourceHandle": "bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory",
238
            "target": "simpleChatEngine_0",
239
            "targetHandle": "simpleChatEngine_0-input-memory-BaseChatMemory",
240
            "type": "buttonedge",
241
            "id": "bufferMemory_0-bufferMemory_0-output-bufferMemory-BufferMemory|BaseChatMemory|BaseMemory-simpleChatEngine_0-simpleChatEngine_0-input-memory-BaseChatMemory",
242
            "data": {
243
                "label": ""
244
            }
245
        },
246
        {
247
            "source": "azureChatOpenAI_LlamaIndex_0",
248
            "sourceHandle": "azureChatOpenAI_LlamaIndex_0-output-azureChatOpenAI_LlamaIndex-AzureChatOpenAI|BaseChatModel_LlamaIndex",
249
            "target": "simpleChatEngine_0",
250
            "targetHandle": "simpleChatEngine_0-input-model-BaseChatModel_LlamaIndex",
251
            "type": "buttonedge",
252
            "id": "azureChatOpenAI_LlamaIndex_0-azureChatOpenAI_LlamaIndex_0-output-azureChatOpenAI_LlamaIndex-AzureChatOpenAI|BaseChatModel_LlamaIndex-simpleChatEngine_0-simpleChatEngine_0-input-model-BaseChatModel_LlamaIndex",
253
            "data": {
254
                "label": ""
255
            }
256
        }
257
    ]
258
}
259

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

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

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

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