- 移除 Cassandra 相关配置及依赖 - 新增 CustomChatMemoryAdvisor 实现对话记忆管理 -重命名并扩展 CustomStreamLoggerAdvisor 为 CustomStreamLoggerAndMessage2DBAdvisor,增加消息入库逻辑 - 在 ChatController 中集成新的 Advisor 并注入相关依赖 - 使用 TransactionTemplate 管理消息存储事务 -限制记忆消息数量为最新 50 条 - 支持将用户消息与 AI 回答同步写入数据库
146 lines
5.4 KiB
XML
146 lines
5.4 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>
|
|
</parent>
|
|
<groupId>com.hanserwei</groupId>
|
|
<artifactId>ai-robot</artifactId>
|
|
<version>0.0.1-SNAPSHOT</version>
|
|
<name>han-ai-robot-springboot</name>
|
|
<description>han-ai-robot-springboot</description>
|
|
<properties>
|
|
<java.version>21</java.version>
|
|
<spring-ai.version>1.0.3</spring-ai.version>
|
|
<commons-lang3.version>3.19.0</commons-lang3.version>
|
|
<lombok.version>1.18.40</lombok.version>
|
|
<jsonschema-generator.version>4.38.0</jsonschema-generator.version>
|
|
<p6spy.version>3.9.1</p6spy.version>
|
|
<guava.version>33.0.0-jre</guava.version>
|
|
</properties>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-web</artifactId>
|
|
<exclusions>
|
|
<!-- 排除默认的 Logback 依赖 -->
|
|
<exclusion>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-logging</artifactId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.github.ulisesbocchio</groupId>
|
|
<artifactId>jasypt-spring-boot-starter</artifactId>
|
|
<version>3.0.5</version>
|
|
</dependency>
|
|
<!-- 阿里云AI -->
|
|
<dependency>
|
|
<groupId>com.alibaba.cloud.ai</groupId>
|
|
<artifactId>spring-ai-alibaba-starter-dashscope</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-test</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.apache.commons</groupId>
|
|
<artifactId>commons-lang3</artifactId>
|
|
<version>${commons-lang3.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.projectlombok</groupId>
|
|
<artifactId>lombok</artifactId>
|
|
<version>${lombok.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.github.victools</groupId>
|
|
<artifactId>jsonschema-generator</artifactId>
|
|
<version>${jsonschema-generator.version}</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.postgresql</groupId>
|
|
<artifactId>postgresql</artifactId>
|
|
<scope>runtime</scope>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.ai</groupId>
|
|
<artifactId>spring-ai-starter-vector-store-pgvector</artifactId>
|
|
</dependency>
|
|
<!-- Mybatis Plus -->
|
|
<dependency>
|
|
<groupId>com.baomidou</groupId>
|
|
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
|
|
</dependency>
|
|
<!-- p6spy 组件 -->
|
|
<dependency>
|
|
<groupId>p6spy</groupId>
|
|
<artifactId>p6spy</artifactId>
|
|
<version>${p6spy.version}</version>
|
|
</dependency>
|
|
<!-- AOP 切面 -->
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-aop</artifactId>
|
|
</dependency>
|
|
<!-- Log4j2 日志 -->
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-log4j2</artifactId>
|
|
</dependency>
|
|
<!-- 参数校验 -->
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-validation</artifactId>
|
|
</dependency>
|
|
<!-- 相关工具类 -->
|
|
<dependency>
|
|
<groupId>com.google.guava</groupId>
|
|
<artifactId>guava</artifactId>
|
|
<version>${guava.version}</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>
|
|
<!-- Mybatis Plus -->
|
|
<dependency>
|
|
<groupId>com.baomidou</groupId>
|
|
<artifactId>mybatis-plus-bom</artifactId>
|
|
<version>3.5.14</version>
|
|
<type>pom</type>
|
|
<scope>import</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
</dependencyManagement>
|
|
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
|
|
</project>
|