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

fix: add empty message filtering for anthropic #156

Merged
merged 1 commit into from
Dec 5, 2024

Conversation

kevin-on
Copy link
Collaborator

@kevin-on kevin-on commented Dec 5, 2024

Handle following error when empty assistant message is given to anthropic models

Failed to generate response Error: 400 {"type":"error","error":{"type":"invalid_request_error","message":"messages.1: all messages must have non-empty content except for the optional final assistant message"}}

@kevin-on kevin-on merged commit 9ec22fc into main Dec 5, 2024
1 check passed
@kevin-on kevin-on deleted the fix/anthropic-empty-message-handling branch December 5, 2024 05:36
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.

fix: Handle error for empty assistant message in claude bug report: response error 400
2 participants