Skip to content

Commit 37085c5

Browse files
committed
fix: apply spring-javaformat to comply with code style
Signed-off-by: lanpf <lanxiaozhu2007@hotmail.com>
1 parent 1d8243f commit 37085c5

File tree

3 files changed

+20
-18
lines changed

3 files changed

+20
-18
lines changed

auto-configurations/vector-stores/spring-ai-autoconfigure-vector-store-redis/src/main/java/org/springframework/ai/vectorstore/redis/autoconfigure/RedisVectorStoreAutoConfiguration.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,12 @@ BatchingStrategy batchingStrategy() {
6565

6666
@Bean
6767
@ConditionalOnMissingBean
68-
public RedisVectorStore.Builder vectorStoreBuilder(EmbeddingModel embeddingModel, RedisVectorStoreProperties properties,
69-
JedisConnectionFactory jedisConnectionFactory, ObjectProvider<ObservationRegistry> observationRegistry,
68+
public RedisVectorStore.Builder vectorStoreBuilder(EmbeddingModel embeddingModel,
69+
RedisVectorStoreProperties properties, JedisConnectionFactory jedisConnectionFactory,
70+
ObjectProvider<ObservationRegistry> observationRegistry,
7071
ObjectProvider<VectorStoreObservationConvention> customObservationConvention,
71-
BatchingStrategy batchingStrategy, ObjectProvider<RedisVectorStoreBuilderCustomizer> vectorStoreBuilderCustomizers) {
72+
BatchingStrategy batchingStrategy,
73+
ObjectProvider<RedisVectorStoreBuilderCustomizer> vectorStoreBuilderCustomizers) {
7274

7375
JedisPooled jedisPooled = this.jedisPooled(jedisConnectionFactory);
7476
RedisVectorStore.Builder builder = RedisVectorStore.builder(jedisPooled, embeddingModel)
@@ -79,14 +81,14 @@ public RedisVectorStore.Builder vectorStoreBuilder(EmbeddingModel embeddingModel
7981
.indexName(properties.getIndexName())
8082
.prefix(properties.getPrefix());
8183
vectorStoreBuilderCustomizers.orderedStream().forEach(customizer -> customizer.customize(builder));
82-
return builder;
84+
return builder;
8385
}
8486

85-
@Bean
86-
@ConditionalOnMissingBean
87-
public RedisVectorStore vectorStore(RedisVectorStore.Builder vectorStoreBuilder) {
88-
return vectorStoreBuilder.build();
89-
}
87+
@Bean
88+
@ConditionalOnMissingBean
89+
public RedisVectorStore vectorStore(RedisVectorStore.Builder vectorStoreBuilder) {
90+
return vectorStoreBuilder.build();
91+
}
9092

9193
private JedisPooled jedisPooled(JedisConnectionFactory jedisConnectionFactory) {
9294

spring-ai-vector-store/src/main/java/org/springframework/ai/vectorstore/VectorStoreBuilderCustomizer.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919
/**
2020
* Callback interface for customizing {@link VectorStore.Builder} instances.
2121
* <p>
22-
* Implemented by Spring beans that wish to configure {@code VectorStore} builders
23-
* before they are constructed. Customizers are applied in declaration order
24-
* (or priority order if {@link org.springframework.core.Ordered} is implemented),
25-
* allowing incremental builder configuration while preserving auto-configuration.
22+
* Implemented by Spring beans that wish to configure {@code VectorStore} builders before
23+
* they are constructed. Customizers are applied in declaration order (or priority order
24+
* if {@link org.springframework.core.Ordered} is implemented), allowing incremental
25+
* builder configuration while preserving auto-configuration.
2626
*
2727
* <h3>Typical Use Cases</h3>
2828
* <ul>
29-
* <li>Adding custom metadata fields to vector stores</li>
30-
* <li>Configuring observation behaviors</li>
29+
* <li>Adding custom metadata fields to vector stores</li>
30+
* <li>Configuring observation behaviors</li>
3131
* </ul>
3232
*
3333
* @param <T> the specific type of {@link VectorStore.Builder} being customized
@@ -44,4 +44,5 @@ public interface VectorStoreBuilderCustomizer<T extends VectorStore.Builder<T>>
4444
* @param builder the builder to configure (never {@code null})
4545
*/
4646
void customize(T builder);
47+
4748
}

vector-stores/spring-ai-redis-store/src/main/java/org/springframework/ai/vectorstore/redis/RedisVectorStoreBuilderCustomizer.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,9 @@
2626
* default auto-configuration. Implementations can add additional settings or modify
2727
* existing ones without overriding the entire configuration.
2828
*
29-
* <h3>Usage Example</h3>
30-
* The following example shows how to add custom metadata fields:
29+
* <h3>Usage Example</h3> The following example shows how to add custom metadata fields:
3130
* <pre>{@code
32-
* @Bean
31+
* &#64;Bean
3332
* public RedisVectorStoreBuilderCustomizer metadataCustomizer() {
3433
* return builder -> builder.metadataFields(
3534
* List.of(RedisVectorStore.MetadataField.tag("conversationId"))

0 commit comments

Comments
 (0)