Skip to content

Commit

Permalink
Update template
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasVitale committed Nov 11, 2024
1 parent 98b75f2 commit 7aba40c
Show file tree
Hide file tree
Showing 25 changed files with 18 additions and 23 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.configuration.updateBuildConfiguration": "interactive"
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
plugins {
id 'java'
id 'org.springframework.boot' version '3.4.0-M3'
id 'org.springframework.boot' version '3.4.0-RC1'
id 'io.spring.dependency-management' version '1.1.6'
id 'org.graalvm.buildtools.native' version '0.10.3'
id 'org.cyclonedx.bom' version '1.10.0'
id 'org.sonarqube' version '5.1.0.4882'
}
Expand Down Expand Up @@ -34,6 +35,8 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-actuator'
implementation 'org.springframework.boot:spring-boot-starter-web'

implementation 'org.springframework.ai:spring-ai-markdown-document-reader'

implementation 'io.micrometer:micrometer-tracing-bridge-otel'
implementation 'io.opentelemetry:opentelemetry-exporter-otlp'
implementation 'io.micrometer:micrometer-registry-otlp'
Expand All @@ -55,6 +58,7 @@ dependencies {
{%- endif %}
{% if values.vectorStore == "postgresql" %}
implementation 'org.springframework.ai:spring-ai-pgvector-store-spring-boot-starter'
implementation 'net.ttddyy.observation:datasource-micrometer-spring-boot:1.0.5'
testImplementation 'org.testcontainers:postgresql'
{%- endif %}
{% if values.vectorStore == "weaviate" %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.boot.web.client.ClientHttpRequestFactories;
import org.springframework.boot.web.client.ClientHttpRequestFactorySettings;
import org.springframework.boot.web.client.RestClientCustomizer;
import org.springframework.context.ApplicationListener;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand Down Expand Up @@ -97,18 +94,3 @@ public void run() {
}

}

@Configuration(proxyBeanMethods = false)
class HttpClientAutoConfiguration {

@Bean
RestClientCustomizer restClientCustomizer() {
return restClientBuilder -> {
restClientBuilder
.requestFactory(ClientHttpRequestFactories.get(ClientHttpRequestFactorySettings.DEFAULTS
.withConnectTimeout(Duration.ofSeconds(120))
.withReadTimeout(Duration.ofSeconds(120))));
};
}

}
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
spring:
application:
name: ${{ values.artifactId }}
http:
client:
connect-timeout: 60s
read-timeout: 120s
ai:
chat:
observations:
Expand Down Expand Up @@ -46,6 +50,8 @@ spring:
model: dall-e-3
{%- endif %}
vectorstore:
observations:
include-query-response: true
{%- if values.vectorStore == "postgresql" %}
pgvector:
{%- if values.llmProvider == "ollama" %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ PostgreSQLContainer<?> postgresContainer() {
@RestartScope
@ServiceConnection
LgtmStackContainer lgtmContainer() {
return new LgtmStackContainer("grafana/otel-lgtm:0.7.6")
return new LgtmStackContainer("grafana/otel-lgtm:0.7.8")
.withStartupTimeout(Duration.ofMinutes(2))
.withReuse(true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: scaffolder.backstage.io/v1beta3
kind: Template
metadata:
name: spring-ai-rag
title: Spring AI RAG
description: Spring Boot using Java and Gradle with Spring AI integration to build LLM-powered applications with RAG.
title: Spring AI Service
description: Spring Boot using Java and Gradle with Spring AI integration to build LLM-powered applications with RAG and tools.
annotations:
backstage.io/time-saved: PT12H
tags:
Expand Down
2 changes: 1 addition & 1 deletion demo-catalog/templates/templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ metadata:
description: A collection of Templates
spec:
targets:
- ./spring-boot-ai-rag/template.yml
- ./spring-boot-ai-service/template.yml

0 comments on commit 7aba40c

Please sign in to comment.