Error handling when completion_tokens is 0
and missing finish_reason for choice 0
#5550
Unanswered
jameslamine
asked this question in
Troubleshooting
Replies: 2 comments 6 replies
-
This is an issue with your custom endpoint, it's not completely compatible with |
Beta Was this translation helpful? Give feedback.
6 replies
-
Are you still seeing |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What happened?
I'm running into an intermittent issue where the endpoint incorrectly returns 0 tokens and HTTP status 200. It responds with
completion_tokens: 0
andcontent: ""
.When this happens, LibreChat shows a blank reply with that blank content:
I think we could improve the user experience for how LibreChat handles this error.
We can see from the LibreChat logs that it (correctly) doesn't consider the response to be valid:
Ideally, the LibreChat UI should treat this as a failed response instead of showing the chat bot sending a blank response. That way it's obvious to the user that there was an error and they can click the retry button.
Here's the endpoint response itself:
This might be related to #1352
Steps to Reproduce
You can reproduce this by mocking a response which looks like this:
What browsers are you seeing the problem on?
Chrome
Relevant log output
Screenshots
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions