but starting with adjusting the open ai structure to an deepseek api below:
class tpl_sa_widget extends WP_Widget { function __construct() { parent::__construct( 'tpl_sa_widget', __('Summary Widget', 'tpl_sa_widget_domain'), array( 'description' => __('Display video summary on the sidebar', 'tpl_sa_widget_domain') )); }
public function tpl_auto_questions_gpt($text){ $curl = curl_init(); $body = array( "model" => "gpt-3.5-turbo", "messages" => array( array("role" => "system", "content" => "You are a helpful tutor."), array("role" => "user", "content" => "Generate 4 thought-provoking questions based on the following transcript: '.$text'. The questions should be engaging and encourage deeper thinking about the video content.The result should should be ONLY in in JSON format example [{question:'',index:''} with question key and index key e.g [{question:'',index:''}] NOTE the index should correspond to the id of the li element(all id not just the number) the question relate to in the transcript. maximum word should be 10-15 max for the questions","response_format"=> "object") ),
Copy Edit 444,500-Word Manuscript Category: Copy Editing, Editing, English Spelling, Microsoft Word, Proofreading, Word, Word Processing, Writing Budget: $250 - $750 USD