Skip to content

Latest commit

 

History

History
49 lines (32 loc) · 1.51 KB

README.md

File metadata and controls

49 lines (32 loc) · 1.51 KB

OpenAI-API-Java-Request

This repository demonstrates how to interact with OpenAI's API using a Java test class, OpenAIRequesterTest.


🌟 Features

  • 🚀 Easy interaction with OpenAI's API to fetch model completions.
  • 📝 Clear and concise code with descriptive comments.
  • 🧪 A simple test to ensure proper communication and data retrieval from the API.

🔧 Setup

Prerequisites

  • ☕ Java JDK 8 or newer.
  • 🔑 A valid OpenAI API key.

Installation

  1. 📥 Clone this repository:

git clone https://github.com/pablogzalez/OpenAI-API-Java-Request.git

  1. 📂 Navigate to the project directory:

cd OpenAI-API-Java-Request

  1. 🔓 Open the OpenAIRequesterTest class and insert your OpenAI API key where indicated.

git clone https://github.com/pablogzalez/OpenAI-API-Java-Request.git

  1. 🖥️ Compile and run the tests.

📖 Usage After setting up your API key, you can run the OpenAIRequesterTest to send a query to the OpenAI API and see the response.

🔍 Feel free to modify the query variable in the test to experiment with different inputs.

🤝 Contributing Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

🧐 Please make sure to update tests as appropriate.

Created with 💖 by Pablo Gonzalez