A blog that's created by AI with openai API & vercel blog template.
Demo : https://blogai-five.vercel.app
![main_page](https://private-user-images.githubusercontent.com/66377701/244933928-d431f76c-17c8-4b62-98e8-a47ebb9a8c46.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1OTU0MDQsIm5iZiI6MTczOTU5NTEwNCwicGF0aCI6Ii82NjM3NzcwMS8yNDQ5MzM5MjgtZDQzMWY3NmMtMTdjOC00YjYyLTk4ZTgtYTQ3ZWJiOWE4YzQ2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDA0NTE0NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJjYzY1MTk0YzdmY2ExODkwYTg5MDU1YWNhYmFlYjFmMzJkODRkYWViYzk5YjU5NWZlMDMzMTNjYzBhMGFiNDMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Rout-ljKHR8FAeLiSHnRn-9iY4WsM5lOct7pYkZGK-A)
![post_page](https://private-user-images.githubusercontent.com/66377701/244933930-71ce9276-005f-4f10-87c9-c76f904ec103.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1OTU0MDQsIm5iZiI6MTczOTU5NTEwNCwicGF0aCI6Ii82NjM3NzcwMS8yNDQ5MzM5MzAtNzFjZTkyNzYtMDA1Zi00ZjEwLTg3YzktYzc2ZjkwNGVjMTAzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDA0NTE0NFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE4ZDdkZjI3ZmNjYzA0ZTRlNGU5ODAzN2RmMDhkMmJjM2Y3ZmIzM2FhZWY0NjY2MjZhMzI3MjFhMWU3YzgyZGQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.9VwtjX_t864n7-nnAkt4QKqhqRzh58RU6Vt3lJxA4HI)
With the python openai library you can make API call's to the openai's ai models. In this project, with the davinci model we give the model the syntax and the topic (can be random) that we want and the ai and python take's the rest of the work.
-
Simply sign in to vercel & deploy the "Next.js Contentlayer Blog Starter" template and pull it to your computer.
-
Then open a new directory on your computer and initialize the git and do the following :
git init
git remote add origin https://YOUR_REPOSITORY_LINK.git
git pull origin main
- Then inside the root folder of the blog template clone this repository
git clone https://github.com/yasarkaancan/aiblog.git
- Install the requirements from requirements.txt
pip install -r requirements.txt
-
Edit the python script and enter your openai API key.
-
Run the script with python.
python content.py
-
Congrats ! You are ready to go !
-
When you make update's and push it to github it will be automatically updated on the vercel.
! You could use different blog's or different syntax but in that case you should delete the prompt and rewrite it yourself.