forked from CyberTimon/Powerpointer-For-Local-LLMs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprompts.py
More file actions
67 lines (57 loc) · 1.72 KB
/
prompts.py
File metadata and controls
67 lines (57 loc) · 1.72 KB
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
def make_prompt(prompt, slide_count, additional_info, model_type):
if slide_count:
slide_count = f"It MUST have exactly {slide_count} slides/contents!!"
else:
slide_count = "At least 8 slides/contents."
if additional_info:
additional_info = f"Also notice this for the presentation:\n{additional_info}"
if model_type == "vicuna":
prefix = "USER:"
suffix = "ASSISTANT:"
elif model_type == "alpaca":
prefix = "### Instruction:"
suffix = "### Response:"
elif model_type == "chatml":
prefix = "<|im_start|>user\n"
suffix = "<|im_end|>\n<|im_start|>assistant\n"
elif model_type == "llama2chat":
prefix = "[INST] "
suffix = " [/INST]"
else:
prefix = "### Instruction:"
suffix = "### Response:"
main_prompt = f"""{prefix} Write a presentation text about {prompt}. You only answer with finished presentation.
You must follow these:
-You write the texts no longer than 250 characters!
-You make very short titles!
-You make the presentation easy to understand.
-The presentation has a table of contents which maches the slide/content count.
-The presentation has a summary.
-You are not allowed to insert links/images.
-{slide_count}
{additional_info}
Example! - Stick to this formatting exactly!
```
Title: TITLE OF THE PRESENTATION
Slide: 1
Header: TABLE OF CONTENT
Content: 1. CONTENT OF THIS POWERPOINT
2. CONTENT OF THIS POWERPOINT
3. CONTENT OF THIS POWERPOINT
...
Slide: 2
Header: TITLE OF SLIDE
Content: CONTENT OF THE SLIDE
Slide: 3
Header: TITLE OF SLIDE
Content: CONTENT OF THE SLIDE
...
Slide: X
Headers: SUMMARY
Content: CONTENT OF THE SUMMARY
Slide: END
```
{suffix}
```
Title:"""
return main_prompt