<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<releases>
<enabled>false</enabled>
</releases>
</repository>
</repositories>
Can you pl share the best way to use spring ai project in gradle kts file.. releases and enabled does not seem to exist in gradle
tried these
and
but gives error
Comment From: ThomasVitale
@nagkumar it looks like a typo in the artifact group. It should be org.springframework.ai
and not org.springframework.boot
:
repositories {
mavenCentral()
maven(url = "https://repo.spring.io/milestone")
maven(url = "https://repo.spring.io/snapshot")
}
dependencies {
implementation("org.springframework.ai:spring-ai-openai-spring-boot-starter:0.8.0-SNAPSHOT")
}
In case it might help, here's a collection of Spring AI examples using Gradle: https://github.com/ThomasVitale/llm-apps-java-spring-ai
Comment From: markpollack
There is now a common getting started section, that show how to add the bom dependency for both maven and gradle.
See https://docs.spring.io/spring-ai/reference/getting-started.html
For each chatclient and embeddingclient, their section in the documentation shows the dependencies to add for autoconfiguration and for manual configuration for both maven and gradle. For example, see openai autoconfiguration docs and manual configuration docs.
The vector database deps aren't yet in the same format/structure.
Closing the issue for now. If there are any other omissions in the docs, feel free to raise a new issue and/or PR.