Changeset 2961128
- Timestamp:
- 08/31/2023 11:38:57 AM (2 years ago)
- Location:
- ai-content-generation
- Files:
-
- 124 added
- 2 deleted
- 9 edited
-
assets/banner-1544x500.png (modified) (previous)
-
assets/banner-772x250.png (modified) (previous)
-
tags/1.1.8 (added)
-
tags/1.1.8/assets (added)
-
tags/1.1.8/assets/css (added)
-
tags/1.1.8/assets/css/admin.css (added)
-
tags/1.1.8/assets/css/jquery-ui.css (added)
-
tags/1.1.8/assets/css/sweetalert2.min.css (added)
-
tags/1.1.8/assets/img (added)
-
tags/1.1.8/assets/img/Video.png (added)
-
tags/1.1.8/assets/img/icon.svg (added)
-
tags/1.1.8/assets/img/logo.png (added)
-
tags/1.1.8/assets/img/logo.svg (added)
-
tags/1.1.8/assets/js (added)
-
tags/1.1.8/assets/js/admin.js (added)
-
tags/1.1.8/assets/js/classic-editor.js (added)
-
tags/1.1.8/assets/js/post-generator.js (added)
-
tags/1.1.8/assets/js/seo.js (added)
-
tags/1.1.8/assets/js/sweetalert2.all.min.js (added)
-
tags/1.1.8/assets/js/vue.global.js (added)
-
tags/1.1.8/assets/js/woocommerce.js (added)
-
tags/1.1.8/assets/js/wpwand-gutenberg.js (added)
-
tags/1.1.8/inc (added)
-
tags/1.1.8/inc/Finestics (added)
-
tags/1.1.8/inc/Finestics/Client.php (added)
-
tags/1.1.8/inc/Finestics/Insights.php (added)
-
tags/1.1.8/inc/WooCommerce.php (added)
-
tags/1.1.8/inc/admin.php (added)
-
tags/1.1.8/inc/api.php (added)
-
tags/1.1.8/inc/config.php (added)
-
tags/1.1.8/inc/data.php (added)
-
tags/1.1.8/inc/editor.php (added)
-
tags/1.1.8/inc/frontend.php (added)
-
tags/1.1.8/inc/gutenberg.php (added)
-
tags/1.1.8/inc/helper-functions.php (added)
-
tags/1.1.8/inc/modules (added)
-
tags/1.1.8/inc/modules/elementor (added)
-
tags/1.1.8/inc/modules/elementor/assets (added)
-
tags/1.1.8/inc/modules/elementor/assets/css (added)
-
tags/1.1.8/inc/modules/elementor/assets/css/editor.css (added)
-
tags/1.1.8/inc/modules/elementor/assets/css/jquery-ui.css (added)
-
tags/1.1.8/inc/modules/elementor/assets/img (added)
-
tags/1.1.8/inc/modules/elementor/assets/img/Video.png (added)
-
tags/1.1.8/inc/modules/elementor/assets/img/icon.png (added)
-
tags/1.1.8/inc/modules/elementor/assets/img/icon.svg (added)
-
tags/1.1.8/inc/modules/elementor/assets/js (added)
-
tags/1.1.8/inc/modules/elementor/assets/js/editor.js (added)
-
tags/1.1.8/inc/modules/elementor/inc (added)
-
tags/1.1.8/inc/modules/elementor/inc/controls (added)
-
tags/1.1.8/inc/modules/elementor/inc/controls/text.php (added)
-
tags/1.1.8/inc/modules/elementor/inc/controls/textarea.php (added)
-
tags/1.1.8/inc/modules/elementor/inc/controls/wysiwyg.php (added)
-
tags/1.1.8/inc/modules/elementor/inc/elementor.php (added)
-
tags/1.1.8/inc/modules/elementor/readme.txt (added)
-
tags/1.1.8/inc/modules/elementor/wp-wand-elementor.php (added)
-
tags/1.1.8/inc/post-generator.php (added)
-
tags/1.1.8/inc/view (added)
-
tags/1.1.8/inc/view/post-generator.php (added)
-
tags/1.1.8/inc/white-label.php (added)
-
tags/1.1.8/readme.txt (added)
-
tags/1.1.8/vendor (added)
-
tags/1.1.8/vendor/orhanerday (added)
-
tags/1.1.8/vendor/orhanerday/open-ai (added)
-
tags/1.1.8/vendor/orhanerday/open-ai/LICENSE.md (added)
-
tags/1.1.8/vendor/orhanerday/open-ai/README.md (added)
-
tags/1.1.8/vendor/orhanerday/open-ai/src (added)
-
tags/1.1.8/vendor/orhanerday/open-ai/src/OpenAi.php (added)
-
tags/1.1.8/vendor/orhanerday/open-ai/src/Url.php (added)
-
tags/1.1.8/vendor/wp-background-processing (added)
-
tags/1.1.8/vendor/wp-background-processing/.circleci (added)
-
tags/1.1.8/vendor/wp-background-processing/.circleci/config.yml (added)
-
tags/1.1.8/vendor/wp-background-processing/.gitignore (added)
-
tags/1.1.8/vendor/wp-background-processing/.phpcs.xml (added)
-
tags/1.1.8/vendor/wp-background-processing/Makefile (added)
-
tags/1.1.8/vendor/wp-background-processing/README.md (added)
-
tags/1.1.8/vendor/wp-background-processing/bin (added)
-
tags/1.1.8/vendor/wp-background-processing/bin/install-wp-tests.sh (added)
-
tags/1.1.8/vendor/wp-background-processing/classes (added)
-
tags/1.1.8/vendor/wp-background-processing/classes/wp-async-request.php (added)
-
tags/1.1.8/vendor/wp-background-processing/classes/wp-background-process.php (added)
-
tags/1.1.8/vendor/wp-background-processing/composer.json (added)
-
tags/1.1.8/vendor/wp-background-processing/composer.lock (added)
-
tags/1.1.8/vendor/wp-background-processing/license.txt (added)
-
tags/1.1.8/vendor/wp-background-processing/phpunit.xml (added)
-
tags/1.1.8/vendor/wp-background-processing/tests (added)
-
tags/1.1.8/vendor/wp-background-processing/tests/Test_Setup.php (added)
-
tags/1.1.8/vendor/wp-background-processing/tests/Test_WP_Background_Process.php (added)
-
tags/1.1.8/vendor/wp-background-processing/tests/bootstrap.php (added)
-
tags/1.1.8/vendor/wp-background-processing/wp-background-processing.php (added)
-
tags/1.1.8/wp-wand.php (added)
-
trunk/assets/css/admin.css (modified) (6 diffs)
-
trunk/assets/css/sweetalert2.min.css (added)
-
trunk/assets/img/icon.svg (added)
-
trunk/assets/js/admin.js (modified) (7 diffs)
-
trunk/assets/js/classic-editor.js (added)
-
trunk/assets/js/post-generator.js (modified) (6 diffs)
-
trunk/assets/js/seo.js (added)
-
trunk/assets/js/vue.global.js (added)
-
trunk/assets/js/woocommerce.js (added)
-
trunk/inc/WooCommerce.php (added)
-
trunk/inc/api.php (modified) (3 diffs)
-
trunk/inc/config.php (added)
-
trunk/inc/editor.php (added)
-
trunk/inc/helper-functions.php (modified) (5 diffs)
-
trunk/inc/modules/elementor/assets/img/icon.png (added)
-
trunk/inc/modules/elementor/assets/img/icon.svg (added)
-
trunk/inc/modules/elementor/assets/img/logo.png (deleted)
-
trunk/inc/modules/elementor/assets/img/logo.svg (deleted)
-
trunk/inc/post-generator.php (added)
-
trunk/inc/view (added)
-
trunk/inc/view/post-generator.php (added)
-
trunk/inc/white-label.php (added)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/vendor/wp-background-processing (added)
-
trunk/vendor/wp-background-processing/.circleci (added)
-
trunk/vendor/wp-background-processing/.circleci/config.yml (added)
-
trunk/vendor/wp-background-processing/.gitignore (added)
-
trunk/vendor/wp-background-processing/.phpcs.xml (added)
-
trunk/vendor/wp-background-processing/Makefile (added)
-
trunk/vendor/wp-background-processing/README.md (added)
-
trunk/vendor/wp-background-processing/bin (added)
-
trunk/vendor/wp-background-processing/bin/install-wp-tests.sh (added)
-
trunk/vendor/wp-background-processing/classes (added)
-
trunk/vendor/wp-background-processing/classes/wp-async-request.php (added)
-
trunk/vendor/wp-background-processing/classes/wp-background-process.php (added)
-
trunk/vendor/wp-background-processing/composer.json (added)
-
trunk/vendor/wp-background-processing/composer.lock (added)
-
trunk/vendor/wp-background-processing/license.txt (added)
-
trunk/vendor/wp-background-processing/phpunit.xml (added)
-
trunk/vendor/wp-background-processing/tests (added)
-
trunk/vendor/wp-background-processing/tests/Test_Setup.php (added)
-
trunk/vendor/wp-background-processing/tests/Test_WP_Background_Process.php (added)
-
trunk/vendor/wp-background-processing/tests/bootstrap.php (added)
-
trunk/vendor/wp-background-processing/wp-background-processing.php (added)
-
trunk/wp-wand.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ai-content-generation/trunk/assets/css/admin.css
r2957906 r2961128 2255 2255 /* 155.556% */ 2256 2256 padding: 0; 2257 margin-bottom: 35px;2257 margin-bottom: 0; 2258 2258 } 2259 2259 … … 2261 2261 background-color: #fff; 2262 2262 border-radius: 10px 10px 0px 0px; 2263 margin-top: 35px; 2263 2264 } 2264 2265 … … 2468 2469 padding: 20px; 2469 2470 margin-bottom: 30px; 2471 flex: 0 0 60%; 2472 box-sizing: border-box; 2470 2473 } 2471 2474 … … 2518 2521 justify-content: center; 2519 2522 text-align: center; 2523 border: 1px solid #8c8f9454; 2520 2524 } 2521 2525 2522 2526 .wpwand-pcgf-heading-content input[type=checkbox]:checked { 2523 background-color: #3767FB;2527 background-color: var(--wpwand-brand-color); 2524 2528 } 2525 2529 … … 2696 2700 text-decoration: none; 2697 2701 position: absolute; 2698 right: 10px;2702 right: 85px; 2699 2703 top: 0; 2700 2704 text-decoration: none; 2701 transform: translatex(-100%);2705 /* transform: translatex(-100%); */ 2702 2706 } 2703 2707 … … 2799 2803 margin-left: 5px; 2800 2804 } 2805 2806 2807 #wpwand-bulk-post-generator a.wpwand-pro-tag { 2808 background-color: #ee2626; 2809 color: #fff; 2810 min-width: 100px; 2811 height: 40px; 2812 padding: 20px; 2813 box-sizing: border-box; 2814 margin-left: 0; 2815 } 2816 2817 .wpwand-pgs-free-htw-video { 2818 margin-bottom: 30px; 2819 box-sizing: border-box; 2820 padding-left: 50px; 2821 } 2822 2823 .wpwand-pgs-free-htw-video h2 { 2824 margin-bottom: 60px; 2825 font-size: 38px; 2826 } 2827 2828 .wpwand-pgs-confirmation-wrap { 2829 display: flex; 2830 gap: 99px; 2831 } 2832 2833 .wpwand-pgs-confirmation { 2834 padding-top: 50px; 2835 } 2836 2837 .wpwand-pgs-free-htw-video iframe { 2838 width: 640px; 2839 height: 363px; 2840 max-width: 100%; 2841 } 2842 2843 .wpwand-pgdc-wrap { 2844 margin-top: 40px; 2845 } 2846 2847 .wpwand-pcgf-headings-field-wrap { 2848 display: flex; 2849 /* gap: 40px; */ 2850 flex-wrap: wrap; 2851 box-sizing: border-box; 2852 } 2853 2854 .wpwand-pcgf-heading-settings { 2855 flex: 0 0 40%; 2856 box-sizing: border-box; 2857 padding-left: 40px; 2858 } 2859 2860 .wpwand-pcgf-heading-settings label { 2861 color: var(--neutral-07, #080E13); 2862 font-family: Inter; 2863 font-size: 14px; 2864 font-style: normal; 2865 font-weight: 500; 2866 line-height: 20px; 2867 margin-bottom: 8px; 2868 display: block; 2869 } 2870 2871 .wpwand-pcgf-heading-settings label span.wpwand-optional-label { 2872 font-weight: 400; 2873 color: 7C838A; 2874 } 2875 2876 .wpwand-pcgf-heading-settings textarea { 2877 width: 100%; 2878 height: 85px; 2879 padding: 14px 18px; 2880 border: 1px solid var(--neutral-02, #EAEDF0); 2881 border-radius: 8px; 2882 } 2883 2884 .wpwand-pcgf-heading-settings .wpwand-pgf-field { 2885 margin-bottom: 15px; 2886 } 2887 2888 .wpwand-pcgf-heading-settings select { 2889 border-radius: 8px; 2890 border: 1px solid var(--neutral-02, #EAEDF0); 2891 background: var(--neutral-01, #FFF); 2892 padding: 14px 18px; 2893 width: 100%; 2894 display: block; 2895 max-width: 100%; 2896 background: #fff url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22M5%206l5%205%205-5%202%201-7%207-7-7%202-1z%22%20fill%3D%22%23555%22%2F%3E%3C%2Fsvg%3E') no-repeat right 5px top 55%; 2897 -webkit-appearance: none; 2898 } 2899 2900 .wpwand-pcgf-heading-settings input[type=checkbox] { 2901 margin: 0; 2902 margin-right: 10px; 2903 border: none; 2904 display: flex; 2905 align-items: center; 2906 width: 15px; 2907 height: 15px; 2908 justify-content: center; 2909 text-align: center; 2910 border: 1px solid #8c8f9454; 2911 float: left; 2912 margin-top: 3px; 2913 } 2914 2915 .wpwand-pcgf-heading-settings input[type=checkbox]:checked:before { 2916 content: '\2714'; 2917 color: #fff; 2918 width: 100%; 2919 height: 100%; 2920 display: flex; 2921 float: unset; 2922 margin: 0; 2923 align-items: center; 2924 justify-content: center; 2925 font-size: 10px; 2926 } 2927 2928 .wpwand-pcgf-heading-settings input[type=checkbox]:checked { 2929 background-color: var(--wpwand-brand-color); 2930 border-color: var(--wpwand-brand-color); 2931 } 2932 2933 .wpwand-history-content h1 { 2934 margin-bottom: 0 !important; 2935 display: block !important; 2936 font-weight: 600; 2937 max-width: 100%; 2938 } -
ai-content-generation/trunk/assets/js/admin.js
r2957906 r2961128 60 60 61 61 62 let $this = $(this); 62 const $this = $(this); 63 const _this = this; 63 64 $this.parent('.wpwand-slider-input-wrap').prepend('<div class="wpwand_slider_range regular-text"></div>'); 64 65 let wpwand_slider = $this.siblings('div.wpwand_slider_range'); … … 82 83 slide: function (event, ui) { 83 84 $this.val(parseFloat(ui.value)); 84 // console.log("value: " + ui.value); 85 85 86 } 86 87 }); … … 90 91 }); 91 92 92 //if ($this.is('#wpwand_max_tokens')) {93 // console.log('ok') 94 //$('#wpwand_model').change(function () {95 // wpwand_model_card($(this).val(), $this);96 //});97 98 //// call the function on page load with the initial value of #wpwand_model99 // wpwand_model_card($('#wpwand_model', $this).val());100 //}93 if ($this.is('#wpwand_max_tokens')) { 94 95 $('#wpwand_model').change(function () { 96 wpwand_token_adjust($(this).val(), wpwand_slider); 97 }); 98 99 // call the function on page load with the initial value of #wpwand_model 100 wpwand_token_adjust($('#wpwand_model').val(), wpwand_slider); 101 } 101 102 102 103 … … 256 257 }) 257 258 258 function wpwand_model_card(selectedValue, $this) { 259 console.log($.fn.slider); 260 if (!$.fn.slider) { 261 return; 262 } 263 264 $this.slider('option', "max", 15500).change(); 259 function wpwand_token_adjust(selectedValue, e) { 260 261 265 262 switch (selectedValue) { 266 263 case 'gpt-3.5-turbo-16k': 267 // Update the slider's max value 268 // Refresh the slider 269 // $slider.slider("refresh"); 270 case 'text-davinci-003': 271 $('#wpwand-text-davinci-003').show(); 272 $('#wpwand-text-davinci-003').siblings().hide() 264 $(e).siblings('#wpwand_max_tokens').attr('max', 14000).change(); 265 $(e).slider('option', "max", 14000).change(); 273 266 break; 274 case 'gpt-3.5-turbo': 275 $('#wpwand-gpt-3-5').show(); 276 $('#wpwand-gpt-3-5').siblings().hide() 277 break; 278 case 'text-curie-001': 279 $('#wpwand-text-curie-001').show(); 280 $('#wpwand-text-curie-001').siblings().hide() 281 break; 282 case 'text-babbage-001': 283 $('#wpwand-text-babbage-001').show(); 284 $('#wpwand-text-babbage-001').siblings().hide() 285 break; 286 case 'text-text-ada-001': 287 $('#wpwand-text-text-ada-001').show(); 288 $('#wpwand-text-text-ada-001').siblings().hide() 289 break; 290 291 // add more cases as needed 267 292 268 default: 293 269 // handle other cases 294 $('#wpwand-gpt-3-5').show(); 295 $('#wpwand-gpt-3-5').siblings().hide() 270 $(e).siblings('#wpwand_max_tokens').attr('max', 3600).change(); 271 272 $(e).slider('option', "max", 3600).change(); 273 296 274 break; 297 275 } … … 375 353 const elementor_control_type = $this.closest('.wpwand-floating').data('type'); 376 354 377 console.log(image_resulation) 355 378 356 // console.log(is_elementor); 379 357 $this.find('.wpwand-result-box').show(); 380 console.log(wpwand_image_prompt) 358 381 359 if ('undefined' != typeof wpwand_image_prompt) { 382 360 $this.find('.wpwand-content-wrap').html( … … 422 400 }, 423 401 success: function (response) { 424 console.log(response); 402 425 403 $this.find('.wpwand-content-wrap').empty().html(response); 426 404 … … 605 583 const elementor_control_id = $('body').find('.wpwand-floating').data('elementor-id'); 606 584 const elementor_control_type = $('body').find('.wpwand-floating').data('type'); 607 console.log(elementor_control_type); 585 608 586 var textToAdd = $(this).siblings('.wpwand-ai-response').html(); // Replace with the text you want to add 609 587 -
ai-content-generation/trunk/assets/js/post-generator.js
r2957906 r2961128 27 27 text: 'After your confirmation, it will be added as a Draft post in your blog.', 28 28 showDenyButton: true, 29 confirmButtonText: ' Approve',30 denyButtonText: ` Don't Approve`,29 confirmButtonText: 'Confirm', 30 denyButtonText: `Cancel`, 31 31 customClass: { 32 32 popup: 'wpwand-swal-alert wpwand-swal-alert-approve-pgc', … … 36 36 if (result.isConfirmed) { 37 37 Swal.fire({ 38 title: 'Successfully A pproved!',38 title: 'Successfully Added to Post!', 39 39 icon: 'success', 40 40 showConfirmButton: false, … … 88 88 $parent.find('#wpwand-post-content-generate-form .wpwand-pcgf-title-list').html(response) 89 89 90 $parent.find('.wpwand-pcgf-heading-item .remove').on('click', function (e) { 91 e.preventDefault() 92 $(this).closest('.wpwand-pcgf-heading-item').remove(); 93 }) 94 95 $parent.find('.wpwand-pg-titles-header .remove-selected').on('click', function (e) { 96 e.preventDefault() 97 98 99 Swal.fire({ 100 title: 'Are you sure you want to remove the selected items?', 101 showDenyButton: true, 102 confirmButtonText: 'Yes', 103 cancelButtonText: `No`, 104 customClass: { 105 popup: 'wpwand-swal-alert wpwand-swal-alert-approve-pgc', 106 } 107 }).then((result) => { 108 if (result.isConfirmed) { 109 $parent.find('input[name="selected_headings[]"]:checked').closest('.wpwand-pcgf-heading-item').remove() 110 Swal.fire({ 111 title: 'Successfully Removed!', 112 icon: 'success', 113 showConfirmButton: false, 114 timer: 1500, 115 customClass: { 116 popup: 'wpwand-swal-alert wpwand-swal-alert-approve-pgc', 117 // icon: 'wpwand-swal-alert', 118 } 119 }) 120 121 } 122 }); 123 124 }) 90 125 91 126 92 … … 153 119 const $this = $(this); 154 120 155 var selected_title = []; 121 const selected_title = []; 122 const keyword = $this.find('#keyword').val(); 123 const tone = $this.find('#tone').val(); 124 const toc_include = $this.find('#toc_include').is(':checked'); 125 const faq_include = $this.find('#faq_include').is(':checked'); 156 126 $this.find('input[name="selected_headings[]"]:checked').siblings('label').each(function () { 157 127 selected_title.push($(this).text()); 158 128 }); 159 // $this.find('button[type=submit]').css('opacity', '.6') 160 161 // $this.find('button[type=submit]').html('Submitting...').css('background-color', 'gray') 162 163 // Use $.post instead of $.ajax for simpler code 129 130 131 164 132 $.post({ 165 133 url: wpwand_glb.ajax_url, … … 167 135 action: 'wpwand_post_content_generator', 168 136 selected_title, 137 keyword, 138 tone, 139 toc_include, 140 faq_include, 169 141 }, 170 142 success: function (response) { … … 206 178 } 207 179 180 181 function wpwandCheckProgress(id, $this) { 182 $.post({ 183 url: wpwand_glb.ajax_url, 184 data: { 185 action: 'wpwand_post_generation_progress', 186 id 187 }, 188 success: function (response) { 189 if (response == 'done') { 190 $this.removeClass('pending') 191 $this.addClass('done') 192 $this.text('Complete') 193 } 194 }, 195 complete: function () { 196 // Call the function again after a certain interval 197 if ($this.hasClass('pending')) { 198 setTimeout(wpwandCheckProgress(id, $this), 3000); // Adjust the interval as needed 199 } 200 if (!$parent.find('.wpwand-pgdc-page table.wp-list-table td span.status').hasClass('pending')) { 201 $parent.find('.wpwand-pgdc-page .wpwand-pgdc-header').hide(); 202 } 203 } 204 }); 205 } 206 207 // Call the function to start updating the current item 208 209 $parent.find('.wpwand-pgdc-page table.wp-list-table td span.status').each(function () { 210 if ($(this).hasClass('pending')) { 211 var id = $(this).closest('tr').data('id'); 212 wpwandCheckProgress(id, $(this)) 213 } 214 }) 208 215 }) 209 216 -
ai-content-generation/trunk/inc/api.php
r2957906 r2961128 60 60 61 61 62 $content = wpwand_openAi("$command . You must write in $language. $person_cmd " );62 $content = wpwand_openAi("$command . You must write in $language. $person_cmd ", (int) $fields['no_of_results']); 63 63 64 64 $text = ''; … … 278 278 279 279 280 function wpwand_openAi($prompt, $number_of_result = 1 )281 { 282 283 $selected_model = wpwand_get_option('wpwand_model', 'gpt-3.5-turbo');280 function wpwand_openAi($prompt, $number_of_result = 1, $args = []) 281 { 282 283 $selected_model = isset($args['model']) ? $args['model'] : wpwand_get_option('wpwand_model', 'gpt-3.5-turbo'); 284 284 $busines_details = ''; 285 285 $targated_customer = ''; 286 286 $language = wpwand_get_option('wpwand_language', 'English'); 287 287 288 288 $davinci_command = WPWAND_AI_CHARACTER . "You must write in $language. Our business details is: $busines_details . Our Targated customer profile: $targated_customer. $prompt"; 289 $temperature = isset($args['temperature']) ? $args['temperature'] : (int) wpwand_get_option('wpwand_temperature', 1.0); 290 $max_tokens = isset($args['max_tokens']) ? $args['max_tokens'] : wpwangd_get_max_token($davinci_command, $selected_model); 291 $frequency_penalty = isset($args['frequency_penalty']) ? $args['frequency_penalty'] : (int) wpwand_get_option('wpwand_frequency', 0); 292 $presence_penalty = isset($args['presence_penalty']) ? $args['presence_penalty'] : (int) wpwand_get_option('wpwand_presence_penalty', 0); 289 293 290 294 … … 314 318 ] 315 319 ], 316 'n' => $number_of_result ,317 'temperature' => (int) get_option('wpwand_temperature', 1.0),318 'max_tokens' => (int) wpwand_get_option('wpwand_max_tokens', 3450),319 'frequency_penalty' => (int) get_option('wpwand_frequency', 0),320 'presence_penalty' => (int) get_option('wpwand_presence_penalty', 0),320 'n' => $number_of_result < 1 ? 1 : $number_of_result, 321 'temperature' => (int) $temperature, 322 'max_tokens' => (int) $max_tokens, 323 'frequency_penalty' => (int) $frequency_penalty, 324 'presence_penalty' => (int) $presence_penalty, 321 325 ]); 322 326 } else { 323 327 $complete = $openAI->completion([ 324 'n' => $number_of_result ,328 'n' => $number_of_result < 1 ? 1 : $number_of_result, 325 329 'model' => $selected_model, 326 'prompt' => WPWAND_AI_CHARACTER . "You must write in $language. Our business details is: $busines_details . Our Targated customer profile: $targated_customer. $prompt",327 'temperature' => (int) get_option('wpwand_temperature', 1.0),328 'max_tokens' => (int) wpwand_get_option('wpwand_max_tokens', 3450),329 'frequency_penalty' => (int) get_option('wpwand_frequency', 0),330 'presence_penalty' => (int) get_option('wpwand_presence_penalty', 0),330 'prompt' => $davinci_command, 331 'temperature' => (int) $temperature, 332 'max_tokens' => (int) $max_tokens, 333 'frequency_penalty' => (int) $frequency_penalty, 334 'presence_penalty' => (int) $presence_penalty, 331 335 ]); 332 336 -
ai-content-generation/trunk/inc/helper-functions.php
r2957906 r2961128 440 440 </div> 441 441 <div class="wpwand-welcome-screen-content"> 442 < div class="wpwand-welcome-promo-card">442 <!-- <div class="wpwand-welcome-promo-card"> 443 443 <div class="wpwand-promo-content"> 444 444 <span>LIMITED TIME DEAL</span> … … 450 450 <a target="_blank" href="https://wpwand.com/pricing-plan/">Get Lifetime Access</a> 451 451 </div> 452 </div> 452 </div> --> 453 453 <div class="wpwand-doc-button"> 454 454 <a href="https://wpwand.com/docs/knowledge-base/getting-started/" target="_blank"> … … 547 547 function wpwand_promo_notice() 548 548 { 549 if (true == get_option('wpwand_promo_notice_dismiss')) {550 return false;551 }549 // if (true == get_option('wpwand_promo_notice_dismiss')) { 550 // return false; 551 // } 552 552 $notice_id = rand(5555, 444444); 553 553 ?> … … 571 571 572 572 if (!function_exists('wpwand_pro_init')) { 573 add_action('admin_notices', 'wpwand_promo_notice');573 // add_action('admin_notices', 'wpwand_promo_notice'); 574 574 575 575 } … … 736 736 737 737 738 function wpwangd_get_max_token($command, $selected_model = '') 739 { 740 // Skip calculation for specific model 741 if ($selected_model === 'gpt-3.5-turbo-16k') { 742 return wpwand_get_option('wpwand_max_token', 3600); 743 } 744 745 $total_word = str_word_count($command); 746 $total_token = $total_word * 1.2; 747 $max_token = wpwand_get_option('wpwand_max_token', 3600); 748 749 $sum_of_tokens = $total_token + $max_token; 750 $excess = $sum_of_tokens - 4000; 751 752 if ($excess > 0) { 753 // Subtract the excess from max_token 754 $max_token -= $excess; 755 } 756 757 // Return the adjusted max_token value 758 return $max_token; 759 } -
ai-content-generation/trunk/readme.txt
r2958143 r2961128 4 4 Tags: ChatGPT, GPT4, Elementor AI, Gutenberg AI, AI Writer, wpwand, AI Content, GPT3, Content Generator, Content Writer, AI Post Generator, AI Blog Post Writer, AI Article, AI Image Generator, Dall-e 5 5 Requires at least: 5.0 6 Tested up to: 6. 36 Tested up to: 6.2.3 7 7 Stable tag: 1.1.7 8 8 License: GPL-2.0+ -
ai-content-generation/trunk/wp-wand.php
r2957906 r2961128 4 4 * Plugin URI: https://wpwand.com/ 5 5 * Description: WP Wand is a AI content generation plugin for WordPress that helps your team create high quality content 10X faster and 50x cheaper. No monthly subscription required. 6 * Version: 1.1. 76 * Version: 1.1.8 7 7 * Author: WP Wand 8 8 * Author URI: https://wpwand.com/ … … 54 54 require_once WPWAND_PLUGIN_DIR . 'inc/WooCommerce.php'; 55 55 56 if (!function_exists('wpwand_pro_init')) { 57 require_once WPWAND_PLUGIN_DIR . 'inc/post-generator.php'; 58 } 56 59 57 60 … … 68 71 } 69 72 do_action('wpwand_init'); 73 70 74 71 75
Note: See TracChangeset
for help on using the changeset viewer.