You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the existing issues and none cover this bug.
Description
def build_history() -> list[ChatMessage]:`
history_messages: list[ChatMessage] = []
for interaction in history:
history_messages.append(
ChatMessage(content=interaction[0], role=MessageRole.USER)
)
if len(interaction) > 1 and interaction[1] is not None:
history_messages.append(
ChatMessage(
# Remove from history content the Sources information
content=interaction[1].split(SOURCES_SEPARATOR)[0],
role=MessageRole.ASSISTANT,
)
)
# max 20 messages to try to avoid context overflow
return history_messages[:20]
This last line where history_message is being spliced with [:20] doesn't make sense because this is grabbing the first 20 messages in the chat history. So if the chat continues longer than 20 messages, then nothing will be added to the chat history. I think this should be changed to [-20:] instead to grab the last 20 messages instead of the first 20.
Steps to Reproduce
Use PrivateGPT UI normally
Expected Behavior
Chat history should comprise of last 20 messages
Actual Behavior
Chat history only tracks first 20 messages
Environment
N/A
Additional Information
No response
Version
No response
Setup Checklist
Confirm that you have followed the installation instructions in the project’s documentation.
Check that you are using the latest version of the project.
Verify disk space availability for model storage and data processing.
Ensure that you have the necessary permissions to run the project.
NVIDIA GPU Setup Checklist
Check that the all CUDA dependencies are installed and are compatible with your GPU (refer to CUDA's documentation)
Ensure an NVIDIA GPU is installed and recognized by the system (run nvidia-smi to verify).
Ensure proper permissions are set for accessing GPU resources.
Docker users - Verify that the NVIDIA Container Toolkit is configured correctly (e.g. run sudo docker run --rm --gpus all nvidia/cuda:11.0.3-base-ubuntu20.04 nvidia-smi)
The text was updated successfully, but these errors were encountered:
Pre-check
Description
This last line where history_message is being spliced with [:20] doesn't make sense because this is grabbing the first 20 messages in the chat history. So if the chat continues longer than 20 messages, then nothing will be added to the chat history. I think this should be changed to [-20:] instead to grab the last 20 messages instead of the first 20.
Steps to Reproduce
Use PrivateGPT UI normally
Expected Behavior
Chat history should comprise of last 20 messages
Actual Behavior
Chat history only tracks first 20 messages
Environment
N/A
Additional Information
No response
Version
No response
Setup Checklist
NVIDIA GPU Setup Checklist
nvidia-smi
to verify).sudo docker run --rm --gpus all nvidia/cuda:11.0.3-base-ubuntu20.04 nvidia-smi
)The text was updated successfully, but these errors were encountered: