mirror of
https://github.com/zylon-ai/private-gpt.git
synced 2025-12-22 10:45:42 +01:00
Fixed history_messages in ui.py
This commit is contained in:
parent
89477ea9d3
commit
f12c57b472
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue