This commit is contained in:
2024-07-17 17:03:32 +08:00
parent 290fc17274
commit f3fcf5ea01

View File

@@ -54,18 +54,11 @@ class Reporttt
return json(Tools::set_fail('用户不存在'));
}
//$day3 = date('Y-m-d 00:00:00',strtotime('-3 day'));
$his_record = Db::table('fa_tt_chathistory')
//->where('username',$user['username'])
->order('id asc')
//->where('create_time','>',$day3)//3天之内
->select();
$config = [
'stream'=>false,
];
$basedata = [
'doctor'=>input('doctor',''),//所属医生
'name'=>input('name',''),//病人姓名
'gender'=>input('gender',''),//病人性别
'age'=>input('age',''),//病人年龄
@@ -91,9 +84,7 @@ class Reporttt
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);