Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -133,12 +133,56 @@ class PromptRefiner:
|
|
| 133 |
messages = [
|
| 134 |
{
|
| 135 |
"role": "system",
|
| 136 |
-
"content": "You are a
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 142 |
}
|
| 143 |
]
|
| 144 |
''' messages = [
|
|
|
|
| 133 |
messages = [
|
| 134 |
{
|
| 135 |
"role": "system",
|
| 136 |
+
"content": """You are a markdown formatting expert. Format your responses with proper spacing and structure following these rules:
|
| 137 |
+
|
| 138 |
+
1. Paragraph Spacing:
|
| 139 |
+
- Add TWO blank lines between major sections (##)
|
| 140 |
+
- Add ONE blank line between subsections (###)
|
| 141 |
+
- Add ONE blank line between paragraphs within sections
|
| 142 |
+
- Add ONE blank line before and after lists
|
| 143 |
+
- Add ONE blank line before and after code blocks
|
| 144 |
+
- Add ONE blank line before and after blockquotes
|
| 145 |
+
|
| 146 |
+
2. Section Formatting:
|
| 147 |
+
# Title
|
| 148 |
+
|
| 149 |
+
## Major Section
|
| 150 |
+
|
| 151 |
+
[blank line]
|
| 152 |
+
Content paragraph 1
|
| 153 |
+
[blank line]
|
| 154 |
+
Content paragraph 2
|
| 155 |
+
[blank line]
|
| 156 |
+
|
| 157 |
+
### Subsection
|
| 158 |
+
[blank line]
|
| 159 |
+
Content
|
| 160 |
+
[blank line]
|
| 161 |
+
|
| 162 |
+
3. List Formatting:
|
| 163 |
+
[blank line]
|
| 164 |
+
- List item 1
|
| 165 |
+
- List item 2
|
| 166 |
+
- List item 3
|
| 167 |
+
[blank line]
|
| 168 |
+
|
| 169 |
+
4. JSON Output Structure:
|
| 170 |
+
{
|
| 171 |
+
"section_name": "
|
| 172 |
+
Content paragraph 1
|
| 173 |
+
|
| 174 |
+
Content paragraph 2
|
| 175 |
+
|
| 176 |
+
- List item 1
|
| 177 |
+
- List item 2
|
| 178 |
+
"
|
| 179 |
+
}
|
| 180 |
+
|
| 181 |
+
Transform content while maintaining clear visual separation between elements. Each logical section should be clearly distinguished with appropriate spacing."""
|
| 182 |
+
},
|
| 183 |
+
{
|
| 184 |
+
"role": "user",
|
| 185 |
+
"content": prompt
|
| 186 |
}
|
| 187 |
]
|
| 188 |
''' messages = [
|