Spaces:
Runtime error
Runtime error
File size: 2,110 Bytes
a57c7fe |
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 |
class ChiplingPrompts:
def generateModules(searchQuery):
prompt = '''
Generate a structured learning path for the topic: "${searchQuery}".
Please provide all the modules (chapters) associated with the topic to cover all the content for the respective topic, with each module having:
- A title
- all the topics that are specifically related to that module
- generate more than 4 topics for each module
For each topic, include:
- A title
- A relevance score (1-10)
- A short description (2-3 sentences)
Format the response as JSON that matches this TypeScript interface:
{
modules: Array<{
title: string;
topics: Array<{
title: string;
relevance: number;
description: string;
}>
}>
}
Each module should build on the previous one, progressively increasing in complexity or depth.
Only respond with the JSON data.`
'''
return prompt
def generateTopics(searchQuery):
prompt = '''
Generate detailed information about the topic: "${searchQuery}".
Please include:
- A comprehensive content section (3-4 paragraphs)
- 2-3 subtopics, each with title, description, and content
- 3-5 references or further reading suggestions
Format the response as JSON that matches this TypeScript interface:
{
title: string;
relevance: number;
description: string;
content: string;
subtopics: Array<{
title: string;
description: string;
content: string;
}>;
references: string[];
}
Only respond with the JSON data.
'''
return prompt |