Hey! I wanted to share an OpenAI client library supporting all the OpenAI endpoints from their API.
The library suports all endpoints. This means it can communicate with language and image models (davinci, curie, babbage, ada, etc) to create text completions and image renderings. It also allows you to use the fine-tuning tools and the enumeration tools to train your own models.
Tried to make it as lightweight and robust as posible. Hope you find it useful!! This client is made for Spring 3.0.0 project and would like to keep adding more features.
I'm not very experienced with open source projects, so If anyone wants to help me mantain this project just feel free to DM me here or to my twitter. (or make a PR/issue lol)
Example of how to use it in a Spring Application.
@Autowired OpenAIClient openAIClient;
void createEdit() { CreateEditRequest request = CreateEditRequest.builder() .model("text-davinci-edit-001") .input("What day of the wek is it?") .instruction("Fix the spelling mistakes") .numberOfEdits(1) .build(); CreateEditResponse createEditResponse = openAIClient.createEdit(request); log.info(createEditResponse); }
Once again, this is just the first version and will keep improving 🙂
Github repo: https://github.com/vaysai/OpenAIJava
twitter: https://twitter.com/shadicar7