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") ),
Social Media Marketing Specialist Needed Category: Adobe Illustrator, Banner Design, Internet Marketing, Marketing, SEO, SEO Auditing, Social Media Management, Social Media Marketing, Social Networking Budget: €1500 - €3000 EUR
29-Jan-2026 17:04 GMT
Video Editor for Financial Content and Podcasts Category: Adobe Premiere Pro, Audio Editing, Color Grading, DaVinci Resolve, Editing, Final Cut Pro, Motion Graphics, Video Editing, Video Production, Video Services Budget: ₹400 - ₹750 INR
Record and Edit Seminar Category: Audio Services, Video Conferencing, Video Editing, Video Post Editing, Video Production, Video Services, Video Streaming, Video Upload Budget: $30 - $250 USD