fixed
This commit is contained in:
@@ -86,12 +86,14 @@ class Reporttt
|
||||
Db::table('fa_tt_userbaseinfo')
|
||||
->insert($basedata);
|
||||
|
||||
$content = [
|
||||
//["role" => "user", "content" => '']
|
||||
];
|
||||
foreach ($his_record as $item){
|
||||
$content[] = ["role" => "user", "content" => $item['chat_msg']];
|
||||
$contentstr = input('content');
|
||||
if(empty($contentstr)){
|
||||
return json(Tools::set_fail('content必须'));
|
||||
}
|
||||
$content = json_decode($contentstr,true);
|
||||
//foreach ($his_record as $item){
|
||||
// $content[] = ["role" => "user", "content" => $item['chat_msg']];
|
||||
//}
|
||||
$chatobj->setBefore($content);
|
||||
|
||||
$chatobj->chat($question,$config,$answer_json_arr);
|
||||
|
||||
Reference in New Issue
Block a user