gpt4 book ai didi

ios - QBChatDelegate-chatDidReceiveMessage : getting called but dialogID is NULL

转载 作者:行者123 更新时间:2023-11-29 12:02:24 24 4
gpt4 key购买 nike

我现在使用 QB 有一段时间了,一切都运行良好。今天出现了一些问题,我无法再接收具有正确 dialogID 的 QBChatMessages。我发送消息:

[self.dialog sendMessage:message completionBlock:^(NSError * _Nullable error) {
if (error != nil) {
NSLog(@"error! %@", error);

} else {
NSLog(@"success!");
/*locally adding message to tableview*/
}
}

并且回调总是成功,另一端通过以下方式接收消息:

- (void)chatDidReceiveMessage:(QBChatMessage *)message
{
NSLog(@"chatDidReceiveMessage %@", message.dialogID);
}

但我得到的 dialogID 是 (null),这没有任何意义。发送消息时变量 self.dialog.ID 不为 null,消息与我发送的所有文本一起到达目的地,但 dialogID 为(null)。我在帐户内的聊天管理面板中进行了验证,但对话框未显示新消息。我正在使用 v2.6.0.1 顺便说一下。

最佳答案

好的,我找到了我的问题。似乎当我更改一些发送消息方法时,我注释掉了

的重要部分
message.customParameters[@"save_to_history"] = @"1";

永远不要忘记设置 save_to_history 自定义参数,否则您的消息将在没有 dialogID 的情况下到达其收件人...

关于ios - QBChatDelegate-chatDidReceiveMessage : getting called but dialogID is NULL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36364291/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com