jadechoghari commited on
Commit
d554d74
1 Parent(s): 7ddba36

Create conversation.py

Browse files
Files changed (1) hide show
  1. conversation.py +526 -0
conversation.py ADDED
@@ -0,0 +1,526 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import dataclasses
2
+ from enum import auto, Enum
3
+ from typing import List, Tuple
4
+ import base64
5
+ from io import BytesIO
6
+ from PIL import Image
7
+
8
+ VOCAB_IMAGE_W = 1000 # 224
9
+ VOCAB_IMAGE_H = 1000 # 224
10
+
11
+
12
+ class SeparatorStyle(Enum):
13
+ """Different separator style."""
14
+ SINGLE = auto()
15
+ TWO = auto()
16
+ MPT = auto()
17
+ PLAIN = auto()
18
+ LLAMA_2 = auto()
19
+ GEMMA = auto()
20
+
21
+
22
+ @dataclasses.dataclass
23
+ class Conversation:
24
+ """A class that keeps all conversation history."""
25
+ system: str
26
+ roles: List[str]
27
+ messages: List[List[str]]
28
+ offset: int
29
+ sep_style: SeparatorStyle = SeparatorStyle.SINGLE
30
+ sep: str = "###"
31
+ sep2: str = None
32
+ version: str = "Unknown"
33
+
34
+ skip_next: bool = False
35
+
36
+ def get_prompt(self):
37
+ messages = self.messages
38
+ if len(messages) > 0 and type(messages[0][1]) is tuple:
39
+ messages = self.messages.copy()
40
+ init_role, init_msg = messages[0].copy()
41
+ init_msg = init_msg[0].replace("<image>", "").strip()
42
+ if 'mmtag' in self.version:
43
+ messages[0] = (init_role, init_msg)
44
+ messages.insert(0, (self.roles[0], "<Image><image></Image>"))
45
+ messages.insert(1, (self.roles[1], "Received."))
46
+ else:
47
+ messages[0] = (init_role, "<image>\n" + init_msg)
48
+
49
+ if self.sep_style == SeparatorStyle.SINGLE:
50
+ ret = self.system + self.sep
51
+ for role, message in messages:
52
+ if message:
53
+ if type(message) is tuple:
54
+ message, _, _ = message
55
+ ret += role + ": " + message + self.sep
56
+ else:
57
+ ret += role + ":"
58
+ elif self.sep_style == SeparatorStyle.TWO:
59
+ seps = [self.sep, self.sep2]
60
+ ret = self.system + seps[0]
61
+ for i, (role, message) in enumerate(messages):
62
+ if message:
63
+ if type(message) is tuple:
64
+ message, _, _ = message
65
+ ret += role + ": " + message + seps[i % 2]
66
+ else:
67
+ ret += role + ":"
68
+ elif self.sep_style == SeparatorStyle.MPT:
69
+ ret = self.system + self.sep
70
+ for role, message in messages:
71
+ if message:
72
+ if type(message) is tuple:
73
+ message, _, _ = message
74
+ ret += role + message + self.sep
75
+ else:
76
+ ret += role
77
+ elif self.sep_style == SeparatorStyle.LLAMA_2:
78
+ wrap_sys = lambda msg: f"<<SYS>>\n{msg}\n<</SYS>>\n\n" if len(msg) > 0 else msg
79
+ wrap_inst = lambda msg: f"[INST] {msg} [/INST]"
80
+ ret = ""
81
+
82
+ for i, (role, message) in enumerate(messages):
83
+ if i == 0:
84
+ assert message, "first message should not be none"
85
+ assert role == self.roles[0], "first message should come from user"
86
+ if message:
87
+ if type(message) is tuple:
88
+ message, _, _ = message
89
+ if i == 0: message = wrap_sys(self.system) + message
90
+ if i % 2 == 0:
91
+ message = wrap_inst(message)
92
+ ret += self.sep + message
93
+ else:
94
+ ret += " " + message + " " + self.sep2
95
+ else:
96
+ ret += ""
97
+ ret = ret.lstrip(self.sep)
98
+ elif self.sep_style == SeparatorStyle.GEMMA:
99
+ seps = [self.sep, self.sep2]
100
+ ret = self.system + seps[0]
101
+ for i, (role, message) in enumerate(messages):
102
+ if message:
103
+ if type(message) is tuple:
104
+ message, _, _ = message
105
+ ret += "<start_of_turn>" + role + "\n" + message + "<end_of_turn>\n" + seps[i % 2]
106
+ else:
107
+ ret += "<start_of_turn>" + role + "\n"
108
+ elif self.sep_style == SeparatorStyle.PLAIN:
109
+ seps = [self.sep, self.sep2]
110
+ ret = self.system
111
+ for i, (role, message) in enumerate(messages):
112
+ if message:
113
+ if type(message) is tuple:
114
+ message, _, _ = message
115
+ ret += message + seps[i % 2]
116
+ else:
117
+ ret += ""
118
+ else:
119
+ raise ValueError(f"Invalid style: {self.sep_style}")
120
+
121
+ return ret
122
+
123
+ def append_message(self, role, message):
124
+ self.messages.append([role, message])
125
+
126
+ def get_images(self, return_pil=False):
127
+ images = []
128
+ for i, (role, msg) in enumerate(self.messages[self.offset:]):
129
+ if i % 2 == 0:
130
+ if type(msg) is tuple:
131
+ import base64
132
+ from io import BytesIO
133
+ from PIL import Image
134
+ msg, image, image_process_mode = msg
135
+ if image_process_mode == "Pad":
136
+ def expand2square(pil_img, background_color=(122, 116, 104)):
137
+ width, height = pil_img.size
138
+ if width == height:
139
+ return pil_img
140
+ elif width > height:
141
+ result = Image.new(pil_img.mode, (width, width), background_color)
142
+ result.paste(pil_img, (0, (width - height) // 2))
143
+ return result
144
+ else:
145
+ result = Image.new(pil_img.mode, (height, height), background_color)
146
+ result.paste(pil_img, ((height - width) // 2, 0))
147
+ return result
148
+ image = expand2square(image)
149
+ elif image_process_mode in ["Default", "Crop"]:
150
+ pass
151
+ elif image_process_mode == "Raw+Processor":
152
+ pass
153
+ elif image_process_mode == "Resize":
154
+ image = image.resize((336, 336))
155
+ else:
156
+ raise ValueError(f"Invalid image_process_mode: {image_process_mode}")
157
+
158
+ if image_process_mode != "Raw+Processor":
159
+ max_hw, min_hw = max(image.size), min(image.size)
160
+ aspect_ratio = max_hw / min_hw
161
+ max_len, min_len = 800, 400
162
+ shortest_edge = int(min(max_len / aspect_ratio, min_len, min_hw))
163
+ longest_edge = int(shortest_edge * aspect_ratio)
164
+ W, H = image.size
165
+ if H > W:
166
+ H, W = longest_edge, shortest_edge
167
+ else:
168
+ H, W = shortest_edge, longest_edge
169
+ image = image.resize((W, H))
170
+ print('Input Image Size:{}'.format(image.size))
171
+
172
+ if return_pil:
173
+ images.append(image)
174
+ else:
175
+ buffered = BytesIO()
176
+ image.save(buffered, format="PNG")
177
+ img_b64_str = base64.b64encode(buffered.getvalue()).decode()
178
+ images.append(img_b64_str)
179
+ return images
180
+
181
+ def to_gradio_chatbot(self):
182
+ ret = []
183
+ for i, (role, msg) in enumerate(self.messages[self.offset:]):
184
+ if i % 2 == 0:
185
+ if type(msg) is tuple:
186
+ import base64
187
+ from io import BytesIO
188
+ msg, image, image_process_mode = msg
189
+ if image_process_mode != "Raw+Processor":
190
+ max_hw, min_hw = max(image.size), min(image.size)
191
+ aspect_ratio = max_hw / min_hw
192
+ max_len, min_len = 800, 400
193
+ shortest_edge = int(min(max_len / aspect_ratio, min_len, min_hw))
194
+ longest_edge = int(shortest_edge * aspect_ratio)
195
+ W, H = image.size
196
+ if H > W:
197
+ H, W = longest_edge, shortest_edge
198
+ else:
199
+ H, W = shortest_edge, longest_edge
200
+ image = image.resize((W, H))
201
+ buffered = BytesIO()
202
+ image.save(buffered, format="JPEG")
203
+ img_b64_str = base64.b64encode(buffered.getvalue()).decode()
204
+ img_str = f'<img src="data:image/png;base64,{img_b64_str}" alt="user upload image" />'
205
+ ret.append([img_str, None])
206
+ msg = msg.replace('<image>', '').strip()
207
+ if len(msg) > 0:
208
+ ret.append([msg, None])
209
+ else:
210
+ ret.append([msg, None])
211
+ else:
212
+ ret[-1][-1] = msg
213
+ return ret
214
+
215
+ def copy(self):
216
+ return Conversation(
217
+ system=self.system,
218
+ roles=self.roles,
219
+ messages=[[x, y] for x, y in self.messages],
220
+ offset=self.offset,
221
+ sep_style=self.sep_style,
222
+ sep=self.sep,
223
+ sep2=self.sep2,
224
+ version=self.version)
225
+
226
+ def dict(self):
227
+ if len(self.get_images()) > 0:
228
+ return {
229
+ "system": self.system,
230
+ "roles": self.roles,
231
+ "messages": [[x, y[0] if type(y) is tuple else y] for x, y in self.messages],
232
+ "offset": self.offset,
233
+ "sep": self.sep,
234
+ "sep2": self.sep2,
235
+ }
236
+ return {
237
+ "system": self.system,
238
+ "roles": self.roles,
239
+ "messages": self.messages,
240
+ "offset": self.offset,
241
+ "sep": self.sep,
242
+ "sep2": self.sep2,
243
+ }
244
+
245
+
246
+ conv_vicuna_v0 = Conversation(
247
+ system="A chat between a curious human and an artificial intelligence assistant. "
248
+ "The assistant gives helpful, detailed, and polite answers to the human's questions.",
249
+ roles=("Human", "Assistant"),
250
+ messages=(
251
+ ("Human", "What are the key differences between renewable and non-renewable energy sources?"),
252
+ ("Assistant",
253
+ "Renewable energy sources are those that can be replenished naturally in a relatively "
254
+ "short amount of time, such as solar, wind, hydro, geothermal, and biomass. "
255
+ "Non-renewable energy sources, on the other hand, are finite and will eventually be "
256
+ "depleted, such as coal, oil, and natural gas. Here are some key differences between "
257
+ "renewable and non-renewable energy sources:\n"
258
+ "1. Availability: Renewable energy sources are virtually inexhaustible, while non-renewable "
259
+ "energy sources are finite and will eventually run out.\n"
260
+ "2. Environmental impact: Renewable energy sources have a much lower environmental impact "
261
+ "than non-renewable sources, which can lead to air and water pollution, greenhouse gas emissions, "
262
+ "and other negative effects.\n"
263
+ "3. Cost: Renewable energy sources can be more expensive to initially set up, but they typically "
264
+ "have lower operational costs than non-renewable sources.\n"
265
+ "4. Reliability: Renewable energy sources are often more reliable and can be used in more remote "
266
+ "locations than non-renewable sources.\n"
267
+ "5. Flexibility: Renewable energy sources are often more flexible and can be adapted to different "
268
+ "situations and needs, while non-renewable sources are more rigid and inflexible.\n"
269
+ "6. Sustainability: Renewable energy sources are more sustainable over the long term, while "
270
+ "non-renewable sources are not, and their depletion can lead to economic and social instability.\n")
271
+ ),
272
+ offset=2,
273
+ sep_style=SeparatorStyle.SINGLE,
274
+ sep="###",
275
+ )
276
+
277
+ conv_vicuna_v1 = Conversation(
278
+ system="A chat between a curious user and an artificial intelligence assistant. "
279
+ "The assistant gives helpful, detailed, and polite answers to the user's questions.",
280
+ roles=("USER", "ASSISTANT"),
281
+ version="v1",
282
+ messages=(),
283
+ offset=0,
284
+ sep_style=SeparatorStyle.TWO,
285
+ sep=" ",
286
+ sep2="</s>",
287
+ )
288
+
289
+ conv_llama_2 = Conversation(
290
+ system="""You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature.
291
+
292
+ If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.""",
293
+ roles=("USER", "ASSISTANT"),
294
+ version="llama_v2",
295
+ messages=(),
296
+ offset=0,
297
+ sep_style=SeparatorStyle.LLAMA_2,
298
+ sep="<s>",
299
+ sep2="</s>",
300
+ )
301
+
302
+ conv_llava_llama_2 = Conversation(
303
+ system="You are a helpful language and vision assistant. "
304
+ "You are able to understand the visual content that the user provides, "
305
+ "and assist the user with a variety of tasks using natural language.",
306
+ roles=("USER", "ASSISTANT"),
307
+ version="llama_v2",
308
+ messages=(),
309
+ offset=0,
310
+ sep_style=SeparatorStyle.LLAMA_2,
311
+ sep="<s>",
312
+ sep2="</s>",
313
+ )
314
+
315
+ conv_mpt = Conversation(
316
+ system="""<|im_start|>system
317
+ A conversation between a user and an LLM-based AI assistant. The assistant gives helpful and honest answers.""",
318
+ roles=("<|im_start|>user\n", "<|im_start|>assistant\n"),
319
+ version="mpt",
320
+ messages=(),
321
+ offset=0,
322
+ sep_style=SeparatorStyle.MPT,
323
+ sep="<|im_end|>",
324
+ )
325
+
326
+ conv_llava_plain = Conversation(
327
+ system="",
328
+ roles=("", ""),
329
+ messages=(
330
+ ),
331
+ offset=0,
332
+ sep_style=SeparatorStyle.PLAIN,
333
+ sep="\n",
334
+ )
335
+
336
+ conv_llava_v0 = Conversation(
337
+ system="A chat between a curious human and an artificial intelligence assistant. "
338
+ "The assistant gives helpful, detailed, and polite answers to the human's questions.",
339
+ roles=("Human", "Assistant"),
340
+ messages=(
341
+ ),
342
+ offset=0,
343
+ sep_style=SeparatorStyle.SINGLE,
344
+ sep="###",
345
+ )
346
+
347
+ conv_llava_v0_mmtag = Conversation(
348
+ system="A chat between a curious user and an artificial intelligence assistant. "
349
+ "The assistant is able to understand the visual content that the user provides, and assist the user with a variety of tasks using natural language."
350
+ "The visual content will be provided with the following format: <Image>visual content</Image>.",
351
+ roles=("Human", "Assistant"),
352
+ messages=(
353
+ ),
354
+ offset=0,
355
+ sep_style=SeparatorStyle.SINGLE,
356
+ sep="###",
357
+ version="v0_mmtag",
358
+ )
359
+
360
+ conv_llava_v1 = Conversation(
361
+ system="A chat between a curious human and an artificial intelligence assistant. "
362
+ "The assistant gives helpful, detailed, and polite answers to the human's questions.",
363
+ roles=("USER", "ASSISTANT"),
364
+ version="v1",
365
+ messages=(),
366
+ offset=0,
367
+ sep_style=SeparatorStyle.TWO,
368
+ sep=" ",
369
+ sep2="</s>",
370
+ )
371
+
372
+ conv_llava_v1_mmtag = Conversation(
373
+ system="A chat between a curious user and an artificial intelligence assistant. "
374
+ "The assistant is able to understand the visual content that the user provides, and assist the user with a variety of tasks using natural language."
375
+ "The visual content will be provided with the following format: <Image>visual content</Image>.",
376
+ roles=("USER", "ASSISTANT"),
377
+ messages=(),
378
+ offset=0,
379
+ sep_style=SeparatorStyle.TWO,
380
+ sep=" ",
381
+ sep2="</s>",
382
+ version="v1_mmtag",
383
+ )
384
+
385
+ conv_mistral_instruct = Conversation(
386
+ system="",
387
+ roles=("USER", "ASSISTANT"),
388
+ version="llama_v2",
389
+ messages=(),
390
+ offset=0,
391
+ sep_style=SeparatorStyle.LLAMA_2,
392
+ sep="",
393
+ sep2="</s>",
394
+ )
395
+
396
+ conv_chatml_direct = Conversation(
397
+ system="""<|im_start|>system
398
+ Answer the questions.""",
399
+ roles=("<|im_start|>user\n", "<|im_start|>assistant\n"),
400
+ version="mpt",
401
+ messages=(),
402
+ offset=0,
403
+ sep_style=SeparatorStyle.MPT,
404
+ sep="<|im_end|>",
405
+ )
406
+
407
+ conv_llava_llama_3 = Conversation(
408
+ system="<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\nYou are a helpful language and vision assistant. You are able to understand the visual content that the user provides, and assist the user with a variety of tasks using natural language.",
409
+ roles=("<|start_header_id|>user<|end_header_id|>\n\n",
410
+ "<|start_header_id|>assistant<|end_header_id|>\n\n"),
411
+ version="llama3",
412
+ messages=[],
413
+ offset=0,
414
+ sep_style=SeparatorStyle.MPT,
415
+ sep="<|eot_id|>",
416
+ )
417
+
418
+ conv_ferret_llama_plain = Conversation(
419
+ system="",
420
+ roles=("", ""),
421
+ messages=(
422
+ ),
423
+ offset=0,
424
+ sep_style=SeparatorStyle.PLAIN,
425
+ sep="\n",
426
+ )
427
+
428
+ conv_ferret_vicuna_v1 = Conversation(
429
+ system="A chat between a human and an AI that understands visuals. "
430
+ "In images, [x, y] denotes points: top-left [0, 0], bottom-right [width-1, height-1]. "
431
+ "Increasing x moves right; y moves down. "
432
+ f"Bounding box: [x1, y1, x2, y2]. Image size: {VOCAB_IMAGE_W}x{VOCAB_IMAGE_H}. "
433
+ "Follow instructions.",
434
+ roles=("USER", "ASSISTANT"),
435
+ version="v1",
436
+ messages=(),
437
+ offset=0,
438
+ sep_style=SeparatorStyle.TWO,
439
+ sep=" ",
440
+ sep2="</s>",
441
+ )
442
+
443
+ conv_ferret_llama_3 = Conversation(
444
+ system="<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n\nA chat between a human and an AI that understands visuals. "
445
+ "In images, [x, y] denotes points: top-left [0, 0], bottom-right [width-1, height-1]. "
446
+ "Increasing x moves right; y moves down. "
447
+ f"Bounding box: [x1, y1, x2, y2]. Image size: {VOCAB_IMAGE_W}x{VOCAB_IMAGE_H}. "
448
+ "Follow instructions.",
449
+ roles=("<|start_header_id|>user<|end_header_id|>\n\n",
450
+ "<|start_header_id|>assistant<|end_header_id|>\n\n"),
451
+ version="llama3",
452
+ messages=[],
453
+ offset=0,
454
+ sep_style=SeparatorStyle.MPT,
455
+ sep="<|eot_id|>",
456
+ )
457
+
458
+ conv_ferret_gemma_plain = Conversation(
459
+ system="",
460
+ roles=("user", "model"),
461
+ version="gemma",
462
+ messages=(),
463
+ offset=0,
464
+ sep_style=SeparatorStyle.GEMMA,
465
+ sep="",
466
+ sep2="<eos>",
467
+ )
468
+
469
+ conv_ferret_gemma_instruct = Conversation(
470
+ system="A chat between a human and an AI that understands visuals. "
471
+ "In images, [x, y] denotes points: top-left [0, 0], bottom-right [width-1, height-1]. "
472
+ "Increasing x moves right; y moves down. "
473
+ f"Bounding box: [x1, y1, x2, y2]. Image size: {VOCAB_IMAGE_W}x{VOCAB_IMAGE_H}. "
474
+ "Follow instructions.",
475
+ roles=("user", "model"),
476
+ version="gemma",
477
+ messages=(),
478
+ offset=0,
479
+ sep_style=SeparatorStyle.GEMMA,
480
+ sep="",
481
+ sep2="<eos>",
482
+ )
483
+
484
+ conv_ferret_phi3_instruct = Conversation(
485
+ system="""<|system|>\nYou are a helpful AI assistant.""",
486
+ roles=("\n<|user|>\n", "\n<|assistant|>\n"),
487
+ version="phi3",
488
+ messages=(),
489
+ offset=0,
490
+ sep_style=SeparatorStyle.MPT,
491
+ sep="<|end|>",
492
+ )
493
+
494
+ default_conversation = conv_vicuna_v1
495
+ conv_templates = {
496
+ "default": conv_vicuna_v0,
497
+ "v0": conv_vicuna_v0,
498
+ "v1": conv_vicuna_v1,
499
+ "vicuna_v1": conv_vicuna_v1,
500
+ "llama_2": conv_llama_2,
501
+ "mistral_instruct": conv_mistral_instruct,
502
+ "chatml_direct": conv_chatml_direct,
503
+ "mistral_direct": conv_chatml_direct,
504
+
505
+ "plain": conv_llava_plain,
506
+ "v0_plain": conv_llava_plain,
507
+ "llava_v0": conv_llava_v0,
508
+ "v0_mmtag": conv_llava_v0_mmtag,
509
+ "llava_v1": conv_llava_v1,
510
+ "v1_mmtag": conv_llava_v1_mmtag,
511
+ "llava_llama_2": conv_llava_llama_2,
512
+ "llava_llama_3": conv_llava_llama_3,
513
+
514
+ "ferret_llama_plain": conv_ferret_llama_plain,
515
+ "ferret_vicuna_v1": conv_ferret_vicuna_v1,
516
+ "ferret_llama_3": conv_ferret_llama_3,
517
+ "ferret_gemma_plain": conv_ferret_gemma_plain,
518
+ "ferret_gemma_instruct": conv_ferret_gemma_instruct,
519
+ "ferret_phi3_instruct": conv_ferret_phi3_instruct,
520
+
521
+ "mpt": conv_mpt,
522
+ }
523
+
524
+
525
+ if __name__ == "__main__":
526
+ print(default_conversation.get_prompt())