Open igrmk opened 1 month ago
I've also aliased the --chat
option, and I have the same issue.
Could not determine chat role of "dd"
Hello @igrmk, thank you for raising the issue, I experiment the same behavior. For me, it seems to happen when I interrupt the chat with Ctrl-C and try to start it again.
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.