Skip to content

break-the-build/openai4j

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenAI GPT-4 Java Client

A simple Java app that interacts with the OpenAI API using GPT-4.

Prerequisites

  • Java 11+
  • OpenAI API Key: Get yours from OpenAI.

Setup & Run

  1. Set API Key:

    • macOS/Linux:

      export OPENAI_API_KEY=your-api-key-here
    • Windows:

      set OPENAI_API_KEY=your-api-key-here
  2. Compile:

    javac App.java
  3. Run:

     java App
  4. Usage

Enter a message when prompted, and the app will display the API's response.

License

Attribution: danvega

MIT License

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages