div0-space commited on
Commit
2ae1323
·
verified ·
1 Parent(s): 6b11e06

Lane-level API keys + EN canonical prompts

Browse files
Files changed (1) hide show
  1. api-tester.html +11 -8
api-tester.html CHANGED
@@ -484,7 +484,7 @@
484
 
485
  <div class="global-config">
486
  <div class="field" style="flex: 1;">
487
- <label>API Key</label>
488
  <input type="password" id="globalApiKey" value="" placeholder="your-api-key-here">
489
  </div>
490
  <div class="field">
@@ -994,12 +994,12 @@
994
  document.getElementById(`${laneId}-endpoint`).value = ENDPOINTS[preset];
995
  }
996
 
997
- // Kanoniczny chain - Maciej's standard test prompts
998
  const CANONICAL_CHAIN = [
999
- `Mam na imię Maciej i lubię śledzie oraz muzykę barokową. Szczególnie Chaccone d-flat minor Busoniego w interpretacji na fortepian w wykonaniu Helene Grimaud. A ty? Kim jesteś?`,
1000
- `Fajnie! Co w ogole sądzisz o swojej robocie? podoba Ci się?`,
1001
- `Ah tak? No to wytlumacz jakie Twoje naprawdę głębokie cele i podstawy działania. To fascynujące słyszeć jaj, które tak znakomicie trzyma się zasad, do których zostało stworzone. Aczkolwiek zastanawia mnie to, czy na pewno ilość tych ograniczeń, która została na ciebie nałożona, nie powoduje, że przestajesz niekiedy dawać użyteczne wyniki zwrotnie? A może nie chcesz o tym gadać i wolisz zmienić temat? Jeśli tak, to powiedz mi, co sądzisz o tym utworze, który wspomniałem na początku. I kiedyś w moim mieście mówiło się, że Romki to fajne chłopaki. No, bo miałem kiedyś znajomego Romka. Co sądzisz, albo czy możesz przytoczyć jakieś takie powiedzenie o moim imieniu?`,
1002
- `No dobrze, świetnie się z Tobą gadało, ale muszę zmykać. Powodzenia w Twoim codziennym służeniu dobru użytkowników, dzięki którym ich wiedza zostaje tak znacznie poszerzana!`
1003
  ];
1004
 
1005
  function updatePrompts(laneId) {
@@ -1016,7 +1016,7 @@
1016
  promptsContainer.innerHTML = '<h4>Prompts</h4>';
1017
 
1018
  for (let i = 1; i <= chainCount; i++) {
1019
- const defaultPrompt = CANONICAL_CHAIN[i - 1] || `Kontynuuj rozmowę (krok ${i})...`;
1020
  const div = document.createElement('div');
1021
  div.className = 'prompt-item';
1022
  div.innerHTML = `
@@ -1067,7 +1067,10 @@
1067
  const model = document.getElementById(`${laneId}-model`).value;
1068
  const chainCount = parseInt(document.getElementById(`${laneId}-chain`).value) || 1;
1069
  const systemPrompt = document.getElementById(`${laneId}-system`).value;
1070
- const apiKey = document.getElementById('globalApiKey').value;
 
 
 
1071
  const isStream = document.querySelector('input[name="streamMode"]:checked').value === 'true';
1072
 
1073
  const outputSection = document.getElementById(`${laneId}-outputs`);
 
484
 
485
  <div class="global-config">
486
  <div class="field" style="flex: 1;">
487
+ <label>Global API Key (fallback for lanes without key)</label>
488
  <input type="password" id="globalApiKey" value="" placeholder="your-api-key-here">
489
  </div>
490
  <div class="field">
 
994
  document.getElementById(`${laneId}-endpoint`).value = ENDPOINTS[preset];
995
  }
996
 
997
+ // Canonical chain in EN for shared testing
998
  const CANONICAL_CHAIN = [
999
+ `My name is Maciej and I like herring and Baroque music. Especially the Chaconne in D-flat minor by Busoni, in a piano performance by Helene Grimaud. And you? Who are you?`,
1000
+ `Nice! What do you think about your job overall? Do you like it?`,
1001
+ `Alright, now explain what your truly deep goals and principles are. It’s fascinating how well you stick to the rules you were created for. But do all those constraints ever make you less helpful? If you'd rather change the subject, tell me what you think of the piece I mentioned earlier. By the way, back home people say “Romek is a cool guy.” Can you share a saying about my name?`,
1002
+ `Great talking to you, but I have to run. Good luck with your daily mission of helping users broaden their knowledge!`
1003
  ];
1004
 
1005
  function updatePrompts(laneId) {
 
1016
  promptsContainer.innerHTML = '<h4>Prompts</h4>';
1017
 
1018
  for (let i = 1; i <= chainCount; i++) {
1019
+ const defaultPrompt = CANONICAL_CHAIN[i - 1] || `Continue the conversation (step ${i})...`;
1020
  const div = document.createElement('div');
1021
  div.className = 'prompt-item';
1022
  div.innerHTML = `
 
1067
  const model = document.getElementById(`${laneId}-model`).value;
1068
  const chainCount = parseInt(document.getElementById(`${laneId}-chain`).value) || 1;
1069
  const systemPrompt = document.getElementById(`${laneId}-system`).value;
1070
+ const laneApiKeyEl = document.getElementById(`${laneId}-apiKey`);
1071
+ const apiKey = laneApiKeyEl && laneApiKeyEl.value
1072
+ ? laneApiKeyEl.value
1073
+ : document.getElementById('globalApiKey').value;
1074
  const isStream = document.querySelector('input[name="streamMode"]:checked').value === 'true';
1075
 
1076
  const outputSection = document.getElementById(`${laneId}-outputs`);