DocsGPT icon indicating copy to clipboard operation
DocsGPT copied to clipboard

error handling for /stream endpoints

Open sarfarazsiddiquii opened this issue 1 year ago • 11 comments

This PR (ref #910) addresses both frontend and application aspects of implementing error handling for the /stream endpoint.

It enables the frontend to display meaningful error messages when errors occur during streaming, while the backend ensures proper wrapping of the stream function to handle and stream error types back to the frontend.

during my first PR i overlooked some tests, in this PR the failed tests issue is resolved.

sarfarazsiddiquii avatar Apr 09 '24 10:04 sarfarazsiddiquii

@sarfarazsiddiquii is attempting to deploy a commit to the Arc53 Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Apr 09 '24 10:04 vercel[bot]

Can you rebase your commit to sync with the latest version please, so that we can avoid branch conflicts. Thank you!

dartpain avatar Apr 10 '24 09:04 dartpain

@dartpain, thank you for your response. I have rebased my commits as requested.

Please let me know if there are any further changes needed for this PR.

sarfarazsiddiquii avatar Apr 10 '24 19:04 sarfarazsiddiquii

Thank you, @dartpain , for pointing out the issues with the retriever integration and the removal of the engine. I'm sorry for the oversight during the rebase process. The issue should be fixed in my latest commit.

sarfarazsiddiquii avatar Apr 11 '24 18:04 sarfarazsiddiquii

Thank you so much, final thing would be: to adapt FAILED tests/test_error.py::test_bad_request_without_message in the tests file now.

dartpain avatar Apr 12 '24 08:04 dartpain

Thanks, @dartpain , for the feedback. After the last commit, everything looks fine. I have updated tests/test_error.py::test_response_error_without_message and tests/test_error.py::test_bad_request_without_message to match the expected error message outputs.

sarfarazsiddiquii avatar Apr 12 '24 11:04 sarfarazsiddiquii

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-gpt ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 18, 2024 8:10am

vercel[bot] avatar Apr 15 '24 10:04 vercel[bot]

So I captured this error when I tried making a request, although its not dispayed on Frontend Im happy to see that it was logged CleanShot 2024-04-15 at 11 40 23@2x

But the error is due to this change: CleanShot 2024-04-15 at 11 42 47@2x

dartpain avatar Apr 15 '24 10:04 dartpain

Thanks @dartpain, my recent commit stores the latest query's error in Redux, and conversation.tsx handles its display. and the error due to settings.gpt_model is now fixed. Another possible solution to this problem would be to use alert. Let me know if further changes are needed.

sarfarazsiddiquii avatar Apr 15 '24 18:04 sarfarazsiddiquii

@dartpain, could you please review the changes I made in my last commit and confirm if they are correct? Alternatively, if you believe I should use an alert or consider any other possible solution, please let me know. Thanks.

sarfarazsiddiquii avatar Apr 18 '24 07:04 sarfarazsiddiquii

Hey, I keep getting this error TypeError: Can't instantiate abstract class DOCSGTAPILLM with abstract nethod pen strean Please check it out, also please try syncing with main branch, might help

dartpain avatar Apr 23 '24 14:04 dartpain

Hi, we had large migration in last iteration, added error handling at endpoint layer. Thank you!

dartpain avatar Sep 23 '24 11:09 dartpain