-
Notifications
You must be signed in to change notification settings - Fork 9
DOCSP-49240: Add LangChain semantic cache and Local RAG notebooks #17
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
base: main
Are you sure you want to change the base?
Conversation
59e1e36
to
056011d
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.
Nice to see a little API improvement here re: creating the vector index with the integration! I've got a question on PyMongo usage in the semantic cache PR here that I'd like to coordinate on before approving.
"# Wait for the index to build (this can take around a minute)\n", | ||
"time.sleep(60)" | ||
" dimensions = 1536, # The dimensions of the vector embeddings to be indexed\n", | ||
" wait_until_complete = 60 # Number of seconds to wait for the index to build (can take around a minute)\n", |
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.
Ooo, this is a nice improvement! 🎉
}, | ||
"outputs": [], | ||
"source": [ | ||
"pip install --quiet --upgrade langchain langchain-community langchain-core langchain-mongodb langchain-openai pymongo" |
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 guess a general question here is should we try to specify a specific version of pymongo
that complies with the langchain-mongodb
integration requirements?
When I run this command, I get the following error:
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
langgraph-checkpoint-mongodb 0.1.0 requires pymongo<4.10.0,>=4.9.0, but you have pymongo 4.12.0 which is incompatible.
Presumably we could specify a version of PyMongo here that meets with this integration's requirements? (This error didn't actually prevent me from running the Notebook, but as a general practice, we shouldn't put up code that errors.)
Actually, in looking at this code again, I'm not seeing any imports using pymongo. Do we even need it here?
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 we can safely remove, I'll run this one more time to confirm it's not necessary
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.
Glad it works without the separate PyMongo dependency! But I don't see a commit here removing it from this notebook. Does something still need to be pushed here, @davidhou17 ?
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.
Oops. facepalm. fixed now
Confirmed that the notebook ran without pymongo! @dacharyc |
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.
LGTM! Thanks for removing that unneeded dependency.
No description provided.