1
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user