Package com.alibaba.cloud.ai.service
Class ChatSessionService
java.lang.Object
com.alibaba.cloud.ai.service.ChatSessionService
聊天会话服务类
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclearSessionsByAgentId(Integer agentId) 清空智能体的所有会话createSession(Integer agentId, String title, Long userId) 创建新会话voiddeleteSession(String sessionId) 删除单个会话findByAgentId(Integer agentId) 根据智能体ID获取会话列表根据ID获取会话voidpinSession(String sessionId, boolean isPinned) 置顶/取消置顶会话voidrenameSession(String sessionId, String newTitle) 重命名会话updateSession(ChatSession session) 更新会话voidupdateSessionTime(String sessionId) 更新会话的最后活动时间
-
Constructor Details
-
ChatSessionService
public ChatSessionService()
-
-
Method Details
-
findByAgentId
根据智能体ID获取会话列表 -
findById
根据ID获取会话 -
createSession
创建新会话 -
updateSession
更新会话 -
clearSessionsByAgentId
清空智能体的所有会话 -
updateSessionTime
更新会话的最后活动时间 -
pinSession
置顶/取消置顶会话 -
renameSession
重命名会话 -
deleteSession
删除单个会话
-