| @@ -1,93 +1,92 @@ | ||
| 1 | -<?php | |
| 2 | -if (!defined('ABSPATH')) exit; // Exit if accessed directly | |
| 3 | -global $wpchatbot_pro_professional_init,$wpchatbot_pro_master_init; | |
| 4 | -if((isset($wpchatbot_pro_master_init) && $wpchatbot_pro_master_init->is_valid()) || (isset($wpchatbot_pro_professional_init) && $wpchatbot_pro_professional_init->is_valid()) || (function_exists('get_openaiaddon_valid_license') && get_openaiaddon_valid_license())){ | |
| 5 | -?> | |
| 6 | -<div class="row"> | |
| 7 | - <div class="col-md-12"> | |
| 8 | - | |
| 9 | - <form class="file_form"> | |
| 10 | - | |
| 11 | - <input type="file" (change)="fileEvent($event)" class="inputfile" id="openfileinput" style="display:none"/> | |
| 12 | - | |
| 13 | - </form> | |
| 14 | - <form class="file_form_gpt"> | |
| 15 | - <div class="success-message alert alert-info"></div> | |
| 16 | - <div class="error-message alert alert-danger"></div> | |
| 17 | - <input type="file" (change)="fileEvent($event)" class="inputfile" id="openfileinput_gpt" style="display:none"/> | |
| 18 | - <label for="openfileinput_gpt" class="huge ui grey button"> | |
| 19 | - <span class="dashicons dashicons-cloud-upload"></span> | |
| 20 | - <?php esc_html_e('Upload JSONL GPT 3.5','chatbot'); ?> | |
| 21 | - </label> | |
| 22 | - </form> | |
| 23 | - </br> | |
| 24 | - <a href="https://wpbot.pro/myfile.jsonl" download><?php esc_html_e( 'Right click and Save the Example jsonl file','chatbot');?></a> | |
| 25 | - <div class="table-responsive"> | |
| 26 | - <table class="table table-striped table-bordered"> | |
| 27 | - <thead><tr><td> <?php esc_html_e( 'File name','chatbot'); ?></td><td><?php esc_html_e( 'File id','chatbot');?></td><td><?php esc_html_e( 'Action','chatbot');?></td></tr></thead> | |
| 28 | - <tbody id="openaiFileList"> | |
| 29 | - | |
| 30 | - </tbody> | |
| 31 | - </table> | |
| 32 | - </div> | |
| 33 | - <div class="my-5"> | |
| 34 | - <h2><?php esc_html_e( 'GPT 3.5 Fine Tuned Models List','chatbot');?></br></h2> | |
| 35 | - </div> | |
| 36 | - <div class="table-responsive"> | |
| 37 | - <table class="table table-striped table-bordered"> | |
| 38 | - <thead><tr><td><?php esc_html_e( 'FT Model','chatbot');?></td><td><?php esc_html_e( 'Status','chatbot');?> </td><td><?php esc_html_e( 'File Name','chatbot');?></td><td> <?php esc_html_e( 'File Id','chatbot');?></td></tr></thead> | |
| 39 | - <tbody id="openaiFTListGPT"> | |
| 40 | - </tbody> | |
| 41 | - </table> | |
| 42 | - </div> | |
| 43 | - </div> | |
| 44 | -</div> | |
| 45 | - | |
| 46 | -<?php | |
| 47 | - } else { ?> | |
| 48 | -<div class="row my-4"> | |
| 49 | - <div class="col-md-12"> | |
| 50 | - <div class="col-md-12"> | |
| 51 | - <?php esc_html_e('Fine tuning and training is available with the ','chatbot');?> | |
| 52 | - <a href="https://www.wpbot.pro/pricing/"><?php esc_html_e('WPBot Pro Professional','chatbot'); ?></a> | |
| 53 | - <?php esc_html_e(' and ','chatbot'); ?> | |
| 54 | - <a href="https://www.wpbot.pro/pricing/"><?php esc_html_e('Master','chatbot'); ?></a> | |
| 55 | - <?php esc_html_e(' Licenses','chatbot'); ?> | |
| 56 | - </div> | |
| 57 | - </div> | |
| 58 | -</div> | |
| 59 | -<?php } ?> | |
| 60 | - | |
| 61 | -<div id="qcld-ft-modal" class="modal fade bd-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true"> | |
| 62 | - <div class="modal-dialog modal-sm"> | |
| 63 | - <div class="modal-content"> | |
| 64 | - <div class="modal-header"> | |
| 65 | - <h5 class="modal-title" id="exampleModalLongTitle"> <?php esc_html_e('Create your Fine Tune','chatbot'); ?></h5> | |
| 66 | - <button type="button" class="close" data-dismiss="modal" aria-label="Close"> | |
| 67 | - <span aria-hidden="true">×</span> | |
| 68 | - </button> | |
| 69 | - </div> | |
| 70 | - <div class="modal-body"> | |
| 71 | - <div class="form-group"> | |
| 72 | - <label for="qcld_openai_suffix" class="form-label"><?php esc_html_e( 'Suffix for custom model','chatbot');?></label> | |
| 73 | - <input id="qcld_openai_ft_suffix" class="form-control" type="text" name="qcld_openai_ft_suffix" value="<?php echo esc_attr( get_option( 'qcld_openai_suffix') ); ?>"> | |
| 74 | - <input id="qcld_openai_ft_fileid" class="form-control" type="hidden" name="qcld_openai_ft_fileid" value=""> | |
| 75 | - </div> | |
| 76 | - <div class="form-group"> | |
| 77 | - <label for="exampleFormControlSelect1">Fine tune model</label> | |
| 78 | - <select class="form-select" aria-label="Default select example" name="qcld_openai_ft_engines" id="qcld_openai_ft_engines"> | |
| 79 | - <option <?php echo ((get_option( 'openai_engines') == '') ? 'selected' : '') ; ?>><?php esc_html_e( 'Please select Engines','chatbot');?></option> | |
| 80 | - <option value="gpt-3.5-turbo-1106" <?php echo ((get_option( 'openai_engines') == 'gpt-3.5-turbo-1106') ? 'selected' : '') ; ?>><?php esc_html_e( 'gpt-3.5-turbo-1106 (recommended)','chatbot');?></option> | |
| 81 | - <option value="gpt-3.5-turbo-0613" <?php echo ((get_option( 'openai_engines') == 'gpt-3.5-turbo-0613') ? 'selected' : '') ; ?>><?php esc_html_e( 'gpt-3.5-turbo-0613','chatbot');?></option> | |
| 82 | - <option value="gpt-4-0613" <?php echo ((get_option( 'openai_engines') == 'gpt-4-0613') ? 'selected' : '') ; ?>><?php esc_html_e( 'gpt-4-0613 (experimental)','chatbot');?></option> | |
| 83 | - </select> | |
| 84 | - </div> | |
| 85 | - </div> | |
| 86 | - <div class="modal-footer"> | |
| 87 | - <button type="button" class="btn btn-secondary" data-dismiss="modal"> <?php esc_html_e('Close','chatbot'); ?></button> | |
| 88 | - <button type="button" class="btn btn-primary create_ft_model"> <?php esc_html_e('Create Fine tune','chatbot'); ?></button> | |
| 89 | - </div> | |
| 90 | - </div> | |
| 91 | - </div> | |
| 92 | - </div> | |
| 93 | - | |
| 1 | +<?php | |
| 2 | +global $wpchatbot_pro_professional_init,$wpchatbot_pro_master_init; | |
| 3 | +if((isset($wpchatbot_pro_master_init) && $wpchatbot_pro_master_init->is_valid()) || (isset($wpchatbot_pro_professional_init) && $wpchatbot_pro_professional_init->is_valid()) || (function_exists('get_openaiaddon_valid_license') && get_openaiaddon_valid_license())){ | |
| 4 | +?> | |
| 5 | +<div class="row"> | |
| 6 | + <div class="col-md-12"> | |
| 7 | + | |
| 8 | + <form class="file_form"> | |
| 9 | + | |
| 10 | + <input type="file" (change)="fileEvent($event)" class="inputfile" id="openfileinput" style="display:none"/> | |
| 11 | + | |
| 12 | + </form> | |
| 13 | + <form class="file_form_gpt"> | |
| 14 | + <div class="success-message alert alert-info"></div> | |
| 15 | + <div class="error-message alert alert-danger"></div> | |
| 16 | + <input type="file" (change)="fileEvent($event)" class="inputfile" id="openfileinput_gpt" style="display:none"/> | |
| 17 | + <label for="openfileinput_gpt" class="huge ui grey button"> | |
| 18 | + <i class="fa fa-upload"></i> | |
| 19 | + <?php esc_html_e('Upload JSONL GPT 3.5'); ?> | |
| 20 | + </label> | |
| 21 | + </form> | |
| 22 | + </br> | |
| 23 | + <a href="https://wpbot.pro/myfile.jsonl" download><?php esc_html_e( 'Right click and Save the Example jsonl file','openai_addon');?></a> | |
| 24 | + <div class="table-responsive"> | |
| 25 | + <table class="table table-striped table-bordered"> | |
| 26 | + <thead><tr><td> <?php esc_html_e( 'File name','openai_addon'); ?></td><td><?php esc_html_e( 'File id','openai_addon');?></td><td><?php esc_html_e( 'Action','openai_addon');?></td></tr></thead> | |
| 27 | + <tbody id="openaiFileList"> | |
| 28 | + | |
| 29 | + </tbody> | |
| 30 | + </table> | |
| 31 | + </div> | |
| 32 | + <div class="my-5"> | |
| 33 | + <h2><?php esc_html_e( 'GPT 3.5 Fine Tuned Models List','openai_addon');?></br></h2> | |
| 34 | + </div> | |
| 35 | + <div class="table-responsive"> | |
| 36 | + <table class="table table-striped table-bordered"> | |
| 37 | + <thead><tr><td><?php esc_html_e( 'FT Model','openai_addon');?></td><td><?php esc_html_e( 'Status','openai_addon');?> </td><td><?php esc_html_e( 'File Name','openai_addon');?></td><td> <?php esc_html_e( 'File Id','openai_addon');?></td></tr></thead> | |
| 38 | + <tbody id="openaiFTListGPT"> | |
| 39 | + </tbody> | |
| 40 | + </table> | |
| 41 | + </div> | |
| 42 | + </div> | |
| 43 | +</div> | |
| 44 | + | |
| 45 | +<?php | |
| 46 | + } else { ?> | |
| 47 | +<div class="row my-4"> | |
| 48 | + <div class="col-md-12"> | |
| 49 | + <div class="col-md-12"> | |
| 50 | + <?php esc_html_e('Fine tuning and training is available with the ');?> | |
| 51 | + <a href="https://www.wpbot.pro/pricing/"><?php esc_html_e('WPBot Pro Professional'); ?></a> | |
| 52 | + <?php esc_html_e(' and '); ?> | |
| 53 | + <a href="https://www.wpbot.pro/pricing/"><?php esc_html_e('Master'); ?></a> | |
| 54 | + <?php esc_html_e(' Licenses'); ?> | |
| 55 | + </div> | |
| 56 | + </div> | |
| 57 | +</div> | |
| 58 | +<?php } ?> | |
| 59 | + | |
| 60 | +<div id="qcld-ft-modal" class="modal fade bd-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true"> | |
| 61 | + <div class="modal-dialog modal-sm"> | |
| 62 | + <div class="modal-content"> | |
| 63 | + <div class="modal-header"> | |
| 64 | + <h5 class="modal-title" id="exampleModalLongTitle"> <?php esc_html_e('Create your Fine Tune'); ?></h5> | |
| 65 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"> | |
| 66 | + <span aria-hidden="true">×</span> | |
| 67 | + </button> | |
| 68 | + </div> | |
| 69 | + <div class="modal-body"> | |
| 70 | + <div class="form-group"> | |
| 71 | + <label for="qcld_openai_suffix" class="form-label"><?php esc_html_e( 'Suffix for custom model','openai_addon');?></label> | |
| 72 | + <input id="qcld_openai_ft_suffix" class="form-control" type="text" name="qcld_openai_ft_suffix" value="<?php echo esc_attr( get_option( 'qcld_openai_suffix') ); ?>"> | |
| 73 | + <input id="qcld_openai_ft_fileid" class="form-control" type="hidden" name="qcld_openai_ft_fileid" value=""> | |
| 74 | + </div> | |
| 75 | + <div class="form-group"> | |
| 76 | + <label for="exampleFormControlSelect1">Fine tune model</label> | |
| 77 | + <select class="form-select" aria-label="Default select example" name="qcld_openai_ft_engines" id="qcld_openai_ft_engines"> | |
| 78 | + <option <?php echo ((get_option( 'openai_engines') == '') ? 'selected' : '') ; ?>><?php esc_html_e( 'Please select Engines','openai_addon');?></option> | |
| 79 | + <option value="gpt-3.5-turbo-1106" <?php echo ((get_option( 'openai_engines') == 'gpt-3.5-turbo-1106') ? 'selected' : '') ; ?>><?php esc_html_e( 'gpt-3.5-turbo-1106 (recommended)','openai_addon');?></option> | |
| 80 | + <option value="gpt-3.5-turbo-0613" <?php echo ((get_option( 'openai_engines') == 'gpt-3.5-turbo-0613') ? 'selected' : '') ; ?>><?php esc_html_e( 'gpt-3.5-turbo-0613','openai_addon');?></option> | |
| 81 | + <option value="gpt-4-0613" <?php echo ((get_option( 'openai_engines') == 'gpt-4-0613') ? 'selected' : '') ; ?>><?php esc_html_e( 'gpt-4-0613 (experimental)','openai_addon');?></option> | |
| 82 | + </select> | |
| 83 | + </div> | |
| 84 | + </div> | |
| 85 | + <div class="modal-footer"> | |
| 86 | + <button type="button" class="btn btn-secondary" data-dismiss="modal"> <?php esc_html_e('Close'); ?></button> | |
| 87 | + <button type="button" class="btn btn-primary create_ft_model"> <?php esc_html_e('Create Fine tune'); ?></button> | |
| 88 | + </div> | |
| 89 | + </div> | |
| 90 | + </div> | |
| 91 | + </div> | |
| 92 | + | |