Skip to content

Commit 39be9ae

Browse files
committed
Fix tools test configuration
1 parent e7d6413 commit 39be9ae

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

models/spring-ai-openai/src/test/java/org/springframework/ai/openai/chat/OpenAiCompatibleChatModelIT.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,13 @@ static Stream<ChatModel> openAiCompatibleApis() {
5757

5858
builder.add(new OpenAiChatModel(new OpenAiApi(System.getenv("OPENAI_API_KEY")), forModelName("gpt-3.5-turbo")));
5959

60-
if (System.getenv("GROQ_API_KEY") != null) {
61-
builder.add(new OpenAiChatModel(new OpenAiApi("https://api.groq.com/openai", System.getenv("GROQ_API_KEY")),
62-
forModelName("llama3-8b-8192")));
63-
}
60+
// (26.01.2025) Disable because the Groq API is down. TODO: Re-enable when the API
61+
// is back up.
62+
// if (System.getenv("GROQ_API_KEY") != null) {
63+
// builder.add(new OpenAiChatModel(new OpenAiApi("https://api.groq.com/openai",
64+
// System.getenv("GROQ_API_KEY")),
65+
// forModelName("llama3-8b-8192")));
66+
// }
6467

6568
if (System.getenv("OPEN_ROUTER_API_KEY") != null) {
6669
builder.add(new OpenAiChatModel(

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,11 @@ void streamingFunctionCallTest() {
138138
// @formatter:off
139139
String content = ChatClient.builder(chatModel).build().prompt()
140140
.user("What's the weather like in San Francisco, Tokyo, and Paris?")
141-
.functions(FunctionCallback.builder().function("CurrentWeatherService", new MockWeatherService()).description("Get the weather in location").build())
141+
.functions(FunctionCallback.builder()
142+
.function("CurrentWeatherService", new MockWeatherService())
143+
.description("Get the weather in location")
144+
.inputType(MockWeatherService.Request.class)
145+
.build())
142146
.stream().content()
143147
.collectList().block().stream().collect(Collectors.joining());
144148
// @formatter:on

0 commit comments

Comments
 (0)