Skip to content

Commit f837edf

Browse files
authored
Merge pull request #59 from ajcwebdev/tjt
New Prompt Options
2 parents b30a0c2 + 83744f1 commit f837edf

File tree

6 files changed

+160
-31
lines changed

6 files changed

+160
-31
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,4 +142,4 @@ Example commands for all available CLI options can be found in [`docs/examples.m
142142

143143
## Contributors
144144

145-
- [Jenn Junod](https://jennjunod.dev/) host of [Teach Jenn Tech](https://teachjenntech.com/)
145+
- ✨Hello beautiful human! ✨[Jenn Junod](https://jennjunod.dev/) host of [Teach Jenn Tech](https://teachjenntech.com/)

src/llms/prompt.ts

+100-20
Original file line numberDiff line numberDiff line change
@@ -9,44 +9,74 @@ import type { PromptSection } from '../types/main'
99
const sections = {
1010
// Section for generating titles
1111
titles: {
12-
// Instructions for the AI model on how to generate titles
12+
// Instructions and example for the AI model on how to generate titles
1313
instruction: `- Write 5 potential titles for the video.
1414
- The first two titles should be very, very shorter and have no subtitle.
1515
- The last three titles can be longer and have subtitles.\n`,
16-
// Example of how the output should be formatted
1716
example: `## Potential Titles
18-
17+
1918
1. Title Hard
2019
2. Title Harder
2120
3. Title Hard with a Vengeance
2221
4. Title Hard IV: Live Free or Title Hard
2322
5. Title Hard V: A Good Day to Die Hard\n`,
2423
},
2524

26-
// Section for generating a summary
25+
// Section for generating a short and long summary
2726
summary: {
28-
// Instructions for creating a concise summary
27+
// Instructions and example for creating a short and long summary
2928
instruction: `- Write a one sentence description of the transcript and a one paragraph summary.
3029
- The one sentence description shouldn't exceed 180 characters (roughly 30 words).
3130
- The one paragraph summary should be approximately 600-1200 characters (roughly 100-200 words).\n`,
32-
// Example of the expected output format
33-
example: `One sentence description of the transcript that encapsulates the content contained in the file but does not exceed roughly 180 characters (or approximately 30 words).
31+
example: `## Episode Description
32+
33+
One sentence description of the transcript that encapsulates the content contained in the file but does not exceed roughly 180 characters (or approximately 30 words).
3434
3535
## Episode Summary
3636
3737
A concise summary of a chapter's content, typically ranging from 600 to 1200 characters or approximately 100 to 200 words. It begins by introducing the main topic or theme of the chapter, providing context for the reader. The summary then outlines key points or arguments presented in the chapter, touching on major concepts, theories, or findings discussed. It may briefly mention methodologies used or data analyzed, if applicable. The paragraph also highlights any significant conclusions or implications drawn from the chapter's content. Throughout, it maintains a balance between providing enough detail to give readers a clear understanding of the chapter's scope and keeping the information general enough to apply to various subjects. This summary style efficiently conveys the essence of the chapter's content, allowing readers to quickly grasp its main ideas and decide if they want to delve deeper into the full text.\n`,
3838
},
3939

40+
// Section for generating a short summary
41+
shortSummary: {
42+
// Instructions and example for creating a short summary
43+
instruction: `- Write a one sentence description of the transcript.
44+
- The one sentence description shouldn't exceed 180 characters (roughly 30 words).\n`,
45+
example: `## Episode Description
46+
47+
One sentence description of the transcript that encapsulates the content contained in the file but does not exceed roughly 180 characters (or approximately 30 words).\n`,
48+
},
49+
50+
// Section for generating a long summary
51+
longSummary: {
52+
// Instructions and example for creating a long summary
53+
instruction: `- Write a one paragraph summary of the transcript.
54+
- The one paragraph summary should be approximately 600-1200 characters (roughly 100-200 words).\n`,
55+
example: `## Episode Summary
56+
57+
A concise summary of a chapter's content, typically ranging from 600 to 1200 characters or approximately 100 to 200 words. It begins by introducing the main topic or theme of the chapter, providing context for the reader. The summary then outlines key points or arguments presented in the chapter, touching on major concepts, theories, or findings discussed. It may briefly mention methodologies used or data analyzed, if applicable. The paragraph also highlights any significant conclusions or implications drawn from the chapter's content. Throughout, it maintains a balance between providing enough detail to give readers a clear understanding of the chapter's scope and keeping the information general enough to apply to various subjects. This summary style efficiently conveys the essence of the chapter's content, allowing readers to quickly grasp its main ideas and decide if they want to delve deeper into the full text.\n`,
58+
},
59+
60+
// Section for generating a bullet point list summary
61+
bulletPoints: {
62+
// Instructions and example for creating a bullet point list summary
63+
instruction: `- Write a bullet point list summarizing the transcript.\n`,
64+
example: `## Bullet Point Summary
65+
66+
- A concise summary of a chapter's content in bullet point list form.
67+
- It begins by introducing the main topic or theme of the chapter, providing context for the reader.
68+
- The summary then outlines key points or arguments presented in the chapter\n`,
69+
},
70+
4071
// Section for creating short chapter descriptions
4172
shortChapters: {
42-
// Instructions for generating concise chapter summaries
73+
// Instructions and example for generating concise chapter summaries
4374
instruction: `- Create chapters based on the topics discussed throughout.
4475
- Include timestamps for when these chapters begin.
4576
- Chapters should be roughly 3-6 minutes long.
4677
- Write a one-sentence description for each chapter (max 25 words).
4778
- Ensure chapters cover the entire content (note the last timestamp).
4879
- Let descriptions flow naturally from the content, avoiding formulaic templates.\n`,
49-
// Example of the expected output format
5080
example: `## Chapters
5181
5282
### 00:00 - Introduction and Beginning of Episode
@@ -56,14 +86,13 @@ const sections = {
5686

5787
// Section for creating medium-length chapter descriptions
5888
mediumChapters: {
59-
// Instructions for generating more detailed chapter summaries
89+
// Instructions and example for generating more detailed chapter summaries
6090
instruction: `- Create chapters based on the topics discussed throughout.
6191
- Include timestamps for when these chapters begin.
6292
- Chapters should be roughly 3-6 minutes long.
6393
- Write a one-paragraph description for each chapter (~50 words).
6494
- Ensure chapters cover the entire content (note the last timestamp).
6595
- Let descriptions flow naturally from the content, avoiding formulaic templates.\n`,
66-
// Example of the expected output format
6796
example: `## Chapters
6897
6998
### 00:00 - Introduction and Beginning of Episode
@@ -73,14 +102,13 @@ const sections = {
73102

74103
// Section for creating detailed, long chapter descriptions
75104
longChapters: {
76-
// Instructions for generating comprehensive chapter summaries
105+
// Instructions and example for generating comprehensive chapter summaries
77106
instruction: `- Create chapters based on the topics discussed throughout.
78107
- Include timestamps for when these chapters begin.
79108
- Chapters should be roughly 3-6 minutes long.
80109
- Write a two-paragraph description for each chapter (75+ words).
81110
- Ensure chapters cover the entire content (note the last timestamp).
82111
- Let descriptions flow naturally from the content, avoiding formulaic templates.\n`,
83-
// Example of the expected output format
84112
example: `## Chapters
85113
86114
### 00:00 - Introduction and Overview
@@ -90,9 +118,8 @@ const sections = {
90118

91119
// Section for highlighting key takeaways
92120
takeaways: {
93-
// Instructions for summarizing main points
121+
// Instructions and example for summarizing main points
94122
instruction: `- Include three key takeaways the listener should get from the episode.\n`,
95-
// Example of how the takeaways should be formatted
96123
example: `## Key Takeaways
97124
98125
1. Full-stack development requires a broad understanding of both client-side and server-side technologies, enabling developers to create more cohesive and efficient web applications.
@@ -102,31 +129,48 @@ const sections = {
102129

103130
// Section for generating comprehension questions
104131
questions: {
105-
// Instructions for creating relevant questions about the content
132+
// Instructions and example for creating relevant questions about the content
106133
instruction: `- Include a list of 10 questions to check the listeners' comprehension of the material.
107-
- Ensure questions cover all major sections of the content.\n`,
108-
// Example of how the questions should be formatted
134+
- Ensure questions cover all major sections of the content.
135+
- Ensure the questions are correct, emphasize the right things, and aren't redundant.
136+
- Do not say things like "the instructor describes" or "according to the lesson," assume that all the questions relate to the lesson told by the instructor.
137+
- The first five questions should be beginner level questions and the last five should be expert level questions.\n`,
109138
example: `## Questions to Check Comprehension
110139
140+
### Beginner Questions
141+
111142
1. What are the three main components of the modern web development stack?
112143
2. How has the role of JavaScript evolved in web development over the past decade?
113144
3. What are the key differences between React and Vue.js?
114145
4. Why is server-side rendering beneficial for web applications?
115146
5. What is the purpose of a RESTful API in full-stack development?
147+
148+
### Expert Questions
149+
116150
6. How does Node.js differ from traditional server-side languages like PHP or Python?
117151
7. What are the main considerations when choosing a database for a web application?
118152
8. How do containerization technologies like Docker impact web development and deployment?
119153
9. What role does responsive design play in modern web development?
120154
10. How can developers ensure the security of user data in web applications?\n`,
121155
},
122156

157+
// Section for generating frequently asked questions and answers
158+
faq: {
159+
// Instructions and example for creating relevant questions about the content
160+
instruction: `- Include a list of 5-10 frequently asked questions and answers based on the transcript.
161+
- Ensure questions and answers cover all major sections of the content.\n`,
162+
example: `## FAQ
163+
164+
Q: What are the three main components of the Jamstack?
165+
A: JavaScript, APIs, and markup.\n`,
166+
},
167+
123168
// Section for generating a blog outline and first draft
124169
blog: {
125-
// Instructions for creating an outline and blog draft
170+
// Instructions and example for creating an outline and blog draft
126171
instruction: `- Generate a blog outline and first draft for a blog post based on this piece of content.
127172
128173
- Make sure the blog post is at least 750 words.\n`,
129-
// Example of how the outline and draft should be formatted
130174
example: `## Blog Outline
131175
132176
1. Part 1
@@ -137,6 +181,42 @@ const sections = {
137181
138182
First draft of a blog.\n`,
139183
},
184+
185+
// Section for generating a rap song based on the transcript
186+
rapSong: {
187+
// Instructions and example for creating the rap song
188+
instruction: `- Write a highly complex, multi-syllabic rhyming, Eminem inspired rap based on this transcript.
189+
- Do not rhyme any words with themselves.
190+
- Give it a basic song structure with verses, choruses, and a bridge.
191+
- Give the song three potential titles.\n`,
192+
example: `## Song
193+
194+
Lyrics to the song.\n`
195+
},
196+
197+
// Section for generating a rock song based on the transcript
198+
rockSong: {
199+
// Instructions and example for creating the rock song
200+
instruction: `- Write a high-energy, anthemic rock song with powerful imagery and impactful, multi-layered lyrics.
201+
- Use metaphors and vivid language to convey a sense of rebellion or freedom.
202+
- Structure the song with verses, choruses, and a bridge.
203+
- Provide the song with three potential titles.\n`,
204+
example: `## Song
205+
206+
Lyrics to the song.\n`
207+
},
208+
209+
// Section for generating a country song based on the transcript
210+
countrySong: {
211+
// Instructions and example for creating the country song
212+
instruction: `- Write a heartfelt, storytelling country song with simple yet emotionally charged lyrics.
213+
- Include themes of life, love, and the struggles of everyday people.
214+
- Structure the song with verses, choruses, and a bridge.
215+
- Offer the song three potential titles.\n`,
216+
example: `## Song
217+
218+
Lyrics to the song.\n`
219+
},
140220
} satisfies Record<string, PromptSection>
141221

142222
// Create a type from the sections object

src/types/globals.ts

+7
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,19 @@ export const execFilePromise = promisify(execFile)
1717
export const PROMPT_CHOICES = [
1818
{ name: 'Titles', value: 'titles' },
1919
{ name: 'Summary', value: 'summary' },
20+
{ name: 'Short Summary', value: 'shortSummary' },
21+
{ name: 'Long Summary', value: 'longSummary' },
22+
{ name: 'Bullet Point Summary', value: 'bulletPoints' },
2023
{ name: 'Short Chapters', value: 'shortChapters' },
2124
{ name: 'Medium Chapters', value: 'mediumChapters' },
2225
{ name: 'Long Chapters', value: 'longChapters' },
2326
{ name: 'Key Takeaways', value: 'takeaways' },
2427
{ name: 'Questions', value: 'questions' },
28+
{ name: 'FAQ', value: 'faq' },
2529
{ name: 'Blog', value: 'blog' },
30+
{ name: 'Rap Song', value: 'rapSong' },
31+
{ name: 'Rock Song', value: 'rockSong' },
32+
{ name: 'Country Song', value: 'countrySong' },
2633
]
2734

2835
/**

web/src/components/app/Form.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ const Inputs: React.FC<InputsProps> = ({ onNewShowNote }) => {
284284
}
285285
}}
286286
/>
287-
<label htmlFor={`prompt-${prompt.value}`}>{prompt.label}</label>
287+
<label htmlFor={`prompt-${prompt.value}`}>{prompt.name}</label>
288288
</div>
289289
))}
290290
</div>

web/src/pages/app.astro

+36-2
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,48 @@ import Form from "@/components/app/Form"
99
<section>
1010
<h1>Generate Show Notes</h1>
1111
<h2>Examples</h2>
12-
<ul>
12+
<table>
13+
<thead>
14+
<tr>
15+
<th>Type</th>
16+
<th>Link</th>
17+
</tr>
18+
</thead>
19+
<tbody>
20+
<tr>
21+
<td>Video</td>
22+
<td>https://www.youtube.com/watch?v=MORMZXEaONk</td>
23+
</tr>
24+
<tr>
25+
<td>Playlist</td>
26+
<td>https://www.youtube.com/playlist?list=PLCVnrVv4KhXPz0SoAVu8Rc1emAdGPbSbr</td>
27+
</tr>
28+
<tr>
29+
<td>Channel</td>
30+
<td>https://www.youtube.com/@ajcwebdev</td>
31+
</tr>
32+
<tr>
33+
<td>URLs</td>
34+
<td>content/example-urls.md</td>
35+
</tr>
36+
<tr>
37+
<td>File</td>
38+
<td>content/audio.mp3</td>
39+
</tr>
40+
<tr>
41+
<td>RSS</td>
42+
<td>https://ajcwebdev.substack.com/feed</td>
43+
</tr>
44+
</tbody>
45+
</table>
46+
<!-- <ul>
1347
<li>Video - https://www.youtube.com/watch?v=MORMZXEaONk</li>
1448
<li>Playlist - https://www.youtube.com/playlist?list=PLCVnrVv4KhXPz0SoAVu8Rc1emAdGPbSbr</li>
1549
<li>Channel - https://www.youtube.com/@ajcwebdev</li>
1650
<li>URLs - content/example-urls.md</li>
1751
<li>File - content/audio.mp3</li>
1852
<li>RSS - https://ajcwebdev.substack.com/feed</li>
19-
</ul>
53+
</ul> -->
2054
<ul class="show-notes-list">
2155
<Form client:only="react" />
2256
</ul>

web/src/site.config.ts

+15-7
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,21 @@ export const PROCESS_TYPES = [
1313
] as const
1414

1515
export const PROMPT_CHOICES = [
16-
{ value: 'titles', label: 'Titles' },
17-
{ value: 'summary', label: 'Summary' },
18-
{ value: 'shortChapters', label: 'Short Chapters' },
19-
{ value: 'mediumChapters', label: 'Medium Chapters' },
20-
{ value: 'longChapters', label: 'Long Chapters' },
21-
{ value: 'takeaways', label: 'Key Takeaways' },
22-
{ value: 'questions', label: 'Questions' },
16+
{ name: 'Titles', value: 'titles' },
17+
{ name: 'Summary', value: 'summary' },
18+
{ name: 'Short Summary', value: 'shortSummary' },
19+
{ name: 'Long Summary', value: 'longSummary' },
20+
{ name: 'Bullet Point Summary', value: 'bulletPoints' },
21+
{ name: 'Short Chapters', value: 'shortChapters' },
22+
{ name: 'Medium Chapters', value: 'mediumChapters' },
23+
{ name: 'Long Chapters', value: 'longChapters' },
24+
{ name: 'Key Takeaways', value: 'takeaways' },
25+
{ name: 'Questions', value: 'questions' },
26+
{ name: 'FAQ', value: 'faq' },
27+
{ name: 'Blog', value: 'blog' },
28+
{ name: 'Rap Song', value: 'rapSong' },
29+
{ name: 'Rock Song', value: 'rockSong' },
30+
{ name: 'Country Song', value: 'countrySong' },
2331
]
2432

2533
export const TRANSCRIPTION_SERVICES = [

0 commit comments

Comments
 (0)