This commit is contained in:
2024-07-18 15:39:48 +08:00
parent 70bea4e1f7
commit 3b1c250fb2

View File

@@ -98,14 +98,18 @@ class Reporttt
$content[] = ["role" => "user", "content" => '【联系方式】:'.$basedata['phone']];
$content[] = ["role" => "user", "content" => '【微信号】:'.$basedata['wechat_no']];
//设置基本信息
$chatobj->setBefore($content);
$content = json_decode($contentstr,true);
Tools::log_to_write_txt(['聊天记录content'=>$content]);
$sub_content = json_decode($contentstr,true);
Tools::log_to_write_txt(['聊天记录content'=>$sub_content]);
//$content = [
// //["role" => "user", "content" => '']
//];
$chatobj->setBefore($content);
//设置聊天记录
$chatobj->setBefore($sub_content);
//回答
$chatobj->returnAnswer($question,$config,$answer_json_arr);
//dump($answer_json_arr);die;