|
@@ -52,6 +52,13 @@ class ChatLogic extends BaseLogic |
|
@@ -52,6 +52,13 @@ class ChatLogic extends BaseLogic |
|
52
|
}
|
52
|
}
|
|
53
|
$message[] = ['role' => 'user', 'content' => $this->param['message']];
|
53
|
$message[] = ['role' => 'user', 'content' => $this->param['message']];
|
|
54
|
$chatId = $chatInfo['id'];
|
54
|
$chatId = $chatInfo['id'];
|
|
|
|
55
|
+ }else{
|
|
|
|
56
|
+ $chatId = $this->saveChat($this->param['message']);
|
|
|
|
57
|
+ $this->saveChatItem($chatId, $this->param['message']);
|
|
|
|
58
|
+ $message = [
|
|
|
|
59
|
+ ['role' => 'system', 'content' => "You are now the marketing customer service of 深圳创贸集团"],
|
|
|
|
60
|
+ ['role' => 'user', 'content' => $this->param['message']],
|
|
|
|
61
|
+ ];
|
|
55
|
}
|
62
|
}
|
|
56
|
} else {
|
63
|
} else {
|
|
57
|
$chatId = $this->saveChat($this->param['message']);
|
64
|
$chatId = $this->saveChat($this->param['message']);
|