mongodb / chatbot

MongoDB Chatbot Framework. Powered by MongoDB and Atlas Vector Search.
https://mongodb.github.io/chatbot/
Apache License 2.0
106 stars 48 forks source link

Script: Get the text transcript of a conversation #304

Closed nlarew closed 5 months ago

nlarew commented 5 months ago

Usage

npm run scripts:getConversationText -- <Conversation._id>

Example

npm run scripts:getConversationText -- 65aaf4dd36a5cac6e828b6be
USER: How do you import or migrate data into MongoDB Atlas?
ASSISTANT: You can import or migrate data into MongoDB Atlas using the following methods:\n\n1. Live Migration: If both the source and destination clusters are running MongoDB 6.0.8 or later, you can use the guided live migration feature in the Atlas UI. There are two types of live migration available: "pull" and "push". For detailed instructions, you can refer to the following pages in the Atlas documentation:\n   - [Live Migrate (Pull) a MongoDB 6.0.8 or Later Cluster into Atlas](https://docs.atlas.mongodb.com/import/live-migration-pull/)\n   - [Live Migrate (Push) a MongoDB 6.0.8 or Later Cluster Monitored by Cloud Manager into Atlas](https://docs.atlas.mongodb.com/import/live-migration-push/)\n\n2. Self-guided Migration: You can also use self-guided migration tools to migrate data from your existing deployments into Atlas. The specific tools and methods depend on your deployment type. For more information, you can refer to the "Migrate or Import Data" page in the Atlas documentation.\n\nAdditionally, you can use Compass to export and import data, or migrate data with self-managed tools if you are using a serverless instance. To learn more about these options, you can refer to the "Additional Reference" section in the documentation.\n\nPlease note that the availability of certain migration methods may depend on the version of MongoDB you are using.
USER: asefasef
ASSISTANT: To import or migrate data into MongoDB Atlas, you have a few options depending on your specific requirements:\n\n1. **Live Migration**: If both the source and destination clusters are running MongoDB 6.0.8 or later, you can use the guided live migration feature in the Atlas UI. There are two types of live migration available: "pull" and "push". You can follow the instructions provided in the Atlas documentation for each type of migration:\n   - [Live Migrate (Pull) a MongoDB 6.0.8 or Later Cluster into Atlas](https://docs.atlas.mongodb.com/import/live-migration-pull/)\n   - [Live Migrate (Push) a MongoDB 6.0.8 or Later Cluster Monitored by Cloud Manager into Atlas](https://docs.atlas.mongodb.com/import/live-migration-push/)\n\n2. **Self-guided Migration**: If you prefer a self-guided approach, you can use tools to migrate data from your existing deployments into Atlas. The specific tools and methods depend on your deployment type. You can refer to the "Migrate or Import Data" page in the Atlas documentation for more information.\n\n3. **MongoDB Compass**: If you want to upload data using MongoDB Compass, you can follow these steps:\n   - Download the `/data/products.json` file.\n   - Open MongoDB Compass and paste your connection string into the "New Connection" menu, then click "Connect" or "Save & Connect".\n   - Navigate to the "products" collection in your database using the left-side menu and select it.\n   - Click the "Import Data" button in the middle of the screen and select the `products.json` file you downloaded. Confirm the import, and you will see the documents in your "products" collection.\n\nPlease note that the availability of certain migration methods may depend on the version of MongoDB you are using.
nlarew commented 5 months ago

what's this for out of curiosity?

Generally to make it easier to copy a conversation out of the DB for analysis / reporting