This project categorizes plugins and stores them in Firebase Firestore. It uses data from a JSON file, processes it with the Langchain API, and uses OpenAI to generate categories and assign them to plugins. Once the plugins are processed, they are uploaded to Firestore along with their assigned categories.
- Node.js: Make sure you have Node.js installed. You can download it from here.
- Firebase: The project uses Firebase Firestore for storing data. Make sure you have a Firebase account and a Firestore database setup.
- An
.env
file with your environment variables. - The
plugins-20230630.json
file located in the./data/
directory. You can also replace it with the data that you get when visiting ChatGPT's plugin store. (ps: in the network tab of the console)
-
Clone the repository
git clone https://github.com/davidyu37/RateMyPlugins-Data-Processor.git cd RateMyPlugins-Data-Processor
-
Install dependencies
npm install
-
Setup Firebase Download your Firebase Admin SDK service account JSON file and place it in the root directory. Rename it to firebase-adminsdk.json.
-
Setup Environment Variables The project uses a .env file for environment variables. Create a .env file in the root directory and setup your environment variables.
-
Run the scripts
- To run the script for processing and categorizing plugins:
node generateCategory.js
The results will be stored in ./output/newDocuments.json and ./output/categories.json.
- To upload the processed plugins and categories to Firestore:
node index.js
The results will be uploaded to your Firestore database under the plugins and categories collections respectively.
If you encounter any problems during setup, please open an issue on this GitHub repository or contact the project maintainers directly.
Contributions, issues, and feature requests are welcome. Feel free to check the issues page if you want to contribute.