Spaces:
Paused
Paused
api key modal
Browse files
src/lib/components/ApiKeyModal.svelte
CHANGED
@@ -27,14 +27,21 @@
|
|
27 |
}
|
28 |
}}
|
29 |
>
|
30 |
-
<form
|
31 |
-
|
32 |
-
|
|
|
|
|
|
|
33 |
<form aria-label="HF API" class="form-control">
|
34 |
-
<
|
35 |
-
|
36 |
-
|
37 |
-
|
|
|
|
|
|
|
|
|
38 |
<input
|
39 |
class="input input-primary"
|
40 |
name="hf_key"
|
@@ -43,26 +50,29 @@
|
|
43 |
bind:value={$HF_ACCESS_TOKEN}
|
44 |
/>
|
45 |
</form>
|
|
|
46 |
<form aria-label="HF ENDPOINT" class="form-control">
|
47 |
-
<
|
|
|
|
|
|
|
|
|
48 |
<input
|
49 |
-
class="input
|
50 |
name="hf_endpoint"
|
51 |
type="text"
|
52 |
-
placeholder="
|
53 |
bind:value={$HF_ENDPOINT}
|
54 |
/>
|
55 |
</form>
|
56 |
-
|
57 |
-
<div class="divider my-0" />
|
58 |
<form aria-label="OPENAI API" class="form-control">
|
59 |
-
<
|
|
|
60 |
Optionally you can add your OpenAI key to use it as your LLM.
|
61 |
-
</
|
62 |
-
|
63 |
-
<label for="oai_key" class="label-text pb-2">OpenAI API key</label>
|
64 |
<input
|
65 |
-
class="input
|
66 |
name="oai_key"
|
67 |
type="text"
|
68 |
placeholder="sk-***"
|
@@ -71,7 +81,7 @@
|
|
71 |
</form>
|
72 |
</div>
|
73 |
<div class="modal-action">
|
74 |
-
<button class="btn">Close</button>
|
75 |
</div>
|
76 |
</form>
|
77 |
</dialog>
|
|
|
27 |
}
|
28 |
}}
|
29 |
>
|
30 |
+
<form
|
31 |
+
method="dialog"
|
32 |
+
class="modal-box bg-base-300 shadow-xl border-base-content border-2"
|
33 |
+
>
|
34 |
+
<h3 class="font-bold text-xl pb-5">API keys needed</h3>
|
35 |
+
<div class="w-full flex flex-col">
|
36 |
<form aria-label="HF API" class="form-control">
|
37 |
+
<div>
|
38 |
+
<h3 class="font-bold inline">HF API Token</h3>
|
39 |
+
<span class="inline text-base-content">*</span>
|
40 |
+
</div>
|
41 |
+
|
42 |
+
<label for="hf_key" class="label-text pb-2">
|
43 |
+
In order for this demo to work you need your HF API token.
|
44 |
+
</label>
|
45 |
<input
|
46 |
class="input input-primary"
|
47 |
name="hf_key"
|
|
|
50 |
bind:value={$HF_ACCESS_TOKEN}
|
51 |
/>
|
52 |
</form>
|
53 |
+
<div class="divider" />
|
54 |
<form aria-label="HF ENDPOINT" class="form-control">
|
55 |
+
<h3 class="font-bold">HF Inference endpoint</h3>
|
56 |
+
<label for="hf_endpoint" class="label-text pb-2">
|
57 |
+
Optionally you can specify a HF inference endpoint. If you leave this
|
58 |
+
empty the default endpoint will be used.
|
59 |
+
</label>
|
60 |
<input
|
61 |
+
class="input"
|
62 |
name="hf_endpoint"
|
63 |
type="text"
|
64 |
+
placeholder="http://***"
|
65 |
bind:value={$HF_ENDPOINT}
|
66 |
/>
|
67 |
</form>
|
68 |
+
<div class="divider" />
|
|
|
69 |
<form aria-label="OPENAI API" class="form-control">
|
70 |
+
<h3 class="font-bold">OpenAI key</h3>
|
71 |
+
<label for="oai_key" class="label-text pb-2">
|
72 |
Optionally you can add your OpenAI key to use it as your LLM.
|
73 |
+
</label>
|
|
|
|
|
74 |
<input
|
75 |
+
class="input"
|
76 |
name="oai_key"
|
77 |
type="text"
|
78 |
placeholder="sk-***"
|
|
|
81 |
</form>
|
82 |
</div>
|
83 |
<div class="modal-action">
|
84 |
+
<button class="btn btn-neutral w-fit mx-auto">Close</button>
|
85 |
</div>
|
86 |
</form>
|
87 |
</dialog>
|