Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error "Could not determine chat role" when sending too many messages to a single chat #633

Open
igrmk opened this issue Oct 12, 2024 · 0 comments · May be fixed by #634
Open

Error "Could not determine chat role" when sending too many messages to a single chat #633

igrmk opened this issue Oct 12, 2024 · 0 comments · May be fixed by #634

Comments

@igrmk
Copy link

igrmk commented Oct 12, 2024

I have an alias set up to use the predefined role using the --chat option.
For example, --chat improve is automatically added to every "Improve writing" query.

ShellGPT truncates the chat using the CHAT_CACHE_LENGTH option
each time it saves the conversation.

As a result, the first message eventually gets removed,
causing the tool to display "Could not determine chat role",
since the role is defined in that initial message.

To prevent this issue, the first message should likely never be truncated.

igrmk added a commit to igrmk/shell_gpt that referenced this issue Oct 12, 2024
igrmk added a commit to igrmk/shell_gpt that referenced this issue Oct 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant