- 升级 spring-ai-alibaba-bom 版本至1.0.0.4- 修改 /chat 接口支持流式返回 - 使用 Flux<String> 替代 String 返回类型 - 设置 produces 为 TEXT_EVENT_STREAM_VALUE 支持 SSE- 调用 stream() 方法替代 call() 实现流式输出
110 lines
4.0 KiB
XML
110 lines
4.0 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
<parent>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-parent</artifactId>
|
|
<version>3.5.6</version>
|
|
<relativePath/> <!-- lookup parent from repository -->
|
|
</parent>
|
|
<groupId>com.hanserwei</groupId>
|
|
<artifactId>snails-ai</artifactId>
|
|
<version>0.0.1-SNAPSHOT</version>
|
|
<name>snails-ai</name>
|
|
<description>snails-ai</description>
|
|
<properties>
|
|
<java.version>21</java.version>
|
|
<spring-ai.version>1.0.3</spring-ai.version>
|
|
</properties>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-web</artifactId>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>org.projectlombok</groupId>
|
|
<artifactId>lombok</artifactId>
|
|
<optional>true</optional>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-test</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-data-jpa</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-webflux</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.mysql</groupId>
|
|
<artifactId>mysql-connector-j</artifactId>
|
|
<scope>runtime</scope>
|
|
</dependency>
|
|
<!-- spring-ai-alibaba-starter -->
|
|
<dependency>
|
|
<groupId>com.alibaba.cloud.ai</groupId>
|
|
<artifactId>spring-ai-alibaba-starter-dashscope</artifactId>
|
|
</dependency>
|
|
<!--配置加密-->
|
|
<dependency>
|
|
<groupId>com.github.ulisesbocchio</groupId>
|
|
<artifactId>jasypt-spring-boot-starter</artifactId>
|
|
<version>3.0.5</version>
|
|
</dependency>
|
|
|
|
</dependencies>
|
|
<dependencyManagement>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.springframework.ai</groupId>
|
|
<artifactId>spring-ai-bom</artifactId>
|
|
<version>${spring-ai.version}</version>
|
|
<type>pom</type>
|
|
<scope>import</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.alibaba.cloud.ai</groupId>
|
|
<artifactId>spring-ai-alibaba-bom</artifactId>
|
|
<version>1.0.0.4</version>
|
|
<type>pom</type>
|
|
<scope>import</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
</dependencyManagement>
|
|
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<configuration>
|
|
<annotationProcessorPaths>
|
|
<path>
|
|
<groupId>org.projectlombok</groupId>
|
|
<artifactId>lombok</artifactId>
|
|
</path>
|
|
</annotationProcessorPaths>
|
|
</configuration>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
<configuration>
|
|
<excludes>
|
|
<exclude>
|
|
<groupId>org.projectlombok</groupId>
|
|
<artifactId>lombok</artifactId>
|
|
</exclude>
|
|
</excludes>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
|
|
</project> |