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

// AI

parent 9d72dc4a
...@@ -27,14 +27,15 @@ class YHAIChatConfiguration { ...@@ -27,14 +27,15 @@ class YHAIChatConfiguration {
func handleReceiveMessage(_ res: YHAIChatMessage?, _ done: Bool, _ messages: inout [YHAIChatMessage]) { func handleReceiveMessage(_ res: YHAIChatMessage?, _ done: Bool, _ messages: inout [YHAIChatMessage]) {
// 去除loading消息
removeThinkingMessageFromChatList(&messages)
if disableHandleMessage { if disableHandleMessage {
for msg in messages { for msg in messages {
msg.isDone = true msg.isDone = true
} }
return return
} }
// 去除loading消息
removeThinkingMessageFromChatList(&messages)
if let res = res { if let res = res {
var find = false var find = false
...@@ -57,11 +58,11 @@ class YHAIChatConfiguration { ...@@ -57,11 +58,11 @@ class YHAIChatConfiguration {
if !find { if !find {
messages.append(res) messages.append(res)
} }
}
if done { // 思考完成
for msg in messages { if done { // 思考完成
msg.isDone = true for msg in messages {
} msg.isDone = true
} }
} }
} }
......
...@@ -166,12 +166,12 @@ extension YHAIServiceListViewController: UICollectionViewDelegate, UICollectionV ...@@ -166,12 +166,12 @@ extension YHAIServiceListViewController: UICollectionViewDelegate, UICollectionV
} else if model.redirectMode == 3 { // agent } else if model.redirectMode == 3 { // agent
self.manager.getSubRobotChatConversationId(robotId: model.botId) { self.manager.getSubRobotChatConversationId(robotId: model.redirectPath) {
sesseionId in sesseionId in
let vc = YHAIRobotChatViewController() let vc = YHAIRobotChatViewController()
vc.isNeedShowBannerHeader = model.isNeedShowBannerHeader() vc.isNeedShowBannerHeader = model.isNeedShowBannerHeader()
vc.myTitle = model.title vc.myTitle = model.title
vc.robotId = model.botId vc.robotId = model.redirectPath
vc.conversationId = sesseionId vc.conversationId = sesseionId
vc.robotType = model.botType vc.robotType = model.botType
self.navigationController?.pushViewController(vc, animated: true) self.navigationController?.pushViewController(vc, animated: true)
......
...@@ -34,7 +34,6 @@ class YHEntranceconfigModel: SmartCodable { ...@@ -34,7 +34,6 @@ class YHEntranceconfigModel: SmartCodable {
var description: String = "" var description: String = ""
var btnText: String = "" var btnText: String = ""
var redirectMode: Int = 0 var redirectMode: Int = 0
var botId: String = ""
var botType: Int = 0 // 1:房产 2:教育 3:销售 var botType: Int = 0 // 1:房产 2:教育 3:销售
var redirectPath: String = "" var redirectPath: String = ""
......
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