dmpantiu commited on
Commit
3ff2c4e
·
verified ·
1 Parent(s): 31d2c72

Upload folder using huggingface_hub

Browse files
web/static/js/chat.js CHANGED
@@ -26,7 +26,6 @@ class EurusChat {
26
  this.saveKeysBtn = document.getElementById('save-keys-btn');
27
  this.openaiKeyInput = document.getElementById('openai-key');
28
  this.arraylakeKeyInput = document.getElementById('arraylake-key');
29
- this.hfKeyInput = document.getElementById('hf-key');
30
 
31
  marked.setOptions({
32
  highlight: (code, lang) => {
@@ -81,7 +80,7 @@ class EurusChat {
81
  this.saveKeysBtn.addEventListener('click', () => this.saveAndSendKeys());
82
 
83
  // Allow Enter in key fields to submit
84
- [this.openaiKeyInput, this.arraylakeKeyInput, this.hfKeyInput].forEach(input => {
85
  input.addEventListener('keydown', (e) => {
86
  if (e.key === 'Enter') {
87
  e.preventDefault();
@@ -101,7 +100,6 @@ class EurusChat {
101
  const keys = JSON.parse(saved);
102
  if (keys.openai_api_key) this.openaiKeyInput.value = keys.openai_api_key;
103
  if (keys.arraylake_api_key) this.arraylakeKeyInput.value = keys.arraylake_api_key;
104
- if (keys.hf_token) this.hfKeyInput.value = keys.hf_token;
105
  } catch (e) {
106
  sessionStorage.removeItem('eurus-keys');
107
  }
@@ -119,7 +117,6 @@ class EurusChat {
119
  type: 'configure_keys',
120
  openai_api_key: keys.openai_api_key,
121
  arraylake_api_key: keys.arraylake_api_key || '',
122
- hf_token: keys.hf_token || '',
123
  }));
124
  }
125
  } catch (e) {
@@ -130,7 +127,6 @@ class EurusChat {
130
  saveAndSendKeys() {
131
  const openaiKey = this.openaiKeyInput.value.trim();
132
  const arraylakeKey = this.arraylakeKeyInput.value.trim();
133
- const hfKey = this.hfKeyInput.value.trim();
134
 
135
  if (!openaiKey) {
136
  this.openaiKeyInput.focus();
@@ -141,7 +137,6 @@ class EurusChat {
141
  const keysPayload = {
142
  openai_api_key: openaiKey,
143
  arraylake_api_key: arraylakeKey,
144
- hf_token: hfKey,
145
  };
146
  sessionStorage.setItem('eurus-keys', JSON.stringify(keysPayload));
147
 
 
26
  this.saveKeysBtn = document.getElementById('save-keys-btn');
27
  this.openaiKeyInput = document.getElementById('openai-key');
28
  this.arraylakeKeyInput = document.getElementById('arraylake-key');
 
29
 
30
  marked.setOptions({
31
  highlight: (code, lang) => {
 
80
  this.saveKeysBtn.addEventListener('click', () => this.saveAndSendKeys());
81
 
82
  // Allow Enter in key fields to submit
83
+ [this.openaiKeyInput, this.arraylakeKeyInput].forEach(input => {
84
  input.addEventListener('keydown', (e) => {
85
  if (e.key === 'Enter') {
86
  e.preventDefault();
 
100
  const keys = JSON.parse(saved);
101
  if (keys.openai_api_key) this.openaiKeyInput.value = keys.openai_api_key;
102
  if (keys.arraylake_api_key) this.arraylakeKeyInput.value = keys.arraylake_api_key;
 
103
  } catch (e) {
104
  sessionStorage.removeItem('eurus-keys');
105
  }
 
117
  type: 'configure_keys',
118
  openai_api_key: keys.openai_api_key,
119
  arraylake_api_key: keys.arraylake_api_key || '',
 
120
  }));
121
  }
122
  } catch (e) {
 
127
  saveAndSendKeys() {
128
  const openaiKey = this.openaiKeyInput.value.trim();
129
  const arraylakeKey = this.arraylakeKeyInput.value.trim();
 
130
 
131
  if (!openaiKey) {
132
  this.openaiKeyInput.focus();
 
137
  const keysPayload = {
138
  openai_api_key: openaiKey,
139
  arraylake_api_key: arraylakeKey,
 
140
  };
141
  sessionStorage.setItem('eurus-keys', JSON.stringify(keysPayload));
142
 
web/templates/index.html CHANGED
@@ -20,10 +20,6 @@
20
  <label for="arraylake-key">Arraylake API Key</label>
21
  <input type="password" id="arraylake-key" placeholder="ema_..." autocomplete="off">
22
  </div>
23
- <div class="api-key-field">
24
- <label for="hf-key">HuggingFace Token</label>
25
- <input type="password" id="hf-key" placeholder="hf_..." autocomplete="off">
26
- </div>
27
  <button id="save-keys-btn" class="save-keys-btn">Connect</button>
28
  </div>
29
  </div>
@@ -64,5 +60,5 @@
64
  {% endblock %}
65
 
66
  {% block scripts %}
67
- <script src="/static/js/chat.js?v=20260218b"></script>
68
  {% endblock %}
 
20
  <label for="arraylake-key">Arraylake API Key</label>
21
  <input type="password" id="arraylake-key" placeholder="ema_..." autocomplete="off">
22
  </div>
 
 
 
 
23
  <button id="save-keys-btn" class="save-keys-btn">Connect</button>
24
  </div>
25
  </div>
 
60
  {% endblock %}
61
 
62
  {% block scripts %}
63
+ <script src="/static/js/chat.js?v=20260218c"></script>
64
  {% endblock %}