mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-24 03:52:10 +00:00
mongodb[patch]: Migrate MongoDBChatMessageHistory (#18590)
## **Description** Migrate the `MongoDBChatMessageHistory` to the managed `langchain-mongodb` partner-package ## **Dependencies** None ## **Twitter handle** @mongodb ## **tests and docs** - [x] Migrate existing integration test - [x ]~ Convert existing integration test to a unit test~ Creation is out of scope for this ticket - [x ] ~Considering delaying work until #17470 merges to leverage the `MockCollection` object. ~ - [x] **Lint and test**: Run `make format`, `make lint` and `make test` from the root of the package(s) you've modified. See contribution guidelines for more: https://python.langchain.com/docs/contributing/ --------- Co-authored-by: Erick Friis <erick@langchain.dev>
This commit is contained in:
@@ -21,10 +21,10 @@
|
||||
"source": [
|
||||
"## Setup\n",
|
||||
"\n",
|
||||
"The integration lives in the `langchain-community` package, so we need to install that. We also need to install the `pymongo` package.\n",
|
||||
"The integration lives in the `langchain-mongodb` package, so we need to install that.\n",
|
||||
"\n",
|
||||
"```bash\n",
|
||||
"pip install -U --quiet langchain-community pymongo\n",
|
||||
"pip install -U --quiet langchain-mongodb\n",
|
||||
"```"
|
||||
]
|
||||
},
|
||||
@@ -80,7 +80,7 @@
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from langchain_community.chat_message_histories import MongoDBChatMessageHistory\n",
|
||||
"from langchain_mongodb.chat_message_histories import MongoDBChatMessageHistory\n",
|
||||
"\n",
|
||||
"chat_message_history = MongoDBChatMessageHistory(\n",
|
||||
" session_id=\"test_session\",\n",
|
||||
|
Reference in New Issue
Block a user