Update app.py
Browse files
app.py
CHANGED
@@ -331,8 +331,8 @@ def Link_Scratch(history, messages4):
|
|
331 |
message = HumanMessage(content=augmented_prompt)
|
332 |
messages4.append(message)
|
333 |
|
334 |
-
if len(messages4) >=
|
335 |
-
messages4 = messages4[-
|
336 |
|
337 |
response = chat_model.invoke(messages4)
|
338 |
messages4.append(AIMessage(content=response.content))
|
|
|
331 |
message = HumanMessage(content=augmented_prompt)
|
332 |
messages4.append(message)
|
333 |
|
334 |
+
if len(messages4) >= 2:
|
335 |
+
messages4 = messages4[-2:]
|
336 |
|
337 |
response = chat_model.invoke(messages4)
|
338 |
messages4.append(AIMessage(content=response.content))
|