This commit is contained in:
wangjinlei
2023-09-06 16:07:47 +08:00
parent adc0bd0e90
commit b2581b5bbe
4 changed files with 41 additions and 1 deletions

View File

@@ -332,6 +332,21 @@ function freshContent($production_obj){
}
function zw_array(array $arr){
sort($arr);
$count = count($arr);
$middle = floor(($count-1)/2);
if($count % 2==0){
$median = ($arr[$middle]+$arr[$middle+1]) / 2;
}else{
$median = $arr[$middle];
}
return $median;
}
function pushGpt($content){
// die;
$url = 'https://api.openai.com/v1/chat/completions';