Updating the version to 1.0.0-SNAPSHOT
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
</scm>
|
||||
<properties>
|
||||
<java.version>17</java.version>
|
||||
<spring-ai.version>1.0.0-M7</spring-ai.version>
|
||||
<spring-ai.version>1.0.0-SNAPSHOT</spring-ai.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
@@ -51,7 +51,7 @@
|
||||
<dependency>
|
||||
<groupId>org.springframework.ai</groupId>
|
||||
<artifactId>spring-ai-bom</artifactId>
|
||||
<version>1.0.0-M7</version>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -4,7 +4,8 @@ import java.util.function.Function;
|
||||
|
||||
import org.springframework.ai.chat.client.ChatClient;
|
||||
import org.springframework.ai.chat.model.ChatResponse;
|
||||
import org.springframework.ai.model.function.FunctionCallback;
|
||||
import org.springframework.ai.tool.ToolCallback;
|
||||
import org.springframework.ai.tool.function.FunctionToolCallback;
|
||||
import org.springframework.boot.CommandLineRunner;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
@@ -25,7 +26,7 @@ public class SpringAiJavaFunctionCallbackApplication {
|
||||
ChatClient chatClient = chatClientBuilder.build();
|
||||
ChatResponse response = chatClient
|
||||
.prompt("What are the weather conditions in San Francisco, Tokyo, and Paris? Find the temperature in Celsius for each of the three locations.")
|
||||
.functions("WeatherInfo")
|
||||
.tools("WeatherInfo")
|
||||
.call().chatResponse();
|
||||
|
||||
System.out.println("Response: " + response);
|
||||
@@ -55,9 +56,8 @@ public class SpringAiJavaFunctionCallbackApplication {
|
||||
static class Config {
|
||||
|
||||
@Bean
|
||||
public FunctionCallback weatherFunctionInfo(Function<WeatherRequest, WeatherResponse> currentWeather) {
|
||||
return FunctionCallback.builder()
|
||||
.function("WeatherInfo", currentWeather)
|
||||
public ToolCallback weatherFunctionInfo(Function<WeatherRequest, WeatherResponse> currentWeather) {
|
||||
return FunctionToolCallback.builder("WeatherInfo", currentWeather)
|
||||
.description(
|
||||
"Find the weather conditions, forecasts, and temperatures for a location, like a city or state."
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user