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: make first stream message to send empty content #751

Merged
merged 1 commit into from
Jul 15, 2023
Merged

Conversation

mudler
Copy link
Owner

@mudler mudler commented Jul 15, 2023

Previously we were using omitempty which was then parsed by clients as "". Now we return null, which certain clients concatenates blindly.

This makes it close to OpenAI where the first message sent has an empty content, but just the role.

Description

This PR fixes
Screenshot from 2023-07-15 22-49-48

Notes for Reviewers

Signed commits

  • Yes, I signed my commits.

Previously we were using omitempty which was then parsed by clients as
"". Now we return null, which certain clients concatenates blindly.

This makes it close to OpenAI where the first message sent has an empty
content, but just the role.

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
@mudler mudler merged commit 17294ae into master Jul 15, 2023
@mudler mudler deleted the initial_message branch July 15, 2023 20:50
@mudler mudler added the bug Something isn't working label Jul 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant