流式输出,秒级,效果非常棒
This commit is contained in:
@@ -2,6 +2,7 @@ package com.rj.service;
|
||||
|
||||
import com.rj.dto.AiQaCustomerAskRequestDto;
|
||||
import com.rj.dto.AiQaCustomerAskResponseDto;
|
||||
import reactor.core.publisher.Flux;
|
||||
|
||||
/**
|
||||
* AI 问答子表:客户提问并调用大模型的业务
|
||||
@@ -15,4 +16,9 @@ public interface IAiQaCustomerAskService {
|
||||
* @throws Exception HTTP 或解析失败、模型返回错误等
|
||||
*/
|
||||
AiQaCustomerAskResponseDto askCustomer(AiQaCustomerAskRequestDto request) throws Exception;
|
||||
|
||||
/**
|
||||
* 流式回答:按分片持续返回大模型输出,流结束后落库。
|
||||
*/
|
||||
Flux<String> askCustomerStream(AiQaCustomerAskRequestDto request);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user