mirror of
https://github.com/imartinez/privateGPT.git
synced 2025-06-26 15:34:08 +00:00
Fixed history_messages in ui.py
This commit is contained in:
parent
89477ea9d3
commit
f12c57b472
@ -155,7 +155,7 @@ class PrivateGptUi:
|
||||
)
|
||||
|
||||
# max 20 messages to try to avoid context overflow
|
||||
return history_messages[:20]
|
||||
return history_messages[-20:]
|
||||
|
||||
new_message = ChatMessage(content=message, role=MessageRole.USER)
|
||||
all_messages = [*build_history(), new_message]
|
||||
|
Loading…
Reference in New Issue
Block a user