Spaces:
Build error
Build error
Move JSON generation template to an external file with a placeholder
Browse files
examples/example_03.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"topic": "wireless machine communication"
|
| 3 |
+
}
|
langchain_templates/text_to_json_template.txt
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 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 |
+
The output JSON must contain everything from the input text, do not lose anything.
|
| 37 |
+
|
| 38 |
+
Output:
|
| 39 |
+
```json
|