| 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 |
<div class="success-message alert alert-info"></div> |
| 10 |
<div class="error-message alert alert-danger"></div> |
| 11 |
<input type="file" (change)="fileEvent($event)" class="inputfile" id="openfileinput" style="display:none"/> |
| 12 |
<label for="openfileinput" class="huge ui grey button"> |
| 13 |
<i class="fa fa-upload"></i> |
| 14 |
<?php esc_html_e('Upload JSONL'); ?> |
| 15 |
</label> |
| 16 |
</form> |
| 17 |
<form class="file_form_gpt"> |
| 18 |
<div class="success-message alert alert-info"></div> |
| 19 |
<div class="error-message alert alert-danger"></div> |
| 20 |
<input type="file" (change)="fileEvent($event)" class="inputfile" id="openfileinput_gpt" style="display:none"/> |
| 21 |
<label for="openfileinput_gpt" class="huge ui grey button"> |
| 22 |
<i class="fa fa-upload"></i> |
| 23 |
<?php esc_html_e('Upload JSONL GPT 3.5'); ?> |
| 24 |
</label> |
| 25 |
</form> |
| 26 |
</br> |
| 27 |
<a href="https://wpbot.pro/myfile.jsonl" download><?php esc_html_e( 'Right click and Save the Example jsonl file','openai_addon');?></a> |
| 28 |
<div class="table-responsive"> |
| 29 |
<table class="table table-striped table-bordered"> |
| 30 |
<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> |
| 31 |
<tbody id="openaiFileList"> |
| 32 |
|
| 33 |
</tbody> |
| 34 |
</table> |
| 35 |
</div> |
| 36 |
<div class="my-5"> |
| 37 |
<h2><?php esc_html_e( 'Fine Tuned Models List','openai_addon');?></br></h2> |
| 38 |
</div> |
| 39 |
<div class="table-responsive"> |
| 40 |
<table class="table table-striped table-bordered"> |
| 41 |
<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> |
| 42 |
<tbody id="openaiFTList"> |
| 43 |
|
| 44 |
</tbody> |
| 45 |
</table> |
| 46 |
</div> |
| 47 |
<div class="my-5"> |
| 48 |
<h2><?php esc_html_e( 'GPT 3.5 Fine Tuned Models List','openai_addon');?></br></h2> |
| 49 |
</div> |
| 50 |
<div class="table-responsive"> |
| 51 |
<table class="table table-striped table-bordered"> |
| 52 |
<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> |
| 53 |
<tbody id="openaiFTListGPT"> |
| 54 |
</tbody> |
| 55 |
</table> |
| 56 |
</div> |
| 57 |
</div> |
| 58 |
</div> |
| 59 |
|
| 60 |
<?php |
| 61 |
} else { ?> |
| 62 |
<div class="row"> |
| 63 |
<div class="col-md-12"> |
| 64 |
<?php |
| 65 |
esc_html_e('Fine tuning and training is available with the WPBot Pro Professional and Master Licenses'); |
| 66 |
|
| 67 |
?> |
| 68 |
</div> |
| 69 |
</div> |
| 70 |
<?php } ?> |
| 71 |
|
| 72 |
<div id="qcld-ft-modal" class="modal fade bd-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true"> |
| 73 |
<div class="modal-dialog modal-sm"> |
| 74 |
<div class="modal-content"> |
| 75 |
<div class="modal-header"> |
| 76 |
<h5 class="modal-title" id="exampleModalLongTitle"> <?php esc_html_e('Create your Fine Tune'); ?></h5> |
| 77 |
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> |
| 78 |
<span aria-hidden="true">×</span> |
| 79 |
</button> |
| 80 |
</div> |
| 81 |
<div class="modal-body"> |
| 82 |
<div class="form-group"> |
| 83 |
<label for="qcld_openai_suffix" class="form-label"><?php esc_html_e( 'Suffix for custom model','openai_addon');?></label> |
| 84 |
<input id="qcld_openai_ft_suffix" class="form-control" type="text" name="qcld_openai_ft_suffix" value="<?php echo get_option( 'qcld_openai_suffix'); ?>"> |
| 85 |
<input id="qcld_openai_ft_fileid" class="form-control" type="hidden" name="qcld_openai_ft_fileid" value=""> |
| 86 |
</div> |
| 87 |
<div class="form-group"> |
| 88 |
<label for="exampleFormControlSelect1">Fine tune model</label> |
| 89 |
<select class="form-select" aria-label="Default select example" name="qcld_openai_ft_engines" id="qcld_openai_ft_engines"> |
| 90 |
<option <?php echo ((get_option( 'openai_engines') == '') ? 'selected' : '') ; ?>><?php esc_html_e( 'Please select Engines','openai_addon');?></option> |
| 91 |
<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','openai_addon');?></option> |
| 92 |
<option value="text-davinci-003" <?php echo ((get_option( 'openai_engines') == 'text-davinci-003') ? 'selected' : '') ; ?>><?php esc_html_e( 'Davinci (GPT-3 model)','openai_addon');?></option> |
| 93 |
<option value="text-davinci-001" <?php echo ((get_option( 'openai_engines') == 'text-davinci-001') ? 'selected' : '') ; ?>><?php esc_html_e( 'Davinci','openai_addon');?></option> |
| 94 |
<option value="text-ada-001" <?php echo ((get_option( 'openai_engines') == 'text-ada-001') ? 'selected' : '') ; ?>><?php esc_html_e( 'Ada','openai_addon');?></option> |
| 95 |
<option value="text-curie-001" <?php echo ((get_option( 'openai_engines') == 'text-curie-001') ? 'selected' : '') ; ?>><?php esc_html_e( 'Curie','openai_addon');?></option> |
| 96 |
<option value="text-babbage-001" <?php echo ((get_option( 'openai_engines') == 'text-babbage-001') ? 'selected' : '' ); ?>><?php esc_html_e( 'Babbag','openai_addon');?></option> |
| 97 |
</select> |
| 98 |
</div> |
| 99 |
</div> |
| 100 |
<div class="modal-footer"> |
| 101 |
<button type="button" class="btn btn-secondary" data-dismiss="modal"> <?php esc_html_e('Close'); ?></button> |
| 102 |
<button type="button" class="btn btn-primary create_ft_model"> <?php esc_html_e('Create Fine tune'); ?></button> |
| 103 |
</div> |
| 104 |
</div> |
| 105 |
</div> |
| 106 |
</div> |
| 107 |
|
| 108 |
|