fix: in oai chat completion, use msg name field instead of prepended to msg content#754
Closed
stevenksmith wants to merge 4 commits intoagnaistic:devfrom
Closed
fix: in oai chat completion, use msg name field instead of prepended to msg content#754stevenksmith wants to merge 4 commits intoagnaistic:devfrom
stevenksmith wants to merge 4 commits intoagnaistic:devfrom
Conversation
khanonnie
approved these changes
Dec 13, 2023
Contributor
khanonnie
left a comment
There was a problem hiding this comment.
i like this more than having an entirely new option for this behavior, since not including char/user names in messages at all seemed to make outputs worse so i don't think you'd ever want to turn it off.
srv/adapter/chat-completion.ts
Outdated
| const isUser = line.startsWith(handle) | ||
| const isBot = !isUser && !isSystem | ||
|
|
||
| const name = isBot ? replyAs.name : isUser ? handle : undefined |
Contributor
There was a problem hiding this comment.
Is handle by this point accounting for impersonated characters? I'd assume so
Contributor
Author
There was a problem hiding this comment.
Good catch, this was breaking past impersonations (registering them as the main character in assistant message), and example messages (incorrect splitting). This is fixed in c4eefd5
Contributor
Author
|
Sorry for flipflopping but I now think #751 is better. |
Member
Yes, I think this will have bad side effects. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
supersedes #751
addresses part of #739