You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Use GPT to analyze the text and extract common topics
43
45
constanalyzeQuestionText=async(questionText)=>{
44
-
letquestion=`Imagine you are analyzing these questions, what themes do you see arise from them? Are there common questions that people ask? What are the common topics? Please provide a specific list of highly defined tutorial topics that could be written that would address these questions: ${questionText}`
46
+
letquestion=`Imagine you are analyzing these questions, what themes do you see arise from them? Are there common questions that people ask? What are the common topics? Please provide a specific list of highly defined tutorial topics that could be written that would address these questions, only provide the list in your response and nothing else: ${questionText}`
45
47
constresponse=awaitgpt.sendMessage(question,{
46
48
max_tokens: 100,
47
49
n: 5,// number of topics to extract
48
50
stop: '\n',// use newline character to separate topics
49
51
presence_penalty: 0.5,
50
52
frequency_penalty: 0,
51
53
});
52
-
returnresponse;
53
-
// return response.choices[0].text;
54
-
};
55
-
56
-
// Use GPT to generate tutorial and blog post ideas based on the common topics
57
-
constgenerateIdeas=async(topics)=>{
58
-
constresponse=awaitgpt.sendMessage(`Tutorial and blog post ideas based on the topics: ${topics}`,{
59
-
max_tokens: 100,
60
-
n: 5,// number of ideas to generate
61
-
stop: '\n',// use newline character to separate ideas
0 commit comments