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

Default the role to 'model' for chat responses #205

Merged
merged 1 commit into from
Aug 16, 2024
Merged

Default the role to 'model' for chat responses #205

merged 1 commit into from
Aug 16, 2024

Conversation

natebosch
Copy link
Collaborator

Fixes #197

A content requires a role when it is sent to the model in the history.
If the backend happens to respond with a message that has no role,
default it to 'model'.

Fixes #197

A content requires a role when it is sent to the model in the history.
If the backend happens to respond with a message that has no role,
default it to 'model'.
@natebosch
Copy link
Collaborator Author

I think the TODO was because I was aware that roles were required when we send the message, but I had never seen a case where the backend replied without a role. We have a report of such a case, so add the defaulting in.

@natebosch natebosch merged commit 6082f2f into main Aug 16, 2024
7 checks passed
@natebosch natebosch deleted the null-role branch August 16, 2024 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: role with null value added to the history on content blocked due to Safety reasons
2 participants