feat: ollama流式应答接口实现

This commit is contained in:
2025-06-07 22:32:41 +08:00
parent 26730bd745
commit 21b60a0216
17 changed files with 515 additions and 26 deletions

View File

@@ -24,21 +24,23 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-openai-spring-boot-starter</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.springframework.ai</groupId>-->
<!-- <artifactId>spring-ai-openai-spring-boot-starter</artifactId>-->
<!-- </dependency>-->
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-tika-document-reader</artifactId>
</dependency>
<!-- <dependency>-->
<!-- <groupId>org.springframework.ai</groupId>-->
<!-- <artifactId>spring-ai-tika-document-reader</artifactId>-->
<!-- </dependency>-->
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-pgvector-store-spring-boot-starter</artifactId>
</dependency>
<!-- &lt;!&ndash; 处理知识库:向量库 &ndash;&gt;-->
<!-- <dependency>-->
<!-- <groupId>org.springframework.ai</groupId>-->
<!-- <artifactId>spring-ai-pgvector-store-spring-boot-starter</artifactId>-->
<!-- </dependency>-->
<!-- 使用ollama的api -->
<dependency>
<groupId>org.springframework.ai</groupId>
<artifactId>spring-ai-ollama</artifactId>
@@ -122,7 +124,7 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<!-- <mainClass>cn.bugstack.xfg.dev.tech.Application</mainClass>-->
<mainClass>com.storm.dev.Application</mainClass>
<layout>JAR</layout>
</configuration>
</plugin>