From 90ba43318c220d7ececa7cf6d3faba2db0ebc379 Mon Sep 17 00:00:00 2001 From: Chris Phillipson Date: Tue, 24 Dec 2024 10:24:10 -0800 Subject: [PATCH] Replace call to deprecated method in GroqCloud --- src/main/java/org/cftoolsuite/config/GroqCloud.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/cftoolsuite/config/GroqCloud.java b/src/main/java/org/cftoolsuite/config/GroqCloud.java index 0a28f0c..9ba85cc 100644 --- a/src/main/java/org/cftoolsuite/config/GroqCloud.java +++ b/src/main/java/org/cftoolsuite/config/GroqCloud.java @@ -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() ); } }