diff options
author | ShadovvBeast <ShadovvBeast@gmail.com> | 2023-12-15 13:49:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-15 13:49:01 +0200 |
commit | 88ae8952b65cbf32eb1f5703681ea592e510e570 (patch) | |
tree | d3624a445dbd8857c4f3bc62d512c44dcab8a693 /examples/server/public/index.html | |
parent | ee4725a686643669a8587142fa068cbf29de3ce2 (diff) |
server : add optional API Key Authentication example (#4441)
* Add API key authentication for enhanced server-client security
* server : to snake_case
---------
Co-authored-by: Georgi Gerganov <ggerganov@gmail.com>
Diffstat (limited to 'examples/server/public/index.html')
-rw-r--r-- | examples/server/public/index.html | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/server/public/index.html b/examples/server/public/index.html index 451fd4a3..07d779d2 100644 --- a/examples/server/public/index.html +++ b/examples/server/public/index.html @@ -235,7 +235,8 @@ grammar: '', n_probs: 0, // no completion_probabilities, image_data: [], - cache_prompt: true + cache_prompt: true, + api_key: '' }) /* START: Support for storing prompt templates and parameters in browsers LocalStorage */ @@ -790,6 +791,10 @@ <fieldset> ${IntField({ label: "Show Probabilities", max: 10, min: 0, name: "n_probs", value: params.value.n_probs })} </fieldset> + <fieldset> + <label for="api_key">API Key</label> + <input type="text" name="api_key" value="${params.value.api_key}" placeholder="Enter API key" oninput=${updateParams} /> + </fieldset> </details> </form> ` |