Skip to content

Commit fed6eca

Browse files
author
Nguyen Tran (Mark)
committed
fix: VertixAiEmbeddingConnectionDetails not injected when using vertex-ai-embedding starter
Signed-off-by: Nguyen Tran (Mark) <nguyen.trantrung@navercorp.com>
1 parent bd1834d commit fed6eca

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

auto-configurations/models/spring-ai-autoconfigure-model-vertex-ai/src/main/java/org/springframework/ai/model/vertexai/autoconfigure/embedding/VertexAiEmbeddingConnectionAutoConfiguration.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616

1717
package org.springframework.ai.model.vertexai.autoconfigure.embedding;
1818

19-
import com.google.cloud.vertexai.VertexAI;
20-
2119
import org.springframework.ai.vertexai.embedding.VertexAiEmbeddingConnectionDetails;
2220
import org.springframework.boot.autoconfigure.AutoConfiguration;
2321
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
@@ -26,6 +24,7 @@
2624
import org.springframework.context.annotation.Bean;
2725
import org.springframework.util.Assert;
2826
import org.springframework.util.StringUtils;
27+
import com.google.cloud.aiplatform.v1.PredictionServiceSettings;
2928

3029
/**
3130
* Auto-configuration for Vertex AI Embedding Connection.
@@ -36,7 +35,7 @@
3635
* @since 1.0.0
3736
*/
3837
@AutoConfiguration
39-
@ConditionalOnClass(VertexAI.class)
38+
@ConditionalOnClass(PredictionServiceSettings.class)
4039
@EnableConfigurationProperties(VertexAiEmbeddingConnectionProperties.class)
4140
public class VertexAiEmbeddingConnectionAutoConfiguration {
4241

0 commit comments

Comments
 (0)