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

@@ -0,0 +1,26 @@
package com.storm.dev.api;
import org.springframework.ai.chat.ChatResponse;
import reactor.core.publisher.Flux;
/**
* @author: lyd
* @date: 2025/6/7 22:12
*/
public interface IAiService {
/**
* 非流式生成
* @param model 模型
* @param message 信息
* @return
*/
ChatResponse generate(String model, String message);
/**
* 流式生成
* @param model 模型
* @param message 信息
* @return
*/
Flux<ChatResponse> generateStream(String model, String message);
}

View File

@@ -1,4 +1,5 @@
/**
* @author: lyd
* @date: 2025/6/7 19:12
*/
*/
package com.storm.dev.api;