Skip to content

Commit

Permalink
Fix tools test configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
tzolov committed Jan 26, 2025
1 parent e7d6413 commit 39be9ae
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,13 @@ static Stream<ChatModel> openAiCompatibleApis() {

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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,11 @@ void streamingFunctionCallTest() {
// @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
Expand Down

0 comments on commit 39be9ae

Please sign in to comment.