Phoenix21 commited on
Commit
4f0c5f2
·
verified ·
1 Parent(s): c9c0e03

Update my_memory_logic.py

Browse files
Files changed (1) hide show
  1. 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
- "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
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([