This project tests various capabilities of the OpenAI API using a Command Line Interface (CLI) built with the OpenAI Node.js SDK.
-
Clone the repository:
git clone https://github.com/tone2k/openai-cli-test.git cd openai-test
-
Install dependencies:
npm install
-
Add API key:
Create a
.env
file in the root directory with your OpenAI API key:OPENAI_API_KEY=your_actual_openai_api_key
Run the CLI to test chat:
node openai.js
Test all OpenAI capabilities (chat, image generation, speech synthesis, transcription) with:
npm test
- Ensure
.env
is in.gitignore
to keep your API key secure. - The
.env
file should containOPENAI_API_KEY
.
MIT License
For more details, visit the OpenAI API Documentation.