-
-
Notifications
You must be signed in to change notification settings - Fork 141
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
[Feature Request] Migrate to Cohere v2/chat endpoint #633
Comments
Heads up, they just released a more standardized API today. v1 was so screwy! 🎉 Last message still needs to be user role or else it errors. |
Both ST and OpenRouter have migrated to v2. Consecutive same role messages do not need to be squashed (though you can), it just werks. System messages can be anywhere. Simply, the last message is user role. Most of the time it's safe to simply convert last message to user whether it was assistant or system. Group chat would naturally have an instruction to reply as {{char}}. An assistant message written in third person converted to user is OK in the event the user presses Send instead of Continue, which has continue prompt. OK if there are name prefixes, but Risu doesn't seem to have an Include Names option? The only time when converting to user may be screwy without attaching "Continue" user placeholder is solo no-name + assistant written in first person as last message. |
EDIT: SEE NEXT COMMENT. v2 API is easier to deal with. Frontends still need to manually migrate from v1 to v2. Below is just a weird bug report for v1.
Windows client v134.1.0
Problem: When no context is set (e.g. system prompt, persona, character) and Cohere API is selected, the [Start a new chat] system message gets malformed, and the first message is lost if it belongs to user role.
However, the first message as user returns if you continue the chat so there's 3+ messages. Notably, when there's a preamble and first message as user, [Start a new chat] is assigned to a message with system role instead of
preamble
.The bug does not occur if the first message belongs to assistant role, and [Start a new chat] appears in
preamble
.Edit: First message as assistant also creates a [Start a new chat] system message in
chat_history
when there is apreamble
.Note that SillyTavern always appends [Start a new Chat] (this line can be edited or disabled) to the end of
preamble
, which is the expected behavior.The text was updated successfully, but these errors were encountered: