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
.envfile 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.jsTest all OpenAI capabilities (chat, image generation, speech synthesis, transcription) with:
npm test- Ensure
.envis in.gitignoreto keep your API key secure. - The
.envfile should containOPENAI_API_KEY.
MIT License
For more details, visit the OpenAI API Documentation.