Ever wondered to unleash the power of ai using using node?
You are at the right point!!!
Here are the steps
Install open ai package in your node project (make sure your node version is >= 18). Use this commmand npm install openai
Go to open ai's platform and get your secret key [https://platform.openai.com/api-keys]
Install express and configure open ai in you project
Here is the code
That's it here you just created first chat bot that writes Haikus (3 line poem) about cats. You will always be getting random responses.
What to do next ?
Play around with your model by using different prompts
Try changing the role of system such as make it behave like a expert python, js or any programming language expert or make it behave like a kindergarten teacher
Explore vision and other models of open ai you can lookup to the documentation by following this link https://platform.openai.com/docs/introduction
#HappyCoding