fixed
This commit is contained in:
@@ -90,8 +90,10 @@ class Reporttt
|
|||||||
//];
|
//];
|
||||||
$chatobj->setBefore($content);
|
$chatobj->setBefore($content);
|
||||||
|
|
||||||
$chatobj->chat($question,$config,$answer_json_arr);
|
$chatobj->returnAnswer($question,$config,$answer_json_arr);
|
||||||
//dump($answer_json_arr);die;
|
//dump($answer_json_arr);die;
|
||||||
|
|
||||||
|
$res_content = [];
|
||||||
//把返回的报告保存起来
|
//把返回的报告保存起来
|
||||||
foreach ($answer_json_arr as $josn){
|
foreach ($answer_json_arr as $josn){
|
||||||
$item = json_decode($josn,true);
|
$item = json_decode($josn,true);
|
||||||
@@ -103,9 +105,11 @@ class Reporttt
|
|||||||
'username'=>$user['username'],
|
'username'=>$user['username'],
|
||||||
'report_content'=>$choice['message']['content'],
|
'report_content'=>$choice['message']['content'],
|
||||||
];
|
];
|
||||||
|
$res_content[] = $choice['message']['content'];
|
||||||
Db::table('fa_tt_medical_report')->insert($data);
|
Db::table('fa_tt_medical_report')->insert($data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return json(Tools::set_ok($res_content));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user