Simple OpenAI: the cleanest Java library

Let me introduce Simple OpenAI a Java http client library for sending requests to and receiving responses from the OpenAI Api. It exposes a consistent interface across all the services, yet as simple as you can find in other languages like Python or NodeJs.

Simple-OpenAI uses the standard Java library HttpClient for http communication, Jackson for Json parsing, and Lombok to minimize boilerplate code.

simple-openai

3 Likes

Nice. Thanks for sharing with us. ā€¦ Appreciate it!

1 Like

Hello :wave: OpenAI community !!

I would really like to get feedback/thoughts/concerns about this Java library in order to improve it or include any necessary functionality. Please feel free to drop a few lines here, I would appreciate it.

King regards

Sashir

1 Like

A new release of Simple OpenAI is available. It has fixes for some minor issues and testing coverage of 95%.

2 Likes

New Major Release 2.0.0

Iā€™m happy to announce that we have released a new major version of our simple-openai library.

The main change is that from now on we support the use of OpenAI with two additional providers: Azure and Anyscale. Currently, we are supporting the chat completion service for both providers.

For the original provider we have full updated support for all the OpenAI services: audio, chat completion, completion, embedding, file, fine tuning, image, model, moderation, assistant, thread.

Take a look for more detail.

New Release 2.2.0

The library has been updated with the latest changes from OpenAI:

  • Support for Assistant Stream Events. :fire:
  • Sync changes in Audio API. :fire:
  • Sync changes in FineTuning API. :fire:
  • Sync changes in Assistant API. :fire:

Other internal improvements:

  • Improve field validation. :hammer_and_wrench:
  • Split OpenAI interface. :hammer_and_wrench:
  • Automate code formatting. :hammer_and_wrench:
  • Add contribution instructions. :hammer_and_wrench:
  • Setup for deploying to Maven Central. :hammer_and_wrench:

Take a look at simple-openai.

New Release 2.3.0

Simple-OpenAI has been updated with the latest changes from OpenAI until Apr 16:

  • Support for new Batch API. :fire:
  • Support for new Project Key. :fire:
  • Enabling Assistant API for Azure. :fire:
  • Fixing SonarCloud issues. :hammer_and_wrench:

Take a look at simple-openai .

3 Likes

Sashi, this is some great stuff - thank you very much for this. I will be looking to test porting my existing code from another java client to yours. Would love to see you tackle Assistants V2 API as well. Keep up the good work!

1 Like