ai对话
This commit is contained in:
@@ -1,11 +1,6 @@
|
||||
package org.xyzh.api.workcase.service;
|
||||
|
||||
import org.springframework.web.servlet.mvc.method.annotation.SseEmitter;
|
||||
import org.xyzh.api.ai.dto.ChatPrepareData;
|
||||
import org.xyzh.api.ai.dto.TbChat;
|
||||
import org.xyzh.api.ai.dto.TbChatMessage;
|
||||
import org.xyzh.api.workcase.dto.TbWordCloudDTO;
|
||||
import org.xyzh.api.workcase.dto.TbWorkcaseDTO;
|
||||
import org.xyzh.common.core.domain.ResultDomain;
|
||||
import org.xyzh.common.core.page.PageRequest;
|
||||
|
||||
@@ -18,85 +13,6 @@ import org.xyzh.common.core.page.PageRequest;
|
||||
*/
|
||||
public interface WorkcaseChatService {
|
||||
|
||||
// ========================= 聊天管理 ==========================
|
||||
/**
|
||||
* @description 来客创建聊天对话
|
||||
* @param
|
||||
* @author yslg
|
||||
* @since 2025-12-18
|
||||
*/
|
||||
ResultDomain<TbChat> createChat(TbChat chat);
|
||||
|
||||
/**
|
||||
* @description 更新聊天名称
|
||||
* @param
|
||||
* @author yslg
|
||||
* @since 2025-12-18
|
||||
*/
|
||||
ResultDomain<TbChat> updateChat(TbChat chat);
|
||||
|
||||
/**
|
||||
* 获取聊天列表
|
||||
* @param agentId 智能体ID
|
||||
* @return 聊天列表
|
||||
*/
|
||||
ResultDomain<TbChat> getChatList(TbChat filter);
|
||||
|
||||
// ========================= 聊天信息管理 ======================
|
||||
|
||||
/**
|
||||
* 获取会话消息列表
|
||||
* @param filter 会话过滤条件(包含agentId, chatId, userId, userType)
|
||||
* @return 会话消息列表
|
||||
*/
|
||||
ResultDomain<TbChatMessage> getChatMessageList(TbChat filter);
|
||||
|
||||
// 用户转人工后,就不和智能体聊天了,在微信客服里聊天
|
||||
/**
|
||||
* 准备聊天数据(POST传递复杂参数)
|
||||
* @param prepareData 对话准备数据(包含agentId, chatId, query, files, userId, userType)
|
||||
* @return ResultDomain<String> 返回sessionId
|
||||
*/
|
||||
ResultDomain<String> prepareChatMessageSession(ChatPrepareData prepareData);
|
||||
|
||||
/**
|
||||
* 流式对话(SSE)- 使用sessionId建立SSE连接 产生chatMessage
|
||||
* @param sessionId 会话标识
|
||||
* @return SseEmitter 流式推送对象
|
||||
*/
|
||||
SseEmitter streamChatMessageWithSse(String sessionId);
|
||||
|
||||
/**
|
||||
* 停止对话生成(通过Dify TaskID)
|
||||
* @param filter 会话过滤条件(包含agentId, userId, userType)
|
||||
* @param taskId Dify任务ID
|
||||
* @return 停止结果
|
||||
*/
|
||||
ResultDomain<Boolean> stopChatMessageByTaskId(TbChat filter, String taskId);
|
||||
|
||||
/**
|
||||
* 评价
|
||||
* @param filter 会话过滤条件(包含agentId, chatId, userId, userType)
|
||||
* @param messageId 消息ID
|
||||
* @param comment 评价
|
||||
* @return 评价结果
|
||||
*/
|
||||
ResultDomain<Boolean> commentChatMessage(TbChat filter, String messageId, String comment);
|
||||
|
||||
// =============================== 对话分析 ==========================
|
||||
|
||||
/**
|
||||
* 对话分析, 提取出工单相关的内容,这里有智能体调用等
|
||||
* @param chatId 对话ID
|
||||
* @return 对话分析结果
|
||||
*/
|
||||
ResultDomain<TbWorkcaseDTO> analyzeChat(String chatId);
|
||||
|
||||
// 对话总结
|
||||
ResultDomain<TbWorkcaseDTO> summaryChat(String chatId);
|
||||
|
||||
|
||||
|
||||
// =============================== 对话、工单等词云管理 ==========================
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user