The Mentor Code OpenAI Node.js Integration is a Node.js WebSocket server that connects with OpenAI, utilizing an assistant designed to fulfill a code mentor role. This development is associated with the application linked here.
- WebSockect Server [Express + WS]
- Easy integration with OpenAI API Assistants
- Use of
zodResponseFormat
to ensure that the responses generated by the model adhere to a predefined schema
To get started with this project, follow these steps:
- Clone the repository:
git clone https://github.com/envm92/mentor-code-openai-nodejs.git
cd mentor-code-openai-nodejs
- Install dependencies
npm install
- Set up environment variables: Store the key in a safe location, like a .zshrc file or another text file on your computer. Once you’ve generated an API key, export it as an environment variable in your terminal.
export OPENAI_API_KEY="your_api_key_here"