Spaces:
Paused
Paused
Update src/prompts.py
Browse files- src/prompts.py +6 -2
src/prompts.py
CHANGED
|
@@ -287,11 +287,15 @@ def dict_to_string(d, indent=0):
|
|
| 287 |
spacing = " " * indent
|
| 288 |
|
| 289 |
if isinstance(value, dict):
|
| 290 |
-
result += f"{spacing}{key}:\n"
|
| 291 |
# Recursively call the function for nested dictionaries
|
| 292 |
result += dict_to_string(value, indent + 1)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 293 |
else:
|
| 294 |
-
result += f"{spacing}{key}: {value}\n"
|
| 295 |
|
| 296 |
return result
|
| 297 |
|
|
|
|
| 287 |
spacing = " " * indent
|
| 288 |
|
| 289 |
if isinstance(value, dict):
|
| 290 |
+
result += f"{spacing}{key}:\n\n"
|
| 291 |
# Recursively call the function for nested dictionaries
|
| 292 |
result += dict_to_string(value, indent + 1)
|
| 293 |
+
elif isinstance(value, list):
|
| 294 |
+
result += f"{spacing}{key}:\n\n"
|
| 295 |
+
for i in value:
|
| 296 |
+
result += f"{spacing}{i}"
|
| 297 |
else:
|
| 298 |
+
result += f"{spacing}{key}: {value}\n\n"
|
| 299 |
|
| 300 |
return result
|
| 301 |
|