Update app.py

This commit is contained in:
Saifeddine ALOUI 2025-02-13 15:26:37 +01:00 committed by GitHub
parent 6fe088db1f
commit 6199263935
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1393,7 +1393,10 @@ Answer directly with the reformulation of the last prompt.
if generation_type != "simple_question":
# Accumulate messages starting from message_index
for i in range(message_index, -1, -1):
message = messages[i]
if self.config.keep_thoughts:
message = messages[i]
else:
message = self.personality.remove_thinking_blocks(messages[i])
# Check if the message content is not empty and visible to the AI
if message.content != '' and (