|
27 | 27 | import org.junit.jupiter.params.provider.ValueSource; |
28 | 28 | import org.slf4j.Logger; |
29 | 29 | import org.slf4j.LoggerFactory; |
30 | | -import org.springframework.ai.bedrock.converse.BedrockChatOptions; |
31 | 30 | import reactor.core.publisher.Flux; |
32 | 31 | import software.amazon.awssdk.auth.credentials.EnvironmentVariableCredentialsProvider; |
33 | 32 | import software.amazon.awssdk.regions.Region; |
34 | 33 |
|
| 34 | +import org.springframework.ai.bedrock.converse.BedrockChatOptions; |
35 | 35 | import org.springframework.ai.bedrock.converse.BedrockProxyChatModel; |
36 | 36 | import org.springframework.ai.bedrock.converse.RequiresAwsCredentials; |
37 | 37 | import org.springframework.ai.chat.client.ChatClient; |
38 | 38 | import org.springframework.ai.chat.model.ChatModel; |
39 | 39 | import org.springframework.ai.chat.model.ChatResponse; |
40 | 40 | import org.springframework.ai.content.Media; |
41 | | -import org.springframework.ai.model.tool.ToolCallingChatOptions; |
42 | 41 | import org.springframework.ai.tool.annotation.Tool; |
43 | 42 | import org.springframework.ai.tool.function.FunctionToolCallback; |
44 | 43 | import org.springframework.beans.factory.annotation.Autowired; |
@@ -197,7 +196,7 @@ void toolAnnotationWeatherForecastStreaming(String modelName) { |
197 | 196 | ChatClient chatClient = ChatClient.builder(this.chatModel).build(); |
198 | 197 |
|
199 | 198 | Flux<ChatResponse> responses = chatClient.prompt() |
200 | | - .options(ToolCallingChatOptions.builder().model(modelName).build()) |
| 199 | + .options(BedrockChatOptions.builder().model(modelName).build()) |
201 | 200 | .tools(new DummyWeatherForecastTools()) |
202 | 201 | .user("Get current weather in Amsterdam") |
203 | 202 | .stream() |
|
0 commit comments