-
-
Notifications
You must be signed in to change notification settings - Fork 370
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
Refactor Chat Handlers to Simplify Initialization #1257
Refactor Chat Handlers to Simplify Initialization #1257
Conversation
@dlqqq |
@Darshan808 Thanks for working on this! I left a comment on the thread above.
Really glad that you're thinking about this! 🤗 I recommend that this be done in a separate issue with a separate PR. Maintainers should keep their PRs focused and narrow in scope to prevent large code changes from being made all-at-once before others have a chance to review. If you'd like to work on moving the entry points logic to the |
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.
@Darshan808 Thanks! Great work on this PR, just a couple more issues to address.
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.
@Darshan808 Perfect, thank you! ❤️
This will likely need a manual backport to the 2.x
branch. Can you help with that?
@meeseeksdev please backport to 2.x |
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the If these instructions are inaccurate, feel free to suggest an improvement. |
* simplify-entrypoints-loading * fix-lint * fix-tests * add-retriever-typing * remove-retriever-from-base * fix-circular-import(ydoc-import) * fix-tests * fix-type-check-failure * refactor-retriever-init (cherry picked from commit 055d7b8)
@dlqqq @pytest.mark.skip("TODO v3: replace this with a unit test for YChatHistory") What do you suggest ? Should we open a separate PR to address this issue ? |
…nitialization) (#1266) * Refactor Chat Handlers to Simplify Initialization (#1257) * simplify-entrypoints-loading * fix-lint * fix-tests * add-retriever-typing * remove-retriever-from-base * fix-circular-import(ydoc-import) * fix-tests * fix-type-check-failure * refactor-retriever-init (cherry picked from commit 055d7b8) * fix-test-backporting * fix-ydoc-unwanted-import * fix-test * remove-exception * reorder-chat-handlers-storage
* simplify-entrypoints-loading * fix-lint * fix-tests * add-retriever-typing * remove-retriever-from-base * fix-circular-import(ydoc-import) * fix-tests * fix-type-check-failure * refactor-retriever-init
@Darshan808 @dlqqq As I was working on PR #1264 (unrelated to this one and not merged), I had to rebase/merge my branch to include the changes made here in this PR. After I did that, I noticed that the chat panel is not returning a response any more and just hangs, see: The console log shows this error: I cleaned out my entire conda environment, reinstalled it, and installed the developer version of Jupyter AI so that it includes the unreleased but merged PRs. I have used the main branch which does not contain changes from my PR, and I still get the error. @Darshan808 - can you check if the error I am getting is also evident in your installation? Thanks for the help. |
Hi @srdas, my apologies for the oversight. I just checked this branch and can confirm that the issue persists. It is caused by the problem described in #1266 (comment). which has already been addressed in #1268. @dlqqq, could you please review #1268 ? I believe it would be best to merge it as soon as possible to resolve this. Thanks! |
@Darshan808 Thanks for responding so quickly and noting this -- I'll test it after PR #1268 is merged. |
Thanks @Darshan808 - I tested it for v3 and v2 and it is now working after the merge. |
Is it logging the same error message ? It worked for me when I tested the branch. Could you share any helpful error message. I'll definitely look into it. |
Sorry, it is working, my error, I typed "not" instead of "now" in my message. Apologies for the confusion. |
Fixes #1256
Description
Refactored
BaseChatHandler
to includelogs_dir
andretriever
as required arguments, simplifying the initialization of/ask
,/generate
, and/learn
handlers. This removes the need for custom arguments inAskChatHandler
andGenerateChatHandler
.LearnChatHandler
now automatically binds itself toself.retriever
, allowing/ask
to perform RAG without extra logic.Looking for feedback on any potential edge cases this might introduce!