MongoDB
MongoDB
is a source-available cross-platform document-oriented database program. Classified as a NoSQL database program,MongoDB
usesJSON
-like documents with optional schemas.
MongoDB
is developed by MongoDB Inc. and licensed under the Server Side Public License (SSPL). - Wikipedia
This notebook goes over how to use the MongoDBChatMessageHistory
class to store chat message history in a Mongodb database.
Setup
The integration lives in the langchain-mongodb
package, so we need to install that.
pip install -U --quiet langchain-mongodb
It's also helpful (but not needed) to set up LangSmith for best-in-class observability
# os.environ["LANGCHAIN_TRACING_V2"] = "true"
# os.environ["LANGCHAIN_API_KEY"] = getpass.getpass()