QAway-to
commited on
Commit
·
7e14c8d
1
Parent(s):
97efcfb
New prompt
Browse files- core/interviewer.py +7 -4
core/interviewer.py
CHANGED
|
@@ -34,11 +34,14 @@ async def generate_question(user_id: str, user_text: str) -> str:
|
|
| 34 |
prev_qs = " | ".join(history["questions"][-5:]) # последние 5 вопросов
|
| 35 |
|
| 36 |
prompt = (
|
| 37 |
-
f"
|
| 38 |
-
"
|
| 39 |
-
"
|
| 40 |
-
"
|
|
|
|
|
|
|
| 41 |
)
|
|
|
|
| 42 |
loop = asyncio.get_event_loop()
|
| 43 |
result = await loop.run_in_executor(None, lambda: llm_pipe(prompt)[0]["generated_text"])
|
| 44 |
cleaned = clean_question(result)
|
|
|
|
| 34 |
prev_qs = " | ".join(history["questions"][-5:]) # последние 5 вопросов
|
| 35 |
|
| 36 |
prompt = (
|
| 37 |
+
f"The following is an MBTI personality interview.\n"
|
| 38 |
+
f"User: {user_text}\n"
|
| 39 |
+
f"Interviewer: ask one new, open-ended question starting with 'What', 'Why', 'How', or 'When'. "
|
| 40 |
+
f"Ask naturally and concisely, without instructions or explanations.\n"
|
| 41 |
+
f"Previous questions: {prev_qs or 'None'}\n"
|
| 42 |
+
f"Interviewer:"
|
| 43 |
)
|
| 44 |
+
|
| 45 |
loop = asyncio.get_event_loop()
|
| 46 |
result = await loop.run_in_executor(None, lambda: llm_pipe(prompt)[0]["generated_text"])
|
| 47 |
cleaned = clean_question(result)
|