-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
error handling for /stream endpoints #914
base: main
Are you sure you want to change the base?
Conversation
@sarfarazsiddiquii is attempting to deploy a commit to the Arc53 Team on Vercel. A member of the Team first needs to authorize it. |
Bumps [pymongo](https://github.com/mongodb/mongo-python-driver) from 4.6.1 to 4.6.3. - [Release notes](https://github.com/mongodb/mongo-python-driver/releases) - [Changelog](https://github.com/mongodb/mongo-python-driver/blob/master/doc/changelog.rst) - [Commits](mongodb/mongo-python-driver@4.6.1...4.6.3) --- updated-dependencies: - dependency-name: pymongo dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]>
Removes [tar](https://github.com/isaacs/node-tar). It's no longer used after updating ancestor dependency [npm](https://github.com/npm/cli). These dependencies need to be updated together. Removes `tar` Updates `npm` from 10.5.0 to 10.5.1 - [Release notes](https://github.com/npm/cli/releases) - [Changelog](https://github.com/npm/cli/blob/latest/CHANGELOG.md) - [Commits](npm/cli@v10.5.0...v10.5.1) --- updated-dependencies: - dependency-name: tar dependency-type: indirect - dependency-name: npm dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]>
Can you rebase your commit to sync with the latest version please, so that we can avoid branch conflicts. |
5813c29
to
edf6dbc
Compare
@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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Think some stuff was lost due to rebase.
Please check out the retriever part.
Now answers are generated using retrievers.
Thank you!
application/llm/docsgpt_provider.py
Outdated
context = messages[0]['content'] | ||
user_question = messages[-1]['content'] | ||
prompt = f"### Instruction \n {user_question} \n ### Context \n {context} \n ### Answer \n" | ||
def gen_stream(self, model, engine, messages, stream=True, **kwargs): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We removed the engine here recently
|
||
retriever = RetrieverCreator.create_retriever(retriever_name, question=question, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think during rebase you have removed some recent changes.
We should be using retrievers now for generating answers
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. |
Thank you so much, final thing would be: |
Thanks, @dartpain , for the feedback. After the last commit, everything looks fine. I have updated |
Untraced types in react widget
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…multi-4407677fd1 build(deps): bump tar and npm in /docs
…mongo-4.6.3 Bump pymongo from 4.6.1 to 4.6.3 in /application
Thanks @dartpain, my recent commit stores the latest query's error in Redux, and |
@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. |
gpt_model=gpt_model) | ||
|
||
return Response( | ||
stream_with_context(complete_stream(question, retriever, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi @sarfarazsiddiquii
the chat_history
argument is being passed here in the complete_stream
function without specifying it in the function definition which is throwing an error
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @siiddhantt for addressing the error, it seems like chat_history
and prompt_id
was unnecessary regarding this issue.
I may have overlooked the above create_retriever
function while making changes. I removed the unnecessary properties from complete_stream
function and the recent commit should work without any errors.
Tell me if any further changes are required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No worries, I'd recommend running the code and testing the flow as I encountered this error at the very start. Do let me know when you've tested it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hey @siiddhantt , I have made some minor changes since my last commits, and after running the code as requested, I did not encounter any errors, and the code worked fine. Please review the commits, and if you encounter any errors, please let me know what errors you're getting.
Thank you.
Hey, I keep getting this error |
This PR (ref #910) addresses both
frontend
andapplication
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.