This notebook goes over how to use theMongoDB
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
MongoDBChatMessageHistory
class to store chat message history in a Mongodb database.
Setup
The integration lives in thelangchain-mongodb
package, so we need to install that.
Usage
To use the storage you need to provide only 2 things:- Session Id - a unique identifier of the session, like user name, email, chat id etc.
- Connection string - a string that specifies the database connection. It will be passed to MongoDB create_engine function.
- database_name - name of the database to use
- collection_name - collection to use within that database