Update my_memory_logic.py
Browse files- my_memory_logic.py +7 -8
my_memory_logic.py
CHANGED
|
@@ -16,14 +16,13 @@ memory = ConversationBufferMemory(return_messages=True)
|
|
| 16 |
|
| 17 |
# 2) Restatement system prompt for question rewriting
|
| 18 |
restatement_system_prompt = (
|
| 19 |
-
"Given
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
"and keep it concise."
|
| 27 |
)
|
| 28 |
|
| 29 |
# 3) Build the ChatPromptTemplate
|
|
|
|
| 16 |
|
| 17 |
# 2) Restatement system prompt for question rewriting
|
| 18 |
restatement_system_prompt = (
|
| 19 |
+
"Given the entire chat history below and the latest user question,
|
| 20 |
+
your ONLY job is to rewrite or restate the latest question so it
|
| 21 |
+
makes sense on its own.
|
| 22 |
+
Do NOT repeat or quote large sections of the history.
|
| 23 |
+
Do NOT provide the answer or any additional explanation.
|
| 24 |
+
Respond ONLY with a short, standalone question."
|
| 25 |
+
|
|
|
|
| 26 |
)
|
| 27 |
|
| 28 |
# 3) Build the ChatPromptTemplate
|