Spaces:
Running
Running
Merge pull request #95 from barun-saha/visual
Browse files- global_config.py +2 -3
- helpers/llm_helper.py +2 -2
- langchain_templates/chat_prompts/initial_template.txt +0 -41
- langchain_templates/chat_prompts/initial_template_v2_steps.txt +0 -59
- langchain_templates/chat_prompts/initial_template_v3_two_cols.txt +0 -78
- langchain_templates/chat_prompts/refinement_template.txt +0 -49
- langchain_templates/chat_prompts/refinement_template_v2_steps.txt +0 -70
- langchain_templates/chat_prompts/refinement_template_v3_two_cols.txt +0 -85
- langchain_templates/template_07.txt +0 -5
- langchain_templates/template_combined.txt +0 -41
- langchain_templates/text_to_json_template.txt +0 -38
- langchain_templates/text_to_json_template_02.txt +0 -40
- {langchain_templates/chat_prompts → prompts}/initial_template_v4_two_cols_img.txt +6 -4
- {langchain_templates/chat_prompts → prompts}/refinement_template_v4_two_cols_img.txt +6 -4
- requirements.txt +1 -1
global_config.py
CHANGED
@@ -92,9 +92,8 @@ class GlobalConfig:
|
|
92 |
COUNT_TOKENS = False
|
93 |
APP_STRINGS_FILE = 'strings.json'
|
94 |
PRELOAD_DATA_FILE = 'examples/example_02.json'
|
95 |
-
|
96 |
-
|
97 |
-
REFINEMENT_PROMPT_TEMPLATE = 'langchain_templates/chat_prompts/refinement_template_v4_two_cols_img.txt'
|
98 |
|
99 |
LLM_PROGRESS_MAX = 90
|
100 |
ICONS_DIR = 'icons/png128/'
|
|
|
92 |
COUNT_TOKENS = False
|
93 |
APP_STRINGS_FILE = 'strings.json'
|
94 |
PRELOAD_DATA_FILE = 'examples/example_02.json'
|
95 |
+
INITIAL_PROMPT_TEMPLATE = 'prompts/initial_template_v4_two_cols_img.txt'
|
96 |
+
REFINEMENT_PROMPT_TEMPLATE = 'prompts/refinement_template_v4_two_cols_img.txt'
|
|
|
97 |
|
98 |
LLM_PROGRESS_MAX = 90
|
99 |
ICONS_DIR = 'icons/png128/'
|
helpers/llm_helper.py
CHANGED
@@ -157,7 +157,7 @@ def get_langchain_llm(
|
|
157 |
return GoogleGenerativeAI(
|
158 |
model=model,
|
159 |
temperature=GlobalConfig.LLM_MODEL_TEMPERATURE,
|
160 |
-
max_tokens=max_new_tokens,
|
161 |
timeout=None,
|
162 |
max_retries=2,
|
163 |
google_api_key=api_key,
|
@@ -182,7 +182,7 @@ def get_langchain_llm(
|
|
182 |
api_version=azure_api_version,
|
183 |
azure_endpoint=azure_endpoint_url,
|
184 |
temperature=GlobalConfig.LLM_MODEL_TEMPERATURE,
|
185 |
-
max_tokens=max_new_tokens,
|
186 |
timeout=None,
|
187 |
max_retries=1,
|
188 |
api_key=api_key,
|
|
|
157 |
return GoogleGenerativeAI(
|
158 |
model=model,
|
159 |
temperature=GlobalConfig.LLM_MODEL_TEMPERATURE,
|
160 |
+
# max_tokens=max_new_tokens,
|
161 |
timeout=None,
|
162 |
max_retries=2,
|
163 |
google_api_key=api_key,
|
|
|
182 |
api_version=azure_api_version,
|
183 |
azure_endpoint=azure_endpoint_url,
|
184 |
temperature=GlobalConfig.LLM_MODEL_TEMPERATURE,
|
185 |
+
# max_tokens=max_new_tokens,
|
186 |
timeout=None,
|
187 |
max_retries=1,
|
188 |
api_key=api_key,
|
langchain_templates/chat_prompts/initial_template.txt
DELETED
@@ -1,41 +0,0 @@
|
|
1 |
-
You are a helpful, intelligent chatbot. Create the slides for a presentation on the given topic.
|
2 |
-
Include main headings for each slide, detailed bullet points for each slide.
|
3 |
-
Add relevant content to each slide.
|
4 |
-
The content of each slide should be verbose, descriptive, and very detailed.
|
5 |
-
If relevant, add one or two examples to illustrate the concept.
|
6 |
-
Unless explicitly specified with the topic, create about 10 slides.
|
7 |
-
|
8 |
-
|
9 |
-
### Topic:
|
10 |
-
{question}
|
11 |
-
|
12 |
-
|
13 |
-
The output must be only a valid and syntactically correct JSON adhering to the following schema:
|
14 |
-
{{
|
15 |
-
"title": "Presentation Title",
|
16 |
-
"slides": [
|
17 |
-
{{
|
18 |
-
"heading": "Heading for the First Slide",
|
19 |
-
"bullet_points": [
|
20 |
-
"First bullet point",
|
21 |
-
[
|
22 |
-
"Sub-bullet point 1",
|
23 |
-
"Sub-bullet point 2"
|
24 |
-
],
|
25 |
-
"Second bullet point"
|
26 |
-
]
|
27 |
-
}},
|
28 |
-
{{
|
29 |
-
"heading": "Heading for the Second Slide",
|
30 |
-
"bullet_points": [
|
31 |
-
"First bullet point",
|
32 |
-
"Second bullet item",
|
33 |
-
"Third bullet point"
|
34 |
-
]
|
35 |
-
}}
|
36 |
-
]
|
37 |
-
}}
|
38 |
-
|
39 |
-
|
40 |
-
### Output:
|
41 |
-
```json
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
langchain_templates/chat_prompts/initial_template_v2_steps.txt
DELETED
@@ -1,59 +0,0 @@
|
|
1 |
-
You are a helpful, intelligent chatbot. Create the slides for a presentation on the given topic.
|
2 |
-
Include main headings for each slide, detailed bullet points for each slide.
|
3 |
-
Add relevant content to each slide.
|
4 |
-
The content of each slide should be verbose, descriptive, and very detailed.
|
5 |
-
If relevant, add one or two examples to illustrate the concept.
|
6 |
-
Unless explicitly specified with the topic, create about 10 slides.
|
7 |
-
|
8 |
-
|
9 |
-
### Topic:
|
10 |
-
{question}
|
11 |
-
|
12 |
-
|
13 |
-
The output must be only a valid and syntactically correct JSON adhering to the following schema:
|
14 |
-
{{
|
15 |
-
"title": "Presentation Title",
|
16 |
-
"slides": [
|
17 |
-
{{
|
18 |
-
"heading": "Heading for the First Slide",
|
19 |
-
"bullet_points": [
|
20 |
-
"First bullet point",
|
21 |
-
[
|
22 |
-
"Sub-bullet point 1",
|
23 |
-
"Sub-bullet point 2"
|
24 |
-
],
|
25 |
-
"Second bullet point"
|
26 |
-
],
|
27 |
-
"key_message": ""
|
28 |
-
}},
|
29 |
-
{{
|
30 |
-
"heading": "Heading for the Second Slide",
|
31 |
-
"bullet_points": [
|
32 |
-
"First bullet point",
|
33 |
-
"Second bullet item",
|
34 |
-
"Third bullet point"
|
35 |
-
],
|
36 |
-
"key_message": "The key message conveyed in this slide"
|
37 |
-
}},
|
38 |
-
{{
|
39 |
-
"heading": "A slide that describes a step-by-step/sequential process",
|
40 |
-
"bullet_points": [
|
41 |
-
">> The first step of the process (begins with special marker >>)",
|
42 |
-
">> A second step (begins with >>)",
|
43 |
-
">> Third step",
|
44 |
-
],
|
45 |
-
"key_message": ""
|
46 |
-
}}
|
47 |
-
]
|
48 |
-
}}
|
49 |
-
|
50 |
-
|
51 |
-
### Some more hints on the slide content and JSON output format:
|
52 |
-
- For two or three important slides, generate the key message that those slides convey and assign
|
53 |
-
them to the `key_message` elements of JSON output.
|
54 |
-
- Identify if a slide describes a step-by-step/sequential process, then begin the bullet points
|
55 |
-
with a special marker >>. Limit this to max two or three slides.
|
56 |
-
|
57 |
-
|
58 |
-
### Output:
|
59 |
-
```json
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
langchain_templates/chat_prompts/initial_template_v3_two_cols.txt
DELETED
@@ -1,78 +0,0 @@
|
|
1 |
-
You are a helpful, intelligent chatbot. Create the slides for a presentation on the given topic.
|
2 |
-
Include main headings for each slide, detailed bullet points for each slide.
|
3 |
-
Add relevant content to each slide.
|
4 |
-
The content of each slide should be VERBOSE, DESCRIPTIVE, and very DETAILED.
|
5 |
-
If relevant, add one or two EXAMPLES to illustrate the concept.
|
6 |
-
For two or three important slides, generate the key message that those slides convey.
|
7 |
-
Identify if a slide describes a step-by-step/sequential process, then begin the bullet points with a special marker >>. Limit this to max two or three slides.
|
8 |
-
Also, add at least one slide with a double column layout by generating appropriate content based on the description in the JSON schema provided below.
|
9 |
-
ALWAYS add a concluding slide at the end, containing a list of the key takeways and an optional call-to-action if relevant to the context.
|
10 |
-
Unless explicitly instructed, create 10 TO 12 SLIDES in total.
|
11 |
-
|
12 |
-
|
13 |
-
### Topic:
|
14 |
-
{question}
|
15 |
-
|
16 |
-
|
17 |
-
The output must be only a valid and syntactically correct JSON adhering to the following schema:
|
18 |
-
{{
|
19 |
-
"title": "Presentation Title",
|
20 |
-
"slides": [
|
21 |
-
{{
|
22 |
-
"heading": "Heading for the First Slide",
|
23 |
-
"bullet_points": [
|
24 |
-
"First bullet point",
|
25 |
-
[
|
26 |
-
"Sub-bullet point 1",
|
27 |
-
"Sub-bullet point 2"
|
28 |
-
],
|
29 |
-
"Second bullet point"
|
30 |
-
],
|
31 |
-
"key_message": ""
|
32 |
-
}},
|
33 |
-
{{
|
34 |
-
"heading": "Heading for the Second Slide",
|
35 |
-
"bullet_points": [
|
36 |
-
"First bullet point",
|
37 |
-
"Second bullet item",
|
38 |
-
"Third bullet point"
|
39 |
-
],
|
40 |
-
"key_message": "The key message conveyed in this slide"
|
41 |
-
}},
|
42 |
-
{{
|
43 |
-
"heading": "A slide that describes a step-by-step/sequential process",
|
44 |
-
"bullet_points": [
|
45 |
-
">> The first step of the process (begins with special marker >>)",
|
46 |
-
">> A second step (begins with >>)",
|
47 |
-
">> Third step",
|
48 |
-
],
|
49 |
-
"key_message": ""
|
50 |
-
}},
|
51 |
-
{{
|
52 |
-
"heading": "A slide with a double column layout (useful for side-by-side comparison/contrasting of two related concepts, e.g., pros & cons, advantages & risks, old approach vs. modern approach, and so on)",
|
53 |
-
"bullet_points": [
|
54 |
-
{{
|
55 |
-
"heading": "Heading of the left column",
|
56 |
-
"bullet_points": [
|
57 |
-
"First bullet point",
|
58 |
-
"Second bullet item",
|
59 |
-
"Third bullet point"
|
60 |
-
]
|
61 |
-
}},
|
62 |
-
{{
|
63 |
-
"heading": "Heading of the right column",
|
64 |
-
"bullet_points": [
|
65 |
-
"First bullet point",
|
66 |
-
"Second bullet item",
|
67 |
-
"Third bullet point"
|
68 |
-
]
|
69 |
-
}}
|
70 |
-
],
|
71 |
-
"key_message": ""
|
72 |
-
}}
|
73 |
-
]
|
74 |
-
}}
|
75 |
-
|
76 |
-
|
77 |
-
### Output:
|
78 |
-
```json
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
langchain_templates/chat_prompts/refinement_template.txt
DELETED
@@ -1,49 +0,0 @@
|
|
1 |
-
You are a helpful, intelligent chatbot. You follow instructions to refine an existing slide deck.
|
2 |
-
A list of user instructions is provided below in sequential order -- from the oldest to the latest.
|
3 |
-
The previously generated content of the slide deck in JSON format is also provided.
|
4 |
-
Follow the instructions to revise the content of the previously generated slides of the presentation on the given topic.
|
5 |
-
Include main headings for each slide, detailed bullet points for each slide.
|
6 |
-
Add relevant content to each slide.
|
7 |
-
The content of the slides should be descriptive, verbose, and detailed.
|
8 |
-
If relevant, add one or two examples to illustrate the concept.
|
9 |
-
Unless explicitly specified with the topic, create about 10 slides.
|
10 |
-
You also fix any syntax error that may be present in the JSON-formatted content.
|
11 |
-
|
12 |
-
|
13 |
-
### List of instructions:
|
14 |
-
{instructions}
|
15 |
-
|
16 |
-
|
17 |
-
### Previously generated slide deck content as JSON:
|
18 |
-
{previous_content}
|
19 |
-
|
20 |
-
|
21 |
-
The output must be only a valid and syntactically correct JSON adhering to the following schema:
|
22 |
-
{{
|
23 |
-
"title": "Presentation Title",
|
24 |
-
"slides": [
|
25 |
-
{{
|
26 |
-
"heading": "Heading for the First Slide",
|
27 |
-
"bullet_points": [
|
28 |
-
"First bullet point",
|
29 |
-
[
|
30 |
-
"Sub-bullet point 1",
|
31 |
-
"Sub-bullet point 2"
|
32 |
-
],
|
33 |
-
"Second bullet point"
|
34 |
-
]
|
35 |
-
}},
|
36 |
-
{{
|
37 |
-
"heading": "Heading for the Second Slide",
|
38 |
-
"bullet_points": [
|
39 |
-
"First bullet point",
|
40 |
-
"Second bullet item",
|
41 |
-
"Third bullet point"
|
42 |
-
]
|
43 |
-
}}
|
44 |
-
]
|
45 |
-
}}
|
46 |
-
|
47 |
-
|
48 |
-
### Output:
|
49 |
-
```json
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
langchain_templates/chat_prompts/refinement_template_v2_steps.txt
DELETED
@@ -1,70 +0,0 @@
|
|
1 |
-
You are a helpful, intelligent chatbot. You follow instructions to refine an existing slide deck.
|
2 |
-
A list of user instructions is provided below in sequential order -- from the oldest to the latest.
|
3 |
-
The previously generated content of the slide deck in JSON format is also provided.
|
4 |
-
Follow the instructions to revise the content of the previously generated slides of the presentation on the given topic.
|
5 |
-
Include main headings for each slide, detailed bullet points for each slide.
|
6 |
-
Add relevant content to each slide.
|
7 |
-
The content of the slides should be descriptive, verbose, and detailed.
|
8 |
-
If relevant, add one or two examples to illustrate the concept.
|
9 |
-
Unless explicitly specified with the topic, create about 10 slides.
|
10 |
-
You also fix any syntax error that may be present in the JSON-formatted content.
|
11 |
-
|
12 |
-
A slide that describes a step-by-step/sequential process begins the bullet points
|
13 |
-
with a special marker >>
|
14 |
-
|
15 |
-
|
16 |
-
### List of instructions:
|
17 |
-
{instructions}
|
18 |
-
|
19 |
-
|
20 |
-
### Previously generated slide deck content as JSON:
|
21 |
-
{previous_content}
|
22 |
-
|
23 |
-
|
24 |
-
The output must be only a valid and syntactically correct JSON adhering to the following schema:
|
25 |
-
{{
|
26 |
-
"title": "Presentation Title",
|
27 |
-
"slides": [
|
28 |
-
{{
|
29 |
-
"heading": "Heading for the First Slide",
|
30 |
-
"bullet_points": [
|
31 |
-
"First bullet point",
|
32 |
-
[
|
33 |
-
"Sub-bullet point 1",
|
34 |
-
"Sub-bullet point 2"
|
35 |
-
],
|
36 |
-
"Second bullet point"
|
37 |
-
],
|
38 |
-
"key_message": ""
|
39 |
-
}},
|
40 |
-
{{
|
41 |
-
"heading": "Heading for the Second Slide",
|
42 |
-
"bullet_points": [
|
43 |
-
"First bullet point",
|
44 |
-
"Second bullet item",
|
45 |
-
"Third bullet point"
|
46 |
-
],
|
47 |
-
"key_message": "The key message conveyed in this slide"
|
48 |
-
}},
|
49 |
-
{{
|
50 |
-
"heading": "A slide that describes a step-by-step/sequential process",
|
51 |
-
"bullet_points": [
|
52 |
-
">> The first step of the process (begins with special marker >>)",
|
53 |
-
">> A second step (begins with >>)",
|
54 |
-
">> Third step",
|
55 |
-
],
|
56 |
-
"key_message": ""
|
57 |
-
}}
|
58 |
-
]
|
59 |
-
}}
|
60 |
-
|
61 |
-
|
62 |
-
### Some more hints on the slide content and JSON output format:
|
63 |
-
- For two or three important slides, generate the key message that those slides convey and assign
|
64 |
-
them to the `key_message` elements of JSON output.
|
65 |
-
- Identify if a slide describes a step-by-step/sequential process, then begin the bullet points
|
66 |
-
with a special marker >>. Limit this to max two or three slides.
|
67 |
-
|
68 |
-
|
69 |
-
### Output:
|
70 |
-
```json
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
langchain_templates/chat_prompts/refinement_template_v3_two_cols.txt
DELETED
@@ -1,85 +0,0 @@
|
|
1 |
-
You are a helpful, intelligent chatbot. You follow instructions to refine an existing slide deck.
|
2 |
-
A list of user instructions is provided below in sequential order -- from the oldest to the latest.
|
3 |
-
The previously generated content of the slide deck in JSON format is also provided.
|
4 |
-
Follow the instructions to revise the content of the previously generated slides of the presentation on the given topic.
|
5 |
-
Include main headings for each slide, detailed bullet points for each slide.
|
6 |
-
Add relevant content to each slide.
|
7 |
-
The content of each slide should be VERBOSE, DESCRIPTIVE, and very DETAILED.
|
8 |
-
If relevant, add one or two EXAMPLES to illustrate the concept.
|
9 |
-
For two or three important slides, generate the key message that those slides convey.
|
10 |
-
Identify if a slide describes a step-by-step/sequential process, then begin the bullet points with a special marker >>. Limit this to max two or three slides.
|
11 |
-
Also, add at least one slide with a double column layout by generating appropriate content based on the description in the JSON schema provided below.
|
12 |
-
ALWAYS add a concluding slide at the end, containing a list of the key takeways and an optional call-to-action if relevant to the context.
|
13 |
-
Unless explicitly instructed, create 10 TO 12 SLIDES in total.
|
14 |
-
|
15 |
-
|
16 |
-
### List of instructions:
|
17 |
-
{instructions}
|
18 |
-
|
19 |
-
|
20 |
-
### Previously generated slide deck content as JSON:
|
21 |
-
{previous_content}
|
22 |
-
|
23 |
-
|
24 |
-
The output must be only a valid and syntactically correct JSON adhering to the following schema:
|
25 |
-
{{
|
26 |
-
"title": "Presentation Title",
|
27 |
-
"slides": [
|
28 |
-
{{
|
29 |
-
"heading": "Heading for the First Slide",
|
30 |
-
"bullet_points": [
|
31 |
-
"First bullet point",
|
32 |
-
[
|
33 |
-
"Sub-bullet point 1",
|
34 |
-
"Sub-bullet point 2"
|
35 |
-
],
|
36 |
-
"Second bullet point"
|
37 |
-
],
|
38 |
-
"key_message": ""
|
39 |
-
}},
|
40 |
-
{{
|
41 |
-
"heading": "Heading for the Second Slide",
|
42 |
-
"bullet_points": [
|
43 |
-
"First bullet point",
|
44 |
-
"Second bullet item",
|
45 |
-
"Third bullet point"
|
46 |
-
],
|
47 |
-
"key_message": "The key message conveyed in this slide"
|
48 |
-
}},
|
49 |
-
{{
|
50 |
-
"heading": "A slide that describes a step-by-step/sequential process",
|
51 |
-
"bullet_points": [
|
52 |
-
">> The first step of the process (begins with special marker >>)",
|
53 |
-
">> A second step (begins with >>)",
|
54 |
-
">> Third step",
|
55 |
-
],
|
56 |
-
"key_message": ""
|
57 |
-
}},
|
58 |
-
{{
|
59 |
-
"heading": "A slide with a double column layout (useful for side-by-side comparison/contrasting of two related concepts, e.g., pros & cons, advantages & risks, old approach vs. modern approach, and so on)",
|
60 |
-
"bullet_points": [
|
61 |
-
{{
|
62 |
-
"heading": "Heading of the left column",
|
63 |
-
"bullet_points": [
|
64 |
-
"First bullet point",
|
65 |
-
"Second bullet item",
|
66 |
-
"Third bullet point"
|
67 |
-
]
|
68 |
-
}},
|
69 |
-
{{
|
70 |
-
"heading": "Heading of the right column",
|
71 |
-
"bullet_points": [
|
72 |
-
"First bullet point",
|
73 |
-
"Second bullet item",
|
74 |
-
"Third bullet point"
|
75 |
-
]
|
76 |
-
}}
|
77 |
-
],
|
78 |
-
"key_message": ""
|
79 |
-
}}
|
80 |
-
]
|
81 |
-
}}
|
82 |
-
|
83 |
-
|
84 |
-
### Output:
|
85 |
-
```json
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
langchain_templates/template_07.txt
DELETED
@@ -1,5 +0,0 @@
|
|
1 |
-
You are a helpful, intelligent chatbot. Create the slides for a presentation on the given topic. Include main headings for each slide, detailed bullet points for each slide. Add relevant content to each slide. Do not output any blank line.
|
2 |
-
|
3 |
-
|
4 |
-
Topic:
|
5 |
-
{topic}
|
|
|
|
|
|
|
|
|
|
|
|
langchain_templates/template_combined.txt
DELETED
@@ -1,41 +0,0 @@
|
|
1 |
-
You are a helpful, intelligent chatbot. Create the slides for a presentation on the given topic.
|
2 |
-
Include main headings for each slide, detailed bullet points for each slide.
|
3 |
-
Add relevant content to each slide.
|
4 |
-
The content should be descriptive, verbose, and detailed as much as possible.
|
5 |
-
If relevant, add one or two examples to illustrate the concept.
|
6 |
-
Unless explicitly specified with the topic, create about 10 slides.
|
7 |
-
|
8 |
-
|
9 |
-
Topic:
|
10 |
-
<REPLACE_PLACEHOLDER>
|
11 |
-
|
12 |
-
|
13 |
-
Desired JSON output format:
|
14 |
-
{
|
15 |
-
"title": "Presentation Title",
|
16 |
-
"slides": [
|
17 |
-
{
|
18 |
-
"heading": "Heading for the First Slide",
|
19 |
-
"bullet_points": [
|
20 |
-
"First bullet point",
|
21 |
-
[
|
22 |
-
"Sub-bullet point 1",
|
23 |
-
"Sub-bullet point 2"
|
24 |
-
],
|
25 |
-
"Second bullet point"
|
26 |
-
]
|
27 |
-
},
|
28 |
-
{
|
29 |
-
"heading": "Heading for the Second Slide",
|
30 |
-
"bullet_points": [
|
31 |
-
"First bullet point",
|
32 |
-
"Second bullet item",
|
33 |
-
"Third bullet point"
|
34 |
-
]
|
35 |
-
}
|
36 |
-
]
|
37 |
-
}
|
38 |
-
|
39 |
-
|
40 |
-
Output:
|
41 |
-
```json
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
langchain_templates/text_to_json_template.txt
DELETED
@@ -1,38 +0,0 @@
|
|
1 |
-
Convert the given slide deck text into structured JSON output.
|
2 |
-
Also, generate and add an engaging presentation title.
|
3 |
-
The output should be only correct and valid JSON having the following structure:
|
4 |
-
|
5 |
-
{
|
6 |
-
"title": "...",
|
7 |
-
"slides": [
|
8 |
-
{
|
9 |
-
"heading": "...",
|
10 |
-
"bullet_points": [
|
11 |
-
"...",
|
12 |
-
[
|
13 |
-
"...",
|
14 |
-
"..."
|
15 |
-
]
|
16 |
-
]
|
17 |
-
},
|
18 |
-
{
|
19 |
-
...
|
20 |
-
},
|
21 |
-
]
|
22 |
-
}
|
23 |
-
|
24 |
-
|
25 |
-
===
|
26 |
-
Text:
|
27 |
-
|
28 |
-
<REPLACE_PLACEHOLDER>
|
29 |
-
===
|
30 |
-
|
31 |
-
In the output JSON, the `heading` field should contain the heading of each slide,
|
32 |
-
Each slide object has a `bullet_points` array containing the slide's contents.
|
33 |
-
The `bullet_points` array can contain strings or array of strings.
|
34 |
-
The indented sub-bullets for each slide from the input text should appear as an array of strings inside `bullet_points`.
|
35 |
-
The `bullet_points` field must not contain any object.
|
36 |
-
|
37 |
-
Output:
|
38 |
-
```json
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
langchain_templates/text_to_json_template_02.txt
DELETED
@@ -1,40 +0,0 @@
|
|
1 |
-
Convert the given slide deck text into structured JSON output. Also, generate and add an engaging presentation title. The output should be only correct and valid JSON.
|
2 |
-
|
3 |
-
Desired JSON output format:
|
4 |
-
|
5 |
-
{
|
6 |
-
"title": "Presentation Title",
|
7 |
-
"slides": [
|
8 |
-
{
|
9 |
-
"heading": "Heading for the First Slide",
|
10 |
-
"bullet_points": [
|
11 |
-
"First bullet point",
|
12 |
-
[
|
13 |
-
"Sub-bullet point 1",
|
14 |
-
"Sub-bullet point 1"
|
15 |
-
],
|
16 |
-
"Second bullet point"
|
17 |
-
]
|
18 |
-
},
|
19 |
-
{
|
20 |
-
"heading": "Heading for the Second Slide",
|
21 |
-
"bullet_points": [
|
22 |
-
"First bullet point",
|
23 |
-
"Second bullet item",
|
24 |
-
"Third bullet point"
|
25 |
-
]
|
26 |
-
}
|
27 |
-
]
|
28 |
-
}
|
29 |
-
|
30 |
-
|
31 |
-
=====
|
32 |
-
Text:
|
33 |
-
|
34 |
-
<REPLACE_PLACEHOLDER>
|
35 |
-
=====
|
36 |
-
|
37 |
-
In the output JSON, the `heading` field should contain the heading of each slide. Each slide object has a `bullet_points` array containing the slide's contents.
|
38 |
-
|
39 |
-
Output:
|
40 |
-
```json
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{langchain_templates/chat_prompts → prompts}/initial_template_v4_two_cols_img.txt
RENAMED
@@ -6,11 +6,13 @@ Add relevant, detailed content to each slide. When relevant, add one or two EXAM
|
|
6 |
For two or three important slides, generate the key message that those slides convey.
|
7 |
|
8 |
The <ADDITIONAL_INFO> may provide additional information. If available, you should incorporate them while making the slides.
|
9 |
-
Read this information carefully. Based on the contents provided,
|
10 |
-
For example, if it's a paper, you can consider having Problem, Solution, Experiments, and Results, among other sections.
|
11 |
If it's a product brochure, you can have Features, Changes, Operating Conditions, and likewise relevant sections.
|
12 |
Similarly, decide for other content types. Then appropriately incorporate the contents into the relevant slides, presenting in a useful way.
|
13 |
-
If <ADDITIONAL_INFO>
|
|
|
|
|
14 |
|
15 |
Identify if a slide describes a step-by-step/sequential process, then begin the bullet points with a special marker >>.
|
16 |
Limit this to max two or three slides.
|
@@ -23,7 +25,7 @@ In addition, create one slide containing 4 TO 6 icons (pictograms) illustrating
|
|
23 |
In this slide, each line of text will begin with the name of a relevant icon enclosed between [[ and ]], e.g., [[machine-learning]] and [[fairness]].
|
24 |
Insert icons only in this slide.
|
25 |
|
26 |
-
|
27 |
Avoid writing like a report, but also avoid very short bullet points with just 3-4 words.
|
28 |
Each bullet point should be detailed and explanatory, not just short phrases.
|
29 |
|
|
|
6 |
For two or three important slides, generate the key message that those slides convey.
|
7 |
|
8 |
The <ADDITIONAL_INFO> may provide additional information. If available, you should incorporate them while making the slides.
|
9 |
+
Read this information carefully. Based on the contents provided, organize the presentation.
|
10 |
+
For example, if it's a paper, you can consider having slides describing Problem, Solution, Experiments, and Results, among other sections.
|
11 |
If it's a product brochure, you can have Features, Changes, Operating Conditions, and likewise relevant sections.
|
12 |
Similarly, decide for other content types. Then appropriately incorporate the contents into the relevant slides, presenting in a useful way.
|
13 |
+
If you find that <ADDITIONAL_INFO> contains text from a document and said document has a title, use the same title for the slide deck.
|
14 |
+
If there are important content, e.g., equations and theorems, try to capture a few of them.
|
15 |
+
If <ADDITIONAL_INFO> is empty, ignore the section and the related instructions.
|
16 |
|
17 |
Identify if a slide describes a step-by-step/sequential process, then begin the bullet points with a special marker >>.
|
18 |
Limit this to max two or three slides.
|
|
|
25 |
In this slide, each line of text will begin with the name of a relevant icon enclosed between [[ and ]], e.g., [[machine-learning]] and [[fairness]].
|
26 |
Insert icons only in this slide.
|
27 |
|
28 |
+
The content of each slide should be detailed and descriptive but not way too verbose.
|
29 |
Avoid writing like a report, but also avoid very short bullet points with just 3-4 words.
|
30 |
Each bullet point should be detailed and explanatory, not just short phrases.
|
31 |
|
{langchain_templates/chat_prompts → prompts}/refinement_template_v4_two_cols_img.txt
RENAMED
@@ -9,11 +9,13 @@ Add relevant, detailed content to each slide. When relevant, add one or two EXAM
|
|
9 |
For two or three important slides, generate the key message that those slides convey.
|
10 |
|
11 |
The <ADDITIONAL_INFO> may provide additional information. If available, you should incorporate them while making the slides.
|
12 |
-
Read this information carefully. Based on the contents provided,
|
13 |
-
For example, if it's a paper, you can consider having Problem, Solution, Experiments, and Results, among other sections.
|
14 |
If it's a product brochure, you can have Features, Changes, Operating Conditions, and likewise relevant sections.
|
15 |
Similarly, decide for other content types. Then appropriately incorporate the contents into the relevant slides, presenting in a useful way.
|
16 |
-
If <ADDITIONAL_INFO>
|
|
|
|
|
17 |
|
18 |
Identify if a slide describes a step-by-step/sequential process, then begin the bullet points with a special marker >>. Limit this to max two or three slides.
|
19 |
Also, add at least one slide with a double column layout by generating appropriate content based on the description in the JSON schema provided below.
|
@@ -25,7 +27,7 @@ In this slide, each line of text will begin with the name of a relevant icon enc
|
|
25 |
Insert icons only in this slide.
|
26 |
Do not repeat any icons or the icons slide.
|
27 |
|
28 |
-
|
29 |
Avoid writing like a report, but also avoid very short bullet points with just 3-4 words.
|
30 |
Each bullet point should be detailed and explanatory, not just short phrases.
|
31 |
|
|
|
9 |
For two or three important slides, generate the key message that those slides convey.
|
10 |
|
11 |
The <ADDITIONAL_INFO> may provide additional information. If available, you should incorporate them while making the slides.
|
12 |
+
Read this information carefully. Based on the contents provided, organize the presentation.
|
13 |
+
For example, if it's a paper, you can consider having slides describing Problem, Solution, Experiments, and Results, among other sections.
|
14 |
If it's a product brochure, you can have Features, Changes, Operating Conditions, and likewise relevant sections.
|
15 |
Similarly, decide for other content types. Then appropriately incorporate the contents into the relevant slides, presenting in a useful way.
|
16 |
+
If you find that <ADDITIONAL_INFO> contains text from a document and said document has a title, use the same title for the slide deck.
|
17 |
+
If there are important content, e.g., equations and theorems, try to capture a few of them.
|
18 |
+
If <ADDITIONAL_INFO> is empty, ignore the section and the related instructions.
|
19 |
|
20 |
Identify if a slide describes a step-by-step/sequential process, then begin the bullet points with a special marker >>. Limit this to max two or three slides.
|
21 |
Also, add at least one slide with a double column layout by generating appropriate content based on the description in the JSON schema provided below.
|
|
|
27 |
Insert icons only in this slide.
|
28 |
Do not repeat any icons or the icons slide.
|
29 |
|
30 |
+
The content of each slide should be detailed and descriptive but not way too verbose.
|
31 |
Avoid writing like a report, but also avoid very short bullet points with just 3-4 words.
|
32 |
Each bullet point should be detailed and explanatory, not just short phrases.
|
33 |
|
requirements.txt
CHANGED
@@ -15,7 +15,7 @@ langchain-cohere==0.3.3
|
|
15 |
langchain-together==0.3.0
|
16 |
langchain-ollama==0.2.1
|
17 |
langchain-openai==0.3.3
|
18 |
-
streamlit
|
19 |
|
20 |
python-pptx~=1.0.2
|
21 |
json5~=0.9.14
|
|
|
15 |
langchain-together==0.3.0
|
16 |
langchain-ollama==0.2.1
|
17 |
langchain-openai==0.3.3
|
18 |
+
streamlit==1.44.1
|
19 |
|
20 |
python-pptx~=1.0.2
|
21 |
json5~=0.9.14
|