Programming Design Paradigms - Homework 1
Name : Pranav Raj Sowrirajan Balaji
Date : 27 January 2024
This project is a PromptsManager created for recording ChatGPT prompts and responses.
It has the MAIN Class PromptsManager in the filename "PromptsManager.js", which contains all the main functionalities along with a menu-driven approach to accept user inputs. There also other classes such as Interaction which records the prompts and responses from ChatGPT and displays them, TimestampedInteraction which adds timestamps to existing interactions, DalleInteraction adds prompts and responses from ChatGPT which involve images and has function to show if a record is Dalleinteractions or not, a Reference Manager class to delete records of interactions already present.
This project has various functionalities like:
1.Insert a new record for ChatGPT prompt and response.
2.Delete a record from existing records.
3.Show all available records and their types.
4.Add DalleInteractions : It needs three parameters i.e (prompt,response, Image URL)
5.Add Timestamps to existing records, default is current time & date
6.Search for either a prompt/response by using a keyword that is contained in the prompt/response. ----> (Creative Addition)
To install the project, follow these steps:
- Clone the repository:
git clone [repository url]
- Navigate into the project directory:
cd [project directory]
- Install the dependencies:
npm install
To run the project, use the following command: node PromptsManager.js
To test out the code after successfully installing the modules, simply run the program which bring up the user-menu to perform different actions such as insert, delete, search, show. To quit the program simple type exit
in the terminal.
The program has been tested thoroughly for all its different functionalities, and also has one existing record at index "0" which is a dummy placeholder for ChatGPT prompt and response. The record is prompt: "Hello", Response : "HI".
Contributions are welcome. Please fork the repository and create a pull request with your changes.
This project is licensed under the MIT License. See the LICENSE file for more details.