TheoKanning / openai-java

OpenAI Api Client in Java
MIT License
4.78k stars 1.2k forks source link

import using maven fails #327

Closed JanCantCode closed 1 year ago

JanCantCode commented 1 year ago

I am trying to install this library in a maven repository, but when trying to reload dependencies, it fails. I have used the "official" import from the readme: ```

com.theokanning.openai-gpt3-java
        <artifactId>service</artifactId>
        <version>version</version>
    </dependency>``` this tho, results me in ```[com.theokanning.openai-gpt3-java:service:jar:version was not found in https://repo.maven.apache.org/maven2 during a previous attempt.)```
AndrewHogg commented 1 year ago

Version would have to be a released version, current version at the time of writing is 0.14.0 - I've got in my pom.xml

<dependency>
    <groupId>com.theokanning.openai-gpt3-java</groupId>
    <artifactId>api</artifactId>
    <version>0.14.0</version>
</dependency>
<dependency>
    <groupId>com.theokanning.openai-gpt3-java</groupId>
    <artifactId>service</artifactId>
    <version>0.14.0</version>
</dependency>
<dependency>
    <groupId>com.theokanning.openai-gpt3-java</groupId>
    <artifactId>client</artifactId>
    <version>0.14.0</version>
</dependency>
JanCantCode commented 1 year ago

yeah i just figured that out after looking at the maven repo.. i tried it with 1.0.0 after, which obviously also failed xD

thanks for the help tho

TanayMorakhia commented 1 year ago

@AndrewHogg I think it would be better if you could mention it in the documentation because I also fell for it the first time.