- 引入 Cassandra作为聊天记忆存储后端 - 配置 DashScope 多模态模型支持图文输入- 新增结构化输出控制器,支持 Bean、Map、List 等格式转换 - 添加文生图接口,集成阿里百炼图像生成能力 - 更新应用配置以支持多模态及持久化聊天记录 - 升级依赖项,引入 DashScope SDK 和 Cassandra 支持库 - 创建 ActorFilmography 和 Book 数据模型用于结构化响应 - 调整 ChatClient 配置以适配新的多模态与记忆逻辑
121 lines
4.3 KiB
XML
121 lines
4.3 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>
|
|
</properties>
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-web</artifactId>
|
|
</dependency>
|
|
|
|
<dependency>
|
|
<groupId>com.github.ulisesbocchio</groupId>
|
|
<artifactId>jasypt-spring-boot-starter</artifactId>
|
|
<version>3.0.5</version>
|
|
</dependency>
|
|
|
|
<!-- Deepseek 模型 -->
|
|
<dependency>
|
|
<groupId>org.springframework.ai</groupId>
|
|
<artifactId>spring-ai-starter-model-deepseek</artifactId>
|
|
</dependency>
|
|
<!-- Ollama -->
|
|
<dependency>
|
|
<groupId>org.springframework.ai</groupId>
|
|
<artifactId>spring-ai-starter-model-ollama</artifactId>
|
|
</dependency>
|
|
<!-- 智谱AI -->
|
|
<dependency>
|
|
<groupId>org.springframework.ai</groupId>
|
|
<artifactId>spring-ai-starter-model-zhipuai</artifactId>
|
|
</dependency>
|
|
<!-- OpenAI -->
|
|
<dependency>
|
|
<groupId>org.springframework.ai</groupId>
|
|
<artifactId>spring-ai-starter-model-openai</artifactId>
|
|
</dependency>
|
|
<!-- 阿里云AI -->
|
|
<dependency>
|
|
<groupId>com.alibaba.cloud.ai</groupId>
|
|
<artifactId>spring-ai-alibaba-starter-dashscope</artifactId>
|
|
</dependency>
|
|
<!-- Cassandra -->
|
|
<dependency>
|
|
<groupId>org.springframework.ai</groupId>
|
|
<artifactId>spring-ai-starter-model-chat-memory-repository-cassandra</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework.boot</groupId>
|
|
<artifactId>spring-boot-starter-test</artifactId>
|
|
<scope>test</scope>
|
|
</dependency>
|
|
<!-- 阿里百炼 SDK -->
|
|
<dependency>
|
|
<groupId>com.alibaba</groupId>
|
|
<artifactId>dashscope-sdk-java</artifactId>
|
|
<version>2.21.13</version>
|
|
<exclusions>
|
|
<exclusion>
|
|
<groupId>org.slf4j</groupId>
|
|
<artifactId>slf4j-simple</artifactId>
|
|
</exclusion>
|
|
</exclusions>
|
|
</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>
|
|
</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.springframework.boot</groupId>
|
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
|
|
</project>
|