A mock data generator fully integrated with chat-gpt and docker.
- Any enviroment to run php
- Clone the repository
git clone https://github.com/giovanni-iannaccone/mockGPT
- Move the mockGPT folder inside /xampp/htdocs
- Start apache
- Enter the directory
cd mockGPT
- Build and run using the compose
docker-compose up -d
Create a .json file with this structure
{
"return_types": {
},
"number_of_data_to_generate": "the int number of mock data",
"chat_gpt_api_key": "YOUR_API_KEY"
}
-
return_types: it basically represent the structure of the json file that will be returned with the data type of each field, chat gpt will use them so you can type whatever you want but if you want to generate images you must write IMAGE
-
number_of_data_to_generate: how many of the mock data will be generated
Go to http://localhost:[PORT]/index.php?configurations=[CONFIGURATION_FILE].json
- [PORT]: this must be the port the php server is running on
- [CONFIGURATION_FILE]: this must be the path to the configuration file for mockGPT
Send an http request ( using axios, fetch or any method you like ) to the url and retrieve the data in json format.
We welcome contributions! Please follow these steps:
- Fork the repository.
- Create a new branch ( using this convention).
- Make your changes and commit them with descriptive messages.
- Push your changes to your fork.
- Create a pull request to the main repository.
This project is licensed under the GPL-3.0 License. See the LICENSE file for details.
For any inquiries or support, please contact iannacconegiovanni444@gmail.com
Visit my site for more informations about me and my work https://giovanni-iannaccone.github.io