|
| 1 | +<!DOCTYPE html> |
| 2 | +<html lang="en"> |
| 3 | + <head> |
| 4 | + <meta charset="UTF-8" /> |
| 5 | + <!-- |
| 6 | + Use a content security policy to only allow loading images from https or from our extension directory, |
| 7 | + and only allow scripts that have a specific nonce. |
| 8 | + --> |
| 9 | + <meta http-equiv="Content-Security-Policy" /> |
| 10 | + <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| 11 | + <link rel="stylesheet" type="text/css" href="${stylesheetUri}" /> |
| 12 | + |
| 13 | + <div class="topnav"> |
| 14 | + <!-- TAB BUTTONS--> |
| 15 | + <!-- Three buttons for each mode, generate, insert and transform--> |
| 16 | + <button id="generateTab" title="Generate" class="item-top-tab-button"> |
| 17 | + <svg |
| 18 | + xmlns="http://www.w3.org/2000/svg" |
| 19 | + class="ionicon" |
| 20 | + viewBox="0 0 512 512" |
| 21 | + width="2.6em" |
| 22 | + height="2.6em" |
| 23 | + > |
| 24 | + <title>Generate</title> |
| 25 | + <rect |
| 26 | + fill="none" |
| 27 | + stroke="currentColor" |
| 28 | + stroke-miterlimit="10" |
| 29 | + stroke-width="32" |
| 30 | + x="280.48" |
| 31 | + y="122.9" |
| 32 | + width="63.03" |
| 33 | + height="378.2" |
| 34 | + rx="31.52" |
| 35 | + transform="rotate(-45 312.002 311.994)" |
| 36 | + /> |
| 37 | + <path |
| 38 | + stroke="currentColor" |
| 39 | + stroke-miterlimit="10" |
| 40 | + stroke-width="32" |
| 41 | + stroke-linecap="round" |
| 42 | + d="M178.38 178.38a31.64 31.64 0 000 44.75L223.25 268 268 223.25l-44.87-44.87a31.64 31.64 0 00-44.75 0z" |
| 43 | + /> |
| 44 | + <path |
| 45 | + stroke="currentColor" |
| 46 | + stroke-miterlimit="10" |
| 47 | + stroke-width="32" |
| 48 | + stroke-linecap="round" |
| 49 | + d="M48 192h48M90.18 90.18l33.94 33.94M192 48v48M293.82 90.18l-33.94 33.94M124.12 259.88l-33.94 33.94" |
| 50 | + /> |
| 51 | + </svg> |
| 52 | + </button> |
| 53 | + <button id="insertTab" title="Insert" class="item-top-tab-button"> |
| 54 | + <svg |
| 55 | + xmlns="http://www.w3.org/2000/svg" |
| 56 | + class="ionicon" |
| 57 | + viewBox="0 0 512 512" |
| 58 | + width="2.6em" |
| 59 | + height="2.6em" |
| 60 | + > |
| 61 | + <title>Insert</title> |
| 62 | + <path |
| 63 | + fill="none" |
| 64 | + stroke="currentColor" |
| 65 | + stroke-linecap="round" |
| 66 | + stroke-linejoin="round" |
| 67 | + stroke-width="32" |
| 68 | + d="M160 368L32 256l128-112M352 368l128-112-128-112M192 288.1l64 63.9 64-63.9M256 160v176.03" |
| 69 | + /> |
| 70 | + </svg> |
| 71 | + </button> |
| 72 | + <button |
| 73 | + id="editTab" |
| 74 | + title="Transform" |
| 75 | + class="item-top-tab-button" |
| 76 | + disabled |
| 77 | + > |
| 78 | + <svg |
| 79 | + xmlns="http://www.w3.org/2000/svg" |
| 80 | + class="ionicon" |
| 81 | + viewBox="0 0 512 512" |
| 82 | + width="2.6em" |
| 83 | + height="2.6em" |
| 84 | + > |
| 85 | + <title>Transform</title> |
| 86 | + <path |
| 87 | + stroke="currentColor" |
| 88 | + stroke-miterlimit="10" |
| 89 | + stroke-width="32" |
| 90 | + stroke-linecap="round" |
| 91 | + d="M384 224v184a40 40 0 01-40 40H104a40 40 0 01-40-40V168a40 40 0 0140-40h167.48" |
| 92 | + fill="none" |
| 93 | + stroke="currentColor" |
| 94 | + stroke-linecap="round" |
| 95 | + stroke-linejoin="round" |
| 96 | + stroke-width="32" |
| 97 | + /> |
| 98 | + <path |
| 99 | + stroke="currentColor" |
| 100 | + stroke-miterlimit="10" |
| 101 | + stroke-width="32" |
| 102 | + stroke-linecap="round" |
| 103 | + d="M459.94 53.25a16.06 16.06 0 00-23.22-.56L424.35 65a8 8 0 000 11.31l11.34 11.32a8 8 0 0011.34 0l12.06-12c6.1-6.09 6.67-16.01.85-22.38zM399.34 90L218.82 270.2a9 9 0 00-2.31 3.93L208.16 299a3.91 3.91 0 004.86 4.86l24.85-8.35a9 9 0 003.93-2.31L422 112.66a9 9 0 000-12.66l-9.95-10a9 9 0 00-12.71 0z" |
| 104 | + /> |
| 105 | + </svg> |
| 106 | + </button> |
| 107 | + </div> |
| 108 | + </head> |
| 109 | + <body> |
| 110 | + <div class="item-100"> |
| 111 | + <!-- End of topnav --> |
| 112 | + |
| 113 | + <div class="item"> |
| 114 | + <p class="item-title">Model</p> |
| 115 | + |
| 116 | + <select class="item-select" id="model" name="model-type"> |
| 117 | + ${modelOptions} |
| 118 | + </select> |
| 119 | + </div> |
| 120 | + |
| 121 | + <!-- TEMPERATURE--> |
| 122 | + <div |
| 123 | + class="item" |
| 124 | + title="Controls randomness. Lowering results in less random completions.\n As the temperature approaches zero, the model will become deterministic and repetitive." |
| 125 | + > |
| 126 | + <p class="item-title">Temperature</p> |
| 127 | + |
| 128 | + <input |
| 129 | + class="slider" |
| 130 | + value="${engine[this._tab].getEngineOptions().temperature}" |
| 131 | + id="temperature_slider" |
| 132 | + type="range" |
| 133 | + min="0" |
| 134 | + max="1" |
| 135 | + step="0.01" |
| 136 | + /> |
| 137 | + <input |
| 138 | + class="item-input-number" |
| 139 | + id="temperature_input" |
| 140 | + min="0" |
| 141 | + max="1" |
| 142 | + type="number" |
| 143 | + value="${engine[this._tab].getEngineOptions().temperature}" |
| 144 | + step="0.01" |
| 145 | + /> |
| 146 | + </div> |
| 147 | + |
| 148 | + <!-- STOPSQUENCE --> |
| 149 | + <div |
| 150 | + class="item" |
| 151 | + title="Up to four sequences where the API will stop generating further tokens.\n The returned text will not contain the stop sequence." |
| 152 | + > |
| 153 | + <p class="item-title">StopSequence</p> |
| 154 | + <p class="item-sub"> |
| 155 | + ${engine[this._tab].getEngineOptions().stopSequence} |
| 156 | + </p> |
| 157 | + |
| 158 | + <input |
| 159 | + class="item-input" |
| 160 | + type="text" |
| 161 | + id="stopSequence" |
| 162 | + name="stop_sequence" |
| 163 | + /> |
| 164 | + </div> |
| 165 | + |
| 166 | + <!-- TOP P--> |
| 167 | + <div |
| 168 | + class="item" |
| 169 | + title="Controls diversity via nucleus sampling. 0.5 means half of all likelihodd-weighted options are considered." |
| 170 | + > |
| 171 | + <p class="item-title">Top P</p> |
| 172 | + |
| 173 | + <input |
| 174 | + class="slider" |
| 175 | + value="${engine[this._tab].getEngineOptions().top_p}" |
| 176 | + id="top_p_slider" |
| 177 | + type="range" |
| 178 | + min="0" |
| 179 | + max="1" |
| 180 | + step="0.01" |
| 181 | + /> |
| 182 | + <input |
| 183 | + class="item-input-number" |
| 184 | + value="${engine[this._tab].getEngineOptions().top_p}" |
| 185 | + id="top_p_input" |
| 186 | + type="number" |
| 187 | + min="0" |
| 188 | + max="1" |
| 189 | + step="0.01" |
| 190 | + /> |
| 191 | + </div> |
| 192 | + |
| 193 | + <!-- INSTRUCTIONS--> |
| 194 | + <div class="item-100"> |
| 195 | + <p class="item-title">Instructions</p> |
| 196 | + <textarea |
| 197 | + class="item-textarea" |
| 198 | + type="text" |
| 199 | + id="transformInstructions" |
| 200 | + name="transformInstructions" |
| 201 | + > |
| 202 | +${engine[this._tab].getEngineOptions().transformInstructions}</textarea |
| 203 | + > |
| 204 | + </div> |
| 205 | + </div> |
| 206 | + </body> |
| 207 | + <script src="${this.scriptUri}"></script> |
| 208 | +</html> |
0 commit comments