File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
models/spring-ai-bedrock-converse/src/test/java/org/springframework/ai/bedrock/converse Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 3636import org .springframework .ai .chat .model .ChatResponse ;
3737import org .springframework .ai .converter .BeanOutputConverter ;
3838import org .springframework .ai .converter .ListOutputConverter ;
39+ import org .springframework .ai .model .function .FunctionCallingOptions ;
3940import org .springframework .ai .model .tool .ToolCallingChatOptions ;
4041import org .springframework .ai .tool .function .FunctionToolCallback ;
4142import org .springframework .beans .factory .annotation .Autowired ;
@@ -366,7 +367,7 @@ void multiModalityEmbeddedImage(String modelName) throws IOException {
366367
367368 // @formatter:off
368369 String response = ChatClient .create (this .chatModel ).prompt ()
369- .options (ToolCallingChatOptions .builder ().model (modelName ).build ())
370+ .options (FunctionCallingOptions .builder ().model (modelName ).build ())
370371 .user (u -> u .text ("Explain what do you see on this picture?" )
371372 .media (MimeTypeUtils .IMAGE_PNG , new ClassPathResource ("/test.png" )))
372373 .call ()
@@ -387,7 +388,7 @@ void multiModalityImageUrl(String modelName) throws IOException {
387388 // @formatter:off
388389 String response = ChatClient .create (this .chatModel ).prompt ()
389390 // TODO consider adding model(...) method to ChatClient as a shortcut to
390- .options (ToolCallingChatOptions .builder ().model (modelName ).build ())
391+ .options (FunctionCallingOptions .builder ().model (modelName ).build ())
391392 .user (u -> u .text ("Explain what do you see on this picture?" ).media (MimeTypeUtils .IMAGE_PNG , url ))
392393 .call ()
393394 .content ();
Original file line number Diff line number Diff line change 3131import org .springframework .ai .chat .client .ChatClient ;
3232import org .springframework .ai .chat .model .ChatModel ;
3333import org .springframework .ai .model .Media ;
34+ import org .springframework .ai .model .function .FunctionCallingOptions ;
3435import org .springframework .ai .model .tool .ToolCallingChatOptions ;
3536import org .springframework .ai .tool .function .FunctionToolCallback ;
3637import org .springframework .beans .factory .annotation .Autowired ;
@@ -183,7 +184,7 @@ public BedrockProxyChatModel bedrockConverseChatModel() {
183184 .withCredentialsProvider (EnvironmentVariableCredentialsProvider .create ())
184185 .withRegion (Region .US_EAST_1 )
185186 .withTimeout (Duration .ofSeconds (120 ))
186- .withDefaultOptions (ToolCallingChatOptions .builder ().model (modelId ).build ())
187+ .withDefaultOptions (FunctionCallingOptions .builder ().model (modelId ).build ())
187188 .build ();
188189 }
189190
You can’t perform that action at this time.
0 commit comments