fixed
This commit is contained in:
@@ -30,6 +30,7 @@ class Reportty
|
||||
* author:wh
|
||||
*/
|
||||
function createReport(){
|
||||
Tools::log_to_write_txt(['input'=>input()]);
|
||||
//header('Content-Type: text/event-stream');
|
||||
//header('Cache-Control: no-cache');
|
||||
//header('Connection: keep-alive');
|
||||
@@ -73,6 +74,9 @@ class Reportty
|
||||
$chatobj->setBefore($content);
|
||||
|
||||
$chatobj->returnAnswer($question,$config,$answer_json_arr);
|
||||
|
||||
Tools::log_to_write_txt($chatobj->post_msg_body);
|
||||
|
||||
$res_content = [];
|
||||
//把返回的报告保存起来
|
||||
foreach ($answer_json_arr as $josn){
|
||||
|
||||
@@ -8,6 +8,7 @@ class ChatGPT extends BaseChat
|
||||
public $apiKey = '';
|
||||
public $model = '';
|
||||
private $messages = [];
|
||||
public $post_msg_body;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@@ -94,6 +95,7 @@ class ChatGPT extends BaseChat
|
||||
}
|
||||
$post_msg_body['messages'] = $this->messages;
|
||||
$postData = json_encode($post_msg_body);
|
||||
$this->post_msg_body = $post_msg_body;
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
|
||||
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
|
||||
|
||||
@@ -45,6 +45,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||
let dataid = $('#add_follow_report').attr('data-id');
|
||||
//添加随访记录
|
||||
layer.msg(111);
|
||||
let url = 'tt/Followup/addfollowup';
|
||||
$.post(url,{report_dataid:dataid},function (res) {
|
||||
|
||||
},'html');
|
||||
});
|
||||
|
||||
Controller.api.bindevent();
|
||||
|
||||
Reference in New Issue
Block a user