MongoDB Chat Memory
MongoDB Chat Memory stores conversation history in MongoDB for flexible, document-based persistent storage.
Categories: Artificial Intelligence
Type: mongoDbChatMemory/v1
Connections
Version: 1
custom
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| username | Username | STRING | The MongoDB username. | false |
| password | Password | STRING | The MongoDB password. | false |
Actions
Add Messages
Name: addMessages
Adds messages to the chat memory for a conversation.
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| conversationId | Conversation ID | STRING | The unique identifier for the conversation. | true |
| messages | Messages | ARRAY Items[{STRING(role), STRING(content)}] | The messages to add to the conversation. | true |
Example JSON Structure
{
"label" : "Add Messages",
"name" : "addMessages",
"parameters" : {
"conversationId" : "",
"messages" : [ {
"role" : "",
"content" : ""
} ]
},
"type" : "mongoDbChatMemory/v1/addMessages"
}Output
This action does not produce any output.
Get Messages
Name: getMessages
Retrieves all messages from a conversation.
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| conversationId | Conversation ID | STRING | The unique identifier for the conversation. | true |
Example JSON Structure
{
"label" : "Get Messages",
"name" : "getMessages",
"parameters" : {
"conversationId" : ""
},
"type" : "mongoDbChatMemory/v1/getMessages"
}Output
Type: OBJECT
Properties
| Name | Type | Description |
|---|---|---|
| conversationId | STRING | |
| messages | ARRAY Items[{STRING(role), STRING(content)}] |
Output Example
{
"conversationId" : "",
"messages" : [ {
"role" : "",
"content" : ""
} ]
}Delete Conversation
Name: deleteConversation
Deletes all messages for a conversation.
Properties
| Name | Label | Type | Description | Required |
|---|---|---|---|---|
| conversationId | Conversation ID | STRING | The unique identifier for the conversation to delete. | true |
Example JSON Structure
{
"label" : "Delete Conversation",
"name" : "deleteConversation",
"parameters" : {
"conversationId" : ""
},
"type" : "mongoDbChatMemory/v1/deleteConversation"
}Output
Type: OBJECT
Properties
| Name | Type | Description |
|---|---|---|
| conversationId | STRING | |
| deleted | BOOLEAN Optionstrue, false |
Output Example
{
"conversationId" : "",
"deleted" : false
}List Conversations
Name: listConversations
Lists all conversation IDs in the chat memory.
Example JSON Structure
{
"label" : "List Conversations",
"name" : "listConversations",
"type" : "mongoDbChatMemory/v1/listConversations"
}Output
Type: OBJECT
Properties
| Name | Type | Description |
|---|---|---|
| conversationIds | ARRAY Items[STRING] | |
| count | INTEGER |
Output Example
{
"conversationIds" : [ "" ],
"count" : 1
}How is this guide?
Last updated on