Skip to content

Commit

Permalink
Replace call to deprecated method in GroqCloud
Browse files Browse the repository at this point in the history
  • Loading branch information
pacphi committed Dec 24, 2024
1 parent c46a353 commit 90ba433
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/java/org/cftoolsuite/config/GroqCloud.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@ class GroqCloud {
@Bean
public EmbeddingModel embeddingModel(PropertyResolver resolver) {
return new OpenAiEmbeddingModel(
new OpenAiApi(resolver.getProperty("spring.ai.openai.embedding.base_url"), resolver.getProperty("spring.ai.openai.embedding.api-key")),
new OpenAiApi(
resolver.getProperty("spring.ai.openai.embedding.base_url"),
resolver.getProperty("spring.ai.openai.embedding.api-key")
),
MetadataMode.EMBED,
OpenAiEmbeddingOptions.builder().withModel(resolver.getProperty("spring.ai.openai.embedding.options.model")).build()
OpenAiEmbeddingOptions.builder().model(resolver.getProperty("spring.ai.openai.embedding.options.model")).build()
);
}
}

0 comments on commit 90ba433

Please sign in to comment.