milwright commited on
Commit
174f004
·
1 Parent(s): 6839f0d

deploy: integrate all improvements with clean binary-free history

Browse files

- Random text selection with timestamp-based randomization
- Fixed HF dataset loading with reduced API request sizes
- Improved AI word selection to avoid function words
- Enhanced prompt engineering with target word disclosure prevention
- Complete chat question system with 4 focused question types
- Progressive difficulty system and level management
- All improvements without binary files for HF compatibility

Files changed (3) hide show
  1. debug.html +47 -0
  2. src/aiService_clean.js +0 -0
  3. src/aiService_main.js +0 -0
debug.html ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Debug Book Service</title>
5
+ </head>
6
+ <body>
7
+ <h1>Book Service Debug</h1>
8
+ <div id="output"></div>
9
+
10
+ <script type="module">
11
+ import bookDataService from './src/bookDataService.js';
12
+
13
+ const output = document.getElementById('output');
14
+
15
+ async function debugBookService() {
16
+ try {
17
+ output.innerHTML += '<p>Loading dataset...</p>';
18
+ await bookDataService.loadDataset();
19
+
20
+ const status = bookDataService.getStatus();
21
+ output.innerHTML += `<p>Status: ${JSON.stringify(status, null, 2)}</p>`;
22
+
23
+ output.innerHTML += '<p>Getting 5 random books...</p>';
24
+ for (let i = 0; i < 5; i++) {
25
+ try {
26
+ const book = await bookDataService.getRandomBook();
27
+ output.innerHTML += `<div style="border:1px solid #ccc; margin:10px; padding:10px;">
28
+ <h3>Book ${i + 1}:</h3>
29
+ <p><strong>Title:</strong> ${book.title}</p>
30
+ <p><strong>Author:</strong> ${book.author}</p>
31
+ <p><strong>Source:</strong> ${book.source || 'local'}</p>
32
+ <p><strong>Text Length:</strong> ${book.text.length}</p>
33
+ <p><strong>Text Preview:</strong> ${book.text.substring(0, 200)}...</p>
34
+ </div>`;
35
+ } catch (error) {
36
+ output.innerHTML += `<p style="color:red">Error getting book ${i + 1}: ${error.message}</p>`;
37
+ }
38
+ }
39
+ } catch (error) {
40
+ output.innerHTML += `<p style="color:red">Error: ${error.message}</p>`;
41
+ }
42
+ }
43
+
44
+ debugBookService();
45
+ </script>
46
+ </body>
47
+ </html>
src/aiService_clean.js ADDED
File without changes
src/aiService_main.js ADDED
File without changes