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") ),
Professional Video Editing for Event Category: A / V Editing, Adobe Premiere Pro, After Effects, Final Cut Pro, Video Editing, Video Post Editing, Video Production, Video Services Budget: ₹600 - ₹1500 INR
AI Trading Integration With Sentiment Category: Data Analysis, Data Integration, Java, Machine Learning (ML), Natural Language Processing, PHP, Python, Software Architecture Budget: ₹1500 - ₹12500 INR
13-Sep-2025 09:51 GMT
Update Product Sales Customer Data Category: Data Analysis, Data Cleansing, Data Entry, Data Management, Data Processing, Excel, Google Sheets, Web Search Budget: ₹100 - ₹400 INR