| 1 |
<div class="accordion" id="qcldopenaiaccordion"> |
| 2 |
<div class="card"> |
| 3 |
<div class="card-header"> |
| 4 |
<h2 class="mb-0"> |
| 5 |
<button class="btn btn-link" type="button" data-toggle="collapse" data-target="#panelsStayOpen-collapseZero" aria-expanded="true" aria-controls="panelsStayOpen-collapseZero"> |
| 6 |
<?php esc_html_e( 'Getting Started with OpenAI','openai_addon');?> |
| 7 |
</button> |
| 8 |
</h2> |
| 9 |
</div> |
| 10 |
<div id="panelsStayOpen-collapseZero" class=" collapse show" aria-labelledby="panelsStayOpen-headingZer"> |
| 11 |
<div class="card-body"> |
| 12 |
<p> |
| 13 |
<?php esc_html_e( 'Once you add the OpenAI API key, it should already start working for generic questions. Open a new browser window in Incognito mode and test by asking "What is the capital of Russia?"','openai_addon');?></p> |
| 14 |
<?php esc_html_e( ' Please make sure DialogFlow is Disabled if you want OpenAI to work','openai_addon');?></p> |
| 15 |
<p > <?php esc_html_e( 'You can upload your own training data a json,jsonl or csv file. See below on how to format the JSONL file.','openai_addon');?></p> |
| 16 |
<?php esc_html_e( 'Example:','openai_addon'); ?> </br> |
| 17 |
<code > <?php esc_html_e( ' |
| 18 |
{"prompt": "puppy A is happy", "completion": "emotional state of puppy A"}','openai_addon'); ?></code></br> |
| 19 |
<code > <?php esc_html_e( ' |
| 20 |
{"prompt": "puppy B is sad", "completion": "emotional state of puppy B"}','openai_addon'); ?></code></br> |
| 21 |
</div> |
| 22 |
</div> |
| 23 |
</div> |
| 24 |
<div class="card"> |
| 25 |
<div class="card-header"> |
| 26 |
<h2 class=""> |
| 27 |
<button class="btn btn-link" type="button" data-toggle="collapse" data-target="#panelsStayOpen-collapseOne" aria-expanded="false" aria-controls="panelsStayOpen-collapseOne"> |
| 28 |
<?php esc_html_e( 'How to get an OpenAI API Key','openai_addon');?> |
| 29 |
</button> |
| 30 |
</h2> |
| 31 |
</div> |
| 32 |
<div id="panelsStayOpen-collapseOne" class=" collapse" aria-labelledby="panelsStayOpen-headingOne"> |
| 33 |
<div class="card-body"> |
| 34 |
<p><?php esc_html_e( 'The OpenAI API uses API keys for authentication. Visit your API Keys page to retrieve the API key you’ll use in your requests.Remember that your API key is a secret! Do not share it with others or expose it in any client-side code (browsers, apps). Production requests must be routed through your own backend server where your API key can be securely loaded from an environment variable or key management service.','openai_addon');?></p> |
| 35 |
|
| 36 |
<img class="img-responsive" src="<?php echo esc_url(QCLD_openai_addon_PLUGIN_URL.'image/api_screenshort.png'); ?>"/> |
| 37 |
|
| 38 |
</div> |
| 39 |
</div> |
| 40 |
</div> |
| 41 |
<div class="card"> |
| 42 |
<div class="card-header"> |
| 43 |
<h2 class="mb-0" id="panelsStayOpen-headingSeven"> |
| 44 |
<button class="btn btn-link" type="button" data-toggle="collapse" data-target="#panelsStayOpen-collapseseven" aria-expanded="false" aria-controls="panelsStayOpen-collapseseven"> |
| 45 |
<?php esc_html_e( 'Training or Fine Tuning OpenAI','openai_addon');?> |
| 46 |
</button> |
| 47 |
</h2> |
| 48 |
</div> |
| 49 |
<div id="panelsStayOpen-collapseseven" class=" collapse" aria-labelledby="panelsStayOpen-headingSeven"> |
| 50 |
<div class="card-body"> |
| 51 |
|
| 52 |
<p><?php esc_html_e( 'To train Open AI','openai_addon');?> |
| 53 |
<ul> |
| 54 |
<li><?php esc_html_e('a. To train or fine tune a model, 1st you need to: |
| 55 |
','openai_addon'); ?> |
| 56 |
<ol> |
| 57 |
<li><?php esc_html_e('Gather the necessary data you want to train with','openai_addon'); ?></li> |
| 58 |
<li><?php esc_html_e('Format the data correctly according to OpenAI API requirements (Download sample data format to see how it works). A dataset should have a at least 500 rows to offer useful results. According to the OpenAI documentation, numbers of 3,000 and 5,000 rows are recommended.','openai_addon'); ?></li> |
| 59 |
<li><?php esc_html_e('Upload the data to OpenAI in .JSONL format','openai_addon'); ?></li> |
| 60 |
<li><?php esc_html_e('Train an existing OpenAI model(select from the Bot OpenAI settings page) with your data','openai_addon'); ?></li> |
| 61 |
</ol> |
| 62 |
</li> |
| 63 |
<li><?php esc_html_e('b. Once you have your JSONL file ready, please go to the Training model section. |
| 64 |
Upload your training file in .JSONL format.','openai_addon'); ?></li> |
| 65 |
<li><?php esc_html_e('c. Once you upload your training file, it will return a file id and the training will start once you click the Create FT Model button. It may take up to 20 minutes depending on the size of your dataset.','openai_addon'); ?></li> |
| 66 |
<li><?php esc_html_e('d. Once the training is done and the file is ready, it will return the fine tuned model. It will be listed under the Fine Tuned Models List, the status will be shown as "Succeeded" and you will also get a FT(Fine Tuned) Model ID (to copy to the settings page).','openai_addon'); ?></li> |
| 67 |
<li><?php esc_html_e('e. You can create multiple Fine Tuned models following the above procedure. Copy the Fine Tuned model ID you want to use.','openai_addon'); ?></li> |
| 68 |
<li><?php esc_html_e('f. Go to the main Bot OpenAI settings page and paste the Fine Tuned model ID to the Custom Fine Tuned Model field and save. Now the bot will start responding according to the Training data.','openai_addon'); ?></li> |
| 69 |
<ul> |
| 70 |
</p> |
| 71 |
|
| 72 |
<?php esc_html_e( 'Example:','openai_addon'); ?> </br> |
| 73 |
<code > <?php esc_html_e( ' |
| 74 |
{"prompt": "puppy A is happy", "completion": "emotional state of puppy A"}','openai_addon'); ?></code></br> |
| 75 |
<code > <?php esc_html_e( ' |
| 76 |
{"prompt": "puppy B is sad", "completion": "emotional state of puppy B"}','openai_addon'); ?></code></br> |
| 77 |
</br> |
| 78 |
<a href="https://wpbot.pro/myfile.jsonl" download><?php esc_html_e( 'Right click and Save the Example jsonl file','openai_addon');?></a> |
| 79 |
</div> |
| 80 |
</div> |
| 81 |
</div> |
| 82 |
<div class="card"> |
| 83 |
<div class="card-header"> |
| 84 |
<h2 class="mb-0" id="panelsStayOpen-headingTwo"> |
| 85 |
<button class="btn btn-link" type="button" data-toggle="collapse" data-target="#panelsStayOpen-collapseTwo" aria-expanded="false" aria-controls="panelsStayOpen-collapseTwo"> |
| 86 |
<?php esc_html_e( 'Presence Penalty','openai_addon');?> |
| 87 |
</button> |
| 88 |
</h2> |
| 89 |
</div> |
| 90 |
<div id="panelsStayOpen-collapseTwo" class=" collapse" aria-labelledby="panelsStayOpen-headingTwo"> |
| 91 |
<div class="card-body"> |
| 92 |
<?php esc_html_e( 'Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model’s likelihood to talk about new topics.','openai_addon');?> |
| 93 |
</div> |
| 94 |
</div> |
| 95 |
</div> |
| 96 |
<div class="card"> |
| 97 |
<div class="card-header"> |
| 98 |
<h2 class="mb-0" id="panelsStayOpen-headingThree"> |
| 99 |
<button class="btn btn-link" type="button" data-toggle="collapse" data-target="#panelsStayOpen-collapseThree" aria-expanded="false" aria-controls="panelsStayOpen-collapseThree"> |
| 100 |
<?php esc_html_e( 'Frequency Penalty','openai_addon');?> |
| 101 |
</button> |
| 102 |
</h2> |
| 103 |
</div> |
| 104 |
<div id="panelsStayOpen-collapseThree" class=" collapse" aria-labelledby="panelsStayOpen-headingThree"> |
| 105 |
<div class="card-body"> |
| 106 |
<?php esc_html_e( ' Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model’s likelihood to repeat the same line verbatim.','openai_addon');?> |
| 107 |
|
| 108 |
</div> |
| 109 |
</div> |
| 110 |
</div> |
| 111 |
<div class="card"> |
| 112 |
<div class="card-header"> |
| 113 |
<h2 class="mb-0" id="panelsStayOpen-headingFour"> |
| 114 |
<button class="btn btn-link" type="button" data-toggle="collapse" data-target="#panelsStayOpen-collapsefour" aria-expanded="false" aria-controls="panelsStayOpen-collapseFour"> |
| 115 |
<?php esc_html_e( 'Tempareture','openai_addon');?> |
| 116 |
</button> |
| 117 |
</h2> |
| 118 |
</div> |
| 119 |
<div id="panelsStayOpen-collapsefour" class=" collapse" aria-labelledby="panelsStayOpen-headingFour"> |
| 120 |
<div class="card-body"> |
| 121 |
<?php esc_html_e( ' One of the most important settings is called temperature.When the temperature is above 0, submitting the same prompt results in different completions each time.Remember that the model predicts which text is most likely to follow the text preceding it. Temperature is a value between 0 and 1 that essentially lets you control how confident the model should be when making these predictions. Lowering temperature means it will take fewer risks, and completions will be more accurate and deterministic. Increasing temperature will result in more diverse completions.','openai_addon');?> |
| 122 |
</div> |
| 123 |
</div> |
| 124 |
</div> |
| 125 |
<div class="card"> |
| 126 |
<div class="card-header"> |
| 127 |
<h2 class="mb-0" id="panelsStayOpen-headingSix"> |
| 128 |
<button class="btn btn-link" type="button" data-toggle="collapse" data-target="#panelsStayOpen-collapsesix" aria-expanded="false" aria-controls="panelsStayOpen-collapsesix"> |
| 129 |
<?php esc_html_e( 'My Open Ai does not work','openai_addon');?> |
| 130 |
</button> |
| 131 |
</h2> |
| 132 |
</div> |
| 133 |
<div id="panelsStayOpen-collapsesix" class=" collapse" aria-labelledby="panelsStayOpen-headingSix"> |
| 134 |
<div class="card-body"> |
| 135 |
<?php esc_html_e( ' Please check your settings( i.e: Api keys, Max token etc.). Depending on the model (GPT3 was maximum 4000 other is 1,951 ) used, requests can use up to 4097 tokens shared between prompt and completion. If your prompt is 4000 tokens, your completion can be 97 tokens at most. Also check the dialogflow is inactive. Dialogflow and open ai does not work together.','openai_addon');?> |
| 136 |
</div> |
| 137 |
</div> |
| 138 |
</div> |
| 139 |
</div> |
| 140 |
|
| 141 |
|
| 142 |
|
| 143 |
|
| 144 |
|
| 145 |
|