rendezqueue / rendezllama

CLI for llama.cpp with various commands to guide, edit, and regenerate tokens on the fly.
ISC License
10 stars 1 forks source link

bug: Assertion failure after user inputs a `/puts` command and then a newline #25

Closed grencez closed 1 year ago

grencez commented 1 year ago

chat.cc:248: bool rendezllama::commit_to_context(llama_context*, ChatDisplay&, ChatTrajectory&, const ChatOptions&): Assertion chat_traj.context_tokencount < chat_traj.token_count() failed.

Woopsie. This isn't exactly a workflow that the coprocess needs to support, but it's convenient for users.

The assertion is not valid in this case because we are doing 2 evals in a row. It's okay to not actually be eval-ing anything in the 2nd call. We could skip it. A better approach would be to have ChatTrajectory know when we haven't backtracked and therefore don't need to re-eval anything.