Skip to content

Commit

Permalink
Fix chitchat lost context (#1828)
Browse files Browse the repository at this point in the history
Co-authored-by: luowei <glpat-EjySCyNjWiLqAED-YmwM>
Co-authored-by: crazywoola <[email protected]>
Co-authored-by: crazywoola <[email protected]>
  • Loading branch information
3 people authored Dec 23, 2023
1 parent 6da3a33 commit 6b57e4e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def buffer(self) -> List[BaseMessage]:
# fetch limited messages desc, and return reversed
messages = db.session.query(Message).filter(
Message.conversation_id == self.conversation.id,
Message.answer_tokens > 0
Message.answer != ''
).order_by(Message.created_at.desc()).limit(self.message_limit).all()

messages = list(reversed(messages))
Expand Down

0 comments on commit 6b57e4e

Please sign in to comment.