Update my_memory_logic.py
Browse files- my_memory_logic.py +8 -8
my_memory_logic.py
CHANGED
@@ -15,15 +15,15 @@ from langchain_groq import ChatGroq
|
|
15 |
memory = ConversationBufferMemory(return_messages=True)
|
16 |
|
17 |
# 2) Restatement system prompt for question rewriting
|
18 |
-
restatement_system_prompt =
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
|
|
25 |
|
26 |
-
)
|
27 |
|
28 |
# 3) Build the ChatPromptTemplate
|
29 |
restatement_prompt = ChatPromptTemplate.from_messages([
|
|
|
15 |
memory = ConversationBufferMemory(return_messages=True)
|
16 |
|
17 |
# 2) Restatement system prompt for question rewriting
|
18 |
+
restatement_system_prompt = """
|
19 |
+
You have a conversation history plus a new user question.
|
20 |
+
Your ONLY job is to rewrite the user's latest question so it
|
21 |
+
makes sense on its own.
|
22 |
+
- Do NOT repeat or quote large sections of the conversation.
|
23 |
+
- Do NOT provide any answer or summary.
|
24 |
+
- Just produce a short, standalone question as your final output.
|
25 |
+
"""
|
26 |
|
|
|
27 |
|
28 |
# 3) Build the ChatPromptTemplate
|
29 |
restatement_prompt = ChatPromptTemplate.from_messages([
|