-
Notifications
You must be signed in to change notification settings - Fork 0
/
options.html
165 lines (138 loc) · 4.86 KB
/
options.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
<!DOCTYPE html>
<html>
<head>
<title>Web Summarizer & Translator Options</title>
<meta charset="UTF-8">
<style>
body {
margin: 20px;
}
h1 {
color: #333;
}
.container {
display: flex;
flex-direction: column;
width: 700px;
}
.input-group {
margin-bottom: 15px;
}
label {
display: block;
margin-bottom: 5px;
font-weight: 600;
}
input[type="text"],
input[type="number"],
input[type="password"] {
padding: 8px;
border-radius: 4px;
border: 1px solid #ddd;
width: 100%;
box-sizing: border-box;
}
.is-pass{
width: calc(100% - 30px) !important;
}
input[type="checkbox"] {
margin-right: 5px;
}
button {
padding: 10px 20px;
background-color: #4CAF50;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
}
button:hover {
background-color: #45a049;
}
.toggle-password{
cursor: pointer;
}
</style>
</head>
<body>
<h2>Settings</h2>
<div class="container">
<div class="input-group">
<label for="completion-provider">Completion API Provider:</label>
<select id="completion-provider">
<option value="groq">Groq</option>
<option value="openai">OpenAI</option>
</select>
</div>
<div style="text-align: center; width: 300px; margin: 0 auto; margin-top:20px; margin-bottom: 20px">
-----------USING GROQ API-------------
</div>
<div class="input-group">
<label for="groq-api-url">API URL:</label>
<input type="text" id="groq-api-url" value="" placeholder="https://api.groq.com/openai/v1/chat/completions">
</div>
<div class="input-group">
<label for="groq-api-key">API Key:</label>
<input type="password" id="groq-api-key" class="is-pass" value="" placeholder="Your API Key, gsk_...">
<span id="groq-api-key-toggle-password" class="toggle-password">👀</span>
</div>
<div class="input-group">
<label for="groq-model-name">Model Name:</label>
<input type="text" id="groq-model-name" value="" placeholder="e.g., llama3-70b-8192">
</div>
<div class="input-group">
<label for="groq-temperature">Temperature (0.0 - 2.0):</label>
<input type="number" id="groq-temperature" min="0" max="2" step="0.1">
</div>
<div class="input-group">
<label for="groq-max-token">Max Token (4096 for gpt3.5 or 8192 for llama 3):</label>
<input type="number" id="groq-max-token" min="0">
</div>
<div style="text-align: center; width: 300px; margin: 0 auto; margin-top:20px; margin-bottom: 20px">
------------USING OPENAI API------------
</div>
<div class="input-group">
<label for="openai-api-url">API URL:</label>
<input type="text" id="openai-api-url" value="" placeholder="https://api.openai.com/v1/chat/completions">
</div>
<div class="input-group">
<label for="openai-api-key">API Key:</label>
<input type="password" id="openai-api-key" class="is-pass" value="" placeholder="Your API Key, gsk_...">
<span id="openai-api-key-toggle-password" class="toggle-password">👀</span>
</div>
<div class="input-group">
<label for="openai-model-name">Model Name:</label>
<input type="text" id="openai-model-name" value="" placeholder="e.g., gpt-3.5-turbo-0125, gpt-4o-mini">
</div>
<div class="input-group">
<label for="openai-temperature">Temperature (0.0 - 2.0):</label>
<input type="number" id="openai-temperature" min="0" max="2" step="0.1">
</div>
<div class="input-group">
<label for="openai-max-token">Max Token (4096 for gpt3.5 or 8192 for llama 3, 16384 for gpt-4o-mini):</label>
<input type="number" id="openai-max-token" min="0">
</div>
<div style="text-align: center; width: 300px; margin: 0 auto; margin-top:20px; margin-bottom: 20px">
------------------------
</div>
<h3>OPEN AI Whisper (Optional)</h3>
<div class="input-group">
<label for="openai-tts-api-key">OPEN AI - API Key:</label>
<input type="password" id="openai-tts-api-key" class="is-pass" value="" placeholder="OPEN AI API Key">
<span id="openai-whisper-toggle-password" class="toggle-password">👀</span>
</div>
<div class="input-group">
<label for="openai-tts-model-name">OPEN AI - Model Name:</label>
<input type="text" id="openai-tts-model-name" value="" placeholder="TTS Model Name, e.g., tts-1">
</div>
<div class="input-group">
<label for="openai-tts-voice">Voice Name:</label>
<input type="text" id="openai-tts-voice" value="" placeholder="TTS voice, like 'echo', 'alloy'...">
</div>
<button id="save-settings">Save Settings</button>
</div>
<!-- <button id="open-options">Open Options</button> -->
<script src="options.js"></script>
</body>
</html>