Java Spring Boot application to integrate to OpenAI APIs?

Hi ,

I tried multiple libraries openapi-client dependencies ,but am unable to successfully connect to openAI API using Java Spring Boot Client code ? Could we get some assistance?
Tried below
1
cn.gjsm
openai-spring-boot-starter
1.0.1
2.
com.openai
openai-java-client
4.0.1

3.
com.theokanning.openai-gpt3-java
client
0.12.0

Please assist with right dependency and client to invoke API?
Thanks,
Anitha

Welcome to the forum.

That one is on the official libraries list at OpenAI…

What specific error are you getting? What’s your code look like?

Had followed this - gradle build is sucessful - bash-3.2$ ./gradlew build -x test
BUILD SUCCESSFUL in 596ms.
Post this,I had placed OpenAiApiExample java file - inside src folder getting compilation error “Method builder is undefined for type Completion Request”

This is Resolved and working fine ! With just openai-java > service dependency .

I found there’s no java library specific to building LLM applications. I built one myself.