Spaces:
Running
on
Zero
Running
on
Zero
Y Phung Nguyen
commited on
Commit
·
b4f06b4
1
Parent(s):
47e5fb1
Simplify question followup
Browse files- pipeline.py +6 -9
pipeline.py
CHANGED
|
@@ -56,16 +56,13 @@ def _history_to_text(history: list, limit: int = 6) -> str:
|
|
| 56 |
|
| 57 |
|
| 58 |
def _format_intake_question(question: dict, round_idx: int, max_rounds: int, target_lang: str) -> str:
|
| 59 |
-
header = f"🩺
|
| 60 |
body = question.get("question") or "Could you share a bit more detail so I can give an accurate answer?"
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
if why:
|
| 67 |
-
prompt_parts.append(f"Why it matters: {why}")
|
| 68 |
-
prompt_parts.append("Please answer in 1-2 sentences so I can continue.")
|
| 69 |
prompt_text = "\n\n".join(prompt_parts)
|
| 70 |
if target_lang and target_lang != "en":
|
| 71 |
try:
|
|
|
|
| 56 |
|
| 57 |
|
| 58 |
def _format_intake_question(question: dict, round_idx: int, max_rounds: int, target_lang: str) -> str:
|
| 59 |
+
header = f"🩺 Question for clarity {round_idx}/{max_rounds}"
|
| 60 |
body = question.get("question") or "Could you share a bit more detail so I can give an accurate answer?"
|
| 61 |
+
prompt_parts = [
|
| 62 |
+
header,
|
| 63 |
+
body,
|
| 64 |
+
"Please answer in 1-2 sentences so I can continue."
|
| 65 |
+
]
|
|
|
|
|
|
|
|
|
|
| 66 |
prompt_text = "\n\n".join(prompt_parts)
|
| 67 |
if target_lang and target_lang != "en":
|
| 68 |
try:
|