-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Fixed LangChain Circular Import #9342
Conversation
52eb4aa
to
91d5e26
Compare
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.
As far as I know this was an issue since importing the session every request, it initialize the command executor and takes more then 5s. Is there any other way to solve this>
Hmm.. I did notice that it takes a while for some statements to execute at times. I will keep looking for another way. |
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.
IMO we should avoid this importing pattern all together because it's unclear how long importing a module may take. If this is causing a circular import, we should fix it in a cleaner way (importing SessionController
every request can take up to 5s).
I can look into this some more as well
…/fix_langchain_circular_dep
This reverts commit 91d5e26.
Hey @ZoranPandovski, @tmichaeldb, By doing this, I think we can also avoid problem of re-loading the session each time that you guys pointed out previously. Let me know what you think. |
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've tested, it works locally.
@tmichaeldb, do you have issues with it on windows?
As long as we tested that this does not incur additional latency per request let's go ahead and merge |
Description
This PR fixes a circular import in the LangChain integration that was making it unusable by moving it inside of the relevant function.
Fixes #9333
Type of change
Verification Process
To ensure the changes are working as expected:
Checklist: