namankhurpia / Easy-open-ai

This repository contains the community-maintained library for OpenAI's API in java, the easiest way to use GPT 3/4 in your applications.
http://namank.xyz
MIT License
16 stars 4 forks source link

Any reason for Java 18 instead of 17? #34

Open Dustinhoefer opened 8 months ago

Dustinhoefer commented 8 months ago

Hey!

I finally got around to implementing your version of the api. Unfortunately, I can not run it, since I am running JDK 17.

Any specific reason you are not using the LTS Version 17, but rather 18?

Kind regards Dustin

Dustinhoefer commented 8 months ago

I checked it out, changed to version 17 and tried to build. Not working :/

Removed maven plugins: sign and javadoc -> building

Using that version -> Caused by: java.lang.ClassNotFoundException: retrofit2.converter.gson.GsonConverterFactory at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)

Added the following dependency seems to work:

<dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
        <version>2.9.0</version>
    </dependency>