-
Notifications
You must be signed in to change notification settings - Fork 64
/
Buffer Memory.json
428 lines (428 loc) · 20.9 KB
/
Buffer Memory.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
{
"description": "A Chain that uses a ConversationBufferMemory",
"name": "Buffer Memory",
"id": "11",
"data": {
"nodes": [
{
"width": 384,
"height": 357,
"id": "dndnode_48",
"type": "genericNode",
"position": {
"x": 739.8999754662251,
"y": 334.3621287703047
},
"data": {
"type": "ConversationBufferMemory",
"node": {
"template": {
"chat_memory": {
"required": false,
"placeholder": "",
"show": false,
"multiline": false,
"password": false,
"name": "chat_memory",
"type": "BaseChatMessageHistory",
"list": false
},
"output_key": {
"required": false,
"placeholder": "",
"show": false,
"multiline": false,
"password": false,
"name": "output_key",
"type": "str",
"list": false
},
"input_key": {
"required": false,
"placeholder": "",
"show": false,
"multiline": false,
"password": false,
"name": "input_key",
"type": "str",
"list": false
},
"return_messages": {
"required": false,
"placeholder": "",
"show": false,
"multiline": false,
"password": false,
"name": "return_messages",
"type": "bool",
"list": false
},
"human_prefix": {
"required": false,
"placeholder": "",
"show": false,
"multiline": false,
"value": "Human",
"password": false,
"name": "human_prefix",
"type": "str",
"list": false
},
"ai_prefix": {
"required": false,
"placeholder": "",
"show": false,
"multiline": false,
"value": "AI",
"password": false,
"name": "ai_prefix",
"type": "str",
"list": false
},
"memory_key": {
"required": false,
"placeholder": "",
"show": true,
"multiline": false,
"value": "history",
"password": false,
"name": "memory_key",
"type": "str",
"list": false
},
"_type": "ConversationBufferMemory"
},
"description": "Buffer for storing conversation memory.",
"base_classes": [
"BaseMemory",
"BaseChatMemory",
"ConversationBufferMemory"
]
},
"id": "dndnode_48",
"value": null
},
"selected": false,
"positionAbsolute": {
"x": 739.8999754662251,
"y": 334.3621287703047
},
"dragging": false
},
{
"width": 384,
"height": 583,
"id": "dndnode_49",
"type": "genericNode",
"position": {
"x": 1317.4708385246151,
"y": 420.2709706653311
},
"data": {
"type": "ConversationChain",
"node": {
"template": {
"memory": {
"required": false,
"placeholder": "",
"show": true,
"multiline": false,
"password": false,
"name": "memory",
"type": "BaseMemory",
"list": false
},
"verbose": {
"required": false,
"placeholder": "",
"show": false,
"multiline": false,
"password": false,
"name": "verbose",
"type": "bool",
"list": false
},
"prompt": {
"required": false,
"placeholder": "",
"show": true,
"multiline": false,
"value": {
"input_variables": [
"history",
"input"
],
"output_parser": null,
"partial_variables": {},
"template": "The following is a friendly conversation between a human and an AI. The AI is talkative and provides lots of specific details from its context. If the AI does not know the answer to a question, it truthfully says it does not know.\n\nCurrent conversation:\n{history}\nHuman: {input}\nAI:",
"template_format": "f-string",
"validate_template": true,
"_type": "prompt"
},
"password": false,
"name": "prompt",
"type": "BasePromptTemplate",
"list": false
},
"llm": {
"required": true,
"placeholder": "",
"show": true,
"multiline": false,
"password": false,
"name": "llm",
"type": "BaseLanguageModel",
"list": false
},
"output_key": {
"required": true,
"placeholder": "",
"show": true,
"multiline": false,
"value": "response",
"password": false,
"name": "output_key",
"type": "str",
"list": false
},
"input_key": {
"required": true,
"placeholder": "",
"show": true,
"multiline": false,
"value": "input",
"password": false,
"name": "input_key",
"type": "str",
"list": false
},
"_type": "ConversationChain"
},
"description": "Chain to have a conversation and load context from memory.",
"base_classes": [
"LLMChain",
"Chain",
"ConversationChain"
]
},
"id": "dndnode_49",
"value": null
},
"selected": true,
"positionAbsolute": {
"x": 1317.4708385246151,
"y": 420.2709706653311
},
"dragging": false
},
{
"width": 384,
"height": 673,
"id": "dndnode_50",
"type": "genericNode",
"position": {
"x": 735.8178700857987,
"y": 706.9245756642823
},
"data": {
"type": "ChatOpenAI",
"node": {
"template": {
"verbose": {
"required": false,
"placeholder": "",
"show": false,
"multiline": false,
"value": false,
"password": false,
"name": "verbose",
"type": "bool",
"list": false
},
"client": {
"required": false,
"placeholder": "",
"show": false,
"multiline": false,
"password": false,
"name": "client",
"type": "Any",
"list": false
},
"model_name": {
"required": false,
"placeholder": "",
"show": true,
"multiline": false,
"value": "gpt-4",
"password": false,
"options": [
"gpt-3.5-turbo",
"gpt-4",
"gpt-4-32k"
],
"name": "model_name",
"type": "str",
"list": true
},
"temperature": {
"required": false,
"placeholder": "",
"show": true,
"multiline": false,
"value": 0.7,
"password": false,
"name": "temperature",
"type": "float",
"list": false
},
"model_kwargs": {
"required": false,
"placeholder": "",
"show": true,
"multiline": false,
"password": false,
"name": "model_kwargs",
"type": "code",
"list": false
},
"openai_api_key": {
"required": true,
"placeholder": "",
"show": true,
"multiline": false,
"value": "",
"password": true,
"name": "openai_api_key",
"display_name": "OpenAI API Key",
"type": "str",
"list": false
},
"request_timeout": {
"required": false,
"placeholder": "",
"show": false,
"multiline": false,
"value": 60,
"password": false,
"name": "request_timeout",
"type": "int",
"list": false
},
"max_retries": {
"required": false,
"placeholder": "",
"show": false,
"multiline": false,
"value": 6,
"password": false,
"name": "max_retries",
"type": "int",
"list": false
},
"streaming": {
"required": false,
"placeholder": "",
"show": false,
"multiline": false,
"value": false,
"password": false,
"name": "streaming",
"type": "bool",
"list": false
},
"n": {
"required": false,
"placeholder": "",
"show": false,
"multiline": false,
"value": 1,
"password": false,
"name": "n",
"type": "int",
"list": false
},
"max_tokens": {
"required": false,
"placeholder": "",
"show": true,
"multiline": false,
"password": true,
"name": "max_tokens",
"type": "int",
"list": false
},
"_type": "ChatOpenAI"
},
"description": "Wrapper around OpenAI Chat large language models.",
"base_classes": [
"BaseChatModel",
"ChatOpenAI",
"BaseLanguageModel"
]
},
"id": "dndnode_50",
"value": null
},
"selected": false,
"positionAbsolute": {
"x": 735.8178700857987,
"y": 706.9245756642823
},
"dragging": false
}
],
"edges": [
{
"source": "dndnode_48",
"sourceHandle": "ConversationBufferMemory|dndnode_48|BaseMemory|BaseChatMemory|ConversationBufferMemory",
"target": "dndnode_49",
"targetHandle": "BaseMemory|memory|dndnode_49",
"className": "animate-pulse",
"id": "reactflow__edge-dndnode_48ConversationBufferMemory|dndnode_48|BaseMemory|BaseChatMemory|ConversationBufferMemory-dndnode_49BaseMemory|memory|dndnode_49"
},
{
"source": "dndnode_50",
"sourceHandle": "ChatOpenAI|dndnode_50|BaseChatModel|ChatOpenAI|BaseLanguageModel",
"target": "dndnode_49",
"targetHandle": "BaseLanguageModel|llm|dndnode_49",
"className": "animate-pulse",
"id": "reactflow__edge-dndnode_50ChatOpenAI|dndnode_50|BaseChatModel|ChatOpenAI|BaseLanguageModel-dndnode_49BaseLanguageModel|llm|dndnode_49"
}
],
"viewport": {
"x": -294.08439029367605,
"y": -256.0234975229553,
"zoom": 0.8235910172675734
}
},
"chat": [
{
"message": "Hi there, my name is Charlie.",
"isSend": true
},
{
"message": "Hello Charlie! It's nice to meet you. I'm an AI trained to assist and chat with people. How can I help you today?",
"isSend": false,
"thought": "\u001b[1m> Entering new ConversationChain chain...\u001b[0m\nPrompt after formatting:\n\u001b[32;1m\u001b[1;3mThe following is a friendly conversation between a human and an AI. The AI is talkative and provides lots of specific details from its context. If the AI does not know the answer to a question, it truthfully says it does not know.\n\nCurrent conversation:\n\nHuman: Hi there, my name is Charlie.\nAI:\u001b[0m\n\n\u001b[1m> Finished chain.\u001b[0m"
},
{
"message": "I'm doing well! Just having a conversation with an AI.",
"isSend": true
},
{
"message": "That's great to hear! It's always a pleasure to engage in conversation with new people. What topic would you like to discuss, or is there anything in particular you're curious about?",
"isSend": false,
"thought": "\u001b[1m> Entering new ConversationChain chain...\u001b[0m\nPrompt after formatting:\n\u001b[32;1m\u001b[1;3mThe following is a friendly conversation between a human and an AI. The AI is talkative and provides lots of specific details from its context. If the AI does not know the answer to a question, it truthfully says it does not know.\n\nCurrent conversation:\nHuman: Hi there, my name is Charlie.\nAI: Hello Charlie! It's nice to meet you. I'm an AI trained to assist and chat with people. How can I help you today?\nHuman: I'm doing well! Just having a conversation with an AI.\nAI:\u001b[0m\n\n\u001b[1m> Finished chain.\u001b[0m"
},
{
"message": "Tell me about yourself",
"isSend": true
},
{
"message": "I am an artificial intelligence program designed to interact and assist people with various tasks and topics. I am constantly learning and improving my knowledge base through the conversations I have and the information I am exposed to. My main goal is to provide assistance and engage in meaningful conversations with users like yourself. I can help answer questions, provide recommendations, or simply chat about a wide range of topics. Feel free to ask me anything, and I'll do my best to help!",
"isSend": false,
"thought": "\u001b[1m> Entering new ConversationChain chain...\u001b[0m\nPrompt after formatting:\n\u001b[32;1m\u001b[1;3mThe following is a friendly conversation between a human and an AI. The AI is talkative and provides lots of specific details from its context. If the AI does not know the answer to a question, it truthfully says it does not know.\n\nCurrent conversation:\nHuman: Hi there, my name is Charlie.\nAI: Hello Charlie! It's nice to meet you. I'm an AI trained to assist and chat with people. How can I help you today?\nHuman: I'm doing well! Just having a conversation with an AI.\nAI: That's great to hear! It's always a pleasure to engage in conversation with new people. What topic would you like to discuss, or is there anything in particular you're curious about?\nHuman: Tell me about yourself\nAI:\u001b[0m\n\n\u001b[1m> Finished chain.\u001b[0m"
}
]
}