Fix tools test configuration
This commit is contained in:
@@ -57,10 +57,13 @@ public class OpenAiCompatibleChatModelIT {
|
||||
|
||||
builder.add(new OpenAiChatModel(new OpenAiApi(System.getenv("OPENAI_API_KEY")), forModelName("gpt-3.5-turbo")));
|
||||
|
||||
if (System.getenv("GROQ_API_KEY") != null) {
|
||||
builder.add(new OpenAiChatModel(new OpenAiApi("https://api.groq.com/openai", System.getenv("GROQ_API_KEY")),
|
||||
forModelName("llama3-8b-8192")));
|
||||
}
|
||||
// (26.01.2025) Disable because the Groq API is down. TODO: Re-enable when the API
|
||||
// is back up.
|
||||
// if (System.getenv("GROQ_API_KEY") != null) {
|
||||
// builder.add(new OpenAiChatModel(new OpenAiApi("https://api.groq.com/openai",
|
||||
// System.getenv("GROQ_API_KEY")),
|
||||
// forModelName("llama3-8b-8192")));
|
||||
// }
|
||||
|
||||
if (System.getenv("OPEN_ROUTER_API_KEY") != null) {
|
||||
builder.add(new OpenAiChatModel(
|
||||
|
||||
@@ -138,7 +138,11 @@ public class FunctionCallbackInPrompt2IT {
|
||||
// @formatter:off
|
||||
String content = ChatClient.builder(chatModel).build().prompt()
|
||||
.user("What's the weather like in San Francisco, Tokyo, and Paris?")
|
||||
.functions(FunctionCallback.builder().function("CurrentWeatherService", new MockWeatherService()).description("Get the weather in location").build())
|
||||
.functions(FunctionCallback.builder()
|
||||
.function("CurrentWeatherService", new MockWeatherService())
|
||||
.description("Get the weather in location")
|
||||
.inputType(MockWeatherService.Request.class)
|
||||
.build())
|
||||
.stream().content()
|
||||
.collectList().block().stream().collect(Collectors.joining());
|
||||
// @formatter:on
|
||||
|
||||
Reference in New Issue
Block a user