I tried to add spring-ai dependency in my gradle project. But I faced the following issue.
dependencies {
implementation 'org.springframework.ai:spring-ai-openai-spring-boot-starter'
}
Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
> Could not find org.springframework.ai:spring-ai-openai-spring-boot-starter:.
The issue is the same, If I fixed version it as 0.8.0-SNAPSHOT.
Is it only possible in the maven project to add this dependency?
Did I miss something in the documentation? Give me some advice, please.
Thank you.
Comment From: tzolov
I'm not using gradle much but given the 0.8.0 has not been released yet isn't above behaviour expected? E.g. you need to set the version to 0.8.0-SNAPSHOT?
Comment From: unauthorized-401
I referenced this page. The issue is the same when using version 0.7.1-SNAPSHOT.
Comment From: Omkar-Shetkar
For 0.7.1-SNAPSHOT, coordinates should be:
org.springframework.experimental.ai:spring-ai-openai-spring-boot-starter
Notice, experimental
in the group ID. This won't be present in 0.8.0 release version, which is not yet released.
Comment From: markpollack
Sorry for the confusion. I'm currently trying to make sure the docs are correct in this regard. Indeed the big difference in that while the project was in the experimental github organization, we needed to use the word experimental
as part of the groupID. Now that the project moved out of the experimental github org, the word experimental
was removed. Here is the latest in the readme (at least covering OpenAI and Azure OpenAI).
Main Branch
The main branch has move to version 0.8.0-SNAPSHOT. It will be unstable for a week or two. Please use the 0.7.1-SNAPSHOT if you don't want to be on the bleeding edge.
- Azure OpenAI
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-azure-openai-spring-boot-starter</artifactId>
<version>0.8.0-SNAPSHOT</version>
</dependency>
- OpenAI
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-openai-spring-boot-starter</artifactId>
<version>0.8.0-SNAPSHOT</version>
</dependency>
0.7.1-SNAPSHOT
- Azure OpenAI
<dependency>
<groupId>org.springframework.experimental.ai</groupId>
<artifactId>spring-ai-azure-openai-spring-boot-starter</artifactId>
<version>0.7.1-SNAPSHOT</version>
</dependency>
- OpenAI
<dependency>
<groupId>org.springframework.experimental.ai</groupId>
<artifactId>spring-ai-openai-spring-boot-starter</artifactId>
<version>0.7.1-SNAPSHOT</version>
</dependency>
Closing the issue for now, hope is all works for you.