Skip to content

Commit fc8edac

Browse files
committed
fix failing test
1 parent 1196ef2 commit fc8edac

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

spring-ai-spring-boot-autoconfigure/src/test/java/org/springframework/ai/autoconfigure/openai/OpenAiPropertiesTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import org.skyscreamer.jsonassert.JSONCompareMode;
2121

2222
import org.springframework.ai.autoconfigure.retry.SpringAiRetryAutoConfiguration;
23+
import org.springframework.ai.model.ModelOptionsUtils;
2324
import org.springframework.ai.openai.OpenAiChatClient;
2425
import org.springframework.ai.openai.OpenAiEmbeddingClient;
2526
import org.springframework.ai.openai.OpenAiImageClient;
@@ -377,7 +378,7 @@ public void chatOptionsTest() {
377378
"spring.ai.openai.chat.options.topP=0.56",
378379

379380
// "spring.ai.openai.chat.options.toolChoice.functionName=toolChoiceFunctionName",
380-
"spring.ai.openai.chat.options.toolChoice=" + ToolChoiceBuilder.FUNCTION("toolChoiceFunctionName"),
381+
"spring.ai.openai.chat.options.toolChoice=" + ModelOptionsUtils.toJsonString(ToolChoiceBuilder.FUNCTION("toolChoiceFunctionName")),
381382

382383
"spring.ai.openai.chat.options.tools[0].function.name=myFunction1",
383384
"spring.ai.openai.chat.options.tools[0].function.description=function description",

0 commit comments

Comments
 (0)