You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: chatbot/core/conversation/intialise_conversation.php
+27-8Lines changed: 27 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -609,21 +609,25 @@ function load_that($convoArr)
609
609
$user_id = $convoArr['conversation']['user_id'];
610
610
$bot_id = $convoArr['conversation']['bot_id'];
611
611
$limit = $remember_up_to;
612
-
$sql = "select `response` from `$dbn`.`conversation_log` where `user_id` = $user_id and `bot_id` = $bot_id order by `id` asc limit $limit;"; // desc
612
+
$sql = "select `input`, `response` from `$dbn`.`conversation_log` where `user_id` = $user_id and `bot_id` = $bot_id order by `id` asc limit $limit;"; // desc
613
613
runDebug(__FILE__, __FUNCTION__, __LINE__, "Getting conversation log entries for the current user. SQL:\n$sql", 3);
614
614
$result = db_query($sql, $con);
615
615
if ($result)
616
616
{
617
-
$tmpRows = array();
617
+
$tmpThatRows = array();
618
+
$tmpInputRows = array();
618
619
$tmpThat = array();
620
+
$tmpInput = array();
619
621
$puncuation = array(',', '?', ';', '!');
620
622
while ($row = mysql_fetch_assoc($result))
621
623
{
622
-
$tmpRows[] = $row['response'];
624
+
$tmpThatRows[] = $row['response'];
625
+
$tmpInputRows[] = $row['input'];
623
626
}
624
-
runDebug(__FILE__, __FUNCTION__, __LINE__, 'Finished loading previous responses into the ~THAT~ array.', 4);
0 commit comments