Server IP : 172.67.214.6 / Your IP : 216.73.216.73 Web Server : LiteSpeed System : Linux premium900.web-hosting.com 4.18.0-553.22.1.lve.1.el8.x86_64 #1 SMP Tue Oct 8 15:52:54 UTC 2024 x86_64 User : redwjova ( 1790) PHP Version : 8.1.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/redwjova/sort.llc/wp-content/plugins/ultimate-post/addons/chatgpt/ |
Upload File : |
<?php defined( 'ABSPATH' ) || exit; add_action( 'init', 'ultp_chatgpt_init' ); function ultp_chatgpt_init() { if ( ultimate_post()->get_setting('ultp_chatgpt') == 'true' ) { add_filter( 'ultp_settings', 'get_chatgpt_settings', 10, 1 ); } } function get_chatgpt_settings( $config ) { $arr = array( 'ultp_chatgpt' => array( 'label' => __( 'ChatGPT', 'ultimate-post' ), 'attr' => array( 'chatgpt_heading' => array( 'type' => 'heading', 'label' => __( 'ChatGPT Settings', 'ultimate-post' ), ), 'chatgpt_secret_key' => array( 'type' => 'text', 'label' => __( 'OpenAI API Secret Key', 'ultimate-post' ), 'desc' => __( 'For using ChatGPT addon, you have to add your OpenAI secret key.', 'ultimate-post' ), 'link' => __( 'https://platform.openai.com/account/api-keys' ), 'linkText' => __( 'Get key.', 'ultimate-post' ), ), 'chatgpt_model' => array( 'type' => 'select', 'label' => __( 'OpenAI Model', 'ultimate-post' ), 'desc' => __( 'Choose your preferable OpenAI model', 'ultimate-post' ), 'options' => array( 'gpt-3.5-turbo' => 'gpt-3.5-turbo', 'text-davinci-002' => 'text-davinci-002', 'text-davinci-003' => 'text-davinci-003', 'gpt-4' => 'gpt-4', ), 'default' => 'gpt-3.5-turbo' ), 'chatgpt_response_time' => array( 'type' => 'number', 'label' => __( 'Response Time', 'ultimate-post' ), 'desc' => __( 'Choose your preferable OpenAI response time', 'ultimate-post' ), 'default' => 60 ), 'chatgpt_max_tokens' => array( 'type' => 'number', 'label' => __( 'Max Tokens', 'ultimate-post' ), 'desc' => __( 'Choose your preferable OpenAI max Number of Tokens to be generated by ChatGPT', 'ultimate-post' ), 'default' => 400 ), ), ), ); return array_merge( $config, $arr ); }