Welcome to the ChatGPT Node.js Integration project! This project is all about connecting with the powerful ChatGPT API using Node.js and TypeScript. Whether you're a hobbyist looking to tinker with AI, or a seasoned developer aiming to incorporate ChatGPT into your tech stack, you've come to the right place! 🌟
This project sets up a simple Node.js application that:
- Sends user input to the ChatGPT model.
- Receives responses directly from ChatGPT.
- Logs the conversation to the console.
It's perfect for learning how APIs work, exploring AI-generated text, and integrating these technologies into larger projects. 📚
Before you dive in, make sure you have the following:
- Node.js installed (download from Node.js official website)
- A favorite text editor (we love VSCode!)
- An OpenAI API key (get one by signing up at OpenAI)
Clone the repo and install the dependencies:
git clone https://github.com/edmartinezdev/gpt-prompt.git cd gpt-prompt npm install
Configuration Create a .env file in the root directory. Add your OpenAI API key:
OPENAI_API_KEY=your_openai_api_key_here
Running the Application Compile the TypeScript and start the application:
npx tsc node dist/index.js
Send your prompts to ChatGPT and see how it responds!
Contributing 🤝 Want to contribute? Great! Here are a few ways you can help out:
Report any bugs by opening an issue. Suggest new features or improvements by opening a pull request. Spread the word about our project! License 📄 Distributed under the MIT License. See LICENSE for more information.
Let's Connect! 🌍 Feel free to reach out and connect with me on LinkedIn. Let's build something amazing together!
Acknowledgments 🎉 Hat tip to anyone whose code was used Inspiration etc Happy coding! 🎈🎈🎈