Skip to content

Commit a110c8b

Browse files
committed
Fix BedrockNovaChatClientIT#toolAnnotationWeatherForecastStreaming
- Use BedrockChatOptions instead of ToolCallingChatOptions Signed-off-by: Ilayaperumal Gopinathan <ilayaperumal.gopinathan@broadcom.com>
1 parent 8660473 commit a110c8b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

models/spring-ai-bedrock-converse/src/test/java/org/springframework/ai/bedrock/converse/client/BedrockNovaChatClientIT.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,17 @@
2727
import org.junit.jupiter.params.provider.ValueSource;
2828
import org.slf4j.Logger;
2929
import org.slf4j.LoggerFactory;
30-
import org.springframework.ai.bedrock.converse.BedrockChatOptions;
3130
import reactor.core.publisher.Flux;
3231
import software.amazon.awssdk.auth.credentials.EnvironmentVariableCredentialsProvider;
3332
import software.amazon.awssdk.regions.Region;
3433

34+
import org.springframework.ai.bedrock.converse.BedrockChatOptions;
3535
import org.springframework.ai.bedrock.converse.BedrockProxyChatModel;
3636
import org.springframework.ai.bedrock.converse.RequiresAwsCredentials;
3737
import org.springframework.ai.chat.client.ChatClient;
3838
import org.springframework.ai.chat.model.ChatModel;
3939
import org.springframework.ai.chat.model.ChatResponse;
4040
import org.springframework.ai.content.Media;
41-
import org.springframework.ai.model.tool.ToolCallingChatOptions;
4241
import org.springframework.ai.tool.annotation.Tool;
4342
import org.springframework.ai.tool.function.FunctionToolCallback;
4443
import org.springframework.beans.factory.annotation.Autowired;
@@ -197,7 +196,7 @@ void toolAnnotationWeatherForecastStreaming(String modelName) {
197196
ChatClient chatClient = ChatClient.builder(this.chatModel).build();
198197

199198
Flux<ChatResponse> responses = chatClient.prompt()
200-
.options(ToolCallingChatOptions.builder().model(modelName).build())
199+
.options(BedrockChatOptions.builder().model(modelName).build())
201200
.tools(new DummyWeatherForecastTools())
202201
.user("Get current weather in Amsterdam")
203202
.stream()

0 commit comments

Comments
 (0)