Commit ded96b59 authored by Steven杜宇's avatar Steven杜宇

// AI

parent 3f884dbb
...@@ -225,7 +225,7 @@ class YHAIRequestManager: NSObject { ...@@ -225,7 +225,7 @@ class YHAIRequestManager: NSObject {
// 一段话结束需要重新生成uuid 来 // 一段话结束需要重新生成uuid 来
self.uuid = UUID().uuidString + NSDate().timeIntervalSince1970.description self.uuid = UUID().uuidString + NSDate().timeIntervalSince1970.description
} }
if !receiveMessage.body.isStart() && !receiveMessage.isCompleted() { if !receiveMessage.isNotUserfulMessage() {
completion?(receiveMessage, sessionDone) completion?(receiveMessage, sessionDone)
} }
} }
......
...@@ -161,9 +161,13 @@ class YHAIRobotChatViewController: YHBaseViewController { ...@@ -161,9 +161,13 @@ class YHAIRobotChatViewController: YHBaseViewController {
// isPull 是否是下拉组件触发 // isPull 是否是下拉组件触发
func getHistoryMessages(_ isPull: Bool) { func getHistoryMessages(_ isPull: Bool) {
if !isPull { if !isPull {
YHHUD.show(.progress(message: "加载中...")) YHHUD.show(.progress(message: "加载中..."))
} else {
printLog("PULL MESSAGE HISTORY")
} }
viewModel.getHistoryChatMessages(botId: robotId, conversationId: conversationId, messageId: historyLastMessageId) { viewModel.getHistoryChatMessages(botId: robotId, conversationId: conversationId, messageId: historyLastMessageId) {
[weak self] success, error in [weak self] success, error in
YHHUD.hide() YHHUD.hide()
......
...@@ -132,6 +132,14 @@ class YHAIChatMessage: CustomStringConvertible { ...@@ -132,6 +132,14 @@ class YHAIChatMessage: CustomStringConvertible {
return "" return ""
} }
//
func isNotUserfulMessage() -> Bool {
if !self.body.isStart() && !self.isCompleted() && !self.body.isDone() {
return true
}
return false
}
// 获取消息类型 // 获取消息类型
func getType() -> YHAIMessageType { func getType() -> YHAIMessageType {
if let contentType = dataDict["contentType"] as? Int { if let contentType = dataDict["contentType"] as? Int {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment