-
Notifications
You must be signed in to change notification settings - Fork 0
/
options.html
225 lines (192 loc) · 7.47 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
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
<!DOCTYPE html>
<html>
<head>
<title>open-os Options</title>
<link href="https://fonts.googleapis.com/css?family=Montserrat%3A400%2C700%7CBitter%3A400%2C700&display=swap" rel="stylesheet">
<style>
body {
font-family: Montserrat, Helvetica, sans-serif;
background-color: #f2f2f2;
background-image: url('back-open-os.jpg');
background-size: cover;
}
h1 {
text-align: center;
font-size: 30px;
font-weight: 300;
color: #545454;
margin-bottom: 30px;
margin-top: 10px;
}
label {
display: block;
margin-top: 10px;
}
textarea {
display: block;
margin-top: 10px;
width: 100%;
min-height: 60px;
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
}
input[type="text"], select {
width: 100%;
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
box-sizing: border-box;
margin-top: 6px;
margin-bottom: 16px;
}
button[type="submit"] {
background-color: #4CAF50;
color: white;
padding: 12px 20px;
border: none;
border-radius: 4px;
cursor: pointer;
margin-top: 16px;
}
button[type="submit"]:hover {
background-color: #45a049;
}
#options-frame {
width: 600px;
border: 2px solid #d6d6d6;
padding: 20px;
border-radius: 5px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
margin: 30px auto;
background-color: #f2f2f2;
}
#options-frame h3 {
margin-top: 0;
}
#about {
font-size: 12px;
margin-bottom: 30px;
}
table {
width: 80%;
border-collapse: collapse; /* Ensures that the border lines between cells are single lines */
text-align: center; /* Centers text horizontally in each cell */
}
th, td {
border: 1px solid #666666; /* Adds a simple black border around each cell */
padding: 8px; /* Adds space between cell borders and the content inside */
}
th {
background-color: #f2f2f2; /* Light grey background for the header cells */
padding-top: 12px;
padding-bottom: 12px;
}
</style>
</head>
<body>
<div id="options-frame">
<h1 id="options-title"><b>open-os</b> Extension Options</h1>
<div id="about">
<p>Small open-source extension for Chromium-based browsers like Chrome, Brave, or Edge to quickly access your favorite local AI LLM assistant while browsing.</p>
<p>This beta is configured for Ollama models (Llama3, Phi3, Mistral, Gemma...).</p>
<p>Simply click on the extension icon and start chatting with your virtual assistant. Right-click on the extension icon to open a new tab.</p>
<p>Extension has been developed and is maintained by <a href="https://twitter.com/luishg/" target="_blank">@luishg</a> with the help of ChatGPT and Github Copilot.</p>
<br>
<strong>Make sure you have installed Ollama and it is running</strong>
<ul>
<li>Download Ollama: <a target="_blank" href="https://ollama.com/">https://ollama.com/</a></li>
<li>Install any of the available models on Ollama. For example, for LLama3 from META, simply type "ollama run llama3:8b" in your OS terminal</li>
<li>Llama-3 Installation video tutorial: <a target="_blank" href="https://www.youtube.com/watch?v=7ujZ1N4Pmz8">https://www.youtube.com/watch?v=7ujZ1N4Pmz8</a></li>
</ul>
</br>
<strong>Compatible Browsers</strong>
<br><br>
<table>
<tr>
<th>Browser</th>
<th>Side Panel</th>
<th>Tab</th>
</tr>
<tr>
<td>Chrome</td>
<td>OK</td>
<td>OK</td>
</tr>
<tr>
<td>Edge</td>
<td>NO</td>
<td>OK</td>
</tr>
<tr>
<td>Firefox</td>
<td>Not tested</td>
<td>Not tested</td>
</tr>
<tr>
<td>Brave</td>
<td>OK</td>
<td>OK</td>
</tr>
<tr>
<td>Arc</td>
<td>NO</td>
<td>OK</td>
</tr>
</table>
<br><br>
<strong>Not getting responses? How to expose the Ollama server.</strong>
<p>By default, Ollama allows cross origin requests from 127.0.0.1 and 0.0.0.0.</p>
<p>To support more origins, you can use the <code>OLLAMA_ORIGINS</code> environment variable: <a target="_blank" href="https://github.com/ollama/ollama/blob/main/docs/faq.md">https://github.com/ollama/ollama/blob/main/docs/faq.md</a></p>
<p>For more info visit <a target="_blank" href="https://www.open-os.com" target="_blank">open-os.com</a></p>
</br></br>
</div>
<form id="options-form">
<label for="theme-select">Theme:</label>
<p>Retro Teme Font: "More Perfect DOS VGA" by https://zehfernando.com/about/</p>
<select id="theme-select" name="theme">
<option value="light" selected>Light Theme</option>
<option value="dark">Dark Theme</option>
<option value="retro">MS-DOS 6.22 Terminal</option>
<option value="nostromo">NOSTROMO COMPUTER MU-TH-UR 6000 (Alien)</option>
</select>
<label for="font-size-select">Font Size:</label>
<select id="font-size-select" name="font-size">
<option value="10">10px</option>
<option value="12">12px</option>
<option value="14" selected>14px</option>
<option value="16">16px</option>
<option value="18">18px</option>
<option value="20">20px</option>
<option value="24">24px</option>
<option value="26">26px</option>
<option value="28">28px</option>
<option value="30">30px</option>
</select>
<label for="username-input">User name:</label>
<input type="text" id="username-input" name="username" placeholder="Your name here">
<label for="openos-name-input">open-os name:</label>
<input type="text" id="openos-name-input" name="openos_name" placeholder="Your OpenOS name here">
<label for="openos-header-input">open-os header:</label>
<input type="text" id="openos-header-input" name="openos_header" placeholder="Your OpenOS header here">
<label display="none" for="api-key-input">OpenAI API_KEY (deprecated):</label>
<input display="none" type="text" disabled id="api-key-input" name="api_key" placeholder="Paste here your API KEY">
<label style="display:none" for="ai-engine-select">LLM Model:</label>
<select style="display:none" id="ai-engine-select" name="ai_engine">
<option value="engine1" selected disabled>Deactivated, set up your model on the main page.</option>
</select>
<label for="char-select">Scenarios and pre-prompts:</label>
<select id="char-select" name="char-select">
<option value="custom" selected>Custom (write your own default prompt in the field below)</option>
<option value="alien">Alien Rolplay</option>
<option value="translator">Translator assistant</option>
</select>
<label for="ai-engine-select">Optional pre-prompt (this is the default first instruction that will be sent when opening the extension.):</label>
<textarea id="pre-prompt-input"></textarea>
<button type="submit">Save</button>
</form>
<script src="options.js"></script>
</div>
</body>
</html>